From c45559e124128c769e8d6079c8f4b83e77618977 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Wed, 4 Dec 2024 16:52:19 +0200 Subject: [PATCH] configure: handle spaces correctly in $source_path Add very few missing quotes where IFS/globs were applied to arbitrary user input (commands, arguments, but not assignments or case $var in. In fn_makelink $dn/$2/$f don't have IFS/globs). While configure now handles it correctly, there are 2 issues: - eval opt=\"$opt\" coalesces IFS chars (--prefix="$HOME/x y"). - Even with the eval removed, (gnu) make still fails to find it. I made few quick experiments with quoting these values in config.mak, but that had no impact, and make -d was not helpful. Was worth a try. So no spaces in paths, but at least configure can handle the src path. --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index f0a3044a..e0fe6efb 100755 --- a/configure +++ b/configure @@ -438,7 +438,7 @@ fi if test -z "$build_cross"; then CONFTEST=./conftest$EXESUF - if ! $cc -o $CONFTEST $source_path/conftest.c ; then + if ! $cc -o $CONFTEST "$source_path/conftest.c" ; then echo "configure: error: '$cc' failed to compile conftest.c." else cc_name="$($CONFTEST compiler)" @@ -553,7 +553,7 @@ fcho "Switches " "$tcc_switches" fcho "Config " "${confvars# }" echo "Creating config.mak and config.h" -version=`head $source_path/VERSION` +version=$(head "$source_path/VERSION") cat >config.mak <