[krb5-auth-dialog] Add --with-gtk



commit 85f1fa074112da0a48b1c610ce63d4d495000d73
Author: Guido Günther <agx sigxcpu org>
Date:   Thu Jul 29 12:24:44 2010 +0200

    Add --with-gtk
    
    to select the GTK+ version used. Code taken from gtk-vnc.

 configure.ac |   37 +++++++++++++++++++++++++++++--------
 1 files changed, 29 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a23b7db..6a41ca7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,21 +27,42 @@ AM_PROG_CC_C_O
 KA_COMPILE_WARNINGS([maximum])
 GNOME_DOC_INIT
 
-GTK_REQUIRED="2.90.4"
-GLIB_REQUIRED="2.25.10"
-DBUS_REQUIRED="0.82"
-GCONF_REQUIRED="2.31"
-LIBNOTIFY_REQUIRED="0.5.1"
-
-dnl check for deprecated symbols:
-dnl GNOME_MAINTAINER_MODE_DEFINES
-
-PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_REQUIRED, glib-2.0 >= $GLIB_REQUIRED])
+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.16.0
+       GLIB_REQUIRED=2.16.0
+       DBUS_REQUIRED=0.60
+       GCONF_REQUIRED=2.8
+       LIBNOTIFY_REQUIRED=0.4
+       ;;
+  3.0) GTK_API_VERSION=3.0
+       GTK_REQUIRED=2.90.4
+       GLIB_REQUIRED="2.25.10"
+       DBUS_REQUIRED="0.82"
+       GCONF_REQUIRED="2.31"
+       LIBNOTIFY_REQUIRED="0.5.1"
+       ;;
+esac
+
+PKG_CHECK_MODULES(GTK, [gtk+-$GTK_API_VERSION >= $GTK_REQUIRED, glib-2.0 >= $GLIB_REQUIRED])
 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= $DBUS_REQUIRED)
 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
 PKG_CHECK_MODULES(GIO, [gio-2.0, gio-unix-2.0])
 PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
 
+dnl check for deprecated symbols:
+dnl GNOME_MAINTAINER_MODE_DEFINES
+
 AM_GCONF_SOURCE_2
 
 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]