changeset 579:b716527bb0c9

* Update config per recent changes to svcore
author Chris Cannam
date Tue, 08 Mar 2011 11:28:53 +0000
parents e2211947cbfd
children 89f70e0bfa4b
files acinclude.m4 configure.ac
diffstat 2 files changed, 21 insertions(+), 2 deletions(-) [+]
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
--- a/configure.ac	Mon Feb 07 21:07:47 2011 +0000
+++ b/configure.ac	Tue Mar 08 11:28:53 2011 +0000
@@ -11,6 +11,13 @@
 # piddling about.
 USER_CXXFLAGS="$CXXFLAGS"
 
+# If the user supplied CFLAGS but not CXXFLAGS, use CFLAGS instead
+if test x"$USER_CXXFLAGS" = x; then
+   if test x"$CFLAGS" != x; then
+      USER_CXXFLAGS="$CFLAGS"
+   fi
+fi
+
 AC_LANG_CPLUSPLUS
 
 AC_PROG_CC