diff options
-rw-r--r-- | configure.ac | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 7071640c..07a54430 100644 --- a/configure.ac +++ b/configure.ac @@ -60,21 +60,46 @@ 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 + 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=-gtk3 + WEATHER_LIB=gweather + 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,30 +113,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 $WEATHER_LIB >= $WEATHER_REQUIRED mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED) AC_SUBST(CLOCK_CFLAGS) AC_SUBST(CLOCK_LIBS) @@ -353,6 +378,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} |