summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-11-05 16:24:42 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-11-05 16:25:22 +0000
commit562ff37d800c961664a7152d7fd723bd60e302f3 (patch)
treec240ff67fb6d4542f54cd3b397d45e3b1c00105e
parent5b68b64617f08939e2b14a0ad88e1996504c544d (diff)
configure: add --with-gtk option and default to Gtk+ 2.0 while the 3.0 API is still in flux
https://bugzilla.gnome.org/show_bug.cgi?id=634014
-rw-r--r--configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 82a8b249a..6956cf085 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,9 +239,19 @@ AC_SUBST(GST_PREFIX)
AC_SUBST(GSTPB_PREFIX)
dnl GTK is optional and used in examples
+HAVE_GTK=no
if test "x$BUILD_EXAMPLES" = "xyes"; then
- PKG_CHECK_MODULES(GTK, gtk+-3.0, HAVE_GTK=yes,
- [PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.14.0, HAVE_GTK=yes, HAVE_GTK=no)])
+ AC_MSG_CHECKING([which gtk+ version to compile examples against (optional)])
+ AC_ARG_WITH([gtk],
+ AC_HELP_STRING([--with-gtk=3.0|2.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])
+ PKG_CHECK_MODULES(GTK, gtk+-$with_gtk, HAVE_GTK=yes, HAVE_GTK=no)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
fi