diff options
author | Luis Medinas <lmedinas@gnome.org> | 2010-07-29 22:19:48 +0100 |
---|---|---|
committer | Luis Medinas <lmedinas@gnome.org> | 2010-07-29 22:19:48 +0100 |
commit | 6d0c1a586eb750ef5695b01dd717b48590ecf49a (patch) | |
tree | 9777cdc4cabe0fe7a23035183d43a7493e3222f4 | |
parent | [l10n] Updated Estonian translation (diff) | |
download | zenity-6d0c1a586eb750ef5695b01dd717b48590ecf49a.tar.gz zenity-6d0c1a586eb750ef5695b01dd717b48590ecf49a.tar.bz2 zenity-6d0c1a586eb750ef5695b01dd717b48590ecf49a.zip |
Make zenity compile with GTK2 and GTK3
GNOME 2.32 will use GTK2 but Zenity is ready for GNOME 3.0
-rw-r--r-- | configure.in | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/configure.in b/configure.in index f43b88ba..f32dd647 100644 --- a/configure.in +++ b/configure.in @@ -18,9 +18,28 @@ IT_PROG_INTLTOOL([0.40.0]) AC_PROG_CC -GTK_REQUIRED=2.90.2 - -PKG_CHECK_MODULES([ZENITY],[gtk+-3.0 >= $GTK_REQUIRED glib-2.0]) +GTK_REQUIRED=2.18.0 + +AC_MSG_CHECKING([which gtk+ version to compile against]) +AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])], + [case "$with_gtk" in + 2.0|3.0) ;; + *) AC_MSG_ERROR([invalid gtk version specified]) ;; + esac], + [with_gtk=2.0]) +AC_MSG_RESULT([$with_gtk]) + +case "$with_gtk" in + 2.0) GTK_API_VERSION=2.0 + GTK_REQUIRED=2.18.0 + ;; + 3.0) GTK_API_VERSION=3.0 + GTK_REQUIRED=2.90.4 + ;; +esac + +PKG_CHECK_MODULES([ZENITY],[gtk+-$GTK_API_VERSION >= $GTK_REQUIRED glib-2.0]) AC_SUBST([ZENITY_CFLAGS]) AC_SUBST([ZENITY_LIBS]) @@ -30,7 +49,7 @@ dnl ************************* zenity_save_cflags="$CFLAGS" # pull in the CFLAGS to locate gdkconfig.h -CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0` +CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` AC_COMPILE_IFELSE([ #include <gdkconfig.h> |