diff acinclude.m4 @ 579:b716527bb0c9

* Update config per recent changes to svcore
author Chris Cannam
date Tue, 08 Mar 2011 11:28:53 +0000
parents ce7b8b790020
children e4793ca93ca0
line wrap: on
line diff
--- a/acinclude.m4	Mon Feb 07 21:07:47 2011 +0000
+++ b/acinclude.m4	Tue Mar 08 11:28:53 2011 +0000
@@ -8,10 +8,16 @@
 SV_MODULE_FUNC=$5
 SV_MODULE_HAVE=HAVE_$(echo $1 | tr '[a-z]' '[A-Z]')
 SV_MODULE_FAILED=1
+if test -n "$$1_LIBS" ; then
+   AC_MSG_NOTICE([User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE])
+   CXXFLAGS="$CXXFLAGS $$1_CFLAGS"
+   LIBS="$LIBS $$1_LIBS"
+   SV_MODULE_FAILED=""
+fi
 if test -z "$SV_MODULE_VERSION_TEST" ; then
    SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
 fi
-if test -n "$PKG_CONFIG"; then
+if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then
    PKG_CHECK_MODULES($1,[$SV_MODULE_VERSION_TEST],[HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $$1_CFLAGS";LIBS="$LIBS $$1_LIBS";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find required module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means])])
 fi
 if test -n "$SV_MODULE_FAILED"; then
@@ -31,10 +37,16 @@
 SV_MODULE_FUNC=$5
 SV_MODULE_HAVE=HAVE_$(echo $1 | tr '[a-z]' '[A-Z]')
 SV_MODULE_FAILED=1
+if test -n "$$1_LIBS" ; then
+   AC_MSG_NOTICE([User set ${SV_MODULE_MODULE}_LIBS explicitly, skipping test for $SV_MODULE_MODULE])
+   CXXFLAGS="$CXXFLAGS $$1_CFLAGS"
+   LIBS="$LIBS $$1_LIBS"
+   SV_MODULE_FAILED=""
+fi
 if test -z "$SV_MODULE_VERSION_TEST" ; then
    SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
 fi
-if test -n "$PKG_CONFIG"; then
+if test -n "$SV_MODULE_FAILED" && test -n "$PKG_CONFIG"; then
    PKG_CHECK_MODULES($1,[$SV_MODULE_VERSION_TEST],[HAVES="$HAVES $SV_MODULE_HAVE";CXXFLAGS="$CXXFLAGS $$1_CFLAGS";LIBS="$LIBS $$1_LIBS";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means])])
 fi
 if test -n "$SV_MODULE_FAILED"; then