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.
This commit is contained in:
parent
9289c6c5e0
commit
c45559e124
1 changed files with 4 additions and 4 deletions
8
configure
vendored
8
configure
vendored
|
@ -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 <<EOF
|
||||
# Automatically generated by configure - do not modify
|
||||
|
@ -726,13 +726,13 @@ fn_makelink()
|
|||
;;
|
||||
esac
|
||||
|
||||
ln -sfn $tgt $2 || ( echo "ln failed. Using cp instead."; cp -f $1/$2 $2 )
|
||||
ln -sfn "$tgt" $2 || ( echo "ln failed. Using cp instead."; cp -f "$1/$2" $2 )
|
||||
}
|
||||
|
||||
if test "$source_path_used" = "yes" ; then
|
||||
FILES="Makefile lib/Makefile tests/Makefile tests/tests2/Makefile tests/pp/Makefile"
|
||||
for f in $FILES ; do
|
||||
fn_makelink $source_path $f
|
||||
fn_makelink "$source_path" $f
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue