diff options
author | NIIBE Yutaka <[email protected]> | 2019-01-08 01:21:44 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2019-01-10 01:30:37 +0000 |
commit | 1fd997231b717853822dff9d3e981d95765f323d (patch) | |
tree | ae5086254d980fabe7d478830f74e26e661de102 /configure.ac | |
parent | build: Build with LD_LIBRARY_PATH, use of DT_RPATH (1/2). (diff) | |
download | libgpg-error-1fd997231b717853822dff9d3e981d95765f323d.tar.gz libgpg-error-1fd997231b717853822dff9d3e981d95765f323d.zip |
build: Build with LD_LIBRARY_PATH, use of DT_RPATH (2/2).
* configure.ac (LDADD_FOR_TESTS_KLUDGE): New for --disable-new-dtags.
* tests/Makefile.am (LDADD): Use LDADD_FOR_TESTS_KLUDGE.
(t_lock_LDADD, t_poll_LDADD): Use LDADD.
--
GnuPG-bug-id: 4298
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 8f1598e..400f99e 100644 --- a/configure.ac +++ b/configure.ac @@ -82,7 +82,7 @@ AC_PROG_AWK AC_CHECK_TOOL(AR, ar, :) AC_GNU_SOURCE -# Taken from mpfr-4.0.1 +# Taken from mpfr-4.0.1, then modified for LDADD_FOR_TESTS_KLUDGE dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has dnl the precedence over the run path, so that if a compatible MPFR library @@ -101,18 +101,21 @@ case $host in *-*-linux*) if test -n "$LD_LIBRARY_PATH"; then saved_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--disable-new-dtags" + LDADD_FOR_TESTS_KLUDGE="-Wl,--disable-new-dtags" + LDFLAGS="$LDFLAGS $LDADD_FOR_TESTS_KLUDGE" AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker) AC_LINK_IFELSE([AC_LANG_SOURCE([[ int main (void) { return 0; } ]])], [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))], [AC_MSG_RESULT(no) - LDFLAGS="$saved_LDFLAGS" + LDADD_FOR_TESTS_KLUDGE="" ]) + LDFLAGS="$saved_LDFLAGS" fi ;; esac +AC_SUBST([LDADD_FOR_TESTS_KLUDGE]) # Set some variables depending on the platform for later use. have_w32_system=no |