summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatadru Pramanik <satadru@gmail.com>2022-01-05 12:43:25 -0500
committerDaniel Stenberg <daniel@haxx.se>2022-01-05 22:41:37 +0100
commite39421cef31f13a19b6bef5c644978e0c54e4e16 (patch)
tree15af712d622b3b99cda28ba44776f3b9c9858099
parent801bd5138ce31aa0d906fa4e2eabfc599d74e793 (diff)
downloadcurl-e39421cef31f13a19b6bef5c644978e0c54e4e16.tar.gz
curl-functions.m4: fix LIBRARY_PATH adjustment to avoid eval
$$ usage in a m4 file introduces the PID in linux. Instead, just duplicate previous working code with a case switch. Fixes #8229 Closes #8230
-rw-r--r--m4/curl-functions.m423
1 files changed, 14 insertions, 9 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index 1a5954871..157cdd905 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -6515,16 +6515,21 @@ dnl changes contained within this macro.
AC_DEFUN([CURL_RUN_IFELSE], [
case $host_os in
- darwin*) library_path_var=DYLD_LIBRARY_PATH ;;
- *) library_path_var=LD_LIBRARY_PATH ;;
+ darwin*)
+ old=$DYLD_LIBRARY_PATH
+ DYLD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+ export DYLD_LIBRARY_PATH
+ AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
+ DYLD_LIBRARY_PATH=$old # restore
+ ;;
+ *)
+ old=$LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=$CURL_LIBRARY_PATH:$old
+ export LD_LIBRARY_PATH
+ AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
+ LD_LIBRARY_PATH=$old # restore
+ ;;
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)
- eval "$library_path_var=\$old" # restore
])
dnl CURL_COVERAGE