From 16b5d0c68b0f1dc04ad128edb6b8c118e721fc22 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 29 Nov 2023 16:11:42 -0800
Subject: [PATCH] Look for DLLs in the environment bin path as well as the lib
path
---
configure | 3 ++-
configure.ac | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 49749996..ab4ad462 100755
--- a/configure
+++ b/configure
@@ -16612,12 +16612,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_bin_path=`echo $env_lib_path | sed 's,/lib,/bin,'`
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="$ac_default_prefix/$base_libdir $ac_default_prefix/$base_bindir /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_bin_path $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
lib=`ls -- $path/$1 2>/dev/null | sed 's,.*/,,' | $SORT -V -r | $AWK 'BEGIN{FS="."}{ print NF, $0 }' | $SORT -n -s | sed 's,[0-9]* ,,' | head -1`
if test x$lib != x; then
echo $lib
diff --git a/configure.ac b/configure.ac
index 77662911..6e82a26a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,12 +266,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_bin_path=`echo $env_lib_path | sed 's,/lib,/bin,'`
if test "$cross_compiling" = yes; then
host_lib_path=""
else
host_lib_path="$ac_default_prefix/$base_libdir $ac_default_prefix/$base_bindir /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_bin_path $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
lib=[`ls -- $path/$1 2>/dev/null | sed 's,.*/,,' | $SORT -V -r | $AWK 'BEGIN{FS="."}{ print NF, $0 }' | $SORT -n -s | sed 's,[0-9]* ,,' | head -1`]
if test x$lib != x; then
echo $lib