# HG changeset patch # User Chris Cannam # Date 1299583733 0 # Node ID b716527bb0c994bc6d030c1d034e6949eb87edb5 # Parent e2211947cbfd5e4d7c1061c95d3509585df91d6f * Update config per recent changes to svcore diff -r e2211947cbfd -r b716527bb0c9 acinclude.m4 --- 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 diff -r e2211947cbfd -r b716527bb0c9 configure.ac --- 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