[gst-cvs] gst-plugins-bad: configure: don' t even check for Gtk+ if --disable-examples is specified

Tim Müller tpm at kemper.freedesktop.org
Thu Nov 4 17:34:14 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 2362acbec3b8fd674521e286ad857277e306aeb1
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=2362acbec3b8fd674521e286ad857277e306aeb1

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Fri Nov  5 00:32:35 2010 +0000

configure: don't even check for Gtk+ if --disable-examples is specified

There are Gtk+-based examples in plugin dirs and tests/icles/ too, and
we want to disable those as well then.

---

 configure.ac |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 45972c8..c057cd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,17 +206,19 @@ AC_SUBST(GSTPB_PREFIX)
 
 dnl GTK is optional and used in examples
 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+-x11-$with_gtk, HAVE_GTK=yes, HAVE_GTK=no)
+if test "x$BUILD_EXAMPLES" = "xyes"; then
+  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+-x11-$with_gtk, HAVE_GTK=yes, HAVE_GTK=no)
+fi
 AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes")
 
 dnl Needed for GtkBuilder to autoconnect signals





More information about the Gstreamer-commits mailing list