summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-17 12:48:47 +0200
committerStefano Karapetsas <[email protected]>2013-10-17 12:48:47 +0200
commitd48881774ff4ad74f0d94b95c8908ed44fc681fb (patch)
treeb74c13377aa7e2e15f3e9651ea9ddcc1e0dfd1ee
parentccc52826fef26994255cac94e690788fad55b423 (diff)
downloadmate-media-d48881774ff4ad74f0d94b95c8908ed44fc681fb.tar.bz2
mate-media-d48881774ff4ad74f0d94b95c8908ed44fc681fb.tar.xz
Add support for multiple GTK versions in configure
-rw-r--r--configure.ac35
1 files changed, 27 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 0c831a8..1c1229e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,18 +58,40 @@ fi
AC_MSG_NOTICE([Using $GM_ERROR_CFLAGS as error checking CFLAGS])
GLIB_REQUIRED_VERSION=2.18.2
-GTK_REQUIRED_VERSION=2.18.0
GIO_REQUIRED_VERSION=2.25.0
PA_REQUIRED_VERSION=0.9.16
CANBERRA_REQUIRED_VERSION=0.13
dnl=======================================================================
+dnl Support multiple GTK versions
+dnl=======================================================================
+
+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.18.0
+ ;;
+ 3.0) GTK_API_VERSION=3.0
+ GTK_REQUIRED_VERSION=3.0.0
+ ;;
+esac
+
+dnl=======================================================================
dnl Check for libcanberra
dnl=======================================================================
PKG_CHECK_MODULES(SOUND_THEME,
gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
libcanberra-gtk >= $CANBERRA_REQUIRED_VERSION
libxml-2.0,
@@ -88,9 +110,6 @@ dnl=======================================================================
dnl Check for the new volume control modules
dnl=======================================================================
-dnl The new mate-volume-control needs a newer GTK+
-GTK_REQUIRED_VERSION=2.15.1
-
AC_ARG_ENABLE([pulseaudio],
AS_HELP_STRING([--enable-pulseaudio],
[Enable PulseAudio support @<:@default=auto@:>@]),
@@ -110,7 +129,7 @@ if test "x$enable_pulseaudio" != "xno"; then
if test "x$have_pulseaudio" = "xyes" ; then
PKG_CHECK_MODULES(VOLUME_CONTROL,
gobject-2.0 >= $GLIB_REQUIRED_VERSION
- gtk+-2.0 >= $GTK_REQUIRED_VERSION
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
libcanberra-gtk >= $CANBERRA_REQUIRED_VERSION
unique-1.0
@@ -152,7 +171,7 @@ have_gst=no
PKG_CHECK_MODULES(GSR, [
gstreamer-$GST_MAJORMINOR >= $GST_REQ
gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQ
- gtk+-2.0 >= 2.6.0
+ gtk+-$GTK_API_VERSION >= $GTK_REQUIRED_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION],
have_gst=yes,
[
@@ -200,7 +219,7 @@ fi
if test "x$have_gst" = "xyes" && test "x$enable_gstmix" = "xyes";
then
PKG_CHECK_MODULES(GSTMIXER, [
- gtk+-2.0
+ gtk+-$GTK_API_VERSION
gio-2.0 >= $GIO_REQUIRED_VERSION
gstreamer-$GST_MAJORMINOR
gstreamer-plugins-base-$GST_MAJORMINOR