diff options
Diffstat (limited to 'mk/buildlink3')
-rw-r--r-- | mk/buildlink3/scan-libtool | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mk/buildlink3/scan-libtool b/mk/buildlink3/scan-libtool index 1623d7b66c9..17dd5c8c3d3 100644 --- a/mk/buildlink3/scan-libtool +++ b/mk/buildlink3/scan-libtool @@ -1,4 +1,4 @@ -# $NetBSD: scan-libtool,v 1.4 2006/12/15 13:15:06 martti Exp $ +# $NetBSD: scan-libtool,v 1.5 2010/01/20 14:29:46 joerg Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,7 +35,7 @@ # POSSIBILITY OF SUCH DAMAGE. # Discover the libtool mode by scanning the argument list. -lt_mode=link +lt_mode= prevopt= nonopt= lafile= @@ -69,14 +69,14 @@ for arg do lt_mode="$optarg" ;; -*) - if $test -n "$nonopt" -a "$lt_mode" != "install"; then + if $test -n "$nonopt" -a -z "$lt_mode"; then case $arg in -c) lt_mode=compile ;; esac fi ;; *) - if $test -z "$nonopt"; then + if $test -z "$nonopt" -a -z "$lt_mode"; then nonopt="$arg" case $nonopt in *cc|*++|gcc*|*-gcc*|xlc*|*CC) @@ -99,6 +99,10 @@ for arg do esac done +if $test -z "$lt_mode"; then + lt_mode=link +fi + $debug_log $wrapperlog " (scan-libtool) mode: $lt_mode" case $lt_mode in ###################################################################### |