common: m4: add AG_GST_CHECK_UNINSTALLED_SETUP macro

Tim Müller tpm at kemper.freedesktop.org
Fri Jan 20 07:22:48 PST 2012


Module: common
Branch: master
Commit: 7604bab58b5dfc9370d506952f0407fb75c00388
URL:    http://cgit.freedesktop.org/gstreamer/common/commit/?id=7604bab58b5dfc9370d506952f0407fb75c00388

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Fri Jan 20 15:19:44 2012 +0000

m4: add AG_GST_CHECK_UNINSTALLED_SETUP macro

---

 m4/gst-check.m4 |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/m4/gst-check.m4 b/m4/gst-check.m4
index 3fd3acf..f3f39b4 100644
--- a/m4/gst-check.m4
+++ b/m4/gst-check.m4
@@ -117,6 +117,38 @@ AC_DEFUN([AG_GST_CHECK_GST_CHECK],
 ])
 
 dnl ===========================================================================
+dnl AG_GST_CHECK_UNINSTALLED_SETUP([ACTION-IF-UNINSTALLED], [ACTION-IF-NOT])
+dnl
+dnl ACTION-IF-UNINSTALLED  (optional) extra actions to perform if the setup
+dnl                        is an uninstalled setup
+dnl ACTION-IF-NOT          (optional) extra actions to perform if the setup
+dnl                        is not an uninstalled setup
+dnl ===========================================================================
+AC_DEFUN([AG_GST_CHECK_UNINSTALLED_SETUP],
+[
+  AC_MSG_CHECKING([whether this is an uninstalled GStreamer setup])
+  AC_CACHE_VAL(gst_cv_is_uninstalled_setup,[
+    gst_cv_is_uninstalled_setup=no
+    if (set -u; : $GST_PLUGIN_SYSTEM_PATH) 2>/dev/null ; then
+      if test -z "$GST_PLUGIN_SYSTEM_PATH" \
+           -a -n "$GST_PLUGIN_SCANNER"     \
+           -a -n "$GST_PLUGIN_PATH"        \
+           -a -n "$GST_REGISTRY"           \
+           -a -n "$DYLD_LIBRARY_PATH"      \
+           -a -n "$LD_LIBRARY_PATH"; then
+        gst_cv_is_uninstalled_setup=yes;
+      fi
+    fi
+  ])
+  AC_MSG_RESULT($gst_cv_is_uninstalled_setup)
+  if test "x$gst_cv_is_uninstalled_setup" = "xyes"; then
+    ifelse([$1], , :, [$1])
+  else
+    ifelse([$2], , :, [$2])
+  fi
+])
+
+dnl ===========================================================================
 dnl AG_GST_CHECK_GST_PLUGINS_BASE([GST-MAJORMINOR], [MIN-VERSION], [REQUIRED])
 dnl
 dnl Sets GST_PLUGINS_BASE_CFLAGS and GST_PLUGINS_BASE_LIBS.



More information about the gstreamer-commits mailing list