1From 60d100713b5289948e9cdf5b0646ff3cdd2c206b Mon Sep 17 00:00:00 2001 2From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be> 3Date: Mon, 17 Dec 2012 22:32:44 +0100 4Subject: [PATCH] Fix setting of LD_LIBRARY_FLAGS ($shlibpath_var). 5 6LD_LIBRARY_PATH should not be set when cross-compiling, because it 7adds the cross-libraries to the build's LD-path. 8 9Also the restoring of LD_LIBRARY_PATH was done incorrectly: it would 10set LD_LIBRARY_PATH=LD_LIBRARY_PATH. 11 12Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> 13--- 14 macros/db3-check.m4 | 6 +++--- 15 1 file changed, 3 insertions(+), 3 deletions(-) 16 17diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 18index 902220b..d5a5446 100644 19--- a/macros/db3-check.m4 20+++ b/macros/db3-check.m4 21@@ -94,7 +94,7 @@ if test "x$bdb_required" = "xyes"; then 22 savedldflags="$LDFLAGS" 23 savedcppflags="$CPPFLAGS" 24 savedlibs="$LIBS" 25- saved_shlibpath_var=$shlibpath_var 26+ eval saved_shlibpath_var=\$$shlibpath_var 27 28 dnl required BDB version: 4.6, because of cursor API change 29 DB_MAJOR_REQ=4 30@@ -148,7 +148,7 @@ if test "x$bdb_required" = "xyes"; then 31 dnl -- LD_LIBRARY_PATH on many platforms. This will be fairly 32 dnl -- portable hopefully. Reference: 33 dnl -- http://lists.gnu.org/archive/html/autoconf/2009-03/msg00040.html 34- eval export $shlibpath_var=$bdblibdir 35+ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir 36 NETATALK_BDB_TRY_LINK 37 eval export $shlibpath_var=$saved_shlibpath_var 38 39@@ -171,7 +171,7 @@ if test "x$bdb_required" = "xyes"; then 40 CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS" 41 LDFLAGS="-L$bdblibdir $LDFLAGS" 42 43- eval export $shlibpath_var=$bdblibdir 44+ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir 45 NETATALK_BDB_TRY_LINK 46 eval export $shlibpath_var=$saved_shlibpath_var 47 48-- 49