diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-07-28 03:50:10 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-07-28 03:56:34 -0700 |
commit | d70f978b44aafc22d87c0e72d0875008c3d9e311 (patch) | |
tree | d53f7d66d27b619f747638e4088006abdc923197 /config | |
parent | 1a02d6b0ff80048df106cbb776a550278f8c9d9c (diff) | |
download | binutils-d70f978b44aafc22d87c0e72d0875008c3d9e311.zip binutils-d70f978b44aafc22d87c0e72d0875008c3d9e311.tar.gz binutils-d70f978b44aafc22d87c0e72d0875008c3d9e311.tar.bz2 |
PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works
It is quite normal to have headers without library on multilib OSes.
Add AC_TRY_LINK to PKG_CHECK_MODULES to check if $pkg_cv_[]$1[]_LIBS
works.
config/
PR binutils/26301
* pkg.m4 (PKG_CHECK_MODULES): Add AC_TRY_LINK to check if
$pkg_cv_[]$1[]_LIBS works.
binutils/
PR binutils/26301
* configure: Regenerated.
gdb/
PR binutils/26301
* configure: Regenerated.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 11 | ||||
-rw-r--r-- | config/pkg.m4 | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog index 12795fc..2cd6177 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,14 @@ +2020-07-28 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/26301 + * pkg.m4 (PKG_CHECK_MODULES): Add AC_TRY_LINK to check if + $pkg_cv_[]$1[]_LIBS works. + +2020-07-24 Aaron Merey <amerey@redhat.com> + + * debuginfod.m4: use PKG_CHECK_MODULES. + * pkg.m4: New file. + 2020-07-04 Nick Clifton <nickc@redhat.com> Binutils 2.35 branch created. diff --git a/config/pkg.m4 b/config/pkg.m4 index 13a8890..45587e9 100644 --- a/config/pkg.m4 +++ b/config/pkg.m4 @@ -147,6 +147,12 @@ AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +dnl Check whether $pkg_cv_[]$1[]_LIBS works. +pkg_save_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS $pkg_cv_[]$1[]_LIBS" +AC_TRY_LINK([],[return 0;], [pkg_failed=no], [pkg_failed=yes]) +LDFLAGS=$pkg_save_LDFLAGS + m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) |