comparison ltmain.sh @ 1599:252e05bf199d

Regenerate proper Autotools files; fix JS stringToTime and add stringToTime_error
author Adam Chlipala <adam@chlipala.net>
date Fri, 18 Nov 2011 17:17:22 -0500
parents 3b57a6ddef1a
children 40557fb08e98
comparison
equal deleted inserted replaced
1598:cdca9691434a 1599:252e05bf199d
1 1
2 # libtool (GNU libtool) 2.4 2 # libtool (GNU libtool) 2.4.2
3 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 3 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4 4
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
6 # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 6 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
7 # This is free software; see the source for copying conditions. There is NO 7 # This is free software; see the source for copying conditions. There is NO
8 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 9
10 # GNU Libtool is free software; you can redistribute it and/or modify 10 # GNU Libtool is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by 11 # it under the terms of the GNU General Public License as published by
39 # --mode=MODE use operation mode MODE 39 # --mode=MODE use operation mode MODE
40 # --preserve-dup-deps don't remove duplicate dependency libraries 40 # --preserve-dup-deps don't remove duplicate dependency libraries
41 # --quiet, --silent don't print informational messages 41 # --quiet, --silent don't print informational messages
42 # --no-quiet, --no-silent 42 # --no-quiet, --no-silent
43 # print informational messages (default) 43 # print informational messages (default)
44 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG 45 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default 46 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages 47 # --no-verbose don't print the extra informational messages
47 # --version print version information 48 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message 49 # -h, --help, --help-all print short, long, or detailed help message
67 # host-triplet: $host 68 # host-triplet: $host
68 # shell: $SHELL 69 # shell: $SHELL
69 # compiler: $LTCC 70 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS 71 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld) 72 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4 Debian-2.4-4 73 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1
73 # automake: $automake_version 74 # automake: $automake_version
74 # autoconf: $autoconf_version 75 # autoconf: $autoconf_version
75 # 76 #
76 # Report bugs to <bug-libtool@gnu.org>. 77 # Report bugs to <bug-libtool@gnu.org>.
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>. 78 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>. 79 # General help using GNU software: <http://www.gnu.org/gethelp/>.
79 80
80 PROGRAM=libtool 81 PROGRAM=libtool
81 PACKAGE=libtool 82 PACKAGE=libtool
82 VERSION="2.4 Debian-2.4-4" 83 VERSION="2.4.2 Debian-2.4.2-1"
83 TIMESTAMP="" 84 TIMESTAMP=""
84 package_revision=1.3293 85 package_revision=1.3337
85 86
86 # Be Bourne compatible 87 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 88 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
88 emulate sh 89 emulate sh
89 NULLCMD=: 90 NULLCMD=:
134 135
135 136
136 137
137 : ${CP="cp -f"} 138 : ${CP="cp -f"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} 139 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
139 : ${EGREP="/bin/grep -E"}
140 : ${FGREP="/bin/grep -F"}
141 : ${GREP="/bin/grep"}
142 : ${LN_S="ln -s"}
143 : ${MAKE="make"} 140 : ${MAKE="make"}
144 : ${MKDIR="mkdir"} 141 : ${MKDIR="mkdir"}
145 : ${MV="mv -f"} 142 : ${MV="mv -f"}
146 : ${RM="rm -f"} 143 : ${RM="rm -f"}
147 : ${SED="/bin/sed"}
148 : ${SHELL="${CONFIG_SHELL-/bin/sh}"} 144 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
149 : ${Xsed="$SED -e 1s/^X//"} 145 : ${Xsed="$SED -e 1s/^X//"}
150 146
151 # Global variables: 147 # Global variables:
152 EXIT_SUCCESS=0 148 EXIT_SUCCESS=0
385 progdir=`cd "$progdir" && pwd` 381 progdir=`cd "$progdir" && pwd`
386 progpath="$progdir/$progname" 382 progpath="$progdir/$progname"
387 ;; 383 ;;
388 *) 384 *)
389 save_IFS="$IFS" 385 save_IFS="$IFS"
390 IFS=: 386 IFS=${PATH_SEPARATOR-:}
391 for progdir in $PATH; do 387 for progdir in $PATH; do
392 IFS="$save_IFS" 388 IFS="$save_IFS"
393 test -x "$progdir/$progname" && break 389 test -x "$progdir/$progname" && break
394 done 390 done
395 IFS="$save_IFS" 391 IFS="$save_IFS"
769 s*\$SHELL*'"$SHELL"'* 765 s*\$SHELL*'"$SHELL"'*
770 s*\$LTCC*'"$LTCC"'* 766 s*\$LTCC*'"$LTCC"'*
771 s*\$LTCFLAGS*'"$LTCFLAGS"'* 767 s*\$LTCFLAGS*'"$LTCFLAGS"'*
772 s*\$LD*'"$LD"'* 768 s*\$LD*'"$LD"'*
773 s/\$with_gnu_ld/'"$with_gnu_ld"'/ 769 s/\$with_gnu_ld/'"$with_gnu_ld"'/
774 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ 770 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
775 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ 771 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
776 p 772 p
777 d 773 d
778 } 774 }
779 /^# .* home page:/b print 775 /^# .* home page:/b print
780 /^# General help using/b print 776 /^# General help using/b print
1050 opt_features=false 1046 opt_features=false
1051 opt_finish=false 1047 opt_finish=false
1052 opt_help=false 1048 opt_help=false
1053 opt_help_all=false 1049 opt_help_all=false
1054 opt_silent=: 1050 opt_silent=:
1051 opt_warning=:
1055 opt_verbose=: 1052 opt_verbose=:
1056 opt_silent=false 1053 opt_silent=false
1057 opt_verbose=false 1054 opt_verbose=false
1058 1055
1059 1056
1116 esac 1113 esac
1117 shift 1114 shift
1118 ;; 1115 ;;
1119 --no-silent|--no-quiet) 1116 --no-silent|--no-quiet)
1120 opt_silent=false 1117 opt_silent=false
1118 func_append preserve_args " $opt"
1119 ;;
1120 --no-warning|--no-warn)
1121 opt_warning=false
1121 func_append preserve_args " $opt" 1122 func_append preserve_args " $opt"
1122 ;; 1123 ;;
1123 --no-verbose) 1124 --no-verbose)
1124 opt_verbose=false 1125 opt_verbose=false
1125 func_append preserve_args " $opt" 1126 func_append preserve_args " $opt"
2057 # If the user specifies -o file.o, it is replaced with file.lo 2058 # If the user specifies -o file.o, it is replaced with file.lo
2058 case $libobj in 2059 case $libobj in
2059 *.[cCFSifmso] | \ 2060 *.[cCFSifmso] | \
2060 *.ada | *.adb | *.ads | *.asm | \ 2061 *.ada | *.adb | *.ads | *.asm | \
2061 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ 2062 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
2062 *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) 2063 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
2063 func_xform "$libobj" 2064 func_xform "$libobj"
2064 libobj=$func_xform_result 2065 libobj=$func_xform_result
2065 ;; 2066 ;;
2066 esac 2067 esac
2067 2068
3199 func_basename "$file" 3200 func_basename "$file"
3200 name="$func_basename_result" 3201 name="$func_basename_result"
3201 3202
3202 # Set up the ranlib parameters. 3203 # Set up the ranlib parameters.
3203 oldlib="$destdir/$name" 3204 oldlib="$destdir/$name"
3205 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3206 tool_oldlib=$func_to_tool_file_result
3204 3207
3205 func_show_eval "$install_prog \$file \$oldlib" 'exit $?' 3208 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
3206 3209
3207 if test -n "$stripme" && test -n "$old_striplib"; then 3210 if test -n "$stripme" && test -n "$old_striplib"; then
3208 func_show_eval "$old_striplib $oldlib" 'exit $?' 3211 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
3209 fi 3212 fi
3210 3213
3211 # Do each command in the postinstall commands. 3214 # Do each command in the postinstall commands.
3212 func_execute_cmds "$old_postinstall_cmds" 'exit $?' 3215 func_execute_cmds "$old_postinstall_cmds" 'exit $?'
3213 done 3216 done
3468 # compiling the symbol table file with pic_flag works around 3471 # compiling the symbol table file with pic_flag works around
3469 # a FreeBSD bug that causes programs to crash when -lm is 3472 # a FreeBSD bug that causes programs to crash when -lm is
3470 # linked before any other PIC object. But we must not use 3473 # linked before any other PIC object. But we must not use
3471 # pic_flag when linking with -static. The problem exists in 3474 # pic_flag when linking with -static. The problem exists in
3472 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. 3475 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3473 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) 3476 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3474 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; 3477 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
3475 *-*-hpux*) 3478 *-*-hpux*)
3476 pic_flag_for_symtable=" $pic_flag" ;; 3479 pic_flag_for_symtable=" $pic_flag" ;;
3477 *) 3480 *)
3478 if test "X$my_pic_p" != Xno; then 3481 if test "X$my_pic_p" != Xno; then
3980 # A function to encapsulate launching the target application 3983 # A function to encapsulate launching the target application
3981 # Strips options in the --lt-* namespace from \$@ and 3984 # Strips options in the --lt-* namespace from \$@ and
3982 # launches target application with the remaining arguments. 3985 # launches target application with the remaining arguments.
3983 func_exec_program () 3986 func_exec_program ()
3984 { 3987 {
3985 for lt_wr_arg 3988 case \" \$* \" in
3986 do 3989 *\\ --lt-*)
3987 case \$lt_wr_arg in 3990 for lt_wr_arg
3988 --lt-*) ;; 3991 do
3989 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; 3992 case \$lt_wr_arg in
3990 esac 3993 --lt-*) ;;
3991 shift 3994 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3992 done 3995 esac
3996 shift
3997 done ;;
3998 esac
3993 func_exec_program_core \${1+\"\$@\"} 3999 func_exec_program_core \${1+\"\$@\"}
3994 } 4000 }
3995 4001
3996 # Parse options 4002 # Parse options
3997 func_parse_lt_options \"\$0\" \${1+\"\$@\"} 4003 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
5055 cat <<"EOF" 5061 cat <<"EOF"
5056 void lt_dump_script (FILE* f) 5062 void lt_dump_script (FILE* f)
5057 { 5063 {
5058 EOF 5064 EOF
5059 func_emit_wrapper yes | 5065 func_emit_wrapper yes |
5060 $SED -e 's/\([\\"]\)/\\\1/g' \ 5066 $SED -n -e '
5061 -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' 5067 s/^\(.\{79\}\)\(..*\)/\1\
5062 5068 \2/
5069 h
5070 s/\([\\"]\)/\\\1/g
5071 s/$/\\n/
5072 s/\([^\n]*\).*/ fputs ("\1", f);/p
5073 g
5074 D'
5063 cat <<"EOF" 5075 cat <<"EOF"
5064 } 5076 }
5065 EOF 5077 EOF
5066 } 5078 }
5067 # end: func_emit_cwrapperexe_src 5079 # end: func_emit_cwrapperexe_src
5641 func_append finalize_command " $arg" 5653 func_append finalize_command " $arg"
5642 prev=xcompiler 5654 prev=xcompiler
5643 continue 5655 continue
5644 ;; 5656 ;;
5645 5657
5646 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) 5658 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5659 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5647 func_append compiler_flags " $arg" 5660 func_append compiler_flags " $arg"
5648 func_append compile_command " $arg" 5661 func_append compile_command " $arg"
5649 func_append finalize_command " $arg" 5662 func_append finalize_command " $arg"
5650 case "$new_inherited_linker_flags " in 5663 case "$new_inherited_linker_flags " in
5651 *" $arg "*) ;; 5664 *" $arg "*) ;;
6148 6161
6149 for deplib in $libs; do 6162 for deplib in $libs; do
6150 lib= 6163 lib=
6151 found=no 6164 found=no
6152 case $deplib in 6165 case $deplib in
6153 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) 6166 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6167 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6154 if test "$linkmode,$pass" = "prog,link"; then 6168 if test "$linkmode,$pass" = "prog,link"; then
6155 compile_deplibs="$deplib $compile_deplibs" 6169 compile_deplibs="$deplib $compile_deplibs"
6156 finalize_deplibs="$deplib $finalize_deplibs" 6170 finalize_deplibs="$deplib $finalize_deplibs"
6157 else 6171 else
6158 func_append compiler_flags " $deplib" 6172 func_append compiler_flags " $deplib"
6832 relink) 6846 relink)
6833 if test "$hardcode_direct" = yes && 6847 if test "$hardcode_direct" = yes &&
6834 test "$hardcode_direct_absolute" = no; then 6848 test "$hardcode_direct_absolute" = no; then
6835 add="$dir/$linklib" 6849 add="$dir/$linklib"
6836 elif test "$hardcode_minus_L" = yes; then 6850 elif test "$hardcode_minus_L" = yes; then
6837 add_dir="-L$dir" 6851 add_dir="-L$absdir"
6838 # Try looking first in the location we're being installed to. 6852 # Try looking first in the location we're being installed to.
6839 if test -n "$inst_prefix_dir"; then 6853 if test -n "$inst_prefix_dir"; then
6840 case $libdir in 6854 case $libdir in
6841 [\\/]*) 6855 [\\/]*)
6842 func_append add_dir " -L$inst_prefix_dir$libdir" 6856 func_append add_dir " -L$inst_prefix_dir$libdir"
7317 # and those that subtract age and use age as 7331 # and those that subtract age and use age as
7318 # a minor version. But, then there is irix 7332 # a minor version. But, then there is irix
7319 # which has an extra 1 added just for fun 7333 # which has an extra 1 added just for fun
7320 # 7334 #
7321 case $version_type in 7335 case $version_type in
7336 # correct linux to gnu/linux during the next big refactor
7322 darwin|linux|osf|windows|none) 7337 darwin|linux|osf|windows|none)
7323 func_arith $number_major + $number_minor 7338 func_arith $number_major + $number_minor
7324 current=$func_arith_result 7339 current=$func_arith_result
7325 age="$number_minor" 7340 age="$number_minor"
7326 revision="$number_revision" 7341 revision="$number_revision"
7436 # Before this point, $major must not contain `.'. 7451 # Before this point, $major must not contain `.'.
7437 major=.$major 7452 major=.$major
7438 versuffix="$major.$revision" 7453 versuffix="$major.$revision"
7439 ;; 7454 ;;
7440 7455
7441 linux) 7456 linux) # correct to gnu/linux during the next big refactor
7442 func_arith $current - $age 7457 func_arith $current - $age
7443 major=.$func_arith_result 7458 major=.$func_arith_result
7444 versuffix="$major.$age.$revision" 7459 versuffix="$major.$age.$revision"
7445 ;; 7460 ;;
7446 7461
8024 old_library= 8039 old_library=
8025 dlname= 8040 dlname=
8026 8041
8027 # Test again, we may have decided not to build it any more 8042 # Test again, we may have decided not to build it any more
8028 if test "$build_libtool_libs" = yes; then 8043 if test "$build_libtool_libs" = yes; then
8044 # Remove ${wl} instances when linking with ld.
8045 # FIXME: should test the right _cmds variable.
8046 case $archive_cmds in
8047 *\$LD\ *) wl= ;;
8048 esac
8029 if test "$hardcode_into_libs" = yes; then 8049 if test "$hardcode_into_libs" = yes; then
8030 # Hardcode the library paths 8050 # Hardcode the library paths
8031 hardcode_libdirs= 8051 hardcode_libdirs=
8032 dep_rpath= 8052 dep_rpath=
8033 rpath="$finalize_rpath" 8053 rpath="$finalize_rpath"
8054 func_append dep_rpath " $flag" 8074 func_append dep_rpath " $flag"
8055 fi 8075 fi
8056 elif test -n "$runpath_var"; then 8076 elif test -n "$runpath_var"; then
8057 case "$perm_rpath " in 8077 case "$perm_rpath " in
8058 *" $libdir "*) ;; 8078 *" $libdir "*) ;;
8059 *) func_apped perm_rpath " $libdir" ;; 8079 *) func_append perm_rpath " $libdir" ;;
8060 esac 8080 esac
8061 fi 8081 fi
8062 done 8082 done
8063 # Substitute the hardcoded libdirs into the rpath. 8083 # Substitute the hardcoded libdirs into the rpath.
8064 if test -n "$hardcode_libdir_separator" && 8084 if test -n "$hardcode_libdir_separator" &&
8065 test -n "$hardcode_libdirs"; then 8085 test -n "$hardcode_libdirs"; then
8066 libdir="$hardcode_libdirs" 8086 libdir="$hardcode_libdirs"
8067 if test -n "$hardcode_libdir_flag_spec_ld"; then 8087 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
8068 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
8069 else
8070 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
8071 fi
8072 fi 8088 fi
8073 if test -n "$runpath_var" && test -n "$perm_rpath"; then 8089 if test -n "$runpath_var" && test -n "$perm_rpath"; then
8074 # We should set the runpath_var. 8090 # We should set the runpath_var.
8075 rpath= 8091 rpath=
8076 for dir in $perm_rpath; do 8092 for dir in $perm_rpath; do
9156 ;; 9172 ;;
9157 *) func_append oldobjs " $obj" ;; 9173 *) func_append oldobjs " $obj" ;;
9158 esac 9174 esac
9159 done 9175 done
9160 fi 9176 fi
9177 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9178 tool_oldlib=$func_to_tool_file_result
9161 eval cmds=\"$old_archive_cmds\" 9179 eval cmds=\"$old_archive_cmds\"
9162 9180
9163 func_len " $cmds" 9181 func_len " $cmds"
9164 len=$func_len_result 9182 len=$func_len_result
9165 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then 9183 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9265 for deplib in $dependency_libs; do 9283 for deplib in $dependency_libs; do
9266 case $deplib in 9284 case $deplib in
9267 *.la) 9285 *.la)
9268 func_basename "$deplib" 9286 func_basename "$deplib"
9269 name="$func_basename_result" 9287 name="$func_basename_result"
9270 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 9288 func_resolve_sysroot "$deplib"
9289 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
9271 test -z "$libdir" && \ 9290 test -z "$libdir" && \
9272 func_fatal_error "\`$deplib' is not a valid libtool archive" 9291 func_fatal_error "\`$deplib' is not a valid libtool archive"
9273 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" 9292 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
9274 ;; 9293 ;;
9275 -L*) 9294 -L*)