diff options
author | Laszlo Boros <[email protected]> | 2013-07-18 00:55:51 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-08-11 17:56:00 +0200 |
commit | f5e3f9b082442139614a903a1cd84474a1adcb6e (patch) | |
tree | 26277cc8590e164117e2b818399769c44ef50ac8 /configure.ac | |
parent | 002703a0f4b6167dd6421c3a0a96795c6386c840 (diff) | |
download | mate-polkit-f5e3f9b082442139614a903a1cd84474a1adcb6e.tar.bz2 mate-polkit-f5e3f9b082442139614a903a1cd84474a1adcb6e.tar.xz |
GTK3 compatibility
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6224320..35024b3 100644 --- a/configure.ac +++ b/configure.ac @@ -120,11 +120,31 @@ MATE_MAINTAINER_MODE_DEFINES # Check for required packages # *************************** -GTK_REQUIRED=2.17.1 +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.24.0 + ;; + 3.0) GTK_API_VERSION=3.0 + GTK_REQUIRED=3.0.0 + ;; +esac + +PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED) + + POLKIT_AGENT_REQUIRED=0.97 POLKIT_GOBJECT_REQUIRED=0.97 -PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) |