Add configure switch for compiling with either gstreamer-0.10
authorErik Slagter <erik@openpli.org>
Fri, 6 Feb 2015 10:13:03 +0000 (11:13 +0100)
committerErik Slagter <erik@openpli.org>
Fri, 6 Feb 2015 10:13:03 +0000 (11:13 +0100)
or gstreamer 1.

Based upon patch from christophecvr <stefansat@telenet.be>

configure.ac

index 4c3f834..45cd734 100644 (file)
@@ -2,6 +2,11 @@ AC_INIT([enigma2],[4],[forum@openpli.org])
 AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
 AC_CONFIG_HEADERS([enigma2_config.h])
 
+#dnl versions of gstreamer and plugins-base
+AC_ARG_WITH(gstversion,
+       AS_HELP_STRING([--with-gstversion],[use gstreamer version (major.minor)]),
+       [GST_MAJORMINOR=$withval],[GST_MAJORMINOR=0.10])
+
 # Silent rules are available since 1.11, but older versions
 # are still in use. So don't use them unconditionally.
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -26,6 +31,13 @@ AX_PTHREAD
 
 TUXBOX_APPS_DVB
 
+if test "x$GST_MAJORMINOR" != "x1"
+then
+       PKG_CHECK_MODULES(GSTREAMER, gstreamer-0.10 gstreamer-pbutils-0.10)
+else
+       PKG_CHECK_MODULES(GSTREAMER, gstreamer-1.0 gstreamer-pbutils-1.0)
+fi
+
 AM_CONDITIONAL(HAVE_GIT_DIR, test -d "$srcdir/.git")
 AM_CONDITIONAL(HAVE_FAKE_GIT_DIR, test -f "$srcdir/.git/last_commit_info")