Lines Matching +full:generate +full:- +full:lockfile

29 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 # Usage: $progname [OPTION]... [MODE-ARG]...
33 # Provide generalized library-building support services.
35 # --config show all configuration variables
36 # --debug enable verbose shell tracing
37 # -n, --dry-run display commands without modifying any files
38 # --features display basic configuration information and exit
39 # --mode=MODE use operation mode MODE
40 # --preserve-dup-deps don't remove duplicate dependency libraries
41 # --quiet, --silent don't print informational messages
42 # --tag=TAG use configuration variables from tag TAG
43 # -v, --verbose print informational messages (default)
44 # --version print version information
45 # -h, --help print short or long help message
57 # MODE-ARGS vary depending on the MODE.
58 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
63 # host-triplet: $host
72 # Report bugs to <bug-libtool@gnu.org>.
81 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
86 alias -g '${1+"$@"}'='"$@"'
89 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
117 : ${CP="cp -f"}
119 : ${EGREP="/bin/grep -E"}
120 : ${FGREP="/bin/grep -F"}
122 : ${LN_S="ln -s"}
125 : ${MV="mv -f"}
126 : ${RM="rm -f"}
128 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
129 : ${Xsed="$SED -e 1s/^X//"}
162 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
168 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
181 # In the unlikely event $progname began with a '-', it would play havoc with
182 # func_echo (imagine progname=-n), so we prepend ./ in that case:
186 -*) progname=./$progname ;;
191 [\\/]*|[A-Za-z]:\\*) ;;
202 test -x "$progdir/$progname" && break
205 test -n "$progdir" || progdir=`pwd`
211 # metacharacters that are still active within double-quoted strings.
212 Xsed="${SED}"' -e 1s/^X//'
218 # Re-`\' parameter expansions in output of double_quote_subst that were
219 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
256 # fails when set -e is in force, so we need another command to
294 help="Try \`$progname --help' for more information." ## default
305 # func_mkdir_p directory-path
306 # Make sure the entire path to DIRECTORY-PATH is available.
312 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
314 # Protect directory names starting with `-'
316 -*) my_directory_path="./$my_directory_path" ;;
320 while test ! -d "$my_directory_path"; do
329 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
331 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
344 test -d "$my_directory_path" || \
356 my_template="${TMPDIR-/tmp}/${1-$progname}"
359 # Return a directory name, but don't create it in dry-run mode
360 my_tmpdir="${my_template}-$$"
364 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
366 if test ! -d "$my_tmpdir"; then
368 my_tmpdir="${my_template}-${RANDOM-0}$$"
376 # If we're not in dry-run mode, bomb out on failure
377 test -d "$my_tmpdir" || \
388 # is double-quoted, suitable for a subsequent eval, whereas
395 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
401 # Double-quote args containing shell metacharacters to delay
423 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
429 # Double-quote args containing shell metacharacters to delay
449 my_fail_exp="${2-:}"
451 ${opt_silent-false} || {
456 if ${opt_dry_run-false}; then :; else
459 if test "$my_status" -eq 0; then :; else
473 my_fail_exp="${2-:}"
475 ${opt_silent-false} || {
480 if ${opt_dry_run-false}; then :; else
485 if test "$my_status" -eq 0; then :; else
499 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
502 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
512 $SED -n '/^# Usage:/,/# -h/ {
519 $ECHO "run \`$progname --help | more' for full usage"
527 $SED -n '/^# Usage:/,/# Report bugs to/ {
537 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
538 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
560 if test "X$1" = X--no-reexec; then
561 # Discard the --no-reexec flag, and continue.
563 elif test "X$1" = X--fallback-echo; then
571 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
574 if test "X$1" = X--fallback-echo; then
602 # will be execed at the end. This prevents here-documents from being
629 … $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
669 *[!-_A-Za-z0-9,/]*)
684 # also don't use non-portable quotes within backquotes within
686 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
696 # the script to make things like `libtool --version' happen quickly.
699 # Shorthand for --mode=foo, only valid as the first argument
702 shift; set dummy --mode clean ${1+"$@"}; shift
705 shift; set dummy --mode compile ${1+"$@"}; shift
708 shift; set dummy --mode execute ${1+"$@"}; shift
711 shift; set dummy --mode finish ${1+"$@"}; shift
714 shift; set dummy --mode install ${1+"$@"}; shift
717 shift; set dummy --mode link ${1+"$@"}; shift
720 shift; set dummy --mode uninstall ${1+"$@"}; shift
724 # Parse non-mode specific arguments:
725 while test "$#" -gt 0; do
730 --config) func_config ;;
732 --debug) preserve_args="$preserve_args $opt"
734 opt_debug='set -x'
738 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
743 --dry-run | -n) opt_dry_run=: ;;
744 --features) func_features ;;
745 --finish) mode="finish" ;;
747 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
770 --preserve-dup-deps)
773 --quiet|--silent) preserve_args="$preserve_args $opt"
777 --verbose| -v) preserve_args="$preserve_args $opt"
781 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
788 -dlopen=*|--mode=*|--tag=*)
794 -\?|-h) func_usage ;;
795 --help) opt_help=: ;;
796 --version) func_version ;;
798 -*) func_fatal_help "unrecognized option \`$opt'" ;;
817 # Having warned about all mis-specified options, bail out if
829 if test -z "$macro_version"; then
858 ## ----------- ##
860 ## ----------- ##
870 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
877 # Only execute mode is allowed to have -dlopen flags.
878 if test -n "$execute_dlfiles" && test "$mode" != execute; then
879 func_error "unrecognized option \`-dlopen'"
884 # Change the help message to a mode-specific one.
886 help="Try \`$progname --help --mode=$mode' for more information."
896 test -f "$1" &&
897 $SED -e 4q "$1" 2>/dev/null \
911 if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
919 exec 0<&5 5<&-
972 # Execute tilde-delimited COMMANDS.
974 # FAIL_CMD may read-access the current command in variable CMD!
982 func_show_eval "$cmd" "${2-:}"
991 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
1006 # if one wasn't chosen via the "--tag" command line option.
1013 if test -n "$available_tags" && test -z "$tagname"; then
1029 …eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'…
1032 # Double-quote args containing other shell metacharacters.
1048 # was found and let the user know that the "--tag" command
1050 if test -z "$tagname"; then
1052 func_fatal_error "specify a tag with \`--tag'"
1083 # $write_libobj - a libtool object file
1092 # Name of the non-PIC object
1106 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1130 # Accept any command-line options.
1132 -o)
1133 test -n "$libobj" && \
1134 func_fatal_error "you cannot specify \`-o' more than once"
1139 -pie | -fpie | -fPIE)
1144 -shared | -static | -prefer-pic | -prefer-non-pic)
1149 -no-suppress)
1154 -Xcompiler)
1159 -Wc,*)
1160 func_stripname '-Wc,' '' "$arg"
1196 func_fatal_error "you must specify an argument for -Xcompile"
1199 func_fatal_error "you must specify a target with \`-o'"
1203 test -z "$libobj" && {
1211 # If the user specifies -o file.o, it is replaced with file.lo
1233 -shared)
1240 -static)
1246 -prefer-pic)
1251 -prefer-non-pic)
1267 test -z "$base_compile" && \
1284 # non-PIC code in shared libraries is not supported
1289 # not support -o with -c
1291 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1292 lockfile="$output_obj.lock"
1296 lockfile=
1302 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
1303 func_echo "Waiting for $lockfile to be removed"
1307 if test -f "$lockfile"; then
1309 *** ERROR, $lockfile exists and contains:
1310 `cat $lockfile 2>/dev/null`
1314 your compiler does not support \`-c' and \`-o' together. If you
1316 avoid parallel builds (make -j) in this platform, or get a better
1323 $ECHO "$srcfile" > "$lockfile"
1327 removelist="$removelist $lockfile"
1330 if test -n "$fix_srcfile_path"; then
1350 if test -z "$output_obj"; then
1352 command="$command -o $lobj"
1356 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
1359 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1361 *** ERROR, $lockfile contains:
1362 `cat $lockfile 2>/dev/null`
1369 your compiler does not support \`-c' and \`-o' together. If you
1371 avoid parallel builds (make -j) in this platform, or get a better
1379 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1390 # Only build a position-dependent object if we build old libraries.
1399 command="$command -o $obj"
1408 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1410 *** ERROR, $lockfile contains:
1411 `cat $lockfile 2>/dev/null`
1418 your compiler does not support \`-c' and \`-o' together. If you
1420 avoid parallel builds (make -j) in this platform, or get a better
1428 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1439 removelist=$lockfile
1440 $RM "$lockfile"
1463 "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
1468 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1477 "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
1483 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
1484 -no-suppress do not suppress compiler output for multiple passes
1485 -prefer-pic try to building PIC objects only
1486 -prefer-non-pic try to building non-PIC objects only
1487 -shared do not build a \`.o' file suitable for static linking
1488 -static only build a \`.o' file suitable for static linking
1490 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
1500 "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
1506 -dlopen FILE add the directory containing FILE to the library path
1508 This mode sets the library path environment variable according to \`-dlopen'
1520 "Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
1527 the \`--dry-run' option if you just want to see what would be executed."
1532 "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
1536 INSTALL-COMMAND is the installation command. The first component should be
1539 The following components of INSTALL-COMMAND are treated specially:
1541 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
1544 BSD-compatible install options are recognized)."
1549 "Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
1554 LINK-COMMAND is a command using the C compiler that you would use to create
1557 The following components of LINK-COMMAND are treated specially:
1559 -all-static do not do any dynamic linking at all
1560 -avoid-version do not add a version suffix if possible
1561 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
1562 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
1563 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
1564 -export-symbols SYMFILE
1566 -export-symbols-regex REGEX
1568 -LLIBDIR search LIBDIR for required installed libraries
1569 -lNAME OUTPUT-FILE requires the installed library libNAME
1570 -module build a library that can dlopened
1571 -no-fast-install disable the fast-install mode
1572 -no-install link a not-installable executable
1573 -no-undefined declare that a library does not refer to external symbols
1574 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
1575 -objectlist FILE Use a list of object files found in FILE to specify objects
1576 -precious-files-regex REGEX
1578 -release RELEASE specify package release information
1579 -rpath LIBDIR the created library will eventually be installed in LIBDIR
1580 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
1581 -shared only do dynamic linking of libtool libraries
1582 -shrext SUFFIX override the standard shared library file extension
1583 -static do not do any dynamic linking of uninstalled libtool libraries
1584 -static-libtool-libs
1586 -version-info CURRENT[:REVISION[:AGE]]
1588 -weak LIBNAME declare that the target provides the LIBNAME interface
1590 All other options (arguments beginning with \`-') are ignored.
1596 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
1597 only library objects (\`.lo' files) may be specified, and \`-rpath' is
1600 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
1603 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
1609 "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
1614 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
1627 $ECHO "Try \`$progname --help' for more information about other modes."
1632 # Now that we've collected a possible --mode arg, show help if necessary
1642 test -z "$cmd" && \
1645 # Handle -dlopen flags immediately.
1647 test -f "$file" \
1663 if test -z "$dlname"; then
1665 test -n "$library_names" && \
1666 func_warning "\`$file' was not linked with \`-export-dynamic'"
1673 if test -f "$dir/$objdir/$dlname"; then
1676 if test ! -f "$dir/$dlname"; then
1689 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
1696 test -n "$absdir" && dir="$absdir"
1699 if eval "test -z \"\$$shlibpath_var\""; then
1715 -*) ;;
1736 if test -n "$shlibpath_var"; then
1755 if test -n "$shlibpath_var"; then
1774 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1781 if test -n "$finish_cmds"; then
1786 if test -n "$finish_eval"; then
1798 $ECHO "X----------------------------------------------------------------------" | $Xsed
1806 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1808 if test -n "$shlibpath_var"; then
1809 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1812 if test -n "$runpath_var"; then
1813 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1816 if test -n "$hardcode_libdir_flag_spec"; then
1820 $ECHO " - use the \`$flag' linker flag"
1822 if test -n "$admincmds"; then
1823 $ECHO " - have your system administrator run these commands:$admincmds"
1825 if test -f /etc/ld.so.conf; then
1826 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1832 solaris2.[6789]|solaris2.1[0-9])
1840 $ECHO "X----------------------------------------------------------------------" | $Xsed
1881 if test -n "$dest"; then
1888 -d) isdir=yes ;;
1889 -f)
1895 -g | -m | -o)
1898 -s)
1899 stripme=" -s"
1902 -*)
1906 if test -n "$prev"; then
1920 test -z "$install_prog" && \
1923 test -n "$prev" && \
1926 if test -z "$files"; then
1927 if test -z "$dest"; then
1939 test -d "$dest" && isdir=yes
1950 test "$#" -gt 1 && \
1954 [\\/]* | [A-Za-z]:[\\/]*) ;;
2011 if test -n "$relink_command"; then
2013 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2024 if test -n "$inst_prefix_dir"; then
2026 …relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_pr…
2028 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2038 if test -n "$1"; then
2043 test -n "$relink_command" && srcname="$realname"T
2058 if test -n "$tstripme" && test -n "$striplib"; then
2062 if test "$#" -gt 0; then
2064 # Try `ln -sf' first, because the `ln' binary might depend on
2065 # the symlink we replace! Solaris /bin/ln does not understand -f,
2066 # so we also need to try rm && ln -s.
2070 …&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $rea…
2079 # Install the pseudo-library for information purposes.
2086 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
2093 if test -n "$destname"; then
2101 # Deduce the name of the destination old-style object file.
2117 test -n "$destfile" && \
2122 # Deduce the name of the old-style object file.
2132 if test -n "$destname"; then
2146 if test ! -f "$file"; then
2176 test -z "$generated_by_libtool_version" && \
2183 if test -f "$lib"; then
2186 … libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
2187 if test -n "$libdir" && test ! -f "$libfile"; then
2197 if test "$fast_install" = no && test -n "$relink_command"; then
2205 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
2224 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
2247 $opt_dry_run || if test -n "$outputname"; then
2263 if test -n "$stripme" && test -n "$old_striplib"; then
2271 test -n "$future_libdirs" && \
2272 func_warning "remember to run \`$progname --finish$future_libdirs'"
2274 if test -n "$current_libdirs"; then
2276 $opt_dry_run && current_libdirs=" -n$current_libdirs"
2277 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
2294 my_pic_p="${3-no}"
2295 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
2298 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2299 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2306 if test -n "$my_dlsyms"; then
2319 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
2335 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2341 if test -n "$exclude_expsyms"; then
2343 eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2348 if test -n "$export_symbols_regex"; then
2350 eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2356 if test -z "$export_symbols"; then
2360 … eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2370 …eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output…
2371 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
2395 test -f "$nlist" || : > "$nlist"
2397 if test -n "$exclude_expsyms"; then
2398 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2403 if $GREP -v "^: " < "$nlist" |
2404 if sort -k 3 </dev/null >/dev/null 2>&1; then
2405 sort -k 3
2412 $GREP -v "^: " < "$nlist" > "$nlist"S
2415 if test -f "$nlist"S; then
2433 runtime relocations are performed -- see ld's documentation
2434 on pseudo-relocs. */"
2479 *" -static "*) ;;
2483 # a FreeBSD bug that causes programs to crash when -lm is
2485 # pic_flag when linking with -static. The problem exists in
2487 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2488 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
2489 *-*-hpux*)
2502 -pie | -fpie | -fPIE) ;;
2508 …func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable…
2517 if test -f "$output_objdir/$my_outputname.def"; then
2518 …compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.d…
2519 …finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname…
2521 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2522 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2526 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2527 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2541 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2542 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2556 win32_fileres=`file -L $1 2>/dev/null`
2562 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2563 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2564 win32_nmres=`eval $NM -f posix -A $1 |
2565 $SED -n -e '
2602 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
2624 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
2635 my_xlib_u=lt$extracted_serial-$my_xlib ;;
2645 *-darwin*)
2654 …darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
2655 if test -n "$darwin_arches"; then
2656 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
2660 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2661 …$LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_arc…
2662 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
2665 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
2668 …darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basenam…
2672 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
2673 $LIPO -create -output "$darwin_file" $darwin_files
2675 $RM -rf unfat-$$
2687 … my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
2703 if test -n "$1" ; then
2710 # $output - temporary wrapper script for $objdir/$outputname
2720 # metacharacters that are still active within double-quoted strings.
2721 Xsed='${SED} -e 1s/^X//'
2725 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2730 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2733 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2738 # The HP-UX ksh and POSIX shell print the target directory to stdout
2755 if test \"X\$1\" = X--no-reexec; then
2756 # Discard the --no-reexec flag, and continue.
2763 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2770 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2774 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2775 while test -n \"\$file\"; do
2776 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2781 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2786 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2787 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2801 if test -n "$1" ; then
2817 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2824 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2829 program=lt-'$outputname'$exeext
2832 if test ! -f \"\$progdir/\$program\" ||
2833 … { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2836 file=\"\$\$-\$program\"
2838 if test ! -d \"\$progdir\"; then
2847 if test -n \"\$relink_command\"; then
2870 if test -f \"\$progdir/\$program\"; then"
2873 …if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath";…
2878 # Some systems cannot cope with colon-terminated $shlibpath_var
2880 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2887 if test -n "$dllsearchpath"; then
2900 *-*-mingw | *-*-os2* | *-cegcc*)
2941 # the $objdir directory. This is a cygwin/mingw-specific
2946 if test -n "$1" ; then
2961 # is running under the msys shell), or in the following cross-
2969 # converts paths for any non-msys applications it launches,
2981 if test -n "$1" ; then
2990 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2992 $SED -e "$lt_sed_naive_backslashify"`
2995 func_to_host_path_tmp1=`cygpath -w "$1"`
2997 $SED -e "$lt_sed_naive_backslashify"`
3000 # Unfortunately, winepath does not exit with a non-zero
3005 # error code of zero AND non-empty stdout, which explains
3007 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3008 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3010 $SED -e "$lt_sed_naive_backslashify"`
3017 if test -z "$func_to_host_path_result" ; then
3052 if test -n "$1" ; then
3063 $SED -e 's|^:*||' -e 's|:*$||'`
3069 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3071 $SED -e "$lt_sed_naive_backslashify"`
3074 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3076 $SED -e "$lt_sed_naive_backslashify"`
3085 if test -n "$func_to_host_pathlist_f" ; then
3087 if test -n "$func_to_host_path_result" ; then
3088 if test -z "$func_to_host_pathlist_result" ; then
3100 if test -z "$func_to_host_pathlist_result" ; then
3104 # Fallback. This may break if $1 contains DOS-style drive
3107 # with winepath so that path translation in the cross-to-mingw
3111 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3136 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
3288 $SED -e 's/\([\\"]\)/\\\1/g' \
3289 -e 's/^/ "/' -e 's/$/\\n"/'
3296 $SED -e 's/\([\\"]\)/\\\1/g' \
3297 -e 's/^/ "/' -e 's/$/\\n"/'
3305 …if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath";…
3316 if test -n "$dllsearchpath"; then
3331 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
3342 #define LTWRAPPER_OPTION_PREFIX "--lt-"
3348 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3351 static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3352 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3355 static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3356 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3359 static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3360 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
3422 /* target_name transforms -- use actual target program name; might have lt- prefix */
3447 /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
3450 /* DO want the lt- prefix here if it exists, so use target_name */
3536 have already dealt with, above (inluding dump-script), then
3540 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3541 or a configure.ac-settable value.
3564 if (rval == -1)
3716 p_len = q - p;
3784 p = tmp_pathspec + strlen (tmp_pathspec) - 1;
3786 p--;
3829 str += len - patlen;
3922 len = strlen (arg) - strlen (*value);
3924 strncpy (*name, arg, len-1);
3925 (*name)[len - 1] = '\0';
4000 /* some systems can't cope with a ':'-terminated path #' */
4002 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
4004 new_value[len-1] = '\0';
4036 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4046 # -no-undefined on the libtool link line when we can be certain
4102 single_module="${wl}-single_module"
4105 # We need to know -static, to get the right output filenames.
4109 -shared)
4115 -all-static | -static | -static-libtool-libs)
4117 -all-static)
4118 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
4121 if test -n "$link_static_flag"; then
4126 -static)
4127 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4132 -static-libtool-libs)
4133 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4147 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
4150 while test "$#" -gt 0; do
4158 if test -n "$prev"; then
4209 test -f "$arg" \
4221 *-*-darwin*)
4238 if test -f "$arg"; then
4245 # A libtool-controlled object.
4255 if test -z "$pic_object" ||
4256 test -z "$non_pic_object" ||
4281 # CHECK ME: I think I busted this. -Ossama
4283 # Preload the old-style object.
4293 # Non-PIC object.
4298 # A standard non-PIC object
4300 if test -z "$pic_object" || test "$pic_object" = none ; then
4310 # Only an error if not doing a dry-run.
4339 release="-$arg"
4346 [\\/]* | [A-Za-z]:[\\/]*) ;;
4348 func_fatal_error "only absolute run-paths are allowed"
4404 fi # test -n "$prev"
4409 -all-static)
4410 if test -n "$link_static_flag"; then
4411 # See comment for -static flag below, for more details.
4418 -allow-undefined)
4420 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
4423 -avoid-version)
4428 -dlopen)
4433 -dlpreopen)
4438 -export-dynamic)
4443 -export-symbols | -export-symbols-regex)
4444 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
4445 func_fatal_error "more than one -exported-symbols argument is not allowed"
4447 if test "X$arg" = "X-export-symbols"; then
4455 -framework)
4460 -inst-prefix-dir)
4465 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
4466 # so, if we see these flags be careful not to treat them like -L
4467 -L[A-Z][A-Z]*:*)
4469 no/*-*-irix* | /*-*-irix*)
4477 -L*)
4478 func_stripname '-L' '' "$arg"
4480 if test -z "$dir"; then
4481 if test "$#" -gt 0; then
4482 func_fatal_error "require no space between \`-L' and \`$1'"
4484 func_fatal_error "need path for \`-L' option"
4489 [\\/]* | [A-Za-z]:[\\/]*) ;;
4492 test -z "$absdir" && \
4498 *" -L$dir "*) ;;
4500 deplibs="$deplibs -L$dir"
4505 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4506 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4522 -l*)
4523 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4525 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
4529 *-*-os2*)
4531 test "X$arg" = "X-lc" && continue
4533 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4535 test "X$arg" = "X-lc" && continue
4537 *-*-rhapsody* | *-*-darwin1.[012])
4542 *-*-sco3.2v5* | *-*-sco5v6*)
4544 test "X$arg" = "X-lc" && continue
4546 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
4548 test "X$arg" = "X-lc" && continue
4551 elif test "X$arg" = "X-lc_r"; then
4553 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4554 # Do not include libc_r directly, use -pthread flag.
4563 -module)
4568 # Tru64 UNIX uses -model [arg] to determine the layout of C++
4570 # Darwin uses the -arch flag to determine output architecture.
4571 -model|-arch|-isysroot)
4579 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4590 -multi_module)
4591 single_module="${wl}-multi_module"
4595 -no-fast-install)
4600 -no-install)
4602 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
4605 func_warning "\`-no-install' is ignored for $host"
4606 func_warning "assuming \`-no-fast-install' instead"
4614 -no-undefined)
4619 -objectlist)
4624 -o) prev=output ;;
4626 -precious-files-regex)
4631 -release)
4636 -rpath)
4641 -R)
4646 -R*)
4647 func_stripname '-R' '' "$arg"
4651 [\\/]* | [A-Za-z]:[\\/]*) ;;
4653 func_fatal_error "only absolute run-paths are allowed"
4663 -shared)
4664 # The effects of -shared are defined in a previous loop.
4668 -shrext)
4673 -static | -static-libtool-libs)
4674 # The effects of -static are defined in a previous loop.
4675 # We used to do the same as -all-static on platforms that
4682 -thread-safe)
4687 -version-info)
4692 -version-number)
4698 -weak)
4703 -Wc,*)
4704 func_stripname '-Wc,' '' "$arg"
4719 -Wl,*)
4720 func_stripname '-Wl,' '' "$arg"
4736 -Xcompiler)
4741 -Xlinker)
4746 -XCClinker)
4751 # -msg_* for osf cc
4752 -msg_*)
4757 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4758 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4759 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4760 # +DA*, +DD* enable 64-bit mode on the HP compiler
4761 # -q* pass through compiler args for the IBM compiler
4762 # -m*, -t[45]*, -txscale* pass through architecture-specific
4764 # -F/path gives path to uninstalled frameworks, gcc on darwin
4765 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4767 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4768 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
4778 -* | +*)
4789 # A libtool-controlled object.
4799 if test -z "$pic_object" ||
4800 test -z "$non_pic_object" ||
4825 # CHECK ME: I think I busted this. -Ossama
4827 # Preload the old-style object.
4837 # Non-PIC object.
4842 # A standard non-PIC object
4844 if test -z "$pic_object" || test "$pic_object" = none ; then
4854 # Only an error if not doing a dry-run.
4879 # A libtool-controlled library.
4882 # This library was specified with -dlopen.
4886 # The library was specified with -dlpreopen.
4905 if test -n "$arg"; then
4911 test -n "$prev" && \
4914 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
4926 if test -n "$shlibpath_var"; then
4928 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
4955 # that are linked more than once (e.g. -la -lb -la)
4987 notinst_deplibs= # not-installed libtool libraries
4988 notinst_path= # paths that contain not-installed libtool libraries
4997 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
5016 # so that -L comes before libs that need it for instance...
5042 # Ignore non-libtool-libs
5051 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
5070 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5085 -l*)
5087 func_warning "\`-l' is ignored for archives/objects"
5090 func_stripname '-l' '' "$deplib"
5101 if test -f "$lib"; then
5154 ;; # -l
5170 -L*)
5176 func_stripname '-L' '' "$deplib"
5190 func_stripname '-L' '' "$deplib"
5194 func_warning "\`-L' is ignored for archives/objects"
5198 ;; # -L
5199 -R*)
5201 func_stripname '-R' '' "$deplib"
5221 # but linking other static libraries is non-portable.
5230 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
5290 if test "$found" = yes || test -f "$lib"; then :
5319 # Convert "-framework foo" to "foo.ltframework"
5320 if test -n "$inherited_linker_flags"; then
5321 …tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\…
5329 …dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g…
5333 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5334 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5340 if test -z "$libdir"; then
5341 if test -z "$old_library"; then
5369 if test -z "$linklib"; then
5373 # This library was specified with -dlopen.
5375 if test -z "$libdir"; then
5376 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
5378 if test -z "$dlname" ||
5394 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
5397 if test -z "$abs_ladir"; then
5409 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5420 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5435 # This library was specified with -dlpreopen.
5437 if test -z "$libdir" && test "$linkmode" = prog; then
5438 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
5442 if test -n "$old_library"; then
5446 test -z "$libdir" && \
5449 elif test -n "$dlname"; then
5456 if test -z "$libdir"; then
5475 if test "$link_all_deplibs" != no || test -z "$library_names" ||
5483 -L*) func_stripname '-L' '' "$deplib"
5506 if test -n "$library_names" &&
5509 test -z "$old_library"; }; then
5511 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5520 # Skip directories that are in the system default run-time
5545 test -n "$library_names"; }; }; then
5556 if test -n "$library_names" &&
5557 { test "$use_static_libs" = no || test -z "$old_library"; }; then
5573 # Warn about portability, can't link against -module's on some
5582 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5594 # Skip directories that are in the system default run-time
5616 if test -n "$old_archive_from_expsyms_cmds"; then
5624 if test -n "$dlname"; then
5626 elif test -n "$soname_spec"; then
5630 func_arith $current - $age
5632 versuffix="-$major"
5645 newlib=libimp-$func_stripname_result.a
5648 if test -f "$output_objdir/$soname-def"; then :
5655 if test -f "$output_objdir/$newlib"; then :; else
5662 fi # test -n "$old_archive_from_expsyms_cmds"
5674 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
5675 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
5676 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
5677 *-*-unixware7*) add_dir="-L$dir" ;;
5678 *-*-darwin* )
5679 # if the lib is a (non-dlopened) module then we can not
5681 if /usr/bin/file -L $add 2> /dev/null |
5685 if test -z "$old_library" ; then
5692 elif test -n "$old_library"; then
5699 *-*-sunos*) add_shlibpath="$dir" ;;
5701 add_dir="-L$dir"
5702 add="-l$name"
5705 add="-l$name"
5715 add_dir="-L$dir"
5717 if test -n "$inst_prefix_dir"; then
5720 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5724 add="-l$name"
5727 add="-l$name"
5739 if test -n "$add_shlibpath"; then
5746 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
5747 test -n "$add" && compile_deplibs="$add $compile_deplibs"
5749 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5750 test -n "$add" && deplibs="$add $deplibs"
5771 add_dir="-L$libdir"
5772 add="-l$name"
5778 add="-l$name"
5780 if test -n "$inst_prefix_dir" &&
5781 test -f "$inst_prefix_dir$libdir/$linklib" ; then
5788 add_dir="-L$libdir"
5790 if test -n "$inst_prefix_dir"; then
5793 add_dir="$add_dir -L$inst_prefix_dir$libdir"
5797 add="-l$name"
5801 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
5802 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
5804 test -n "$add_dir" && deplibs="$add_dir $deplibs"
5805 test -n "$add" && deplibs="$add $deplibs"
5813 test -n "$old_library" && linklib="$old_library"
5817 compile_deplibs="-l$name -L$dir $compile_deplibs"
5818 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
5836 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
5837 if test -z "$global_symbol_pipe"; then
5858 if test -n "$dependency_libs" &&
5862 # Extract -R from dependency_libs
5866 -R*) func_stripname '-R' '' "$libdir"
5897 -L*) path="$deplib" ;;
5903 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
5906 if test -z "$absdir"; then
5914 *-*-darwin*)
5916 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
5917 if test -n "$deplibrary_names" ; then
5921 if test -f "$absdir/$objdir/$depdepl" ; then
5923 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5924 if test -z "$darwin_install_name"; then
5925 … darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
5927 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5928 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
5934 path="-L$absdir/$objdir"
5938 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5939 test -z "$libdir" && \
5944 path="-L$absdir"
5961 …piler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framew…
6001 -L*) new_libs="$deplib $new_libs" ;;
6002 -R*) ;;
6016 # using -Wl,-lname, so that libtool does not consider it
6033 -L*)
6054 if test -n "$i" ; then
6069 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
6070 func_warning "\`-dlopen' is ignored for archives"
6074 *\ -l* | *\ -L*)
6075 func_warning "\`-l' and \`-L' are ignored for archives" ;;
6078 test -n "$rpath" && \
6079 func_warning "\`-rpath' is ignored for archives"
6081 test -n "$xrpath" && \
6082 func_warning "\`-R' is ignored for archives"
6084 test -n "$vinfo" && \
6085 func_warning "\`-version-info/-version-number' is ignored for archives"
6087 test -n "$release" && \
6088 func_warning "\`-release' is ignored for archives"
6090 test -n "$export_symbols$export_symbols_regex" && \
6091 func_warning "\`-export-symbols' is ignored for archives"
6100 # Make sure we only generate libraries of the form `libNAME.la'.
6125 if test -n "$objs"; then
6127 …func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$o…
6130 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
6137 func_warning "\`-dlopen self' is ignored for libtool libraries"
6141 test "$#" -gt 1 && \
6142 func_warning "ignoring multiple \`-rpath's for a libtool library"
6147 if test -z "$rpath"; then
6158 test -n "$vinfo" && \
6159 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
6161 test -n "$release" && \
6162 func_warning "\`-release' is ignored for convenience libraries"
6171 test -n "$7" && \
6172 func_fatal_help "too many parameters to \`-version-info'"
6184 # There are really only two kinds -- those that
6197 freebsd-aout|freebsd-elf|sunos)
6220 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6228 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6236 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6243 if test "$age" -gt "$current"; then
6258 func_arith $current - $age
6264 …xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_cu…
6265 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
6268 freebsd-aout)
6273 freebsd-elf)
6280 func_arith $current - $age
6282 func_arith $current - $age + 1
6294 while test "$loop" -ne 0; do
6295 func_arith $revision - $loop
6297 func_arith $loop - 1
6308 func_arith $current - $age
6314 func_arith $current - $age
6321 while test "$loop" -ne 0; do
6322 func_arith $current - $loop
6324 func_arith $loop - 1
6344 # Use '-' rather than '.', since we only want one
6346 func_arith $current - $age
6348 versuffix="-$major"
6357 if test -z "$vinfo" && test -n "$release"; then
6412 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
6422 test -n "$removelist" && \
6431 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
6436 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6437 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6438 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
6441 if test -n "$xrpath"; then
6445 temp_xrpath="$temp_xrpath -R$libdir"
6477 if test -n "$rpath"; then
6479 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
6482 *-*-rhapsody* | *-*-darwin1.[012])
6486 *-*-netbsd*)
6489 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
6492 *-*-sco3.2v5* | *-*-sco5v6*)
6495 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
6501 deplibs="$deplibs -lc"
6514 # release should show up in the -l (ie -lgmp5) so we don't want to
6540 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
6544 -l*)
6545 func_stripname -l '' "$i"
6555 if test -n "$i" ; then
6560 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6584 -l*)
6585 func_stripname -l '' "$i"
6588 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
6598 if test -n "$i" ; then
6603 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6637 -l*)
6638 func_stripname -l '' "$a_deplib"
6648 if test -n "$a_deplib" ; then
6651 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6654 if ls -lLd "$potent_lib" 2>/dev/null |
6655 $GREP " -> " >/dev/null; then
6664 while test -h "$potlib" 2>/dev/null; do
6665 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
6667 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6668 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
6672 $SED -e 10q |
6681 if test -n "$a_deplib" ; then
6689 if test -z "$potlib" ; then
6698 # Add a -L argument.
6709 -l*)
6710 func_stripname -l '' "$a_deplib"
6720 if test -n "$a_deplib" ; then
6723 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
6725 potlib="$potent_lib" # see symlink-check above in file_magic test
6726 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
6735 if test -n "$a_deplib" ; then
6743 if test -z "$potlib" ; then
6752 # Add a -L argument.
6761 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
6765 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
6768 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6772 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
6774 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
6776 $ECHO "*** All declared inter-library dependencies are being dropped."
6788 *-*-rhapsody* | *-*-darwin1.[012])
6790 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
6797 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
6800 $ECHO "*** application is linked with the -dlopen flag."
6801 if test -z "$global_symbol_pipe"; then
6816 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6818 $ECHO "*** or is declared to -dlopen it."
6824 $ECHO "*** it was explicitly requested with -no-undefined,"
6839 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6841 *-*-darwin*)
6842 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6843 …linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framew…
6844 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6853 *" -L$path/$objdir "*) ;;
6856 *" -L$path/$objdir "*)
6857 new_libs="$new_libs -L$path/$objdir" ;;
6864 -L*)
6875 # All the library-specific variables (install_libdir is set above).
6889 if test -n "$hardcode_libdir_flag_spec"; then
6890 if test -n "$hardcode_libdir_separator"; then
6891 if test -z "$hardcode_libdirs"; then
6907 elif test -n "$runpath_var"; then
6915 if test -n "$hardcode_libdir_separator" &&
6916 test -n "$hardcode_libdirs"; then
6918 if test -n "$hardcode_libdir_flag_spec_ld"; then
6924 if test -n "$runpath_var" && test -n "$perm_rpath"; then
6932 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
6937 if test -n "$shlibpath"; then
6949 if test -n "$soname_spec"; then
6954 if test -z "$dlname"; then
6966 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
6970 if test -n "$export_symbols" && test -n "$include_expsyms"; then
6979 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
6997 if test -z "$export_symbols"; then
6998 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
7009 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7022 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
7023 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7029 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7031 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7035 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
7043 …$opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $outp…
7046 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7060 if test -n "$convenience"; then
7061 if test -n "$whole_archive_flag_spec" &&
7063 test -z "$libobjs"; then
7068 if test -n "$whole_archive_flag_spec"; then
7082 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7093 if test "$module" = yes && test -n "$module_cmds" ; then
7094 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7102 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7114 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7129 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
7133 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
7143 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
7153 …elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; t…
7171 if test -n "$save_libobjs"; then
7173 output=$output_objdir/$output_la-${k}.$objext
7186 test "$len" -lt "$max_cmd_len"; then
7191 if test "$k" -eq 1 ; then
7199 last_robj=$output_objdir/$output_la-${k}.$objext
7202 output=$output_objdir/$output_la-${k}.$objext
7212 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7214 if test -n "$last_robj"; then
7223 if ${skipped_export-false}; then
7229 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7231 if test -n "$last_robj"; then
7236 test -n "$save_libobjs" &&
7262 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
7263 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7268 if ${skipped_export-false}; then
7269 if test -n "$export_symbols" && test -n "$include_expsyms"; then
7271 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7275 if test -n "$orig_export_symbols"; then
7283 …$opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $outp…
7286 … $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
7294 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
7302 if test "$module" = yes && test -n "$module_cmds" ; then
7303 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7309 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7317 if test -n "$delfiles"; then
7323 if test -n "$dlprefiles"; then
7359 if test -n "$convenience"; then
7360 if test -z "$whole_archive_flag_spec"; then
7375 # If -module or -export-dynamic was specified, set the dlname.
7384 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7385 func_warning "\`-dlopen' is ignored for objects"
7389 *\ -l* | *\ -L*)
7390 func_warning "\`-l' and \`-L' are ignored for objects" ;;
7393 test -n "$rpath" && \
7394 func_warning "\`-rpath' is ignored for objects"
7396 test -n "$xrpath" && \
7397 func_warning "\`-R' is ignored for objects"
7399 test -n "$vinfo" && \
7400 func_warning "\`-version-info' is ignored for objects"
7402 test -n "$release" && \
7403 func_warning "\`-release' is ignored for objects"
7407 test -n "$objs$old_deplibs" && \
7408 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
7424 # single-version convenience libraries. Whenever we create
7425 # different ones for PIC/non-PIC, this we'll have to duplicate
7430 # -Wl from whole_archive_flag_spec and hope we can get by with
7434 if test -n "$convenience"; then
7435 if test -n "$whole_archive_flag_spec"; then
7437 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
7447 # Create the old-style object.
7448 …="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e …
7454 if test -z "$libobj"; then
7455 if test -n "$gentop"; then
7463 if test -n "$gentop"; then
7474 if test -n "$pic_flag" || test "$pic_mode" != default; then
7481 if test -n "$gentop"; then
7493 test -n "$vinfo" && \
7494 func_warning "\`-version-info' is ignored for programs"
7496 test -n "$release" && \
7497 func_warning "\`-release' is ignored for programs"
7506 *-*-rhapsody* | *-*-darwin1.[012])
7508 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7509 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7514 *-*-darwin*)
7518 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
7520 compile_command="$compile_command ${wl}-bind_at_load"
7521 finalize_command="$finalize_command ${wl}-bind_at_load"
7525 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7526 …compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g…
7527 …finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1…
7537 *" -L$path/$objdir "*) ;;
7540 *" -L$path/$objdir "*)
7541 new_libs="$new_libs -L$path/$objdir" ;;
7548 -L*)
7563 if test -n "$rpath$xrpath"; then
7566 # This is the magic to use -rpath.
7578 if test -n "$hardcode_libdir_flag_spec"; then
7579 if test -n "$hardcode_libdir_separator"; then
7580 if test -z "$hardcode_libdirs"; then
7596 elif test -n "$runpath_var"; then
7603 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
7604 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
7619 if test -n "$hardcode_libdir_separator" &&
7620 test -n "$hardcode_libdirs"; then
7629 if test -n "$hardcode_libdir_flag_spec"; then
7630 if test -n "$hardcode_libdir_separator"; then
7631 if test -z "$hardcode_libdirs"; then
7647 elif test -n "$runpath_var"; then
7655 if test -n "$hardcode_libdir_separator" &&
7656 test -n "$hardcode_libdirs"; then
7662 if test -n "$libobjs" && test "$build_old_libs" = yes; then
7664 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7665 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7671 if test -n "$prelink_cmds"; then
7694 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7702 if test -f "$output_objdir/${outputname}S.${objext}"; then
7709 if test -n "$compile_shlibpath$finalize_shlibpath"; then
7712 if test -n "$finalize_shlibpath"; then
7718 if test -n "$runpath_var"; then
7719 if test -n "$perm_rpath"; then
7727 if test -n "$finalize_perm_rpath"; then
7741 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7760 …relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progd…
7772 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
7775 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
7783 if test -n "$relink_command"; then
7786 if eval test -z \"\${$var+set}\"; then
7787 …relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relin…
7788 elif eval var_value=\$$var; test -z "$var_value"; then
7796 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7800 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7802 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7803 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7805 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7807 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
7831 cwrappersource="$output_path/$objdir/lt-$output_name.c"
7839 # because it contains $host paths and files. If cross-
7843 $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
7854 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
7873 # See if we need to build an old-fashioned archive.
7886 if test "$preload" = yes && test -f "$symfileobj"; then
7893 if test -n "$addlibs"; then
7902 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
7907 if test -n "$dlprefiles"; then
7925 done | sort | sort -uc >/dev/null 2>&1); then
7945 newobj=lt$counter-$objbase
7950 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
7964 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7990 if test "$len" -lt "$max_cmd_len"; then
7998 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
8016 test -n "$generated" && \
8028 if eval test -z \"\${$var+set}\"; then
8029 …relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relin…
8030 elif eval var_value=\$$var; test -z "$var_value"; then
8038 …relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefi…
8039 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8048 if test -z "$install_libdir"; then
8059 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8060 test -z "$libdir" && \
8075 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8076 test -z "$libdir" && \
8088 # Only pass preopened files to the pseudo-archive (for
8094 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8095 test -z "$libdir" && \
8106 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8115 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8129 # $outputname - a libtool library file
8161 # Should we warn about portability when linking against -modules?
8205 -f) RM="$RM $arg"; rmforce=yes ;;
8206 -*) RM="$RM $arg" ;;
8211 test -z "$RM" && \
8237 # Don't error if the file doesn't exist and rm -f was used.
8238 if { test -L "$file"; } >/dev/null 2>&1 ||
8239 { test -h "$file"; } >/dev/null 2>&1 ||
8240 test -f "$file"; then
8242 elif test -d "$file"; then
8261 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8270 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8273 if test -n "$library_names"; then
8278 if test -n "$old_library"; then
8296 if test -n "$pic_object" &&
8301 # Add non-PIC object to the list of files to remove.
8302 if test -n "$non_pic_object" &&
8338 if test "$fast_install" = yes && test -n "$relink_command"; then
8339 rmfiles="$rmfiles $objdir/lt-$name"
8342 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
8354 if test -d "$dir"; then
8365 test -z "$mode" && {
8370 test -z "$exec_cmd" && \
8373 if test -n "$exec_cmd"; then
8388 # time on that platform, so we default to a shared-only configuration.
8389 # If a disable-shared tag is given, we'll fallback to a static-only
8390 # configuration. But we'll never go from static-only to shared-only.
8392 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
8395 # ### END LIBTOOL TAG CONFIG: disable-shared
8397 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
8399 # ### END LIBTOOL TAG CONFIG: disable-static
8402 # mode:shell-script
8403 # sh-indentation:2