summaryrefslogtreecommitdiff
path: root/common/m4/gst-feature.m4
diff options
context:
space:
mode:
Diffstat (limited to 'common/m4/gst-feature.m4')
-rw-r--r--common/m4/gst-feature.m459
1 files changed, 30 insertions, 29 deletions
diff --git a/common/m4/gst-feature.m4 b/common/m4/gst-feature.m4
index bfb3a1c..c072c79 100644
--- a/common/m4/gst-feature.m4
+++ b/common/m4/gst-feature.m4
@@ -122,35 +122,6 @@ dnl *** Define the conditional as appropriate
AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes)
])
-dnl Use a -config program which accepts --cflags and --libs parameters
-dnl to set *_CFLAGS and *_LIBS and check existence of a feature.
-dnl Richard Boulton <richard-alsa@tartarus.org>
-dnl Last modification: 26/06/2001
-dnl AG_GST_CHECK_CONFIGPROG(FEATURE-NAME, CONFIG-PROG-FILENAME, MODULES)
-dnl
-dnl This check was written for GStreamer: it should be renamed and checked
-dnl for portability if you decide to use it elsewhere.
-dnl
-AC_DEFUN([AG_GST_CHECK_CONFIGPROG],
-[
- AC_PATH_PROG([$1]_CONFIG, [$2], no)
- if test x$[$1]_CONFIG = xno; then
- [$1]_LIBS=
- [$1]_CFLAGS=
- HAVE_[$1]=no
- else
- if [$2] --plugin-libs [$3] &> /dev/null; then
- [$1]_LIBS=`[$2] --plugin-libs [$3]`
- else
- [$1]_LIBS=`[$2] --libs [$3]`
- fi
- [$1]_CFLAGS=`[$2] --cflags [$3]`
- HAVE_[$1]=yes
- fi
- AC_SUBST([$1]_LIBS)
- AC_SUBST([$1]_CFLAGS)
-])
-
dnl Use AC_CHECK_LIB and AC_CHECK_HEADER to do both tests at once
dnl sets HAVE_module if we have it
dnl Richard Boulton <richard-alsa@tartarus.org>
@@ -247,7 +218,37 @@ AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLES],
AG_GST_PARSE_SUBSYSTEM_DISABLE($1,XML)
])
+dnl AG_GST_CHECK_GST_DEBUG_DISABLED(ACTION-IF-DISABLED, ACTION-IF-NOT-DISABLED)
+dnl
+dnl Checks if the GStreamer debugging system is disabled in the core version
+dnl we are compiling against (by checking gstconfig.h)
+dnl
+AC_DEFUN([AG_GST_CHECK_GST_DEBUG_DISABLED],
+[
+ AC_REQUIRE([AG_GST_CHECK_GST])
+
+ AC_MSG_CHECKING([whether the GStreamer debugging system is enabled])
+ AC_LANG_PUSH([C])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$GST_CFLAGS $CFLAGS"
+ AC_COMPILE_IFELSE([
+ #include <gst/gstconfig.h>
+ #ifdef GST_DISABLE_GST_DEBUG
+ #error "debugging disabled, make compiler fail"
+ #endif], [ debug_system_enabled=yes], [debug_system_enabled=no])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_POP([C])
+
+ AC_MSG_RESULT([$debug_system_enabled])
+ if test "x$debug_system_enabled" = "xyes" ; then
+ $2
+ true
+ else
+ $1
+ true
+ fi
+])
dnl relies on GST_PLUGINS_ALL, GST_PLUGINS_SELECTED, GST_PLUGINS_YES,
dnl GST_PLUGINS_NO, and BUILD_EXTERNAL