diff acinclude.m4 @ 649:ba986753c3dd

* Set LIBS properly when optional pkg-config package found
author Chris Cannam
date Wed, 22 Sep 2010 12:28:37 +0100
parents e03a7d1e90b9
children 5ada98fb61cf
line wrap: on
line diff
--- a/acinclude.m4	Wed Sep 22 11:24:20 2010 +0100
+++ b/acinclude.m4	Wed Sep 22 12:28:37 2010 +0100
@@ -35,7 +35,7 @@
    SV_MODULE_VERSION_TEST=$SV_MODULE_MODULE
 fi
 if test -n "$PKG_CONFIG"; then
-   PKG_CHECK_MODULES($1,[$SV_MODULE_VERSION_TEST],[HAVES="$HAVES $SV_MODULE_HAVE";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find optional module $SV_MODULE_MODULE using pkg-config, trying again by old-fashioned means])])
+   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
    AC_CHECK_HEADER([$SV_MODULE_HEADER],[HAVES="$HAVES $SV_MODULE_HAVE";SV_MODULE_FAILED=""],[AC_MSG_NOTICE([Failed to find header $SV_MODULE_HEADER for optional module $SV_MODULE_MODULE])])