summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac25
2 files changed, 26 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 3a0710f..e33e7f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,8 +9,11 @@ SUBDIRS = \
udp \
random \
agent \
- nice \
- gst
+ nice
+
+if WITH_GSTREAMER
+ SUBDIRS += gst
+endif
EXTRA_DIST = scripts common.mk
diff --git a/configure.ac b/configure.ac
index 675d886..07b1caf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,10 +30,27 @@ PKG_CHECK_MODULES(GLIB, [dnl
gobject-2.0 >= 2.10 dnl
])
-PKG_CHECK_MODULES(GST, [
- gstreamer-0.10 >= 0.10.0
- gstreamer-base-0.10 >= 0.10.0
- ])
+AC_ARG_WITH(gstreamer,
+ AC_HELP_STRING([--with-gstreamer], [use GStreamer]),
+ [with_gstreamer=${withval}],
+ [with_gstreamer=auto])
+
+if test "$with_gstreamer" != no; then
+ PKG_CHECK_MODULES(GST, [
+ gstreamer-0.10 >= 0.10.0
+ gstreamer-base-0.10 >= 0.10.0
+ ],
+ [with_gstreamer=yes],
+ [
+ if test "$with_gstreamer" = yes; then
+ AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
+ fi
+
+ with_gstreamer=no
+ ])
+fi
+
+AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
AC_OUTPUT