Index: tests/link-order.at =================================================================== RCS file: /cvsroot/libtool/libtool/tests/link-order.at,v retrieving revision 1.9 diff -u -3 -p -r1.9 link-order.at --- tests/link-order.at 5 Feb 2006 09:56:44 -0000 1.9 +++ tests/link-order.at 25 Apr 2006 19:51:16 -0000 @@ -20,6 +20,7 @@ AT_SETUP([Link order test.]) AT_KEYWORDS([libtool]) +eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|shrext_cmds)='` LDFLAGS="$LDFLAGS -no-undefined" prefix_old=`pwd`/old @@ -68,10 +69,18 @@ case $host_os in aix* | interix*) ;; # These systems have different path syntax *) # Do not error if we do not relink (e.g. static-only systems) - AT_CHECK([if $EGREP relinking stderr; then - $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' stdout - else :; fi], [0], [ignore], [], [echo "wrong link order"]) - ;; + case $hardcode_direct in + yes) + AT_CHECK([if $EGREP relinking stderr; then + $EGREP " .*\/new\/lib/libb$shrext_cmds .*\/old\/lib/libcee$shrext_cmds" stdout + else :; fi], [0], [ignore], [], [echo "wrong link order"]) + ;; + no) + AT_CHECK([if $EGREP relinking stderr; then + $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout + else :; fi], [0], [ignore], [], [echo "wrong link order"]) + ;; + esac esac for i in old new; do