summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2013-11-23 13:05:01 +0100
committerinfirit <[email protected]>2013-11-23 13:05:01 +0100
commit59c098115d1044bb3df58bddece6bb4a8ec0c92d (patch)
tree2ad2680742ce560041d21cb9cc3c0600af8083e3
parent11c4069c618a6253db551fa5300b0ee5fc4f5de6 (diff)
downloadmate-system-monitor-59c098115d1044bb3df58bddece6bb4a8ec0c92d.tar.bz2
mate-system-monitor-59c098115d1044bb3df58bddece6bb4a8ec0c92d.tar.xz
Add Gtk3 support to configure
-rw-r--r--configure.ac32
1 files changed, 28 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 39fff86..3a74e40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,19 +25,42 @@ AC_HEADER_STDC
MATE_COMPILE_WARNINGS
GLIB_REQUIRED=2.28.0
-LIBWNCK_REQUIRED=2.5.0
LIBGTOP_REQUIRED=2.23.1
-GTK_REQUIRED=2.20.0
MATE_ICON_THEME_REQUIRED=1.1.0
-GTKMM_REQUIRED=2.22
GIOMM_REQUIRED=2.26.0
GLIBMM_REQUIRED=2.22
LIBXML_REQUIRED=2.0
RSVG_REQUIRED=2.12
DBUS_REQUIRED=0.7
+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.20.0
+ GTKMM_API_VERSION=2.4
+ GTKMM_REQUIRED=2.22
+ LIBWNCK_API_VERSION=1.0
+ LIBWNCK_REQUIRED=2.5.0
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED=3.0.0
+ GTKMM_API_VERSION=3.0
+ GTKMM_REQUIRED=3.0.0
+ LIBWNCK_API_VERSION=3.0
+ LIBWNCK_REQUIRED=2.91.0
+ ;;
+ esac
+
PKG_CHECK_MODULES(GMODULE,gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""])
-PKG_CHECK_MODULES(PROCMAN,$GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-1.0 >= $LIBWNCK_REQUIRED gtk+-2.0 >= $GTK_REQUIRED mate-icon-theme >= $MATE_ICON_THEME_REQUIRED gtkmm-2.4 >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
+PKG_CHECK_MODULES(PROCMAN,$GMODULE_ADD glib-2.0 >= $GLIB_REQUIRED libgtop-2.0 >= $LIBGTOP_REQUIRED libwnck-$LIBWNCK_API_VERSION >= $LIBWNCK_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED mate-icon-theme >= $MATE_ICON_THEME_REQUIRED gtkmm-$GTKMM_API_VERSION >= $GTKMM_REQUIRED libxml-2.0 >= $LIBXML_REQUIRED librsvg-2.0 >= $RSVG_REQUIRED glibmm-2.4 >= $GLIBMM_REQUIRED giomm-2.4 >= $GIOMM_REQUIRED dbus-glib-1 >= $DBUS_REQUIRED)
AC_ARG_ENABLE(more-warnings,
@@ -98,6 +121,7 @@ Configuration:
C++ Compiler: ${CXX}
CFLAGS: ${CFLAGS}
CXXFLAGS: ${CXXFLAGS}
+ Gtk+ Version: ${GTK_API_VERSION}
Maintainer mode: ${USER_MAINTAINER_MODE}
Languages: ${ALL_LINGUAS}
"