We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4773 - include LD_LIBRARY_PATH paths in configury find_lib() ?
Summary: include LD_LIBRARY_PATH paths in configury find_lib() ?
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.0
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-26 17:40 UTC by Ozkan Sezer
Modified: 2019-08-26 17:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ozkan Sezer 2019-08-26 17:40:42 UTC
LIBS and LDFLAGS are usually used by autofoo, so in order not to
mess with it can we also check LD_LIBRARY_PATH paths in find_lib()?
E.g. like the following?

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -145,12 +145,13 @@ find_lib()
     gcc_bin_path=[`$CC -print-search-dirs 2>/dev/null | fgrep programs: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
     gcc_lib_path=[`$CC -print-search-dirs 2>/dev/null | fgrep libraries: | sed 's/[^=]*=\(.*\)/\1/' | sed 's/:/ /g'`]
     env_lib_path=[`echo $LIBS $LDFLAGS $* | sed 's/-L[ ]*//g'`]
+    env_lib_path2=[`echo $LD_LIBRARY_PATH | sed 's/:/ /g'`]
     if test "$cross_compiling" = yes; then
         host_lib_path=""
     else
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     fi
-    for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
+    for path in $env_lib_path2 $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
         lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
         if test x$lib != x; then
             echo $lib