summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 41 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 5aace91c..a4a2d9f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,21 +60,49 @@ LIBMATE_DESKTOP_REQUIRED=1.5.0
GDK_PIXBUF_REQUIRED=2.7.1
PANGO_REQUIRED=1.15.4
GLIB_REQUIRED=2.26
-GTK_REQUIRED=2.19.7
-LIBMATEWNCK_REQUIRED=1.5.1
LIBMATE_MENU_REQUIRED=1.1.0
CAIRO_REQUIRED=1.0.0
-MATEWEATHER_REQUIRED=1.5.0
DBUS_GLIB_REQUIRED=0.80
DCONF_NEW_REQUIRED=0.13.4
DCONF_OLD_REQUIRED=0.10.0
+# GTK library
+
+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.19.7
+ LIBWNCK_API_VERSION=1.0
+ LIBWNCK_REQUIRED=2.30.0
+ LIBCANBERRA_API_VERSION=
+ WEATHER_LIB=mateweather
+ WEATHER_REQUIRED=1.5.0
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED=3.0.0
+ LIBCANBERRA_API_VERSION=3
+ LIBWNCK_API_VERSION=3.0
+ LIBWNCK_REQUIRED=3.0.0
+ WEATHER_LIB=gweather-3.0
+ WEATHER_REQUIRED=3.8.0
+ ;;
+esac
+
dnl pkg-config dependency checks
-PKG_CHECK_MODULES(EGG_SMCLIENT, ice sm gtk+-2.0)
+PKG_CHECK_MODULES(EGG_SMCLIENT, ice sm gtk+-$GTK_API_VERSION)
PKG_CHECK_MODULES(GMODULE, gmodule-2.0,[GMODULE_ADD="gmodule-2.0"],[GMODULE_ADD=""])
-PKG_CHECK_MODULES(PANEL, $GMODULE_ADD gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED gio-2.0 >= $GLIB_REQUIRED libmate-menu >= $LIBMATE_MENU_REQUIRED libcanberra-gtk dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
+PKG_CHECK_MODULES(PANEL, $GMODULE_ADD gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED pango >= $PANGO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED gio-2.0 >= $GLIB_REQUIRED libmate-menu >= $LIBMATE_MENU_REQUIRED libcanberra-gtk$LIBCANBERRA_API_VERSION dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
AC_SUBST(PANEL_CFLAGS)
AC_SUBST(PANEL_LIBS)
@@ -88,19 +116,19 @@ AC_SUBST(DCONF_CFLAGS)
AC_SUBST(DCONF_LIBS)
-PKG_CHECK_MODULES(LIBMATE_PANEL_APPLET, gtk+-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED)
+PKG_CHECK_MODULES(LIBMATE_PANEL_APPLET, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED)
AC_SUBST(LIBMATE_PANEL_APPLET_CFLAGS)
AC_SUBST(LIBMATE_PANEL_APPLET_LIBS)
-PKG_CHECK_MODULES(FISH, gtk+-2.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
+PKG_CHECK_MODULES(FISH, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)
-PKG_CHECK_MODULES(NOTIFICATION_AREA, gtk+-2.0 >= $GTK_REQUIRED)
+PKG_CHECK_MODULES(NOTIFICATION_AREA, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
AC_SUBST(NOTIFICATION_AREA_CFLAGS)
AC_SUBST(NOTIFICATION_AREA_LIBS)
-PKG_CHECK_MODULES(WNCKLET, gtk+-2.0 >= $GTK_REQUIRED libmatewnck >= $LIBMATEWNCK_REQUIRED)
+PKG_CHECK_MODULES(WNCKLET, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED libwnck-$LIBWNCK_API_VERSION >= $LIBWNCK_REQUIRED)
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)
@@ -111,7 +139,7 @@ PKG_CHECK_MODULES(TZ, gio-2.0 >= $GLIB_REQUIRED)
AC_SUBST(TZ_CFLAGS)
AC_SUBST(TZ_LIBS)
-PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED librsvg-2.0 dbus-glib-1 mateweather >= $MATEWEATHER_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED)
+PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED librsvg-2.0 dbus-glib-1 $WEATHER_LIB >= $WEATHER_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED)
AC_SUBST(CLOCK_CFLAGS)
AC_SUBST(CLOCK_LIBS)
@@ -258,9 +286,9 @@ dnl gtk-doc stuff
GTK_DOC_CHECK([1.0])
-dnl mate-doc-utils stuff
+dnl yelp-tools stuff
-MATE_DOC_INIT
+YELP_HELP_INIT
GLIB_GSETTINGS
@@ -353,6 +381,7 @@ echo "
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
+ Gtk+ version: ${GTK_API_VERSION}
Ubuntu Counter Hack: ${ENABLE_UBUNTU}
Applets to build in-process: ${PANEL_INPROCESS_APPLETS}
NetworkManager support: ${HAVE_NETWORK_MANAGER}