diff options
author | Stefano Karapetsas <[email protected]> | 2014-06-25 13:46:19 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-06-25 13:46:19 +0200 |
commit | 4c51215f6e2ba302f4d9f1a78650d9209eca7f35 (patch) | |
tree | 365175dbda669a57c4cbed07089e6639a002245d /configure.ac | |
parent | 12ea8a6c3b8b1e6fd7c62624dd123ae49d92d833 (diff) | |
download | mate-indicator-applet-4c51215f6e2ba302f4d9f1a78650d9209eca7f35.tar.bz2 mate-indicator-applet-4c51215f6e2ba302f4d9f1a78650d9209eca7f35.tar.xz |
Add GTK3 support
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 51f489c..377cdf7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,17 +25,37 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) # Dependencies ########################### -GTK_REQUIRED_VERSION=2.12 +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 + INDICATOR_API_VERSION= + ;; + 3.0) GTK_API_VERSION=3.0 + GTK_REQUIRED=3.0.0 + INDICATOR_API_VERSION=3 + ;; +esac + INDICATOR_REQUIRED_VERSION=0.3.22 -PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION +PKG_CHECK_MODULES(APPLET, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION x11 libmatepanelapplet-4.0 ) AC_SUBST(APPLET_CFLAGS) AC_SUBST(APPLET_LIBS) -PKG_CHECK_MODULES([INDICATOR4], [indicator-0.4 >= $INDICATOR_REQUIRED_VERSION], +PKG_CHECK_MODULES([INDICATOR4], [indicator$INDICATOR_API_VERSION-0.4 >= $INDICATOR_REQUIRED_VERSION], [ AC_DEFINE([HAVE_INDICATOR4], [1], [Use Indicator 0.4]) INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4` @@ -151,4 +171,5 @@ AC_MSG_NOTICE([ Indicator Applet Configuration: Prefix: $prefix + GTK+ version: ${GTK_API_VERSION} ]) |