Accept anything from pkg-config --libs except -Wl,--export-dynamic. Patch from Patrick Welche <pw-fb@newn.cam.ac.uk>. r=cls sr=dbaron b=298455

This commit is contained in:
dbaron%dbaron.org 2005-09-11 19:51:51 +00:00
parent fa885dfb79
commit e55dd20286

View File

@ -1,9 +1,8 @@
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN(PKG_CHECK_MODULES, [
succeeded=no
# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
# defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
# also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES],
[succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
@ -28,9 +27,8 @@ AC_DEFUN(PKG_CHECK_MODULES, [
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
## don't use --libs since that can do evil things like add
## -Wl,--export-dynamic
$1_LIBS="`$PKG_CONFIG --libs-only-L \"$2\"` `$PKG_CONFIG --libs-only-l \"$2\"`"
## Remove evil flags like -Wl,--export-dynamic
$1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`"
AC_MSG_RESULT($$1_LIBS)
else
$1_CFLAGS=""