summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-03 21:21:15 +0100
committerStefano Karapetsas <[email protected]>2013-11-03 21:21:15 +0100
commitf5caef19e9e4cf68a697f94b4f6f4c023079d244 (patch)
treec0153b1f88f927e5fbb7ff8535d95bcf81c00a37 /configure.ac
parent302e88b4259e21db0db34533b766023a67ad2efb (diff)
downloadmate-screensaver-f5caef19e9e4cf68a697f94b4f6f4c023079d244.tar.bz2
mate-screensaver-f5caef19e9e4cf68a697f94b4f6f4c023079d244.tar.xz
Add GTK3 support in configure
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index af6de54..f0b6c9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,13 +46,30 @@ GLIB_GSETTINGS
DBUS_REQUIRED_VERSION=0.30
GLIB_REQUIRED_VERSION=2.15.0
-GDK_REQUIRED_VERSION=2.14.0
-GTK_REQUIRED_VERSION=2.11.5
X11_REQUIRED_VERSION=1.0
LIBMATE_MENU_REQUIRED_VERSION=1.5.0
MATE_DESKTOP_REQUIRED_VERSION=1.5.3
LIBMATEKBDUI_REQUIRED_VERSION=1.5.0
+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_VERSION=2.14.0
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED_VERSION=3.0.0
+ ;;
+esac
+
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(crypt.h sys/select.h)
AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv sbrk)
@@ -64,7 +81,7 @@ AC_CHECK_FUNCS([setresuid setenv unsetenv clearenv])
PKG_CHECK_MODULES(MATE_SCREENSAVER,
x11 >= $X11_REQUIRED_VERSION
xscrnsaver
- gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION
dbus-glib-1 >= $DBUS_REQUIRED_VERSION
gio-2.0 >= $GLIB_REQUIRED_VERSION
mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED_VERSION
@@ -75,13 +92,13 @@ AC_SUBST(MATE_SCREENSAVER_LIBS)
PKG_CHECK_MODULES(MATE_SCREENSAVER_DIALOG,
gio-2.0 >= $GLIB_REQUIRED_VERSION
gthread-2.0
- gtk+-2.0 >= $GTK_REQUIRED_VERSION)
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
AC_SUBST(MATE_SCREENSAVER_DIALOG_CFLAGS)
AC_SUBST(MATE_SCREENSAVER_DIALOG_LIBS)
PKG_CHECK_MODULES(MATE_SCREENSAVER_CAPPLET,
gio-2.0 >= $GLIB_REQUIRED_VERSION
- gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION
libmate-menu >= $LIBMATE_MENU_REQUIRED_VERSION)
AC_SUBST(MATE_SCREENSAVER_CAPPLET_CFLAGS)
AC_SUBST(MATE_SCREENSAVER_CAPPLET_LIBS)
@@ -111,7 +128,7 @@ esac
# Optional dependencies for the theme engines
-SAVER_MODULES="gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED_VERSION gobject-2.0 >= $GLIB_REQUIRED_VERSION"
+SAVER_MODULES="gthread-2.0 gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION gobject-2.0 >= $GLIB_REQUIRED_VERSION"
PKG_CHECK_MODULES(MATE_SCREENSAVER_SAVER, $SAVER_MODULES)
AC_SUBST(MATE_SCREENSAVER_SAVER_CFLAGS)
@@ -175,7 +192,7 @@ AC_SUBST(PAM_PREFIX)
# Desktop entry handling
PKG_CHECK_MODULES(LIB_MATE_MENU,
- gtk+-2.0 >= $GTK_REQUIRED_VERSION)
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION)
AC_SUBST(LIB_MATE_MENU_CFLAGS)
AC_SUBST(LIB_MATE_MENU_LIBS)
@@ -1142,6 +1159,7 @@ echo "
Docs enabled: ${enable_docbook_docs}
GL: ${have_libgl}
+ GTK+ API version: ${GTK_API_VERSION}
Screen locking enabled: ${enable_locking}
Show keyboard indicator: ${with_kbd_layout_indicator}