+2006-06-11 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * m4/gst-check.m4:
+ add GST_PKG_CHECK_MODULES, which in the normal case of checking
+ for a dependency lib for a plug-in only needs two arguments
+ to do the right thing.
+ * m4/gst-feature.m4:
+ clean up output a little of feature checking; also deal with
+ non-plug-in feature checks
+ * m4/Makefile.am:
+ * m4/gst-gstreamer.m4:
+ remove this file; it's a useless check
+
2006-06-06 Thomas Vander Stichele <thomas at apestaart dot org>
* m4/gst-arch.m4:
-dnl pkg-config-based checks for GStreamer modules
+dnl pkg-config-based checks for GStreamer modules and dependency modules
dnl generic:
+dnl GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED])
+dnl sets HAVE_[$PREFIX], [$PREFIX]_*
dnl GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED])
dnl sets HAVE_[$PREFIX], [$PREFIX]_*
dnl GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED])
dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR
+AC_DEFUN([GST_PKG_CHECK_MODULES],
+[
+ which="[$2]"
+ dnl not required by default, since we use this mostly for plugin deps
+ required=ifelse([$3], , "no", [$3])
+
+ PKG_CHECK_MODULES([$1], $which,
+ [
+ HAVE_[$1]="yes"
+ ],
+ [
+ HAVE_[$1]="no"
+ AC_MSG_RESULT(no)
+ if test "x$required" = "xyes"; then
+ AC_MSG_ERROR($[$1]_PKG_ERRORS)
+ else
+ AC_MSG_NOTICE($[$1]_PKG_ERRORS)
+ fi
+ ])
+
+ dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
+ dnl It gets done automatically in automake >= 1.7, which we now require
+]))
+
AC_DEFUN([GST_CHECK_MODULES],
[
module=[$2]
PKG_CHECK_MODULES([$1], $module >= $minver,
[
HAVE_[$1]="yes"
- ], HAVE_[$1]="no")
+ ],
+ [
+ HAVE_[$1]="no"
+ AC_MSG_RESULT(no)
+ AC_MSG_NOTICE($[$1]_PKG_ERRORS)
+ if test "x$required" = "xyes"; then
+ AC_MSG_ERROR([no $module >= $minver ($name) found])
+ else
+ AC_MSG_NOTICE([no $module >= $minver ($name) found])
+ fi
+ ])
- if test "x$HAVE_[$1]" = "xno"; then
- if test "x$required" = "xyes"; then
- AC_MSG_ERROR([no $module >= $minver ($name) found])
- else
- AC_MSG_NOTICE([no $module >= $minver ($name) found])
- fi
- fi
- dnl AC_SUBST seems to be done automatically in automake >= 1.7
- dnl AC_SUBST($1_CFLAGS)
- dnl AC_SUBST($1_LIBS)
+ dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
+ dnl It gets done automatically in automake >= 1.7, which we now require
]))
AC_DEFUN([GST_CHECK_GST],
dnl purely upper case characters.
dnl FEATURE-DESCRIPTION is used to describe the feature in help text for
dnl the command line argument.
-dnl DEPENDENT-PLUGINS lists any plugins which depend on this feature.
+dnl DEPENDENT-PLUGINS lists any plug-ins which depend on this feature.
dnl TEST-FOR-FEATURE is a test which sets HAVE_<FEATURE-NAME> to "yes"
dnl or "no" depending on whether the feature is
dnl available.
dnl GST_PLUGINS_NO will contain those that won't be built
AC_DEFUN([GST_CHECK_FEATURE],
-AC_MSG_NOTICE(***)
-AC_MSG_NOTICE(*** checking plugin: [$3] ***)
-AC_MSG_NOTICE(***)
+echo
+AC_MSG_NOTICE(*** checking feature: [$2] ***)
+if test "x[$3]" != "x"
+then
+ AC_MSG_NOTICE(*** for plug-ins: [$3] ***)
+fi
[dnl
builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl
dnl if it is set to NO, then don't even consider it for building
+++ /dev/null
-dnl check for gstreamer
-dnl check for installed gstreamer first
-dnl if necessary, check for uninstalled gstreamer
-dnl AC_SUBST GST_CFLAGS and GST_LIBS
-AC_DEFUN([GST_GSTREAMER],[
- PKG_CHECK_MODULES(GST, gstreamer, HAVE_GST=yes, HAVE_GST=no)
- if test "x$HAVE_GST" = "xno";
- then
- PKG_CHECK_MODULES(GST, gstreamer-uninstalled, HAVE_GST=yes, exit)
- fi
- AC_SUBST(GST_CFLAGS)
- AC_SUBST(GST_LIBS)
-])
-