From 5a023938fa5ed444074c78dc345c7c987e570a55 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alejandro=20R=2E=20Sede=C3=B1o?= Date: Tue, 30 May 2023 17:56:58 -0400 Subject: [PATCH] configure: fix run-compiler for old /bin/sh If you try to assign and export on the same line on some older /bin/sh implementations, it complains: ``` $ export "NAME=value" NAME=value: is not an identifier ``` This commit rewrites run-compiler's assignments and exports to work with old /bin/sh, splitting assignment and export into two separate statements, and only quote the value. So now we have: ``` NAME="value" export NAME ``` While we're here, make the same change to the two supporting assign+export lines preceeding the script to be consistent with how exports work throughout the rest of configure.ac. Closes #11228 --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index b358f9a1fa..02ad622f2c 100644 --- a/configure.ac +++ b/configure.ac @@ -193,11 +193,15 @@ dnl something different but only have that affect the execution of the results dnl of the compile, not change the libraries for the compiler itself. dnl compilersh="run-compiler" -export "CURL_SAVED_CC=$CC" -export "CURL_SAVED_LD_LIBRARY_PATH=$LD_LIBRARY_PATH" +CURL_SAVED_CC="$CC" +export CURL_SAVED_CC +CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" +export CURL_SAVED_LD_LIBRARY_PATH cat <<\EOF > "$compilersh" -export "CC=$CURL_SAVED_CC" -export "LD_LIBRARY_PATH=$CURL_SAVED_LD_LIBRARY_PATH" +CC="$CURL_SAVED_CC" +export CC +LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH" +export LD_LIBRARY_PATH exec $CC "$@" EOF -- 2.47.3