summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-05-02 19:36:57 +0200
committerStefano Karapetsas <[email protected]>2014-05-02 19:36:57 +0200
commit71dfbd694341aa2d9758297fc1fd8ccde910a662 (patch)
tree3f8083cea02ba73e8fbb088c4cf9515435699d5a /configure.ac
parent310181bbdddc2e8bdb43d54a6321a1f36649423f (diff)
downloadmate-sensors-applet-71dfbd694341aa2d9758297fc1fd8ccde910a662.tar.bz2
mate-sensors-applet-71dfbd694341aa2d9758297fc1fd8ccde910a662.tar.xz
Add GTK3 support
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 21 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 8bb721b..1468f84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,18 +47,37 @@ AC_CHECK_HEADERS(
)
GLIB_REQUIRED=2.26.0
-GTK_REQUIRED=2.14.0
LIBPANEL_REQUIRED=1.1.0
LIBNOTIFY_REQUIRED=0.7.0
LIBCAIRO_REQUIRED=1.0.4
LIBDBUSGLIB_REQUIRED=0.80
LIBATASMART_REQUIRED=0.16
+# ================= GTK+ API version ================= #
+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(GLIB, glib-2.0 >= $GLIB_REQUIRED gio-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
+PKG_CHECK_MODULES(GTK, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)