build: run configure under bash (autoconf 2.73 backtick quoting breaks dash)
Run #472 (post -W no-error fix) got past autoreconf but failed in ./configure: ./configure: line 11244: syntax error near unexpected token `as_ac_var=`printf '%s\n' "ac_cv_func_$ac_func" | sed "$as_sed_sh"`` autoconf 2.73's generated configure uses backtick command substitution inside variable assignments with nested quoting. dash/MSYS2's /bin/sh parses this as a syntax error because the inner backticks don't nest cleanly inside the outer backtick expression. Force CONFIG_SHELL=bash and invoke configure via "$CONFIG_SHELL" so the generated script is parsed by bash regardless of platform (MSYS2 MINGW64 defaults to dash for /bin/sh, which is what bit us).
This commit is contained in:
@@ -17,7 +17,12 @@ if [[ ! -x "./configure" ]] || [[ "${AUTORECONF_FORCE:-0}" == "1" ]]; then
|
||||
fi
|
||||
|
||||
echo "Configuring Tor static library build from: $TOR_SRC_DIR"
|
||||
./configure \
|
||||
# autoconf 2.73's generated ./configure uses backtick command substitution
|
||||
# inside variable assignments (e.g. `as_ac_var=\`printf ... | sed ...\``)
|
||||
# which dash/MSYS2's /bin/sh rejects with a syntax error. Force bash
|
||||
# explicitly so the same script works on Windows MSYS2 and macOS/Linux.
|
||||
export CONFIG_SHELL="${CONFIG_SHELL:-$(command -v bash)}"
|
||||
"$CONFIG_SHELL" ./configure \
|
||||
--enable-static-tor \
|
||||
--disable-module-relay \
|
||||
--disable-module-dirauth \
|
||||
|
||||
Reference in New Issue
Block a user