diff options
author | Stefano Karapetsas <[email protected]> | 2013-07-26 14:01:36 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-07-26 14:01:36 +0200 |
commit | 30e2ebbb240aef037cd0da49db067f9493407d59 (patch) | |
tree | a64ba22625abd053ea7a70db1d6f2bf47dc1b3fd /configure.ac | |
parent | 95aab3454879d73a8ad049c17d566629374b30bc (diff) | |
download | mate-panel-30e2ebbb240aef037cd0da49db067f9493407d59.tar.bz2 mate-panel-30e2ebbb240aef037cd0da49db067f9493407d59.tar.xz |
Add support for GTK3 in configure
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 5aace91c..292abd2a 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,6 @@ 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 @@ -69,12 +68,33 @@ 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 + ;; + 3.0) GTK_API_VERSION=3.0 + GTK_REQUIRED=3.0.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 dbus-glib-1 >= $DBUS_GLIB_REQUIRED) AC_SUBST(PANEL_CFLAGS) AC_SUBST(PANEL_LIBS) @@ -88,30 +108,30 @@ 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 libmatewnck >= $LIBMATEWNCK_REQUIRED) AC_SUBST(WNCKLET_CFLAGS) AC_SUBST(WNCKLET_LIBS) AC_CHECK_HEADERS(langinfo.h) AC_CHECK_FUNCS(nl_langinfo) -PKG_CHECK_MODULES(TZ, gio-2.0 >= $GLIB_REQUIRED) +PKG_CHECK_MODULES(TZ, gio-$GTK_API_VERSION >= $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 mateweather >= $MATEWEATHER_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED) AC_SUBST(CLOCK_CFLAGS) AC_SUBST(CLOCK_LIBS) @@ -353,6 +373,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} |