aboutsummaryrefslogtreecommitdiffstats
path: root/libtool
diff options
context:
space:
mode:
authorreinelt <>2004-01-07 10:15:41 +0000
committerreinelt <>2004-01-07 10:15:41 +0000
commit895982032e2b237e9810dd11b7c70a66e1a9c34c (patch)
tree45b71714f019bc4e375501faa00ced22625ddf83 /libtool
parenta52cd7cec845dcb9e7a069b6ff4a2a0e88679ea7 (diff)
downloadlcd4linux-895982032e2b237e9810dd11b7c70a66e1a9c34c.tar.gz
[lcd4linux @ 2004-01-07 10:15:41 by reinelt]
small glitch in evaluator fixed made config table sorted and access with bsearch(), which should be much faster
Diffstat (limited to 'libtool')
-rwxr-xr-xlibtool150
1 files changed, 94 insertions, 56 deletions
diff --git a/libtool b/libtool
index 040c6ce..53475fc 100755
--- a/libtool
+++ b/libtool
@@ -319,7 +319,8 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/local/lib"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
@@ -399,7 +400,7 @@ modename="$progname"
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.5.0a
-TIMESTAMP=" (1.1220.2.25 2003/08/01 19:08:35) Debian$Rev: 49 $"
+TIMESTAMP=" (1.1220.2.35 2003/11/12 18:51:58) Debian$Rev: 159 $"
default_mode=
help="Try \`$progname --help' for more information."
@@ -520,6 +521,7 @@ do
;;
tag)
tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
# Check whether tagname contains only valid characters
case $tagname in
@@ -582,6 +584,7 @@ do
--debug)
$echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -612,6 +615,7 @@ do
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
;;
--tag) prevopt="--tag" prev=tag ;;
@@ -619,6 +623,7 @@ do
set tag "$optarg" ${1+"$@"}
shift
prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -713,9 +718,11 @@ if test -z "$show_help"; then
# Get the compilation command and the source file.
base_compile=
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
arg_mode=normal
libobj=
+ later=
for arg
do
@@ -744,18 +751,13 @@ if test -z "$show_help"; then
continue
;;
- -static)
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
continue
;;
- -prefer-non-pic)
- pic_mode=no
+ -no-suppress)
+ suppress_opt=no
continue
;;
@@ -900,6 +902,25 @@ if test -z "$show_help"; then
esac
fi
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
if test "X$xdir" = "X$obj"; then
@@ -1066,7 +1087,9 @@ pic_object='$objdir/$objname'
EOF
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
else
# No PIC object so indicate it doesn't exist in the libtool
# object file.
@@ -1224,6 +1247,47 @@ EOF
vinfo=
vinfo_number=no
+ # Infer tagged configuration to use if any are available and
+ # if one wasn't chosen via the "--tag" command line option.
+ # Only attempt this if the compiler in the base link
+ # command doesn't match the default compiler.
+ if test -n "$available_tags" && test -z "$tagname"; then
+ case "$base_compile " in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
+ case "$base_compile " in
+ "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
+ # The compiler in $compile_command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit 1
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+
# We need to know -static, to get the right output filenames.
for arg
do
@@ -1631,6 +1695,11 @@ EOF
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
@@ -1963,47 +2032,6 @@ EOF
exit 1
fi
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base link
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
- # The compiler in $compile_command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- $echo "$modename: unable to infer tagged configuration"
- $echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# $echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
compile_command="$compile_command $arg"
@@ -2146,6 +2174,15 @@ EOF
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
if test "$linkmode" != lib && test "$linkmode" != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
@@ -5403,7 +5440,7 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command="(cd `pwd`; $SHELL $0 $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
if test "$hardcode_automatic" = yes ; then
relink_command=
@@ -6028,7 +6065,7 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $0 $preserve_args --finish$current_libdirs'
else
exit 0
fi
@@ -6937,7 +6974,8 @@ link_all_deplibs=unknown
sys_lib_search_path_spec=" /usr/lib/gcc-lib/i486-linux/3.3.2/ /usr/lib/gcc/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../../i486-linux/lib/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../i486-linux/3.3.2/ /usr/lib/gcc-lib/i486-linux/3.3.2/../../../ /lib/i486-linux/3.3.2/ /lib/ /usr/lib/i486-linux/3.3.2/ /usr/lib/"
# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib
+/usr/local/lib"
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""