]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/link.test: Fix check for use of libnlsut.a under
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Mon, 11 Oct 2004 15:13:55 +0000 (15:13 +0000)
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Mon, 11 Oct 2004 15:13:55 +0000 (15:13 +0000)
Cygwin.

* tests/quote.test: Do not look for $preargs in the output,
because libtool may change them.

ChangeLog
tests/link.test
tests/quote.test

index 1458a4365d2b1e861b00d393affa09894275fa6f..a8048ba59b7b8ef78f3072f4e4f77ca7e1001717 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2004-10-11  Charles Wilson  <spam.protected>
+
+       * tests/link.test: Fix check for use of libnlsut.a under
+       Cygwin.
+
+2004-10-11  Noah Misch  <noah@cs.caltech.edu>
+
+       * tests/quote.test: Do not look for $preargs in the output,
+       because libtool may change them.
+
 2004-10-10  Charles Wilson  <spam.protected>
 
        * config/ltmain.m4sh: Really don't require versions of GNU 
index bb9325210128db6b0c24fb1f1d3066ac885d25a1..e943ecf30802352e93d84f943e3b00d9e526fd3a 100755 (executable)
@@ -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
index 9745a5150550d0bd94a6ff9da9255e8e53e7a94b..eb5d6b5f3e03f98bac1cc19fe824432649b4daff 100755 (executable)
@@ -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"