diff options
author | Bernhard Walle <bernhard.walle@ncp-e.com> | 2021-11-17 11:40:41 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-11-18 11:27:48 +0100 |
commit | ba0657c343f0c3eff28f7d56cff3196c6443e0b9 (patch) | |
tree | 2fc0e5bb3c1e455ffdcb21cf3c59779e193425a2 | |
parent | f99a4c759f521614b07c58468503cda81751470d (diff) | |
download | curl-ba0657c343f0c3eff28f7d56cff3196c6443e0b9.tar.gz |
configure: fix runtime-lib detection on macOS
With a non-standard installation of openssl we get this error:
checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz
There's already code to set LD_LIBRARY_PATH on Linux, so set
DYLD_LIBRARY_PATH equivalent on macOS.
Closes #8028
-rw-r--r-- | m4/curl-functions.m4 | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index 575454d44..1a5954871 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -6514,11 +6514,17 @@ dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH dnl changes contained within this macro. AC_DEFUN([CURL_RUN_IFELSE], [ - old=$LD_LIBRARY_PATH - LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old - export LD_LIBRARY_PATH + case $host_os in + darwin*) library_path_var=DYLD_LIBRARY_PATH ;; + *) library_path_var=LD_LIBRARY_PATH ;; + esac + + eval "old=$$library_path_var" + eval "$library_path_var=\$CURL_LIBRARY_PATH:\$old" + + eval "export $library_path_var" AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4) - LD_LIBRARY_PATH=$old # restore + eval "$library_path_var=\$old" # restore ]) dnl CURL_COVERAGE |