2005-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ * tests/quote.test: Match link quoting against `"$wl"', not `-Wl,'.
+
* tests/quote.test: Check for `--no-reexec' in $1 to avoid one reexec.
* m4/libtool.m4 (_LT_COMPILER_C_O): _LT_TAGDECL(lt_compiler_c_o),
esac
func_get_config "ECHO" "../libtool --config"
+func_get_config "wl" "../libtool --config"
for mode in compile link install; do
$ECHO "== $mode mode"
compile)
preargs="$CC -c"
preflag=
+ match_preflag=
flag="-DVAR="
postargs="foo.c"
;;
link)
preargs="$CC -o hell -g -O"
preflag=-Wl,
+ match_preflag="$wl"
flag="-someflag="
postargs="foo.o"
;;
install)
preargs="install -c"
preflag=
+ match_preflag=
flag="--something="
postargs="hell /usr/local/bin/hell"
;;
# We must not attempt to match $preargs in the output, because libtool
# may modify them. For example, on Cygwin, ``libtool --mode=link gcc -o
# foo foo.o'' becomes ``gcc -o foo.exe foo.o''.
- match="${preflag}${flag}test "
+ match="${match_preflag}${flag}test "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"
for mchar in \\ \" \` \$; do
$ECHO "= trying: \\$mchar quoting"
result=`$LIBTOOL -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE
- match="${preflag}${flag}\\${mchar}test\\${mchar} "
+ match="${match_preflag}${flag}\\${mchar}test\\${mchar} "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"
$ECHO "= trying: \"$mchar\" quoting"
result=`$LIBTOOL -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE
- match="${preflag}\"${flag}${mchar}test${mchar}\" "
+ match="${match_preflag}\"${flag}${mchar}test${mchar}\" "
case "$result" in
*"$match"*)
$ECHO "= passed: $result"