Check if Gtk::AboutDialog::set_program_name is available and only use it if it is...
authorpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 9 Feb 2008 07:14:32 +0000 (07:14 +0000)
committerpabs <pabs@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 9 Feb 2008 07:14:32 +0000 (07:14 +0000)
git-svn-id: http://svn.voria.com/code@1636 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/configure.ac
synfig-studio/trunk/src/gtkmm/about.cpp

index 986df9a..54bf1d8 100755 (executable)
@@ -87,7 +87,26 @@ case "$host" in
 esac
 # -- L I B R A R I E S ----------------------------------------
 
-PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 gthread-2.0,[],[
+PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 gthread-2.0,[
+       AC_MSG_CHECKING([for Gtk::AboutDialog::set_program_name])
+       CXXFLAGS="$GTKMM_CFLAGS"
+       AC_COMPILE_IFELSE(
+               [
+                       AC_LANG_PROGRAM([
+                               [#include <gtkmm/aboutdialog.h>]
+                       ],[
+                               [Gtk::AboutDialog about; about.set_program_name(PACKAGE_NAME)]
+                       ])
+               ],[
+                       AC_MSG_RESULT([yes])
+                       AC_DEFINE(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,[],[Define if GTKmm provides Gtk::AboutDialog::set_program_name()] )
+                       AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,true)
+               ],[
+                       AC_MSG_RESULT([no])
+                       AM_CONDITIONAL(HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME,false)
+               ]
+       )
+],[
        AC_MSG_ERROR([ ** Gtkmm-2.4 Is a required library, aborting.])
 ])
 AC_SUBST(GTKMM_CFLAGS)
index 698f4c3..1d98bfc 100644 (file)
@@ -95,7 +95,7 @@ extern const guint gtk_interface_age;
 About::About()
 {
 
-#if GTK_CHECK_VERSION (2, 12, 0)
+#ifdef HAVE_GTK_ABOUTDIALOG_SET_PROGRAM_NAME
        set_program_name(PACKAGE_NAME);
 #else
        set_name(PACKAGE_NAME);