version 1.1, 2012/02/21 16:23:02
|
version 1.1.1.2, 2013/07/22 10:46:11
|
Line 1
|
Line 1
|
|
|
# libtool (GNU libtool) 2.4 | # libtool (GNU libtool) 2.4.2 |
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
|
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, |
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, |
# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
# This is free software; see the source for copying conditions. There is NO |
# This is free software; see the source for copying conditions. There is NO |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
|
Line 41
|
Line 41
|
# --quiet, --silent don't print informational messages |
# --quiet, --silent don't print informational messages |
# --no-quiet, --no-silent |
# --no-quiet, --no-silent |
# print informational messages (default) |
# print informational messages (default) |
|
# --no-warn don't display warning messages |
# --tag=TAG use configuration variables from tag TAG |
# --tag=TAG use configuration variables from tag TAG |
# -v, --verbose print more informational messages than default |
# -v, --verbose print more informational messages than default |
# --no-verbose don't print the extra informational messages |
# --no-verbose don't print the extra informational messages |
Line 69
|
Line 70
|
# compiler: $LTCC |
# compiler: $LTCC |
# compiler flags: $LTCFLAGS |
# compiler flags: $LTCFLAGS |
# linker: $LD (gnu? $with_gnu_ld) |
# linker: $LD (gnu? $with_gnu_ld) |
# $progname: (GNU libtool) 2.4 | # $progname: (GNU libtool) 2.4.2 |
# automake: $automake_version |
# automake: $automake_version |
# autoconf: $autoconf_version |
# autoconf: $autoconf_version |
# |
# |
Line 79
|
Line 80
|
|
|
PROGRAM=libtool |
PROGRAM=libtool |
PACKAGE=libtool |
PACKAGE=libtool |
VERSION=2.4 | VERSION=2.4.2 |
TIMESTAMP="" |
TIMESTAMP="" |
package_revision=1.3293 | package_revision=1.3337 |
|
|
# Be Bourne compatible |
# Be Bourne compatible |
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
Line 136 progpath="$0"
|
Line 137 progpath="$0"
|
|
|
: ${CP="cp -f"} |
: ${CP="cp -f"} |
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} |
test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} |
: ${EGREP="grep -E"} |
|
: ${FGREP="grep -F"} |
|
: ${GREP="grep"} |
|
: ${LN_S="ln -s"} |
|
: ${MAKE="make"} |
: ${MAKE="make"} |
: ${MKDIR="mkdir"} |
: ${MKDIR="mkdir"} |
: ${MV="mv -f"} |
: ${MV="mv -f"} |
: ${RM="rm -f"} |
: ${RM="rm -f"} |
: ${SED="sed"} |
|
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} |
: ${SHELL="${CONFIG_SHELL-/bin/sh}"} |
: ${Xsed="$SED -e 1s/^X//"} |
: ${Xsed="$SED -e 1s/^X//"} |
|
|
Line 387 case $progpath in
|
Line 383 case $progpath in
|
;; |
;; |
*) |
*) |
save_IFS="$IFS" |
save_IFS="$IFS" |
IFS=: | IFS=${PATH_SEPARATOR-:} |
for progdir in $PATH; do |
for progdir in $PATH; do |
IFS="$save_IFS" |
IFS="$save_IFS" |
test -x "$progdir/$progname" && break |
test -x "$progdir/$progname" && break |
Line 771 func_help ()
|
Line 767 func_help ()
|
s*\$LTCFLAGS*'"$LTCFLAGS"'* |
s*\$LTCFLAGS*'"$LTCFLAGS"'* |
s*\$LD*'"$LD"'* |
s*\$LD*'"$LD"'* |
s/\$with_gnu_ld/'"$with_gnu_ld"'/ |
s/\$with_gnu_ld/'"$with_gnu_ld"'/ |
s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ | s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ |
s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ | s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ |
p |
p |
d |
d |
} |
} |
Line 1052 opt_finish=false
|
Line 1048 opt_finish=false
|
opt_help=false |
opt_help=false |
opt_help_all=false |
opt_help_all=false |
opt_silent=: |
opt_silent=: |
|
opt_warning=: |
opt_verbose=: |
opt_verbose=: |
opt_silent=false |
opt_silent=false |
opt_verbose=false |
opt_verbose=false |
Line 1120 esac
|
Line 1117 esac
|
opt_silent=false |
opt_silent=false |
func_append preserve_args " $opt" |
func_append preserve_args " $opt" |
;; |
;; |
|
--no-warning|--no-warn) |
|
opt_warning=false |
|
func_append preserve_args " $opt" |
|
;; |
--no-verbose) |
--no-verbose) |
opt_verbose=false |
opt_verbose=false |
func_append preserve_args " $opt" |
func_append preserve_args " $opt" |
Line 2059 func_mode_compile ()
|
Line 2060 func_mode_compile ()
|
*.[cCFSifmso] | \ |
*.[cCFSifmso] | \ |
*.ada | *.adb | *.ads | *.asm | \ |
*.ada | *.adb | *.ads | *.asm | \ |
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ |
*.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ |
*.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) | *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) |
func_xform "$libobj" |
func_xform "$libobj" |
libobj=$func_xform_result |
libobj=$func_xform_result |
;; |
;; |
Line 3201 func_mode_install ()
|
Line 3202 func_mode_install ()
|
|
|
# Set up the ranlib parameters. |
# Set up the ranlib parameters. |
oldlib="$destdir/$name" |
oldlib="$destdir/$name" |
|
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 |
|
tool_oldlib=$func_to_tool_file_result |
|
|
func_show_eval "$install_prog \$file \$oldlib" 'exit $?' |
func_show_eval "$install_prog \$file \$oldlib" 'exit $?' |
|
|
if test -n "$stripme" && test -n "$old_striplib"; then |
if test -n "$stripme" && test -n "$old_striplib"; then |
func_show_eval "$old_striplib $oldlib" 'exit $?' | func_show_eval "$old_striplib $tool_oldlib" 'exit $?' |
fi |
fi |
|
|
# Do each command in the postinstall commands. |
# Do each command in the postinstall commands. |
Line 3470 static const void *lt_preloaded_setup() {
|
Line 3473 static const void *lt_preloaded_setup() {
|
# linked before any other PIC object. But we must not use |
# linked before any other PIC object. But we must not use |
# pic_flag when linking with -static. The problem exists in |
# pic_flag when linking with -static. The problem exists in |
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. |
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. |
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) | *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) |
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; |
pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; |
*-*-hpux*) |
*-*-hpux*) |
pic_flag_for_symtable=" $pic_flag" ;; |
pic_flag_for_symtable=" $pic_flag" ;; |
Line 3982 func_exec_program_core ()
|
Line 3985 func_exec_program_core ()
|
# launches target application with the remaining arguments. |
# launches target application with the remaining arguments. |
func_exec_program () |
func_exec_program () |
{ |
{ |
for lt_wr_arg | case \" \$* \" in |
do | *\\ --lt-*) |
case \$lt_wr_arg in | for lt_wr_arg |
--lt-*) ;; | do |
*) set x \"\$@\" \"\$lt_wr_arg\"; shift;; | case \$lt_wr_arg in |
esac | --lt-*) ;; |
shift | *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; |
done | esac |
| shift |
| done ;; |
| esac |
func_exec_program_core \${1+\"\$@\"} |
func_exec_program_core \${1+\"\$@\"} |
} |
} |
|
|
Line 5057 void lt_dump_script (FILE* f)
|
Line 5063 void lt_dump_script (FILE* f)
|
{ |
{ |
EOF |
EOF |
func_emit_wrapper yes | |
func_emit_wrapper yes | |
$SED -e 's/\([\\"]\)/\\\1/g' \ | $SED -n -e ' |
-e 's/^/ fputs ("/' -e 's/$/\\n", f);/' | s/^\(.\{79\}\)\(..*\)/\1\ |
| \2/ |
| h |
| s/\([\\"]\)/\\\1/g |
| s/$/\\n/ |
| s/\([^\n]*\).*/ fputs ("\1", f);/p |
| g |
| D' |
cat <<"EOF" |
cat <<"EOF" |
} |
} |
EOF |
EOF |
Line 5643 func_mode_link ()
|
Line 5655 func_mode_link ()
|
continue |
continue |
;; |
;; |
|
|
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |
| |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
func_append compiler_flags " $arg" |
func_append compiler_flags " $arg" |
func_append compile_command " $arg" |
func_append compile_command " $arg" |
func_append finalize_command " $arg" |
func_append finalize_command " $arg" |
Line 6147 func_mode_link ()
|
Line 6160 func_mode_link ()
|
lib= |
lib= |
found=no |
found=no |
case $deplib in |
case $deplib in |
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |
| |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) |
if test "$linkmode,$pass" = "prog,link"; then |
if test "$linkmode,$pass" = "prog,link"; then |
compile_deplibs="$deplib $compile_deplibs" |
compile_deplibs="$deplib $compile_deplibs" |
finalize_deplibs="$deplib $finalize_deplibs" |
finalize_deplibs="$deplib $finalize_deplibs" |
Line 6831 func_mode_link ()
|
Line 6845 func_mode_link ()
|
test "$hardcode_direct_absolute" = no; then |
test "$hardcode_direct_absolute" = no; then |
add="$dir/$linklib" |
add="$dir/$linklib" |
elif test "$hardcode_minus_L" = yes; then |
elif test "$hardcode_minus_L" = yes; then |
add_dir="-L$dir" | add_dir="-L$absdir" |
# Try looking first in the location we're being installed to. |
# Try looking first in the location we're being installed to. |
if test -n "$inst_prefix_dir"; then |
if test -n "$inst_prefix_dir"; then |
case $libdir in |
case $libdir in |
Line 7316 func_mode_link ()
|
Line 7330 func_mode_link ()
|
# which has an extra 1 added just for fun |
# which has an extra 1 added just for fun |
# |
# |
case $version_type in |
case $version_type in |
|
# correct linux to gnu/linux during the next big refactor |
darwin|linux|osf|windows|none) |
darwin|linux|osf|windows|none) |
func_arith $number_major + $number_minor |
func_arith $number_major + $number_minor |
current=$func_arith_result |
current=$func_arith_result |
Line 7432 func_mode_link ()
|
Line 7447 func_mode_link ()
|
versuffix="$major.$revision" |
versuffix="$major.$revision" |
;; |
;; |
|
|
linux) | linux) # correct to gnu/linux during the next big refactor |
func_arith $current - $age |
func_arith $current - $age |
major=.$func_arith_result |
major=.$func_arith_result |
versuffix="$major.$age.$revision" |
versuffix="$major.$age.$revision" |
Line 8020 EOF
|
Line 8035 EOF
|
|
|
# Test again, we may have decided not to build it any more |
# Test again, we may have decided not to build it any more |
if test "$build_libtool_libs" = yes; then |
if test "$build_libtool_libs" = yes; then |
|
# Remove ${wl} instances when linking with ld. |
|
# FIXME: should test the right _cmds variable. |
|
case $archive_cmds in |
|
*\$LD\ *) wl= ;; |
|
esac |
if test "$hardcode_into_libs" = yes; then |
if test "$hardcode_into_libs" = yes; then |
# Hardcode the library paths |
# Hardcode the library paths |
hardcode_libdirs= |
hardcode_libdirs= |
Line 8050 EOF
|
Line 8070 EOF
|
elif test -n "$runpath_var"; then |
elif test -n "$runpath_var"; then |
case "$perm_rpath " in |
case "$perm_rpath " in |
*" $libdir "*) ;; |
*" $libdir "*) ;; |
*) func_apped perm_rpath " $libdir" ;; | *) func_append perm_rpath " $libdir" ;; |
esac |
esac |
fi |
fi |
done |
done |
Line 8058 EOF
|
Line 8078 EOF
|
if test -n "$hardcode_libdir_separator" && |
if test -n "$hardcode_libdir_separator" && |
test -n "$hardcode_libdirs"; then |
test -n "$hardcode_libdirs"; then |
libdir="$hardcode_libdirs" |
libdir="$hardcode_libdirs" |
if test -n "$hardcode_libdir_flag_spec_ld"; then | eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" |
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" | |
else | |
eval dep_rpath=\"$hardcode_libdir_flag_spec\" | |
fi | |
fi |
fi |
if test -n "$runpath_var" && test -n "$perm_rpath"; then |
if test -n "$runpath_var" && test -n "$perm_rpath"; then |
# We should set the runpath_var. |
# We should set the runpath_var. |
Line 9152 EOF
|
Line 9168 EOF
|
esac |
esac |
done |
done |
fi |
fi |
|
func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 |
|
tool_oldlib=$func_to_tool_file_result |
eval cmds=\"$old_archive_cmds\" |
eval cmds=\"$old_archive_cmds\" |
|
|
func_len " $cmds" |
func_len " $cmds" |
Line 9261 EOF
|
Line 9279 EOF
|
*.la) |
*.la) |
func_basename "$deplib" |
func_basename "$deplib" |
name="$func_basename_result" |
name="$func_basename_result" |
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | func_resolve_sysroot "$deplib" |
| eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` |
test -z "$libdir" && \ |
test -z "$libdir" && \ |
func_fatal_error "\`$deplib' is not a valid libtool archive" |
func_fatal_error "\`$deplib' is not a valid libtool archive" |
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" |
func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" |