From: Charles Wilson Date: Mon, 11 Oct 2004 15:13:55 +0000 (+0000) Subject: * tests/link.test: Fix check for use of libnlsut.a under X-Git-Tag: release-1-9f~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97775fc5a41796f3f351396f43a3ab1f3b78db1a;p=thirdparty%2Flibtool.git * tests/link.test: Fix check for use of libnlsut.a under Cygwin. * tests/quote.test: Do not look for $preargs in the output, because libtool may change them. --- diff --git a/ChangeLog b/ChangeLog index 1458a4365..a8048ba59 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-10-11 Charles Wilson + + * tests/link.test: Fix check for use of libnlsut.a under + Cygwin. + +2004-10-11 Noah Misch + + * tests/quote.test: Do not look for $preargs in the output, + because libtool may change them. + 2004-10-10 Charles Wilson * config/ltmain.m4sh: Really don't require versions of GNU diff --git a/tests/link.test b/tests/link.test index bb9325210..e943ecf30 100755 --- a/tests/link.test +++ b/tests/link.test @@ -28,10 +28,8 @@ linkresult=`$LIBTOOL -n --mode=link $CC -o gettext ../lib/libnlsut.a` test $? -eq 0 || exit $EXIT_FAILURE echo "$linkresult" -case "$linkresult" in -*../lib/libnlsut.a) ;; -*) +echo "$linkresult" | ${EGREP} "../lib/libnlsut.a" >/dev/null 2>&1 || { func_fail "$progname: ../lib/libnlsut.a was not used as expected in linking" - ;; -esac +} + exit $EXIT_SUCCESS diff --git a/tests/quote.test b/tests/quote.test index 9745a5150..eb5d6b5f3 100755 --- a/tests/quote.test +++ b/tests/quote.test @@ -65,7 +65,10 @@ for mode in compile link install; do # 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 " + # 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 " case "$result" in *"$match"*) $ECHO "= passed: $result" @@ -80,7 +83,7 @@ for mode in compile link install; do for mchar in \\ \" \` \$; do $ECHO "= trying: \\$mchar quoting" result=`$LIBTOOL -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE - match="$preargs ${preflag}${flag}\\${mchar}test\\${mchar} " + match="${preflag}${flag}\\${mchar}test\\${mchar} " case "$result" in *"$match"*) $ECHO "= passed: $result" @@ -98,7 +101,7 @@ for mode in compile link install; do $ECHO "= trying: \"$mchar\" quoting" result=`$LIBTOOL -n --mode=$mode $preargs ${preflag}"${flag}${mchar}test${mchar}" $postargs` || status=$EXIT_FAILURE - match="$preargs ${preflag}\"${flag}${mchar}test${mchar}\" " + match="${preflag}\"${flag}${mchar}test${mchar}\" " case "$result" in *"$match"*) $ECHO "= passed: $result"