]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/link-order.test: Take hardcode_direct into consideration
authorAlbert Chin-A-Young <china@thewrittenword.com>
Wed, 17 May 2006 17:07:16 +0000 (17:07 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 17 May 2006 17:07:16 +0000 (17:07 +0000)
when testing link order.

ChangeLog
tests/link-order.test

index cafbca11b979d9a66ad4b94dc70cc1d2b1486d45..f851d923a2fc17ebdf5b80c0123b11e5f1debb3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-17  Albert Chin-A-Young  <china@thewrittenword.com>
+
+       * tests/link-order.test: Take hardcode_direct into consideration
+       when testing link order.
+
 2006-05-15  Bruno Haible  <bruno@clisp.org>,
            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
index 9d9d8e99ed8f52ce8cd34e3b8c84d880b4cc670c..3250d97773c48ad61d021da67552aba9696ee8ea 100755 (executable)
@@ -12,6 +12,10 @@ fi
 
 retcode=0
 
+eval `$libtool --config | $EGREP '^(hardcode_direct|shrext_cmds)='`
+module=no
+eval shared_ext=\"$shrext_cmds\"
+
 rm -rf linkorder.dir
 mkdir linkorder.dir
 top_dir=`pwd`/linkorder.dir
@@ -62,12 +66,24 @@ case $host in
 *-*-aix* | *-*-interix*) ;; # These systems have different path syntax
 *)
   # Do not error if we do not relink (e.g. static-only systems)
-  if $EGREP relinking $srcdir/stderr; then
-    if $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' $srcdir/stdout; then :; else
-      echo "$0: wrong link order" 1>&2
-      retcode=1
+  case $hardcode_direct in
+  yes)
+    if $EGREP relinking $srcdir/stderr; then
+      if $EGREP " .*\/new\/lib/libb$shared_ext .*\/old\/lib/libcee$shared_ext" $srcdir/stdout; then :; else
+        echo "$0: wrong link order" 1>&2
+        retcode=1
+      fi
     fi
-  fi
+    ;;
+  *)
+    if $EGREP relinking $srcdir/stderr; then
+      if $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' $srcdir/stdout; then :; else
+        echo "$0: wrong link order" 1>&2
+        retcode=1
+      fi
+    fi
+    ;;
+  esac
   ;;
 esac