0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch 2.1 KB

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