+2005-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * tests/quote.test: Match link quoting against `"$wl"', not `-Wl,'.
+
2005-01-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS)
fi
fi
+# Extract $wl from the libtool configuration
+eval `$libtool --config | grep '^wl='`
+
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 used to have the contents of $match in the case statement,
# without an intermediate variable, but it would fail on at least
# Solaris' and HP-UX's /bin/sh. Ugh!
- match="$preargs ${preflag}${flag}test "
+ match="$preargs ${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=1
- match="$preargs ${preflag}${flag}\\${mchar}test\\${mchar} "
+ match="$preargs ${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=1
- match="$preargs ${preflag}\"${flag}${mchar}test${mchar}\" "
+ match="$preargs ${match_preflag}\"${flag}${mchar}test${mchar}\" "
case "$result" in
*"$match"*)
$echo "= passed: $result"