diff acinclude.m4 @ 216:ee31e2f3a0f1

* Update config per recent changes to svcore
author Chris Cannam
date Tue, 08 Mar 2011 11:31:24 +0000
parents fcac1e59d4c1
children 9acff0b1792b
line wrap: on
line diff
--- a/acinclude.m4	Fri Feb 04 14:31:33 2011 +0000
+++ b/acinclude.m4	Tue Mar 08 11:31:24 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