From 3aaa0f97639b12eb4fee879a8d540603c1ccdc1f Mon Sep 17 00:00:00 2001 From: pabs Date: Sat, 9 Feb 2008 07:14:32 +0000 Subject: [PATCH] Check if Gtk::AboutDialog::set_program_name is available and only use it if it is. This fixes an FTBFS when using GTK+ 2.12 with GTKmm 2.10 reported by Aurore D. git-svn-id: http://svn.voria.com/code@1636 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/configure.ac | 21 ++++++++++++++++++++- synfig-studio/trunk/src/gtkmm/about.cpp | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/synfig-studio/trunk/configure.ac b/synfig-studio/trunk/configure.ac index 986df9a..54bf1d8 100755 --- a/synfig-studio/trunk/configure.ac +++ b/synfig-studio/trunk/configure.ac @@ -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 ] + ],[ + [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) diff --git a/synfig-studio/trunk/src/gtkmm/about.cpp b/synfig-studio/trunk/src/gtkmm/about.cpp index 698f4c3..1d98bfc 100644 --- a/synfig-studio/trunk/src/gtkmm/about.cpp +++ b/synfig-studio/trunk/src/gtkmm/about.cpp @@ -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); -- 2.7.4