diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2009-12-05 17:18:53 +0000 |
---|---|---|
committer | Ralf Wildenhues <rwild@gcc.gnu.org> | 2009-12-05 17:18:53 +0000 |
commit | 43e02a8a712eb5868cc992e7c2413a16ae72e037 (patch) | |
tree | 8aa6890d492a59829495083b77316672c136a26b /ltmain.sh | |
parent | thumb2.md (thumb2_mulsi_short_compare0): Use a low-register for the scratch. (diff) | |
download | gcc-43e02a8a712eb5868cc992e7c2413a16ae72e037.tar.gz gcc-43e02a8a712eb5868cc992e7c2413a16ae72e037.tar.bz2 gcc-43e02a8a712eb5868cc992e7c2413a16ae72e037.tar.xz |
Sync from git Libtool and regenerate.
/:
PR target/38384
PR bootstrap/40972
* libtool.m4: Sync from git Libtool.
* ltoptions.m4: Likewise.
* ltversion.m4: Likewise.
* lt~obsolete.m4: Likewise.
* ltmain.sh: Likewise.
boehm-gc/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* include/Makefile.in: Regenerate.
fixincludes/:
* configure: Regenerate.
gcc/:
* configure: Regenerate.
libffi/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* include/Makefile.in: Regenerate.
* man/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
libgfortran/:
* Makefile.in: Regenerate.
* configure: Regenerate.
libgomp/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* testsuite/Makefile.in: Regenerate.
libjava/classpath/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
* doc/api/Makefile.in: Regenerate.
* examples/Makefile.in: Regenerate.
* external/Makefile.in: Regenerate.
* external/jsr166/Makefile.in: Regenerate.
* external/relaxngDatatype/Makefile.in: Regenerate.
* external/sax/Makefile.in: Regenerate.
* external/w3c_dom/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* lib/Makefile.in: Regenerate.
* native/Makefile.in: Regenerate.
* native/fdlibm/Makefile.in: Regenerate.
* native/jawt/Makefile.in: Regenerate.
* native/jni/Makefile.in: Regenerate.
* native/jni/classpath/Makefile.in: Regenerate.
* native/jni/gconf-peer/Makefile.in: Regenerate.
* native/jni/gstreamer-peer/Makefile.in: Regenerate.
* native/jni/gtk-peer/Makefile.in: Regenerate.
* native/jni/java-io/Makefile.in: Regenerate.
* native/jni/java-lang/Makefile.in: Regenerate.
* native/jni/java-math/Makefile.in: Regenerate.
* native/jni/java-net/Makefile.in: Regenerate.
* native/jni/java-nio/Makefile.in: Regenerate.
* native/jni/java-util/Makefile.in: Regenerate.
* native/jni/midi-alsa/Makefile.in: Regenerate.
* native/jni/midi-dssi/Makefile.in: Regenerate.
* native/jni/native-lib/Makefile.in: Regenerate.
* native/jni/qt-peer/Makefile.in: Regenerate.
* native/jni/xmlj/Makefile.in: Regenerate.
* native/plugin/Makefile.in: Regenerate.
* resource/Makefile.in: Regenerate.
* scripts/Makefile.in: Regenerate.
* tools/Makefile.in: Regenerate.
libjava/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* gcj/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
libmudflap/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* testsuite/Makefile.in: Regenerate.
libobjc/:
* configure: Regenerate.
libssp/:
* Makefile.in: Regenerate.
* configure: Regenerate.
libstdc++-v3/:
* Makefile.in: Regenerate.
* configure: Regenerate.
* doc/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
lto-plugin/:
* configure: Regenerate.
* Makefile.in: Regenerate.
zlib/:
* Makefile.in: Regenerate.
* configure: Regenerate.
From-SVN: r155012
Diffstat (limited to 'ltmain.sh')
-rw-r--r-- | ltmain.sh | 1393 |
1 files changed, 724 insertions, 669 deletions
@@ -1,9 +1,10 @@ | |||
1 | # Generated from ltmain.m4sh. | 1 | # Generated from ltmain.m4sh. |
2 | 2 | ||
3 | # ltmain.sh (GNU libtool) 2.2.6 | 3 | # libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a |
4 | # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | 4 | # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
5 | 5 | ||
6 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. | 6 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, |
7 | # 2007, 2008, 2009 Free Software Foundation, Inc. | ||
7 | # This is free software; see the source for copying conditions. There is NO | 8 | # 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. | 9 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
9 | 10 | ||
@@ -32,50 +33,55 @@ | |||
32 | # | 33 | # |
33 | # Provide generalized library-building support services. | 34 | # Provide generalized library-building support services. |
34 | # | 35 | # |
35 | # --config show all configuration variables | 36 | # --config show all configuration variables |
36 | # --debug enable verbose shell tracing | 37 | # --debug enable verbose shell tracing |
37 | # -n, --dry-run display commands without modifying any files | 38 | # -n, --dry-run display commands without modifying any files |
38 | # --features display basic configuration information and exit | 39 | # --features display basic configuration information and exit |
39 | # --mode=MODE use operation mode MODE | 40 | # --mode=MODE use operation mode MODE |
40 | # --preserve-dup-deps don't remove duplicate dependency libraries | 41 | # --no-finish let install mode avoid finish commands |
41 | # --quiet, --silent don't print informational messages | 42 | # --preserve-dup-deps don't remove duplicate dependency libraries |
42 | # --tag=TAG use configuration variables from tag TAG | 43 | # --quiet, --silent don't print informational messages |
43 | # -v, --verbose print informational messages (default) | 44 | # --no-quiet, --no-silent |
44 | # --version print version information | 45 | # print informational messages (default) |
45 | # -h, --help print short or long help message | 46 | # --tag=TAG use configuration variables from tag TAG |
47 | # -v, --verbose print more informational messages than default | ||
48 | # --no-verbose don't print the extra informational messages | ||
49 | # --version print version information | ||
50 | # -h, --help, --help-all print short, long, or detailed help message | ||
46 | # | 51 | # |
47 | # MODE must be one of the following: | 52 | # MODE must be one of the following: |
48 | # | 53 | # |
49 | # clean remove files from the build directory | 54 | # clean remove files from the build directory |
50 | # compile compile a source file into a libtool object | 55 | # compile compile a source file into a libtool object |
51 | # execute automatically set library path, then run a program | 56 | # execute automatically set library path, then run a program |
52 | # finish complete the installation of libtool libraries | 57 | # finish complete the installation of libtool libraries |
53 | # install install libraries or executables | 58 | # install install libraries or executables |
54 | # link create a library or an executable | 59 | # link create a library or an executable |
55 | # uninstall remove libraries from an installed directory | 60 | # uninstall remove libraries from an installed directory |
56 | # | 61 | # |
57 | # MODE-ARGS vary depending on the MODE. | 62 | # MODE-ARGS vary depending on the MODE. When passed as first option, |
63 | # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. | ||
58 | # Try `$progname --help --mode=MODE' for a more detailed description of MODE. | 64 | # Try `$progname --help --mode=MODE' for a more detailed description of MODE. |
59 | # | 65 | # |
60 | # When reporting a bug, please describe a test case to reproduce it and | 66 | # When reporting a bug, please describe a test case to reproduce it and |
61 | # include the following information: | 67 | # include the following information: |
62 | # | 68 | # |
63 | # host-triplet: $host | 69 | # host-triplet: $host |
64 | # shell: $SHELL | 70 | # shell: $SHELL |
65 | # compiler: $LTCC | 71 | # compiler: $LTCC |
66 | # compiler flags: $LTCFLAGS | 72 | # compiler flags: $LTCFLAGS |
67 | # linker: $LD (gnu? $with_gnu_ld) | 73 | # linker: $LD (gnu? $with_gnu_ld) |
68 | # $progname: (GNU libtool) 2.2.6 | 74 | # $progname: (GNU libtool 1.3134 2009-11-29) 2.2.7a |
69 | # automake: $automake_version | 75 | # automake: $automake_version |
70 | # autoconf: $autoconf_version | 76 | # autoconf: $autoconf_version |
71 | # | 77 | # |
72 | # Report bugs to <bug-libtool@gnu.org>. | 78 | # Report bugs to <bug-libtool@gnu.org>. |
73 | 79 | ||
74 | PROGRAM=ltmain.sh | 80 | PROGRAM=libtool |
75 | PACKAGE=libtool | 81 | PACKAGE=libtool |
76 | VERSION=2.2.6 | 82 | VERSION=2.2.7a |
77 | TIMESTAMP="" | 83 | TIMESTAMP=" 1.3134 2009-11-29" |
78 | package_revision=1.3012 | 84 | package_revision=1.3134 |
79 | 85 | ||
80 | # Be Bourne compatible | 86 | # Be Bourne compatible |
81 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | 87 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then |
@@ -91,6 +97,14 @@ fi | |||
91 | BIN_SH=xpg4; export BIN_SH # for Tru64 | 97 | BIN_SH=xpg4; export BIN_SH # for Tru64 |
92 | DUALCASE=1; export DUALCASE # for MKS sh | 98 | DUALCASE=1; export DUALCASE # for MKS sh |
93 | 99 | ||
100 | # A function that is used when there is no print builtin or printf. | ||
101 | func_fallback_echo () | ||
102 | { | ||
103 | eval 'cat <<_LTECHO_EOF | ||
104 | $1 | ||
105 | _LTECHO_EOF' | ||
106 | } | ||
107 | |||
94 | # NLS nuisances: We save the old values to restore during execute mode. | 108 | # NLS nuisances: We save the old values to restore during execute mode. |
95 | # Only set LANG and LC_ALL to C if already set. | 109 | # Only set LANG and LC_ALL to C if already set. |
96 | # These must not be set unconditionally because not all systems understand | 110 | # These must not be set unconditionally because not all systems understand |
@@ -114,17 +128,28 @@ $lt_unset CDPATH | |||
114 | 128 | ||
115 | 129 | ||
116 | 130 | ||
131 | |||
132 | |||
133 | # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh | ||
134 | # is ksh but when the shell is invoked as "sh" and the current value of | ||
135 | # the _XPG environment variable is not equal to 1 (one), the special | ||
136 | # positional parameter $0, within a function call, is the name of the | ||
137 | # function. | ||
138 | progpath="$0" | ||
139 | |||
140 | |||
141 | |||
117 | : ${CP="cp -f"} | 142 | : ${CP="cp -f"} |
118 | : ${ECHO="echo"} | 143 | : ${ECHO=$as_echo} |
119 | : ${EGREP="/usr/bin/grep -E"} | 144 | : ${EGREP="/bin/grep -E"} |
120 | : ${FGREP="/usr/bin/grep -F"} | 145 | : ${FGREP="/bin/grep -F"} |
121 | : ${GREP="/usr/bin/grep"} | 146 | : ${GREP="/bin/grep"} |
122 | : ${LN_S="ln -s"} | 147 | : ${LN_S="ln -s"} |
123 | : ${MAKE="make"} | 148 | : ${MAKE="make"} |
124 | : ${MKDIR="mkdir"} | 149 | : ${MKDIR="mkdir"} |
125 | : ${MV="mv -f"} | 150 | : ${MV="mv -f"} |
126 | : ${RM="rm -f"} | 151 | : ${RM="rm -f"} |
127 | : ${SED="/opt/local/bin/gsed"} | 152 | : ${SED="/mount/endor/wildenhu/local-x86_64/bin/sed"} |
128 | : ${SHELL="${CONFIG_SHELL-/bin/sh}"} | 153 | : ${SHELL="${CONFIG_SHELL-/bin/sh}"} |
129 | : ${Xsed="$SED -e 1s/^X//"} | 154 | : ${Xsed="$SED -e 1s/^X//"} |
130 | 155 | ||
@@ -159,23 +184,26 @@ basename="s,^.*/,," | |||
159 | func_dirname_and_basename () | 184 | func_dirname_and_basename () |
160 | { | 185 | { |
161 | # Extract subdirectory from the argument. | 186 | # Extract subdirectory from the argument. |
162 | func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` | 187 | func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` |
163 | if test "X$func_dirname_result" = "X${1}"; then | 188 | if test "X$func_dirname_result" = "X${1}"; then |
164 | func_dirname_result="${3}" | 189 | func_dirname_result="${3}" |
165 | else | 190 | else |
166 | func_dirname_result="$func_dirname_result${2}" | 191 | func_dirname_result="$func_dirname_result${2}" |
167 | fi | 192 | fi |
168 | func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` | 193 | func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` |
169 | } | 194 | } |
170 | 195 | ||
171 | # Generated shell functions inserted here. | 196 | # Generated shell functions inserted here. |
172 | 197 | ||
173 | # These SED scripts presuppose an absolute path with a trailing slash. | 198 | # These SED scripts presuppose an absolute path with a trailing slash. |
174 | pathcar="s,^/\([^/]*\).*$,\1," | 199 | pathcar='s,^/\([^/]*\).*$,\1,' |
175 | pathcdr="s,^/[^/]*,," | 200 | pathcdr='s,^/[^/]*,,' |
176 | removedotparts="s@/\(\./\)\{1,\}@/@g;s,/\.$,/," | 201 | removedotparts=':dotsl |
177 | collapseslashes="s@/\{1,\}@/@g" | 202 | s@/\./@/@g |
178 | finalslash="s,/*$,/," | 203 | t dotsl |
204 | s,/\.$,/,' | ||
205 | collapseslashes='s@/\{1,\}@/@g' | ||
206 | finalslash='s,/*$,/,' | ||
179 | 207 | ||
180 | # func_normal_abspath PATH | 208 | # func_normal_abspath PATH |
181 | # Remove doubled-up and trailing slashes, "." path components, | 209 | # Remove doubled-up and trailing slashes, "." path components, |
@@ -315,21 +343,9 @@ func_relative_path () | |||
315 | fi | 343 | fi |
316 | } | 344 | } |
317 | 345 | ||
318 | # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh | ||
319 | # is ksh but when the shell is invoked as "sh" and the current value of | ||
320 | # the _XPG environment variable is not equal to 1 (one), the special | ||
321 | # positional parameter $0, within a function call, is the name of the | ||
322 | # function. | ||
323 | progpath="$0" | ||
324 | |||
325 | # The name of this program: | 346 | # The name of this program: |
326 | # In the unlikely event $progname began with a '-', it would play havoc with | ||
327 | # func_echo (imagine progname=-n), so we prepend ./ in that case: | ||
328 | func_dirname_and_basename "$progpath" | 347 | func_dirname_and_basename "$progpath" |
329 | progname=$func_basename_result | 348 | progname=$func_basename_result |
330 | case $progname in | ||
331 | -*) progname=./$progname ;; | ||
332 | esac | ||
333 | 349 | ||
334 | # Make sure we have an absolute path for reexecution: | 350 | # Make sure we have an absolute path for reexecution: |
335 | case $progpath in | 351 | case $progpath in |
@@ -403,6 +419,13 @@ func_verbose () | |||
403 | : | 419 | : |
404 | } | 420 | } |
405 | 421 | ||
422 | # func_echo_all arg... | ||
423 | # Invoke $ECHO with all args, space-separated. | ||
424 | func_echo_all () | ||
425 | { | ||
426 | $ECHO "$*" | ||
427 | } | ||
428 | |||
406 | # func_error arg... | 429 | # func_error arg... |
407 | # Echo program name prefixed message to standard error. | 430 | # Echo program name prefixed message to standard error. |
408 | func_error () | 431 | func_error () |
@@ -471,9 +494,9 @@ func_mkdir_p () | |||
471 | case $my_directory_path in */*) ;; *) break ;; esac | 494 | case $my_directory_path in */*) ;; *) break ;; esac |
472 | 495 | ||
473 | # ...otherwise throw away the child directory and loop | 496 | # ...otherwise throw away the child directory and loop |
474 | my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` | 497 | my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` |
475 | done | 498 | done |
476 | my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` | 499 | my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` |
477 | 500 | ||
478 | save_mkdir_p_IFS="$IFS"; IFS=':' | 501 | save_mkdir_p_IFS="$IFS"; IFS=':' |
479 | for my_dir in $my_dir_list; do | 502 | for my_dir in $my_dir_list; do |
@@ -523,7 +546,7 @@ func_mktempdir () | |||
523 | func_fatal_error "cannot create temporary directory \`$my_tmpdir'" | 546 | func_fatal_error "cannot create temporary directory \`$my_tmpdir'" |
524 | fi | 547 | fi |
525 | 548 | ||
526 | $ECHO "X$my_tmpdir" | $Xsed | 549 | $ECHO "$my_tmpdir" |
527 | } | 550 | } |
528 | 551 | ||
529 | 552 | ||
@@ -537,7 +560,7 @@ func_quote_for_eval () | |||
537 | { | 560 | { |
538 | case $1 in | 561 | case $1 in |
539 | *[\\\`\"\$]*) | 562 | *[\\\`\"\$]*) |
540 | func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; | 563 | func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; |
541 | *) | 564 | *) |
542 | func_quote_for_eval_unquoted_result="$1" ;; | 565 | func_quote_for_eval_unquoted_result="$1" ;; |
543 | esac | 566 | esac |
@@ -564,7 +587,7 @@ func_quote_for_expand () | |||
564 | { | 587 | { |
565 | case $1 in | 588 | case $1 in |
566 | *[\\\`\"]*) | 589 | *[\\\`\"]*) |
567 | my_arg=`$ECHO "X$1" | $Xsed \ | 590 | my_arg=`$ECHO "$1" | $SED \ |
568 | -e "$double_quote_subst" -e "$sed_double_backslash"` ;; | 591 | -e "$double_quote_subst" -e "$sed_double_backslash"` ;; |
569 | *) | 592 | *) |
570 | my_arg="$1" ;; | 593 | my_arg="$1" ;; |
@@ -641,7 +664,15 @@ func_show_eval_locale () | |||
641 | # Echo version message to standard output and exit. | 664 | # Echo version message to standard output and exit. |
642 | func_version () | 665 | func_version () |
643 | { | 666 | { |
644 | $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { | 667 | $SED -n '/(C)/!b go |
668 | :more | ||
669 | /\./!{ | ||
670 | N | ||
671 | s/\n# // | ||
672 | b more | ||
673 | } | ||
674 | :go | ||
675 | /^# '$PROGRAM' (GNU /,/# warranty; / { | ||
645 | s/^# // | 676 | s/^# // |
646 | s/^# *$// | 677 | s/^# *$// |
647 | s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ | 678 | s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ |
@@ -654,19 +685,20 @@ func_version () | |||
654 | # Echo short help message to standard output and exit. | 685 | # Echo short help message to standard output and exit. |
655 | func_usage () | 686 | func_usage () |
656 | { | 687 | { |
657 | $SED -n '/^# Usage:/,/# -h/ { | 688 | $SED -n '/^# Usage:/,/^# *-h/ { |
658 | s/^# // | 689 | s/^# // |
659 | s/^# *$// | 690 | s/^# *$// |
660 | s/\$progname/'$progname'/ | 691 | s/\$progname/'$progname'/ |
661 | p | 692 | p |
662 | }' < "$progpath" | 693 | }' < "$progpath" |
663 | $ECHO | 694 | echo |
664 | $ECHO "run \`$progname --help | more' for full usage" | 695 | $ECHO "run \`$progname --help | more' for full usage" |
665 | exit $? | 696 | exit $? |
666 | } | 697 | } |
667 | 698 | ||
668 | # func_help | 699 | # func_help [NOEXIT] |
669 | # Echo long help message to standard output and exit. | 700 | # Echo long help message to standard output and exit, |
701 | # unless 'noexit' is passed as argument. | ||
670 | func_help () | 702 | func_help () |
671 | { | 703 | { |
672 | $SED -n '/^# Usage:/,/# Report bugs to/ { | 704 | $SED -n '/^# Usage:/,/# Report bugs to/ { |
@@ -683,7 +715,10 @@ func_help () | |||
683 | s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ | 715 | s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ |
684 | p | 716 | p |
685 | }' < "$progpath" | 717 | }' < "$progpath" |
686 | exit $? | 718 | ret=$? |
719 | if test -z "$1"; then | ||
720 | exit $ret | ||
721 | fi | ||
687 | } | 722 | } |
688 | 723 | ||
689 | # func_missing_arg argname | 724 | # func_missing_arg argname |
@@ -701,29 +736,6 @@ exit_cmd=: | |||
701 | 736 | ||
702 | 737 | ||
703 | 738 | ||
704 | # Check that we have a working $ECHO. | ||
705 | if test "X$1" = X--no-reexec; then | ||
706 | # Discard the --no-reexec flag, and continue. | ||
707 | shift | ||
708 | elif test "X$1" = X--fallback-echo; then | ||
709 | # Avoid inline document here, it may be left over | ||
710 | : | ||
711 | elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then | ||
712 | # Yippee, $ECHO works! | ||
713 | : | ||
714 | else | ||
715 | # Restart under the correct shell, and then maybe $ECHO will work. | ||
716 | exec $SHELL "$progpath" --no-reexec ${1+"$@"} | ||
717 | fi | ||
718 | |||
719 | if test "X$1" = X--fallback-echo; then | ||
720 | # used as fallback echo | ||
721 | shift | ||
722 | cat <<EOF | ||
723 | $* | ||
724 | EOF | ||
725 | exit $EXIT_SUCCESS | ||
726 | fi | ||
727 | 739 | ||
728 | magic="%%%MAGIC variable%%%" | 740 | magic="%%%MAGIC variable%%%" |
729 | magic_exe="%%%MAGIC EXE variable%%%" | 741 | magic_exe="%%%MAGIC EXE variable%%%" |
@@ -739,6 +751,7 @@ extracted_archives= | |||
739 | extracted_serial=0 | 751 | extracted_serial=0 |
740 | 752 | ||
741 | opt_dry_run=false | 753 | opt_dry_run=false |
754 | opt_finish=: | ||
742 | opt_duplicate_deps=false | 755 | opt_duplicate_deps=false |
743 | opt_silent=false | 756 | opt_silent=false |
744 | opt_debug=: | 757 | opt_debug=: |
@@ -781,16 +794,16 @@ func_config () | |||
781 | # Display the features supported by this script. | 794 | # Display the features supported by this script. |
782 | func_features () | 795 | func_features () |
783 | { | 796 | { |
784 | $ECHO "host: $host" | 797 | echo "host: $host" |
785 | if test "$build_libtool_libs" = yes; then | 798 | if test "$build_libtool_libs" = yes; then |
786 | $ECHO "enable shared libraries" | 799 | echo "enable shared libraries" |
787 | else | 800 | else |
788 | $ECHO "disable shared libraries" | 801 | echo "disable shared libraries" |
789 | fi | 802 | fi |
790 | if test "$build_old_libs" = yes; then | 803 | if test "$build_old_libs" = yes; then |
791 | $ECHO "enable static libraries" | 804 | echo "enable static libraries" |
792 | else | 805 | else |
793 | $ECHO "disable static libraries" | 806 | echo "disable static libraries" |
794 | fi | 807 | fi |
795 | 808 | ||
796 | exit $? | 809 | exit $? |
@@ -888,6 +901,7 @@ func_enable_tag () | |||
888 | --dry-run | -n) opt_dry_run=: ;; | 901 | --dry-run | -n) opt_dry_run=: ;; |
889 | --features) func_features ;; | 902 | --features) func_features ;; |
890 | --finish) mode="finish" ;; | 903 | --finish) mode="finish" ;; |
904 | --no-finish) opt_finish=false ;; | ||
891 | 905 | ||
892 | --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break | 906 | --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break |
893 | case $1 in | 907 | case $1 in |
@@ -917,10 +931,21 @@ func_enable_tag () | |||
917 | 931 | ||
918 | --quiet|--silent) preserve_args="$preserve_args $opt" | 932 | --quiet|--silent) preserve_args="$preserve_args $opt" |
919 | opt_silent=: | 933 | opt_silent=: |
934 | opt_verbose=false | ||
935 | ;; | ||
936 | |||
937 | --no-quiet|--no-silent) | ||
938 | preserve_args="$preserve_args $opt" | ||
939 | opt_silent=false | ||
920 | ;; | 940 | ;; |
921 | 941 | ||
922 | --verbose| -v) preserve_args="$preserve_args $opt" | 942 | --verbose| -v) preserve_args="$preserve_args $opt" |
923 | opt_silent=false | 943 | opt_silent=false |
944 | opt_verbose=: | ||
945 | ;; | ||
946 | |||
947 | --no-verbose) preserve_args="$preserve_args $opt" | ||
948 | opt_verbose=false | ||
924 | ;; | 949 | ;; |
925 | 950 | ||
926 | --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break | 951 | --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break |
@@ -938,6 +963,7 @@ func_enable_tag () | |||
938 | 963 | ||
939 | -\?|-h) func_usage ;; | 964 | -\?|-h) func_usage ;; |
940 | --help) opt_help=: ;; | 965 | --help) opt_help=: ;; |
966 | --help-all) opt_help=': help-all' ;; | ||
941 | --version) func_version ;; | 967 | --version) func_version ;; |
942 | 968 | ||
943 | -*) func_fatal_help "unrecognized option \`$opt'" ;; | 969 | -*) func_fatal_help "unrecognized option \`$opt'" ;; |
@@ -1016,7 +1042,7 @@ $opt_help || { | |||
1016 | 1042 | ||
1017 | 1043 | ||
1018 | # Darwin sucks | 1044 | # Darwin sucks |
1019 | eval std_shrext=\"$shrext_cmds\" | 1045 | eval "std_shrext=\"$shrext_cmds\"" |
1020 | 1046 | ||
1021 | 1047 | ||
1022 | # Only execute mode is allowed to have -dlopen flags. | 1048 | # Only execute mode is allowed to have -dlopen flags. |
@@ -1123,7 +1149,7 @@ func_execute_cmds () | |||
1123 | save_ifs=$IFS; IFS='~' | 1149 | save_ifs=$IFS; IFS='~' |
1124 | for cmd in $1; do | 1150 | for cmd in $1; do |
1125 | IFS=$save_ifs | 1151 | IFS=$save_ifs |
1126 | eval cmd=\"$cmd\" | 1152 | eval "cmd=\"$cmd\"" |
1127 | func_show_eval "$cmd" "${2-:}" | 1153 | func_show_eval "$cmd" "${2-:}" |
1128 | done | 1154 | done |
1129 | IFS=$save_ifs | 1155 | IFS=$save_ifs |
@@ -1161,10 +1187,13 @@ func_infer_tag () | |||
1161 | func_quote_for_eval "$arg" | 1187 | func_quote_for_eval "$arg" |
1162 | CC_quoted="$CC_quoted $func_quote_for_eval_result" | 1188 | CC_quoted="$CC_quoted $func_quote_for_eval_result" |
1163 | done | 1189 | done |
1190 | CC_expanded=`func_echo_all $CC` | ||
1191 | CC_quoted_expanded=`func_echo_all $CC_quoted` | ||
1164 | case $@ in | 1192 | case $@ in |
1165 | # Blanks in the command may have been stripped by the calling shell, | 1193 | # Blanks in the command may have been stripped by the calling shell, |
1166 | # but not from the CC environment variable when configure was run. | 1194 | # but not from the CC environment variable when configure was run. |
1167 | " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; | 1195 | " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ |
1196 | " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; | ||
1168 | # Blanks at the start of $base_compile will cause this to fail | 1197 | # Blanks at the start of $base_compile will cause this to fail |
1169 | # if we don't check for them as well. | 1198 | # if we don't check for them as well. |
1170 | *) | 1199 | *) |
@@ -1178,8 +1207,11 @@ func_infer_tag () | |||
1178 | func_quote_for_eval "$arg" | 1207 | func_quote_for_eval "$arg" |
1179 | CC_quoted="$CC_quoted $func_quote_for_eval_result" | 1208 | CC_quoted="$CC_quoted $func_quote_for_eval_result" |
1180 | done | 1209 | done |
1210 | CC_expanded=`func_echo_all $CC` | ||
1211 | CC_quoted_expanded=`func_echo_all $CC_quoted` | ||
1181 | case "$@ " in | 1212 | case "$@ " in |
1182 | " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) | 1213 | " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ |
1214 | " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) | ||
1183 | # The compiler in the base compile command matches | 1215 | # The compiler in the base compile command matches |
1184 | # the one in the tagged configuration. | 1216 | # the one in the tagged configuration. |
1185 | # Assume this is the tagged configuration we want. | 1217 | # Assume this is the tagged configuration we want. |
@@ -1358,7 +1390,7 @@ func_mode_compile () | |||
1358 | *.[cCFSifmso] | \ | 1390 | *.[cCFSifmso] | \ |
1359 | *.ada | *.adb | *.ads | *.asm | \ | 1391 | *.ada | *.adb | *.ads | *.asm | \ |
1360 | *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ | 1392 | *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ |
1361 | *.[fF][09]? | *.for | *.java | *.obj | *.sx) | 1393 | *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) |
1362 | func_xform "$libobj" | 1394 | func_xform "$libobj" |
1363 | libobj=$func_xform_result | 1395 | libobj=$func_xform_result |
1364 | ;; | 1396 | ;; |
@@ -1433,7 +1465,7 @@ func_mode_compile () | |||
1433 | # Calculate the filename of the output object if compiler does | 1465 | # Calculate the filename of the output object if compiler does |
1434 | # not support -o with -c | 1466 | # not support -o with -c |
1435 | if test "$compiler_c_o" = no; then | 1467 | if test "$compiler_c_o" = no; then |
1436 | output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} | 1468 | output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} |
1437 | lockfile="$output_obj.lock" | 1469 | lockfile="$output_obj.lock" |
1438 | else | 1470 | else |
1439 | output_obj= | 1471 | output_obj= |
@@ -1473,7 +1505,7 @@ compiler." | |||
1473 | trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 | 1505 | trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 |
1474 | 1506 | ||
1475 | if test -n "$fix_srcfile_path"; then | 1507 | if test -n "$fix_srcfile_path"; then |
1476 | eval srcfile=\"$fix_srcfile_path\" | 1508 | eval "srcfile=\"$fix_srcfile_path\"" |
1477 | fi | 1509 | fi |
1478 | func_quote_for_eval "$srcfile" | 1510 | func_quote_for_eval "$srcfile" |
1479 | qsrcfile=$func_quote_for_eval_result | 1511 | qsrcfile=$func_quote_for_eval_result |
@@ -1590,7 +1622,7 @@ compiler." | |||
1590 | } | 1622 | } |
1591 | 1623 | ||
1592 | $opt_help || { | 1624 | $opt_help || { |
1593 | test "$mode" = compile && func_mode_compile ${1+"$@"} | 1625 | test "$mode" = compile && func_mode_compile ${1+"$@"} |
1594 | } | 1626 | } |
1595 | 1627 | ||
1596 | func_mode_help () | 1628 | func_mode_help () |
@@ -1631,6 +1663,7 @@ This mode accepts the following additional options: | |||
1631 | -prefer-non-pic try to building non-PIC objects only | 1663 | -prefer-non-pic try to building non-PIC objects only |
1632 | -shared do not build a \`.o' file suitable for static linking | 1664 | -shared do not build a \`.o' file suitable for static linking |
1633 | -static only build a \`.o' file suitable for static linking | 1665 | -static only build a \`.o' file suitable for static linking |
1666 | -Wc,FLAG pass FLAG directly to the compiler | ||
1634 | 1667 | ||
1635 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file | 1668 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file |
1636 | from the given SOURCEFILE. | 1669 | from the given SOURCEFILE. |
@@ -1683,7 +1716,7 @@ either the \`install' or \`cp' program. | |||
1683 | 1716 | ||
1684 | The following components of INSTALL-COMMAND are treated specially: | 1717 | The following components of INSTALL-COMMAND are treated specially: |
1685 | 1718 | ||
1686 | -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation | 1719 | -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation |
1687 | 1720 | ||
1688 | The rest of the components are interpreted as arguments to that command (only | 1721 | The rest of the components are interpreted as arguments to that command (only |
1689 | BSD-compatible install options are recognized)." | 1722 | BSD-compatible install options are recognized)." |
@@ -1733,6 +1766,11 @@ The following components of LINK-COMMAND are treated specially: | |||
1733 | -version-info CURRENT[:REVISION[:AGE]] | 1766 | -version-info CURRENT[:REVISION[:AGE]] |
1734 | specify library version info [each variable defaults to 0] | 1767 | specify library version info [each variable defaults to 0] |
1735 | -weak LIBNAME declare that the target provides the LIBNAME interface | 1768 | -weak LIBNAME declare that the target provides the LIBNAME interface |
1769 | -Wc,FLAG | ||
1770 | -Xcompiler FLAG pass linker-specific FLAG directly to the compiler | ||
1771 | -Wl,FLAG | ||
1772 | -Xlinker FLAG pass linker-specific FLAG directly to the linker | ||
1773 | -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) | ||
1736 | 1774 | ||
1737 | All other options (arguments beginning with \`-') are ignored. | 1775 | All other options (arguments beginning with \`-') are ignored. |
1738 | 1776 | ||
@@ -1770,14 +1808,40 @@ Otherwise, only FILE itself is deleted using RM." | |||
1770 | ;; | 1808 | ;; |
1771 | esac | 1809 | esac |
1772 | 1810 | ||
1773 | $ECHO | 1811 | echo |
1774 | $ECHO "Try \`$progname --help' for more information about other modes." | 1812 | $ECHO "Try \`$progname --help' for more information about other modes." |
1775 | |||
1776 | exit $? | ||
1777 | } | 1813 | } |
1778 | 1814 | ||
1779 | # Now that we've collected a possible --mode arg, show help if necessary | 1815 | # Now that we've collected a possible --mode arg, show help if necessary |
1780 | $opt_help && func_mode_help | 1816 | if $opt_help; then |
1817 | if test "$opt_help" = :; then | ||
1818 | func_mode_help | ||
1819 | else | ||
1820 | { | ||
1821 | func_help noexit | ||
1822 | for mode in compile link execute install finish uninstall clean; do | ||
1823 | func_mode_help | ||
1824 | done | ||
1825 | } | sed -n '1p; 2,$s/^Usage:/ or: /p' | ||
1826 | { | ||
1827 | func_help noexit | ||
1828 | for mode in compile link execute install finish uninstall clean; do | ||
1829 | echo | ||
1830 | func_mode_help | ||
1831 | done | ||
1832 | } | | ||
1833 | sed '1d | ||
1834 | /^When reporting/,/^Report/{ | ||
1835 | H | ||
1836 | d | ||
1837 | } | ||
1838 | $x | ||
1839 | /information about other modes/d | ||
1840 | /more detailed .*MODE/d | ||
1841 | s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' | ||
1842 | fi | ||
1843 | exit $? | ||
1844 | fi | ||
1781 | 1845 | ||
1782 | 1846 | ||
1783 | # func_mode_execute arg... | 1847 | # func_mode_execute arg... |
@@ -1843,10 +1907,10 @@ func_mode_execute () | |||
1843 | test -n "$absdir" && dir="$absdir" | 1907 | test -n "$absdir" && dir="$absdir" |
1844 | 1908 | ||
1845 | # Now add the directory to shlibpath_var. | 1909 | # Now add the directory to shlibpath_var. |
1846 | if eval "test -z \"\$$shlibpath_var\""; then | 1910 | if eval test -z \"\$$shlibpath_var\"; then |
1847 | eval "$shlibpath_var=\"\$dir\"" | 1911 | eval $shlibpath_var=\$dir |
1848 | else | 1912 | else |
1849 | eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" | 1913 | eval $shlibpath_var=\$dir:\$$shlibpath_var |
1850 | fi | 1914 | fi |
1851 | done | 1915 | done |
1852 | 1916 | ||
@@ -1859,7 +1923,7 @@ func_mode_execute () | |||
1859 | for file | 1923 | for file |
1860 | do | 1924 | do |
1861 | case $file in | 1925 | case $file in |
1862 | -*) ;; | 1926 | -* | *.la | *.lo ) ;; |
1863 | *) | 1927 | *) |
1864 | # Do a test to see if this is really a libtool program. | 1928 | # Do a test to see if this is really a libtool program. |
1865 | if func_ltwrapper_script_p "$file"; then | 1929 | if func_ltwrapper_script_p "$file"; then |
@@ -1901,7 +1965,7 @@ func_mode_execute () | |||
1901 | # Display what would be done. | 1965 | # Display what would be done. |
1902 | if test -n "$shlibpath_var"; then | 1966 | if test -n "$shlibpath_var"; then |
1903 | eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" | 1967 | eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" |
1904 | $ECHO "export $shlibpath_var" | 1968 | echo "export $shlibpath_var" |
1905 | fi | 1969 | fi |
1906 | $ECHO "$cmd$args" | 1970 | $ECHO "$cmd$args" |
1907 | exit $EXIT_SUCCESS | 1971 | exit $EXIT_SUCCESS |
@@ -1942,27 +2006,27 @@ func_mode_finish () | |||
1942 | # Exit here if they wanted silent mode. | 2006 | # Exit here if they wanted silent mode. |
1943 | $opt_silent && exit $EXIT_SUCCESS | 2007 | $opt_silent && exit $EXIT_SUCCESS |
1944 | 2008 | ||
1945 | $ECHO "X----------------------------------------------------------------------" | $Xsed | 2009 | echo "----------------------------------------------------------------------" |
1946 | $ECHO "Libraries have been installed in:" | 2010 | echo "Libraries have been installed in:" |
1947 | for libdir in $libdirs; do | 2011 | for libdir in $libdirs; do |
1948 | $ECHO " $libdir" | 2012 | $ECHO " $libdir" |
1949 | done | 2013 | done |
1950 | $ECHO | 2014 | echo |
1951 | $ECHO "If you ever happen to want to link against installed libraries" | 2015 | echo "If you ever happen to want to link against installed libraries" |
1952 | $ECHO "in a given directory, LIBDIR, you must either use libtool, and" | 2016 | echo "in a given directory, LIBDIR, you must either use libtool, and" |
1953 | $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" | 2017 | echo "specify the full pathname of the library, or use the \`-LLIBDIR'" |
1954 | $ECHO "flag during linking and do at least one of the following:" | 2018 | echo "flag during linking and do at least one of the following:" |
1955 | if test -n "$shlibpath_var"; then | 2019 | if test -n "$shlibpath_var"; then |
1956 | $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" | 2020 | echo " - add LIBDIR to the \`$shlibpath_var' environment variable" |
1957 | $ECHO " during execution" | 2021 | echo " during execution" |
1958 | fi | 2022 | fi |
1959 | if test -n "$runpath_var"; then | 2023 | if test -n "$runpath_var"; then |
1960 | $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" | 2024 | echo " - add LIBDIR to the \`$runpath_var' environment variable" |
1961 | $ECHO " during linking" | 2025 | echo " during linking" |
1962 | fi | 2026 | fi |
1963 | if test -n "$hardcode_libdir_flag_spec"; then | 2027 | if test -n "$hardcode_libdir_flag_spec"; then |
1964 | libdir=LIBDIR | 2028 | libdir=LIBDIR |
1965 | eval flag=\"$hardcode_libdir_flag_spec\" | 2029 | eval "flag=\"$hardcode_libdir_flag_spec\"" |
1966 | 2030 | ||
1967 | $ECHO " - use the \`$flag' linker flag" | 2031 | $ECHO " - use the \`$flag' linker flag" |
1968 | fi | 2032 | fi |
@@ -1970,21 +2034,21 @@ func_mode_finish () | |||
1970 | $ECHO " - have your system administrator run these commands:$admincmds" | 2034 | $ECHO " - have your system administrator run these commands:$admincmds" |
1971 | fi | 2035 | fi |
1972 | if test -f /etc/ld.so.conf; then | 2036 | if test -f /etc/ld.so.conf; then |
1973 | $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | 2037 | echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" |
1974 | fi | 2038 | fi |
1975 | $ECHO | 2039 | echo |
1976 | 2040 | ||
1977 | $ECHO "See any operating system documentation about shared libraries for" | 2041 | echo "See any operating system documentation about shared libraries for" |
1978 | case $host in | 2042 | case $host in |
1979 | solaris2.[6789]|solaris2.1[0-9]) | 2043 | solaris2.[6789]|solaris2.1[0-9]) |
1980 | $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" | 2044 | echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" |
1981 | $ECHO "pages." | 2045 | echo "pages." |
1982 | ;; | 2046 | ;; |
1983 | *) | 2047 | *) |
1984 | $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." | 2048 | echo "more information, such as the ld(1) and ld.so(8) manual pages." |
1985 | ;; | 2049 | ;; |
1986 | esac | 2050 | esac |
1987 | $ECHO "X----------------------------------------------------------------------" | $Xsed | 2051 | echo "----------------------------------------------------------------------" |
1988 | exit $EXIT_SUCCESS | 2052 | exit $EXIT_SUCCESS |
1989 | } | 2053 | } |
1990 | 2054 | ||
@@ -1999,7 +2063,7 @@ func_mode_install () | |||
1999 | # install_prog (especially on Windows NT). | 2063 | # install_prog (especially on Windows NT). |
2000 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || | 2064 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || |
2001 | # Allow the use of GNU shtool's install command. | 2065 | # Allow the use of GNU shtool's install command. |
2002 | $ECHO "X$nonopt" | $GREP shtool >/dev/null; then | 2066 | case $nonopt in *shtool*) :;; *) false;; esac; then |
2003 | # Aesthetically quote it. | 2067 | # Aesthetically quote it. |
2004 | func_quote_for_eval "$nonopt" | 2068 | func_quote_for_eval "$nonopt" |
2005 | install_prog="$func_quote_for_eval_result " | 2069 | install_prog="$func_quote_for_eval_result " |
@@ -2014,6 +2078,11 @@ func_mode_install () | |||
2014 | # Aesthetically quote it. | 2078 | # Aesthetically quote it. |
2015 | func_quote_for_eval "$arg" | 2079 | func_quote_for_eval "$arg" |
2016 | install_prog="$install_prog$func_quote_for_eval_result" | 2080 | install_prog="$install_prog$func_quote_for_eval_result" |
2081 | install_shared_prog=$install_prog | ||
2082 | case " $install_prog " in | ||
2083 | *[\\\ /]cp\ *) install_cp=: ;; | ||
2084 | *) install_cp=false ;; | ||
2085 | esac | ||
2017 | 2086 | ||
2018 | # We need to accept at least all the BSD install flags. | 2087 | # We need to accept at least all the BSD install flags. |
2019 | dest= | 2088 | dest= |
@@ -2023,8 +2092,10 @@ func_mode_install () | |||
2023 | install_type= | 2092 | install_type= |
2024 | isdir=no | 2093 | isdir=no |
2025 | stripme= | 2094 | stripme= |
2095 | no_mode=: | ||
2026 | for arg | 2096 | for arg |
2027 | do | 2097 | do |
2098 | arg2= | ||
2028 | if test -n "$dest"; then | 2099 | if test -n "$dest"; then |
2029 | files="$files $dest" | 2100 | files="$files $dest" |
2030 | dest=$arg | 2101 | dest=$arg |
@@ -2034,10 +2105,9 @@ func_mode_install () | |||
2034 | case $arg in | 2105 | case $arg in |
2035 | -d) isdir=yes ;; | 2106 | -d) isdir=yes ;; |
2036 | -f) | 2107 | -f) |
2037 | case " $install_prog " in | 2108 | if $install_cp; then :; else |
2038 | *[\\\ /]cp\ *) ;; | 2109 | prev=$arg |
2039 | *) prev=$arg ;; | 2110 | fi |
2040 | esac | ||
2041 | ;; | 2111 | ;; |
2042 | -g | -m | -o) | 2112 | -g | -m | -o) |
2043 | prev=$arg | 2113 | prev=$arg |
@@ -2051,6 +2121,10 @@ func_mode_install () | |||
2051 | *) | 2121 | *) |
2052 | # If the previous option needed an argument, then skip it. | 2122 | # If the previous option needed an argument, then skip it. |
2053 | if test -n "$prev"; then | 2123 | if test -n "$prev"; then |
2124 | if test "x$prev" = x-m && test -n "$install_override_mode"; then | ||
2125 | arg2=$install_override_mode | ||
2126 | no_mode=false | ||
2127 | fi | ||
2054 | prev= | 2128 | prev= |
2055 | else | 2129 | else |
2056 | dest=$arg | 2130 | dest=$arg |
@@ -2062,6 +2136,10 @@ func_mode_install () | |||
2062 | # Aesthetically quote the argument. | 2136 | # Aesthetically quote the argument. |
2063 | func_quote_for_eval "$arg" | 2137 | func_quote_for_eval "$arg" |
2064 | install_prog="$install_prog $func_quote_for_eval_result" | 2138 | install_prog="$install_prog $func_quote_for_eval_result" |
2139 | if test -n "$arg2"; then | ||
2140 | func_quote_for_eval "$arg2" | ||
2141 | fi | ||
2142 | install_shared_prog="$install_shared_prog $func_quote_for_eval_result" | ||
2065 | done | 2143 | done |
2066 | 2144 | ||
2067 | test -z "$install_prog" && \ | 2145 | test -z "$install_prog" && \ |
@@ -2070,6 +2148,13 @@ func_mode_install () | |||
2070 | test -n "$prev" && \ | 2148 | test -n "$prev" && \ |
2071 | func_fatal_help "the \`$prev' option requires an argument" | 2149 | func_fatal_help "the \`$prev' option requires an argument" |
2072 | 2150 | ||
2151 | if test -n "$install_override_mode" && $no_mode; then | ||
2152 | if $install_cp; then :; else | ||
2153 | func_quote_for_eval "$install_override_mode" | ||
2154 | install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" | ||
2155 | fi | ||
2156 | fi | ||
2157 | |||
2073 | if test -z "$files"; then | 2158 | if test -z "$files"; then |
2074 | if test -z "$dest"; then | 2159 | if test -z "$dest"; then |
2075 | func_fatal_help "no file or destination specified" | 2160 | func_fatal_help "no file or destination specified" |
@@ -2157,7 +2242,7 @@ func_mode_install () | |||
2157 | 2242 | ||
2158 | if test -n "$relink_command"; then | 2243 | if test -n "$relink_command"; then |
2159 | # Determine the prefix the user has applied to our future dir. | 2244 | # Determine the prefix the user has applied to our future dir. |
2160 | inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` | 2245 | inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` |
2161 | 2246 | ||
2162 | # Don't allow the user to place us outside of our expected | 2247 | # Don't allow the user to place us outside of our expected |
2163 | # location b/c this prevents finding dependent libraries that | 2248 | # location b/c this prevents finding dependent libraries that |
@@ -2170,9 +2255,9 @@ func_mode_install () | |||
2170 | 2255 | ||
2171 | if test -n "$inst_prefix_dir"; then | 2256 | if test -n "$inst_prefix_dir"; then |
2172 | # Stick the inst_prefix_dir data into the link command. | 2257 | # Stick the inst_prefix_dir data into the link command. |
2173 | relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` | 2258 | relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` |
2174 | else | 2259 | else |
2175 | relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` | 2260 | relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` |
2176 | fi | 2261 | fi |
2177 | 2262 | ||
2178 | func_warning "relinking \`$file'" | 2263 | func_warning "relinking \`$file'" |
@@ -2190,7 +2275,7 @@ func_mode_install () | |||
2190 | test -n "$relink_command" && srcname="$realname"T | 2275 | test -n "$relink_command" && srcname="$realname"T |
2191 | 2276 | ||
2192 | # Install the shared library and build the symlinks. | 2277 | # Install the shared library and build the symlinks. |
2193 | func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ | 2278 | func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ |
2194 | 'exit $?' | 2279 | 'exit $?' |
2195 | tstripme="$stripme" | 2280 | tstripme="$stripme" |
2196 | case $host_os in | 2281 | case $host_os in |
@@ -2330,7 +2415,7 @@ func_mode_install () | |||
2330 | if test -f "$lib"; then | 2415 | if test -f "$lib"; then |
2331 | func_source "$lib" | 2416 | func_source "$lib" |
2332 | fi | 2417 | fi |
2333 | libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test | 2418 | libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test |
2334 | if test -n "$libdir" && test ! -f "$libfile"; then | 2419 | if test -n "$libdir" && test ! -f "$libfile"; then |
2335 | func_warning "\`$lib' has not been installed in \`$libdir'" | 2420 | func_warning "\`$lib' has not been installed in \`$libdir'" |
2336 | finalize=no | 2421 | finalize=no |
@@ -2349,7 +2434,7 @@ func_mode_install () | |||
2349 | file="$func_basename_result" | 2434 | file="$func_basename_result" |
2350 | outputname="$tmpdir/$file" | 2435 | outputname="$tmpdir/$file" |
2351 | # Replace the output file specification. | 2436 | # Replace the output file specification. |
2352 | relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` | 2437 | relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` |
2353 | 2438 | ||
2354 | $opt_silent || { | 2439 | $opt_silent || { |
2355 | func_quote_for_expand "$relink_command" | 2440 | func_quote_for_expand "$relink_command" |
@@ -2368,7 +2453,7 @@ func_mode_install () | |||
2368 | } | 2453 | } |
2369 | else | 2454 | else |
2370 | # Install the binary that we compiled earlier. | 2455 | # Install the binary that we compiled earlier. |
2371 | file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` | 2456 | file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` |
2372 | fi | 2457 | fi |
2373 | fi | 2458 | fi |
2374 | 2459 | ||
@@ -2418,7 +2503,7 @@ func_mode_install () | |||
2418 | test -n "$future_libdirs" && \ | 2503 | test -n "$future_libdirs" && \ |
2419 | func_warning "remember to run \`$progname --finish$future_libdirs'" | 2504 | func_warning "remember to run \`$progname --finish$future_libdirs'" |
2420 | 2505 | ||
2421 | if test -n "$current_libdirs"; then | 2506 | if test -n "$current_libdirs" && $opt_finish; then |
2422 | # Maybe just do a dry run. | 2507 | # Maybe just do a dry run. |
2423 | $opt_dry_run && current_libdirs=" -n$current_libdirs" | 2508 | $opt_dry_run && current_libdirs=" -n$current_libdirs" |
2424 | exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' | 2509 | exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' |
@@ -2470,6 +2555,10 @@ func_generate_dlsyms () | |||
2470 | extern \"C\" { | 2555 | extern \"C\" { |
2471 | #endif | 2556 | #endif |
2472 | 2557 | ||
2558 | #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) | ||
2559 | #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" | ||
2560 | #endif | ||
2561 | |||
2473 | /* External symbol declarations for the compiler. */\ | 2562 | /* External symbol declarations for the compiler. */\ |
2474 | " | 2563 | " |
2475 | 2564 | ||
@@ -2479,7 +2568,7 @@ extern \"C\" { | |||
2479 | $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" | 2568 | $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" |
2480 | 2569 | ||
2481 | # Add our own program objects to the symbol list. | 2570 | # Add our own program objects to the symbol list. |
2482 | progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | 2571 | progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` |
2483 | for progfile in $progfiles; do | 2572 | for progfile in $progfiles; do |
2484 | func_verbose "extracting global C symbols from \`$progfile'" | 2573 | func_verbose "extracting global C symbols from \`$progfile'" |
2485 | $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" | 2574 | $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" |
@@ -2487,15 +2576,15 @@ extern \"C\" { | |||
2487 | 2576 | ||
2488 | if test -n "$exclude_expsyms"; then | 2577 | if test -n "$exclude_expsyms"; then |
2489 | $opt_dry_run || { | 2578 | $opt_dry_run || { |
2490 | eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' | 2579 | $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T |
2491 | eval '$MV "$nlist"T "$nlist"' | 2580 | $MV "$nlist"T "$nlist" |
2492 | } | 2581 | } |
2493 | fi | 2582 | fi |
2494 | 2583 | ||
2495 | if test -n "$export_symbols_regex"; then | 2584 | if test -n "$export_symbols_regex"; then |
2496 | $opt_dry_run || { | 2585 | $opt_dry_run || { |
2497 | eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' | 2586 | $EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T |
2498 | eval '$MV "$nlist"T "$nlist"' | 2587 | $MV "$nlist"T "$nlist" |
2499 | } | 2588 | } |
2500 | fi | 2589 | fi |
2501 | 2590 | ||
@@ -2504,23 +2593,23 @@ extern \"C\" { | |||
2504 | export_symbols="$output_objdir/$outputname.exp" | 2593 | export_symbols="$output_objdir/$outputname.exp" |
2505 | $opt_dry_run || { | 2594 | $opt_dry_run || { |
2506 | $RM $export_symbols | 2595 | $RM $export_symbols |
2507 | eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' | 2596 | ${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' < "$nlist" > "$export_symbols" |
2508 | case $host in | 2597 | case $host in |
2509 | *cygwin* | *mingw* | *cegcc* ) | 2598 | *cygwin* | *mingw* | *cegcc* ) |
2510 | eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' | 2599 | echo EXPORTS > "$output_objdir/$outputname.def" |
2511 | eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' | 2600 | cat "$export_symbols" >> "$output_objdir/$outputname.def" |
2512 | ;; | 2601 | ;; |
2513 | esac | 2602 | esac |
2514 | } | 2603 | } |
2515 | else | 2604 | else |
2516 | $opt_dry_run || { | 2605 | $opt_dry_run || { |
2517 | eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' | 2606 | ${SED} -e 's/\([].[*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/' < "$export_symbols" > "$output_objdir/$outputname.exp" |
2518 | eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' | 2607 | $GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T |
2519 | eval '$MV "$nlist"T "$nlist"' | 2608 | $MV "$nlist"T "$nlist" |
2520 | case $host in | 2609 | case $host in |
2521 | *cygwin | *mingw* | *cegcc* ) | 2610 | *cygwin* | *mingw* | *cegcc* ) |
2522 | eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' | 2611 | echo EXPORTS > "$output_objdir/$outputname.def" |
2523 | eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' | 2612 | cat "$nlist" >> "$output_objdir/$outputname.def" |
2524 | ;; | 2613 | ;; |
2525 | esac | 2614 | esac |
2526 | } | 2615 | } |
@@ -2532,7 +2621,7 @@ extern \"C\" { | |||
2532 | func_basename "$dlprefile" | 2621 | func_basename "$dlprefile" |
2533 | name="$func_basename_result" | 2622 | name="$func_basename_result" |
2534 | $opt_dry_run || { | 2623 | $opt_dry_run || { |
2535 | eval '$ECHO ": $name " >> "$nlist"' | 2624 | $ECHO ": $name " >> "$nlist" |
2536 | eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" | 2625 | eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" |
2537 | } | 2626 | } |
2538 | done | 2627 | done |
@@ -2562,10 +2651,10 @@ extern \"C\" { | |||
2562 | if test -f "$nlist"S; then | 2651 | if test -f "$nlist"S; then |
2563 | eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' | 2652 | eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' |
2564 | else | 2653 | else |
2565 | $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" | 2654 | echo '/* NONE */' >> "$output_objdir/$my_dlsyms" |
2566 | fi | 2655 | fi |
2567 | 2656 | ||
2568 | $ECHO >> "$output_objdir/$my_dlsyms" "\ | 2657 | echo >> "$output_objdir/$my_dlsyms" "\ |
2569 | 2658 | ||
2570 | /* The mapping between symbol names and symbols. */ | 2659 | /* The mapping between symbol names and symbols. */ |
2571 | typedef struct { | 2660 | typedef struct { |
@@ -2575,7 +2664,7 @@ typedef struct { | |||
2575 | " | 2664 | " |
2576 | case $host in | 2665 | case $host in |
2577 | *cygwin* | *mingw* | *cegcc* ) | 2666 | *cygwin* | *mingw* | *cegcc* ) |
2578 | $ECHO >> "$output_objdir/$my_dlsyms" "\ | 2667 | echo >> "$output_objdir/$my_dlsyms" "\ |
2579 | /* DATA imports from DLLs on WIN32 con't be const, because | 2668 | /* DATA imports from DLLs on WIN32 con't be const, because |
2580 | runtime relocations are performed -- see ld's documentation | 2669 | runtime relocations are performed -- see ld's documentation |
2581 | on pseudo-relocs. */" | 2670 | on pseudo-relocs. */" |
@@ -2588,7 +2677,7 @@ typedef struct { | |||
2588 | lt_dlsym_const=const ;; | 2677 | lt_dlsym_const=const ;; |
2589 | esac | 2678 | esac |
2590 | 2679 | ||
2591 | $ECHO >> "$output_objdir/$my_dlsyms" "\ | 2680 | echo >> "$output_objdir/$my_dlsyms" "\ |
2592 | extern $lt_dlsym_const lt_dlsymlist | 2681 | extern $lt_dlsym_const lt_dlsymlist |
2593 | lt_${my_prefix}_LTX_preloaded_symbols[]; | 2682 | lt_${my_prefix}_LTX_preloaded_symbols[]; |
2594 | $lt_dlsym_const lt_dlsymlist | 2683 | $lt_dlsym_const lt_dlsymlist |
@@ -2604,7 +2693,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] = | |||
2604 | eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" | 2693 | eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" |
2605 | ;; | 2694 | ;; |
2606 | esac | 2695 | esac |
2607 | $ECHO >> "$output_objdir/$my_dlsyms" "\ | 2696 | echo >> "$output_objdir/$my_dlsyms" "\ |
2608 | {0, (void *) 0} | 2697 | {0, (void *) 0} |
2609 | }; | 2698 | }; |
2610 | 2699 | ||
@@ -2662,16 +2751,16 @@ static const void *lt_preloaded_setup() { | |||
2662 | case $host in | 2751 | case $host in |
2663 | *cygwin* | *mingw* | *cegcc* ) | 2752 | *cygwin* | *mingw* | *cegcc* ) |
2664 | if test -f "$output_objdir/$my_outputname.def"; then | 2753 | if test -f "$output_objdir/$my_outputname.def"; then |
2665 | compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` | 2754 | compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` |
2666 | finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` | 2755 | finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` |
2667 | else | 2756 | else |
2668 | compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` | 2757 | compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` |
2669 | finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` | 2758 | finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` |
2670 | fi | 2759 | fi |
2671 | ;; | 2760 | ;; |
2672 | *) | 2761 | *) |
2673 | compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` | 2762 | compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` |
2674 | finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` | 2763 | finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` |
2675 | ;; | 2764 | ;; |
2676 | esac | 2765 | esac |
2677 | ;; | 2766 | ;; |
@@ -2685,8 +2774,8 @@ static const void *lt_preloaded_setup() { | |||
2685 | # really was required. | 2774 | # really was required. |
2686 | 2775 | ||
2687 | # Nullify the symbol file. | 2776 | # Nullify the symbol file. |
2688 | compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | 2777 | compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` |
2689 | finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | 2778 | finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` |
2690 | fi | 2779 | fi |
2691 | } | 2780 | } |
2692 | 2781 | ||
@@ -2696,6 +2785,7 @@ static const void *lt_preloaded_setup() { | |||
2696 | # Need a lot of goo to handle *both* DLLs and import libs | 2785 | # Need a lot of goo to handle *both* DLLs and import libs |
2697 | # Has to be a shell function in order to 'eat' the argument | 2786 | # Has to be a shell function in order to 'eat' the argument |
2698 | # that is supplied when $file_magic_command is called. | 2787 | # that is supplied when $file_magic_command is called. |
2788 | # Despite the name, also deal with 64 bit binaries. | ||
2699 | func_win32_libid () | 2789 | func_win32_libid () |
2700 | { | 2790 | { |
2701 | $opt_debug | 2791 | $opt_debug |
@@ -2706,9 +2796,9 @@ func_win32_libid () | |||
2706 | win32_libid_type="x86 archive import" | 2796 | win32_libid_type="x86 archive import" |
2707 | ;; | 2797 | ;; |
2708 | *ar\ archive*) # could be an import, or static | 2798 | *ar\ archive*) # could be an import, or static |
2709 | if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | | 2799 | if $OBJDUMP -f "$1" | $SED -e '10q' 2>/dev/null | |
2710 | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then | 2800 | $EGREP 'file format (pe-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then |
2711 | win32_nmres=`eval $NM -f posix -A $1 | | 2801 | win32_nmres=`$NM -f posix -A "$1" | |
2712 | $SED -n -e ' | 2802 | $SED -n -e ' |
2713 | 1,100{ | 2803 | 1,100{ |
2714 | / I /{ | 2804 | / I /{ |
@@ -2745,7 +2835,18 @@ func_extract_an_archive () | |||
2745 | $opt_debug | 2835 | $opt_debug |
2746 | f_ex_an_ar_dir="$1"; shift | 2836 | f_ex_an_ar_dir="$1"; shift |
2747 | f_ex_an_ar_oldlib="$1" | 2837 | f_ex_an_ar_oldlib="$1" |
2748 | func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' | 2838 | if test "$lock_old_archive_extraction" = yes; then |
2839 | lockfile=$f_ex_an_ar_oldlib.lock | ||
2840 | until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do | ||
2841 | func_echo "Waiting for $lockfile to be removed" | ||
2842 | sleep 2 | ||
2843 | done | ||
2844 | fi | ||
2845 | func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ | ||
2846 | 'stat=$?; rm -f "$lockfile"; exit $stat' | ||
2847 | if test "$lock_old_archive_extraction" = yes; then | ||
2848 | $opt_dry_run || rm -f "$lockfile" | ||
2849 | fi | ||
2749 | if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then | 2850 | if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then |
2750 | : | 2851 | : |
2751 | else | 2852 | else |
@@ -2838,18 +2939,23 @@ func_extract_archives () | |||
2838 | } | 2939 | } |
2839 | 2940 | ||
2840 | 2941 | ||
2841 | 2942 | # func_emit_wrapper [arg=no] | |
2842 | # func_emit_wrapper_part1 [arg=no] | ||
2843 | # | 2943 | # |
2844 | # Emit the first part of a libtool wrapper script on stdout. | 2944 | # Emit a libtool wrapper script on stdout. |
2845 | # For more information, see the description associated with | 2945 | # Don't directly open a file because we may want to |
2846 | # func_emit_wrapper(), below. | 2946 | # incorporate the script contents within a cygwin/mingw |
2847 | func_emit_wrapper_part1 () | 2947 | # wrapper executable. Must ONLY be called from within |
2948 | # func_mode_link because it depends on a number of variables | ||
2949 | # set therein. | ||
2950 | # | ||
2951 | # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR | ||
2952 | # variable will take. If 'yes', then the emitted script | ||
2953 | # will assume that the directory in which it is stored is | ||
2954 | # the $objdir directory. This is a cygwin/mingw-specific | ||
2955 | # behavior. | ||
2956 | func_emit_wrapper () | ||
2848 | { | 2957 | { |
2849 | func_emit_wrapper_part1_arg1=no | 2958 | func_emit_wrapper_arg1=${1-no} |
2850 | if test -n "$1" ; then | ||
2851 | func_emit_wrapper_part1_arg1=$1 | ||
2852 | fi | ||
2853 | 2959 | ||
2854 | $ECHO "\ | 2960 | $ECHO "\ |
2855 | #! $SHELL | 2961 | #! $SHELL |
@@ -2865,7 +2971,6 @@ func_emit_wrapper_part1 () | |||
2865 | 2971 | ||
2866 | # Sed substitution that helps us do robust quoting. It backslashifies | 2972 | # Sed substitution that helps us do robust quoting. It backslashifies |
2867 | # metacharacters that are still active within double-quoted strings. | 2973 | # metacharacters that are still active within double-quoted strings. |
2868 | Xsed='${SED} -e 1s/^X//' | ||
2869 | sed_quote_subst='$sed_quote_subst' | 2974 | sed_quote_subst='$sed_quote_subst' |
2870 | 2975 | ||
2871 | # Be Bourne compatible | 2976 | # Be Bourne compatible |
@@ -2896,31 +3001,29 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then | |||
2896 | else | 3001 | else |
2897 | # When we are sourced in execute mode, \$file and \$ECHO are already set. | 3002 | # When we are sourced in execute mode, \$file and \$ECHO are already set. |
2898 | if test \"\$libtool_execute_magic\" != \"$magic\"; then | 3003 | if test \"\$libtool_execute_magic\" != \"$magic\"; then |
2899 | ECHO=\"$qecho\" | 3004 | file=\"\$0\"" |
2900 | file=\"\$0\" | 3005 | |
2901 | # Make sure echo works. | 3006 | qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` |
2902 | if test \"X\$1\" = X--no-reexec; then | 3007 | $ECHO "\ |
2903 | # Discard the --no-reexec flag, and continue. | 3008 | |
2904 | shift | 3009 | # A function that is used when there is no print builtin or printf. |
2905 | elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then | 3010 | func_fallback_echo () |
2906 | # Yippee, \$ECHO works! | 3011 | { |
2907 | : | 3012 | eval 'cat <<_LTECHO_EOF |
2908 | else | 3013 | \$1 |
2909 | # Restart under the correct shell, and then maybe \$ECHO will work. | 3014 | _LTECHO_EOF' |
2910 | exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} | 3015 | } |
2911 | fi | 3016 | ECHO=\"$qECHO\" |
2912 | fi\ | 3017 | fi\ |
2913 | " | ||
2914 | $ECHO "\ | ||
2915 | 3018 | ||
2916 | # Find the directory that this script lives in. | 3019 | # Find the directory that this script lives in. |
2917 | thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` | 3020 | thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` |
2918 | test \"x\$thisdir\" = \"x\$file\" && thisdir=. | 3021 | test \"x\$thisdir\" = \"x\$file\" && thisdir=. |
2919 | 3022 | ||
2920 | # Follow symbolic links until we get to the real thisdir. | 3023 | # Follow symbolic links until we get to the real thisdir. |
2921 | file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` | 3024 | file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` |
2922 | while test -n \"\$file\"; do | 3025 | while test -n \"\$file\"; do |
2923 | destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` | 3026 | destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` |
2924 | 3027 | ||
2925 | # If there was a directory component, then change thisdir. | 3028 | # If there was a directory component, then change thisdir. |
2926 | if test \"x\$destdir\" != \"x\$file\"; then | 3029 | if test \"x\$destdir\" != \"x\$file\"; then |
@@ -2930,30 +3033,13 @@ else | |||
2930 | esac | 3033 | esac |
2931 | fi | 3034 | fi |
2932 | 3035 | ||
2933 | file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` | 3036 | file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` |
2934 | file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` | 3037 | file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` |
2935 | done | 3038 | done |
2936 | " | ||
2937 | } | ||
2938 | # end: func_emit_wrapper_part1 | ||
2939 | |||
2940 | # func_emit_wrapper_part2 [arg=no] | ||
2941 | # | ||
2942 | # Emit the second part of a libtool wrapper script on stdout. | ||
2943 | # For more information, see the description associated with | ||
2944 | # func_emit_wrapper(), below. | ||
2945 | func_emit_wrapper_part2 () | ||
2946 | { | ||
2947 | func_emit_wrapper_part2_arg1=no | ||
2948 | if test -n "$1" ; then | ||
2949 | func_emit_wrapper_part2_arg1=$1 | ||
2950 | fi | ||
2951 | |||
2952 | $ECHO "\ | ||
2953 | 3039 | ||
2954 | # Usually 'no', except on cygwin/mingw when embedded into | 3040 | # Usually 'no', except on cygwin/mingw when embedded into |
2955 | # the cwrapper. | 3041 | # the cwrapper. |
2956 | WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 | 3042 | WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 |
2957 | if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then | 3043 | if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then |
2958 | # special case for '.' | 3044 | # special case for '.' |
2959 | if test \"\$thisdir\" = \".\"; then | 3045 | if test \"\$thisdir\" = \".\"; then |
@@ -2961,7 +3047,7 @@ func_emit_wrapper_part2 () | |||
2961 | fi | 3047 | fi |
2962 | # remove .libs from thisdir | 3048 | # remove .libs from thisdir |
2963 | case \"\$thisdir\" in | 3049 | case \"\$thisdir\" in |
2964 | *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; | 3050 | *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; |
2965 | $objdir ) thisdir=. ;; | 3051 | $objdir ) thisdir=. ;; |
2966 | esac | 3052 | esac |
2967 | fi | 3053 | fi |
@@ -2992,7 +3078,7 @@ func_emit_wrapper_part2 () | |||
2992 | 3078 | ||
2993 | # relink executable if necessary | 3079 | # relink executable if necessary |
2994 | if test -n \"\$relink_command\"; then | 3080 | if test -n \"\$relink_command\"; then |
2995 | if relink_command_output=\`eval \$relink_command 2>&1\`; then : | 3081 | if relink_command_output=\`eval \"\$relink_command\" 2>&1\`; then : |
2996 | else | 3082 | else |
2997 | $ECHO \"\$relink_command_output\" >&2 | 3083 | $ECHO \"\$relink_command_output\" >&2 |
2998 | $RM \"\$progdir/\$file\" | 3084 | $RM \"\$progdir/\$file\" |
@@ -3024,7 +3110,7 @@ func_emit_wrapper_part2 () | |||
3024 | 3110 | ||
3025 | # Some systems cannot cope with colon-terminated $shlibpath_var | 3111 | # Some systems cannot cope with colon-terminated $shlibpath_var |
3026 | # The second colon is a workaround for a bug in BeOS R4 sed | 3112 | # The second colon is a workaround for a bug in BeOS R4 sed |
3027 | $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` | 3113 | $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` |
3028 | 3114 | ||
3029 | export $shlibpath_var | 3115 | export $shlibpath_var |
3030 | " | 3116 | " |
@@ -3064,41 +3150,12 @@ func_emit_wrapper_part2 () | |||
3064 | # The program doesn't exist. | 3150 | # The program doesn't exist. |
3065 | \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 | 3151 | \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 |
3066 | \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 | 3152 | \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 |
3067 | $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 | 3153 | \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 |
3068 | exit 1 | 3154 | exit 1 |
3069 | fi | 3155 | fi |
3070 | fi\ | 3156 | fi\ |
3071 | " | 3157 | " |
3072 | } | 3158 | } |
3073 | # end: func_emit_wrapper_part2 | ||
3074 | |||
3075 | |||
3076 | # func_emit_wrapper [arg=no] | ||
3077 | # | ||
3078 | # Emit a libtool wrapper script on stdout. | ||
3079 | # Don't directly open a file because we may want to | ||
3080 | # incorporate the script contents within a cygwin/mingw | ||
3081 | # wrapper executable. Must ONLY be called from within | ||
3082 | # func_mode_link because it depends on a number of variables | ||
3083 | # set therein. | ||
3084 | # | ||
3085 | # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR | ||
3086 | # variable will take. If 'yes', then the emitted script | ||
3087 | # will assume that the directory in which it is stored is | ||
3088 | # the $objdir directory. This is a cygwin/mingw-specific | ||
3089 | # behavior. | ||
3090 | func_emit_wrapper () | ||
3091 | { | ||
3092 | func_emit_wrapper_arg1=no | ||
3093 | if test -n "$1" ; then | ||
3094 | func_emit_wrapper_arg1=$1 | ||
3095 | fi | ||
3096 | |||
3097 | # split this up so that func_emit_cwrapperexe_src | ||
3098 | # can call each part independently. | ||
3099 | func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" | ||
3100 | func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" | ||
3101 | } | ||
3102 | 3159 | ||
3103 | 3160 | ||
3104 | # func_to_host_path arg | 3161 | # func_to_host_path arg |
@@ -3125,23 +3182,19 @@ func_emit_wrapper () | |||
3125 | func_to_host_path () | 3182 | func_to_host_path () |
3126 | { | 3183 | { |
3127 | func_to_host_path_result="$1" | 3184 | func_to_host_path_result="$1" |
3128 | if test -n "$1" ; then | 3185 | if test -n "$1"; then |
3129 | case $host in | 3186 | case $host in |
3130 | *mingw* ) | 3187 | *mingw* ) |
3131 | lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' | 3188 | lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' |
3132 | case $build in | 3189 | case $build in |
3133 | *mingw* ) # actually, msys | 3190 | *mingw* ) # actually, msys |
3134 | # awkward: cmd appends spaces to result | 3191 | # awkward: cmd appends spaces to result |
3135 | lt_sed_strip_trailing_spaces="s/[ ]*\$//" | 3192 | func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null | |
3136 | func_to_host_path_tmp1=`( cmd //c echo "$1" |\ | 3193 | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` |
3137 | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` | ||
3138 | func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ | ||
3139 | $SED -e "$lt_sed_naive_backslashify"` | ||
3140 | ;; | 3194 | ;; |
3141 | *cygwin* ) | 3195 | *cygwin* ) |
3142 | func_to_host_path_tmp1=`cygpath -w "$1"` | 3196 | func_to_host_path_result=`cygpath -w "$1" | |
3143 | func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ | 3197 | $SED -e "$lt_sed_naive_backslashify"` |
3144 | $SED -e "$lt_sed_naive_backslashify"` | ||
3145 | ;; | 3198 | ;; |
3146 | * ) | 3199 | * ) |
3147 | # Unfortunately, winepath does not exit with a non-zero | 3200 | # Unfortunately, winepath does not exit with a non-zero |
@@ -3153,17 +3206,17 @@ func_to_host_path () | |||
3153 | # the odd construction: | 3206 | # the odd construction: |
3154 | func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` | 3207 | func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` |
3155 | if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then | 3208 | if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then |
3156 | func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ | 3209 | func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" | |
3157 | $SED -e "$lt_sed_naive_backslashify"` | 3210 | $SED -e "$lt_sed_naive_backslashify"` |
3158 | else | 3211 | else |
3159 | # Allow warning below. | 3212 | # Allow warning below. |
3160 | func_to_host_path_result="" | 3213 | func_to_host_path_result= |
3161 | fi | 3214 | fi |
3162 | ;; | 3215 | ;; |
3163 | esac | 3216 | esac |
3164 | if test -z "$func_to_host_path_result" ; then | 3217 | if test -z "$func_to_host_path_result" ; then |
3165 | func_error "Could not determine host path corresponding to" | 3218 | func_error "Could not determine host path corresponding to" |
3166 | func_error " '$1'" | 3219 | func_error " \`$1'" |
3167 | func_error "Continuing, but uninstalled executables may not work." | 3220 | func_error "Continuing, but uninstalled executables may not work." |
3168 | # Fallback: | 3221 | # Fallback: |
3169 | func_to_host_path_result="$1" | 3222 | func_to_host_path_result="$1" |
@@ -3196,30 +3249,24 @@ func_to_host_path () | |||
3196 | func_to_host_pathlist () | 3249 | func_to_host_pathlist () |
3197 | { | 3250 | { |
3198 | func_to_host_pathlist_result="$1" | 3251 | func_to_host_pathlist_result="$1" |
3199 | if test -n "$1" ; then | 3252 | if test -n "$1"; then |
3200 | case $host in | 3253 | case $host in |
3201 | *mingw* ) | 3254 | *mingw* ) |
3202 | lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' | 3255 | lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' |
3203 | # Remove leading and trailing path separator characters from | 3256 | # Remove leading and trailing path separator characters from |
3204 | # ARG. msys behavior is inconsistent here, cygpath turns them | 3257 | # ARG. msys behavior is inconsistent here, cygpath turns them |
3205 | # into '.;' and ';.', and winepath ignores them completely. | 3258 | # into '.;' and ';.', and winepath ignores them completely. |
3206 | func_to_host_pathlist_tmp2="$1" | 3259 | func_stripname : : "$1" |
3207 | # Once set for this call, this variable should not be | 3260 | func_to_host_pathlist_tmp1=$func_stripname_result |
3208 | # reassigned. It is used in tha fallback case. | ||
3209 | func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ | ||
3210 | $SED -e 's|^:*||' -e 's|:*$||'` | ||
3211 | case $build in | 3261 | case $build in |
3212 | *mingw* ) # Actually, msys. | 3262 | *mingw* ) # Actually, msys. |
3213 | # Awkward: cmd appends spaces to result. | 3263 | # Awkward: cmd appends spaces to result. |
3214 | lt_sed_strip_trailing_spaces="s/[ ]*\$//" | 3264 | func_to_host_pathlist_result=` |
3215 | func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ | 3265 | ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null | |
3216 | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` | 3266 | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` |
3217 | func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ | ||
3218 | $SED -e "$lt_sed_naive_backslashify"` | ||
3219 | ;; | 3267 | ;; |
3220 | *cygwin* ) | 3268 | *cygwin* ) |
3221 | func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` | 3269 | func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" | |
3222 | func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ | ||
3223 | $SED -e "$lt_sed_naive_backslashify"` | 3270 | $SED -e "$lt_sed_naive_backslashify"` |
3224 | ;; | 3271 | ;; |
3225 | * ) | 3272 | * ) |
@@ -3235,18 +3282,17 @@ func_to_host_pathlist () | |||
3235 | if test -z "$func_to_host_pathlist_result" ; then | 3282 | if test -z "$func_to_host_pathlist_result" ; then |
3236 | func_to_host_pathlist_result="$func_to_host_path_result" | 3283 | func_to_host_pathlist_result="$func_to_host_path_result" |
3237 | else | 3284 | else |
3238 | func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" | 3285 | func_append func_to_host_pathlist_result ";$func_to_host_path_result" |
3239 | fi | 3286 | fi |
3240 | fi | 3287 | fi |
3241 | fi | 3288 | fi |
3242 | IFS=: | ||
3243 | done | 3289 | done |
3244 | IFS=$func_to_host_pathlist_oldIFS | 3290 | IFS=$func_to_host_pathlist_oldIFS |
3245 | ;; | 3291 | ;; |
3246 | esac | 3292 | esac |
3247 | if test -z "$func_to_host_pathlist_result" ; then | 3293 | if test -z "$func_to_host_pathlist_result"; then |
3248 | func_error "Could not determine the host path(s) corresponding to" | 3294 | func_error "Could not determine the host path(s) corresponding to" |
3249 | func_error " '$1'" | 3295 | func_error " \`$1'" |
3250 | func_error "Continuing, but uninstalled executables may not work." | 3296 | func_error "Continuing, but uninstalled executables may not work." |
3251 | # Fallback. This may break if $1 contains DOS-style drive | 3297 | # Fallback. This may break if $1 contains DOS-style drive |
3252 | # specifications. The fix is not to complicate the expression | 3298 | # specifications. The fix is not to complicate the expression |
@@ -3263,7 +3309,7 @@ func_to_host_pathlist () | |||
3263 | ;; | 3309 | ;; |
3264 | esac | 3310 | esac |
3265 | case "$1" in | 3311 | case "$1" in |
3266 | *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" | 3312 | *: ) func_append func_to_host_pathlist_result ";" |
3267 | ;; | 3313 | ;; |
3268 | esac | 3314 | esac |
3269 | ;; | 3315 | ;; |
@@ -3295,24 +3341,20 @@ func_emit_cwrapperexe_src () | |||
3295 | */ | 3341 | */ |
3296 | EOF | 3342 | EOF |
3297 | cat <<"EOF" | 3343 | cat <<"EOF" |
3344 | #ifdef _MSC_VER | ||
3345 | # define _CRT_SECURE_NO_DEPRECATE 1 | ||
3346 | #endif | ||
3298 | #include <stdio.h> | 3347 | #include <stdio.h> |
3299 | #include <stdlib.h> | 3348 | #include <stdlib.h> |
3300 | #ifdef _MSC_VER | 3349 | #ifdef _MSC_VER |
3301 | # include <direct.h> | 3350 | # include <direct.h> |
3302 | # include <process.h> | 3351 | # include <process.h> |
3303 | # include <io.h> | 3352 | # include <io.h> |
3304 | # define setmode _setmode | ||
3305 | #else | 3353 | #else |
3306 | # include <unistd.h> | 3354 | # include <unistd.h> |
3307 | # include <stdint.h> | 3355 | # include <stdint.h> |
3308 | # ifdef __CYGWIN__ | 3356 | # ifdef __CYGWIN__ |
3309 | # include <io.h> | 3357 | # include <io.h> |
3310 | # define HAVE_SETENV | ||
3311 | # ifdef __STRICT_ANSI__ | ||
3312 | char *realpath (const char *, char *); | ||
3313 | int putenv (char *); | ||
3314 | int setenv (const char *, const char *, int); | ||
3315 | # endif | ||
3316 | # endif | 3358 | # endif |
3317 | #endif | 3359 | #endif |
3318 | #include <malloc.h> | 3360 | #include <malloc.h> |
@@ -3324,6 +3366,44 @@ int setenv (const char *, const char *, int); | |||
3324 | #include <fcntl.h> | 3366 | #include <fcntl.h> |
3325 | #include <sys/stat.h> | 3367 | #include <sys/stat.h> |
3326 | 3368 | ||
3369 | /* declarations of non-ANSI functions */ | ||
3370 | #if defined(__MINGW32__) | ||
3371 | # ifdef __STRICT_ANSI__ | ||
3372 | int _putenv (const char *); | ||
3373 | # endif | ||
3374 | #elif defined(__CYGWIN__) | ||
3375 | # ifdef __STRICT_ANSI__ | ||
3376 | char *realpath (const char *, char *); | ||
3377 | int putenv (char *); | ||
3378 | int setenv (const char *, const char *, int); | ||
3379 | # endif | ||
3380 | /* #elif defined (other platforms) ... */ | ||
3381 | #endif | ||
3382 | |||
3383 | /* portability defines, excluding path handling macros */ | ||
3384 | #if defined(_MSC_VER) | ||
3385 | # define setmode _setmode | ||
3386 | # define stat _stat | ||
3387 | # define chmod _chmod | ||
3388 | # define getcwd _getcwd | ||
3389 | # define putenv _putenv | ||
3390 | # define S_IXUSR _S_IEXEC | ||
3391 | # ifndef _INTPTR_T_DEFINED | ||
3392 | # define _INTPTR_T_DEFINED | ||
3393 | # define intptr_t int | ||
3394 | # endif | ||
3395 | #elif defined(__MINGW32__) | ||
3396 | # define setmode _setmode | ||
3397 | # define stat _stat | ||
3398 | # define chmod _chmod | ||
3399 | # define getcwd _getcwd | ||
3400 | # define putenv _putenv | ||
3401 | #elif defined(__CYGWIN__) | ||
3402 | # define HAVE_SETENV | ||
3403 | # define FOPEN_WB "wb" | ||
3404 | /* #elif defined (other platforms) ... */ | ||
3405 | #endif | ||
3406 | |||
3327 | #if defined(PATH_MAX) | 3407 | #if defined(PATH_MAX) |
3328 | # define LT_PATHMAX PATH_MAX | 3408 | # define LT_PATHMAX PATH_MAX |
3329 | #elif defined(MAXPATHLEN) | 3409 | #elif defined(MAXPATHLEN) |
@@ -3339,14 +3419,7 @@ int setenv (const char *, const char *, int); | |||
3339 | # define S_IXGRP 0 | 3419 | # define S_IXGRP 0 |
3340 | #endif | 3420 | #endif |
3341 | 3421 | ||
3342 | #ifdef _MSC_VER | 3422 | /* path handling portability macros */ |
3343 | # define S_IXUSR _S_IEXEC | ||
3344 | # define stat _stat | ||
3345 | # ifndef _INTPTR_T_DEFINED | ||
3346 | # define intptr_t int | ||
3347 | # endif | ||
3348 | #endif | ||
3349 | |||
3350 | #ifndef DIR_SEPARATOR | 3423 | #ifndef DIR_SEPARATOR |
3351 | # define DIR_SEPARATOR '/' | 3424 | # define DIR_SEPARATOR '/' |
3352 | # define PATH_SEPARATOR ':' | 3425 | # define PATH_SEPARATOR ':' |
@@ -3377,10 +3450,6 @@ int setenv (const char *, const char *, int); | |||
3377 | # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) | 3450 | # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) |
3378 | #endif /* PATH_SEPARATOR_2 */ | 3451 | #endif /* PATH_SEPARATOR_2 */ |
3379 | 3452 | ||
3380 | #ifdef __CYGWIN__ | ||
3381 | # define FOPEN_WB "wb" | ||
3382 | #endif | ||
3383 | |||
3384 | #ifndef FOPEN_WB | 3453 | #ifndef FOPEN_WB |
3385 | # define FOPEN_WB "w" | 3454 | # define FOPEN_WB "w" |
3386 | #endif | 3455 | #endif |
@@ -3394,7 +3463,7 @@ int setenv (const char *, const char *, int); | |||
3394 | } while (0) | 3463 | } while (0) |
3395 | 3464 | ||
3396 | #undef LTWRAPPER_DEBUGPRINTF | 3465 | #undef LTWRAPPER_DEBUGPRINTF |
3397 | #if defined DEBUGWRAPPER | 3466 | #if defined LT_DEBUGWRAPPER |
3398 | # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args | 3467 | # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args |
3399 | static void | 3468 | static void |
3400 | ltwrapper_debugprintf (const char *fmt, ...) | 3469 | ltwrapper_debugprintf (const char *fmt, ...) |
@@ -3421,28 +3490,11 @@ char *strendzap (char *str, const char *pat); | |||
3421 | void lt_fatal (const char *message, ...); | 3490 | void lt_fatal (const char *message, ...); |
3422 | void lt_setenv (const char *name, const char *value); | 3491 | void lt_setenv (const char *name, const char *value); |
3423 | char *lt_extend_str (const char *orig_value, const char *add, int to_end); | 3492 | char *lt_extend_str (const char *orig_value, const char *add, int to_end); |
3424 | void lt_opt_process_env_set (const char *arg); | ||
3425 | void lt_opt_process_env_prepend (const char *arg); | ||
3426 | void lt_opt_process_env_append (const char *arg); | ||
3427 | int lt_split_name_value (const char *arg, char** name, char** value); | ||
3428 | void lt_update_exe_path (const char *name, const char *value); | 3493 | void lt_update_exe_path (const char *name, const char *value); |
3429 | void lt_update_lib_path (const char *name, const char *value); | 3494 | void lt_update_lib_path (const char *name, const char *value); |
3430 | 3495 | char **prepare_spawn (char **argv); | |
3431 | static const char *script_text_part1 = | 3496 | void lt_dump_script (FILE *f); |
3432 | EOF | ||
3433 | |||
3434 | func_emit_wrapper_part1 yes | | ||
3435 | $SED -e 's/\([\\"]\)/\\\1/g' \ | ||
3436 | -e 's/^/ "/' -e 's/$/\\n"/' | ||
3437 | echo ";" | ||
3438 | cat <<EOF | ||
3439 | |||
3440 | static const char *script_text_part2 = | ||
3441 | EOF | 3497 | EOF |
3442 | func_emit_wrapper_part2 yes | | ||
3443 | $SED -e 's/\([\\"]\)/\\\1/g' \ | ||
3444 | -e 's/^/ "/' -e 's/$/\\n"/' | ||
3445 | echo ";" | ||
3446 | 3498 | ||
3447 | cat <<EOF | 3499 | cat <<EOF |
3448 | const char * MAGIC_EXE = "$magic_exe"; | 3500 | const char * MAGIC_EXE = "$magic_exe"; |
@@ -3494,18 +3546,6 @@ static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; | |||
3494 | 3546 | ||
3495 | static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; | 3547 | static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; |
3496 | 3548 | ||
3497 | static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7; | ||
3498 | static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set"; | ||
3499 | /* argument is putenv-style "foo=bar", value of foo is set to bar */ | ||
3500 | |||
3501 | static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11; | ||
3502 | static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend"; | ||
3503 | /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */ | ||
3504 | |||
3505 | static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10; | ||
3506 | static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append"; | ||
3507 | /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */ | ||
3508 | |||
3509 | int | 3549 | int |
3510 | main (int argc, char *argv[]) | 3550 | main (int argc, char *argv[]) |
3511 | { | 3551 | { |
@@ -3538,8 +3578,7 @@ EOF | |||
3538 | esac | 3578 | esac |
3539 | 3579 | ||
3540 | cat <<"EOF" | 3580 | cat <<"EOF" |
3541 | printf ("%s", script_text_part1); | 3581 | lt_dump_script (stdout); |
3542 | printf ("%s", script_text_part2); | ||
3543 | return 0; | 3582 | return 0; |
3544 | } | 3583 | } |
3545 | } | 3584 | } |
@@ -3631,51 +3670,6 @@ EOF | |||
3631 | newargc=0; | 3670 | newargc=0; |
3632 | for (i = 1; i < argc; i++) | 3671 | for (i = 1; i < argc; i++) |
3633 | { | 3672 | { |
3634 | if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0) | ||
3635 | { | ||
3636 | if (argv[i][env_set_opt_len] == '=') | ||
3637 | { | ||
3638 | const char *p = argv[i] + env_set_opt_len + 1; | ||
3639 | lt_opt_process_env_set (p); | ||
3640 | } | ||
3641 | else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc) | ||
3642 | { | ||
3643 | lt_opt_process_env_set (argv[++i]); /* don't copy */ | ||
3644 | } | ||
3645 | else | ||
3646 | lt_fatal ("%s missing required argument", env_set_opt); | ||
3647 | continue; | ||
3648 | } | ||
3649 | if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0) | ||
3650 | { | ||
3651 | if (argv[i][env_prepend_opt_len] == '=') | ||
3652 | { | ||
3653 | const char *p = argv[i] + env_prepend_opt_len + 1; | ||
3654 | lt_opt_process_env_prepend (p); | ||
3655 | } | ||
3656 | else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc) | ||
3657 | { | ||
3658 | lt_opt_process_env_prepend (argv[++i]); /* don't copy */ | ||
3659 | } | ||
3660 | else | ||
3661 | lt_fatal ("%s missing required argument", env_prepend_opt); | ||
3662 | continue; | ||
3663 | } | ||
3664 | if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0) | ||
3665 | { | ||
3666 | if (argv[i][env_append_opt_len] == '=') | ||
3667 | { | ||
3668 | const char *p = argv[i] + env_append_opt_len + 1; | ||
3669 | lt_opt_process_env_append (p); | ||
3670 | } | ||
3671 | else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc) | ||
3672 | { | ||
3673 | lt_opt_process_env_append (argv[++i]); /* don't copy */ | ||
3674 | } | ||
3675 | else | ||
3676 | lt_fatal ("%s missing required argument", env_append_opt); | ||
3677 | continue; | ||
3678 | } | ||
3679 | if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0) | 3673 | if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0) |
3680 | { | 3674 | { |
3681 | /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX | 3675 | /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX |
@@ -3707,6 +3701,7 @@ EOF | |||
3707 | mingw*) | 3701 | mingw*) |
3708 | cat <<"EOF" | 3702 | cat <<"EOF" |
3709 | /* execv doesn't actually work on mingw as expected on unix */ | 3703 | /* execv doesn't actually work on mingw as expected on unix */ |
3704 | newargz = prepare_spawn (newargz); | ||
3710 | rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); | 3705 | rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); |
3711 | if (rval == -1) | 3706 | if (rval == -1) |
3712 | { | 3707 | { |
@@ -4051,89 +4046,6 @@ lt_extend_str (const char *orig_value, const char *add, int to_end) | |||
4051 | return new_value; | 4046 | return new_value; |
4052 | } | 4047 | } |
4053 | 4048 | ||
4054 | int | ||
4055 | lt_split_name_value (const char *arg, char** name, char** value) | ||
4056 | { | ||
4057 | const char *p; | ||
4058 | int len; | ||
4059 | if (!arg || !*arg) | ||
4060 | return 1; | ||
4061 | |||
4062 | p = strchr (arg, (int)'='); | ||
4063 | |||
4064 | if (!p) | ||
4065 | return 1; | ||
4066 | |||
4067 | *value = xstrdup (++p); | ||
4068 | |||
4069 | len = strlen (arg) - strlen (*value); | ||
4070 | *name = XMALLOC (char, len); | ||
4071 | strncpy (*name, arg, len-1); | ||
4072 | (*name)[len - 1] = '\0'; | ||
4073 | |||
4074 | return 0; | ||
4075 | } | ||
4076 | |||
4077 | void | ||
4078 | lt_opt_process_env_set (const char *arg) | ||
4079 | { | ||
4080 | char *name = NULL; | ||
4081 | char *value = NULL; | ||
4082 | |||
4083 | if (lt_split_name_value (arg, &name, &value) != 0) | ||
4084 | { | ||
4085 | XFREE (name); | ||
4086 | XFREE (value); | ||
4087 | lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); | ||
4088 | } | ||
4089 | |||
4090 | lt_setenv (name, value); | ||
4091 | XFREE (name); | ||
4092 | XFREE (value); | ||
4093 | } | ||
4094 | |||
4095 | void | ||
4096 | lt_opt_process_env_prepend (const char *arg) | ||
4097 | { | ||
4098 | char *name = NULL; | ||
4099 | char *value = NULL; | ||
4100 | char *new_value = NULL; | ||
4101 | |||
4102 | if (lt_split_name_value (arg, &name, &value) != 0) | ||
4103 | { | ||
4104 | XFREE (name); | ||
4105 | XFREE (value); | ||
4106 | lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); | ||
4107 | } | ||
4108 | |||
4109 | new_value = lt_extend_str (getenv (name), value, 0); | ||
4110 | lt_setenv (name, new_value); | ||
4111 | XFREE (new_value); | ||
4112 | XFREE (name); | ||
4113 | XFREE (value); | ||
4114 | } | ||
4115 | |||
4116 | void | ||
4117 | lt_opt_process_env_append (const char *arg) | ||
4118 | { | ||
4119 | char *name = NULL; | ||
4120 | char *value = NULL; | ||
4121 | char *new_value = NULL; | ||
4122 | |||
4123 | if (lt_split_name_value (arg, &name, &value) != 0) | ||
4124 | { | ||
4125 | XFREE (name); | ||
4126 | XFREE (value); | ||
4127 | lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); | ||
4128 | } | ||
4129 | |||
4130 | new_value = lt_extend_str (getenv (name), value, 1); | ||
4131 | lt_setenv (name, new_value); | ||
4132 | XFREE (new_value); | ||
4133 | XFREE (name); | ||
4134 | XFREE (value); | ||
4135 | } | ||
4136 | |||
4137 | void | 4049 | void |
4138 | lt_update_exe_path (const char *name, const char *value) | 4050 | lt_update_exe_path (const char *name, const char *value) |
4139 | { | 4051 | { |
@@ -4170,11 +4082,152 @@ lt_update_lib_path (const char *name, const char *value) | |||
4170 | } | 4082 | } |
4171 | } | 4083 | } |
4172 | 4084 | ||
4085 | EOF | ||
4086 | case $host_os in | ||
4087 | mingw*) | ||
4088 | cat <<"EOF" | ||
4089 | |||
4090 | /* Prepares an argument vector before calling spawn(). | ||
4091 | Note that spawn() does not by itself call the command interpreter | ||
4092 | (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : | ||
4093 | ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); | ||
4094 | GetVersionEx(&v); | ||
4095 | v.dwPlatformId == VER_PLATFORM_WIN32_NT; | ||
4096 | }) ? "cmd.exe" : "command.com"). | ||
4097 | Instead it simply concatenates the arguments, separated by ' ', and calls | ||
4098 | CreateProcess(). We must quote the arguments since Win32 CreateProcess() | ||
4099 | interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a | ||
4100 | special way: | ||
4101 | - Space and tab are interpreted as delimiters. They are not treated as | ||
4102 | delimiters if they are surrounded by double quotes: "...". | ||
4103 | - Unescaped double quotes are removed from the input. Their only effect is | ||
4104 | that within double quotes, space and tab are treated like normal | ||
4105 | characters. | ||
4106 | - Backslashes not followed by double quotes are not special. | ||
4107 | - But 2*n+1 backslashes followed by a double quote become | ||
4108 | n backslashes followed by a double quote (n >= 0): | ||
4109 | \" -> " | ||
4110 | \\\" -> \" | ||
4111 | \\\\\" -> \\" | ||
4112 | */ | ||
4113 | #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" | ||
4114 | #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" | ||
4115 | char ** | ||
4116 | prepare_spawn (char **argv) | ||
4117 | { | ||
4118 | size_t argc; | ||
4119 | char **new_argv; | ||
4120 | size_t i; | ||
4121 | |||
4122 | /* Count number of arguments. */ | ||
4123 | for (argc = 0; argv[argc] != NULL; argc++) | ||
4124 | ; | ||
4125 | |||
4126 | /* Allocate new argument vector. */ | ||
4127 | new_argv = XMALLOC (char *, argc + 1); | ||
4128 | |||
4129 | /* Put quoted arguments into the new argument vector. */ | ||
4130 | for (i = 0; i < argc; i++) | ||
4131 | { | ||
4132 | const char *string = argv[i]; | ||
4173 | 4133 | ||
4134 | if (string[0] == '\0') | ||
4135 | new_argv[i] = xstrdup ("\"\""); | ||
4136 | else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) | ||
4137 | { | ||
4138 | int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); | ||
4139 | size_t length; | ||
4140 | unsigned int backslashes; | ||
4141 | const char *s; | ||
4142 | char *quoted_string; | ||
4143 | char *p; | ||
4144 | |||
4145 | length = 0; | ||
4146 | backslashes = 0; | ||
4147 | if (quote_around) | ||
4148 | length++; | ||
4149 | for (s = string; *s != '\0'; s++) | ||
4150 | { | ||
4151 | char c = *s; | ||
4152 | if (c == '"') | ||
4153 | length += backslashes + 1; | ||
4154 | length++; | ||
4155 | if (c == '\\') | ||
4156 | backslashes++; | ||
4157 | else | ||
4158 | backslashes = 0; | ||
4159 | } | ||
4160 | if (quote_around) | ||
4161 | length += backslashes + 1; | ||
4162 | |||
4163 | quoted_string = XMALLOC (char, length + 1); | ||
4164 | |||
4165 | p = quoted_string; | ||
4166 | backslashes = 0; | ||
4167 | if (quote_around) | ||
4168 | *p++ = '"'; | ||
4169 | for (s = string; *s != '\0'; s++) | ||
4170 | { | ||
4171 | char c = *s; | ||
4172 | if (c == '"') | ||
4173 | { | ||
4174 | unsigned int j; | ||
4175 | for (j = backslashes + 1; j > 0; j--) | ||
4176 | *p++ = '\\'; | ||
4177 | } | ||
4178 | *p++ = c; | ||
4179 | if (c == '\\') | ||
4180 | backslashes++; | ||
4181 | else | ||
4182 | backslashes = 0; | ||
4183 | } | ||
4184 | if (quote_around) | ||
4185 | { | ||
4186 | unsigned int j; | ||
4187 | for (j = backslashes; j > 0; j--) | ||
4188 | *p++ = '\\'; | ||
4189 | *p++ = '"'; | ||
4190 | } | ||
4191 | *p = '\0'; | ||
4192 | |||
4193 | new_argv[i] = quoted_string; | ||
4194 | } | ||
4195 | else | ||
4196 | new_argv[i] = (char *) string; | ||
4197 | } | ||
4198 | new_argv[argc] = NULL; | ||
4199 | |||
4200 | return new_argv; | ||
4201 | } | ||
4202 | EOF | ||
4203 | ;; | ||
4204 | esac | ||
4205 | |||
4206 | cat <<"EOF" | ||
4207 | void lt_dump_script (FILE* f) | ||
4208 | { | ||
4209 | EOF | ||
4210 | func_emit_wrapper yes | | ||
4211 | $SED -e 's/\([\\"]\)/\\\1/g' \ | ||
4212 | -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' | ||
4213 | |||
4214 | cat <<"EOF" | ||
4215 | } | ||
4174 | EOF | 4216 | EOF |
4175 | } | 4217 | } |
4176 | # end: func_emit_cwrapperexe_src | 4218 | # end: func_emit_cwrapperexe_src |
4177 | 4219 | ||
4220 | # func_win32_import_lib_p ARG | ||
4221 | # True if ARG is an import lib, as indicated by $file_magic_cmd | ||
4222 | func_win32_import_lib_p () | ||
4223 | { | ||
4224 | $opt_debug | ||
4225 | case `eval "$file_magic_cmd \"\$1\" 2>/dev/null" | $SED -e 10q` in | ||
4226 | *import*) : ;; | ||
4227 | *) false ;; | ||
4228 | esac | ||
4229 | } | ||
4230 | |||
4178 | # func_mode_link arg... | 4231 | # func_mode_link arg... |
4179 | func_mode_link () | 4232 | func_mode_link () |
4180 | { | 4233 | { |
@@ -4661,7 +4714,7 @@ func_mode_link () | |||
4661 | esac | 4714 | esac |
4662 | case $host in | 4715 | case $host in |
4663 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) | 4716 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) |
4664 | testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` | 4717 | testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` |
4665 | case :$dllsearchpath: in | 4718 | case :$dllsearchpath: in |
4666 | *":$dir:"*) ;; | 4719 | *":$dir:"*) ;; |
4667 | ::) dllsearchpath=$dir;; | 4720 | ::) dllsearchpath=$dir;; |
@@ -4680,7 +4733,7 @@ func_mode_link () | |||
4680 | -l*) | 4733 | -l*) |
4681 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then | 4734 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then |
4682 | case $host in | 4735 | case $host in |
4683 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) | 4736 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) |
4684 | # These systems don't actually have a C or math library (as such) | 4737 | # These systems don't actually have a C or math library (as such) |
4685 | continue | 4738 | continue |
4686 | ;; | 4739 | ;; |
@@ -4705,6 +4758,9 @@ func_mode_link () | |||
4705 | # Compiler inserts libc in the correct place for threads to work | 4758 | # Compiler inserts libc in the correct place for threads to work |
4706 | test "X$arg" = "X-lc" && continue | 4759 | test "X$arg" = "X-lc" && continue |
4707 | ;; | 4760 | ;; |
4761 | *-*-linux*) | ||
4762 | test "X$arg" = "X-lc" && continue | ||
4763 | ;; | ||
4708 | esac | 4764 | esac |
4709 | elif test "X$arg" = "X-lc_r"; then | 4765 | elif test "X$arg" = "X-lc_r"; then |
4710 | case $host in | 4766 | case $host in |
@@ -4866,7 +4922,7 @@ func_mode_link () | |||
4866 | for flag in $args; do | 4922 | for flag in $args; do |
4867 | IFS="$save_ifs" | 4923 | IFS="$save_ifs" |
4868 | func_quote_for_eval "$flag" | 4924 | func_quote_for_eval "$flag" |
4869 | arg="$arg $wl$func_quote_for_eval_result" | 4925 | arg="$arg $func_quote_for_eval_result" |
4870 | compiler_flags="$compiler_flags $func_quote_for_eval_result" | 4926 | compiler_flags="$compiler_flags $func_quote_for_eval_result" |
4871 | done | 4927 | done |
4872 | IFS="$save_ifs" | 4928 | IFS="$save_ifs" |
@@ -4922,8 +4978,9 @@ func_mode_link () | |||
4922 | # -F/path gives path to uninstalled frameworks, gcc on darwin | 4978 | # -F/path gives path to uninstalled frameworks, gcc on darwin |
4923 | # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC | 4979 | # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC |
4924 | # @file GCC response files | 4980 | # @file GCC response files |
4981 | # -tp=* Portland pgcc target processor selection | ||
4925 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ | 4982 | -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ |
4926 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) | 4983 | -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) |
4927 | func_quote_for_eval "$arg" | 4984 | func_quote_for_eval "$arg" |
4928 | arg="$func_quote_for_eval_result" | 4985 | arg="$func_quote_for_eval_result" |
4929 | func_append compile_command " $arg" | 4986 | func_append compile_command " $arg" |
@@ -5070,7 +5127,7 @@ func_mode_link () | |||
5070 | func_fatal_help "the \`$prevarg' option requires an argument" | 5127 | func_fatal_help "the \`$prevarg' option requires an argument" |
5071 | 5128 | ||
5072 | if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then | 5129 | if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then |
5073 | eval arg=\"$export_dynamic_flag_spec\" | 5130 | eval "arg=\"$export_dynamic_flag_spec\"" |
5074 | func_append compile_command " $arg" | 5131 | func_append compile_command " $arg" |
5075 | func_append finalize_command " $arg" | 5132 | func_append finalize_command " $arg" |
5076 | fi | 5133 | fi |
@@ -5083,12 +5140,12 @@ func_mode_link () | |||
5083 | 5140 | ||
5084 | if test -n "$shlibpath_var"; then | 5141 | if test -n "$shlibpath_var"; then |
5085 | # get the directories listed in $shlibpath_var | 5142 | # get the directories listed in $shlibpath_var |
5086 | eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` | 5143 | eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` |
5087 | else | 5144 | else |
5088 | shlib_search_path= | 5145 | shlib_search_path= |
5089 | fi | 5146 | fi |
5090 | eval sys_lib_search_path=\"$sys_lib_search_path_spec\" | 5147 | eval "sys_lib_search_path=\"$sys_lib_search_path_spec\"" |
5091 | eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" | 5148 | eval "sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"" |
5092 | 5149 | ||
5093 | func_dirname "$output" "/" "" | 5150 | func_dirname "$output" "/" "" |
5094 | output_objdir="$func_dirname_result$objdir" | 5151 | output_objdir="$func_dirname_result$objdir" |
@@ -5206,7 +5263,8 @@ func_mode_link () | |||
5206 | # Collect preopened libtool deplibs, except any this library | 5263 | # Collect preopened libtool deplibs, except any this library |
5207 | # has declared as weak libs | 5264 | # has declared as weak libs |
5208 | for deplib in $dependency_libs; do | 5265 | for deplib in $dependency_libs; do |
5209 | deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` | 5266 | func_basename "$deplib" |
5267 | deplib_base=$func_basename_result | ||
5210 | case " $weak_libs " in | 5268 | case " $weak_libs " in |
5211 | *" $deplib_base "*) ;; | 5269 | *" $deplib_base "*) ;; |
5212 | *) deplibs="$deplibs $deplib" ;; | 5270 | *) deplibs="$deplibs $deplib" ;; |
@@ -5385,7 +5443,7 @@ func_mode_link () | |||
5385 | match_pattern*) | 5443 | match_pattern*) |
5386 | set dummy $deplibs_check_method; shift | 5444 | set dummy $deplibs_check_method; shift |
5387 | match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` | 5445 | match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` |
5388 | if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | 5446 | if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ |
5389 | | $EGREP "$match_pattern_regex" > /dev/null; then | 5447 | | $EGREP "$match_pattern_regex" > /dev/null; then |
5390 | valid_a_lib=yes | 5448 | valid_a_lib=yes |
5391 | fi | 5449 | fi |
@@ -5395,15 +5453,15 @@ func_mode_link () | |||
5395 | ;; | 5453 | ;; |
5396 | esac | 5454 | esac |
5397 | if test "$valid_a_lib" != yes; then | 5455 | if test "$valid_a_lib" != yes; then |
5398 | $ECHO | 5456 | echo |
5399 | $ECHO "*** Warning: Trying to link with static lib archive $deplib." | 5457 | $ECHO "*** Warning: Trying to link with static lib archive $deplib." |
5400 | $ECHO "*** I have the capability to make that library automatically link in when" | 5458 | echo "*** I have the capability to make that library automatically link in when" |
5401 | $ECHO "*** you link to this library. But I can only do this if you have a" | 5459 | echo "*** you link to this library. But I can only do this if you have a" |
5402 | $ECHO "*** shared version of the library, which you do not appear to have" | 5460 | echo "*** shared version of the library, which you do not appear to have" |
5403 | $ECHO "*** because the file extensions .$libext of this argument makes me believe" | 5461 | echo "*** because the file extensions .$libext of this argument makes me believe" |
5404 | $ECHO "*** that it is just a static archive that I should not use here." | 5462 | echo "*** that it is just a static archive that I should not use here." |
5405 | else | 5463 | else |
5406 | $ECHO | 5464 | echo |
5407 | $ECHO "*** Warning: Linking the shared library $output against the" | 5465 | $ECHO "*** Warning: Linking the shared library $output against the" |
5408 | $ECHO "*** static library $deplib is not portable!" | 5466 | $ECHO "*** static library $deplib is not portable!" |
5409 | deplibs="$deplib $deplibs" | 5467 | deplibs="$deplib $deplibs" |
@@ -5476,7 +5534,7 @@ func_mode_link () | |||
5476 | 5534 | ||
5477 | # Convert "-framework foo" to "foo.ltframework" | 5535 | # Convert "-framework foo" to "foo.ltframework" |
5478 | if test -n "$inherited_linker_flags"; then | 5536 | if test -n "$inherited_linker_flags"; then |
5479 | tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` | 5537 | tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` |
5480 | for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do | 5538 | for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do |
5481 | case " $new_inherited_linker_flags " in | 5539 | case " $new_inherited_linker_flags " in |
5482 | *" $tmp_inherited_linker_flag "*) ;; | 5540 | *" $tmp_inherited_linker_flag "*) ;; |
@@ -5484,7 +5542,7 @@ func_mode_link () | |||
5484 | esac | 5542 | esac |
5485 | done | 5543 | done |
5486 | fi | 5544 | fi |
5487 | dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 5545 | dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
5488 | if test "$linkmode,$pass" = "lib,link" || | 5546 | if test "$linkmode,$pass" = "lib,link" || |
5489 | test "$linkmode,$pass" = "prog,scan" || | 5547 | test "$linkmode,$pass" = "prog,scan" || |
5490 | { test "$linkmode" != prog && test "$linkmode" != lib; }; then | 5548 | { test "$linkmode" != prog && test "$linkmode" != lib; }; then |
@@ -5738,7 +5796,7 @@ func_mode_link () | |||
5738 | fi | 5796 | fi |
5739 | done | 5797 | done |
5740 | if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then | 5798 | if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then |
5741 | $ECHO | 5799 | echo |
5742 | if test "$linkmode" = prog; then | 5800 | if test "$linkmode" = prog; then |
5743 | $ECHO "*** Warning: Linking the executable $output against the loadable module" | 5801 | $ECHO "*** Warning: Linking the executable $output against the loadable module" |
5744 | else | 5802 | else |
@@ -5777,7 +5835,7 @@ func_mode_link () | |||
5777 | shift | 5835 | shift |
5778 | realname="$1" | 5836 | realname="$1" |
5779 | shift | 5837 | shift |
5780 | libname=`eval "\\$ECHO \"$libname_spec\""` | 5838 | eval "libname=\"$libname_spec\"" |
5781 | # use dlname if we got it. it's perfectly good, no? | 5839 | # use dlname if we got it. it's perfectly good, no? |
5782 | if test -n "$dlname"; then | 5840 | if test -n "$dlname"; then |
5783 | soname="$dlname" | 5841 | soname="$dlname" |
@@ -5790,7 +5848,7 @@ func_mode_link () | |||
5790 | versuffix="-$major" | 5848 | versuffix="-$major" |
5791 | ;; | 5849 | ;; |
5792 | esac | 5850 | esac |
5793 | eval soname=\"$soname_spec\" | 5851 | eval "soname=\"$soname_spec\"" |
5794 | else | 5852 | else |
5795 | soname="$realname" | 5853 | soname="$realname" |
5796 | fi | 5854 | fi |
@@ -5841,9 +5899,9 @@ func_mode_link () | |||
5841 | if test "X$dlopenmodule" != "X$lib"; then | 5899 | if test "X$dlopenmodule" != "X$lib"; then |
5842 | $ECHO "*** Warning: lib $linklib is a module, not a shared library" | 5900 | $ECHO "*** Warning: lib $linklib is a module, not a shared library" |
5843 | if test -z "$old_library" ; then | 5901 | if test -z "$old_library" ; then |
5844 | $ECHO | 5902 | echo |
5845 | $ECHO "*** And there doesn't seem to be a static archive available" | 5903 | echo "*** And there doesn't seem to be a static archive available" |
5846 | $ECHO "*** The link will probably fail, sorry" | 5904 | echo "*** The link will probably fail, sorry" |
5847 | else | 5905 | else |
5848 | add="$dir/$old_library" | 5906 | add="$dir/$old_library" |
5849 | fi | 5907 | fi |
@@ -5983,21 +6041,21 @@ func_mode_link () | |||
5983 | 6041 | ||
5984 | # Just print a warning and add the library to dependency_libs so | 6042 | # Just print a warning and add the library to dependency_libs so |
5985 | # that the program can be linked against the static library. | 6043 | # that the program can be linked against the static library. |
5986 | $ECHO | 6044 | echo |
5987 | $ECHO "*** Warning: This system can not link to static lib archive $lib." | 6045 | $ECHO "*** Warning: This system can not link to static lib archive $lib." |
5988 | $ECHO "*** I have the capability to make that library automatically link in when" | 6046 | echo "*** I have the capability to make that library automatically link in when" |
5989 | $ECHO "*** you link to this library. But I can only do this if you have a" | 6047 | echo "*** you link to this library. But I can only do this if you have a" |
5990 | $ECHO "*** shared version of the library, which you do not appear to have." | 6048 | echo "*** shared version of the library, which you do not appear to have." |
5991 | if test "$module" = yes; then | 6049 | if test "$module" = yes; then |
5992 | $ECHO "*** But as you try to build a module library, libtool will still create " | 6050 | echo "*** But as you try to build a module library, libtool will still create " |
5993 | $ECHO "*** a static module, that should work as long as the dlopening application" | 6051 | echo "*** a static module, that should work as long as the dlopening application" |
5994 | $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." | 6052 | echo "*** is linked with the -dlopen flag to resolve symbols at runtime." |
5995 | if test -z "$global_symbol_pipe"; then | 6053 | if test -z "$global_symbol_pipe"; then |
5996 | $ECHO | 6054 | echo |
5997 | $ECHO "*** However, this would only work if libtool was able to extract symbol" | 6055 | echo "*** However, this would only work if libtool was able to extract symbol" |
5998 | $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" | 6056 | echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
5999 | $ECHO "*** not find such a program. So, this module is probably useless." | 6057 | echo "*** not find such a program. So, this module is probably useless." |
6000 | $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." | 6058 | echo "*** \`nm' from GNU binutils and a full rebuild may help." |
6001 | fi | 6059 | fi |
6002 | if test "$build_old_libs" = no; then | 6060 | if test "$build_old_libs" = no; then |
6003 | build_libtool_libs=module | 6061 | build_libtool_libs=module |
@@ -6051,6 +6109,7 @@ func_mode_link () | |||
6051 | if test "$link_all_deplibs" != no; then | 6109 | if test "$link_all_deplibs" != no; then |
6052 | # Add the search paths of all dependency libraries | 6110 | # Add the search paths of all dependency libraries |
6053 | for deplib in $dependency_libs; do | 6111 | for deplib in $dependency_libs; do |
6112 | path= | ||
6054 | case $deplib in | 6113 | case $deplib in |
6055 | -L*) path="$deplib" ;; | 6114 | -L*) path="$deplib" ;; |
6056 | *.la) | 6115 | *.la) |
@@ -6071,7 +6130,7 @@ func_mode_link () | |||
6071 | case $host in | 6130 | case $host in |
6072 | *-*-darwin*) | 6131 | *-*-darwin*) |
6073 | depdepl= | 6132 | depdepl= |
6074 | eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` | 6133 | deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` |
6075 | if test -n "$deplibrary_names" ; then | 6134 | if test -n "$deplibrary_names" ; then |
6076 | for tmp in $deplibrary_names ; do | 6135 | for tmp in $deplibrary_names ; do |
6077 | depdepl=$tmp | 6136 | depdepl=$tmp |
@@ -6093,7 +6152,7 @@ func_mode_link () | |||
6093 | ;; | 6152 | ;; |
6094 | esac | 6153 | esac |
6095 | else | 6154 | else |
6096 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | 6155 | libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
6097 | test -z "$libdir" && \ | 6156 | test -z "$libdir" && \ |
6098 | func_fatal_error "\`$deplib' is not a valid libtool archive" | 6157 | func_fatal_error "\`$deplib' is not a valid libtool archive" |
6099 | test "$absdir" != "$libdir" && \ | 6158 | test "$absdir" != "$libdir" && \ |
@@ -6116,7 +6175,7 @@ func_mode_link () | |||
6116 | compile_deplibs="$new_inherited_linker_flags $compile_deplibs" | 6175 | compile_deplibs="$new_inherited_linker_flags $compile_deplibs" |
6117 | finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" | 6176 | finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" |
6118 | else | 6177 | else |
6119 | compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 6178 | compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
6120 | fi | 6179 | fi |
6121 | fi | 6180 | fi |
6122 | dependency_libs="$newdependency_libs" | 6181 | dependency_libs="$newdependency_libs" |
@@ -6146,7 +6205,7 @@ func_mode_link () | |||
6146 | fi | 6205 | fi |
6147 | for var in $vars dependency_libs; do | 6206 | for var in $vars dependency_libs; do |
6148 | # Add libraries to $var in reverse order | 6207 | # Add libraries to $var in reverse order |
6149 | eval tmp_libs=\"\$$var\" | 6208 | eval tmp_libs=\$$var |
6150 | new_libs= | 6209 | new_libs= |
6151 | for deplib in $tmp_libs; do | 6210 | for deplib in $tmp_libs; do |
6152 | # FIXME: Pedantically, this is the right thing to do, so | 6211 | # FIXME: Pedantically, this is the right thing to do, so |
@@ -6197,7 +6256,7 @@ func_mode_link () | |||
6197 | *) tmp_libs="$tmp_libs $deplib" ;; | 6256 | *) tmp_libs="$tmp_libs $deplib" ;; |
6198 | esac | 6257 | esac |
6199 | done | 6258 | done |
6200 | eval $var=\"$tmp_libs\" | 6259 | eval $var=\$tmp_libs |
6201 | done # for var | 6260 | done # for var |
6202 | fi | 6261 | fi |
6203 | # Last step: remove runtime libs from dependency_libs | 6262 | # Last step: remove runtime libs from dependency_libs |
@@ -6260,8 +6319,8 @@ func_mode_link () | |||
6260 | lib*) | 6319 | lib*) |
6261 | func_stripname 'lib' '.la' "$outputname" | 6320 | func_stripname 'lib' '.la' "$outputname" |
6262 | name=$func_stripname_result | 6321 | name=$func_stripname_result |
6263 | eval shared_ext=\"$shrext_cmds\" | 6322 | eval "shared_ext=\"$shrext_cmds\"" |
6264 | eval libname=\"$libname_spec\" | 6323 | eval "libname=\"$libname_spec\"" |
6265 | ;; | 6324 | ;; |
6266 | *) | 6325 | *) |
6267 | test "$module" = no && \ | 6326 | test "$module" = no && \ |
@@ -6271,8 +6330,8 @@ func_mode_link () | |||
6271 | # Add the "lib" prefix for modules if required | 6330 | # Add the "lib" prefix for modules if required |
6272 | func_stripname '' '.la' "$outputname" | 6331 | func_stripname '' '.la' "$outputname" |
6273 | name=$func_stripname_result | 6332 | name=$func_stripname_result |
6274 | eval shared_ext=\"$shrext_cmds\" | 6333 | eval "shared_ext=\"$shrext_cmds\"" |
6275 | eval libname=\"$libname_spec\" | 6334 | eval "libname=\"$libname_spec\"" |
6276 | else | 6335 | else |
6277 | func_stripname '' '.la' "$outputname" | 6336 | func_stripname '' '.la' "$outputname" |
6278 | libname=$func_stripname_result | 6337 | libname=$func_stripname_result |
@@ -6284,7 +6343,7 @@ func_mode_link () | |||
6284 | if test "$deplibs_check_method" != pass_all; then | 6343 | if test "$deplibs_check_method" != pass_all; then |
6285 | func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" | 6344 | func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" |
6286 | else | 6345 | else |
6287 | $ECHO | 6346 | echo |
6288 | $ECHO "*** Warning: Linking the shared library $output against the non-libtool" | 6347 | $ECHO "*** Warning: Linking the shared library $output against the non-libtool" |
6289 | $ECHO "*** objects $objs is not portable!" | 6348 | $ECHO "*** objects $objs is not portable!" |
6290 | libobjs="$libobjs $objs" | 6349 | libobjs="$libobjs $objs" |
@@ -6352,7 +6411,7 @@ func_mode_link () | |||
6352 | age="$number_minor" | 6411 | age="$number_minor" |
6353 | revision="$number_revision" | 6412 | revision="$number_revision" |
6354 | ;; | 6413 | ;; |
6355 | freebsd-aout|freebsd-elf|sunos) | 6414 | freebsd-aout|freebsd-elf|qnx|sunos) |
6356 | current="$number_major" | 6415 | current="$number_major" |
6357 | revision="$number_minor" | 6416 | revision="$number_minor" |
6358 | age="0" | 6417 | age="0" |
@@ -6586,14 +6645,14 @@ func_mode_link () | |||
6586 | oldlibs="$oldlibs $output_objdir/$libname.$libext" | 6645 | oldlibs="$oldlibs $output_objdir/$libname.$libext" |
6587 | 6646 | ||
6588 | # Transform .lo files to .o files. | 6647 | # Transform .lo files to .o files. |
6589 | oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` | 6648 | oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` |
6590 | fi | 6649 | fi |
6591 | 6650 | ||
6592 | # Eliminate all temporary directories. | 6651 | # Eliminate all temporary directories. |
6593 | #for path in $notinst_path; do | 6652 | #for path in $notinst_path; do |
6594 | # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` | 6653 | # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` |
6595 | # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` | 6654 | # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` |
6596 | # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` | 6655 | # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` |
6597 | #done | 6656 | #done |
6598 | 6657 | ||
6599 | if test -n "$xrpath"; then | 6658 | if test -n "$xrpath"; then |
@@ -6634,7 +6693,7 @@ func_mode_link () | |||
6634 | if test "$build_libtool_libs" = yes; then | 6693 | if test "$build_libtool_libs" = yes; then |
6635 | if test -n "$rpath"; then | 6694 | if test -n "$rpath"; then |
6636 | case $host in | 6695 | case $host in |
6637 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) | 6696 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) |
6638 | # these systems don't actually have a c library (as such)! | 6697 | # these systems don't actually have a c library (as such)! |
6639 | ;; | 6698 | ;; |
6640 | *-*-rhapsody* | *-*-darwin1.[012]) | 6699 | *-*-rhapsody* | *-*-darwin1.[012]) |
@@ -6711,21 +6770,21 @@ EOF | |||
6711 | esac | 6770 | esac |
6712 | fi | 6771 | fi |
6713 | if test -n "$i" ; then | 6772 | if test -n "$i" ; then |
6714 | libname=`eval "\\$ECHO \"$libname_spec\""` | 6773 | eval "libname=\"$libname_spec\"" |
6715 | deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` | 6774 | eval "deplib_matches=\"$library_names_spec\"" |
6716 | set dummy $deplib_matches; shift | 6775 | set dummy $deplib_matches; shift |
6717 | deplib_match=$1 | 6776 | deplib_match=$1 |
6718 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | 6777 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
6719 | newdeplibs="$newdeplibs $i" | 6778 | newdeplibs="$newdeplibs $i" |
6720 | else | 6779 | else |
6721 | droppeddeps=yes | 6780 | droppeddeps=yes |
6722 | $ECHO | 6781 | echo |
6723 | $ECHO "*** Warning: dynamic linker does not accept needed library $i." | 6782 | $ECHO "*** Warning: dynamic linker does not accept needed library $i." |
6724 | $ECHO "*** I have the capability to make that library automatically link in when" | 6783 | echo "*** I have the capability to make that library automatically link in when" |
6725 | $ECHO "*** you link to this library. But I can only do this if you have a" | 6784 | echo "*** you link to this library. But I can only do this if you have a" |
6726 | $ECHO "*** shared version of the library, which I believe you do not have" | 6785 | echo "*** shared version of the library, which I believe you do not have" |
6727 | $ECHO "*** because a test_compile did reveal that the linker did not use it for" | 6786 | echo "*** because a test_compile did reveal that the linker did not use it for" |
6728 | $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." | 6787 | echo "*** its dynamic dependency list that programs get resolved with at runtime." |
6729 | fi | 6788 | fi |
6730 | fi | 6789 | fi |
6731 | ;; | 6790 | ;; |
@@ -6754,30 +6813,30 @@ EOF | |||
6754 | esac | 6813 | esac |
6755 | fi | 6814 | fi |
6756 | if test -n "$i" ; then | 6815 | if test -n "$i" ; then |
6757 | libname=`eval "\\$ECHO \"$libname_spec\""` | 6816 | eval "libname=\"$libname_spec\"" |
6758 | deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` | 6817 | eval "deplib_matches=\"$library_names_spec\"" |
6759 | set dummy $deplib_matches; shift | 6818 | set dummy $deplib_matches; shift |
6760 | deplib_match=$1 | 6819 | deplib_match=$1 |
6761 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | 6820 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then |
6762 | newdeplibs="$newdeplibs $i" | 6821 | newdeplibs="$newdeplibs $i" |
6763 | else | 6822 | else |
6764 | droppeddeps=yes | 6823 | droppeddeps=yes |
6765 | $ECHO | 6824 | echo |
6766 | $ECHO "*** Warning: dynamic linker does not accept needed library $i." | 6825 | $ECHO "*** Warning: dynamic linker does not accept needed library $i." |
6767 | $ECHO "*** I have the capability to make that library automatically link in when" | 6826 | echo "*** I have the capability to make that library automatically link in when" |
6768 | $ECHO "*** you link to this library. But I can only do this if you have a" | 6827 | echo "*** you link to this library. But I can only do this if you have a" |
6769 | $ECHO "*** shared version of the library, which you do not appear to have" | 6828 | echo "*** shared version of the library, which you do not appear to have" |
6770 | $ECHO "*** because a test_compile did reveal that the linker did not use this one" | 6829 | echo "*** because a test_compile did reveal that the linker did not use this one" |
6771 | $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." | 6830 | echo "*** as a dynamic dependency that programs can get resolved with at runtime." |
6772 | fi | 6831 | fi |
6773 | fi | 6832 | fi |
6774 | else | 6833 | else |
6775 | droppeddeps=yes | 6834 | droppeddeps=yes |
6776 | $ECHO | 6835 | echo |
6777 | $ECHO "*** Warning! Library $i is needed by this library but I was not able to" | 6836 | $ECHO "*** Warning! Library $i is needed by this library but I was not able to" |
6778 | $ECHO "*** make it link in! You will probably need to install it or some" | 6837 | echo "*** make it link in! You will probably need to install it or some" |
6779 | $ECHO "*** library that it depends on before this library will be fully" | 6838 | echo "*** library that it depends on before this library will be fully" |
6780 | $ECHO "*** functional. Installing it before continuing would be even better." | 6839 | echo "*** functional. Installing it before continuing would be even better." |
6781 | fi | 6840 | fi |
6782 | ;; | 6841 | ;; |
6783 | *) | 6842 | *) |
@@ -6804,7 +6863,7 @@ EOF | |||
6804 | esac | 6863 | esac |
6805 | fi | 6864 | fi |
6806 | if test -n "$a_deplib" ; then | 6865 | if test -n "$a_deplib" ; then |
6807 | libname=`eval "\\$ECHO \"$libname_spec\""` | 6866 | eval "libname=\"$libname_spec\"" |
6808 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | 6867 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
6809 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | 6868 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
6810 | for potent_lib in $potential_libs; do | 6869 | for potent_lib in $potential_libs; do |
@@ -6823,10 +6882,10 @@ EOF | |||
6823 | potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` | 6882 | potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` |
6824 | case $potliblink in | 6883 | case $potliblink in |
6825 | [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; | 6884 | [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; |
6826 | *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; | 6885 | *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; |
6827 | esac | 6886 | esac |
6828 | done | 6887 | done |
6829 | if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | | 6888 | if eval "$file_magic_cmd \"\$potlib\"" 2>/dev/null | |
6830 | $SED -e 10q | | 6889 | $SED -e 10q | |
6831 | $EGREP "$file_magic_regex" > /dev/null; then | 6890 | $EGREP "$file_magic_regex" > /dev/null; then |
6832 | newdeplibs="$newdeplibs $a_deplib" | 6891 | newdeplibs="$newdeplibs $a_deplib" |
@@ -6838,12 +6897,12 @@ EOF | |||
6838 | fi | 6897 | fi |
6839 | if test -n "$a_deplib" ; then | 6898 | if test -n "$a_deplib" ; then |
6840 | droppeddeps=yes | 6899 | droppeddeps=yes |
6841 | $ECHO | 6900 | echo |
6842 | $ECHO "*** Warning: linker path does not have real file for library $a_deplib." | 6901 | $ECHO "*** Warning: linker path does not have real file for library $a_deplib." |
6843 | $ECHO "*** I have the capability to make that library automatically link in when" | 6902 | echo "*** I have the capability to make that library automatically link in when" |
6844 | $ECHO "*** you link to this library. But I can only do this if you have a" | 6903 | echo "*** you link to this library. But I can only do this if you have a" |
6845 | $ECHO "*** shared version of the library, which you do not appear to have" | 6904 | echo "*** shared version of the library, which you do not appear to have" |
6846 | $ECHO "*** because I did check the linker path looking for a file starting" | 6905 | echo "*** because I did check the linker path looking for a file starting" |
6847 | if test -z "$potlib" ; then | 6906 | if test -z "$potlib" ; then |
6848 | $ECHO "*** with $libname but no candidates were found. (...for file magic test)" | 6907 | $ECHO "*** with $libname but no candidates were found. (...for file magic test)" |
6849 | else | 6908 | else |
@@ -6876,12 +6935,12 @@ EOF | |||
6876 | esac | 6935 | esac |
6877 | fi | 6936 | fi |
6878 | if test -n "$a_deplib" ; then | 6937 | if test -n "$a_deplib" ; then |
6879 | libname=`eval "\\$ECHO \"$libname_spec\""` | 6938 | eval "libname=\"$libname_spec\"" |
6880 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | 6939 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do |
6881 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | 6940 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` |
6882 | for potent_lib in $potential_libs; do | 6941 | for potent_lib in $potential_libs; do |
6883 | potlib="$potent_lib" # see symlink-check above in file_magic test | 6942 | potlib="$potent_lib" # see symlink-check above in file_magic test |
6884 | if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ | 6943 | if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ |
6885 | $EGREP "$match_pattern_regex" > /dev/null; then | 6944 | $EGREP "$match_pattern_regex" > /dev/null; then |
6886 | newdeplibs="$newdeplibs $a_deplib" | 6945 | newdeplibs="$newdeplibs $a_deplib" |
6887 | a_deplib="" | 6946 | a_deplib="" |
@@ -6892,12 +6951,12 @@ EOF | |||
6892 | fi | 6951 | fi |
6893 | if test -n "$a_deplib" ; then | 6952 | if test -n "$a_deplib" ; then |
6894 | droppeddeps=yes | 6953 | droppeddeps=yes |
6895 | $ECHO | 6954 | echo |
6896 | $ECHO "*** Warning: linker path does not have real file for library $a_deplib." | 6955 | $ECHO "*** Warning: linker path does not have real file for library $a_deplib." |
6897 | $ECHO "*** I have the capability to make that library automatically link in when" | 6956 | echo "*** I have the capability to make that library automatically link in when" |
6898 | $ECHO "*** you link to this library. But I can only do this if you have a" | 6957 | echo "*** you link to this library. But I can only do this if you have a" |
6899 | $ECHO "*** shared version of the library, which you do not appear to have" | 6958 | echo "*** shared version of the library, which you do not appear to have" |
6900 | $ECHO "*** because I did check the linker path looking for a file starting" | 6959 | echo "*** because I did check the linker path looking for a file starting" |
6901 | if test -z "$potlib" ; then | 6960 | if test -z "$potlib" ; then |
6902 | $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" | 6961 | $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" |
6903 | else | 6962 | else |
@@ -6915,25 +6974,25 @@ EOF | |||
6915 | ;; | 6974 | ;; |
6916 | none | unknown | *) | 6975 | none | unknown | *) |
6917 | newdeplibs="" | 6976 | newdeplibs="" |
6918 | tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ | 6977 | tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` |
6919 | -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` | ||
6920 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | 6978 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then |
6921 | for i in $predeps $postdeps ; do | 6979 | for i in $predeps $postdeps ; do |
6922 | # can't use Xsed below, because $i might contain '/' | 6980 | # can't use Xsed below, because $i might contain '/' |
6923 | tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` | 6981 | tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` |
6924 | done | 6982 | done |
6925 | fi | 6983 | fi |
6926 | if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | | 6984 | case $tmp_deplibs in |
6927 | $GREP . >/dev/null; then | 6985 | *[!\ \ ]*) |
6928 | $ECHO | 6986 | echo |
6929 | if test "X$deplibs_check_method" = "Xnone"; then | 6987 | if test "X$deplibs_check_method" = "Xnone"; then |
6930 | $ECHO "*** Warning: inter-library dependencies are not supported in this platform." | 6988 | echo "*** Warning: inter-library dependencies are not supported in this platform." |
6931 | else | 6989 | else |
6932 | $ECHO "*** Warning: inter-library dependencies are not known to be supported." | 6990 | echo "*** Warning: inter-library dependencies are not known to be supported." |
6933 | fi | 6991 | fi |
6934 | $ECHO "*** All declared inter-library dependencies are being dropped." | 6992 | echo "*** All declared inter-library dependencies are being dropped." |
6935 | droppeddeps=yes | 6993 | droppeddeps=yes |
6936 | fi | 6994 | ;; |
6995 | esac | ||
6937 | ;; | 6996 | ;; |
6938 | esac | 6997 | esac |
6939 | versuffix=$versuffix_save | 6998 | versuffix=$versuffix_save |
@@ -6945,23 +7004,23 @@ EOF | |||
6945 | case $host in | 7004 | case $host in |
6946 | *-*-rhapsody* | *-*-darwin1.[012]) | 7005 | *-*-rhapsody* | *-*-darwin1.[012]) |
6947 | # On Rhapsody replace the C library with the System framework | 7006 | # On Rhapsody replace the C library with the System framework |
6948 | newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` | 7007 | newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` |
6949 | ;; | 7008 | ;; |
6950 | esac | 7009 | esac |
6951 | 7010 | ||
6952 | if test "$droppeddeps" = yes; then | 7011 | if test "$droppeddeps" = yes; then |
6953 | if test "$module" = yes; then | 7012 | if test "$module" = yes; then |
6954 | $ECHO | 7013 | echo |
6955 | $ECHO "*** Warning: libtool could not satisfy all declared inter-library" | 7014 | echo "*** Warning: libtool could not satisfy all declared inter-library" |
6956 | $ECHO "*** dependencies of module $libname. Therefore, libtool will create" | 7015 | $ECHO "*** dependencies of module $libname. Therefore, libtool will create" |
6957 | $ECHO "*** a static module, that should work as long as the dlopening" | 7016 | echo "*** a static module, that should work as long as the dlopening" |
6958 | $ECHO "*** application is linked with the -dlopen flag." | 7017 | echo "*** application is linked with the -dlopen flag." |
6959 | if test -z "$global_symbol_pipe"; then | 7018 | if test -z "$global_symbol_pipe"; then |
6960 | $ECHO | 7019 | echo |
6961 | $ECHO "*** However, this would only work if libtool was able to extract symbol" | 7020 | echo "*** However, this would only work if libtool was able to extract symbol" |
6962 | $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" | 7021 | echo "*** lists from a program, using \`nm' or equivalent, but libtool could" |
6963 | $ECHO "*** not find such a program. So, this module is probably useless." | 7022 | echo "*** not find such a program. So, this module is probably useless." |
6964 | $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." | 7023 | echo "*** \`nm' from GNU binutils and a full rebuild may help." |
6965 | fi | 7024 | fi |
6966 | if test "$build_old_libs" = no; then | 7025 | if test "$build_old_libs" = no; then |
6967 | oldlibs="$output_objdir/$libname.$libext" | 7026 | oldlibs="$output_objdir/$libname.$libext" |
@@ -6971,16 +7030,16 @@ EOF | |||
6971 | build_libtool_libs=no | 7030 | build_libtool_libs=no |
6972 | fi | 7031 | fi |
6973 | else | 7032 | else |
6974 | $ECHO "*** The inter-library dependencies that have been dropped here will be" | 7033 | echo "*** The inter-library dependencies that have been dropped here will be" |
6975 | $ECHO "*** automatically added whenever a program is linked with this library" | 7034 | echo "*** automatically added whenever a program is linked with this library" |
6976 | $ECHO "*** or is declared to -dlopen it." | 7035 | echo "*** or is declared to -dlopen it." |
6977 | 7036 | ||
6978 | if test "$allow_undefined" = no; then | 7037 | if test "$allow_undefined" = no; then |
6979 | $ECHO | 7038 | echo |
6980 | $ECHO "*** Since this library must not contain undefined symbols," | 7039 | echo "*** Since this library must not contain undefined symbols," |
6981 | $ECHO "*** because either the platform does not support them or" | 7040 | echo "*** because either the platform does not support them or" |
6982 | $ECHO "*** it was explicitly requested with -no-undefined," | 7041 | echo "*** it was explicitly requested with -no-undefined," |
6983 | $ECHO "*** libtool will only create a static version of it." | 7042 | echo "*** libtool will only create a static version of it." |
6984 | if test "$build_old_libs" = no; then | 7043 | if test "$build_old_libs" = no; then |
6985 | oldlibs="$output_objdir/$libname.$libext" | 7044 | oldlibs="$output_objdir/$libname.$libext" |
6986 | build_libtool_libs=module | 7045 | build_libtool_libs=module |
@@ -6997,9 +7056,9 @@ EOF | |||
6997 | # Time to change all our "foo.ltframework" stuff back to "-framework foo" | 7056 | # Time to change all our "foo.ltframework" stuff back to "-framework foo" |
6998 | case $host in | 7057 | case $host in |
6999 | *-*-darwin*) | 7058 | *-*-darwin*) |
7000 | newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 7059 | newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
7001 | new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 7060 | new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
7002 | deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 7061 | deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
7003 | ;; | 7062 | ;; |
7004 | esac | 7063 | esac |
7005 | 7064 | ||
@@ -7059,7 +7118,7 @@ EOF | |||
7059 | esac | 7118 | esac |
7060 | fi | 7119 | fi |
7061 | else | 7120 | else |
7062 | eval flag=\"$hardcode_libdir_flag_spec\" | 7121 | eval "flag=\"$hardcode_libdir_flag_spec\"" |
7063 | dep_rpath="$dep_rpath $flag" | 7122 | dep_rpath="$dep_rpath $flag" |
7064 | fi | 7123 | fi |
7065 | elif test -n "$runpath_var"; then | 7124 | elif test -n "$runpath_var"; then |
@@ -7074,9 +7133,9 @@ EOF | |||
7074 | test -n "$hardcode_libdirs"; then | 7133 | test -n "$hardcode_libdirs"; then |
7075 | libdir="$hardcode_libdirs" | 7134 | libdir="$hardcode_libdirs" |
7076 | if test -n "$hardcode_libdir_flag_spec_ld"; then | 7135 | if test -n "$hardcode_libdir_flag_spec_ld"; then |
7077 | eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" | 7136 | eval "dep_rpath=\"$hardcode_libdir_flag_spec_ld\"" |
7078 | else | 7137 | else |
7079 | eval dep_rpath=\"$hardcode_libdir_flag_spec\" | 7138 | eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" |
7080 | fi | 7139 | fi |
7081 | fi | 7140 | fi |
7082 | if test -n "$runpath_var" && test -n "$perm_rpath"; then | 7141 | if test -n "$runpath_var" && test -n "$perm_rpath"; then |
@@ -7085,7 +7144,8 @@ EOF | |||
7085 | for dir in $perm_rpath; do | 7144 | for dir in $perm_rpath; do |
7086 | rpath="$rpath$dir:" | 7145 | rpath="$rpath$dir:" |
7087 | done | 7146 | done |
7088 | eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" | 7147 | eval $runpath_var=\$rpath\$$runpath_var |
7148 | export $runpath_var | ||
7089 | fi | 7149 | fi |
7090 | test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" | 7150 | test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" |
7091 | fi | 7151 | fi |
@@ -7093,19 +7153,20 @@ EOF | |||
7093 | shlibpath="$finalize_shlibpath" | 7153 | shlibpath="$finalize_shlibpath" |
7094 | test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" | 7154 | test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" |
7095 | if test -n "$shlibpath"; then | 7155 | if test -n "$shlibpath"; then |
7096 | eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" | 7156 | eval $shlibpath_var=\$shlibpath\$$shlibpath_var |
7157 | export $shlibpath_var | ||
7097 | fi | 7158 | fi |
7098 | 7159 | ||
7099 | # Get the real and link names of the library. | 7160 | # Get the real and link names of the library. |
7100 | eval shared_ext=\"$shrext_cmds\" | 7161 | eval "shared_ext=\"$shrext_cmds\"" |
7101 | eval library_names=\"$library_names_spec\" | 7162 | eval "library_names=\"$library_names_spec\"" |
7102 | set dummy $library_names | 7163 | set dummy $library_names |
7103 | shift | 7164 | shift |
7104 | realname="$1" | 7165 | realname="$1" |
7105 | shift | 7166 | shift |
7106 | 7167 | ||
7107 | if test -n "$soname_spec"; then | 7168 | if test -n "$soname_spec"; then |
7108 | eval soname=\"$soname_spec\" | 7169 | eval "soname=\"$soname_spec\"" |
7109 | else | 7170 | else |
7110 | soname="$realname" | 7171 | soname="$realname" |
7111 | fi | 7172 | fi |
@@ -7121,7 +7182,7 @@ EOF | |||
7121 | done | 7182 | done |
7122 | 7183 | ||
7123 | # Use standard objects if they are pic | 7184 | # Use standard objects if they are pic |
7124 | test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | 7185 | test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` |
7125 | test "X$libobjs" = "X " && libobjs= | 7186 | test "X$libobjs" = "X " && libobjs= |
7126 | 7187 | ||
7127 | delfiles= | 7188 | delfiles= |
@@ -7161,7 +7222,7 @@ EOF | |||
7161 | save_ifs="$IFS"; IFS='~' | 7222 | save_ifs="$IFS"; IFS='~' |
7162 | for cmd in $cmds; do | 7223 | for cmd in $cmds; do |
7163 | IFS="$save_ifs" | 7224 | IFS="$save_ifs" |
7164 | eval cmd=\"$cmd\" | 7225 | eval "cmd=\"$cmd\"" |
7165 | func_len " $cmd" | 7226 | func_len " $cmd" |
7166 | len=$func_len_result | 7227 | len=$func_len_result |
7167 | if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then | 7228 | if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then |
@@ -7187,7 +7248,7 @@ EOF | |||
7187 | if test -n "$export_symbols" && test -n "$include_expsyms"; then | 7248 | if test -n "$export_symbols" && test -n "$include_expsyms"; then |
7188 | tmp_export_symbols="$export_symbols" | 7249 | tmp_export_symbols="$export_symbols" |
7189 | test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" | 7250 | test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" |
7190 | $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' | 7251 | $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" |
7191 | fi | 7252 | fi |
7192 | 7253 | ||
7193 | if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then | 7254 | if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then |
@@ -7225,7 +7286,7 @@ EOF | |||
7225 | fi | 7286 | fi |
7226 | if test -n "$whole_archive_flag_spec"; then | 7287 | if test -n "$whole_archive_flag_spec"; then |
7227 | save_libobjs=$libobjs | 7288 | save_libobjs=$libobjs |
7228 | eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | 7289 | eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" |
7229 | test "X$libobjs" = "X " && libobjs= | 7290 | test "X$libobjs" = "X " && libobjs= |
7230 | else | 7291 | else |
7231 | gentop="$output_objdir/${outputname}x" | 7292 | gentop="$output_objdir/${outputname}x" |
@@ -7238,30 +7299,30 @@ EOF | |||
7238 | fi | 7299 | fi |
7239 | 7300 | ||
7240 | if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then | 7301 | if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then |
7241 | eval flag=\"$thread_safe_flag_spec\" | 7302 | eval "flag=\"$thread_safe_flag_spec\"" |
7242 | linker_flags="$linker_flags $flag" | 7303 | linker_flags="$linker_flags $flag" |
7243 | fi | 7304 | fi |
7244 | 7305 | ||
7245 | # Make a backup of the uninstalled library when relinking | 7306 | # Make a backup of the uninstalled library when relinking |
7246 | if test "$mode" = relink; then | 7307 | if test "$mode" = relink; then |
7247 | $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? | 7308 | $opt_dry_run || (cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U) || exit $? |
7248 | fi | 7309 | fi |
7249 | 7310 | ||
7250 | # Do each of the archive commands. | 7311 | # Do each of the archive commands. |
7251 | if test "$module" = yes && test -n "$module_cmds" ; then | 7312 | if test "$module" = yes && test -n "$module_cmds" ; then |
7252 | if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then | 7313 | if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then |
7253 | eval test_cmds=\"$module_expsym_cmds\" | 7314 | eval "test_cmds=\"$module_expsym_cmds\"" |
7254 | cmds=$module_expsym_cmds | 7315 | cmds=$module_expsym_cmds |
7255 | else | 7316 | else |
7256 | eval test_cmds=\"$module_cmds\" | 7317 | eval "test_cmds=\"$module_cmds\"" |
7257 | cmds=$module_cmds | 7318 | cmds=$module_cmds |
7258 | fi | 7319 | fi |
7259 | else | 7320 | else |
7260 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | 7321 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then |
7261 | eval test_cmds=\"$archive_expsym_cmds\" | 7322 | eval "test_cmds=\"$archive_expsym_cmds\"" |
7262 | cmds=$archive_expsym_cmds | 7323 | cmds=$archive_expsym_cmds |
7263 | else | 7324 | else |
7264 | eval test_cmds=\"$archive_cmds\" | 7325 | eval "test_cmds=\"$archive_cmds\"" |
7265 | cmds=$archive_cmds | 7326 | cmds=$archive_cmds |
7266 | fi | 7327 | fi |
7267 | fi | 7328 | fi |
@@ -7288,7 +7349,8 @@ EOF | |||
7288 | save_libobjs=$libobjs | 7349 | save_libobjs=$libobjs |
7289 | fi | 7350 | fi |
7290 | save_output=$output | 7351 | save_output=$output |
7291 | output_la=`$ECHO "X$output" | $Xsed -e "$basename"` | 7352 | func_basename "$output" |
7353 | output_la=$func_basename_result | ||
7292 | 7354 | ||
7293 | # Clear the reloadable object creation command queue and | 7355 | # Clear the reloadable object creation command queue and |
7294 | # initialize k to one. | 7356 | # initialize k to one. |
@@ -7301,12 +7363,12 @@ EOF | |||
7301 | if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then | 7363 | if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then |
7302 | output=${output_objdir}/${output_la}.lnkscript | 7364 | output=${output_objdir}/${output_la}.lnkscript |
7303 | func_verbose "creating GNU ld script: $output" | 7365 | func_verbose "creating GNU ld script: $output" |
7304 | $ECHO 'INPUT (' > $output | 7366 | echo 'INPUT (' > $output |
7305 | for obj in $save_libobjs | 7367 | for obj in $save_libobjs |
7306 | do | 7368 | do |
7307 | $ECHO "$obj" >> $output | 7369 | $ECHO "$obj" >> $output |
7308 | done | 7370 | done |
7309 | $ECHO ')' >> $output | 7371 | echo ')' >> $output |
7310 | delfiles="$delfiles $output" | 7372 | delfiles="$delfiles $output" |
7311 | elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then | 7373 | elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then |
7312 | output=${output_objdir}/${output_la}.lnk | 7374 | output=${output_objdir}/${output_la}.lnk |
@@ -7329,7 +7391,7 @@ EOF | |||
7329 | if test -n "$save_libobjs"; then | 7391 | if test -n "$save_libobjs"; then |
7330 | func_verbose "creating reloadable object files..." | 7392 | func_verbose "creating reloadable object files..." |
7331 | output=$output_objdir/$output_la-${k}.$objext | 7393 | output=$output_objdir/$output_la-${k}.$objext |
7332 | eval test_cmds=\"$reload_cmds\" | 7394 | eval "test_cmds=\"$reload_cmds\"" |
7333 | func_len " $test_cmds" | 7395 | func_len " $test_cmds" |
7334 | len0=$func_len_result | 7396 | len0=$func_len_result |
7335 | len=$len0 | 7397 | len=$len0 |
@@ -7348,17 +7410,19 @@ EOF | |||
7348 | # command to the queue. | 7410 | # command to the queue. |
7349 | if test "$k" -eq 1 ; then | 7411 | if test "$k" -eq 1 ; then |
7350 | # The first file doesn't have a previous command to add. | 7412 | # The first file doesn't have a previous command to add. |
7351 | eval concat_cmds=\"$reload_cmds $objlist $last_robj\" | 7413 | reload_objs=$objlist |
7414 | eval "concat_cmds=\"$reload_cmds\"" | ||
7352 | else | 7415 | else |
7353 | # All subsequent reloadable object files will link in | 7416 | # All subsequent reloadable object files will link in |
7354 | # the last one created. | 7417 | # the last one created. |
7355 | eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" | 7418 | reload_objs="$objlist $last_robj" |
7419 | eval "concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"" | ||
7356 | fi | 7420 | fi |
7357 | last_robj=$output_objdir/$output_la-${k}.$objext | 7421 | last_robj=$output_objdir/$output_la-${k}.$objext |
7358 | func_arith $k + 1 | 7422 | func_arith $k + 1 |
7359 | k=$func_arith_result | 7423 | k=$func_arith_result |
7360 | output=$output_objdir/$output_la-${k}.$objext | 7424 | output=$output_objdir/$output_la-${k}.$objext |
7361 | objlist=$obj | 7425 | objlist=" $obj" |
7362 | func_len " $last_robj" | 7426 | func_len " $last_robj" |
7363 | func_arith $len0 + $func_len_result | 7427 | func_arith $len0 + $func_len_result |
7364 | len=$func_arith_result | 7428 | len=$func_arith_result |
@@ -7368,9 +7432,10 @@ EOF | |||
7368 | # reloadable object file. All subsequent reloadable object | 7432 | # reloadable object file. All subsequent reloadable object |
7369 | # files will link in the last one created. | 7433 | # files will link in the last one created. |
7370 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | 7434 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
7371 | eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" | 7435 | reload_objs="$objlist $last_robj" |
7436 | eval "concat_cmds=\"\${concat_cmds}$reload_cmds\"" | ||
7372 | if test -n "$last_robj"; then | 7437 | if test -n "$last_robj"; then |
7373 | eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" | 7438 | eval "concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"" |
7374 | fi | 7439 | fi |
7375 | delfiles="$delfiles $output" | 7440 | delfiles="$delfiles $output" |
7376 | 7441 | ||
@@ -7385,9 +7450,9 @@ EOF | |||
7385 | libobjs=$output | 7450 | libobjs=$output |
7386 | # Append the command to create the export file. | 7451 | # Append the command to create the export file. |
7387 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | 7452 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
7388 | eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" | 7453 | eval "concat_cmds=\"\$concat_cmds$export_symbols_cmds\"" |
7389 | if test -n "$last_robj"; then | 7454 | if test -n "$last_robj"; then |
7390 | eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" | 7455 | eval "concat_cmds=\"\$concat_cmds~\$RM $last_robj\"" |
7391 | fi | 7456 | fi |
7392 | fi | 7457 | fi |
7393 | 7458 | ||
@@ -7427,7 +7492,7 @@ EOF | |||
7427 | if test -n "$export_symbols" && test -n "$include_expsyms"; then | 7492 | if test -n "$export_symbols" && test -n "$include_expsyms"; then |
7428 | tmp_export_symbols="$export_symbols" | 7493 | tmp_export_symbols="$export_symbols" |
7429 | test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" | 7494 | test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" |
7430 | $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' | 7495 | $opt_dry_run || $ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols" |
7431 | fi | 7496 | fi |
7432 | 7497 | ||
7433 | if test -n "$orig_export_symbols"; then | 7498 | if test -n "$orig_export_symbols"; then |
@@ -7450,7 +7515,7 @@ EOF | |||
7450 | output=$save_output | 7515 | output=$save_output |
7451 | 7516 | ||
7452 | if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then | 7517 | if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then |
7453 | eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | 7518 | eval "libobjs=\"\$libobjs $whole_archive_flag_spec\"" |
7454 | test "X$libobjs" = "X " && libobjs= | 7519 | test "X$libobjs" = "X " && libobjs= |
7455 | fi | 7520 | fi |
7456 | # Expand the library linking commands again to reset the | 7521 | # Expand the library linking commands again to reset the |
@@ -7474,7 +7539,7 @@ EOF | |||
7474 | 7539 | ||
7475 | if test -n "$delfiles"; then | 7540 | if test -n "$delfiles"; then |
7476 | # Append the command to remove temporary files to $cmds. | 7541 | # Append the command to remove temporary files to $cmds. |
7477 | eval cmds=\"\$cmds~\$RM $delfiles\" | 7542 | eval "cmds=\"\$cmds~\$RM $delfiles\"" |
7478 | fi | 7543 | fi |
7479 | 7544 | ||
7480 | # Add any objects from preloaded convenience libraries | 7545 | # Add any objects from preloaded convenience libraries |
@@ -7490,7 +7555,7 @@ EOF | |||
7490 | save_ifs="$IFS"; IFS='~' | 7555 | save_ifs="$IFS"; IFS='~' |
7491 | for cmd in $cmds; do | 7556 | for cmd in $cmds; do |
7492 | IFS="$save_ifs" | 7557 | IFS="$save_ifs" |
7493 | eval cmd=\"$cmd\" | 7558 | eval "cmd=\"$cmd\"" |
7494 | $opt_silent || { | 7559 | $opt_silent || { |
7495 | func_quote_for_expand "$cmd" | 7560 | func_quote_for_expand "$cmd" |
7496 | eval "func_echo $func_quote_for_expand_result" | 7561 | eval "func_echo $func_quote_for_expand_result" |
@@ -7512,7 +7577,7 @@ EOF | |||
7512 | 7577 | ||
7513 | # Restore the uninstalled library and exit | 7578 | # Restore the uninstalled library and exit |
7514 | if test "$mode" = relink; then | 7579 | if test "$mode" = relink; then |
7515 | $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? | 7580 | $opt_dry_run || (cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname) || exit $? |
7516 | 7581 | ||
7517 | if test -n "$convenience"; then | 7582 | if test -n "$convenience"; then |
7518 | if test -z "$whole_archive_flag_spec"; then | 7583 | if test -z "$whole_archive_flag_spec"; then |
@@ -7591,8 +7656,8 @@ EOF | |||
7591 | 7656 | ||
7592 | if test -n "$convenience"; then | 7657 | if test -n "$convenience"; then |
7593 | if test -n "$whole_archive_flag_spec"; then | 7658 | if test -n "$whole_archive_flag_spec"; then |
7594 | eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" | 7659 | eval "tmp_whole_archive_flags=\"$whole_archive_flag_spec\"" |
7595 | reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` | 7660 | reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` |
7596 | else | 7661 | else |
7597 | gentop="$output_objdir/${obj}x" | 7662 | gentop="$output_objdir/${obj}x" |
7598 | generated="$generated $gentop" | 7663 | generated="$generated $gentop" |
@@ -7603,7 +7668,7 @@ EOF | |||
7603 | fi | 7668 | fi |
7604 | 7669 | ||
7605 | # Create the old-style object. | 7670 | # Create the old-style object. |
7606 | reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test | 7671 | reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test |
7607 | 7672 | ||
7608 | output="$obj" | 7673 | output="$obj" |
7609 | func_execute_cmds "$reload_cmds" 'exit $?' | 7674 | func_execute_cmds "$reload_cmds" 'exit $?' |
@@ -7625,7 +7690,7 @@ EOF | |||
7625 | # Create an invalid libtool object if no PIC, so that we don't | 7690 | # Create an invalid libtool object if no PIC, so that we don't |
7626 | # accidentally link it into a program. | 7691 | # accidentally link it into a program. |
7627 | # $show "echo timestamp > $libobj" | 7692 | # $show "echo timestamp > $libobj" |
7628 | # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? | 7693 | # $opt_dry_run || echo timestamp > $libobj || exit $? |
7629 | exit $EXIT_SUCCESS | 7694 | exit $EXIT_SUCCESS |
7630 | fi | 7695 | fi |
7631 | 7696 | ||
@@ -7663,8 +7728,8 @@ EOF | |||
7663 | case $host in | 7728 | case $host in |
7664 | *-*-rhapsody* | *-*-darwin1.[012]) | 7729 | *-*-rhapsody* | *-*-darwin1.[012]) |
7665 | # On Rhapsody replace the C library is the System framework | 7730 | # On Rhapsody replace the C library is the System framework |
7666 | compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` | 7731 | compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` |
7667 | finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` | 7732 | finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` |
7668 | ;; | 7733 | ;; |
7669 | esac | 7734 | esac |
7670 | 7735 | ||
@@ -7681,8 +7746,8 @@ EOF | |||
7681 | esac | 7746 | esac |
7682 | fi | 7747 | fi |
7683 | # Time to change all our "foo.ltframework" stuff back to "-framework foo" | 7748 | # Time to change all our "foo.ltframework" stuff back to "-framework foo" |
7684 | compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 7749 | compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
7685 | finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` | 7750 | finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` |
7686 | ;; | 7751 | ;; |
7687 | esac | 7752 | esac |
7688 | 7753 | ||
@@ -7748,7 +7813,7 @@ EOF | |||
7748 | esac | 7813 | esac |
7749 | fi | 7814 | fi |
7750 | else | 7815 | else |
7751 | eval flag=\"$hardcode_libdir_flag_spec\" | 7816 | eval "flag=\"$hardcode_libdir_flag_spec\"" |
7752 | rpath="$rpath $flag" | 7817 | rpath="$rpath $flag" |
7753 | fi | 7818 | fi |
7754 | elif test -n "$runpath_var"; then | 7819 | elif test -n "$runpath_var"; then |
@@ -7777,7 +7842,7 @@ EOF | |||
7777 | if test -n "$hardcode_libdir_separator" && | 7842 | if test -n "$hardcode_libdir_separator" && |
7778 | test -n "$hardcode_libdirs"; then | 7843 | test -n "$hardcode_libdirs"; then |
7779 | libdir="$hardcode_libdirs" | 7844 | libdir="$hardcode_libdirs" |
7780 | eval rpath=\" $hardcode_libdir_flag_spec\" | 7845 | eval "rpath=\" $hardcode_libdir_flag_spec\"" |
7781 | fi | 7846 | fi |
7782 | compile_rpath="$rpath" | 7847 | compile_rpath="$rpath" |
7783 | 7848 | ||
@@ -7799,7 +7864,7 @@ EOF | |||
7799 | esac | 7864 | esac |
7800 | fi | 7865 | fi |
7801 | else | 7866 | else |
7802 | eval flag=\"$hardcode_libdir_flag_spec\" | 7867 | eval "flag=\"$hardcode_libdir_flag_spec\"" |
7803 | rpath="$rpath $flag" | 7868 | rpath="$rpath $flag" |
7804 | fi | 7869 | fi |
7805 | elif test -n "$runpath_var"; then | 7870 | elif test -n "$runpath_var"; then |
@@ -7813,14 +7878,14 @@ EOF | |||
7813 | if test -n "$hardcode_libdir_separator" && | 7878 | if test -n "$hardcode_libdir_separator" && |
7814 | test -n "$hardcode_libdirs"; then | 7879 | test -n "$hardcode_libdirs"; then |
7815 | libdir="$hardcode_libdirs" | 7880 | libdir="$hardcode_libdirs" |
7816 | eval rpath=\" $hardcode_libdir_flag_spec\" | 7881 | eval "rpath=\" $hardcode_libdir_flag_spec\"" |
7817 | fi | 7882 | fi |
7818 | finalize_rpath="$rpath" | 7883 | finalize_rpath="$rpath" |
7819 | 7884 | ||
7820 | if test -n "$libobjs" && test "$build_old_libs" = yes; then | 7885 | if test -n "$libobjs" && test "$build_old_libs" = yes; then |
7821 | # Transform all the library objects into standard objects. | 7886 | # Transform all the library objects into standard objects. |
7822 | compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | 7887 | compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` |
7823 | finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | 7888 | finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` |
7824 | fi | 7889 | fi |
7825 | 7890 | ||
7826 | func_generate_dlsyms "$outputname" "@PROGRAM@" "no" | 7891 | func_generate_dlsyms "$outputname" "@PROGRAM@" "no" |
@@ -7832,15 +7897,15 @@ EOF | |||
7832 | 7897 | ||
7833 | wrappers_required=yes | 7898 | wrappers_required=yes |
7834 | case $host in | 7899 | case $host in |
7900 | *cegcc* | *mingw32ce*) | ||
7901 | # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. | ||
7902 | wrappers_required=no | ||
7903 | ;; | ||
7835 | *cygwin* | *mingw* ) | 7904 | *cygwin* | *mingw* ) |
7836 | if test "$build_libtool_libs" != yes; then | 7905 | if test "$build_libtool_libs" != yes; then |
7837 | wrappers_required=no | 7906 | wrappers_required=no |
7838 | fi | 7907 | fi |
7839 | ;; | 7908 | ;; |
7840 | *cegcc) | ||
7841 | # Disable wrappers for cegcc, we are cross compiling anyway. | ||
7842 | wrappers_required=no | ||
7843 | ;; | ||
7844 | *) | 7909 | *) |
7845 | if test "$need_relink" = no || test "$build_libtool_libs" != yes; then | 7910 | if test "$need_relink" = no || test "$build_libtool_libs" != yes; then |
7846 | wrappers_required=no | 7911 | wrappers_required=no |
@@ -7849,7 +7914,7 @@ EOF | |||
7849 | esac | 7914 | esac |
7850 | if test "$wrappers_required" = no; then | 7915 | if test "$wrappers_required" = no; then |
7851 | # Replace the output file specification. | 7916 | # Replace the output file specification. |
7852 | compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | 7917 | compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` |
7853 | link_command="$compile_command$compile_rpath" | 7918 | link_command="$compile_command$compile_rpath" |
7854 | 7919 | ||
7855 | # We have no uninstalled library dependencies, so finalize right now. | 7920 | # We have no uninstalled library dependencies, so finalize right now. |
@@ -7896,7 +7961,7 @@ EOF | |||
7896 | # We don't need to create a wrapper script. | 7961 | # We don't need to create a wrapper script. |
7897 | link_command="$compile_var$compile_command$compile_rpath" | 7962 | link_command="$compile_var$compile_command$compile_rpath" |
7898 | # Replace the output file specification. | 7963 | # Replace the output file specification. |
7899 | link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | 7964 | link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` |
7900 | # Delete the old output file. | 7965 | # Delete the old output file. |
7901 | $opt_dry_run || $RM $output | 7966 | $opt_dry_run || $RM $output |
7902 | # Link the executable and exit | 7967 | # Link the executable and exit |
@@ -7915,7 +7980,7 @@ EOF | |||
7915 | if test "$fast_install" != no; then | 7980 | if test "$fast_install" != no; then |
7916 | link_command="$finalize_var$compile_command$finalize_rpath" | 7981 | link_command="$finalize_var$compile_command$finalize_rpath" |
7917 | if test "$fast_install" = yes; then | 7982 | if test "$fast_install" = yes; then |
7918 | relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` | 7983 | relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` |
7919 | else | 7984 | else |
7920 | # fast_install is set to needless | 7985 | # fast_install is set to needless |
7921 | relink_command= | 7986 | relink_command= |
@@ -7927,7 +7992,7 @@ EOF | |||
7927 | fi | 7992 | fi |
7928 | 7993 | ||
7929 | # Replace the output file specification. | 7994 | # Replace the output file specification. |
7930 | link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` | 7995 | link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` |
7931 | 7996 | ||
7932 | # Delete the old output files. | 7997 | # Delete the old output files. |
7933 | $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname | 7998 | $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname |
@@ -7951,18 +8016,7 @@ EOF | |||
7951 | fi | 8016 | fi |
7952 | done | 8017 | done |
7953 | relink_command="(cd `pwd`; $relink_command)" | 8018 | relink_command="(cd `pwd`; $relink_command)" |
7954 | relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` | 8019 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` |
7955 | fi | ||
7956 | |||
7957 | # Quote $ECHO for shipping. | ||
7958 | if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then | ||
7959 | case $progpath in | ||
7960 | [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; | ||
7961 | *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; | ||
7962 | esac | ||
7963 | qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` | ||
7964 | else | ||
7965 | qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` | ||
7966 | fi | 8020 | fi |
7967 | 8021 | ||
7968 | # Only actually do things if not in dry run mode. | 8022 | # Only actually do things if not in dry run mode. |
@@ -8083,7 +8137,7 @@ EOF | |||
8083 | done | sort | sort -uc >/dev/null 2>&1); then | 8137 | done | sort | sort -uc >/dev/null 2>&1); then |
8084 | : | 8138 | : |
8085 | else | 8139 | else |
8086 | $ECHO "copying selected object files to avoid basename conflicts..." | 8140 | echo "copying selected object files to avoid basename conflicts..." |
8087 | gentop="$output_objdir/${outputname}x" | 8141 | gentop="$output_objdir/${outputname}x" |
8088 | generated="$generated $gentop" | 8142 | generated="$generated $gentop" |
8089 | func_mkdir_p "$gentop" | 8143 | func_mkdir_p "$gentop" |
@@ -8115,7 +8169,7 @@ EOF | |||
8115 | esac | 8169 | esac |
8116 | done | 8170 | done |
8117 | fi | 8171 | fi |
8118 | eval cmds=\"$old_archive_cmds\" | 8172 | eval "cmds=\"$old_archive_cmds\"" |
8119 | 8173 | ||
8120 | func_len " $cmds" | 8174 | func_len " $cmds" |
8121 | len=$func_len_result | 8175 | len=$func_len_result |
@@ -8135,7 +8189,7 @@ EOF | |||
8135 | do | 8189 | do |
8136 | last_oldobj=$obj | 8190 | last_oldobj=$obj |
8137 | done | 8191 | done |
8138 | eval test_cmds=\"$old_archive_cmds\" | 8192 | eval "test_cmds=\"$old_archive_cmds\"" |
8139 | func_len " $test_cmds" | 8193 | func_len " $test_cmds" |
8140 | len0=$func_len_result | 8194 | len0=$func_len_result |
8141 | len=$len0 | 8195 | len=$len0 |
@@ -8154,7 +8208,7 @@ EOF | |||
8154 | RANLIB=$save_RANLIB | 8208 | RANLIB=$save_RANLIB |
8155 | fi | 8209 | fi |
8156 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | 8210 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ |
8157 | eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" | 8211 | eval "concat_cmds=\"\${concat_cmds}$old_archive_cmds\"" |
8158 | objlist= | 8212 | objlist= |
8159 | len=$len0 | 8213 | len=$len0 |
8160 | fi | 8214 | fi |
@@ -8162,9 +8216,9 @@ EOF | |||
8162 | RANLIB=$save_RANLIB | 8216 | RANLIB=$save_RANLIB |
8163 | oldobjs=$objlist | 8217 | oldobjs=$objlist |
8164 | if test "X$oldobjs" = "X" ; then | 8218 | if test "X$oldobjs" = "X" ; then |
8165 | eval cmds=\"\$concat_cmds\" | 8219 | eval "cmds=\"\$concat_cmds\"" |
8166 | else | 8220 | else |
8167 | eval cmds=\"\$concat_cmds~\$old_archive_cmds\" | 8221 | eval "cmds=\"\$concat_cmds~\$old_archive_cmds\"" |
8168 | fi | 8222 | fi |
8169 | fi | 8223 | fi |
8170 | fi | 8224 | fi |
@@ -8194,7 +8248,7 @@ EOF | |||
8194 | done | 8248 | done |
8195 | # Quote the link command for shipping. | 8249 | # Quote the link command for shipping. |
8196 | relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | 8250 | relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" |
8197 | relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` | 8251 | relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` |
8198 | if test "$hardcode_automatic" = yes ; then | 8252 | if test "$hardcode_automatic" = yes ; then |
8199 | relink_command= | 8253 | relink_command= |
8200 | fi | 8254 | fi |
@@ -8214,7 +8268,7 @@ EOF | |||
8214 | *.la) | 8268 | *.la) |
8215 | func_basename "$deplib" | 8269 | func_basename "$deplib" |
8216 | name="$func_basename_result" | 8270 | name="$func_basename_result" |
8217 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | 8271 | libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` |
8218 | test -z "$libdir" && \ | 8272 | test -z "$libdir" && \ |
8219 | func_fatal_error "\`$deplib' is not a valid libtool archive" | 8273 | func_fatal_error "\`$deplib' is not a valid libtool archive" |
8220 | newdependency_libs="$newdependency_libs $libdir/$name" | 8274 | newdependency_libs="$newdependency_libs $libdir/$name" |
@@ -8230,7 +8284,7 @@ EOF | |||
8230 | *.la) | 8284 | *.la) |
8231 | func_basename "$lib" | 8285 | func_basename "$lib" |
8232 | name="$func_basename_result" | 8286 | name="$func_basename_result" |
8233 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | 8287 | libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
8234 | test -z "$libdir" && \ | 8288 | test -z "$libdir" && \ |
8235 | func_fatal_error "\`$lib' is not a valid libtool archive" | 8289 | func_fatal_error "\`$lib' is not a valid libtool archive" |
8236 | newdlfiles="$newdlfiles $libdir/$name" | 8290 | newdlfiles="$newdlfiles $libdir/$name" |
@@ -8249,7 +8303,7 @@ EOF | |||
8249 | # the library: | 8303 | # the library: |
8250 | func_basename "$lib" | 8304 | func_basename "$lib" |
8251 | name="$func_basename_result" | 8305 | name="$func_basename_result" |
8252 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | 8306 | libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` |
8253 | test -z "$libdir" && \ | 8307 | test -z "$libdir" && \ |
8254 | func_fatal_error "\`$lib' is not a valid libtool archive" | 8308 | func_fatal_error "\`$lib' is not a valid libtool archive" |
8255 | newdlprefiles="$newdlprefiles $libdir/$name" | 8309 | newdlprefiles="$newdlprefiles $libdir/$name" |
@@ -8579,3 +8633,4 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` | |||
8579 | # sh-indentation:2 | 8633 | # sh-indentation:2 |
8580 | # End: | 8634 | # End: |
8581 | # vi:sw=2 | 8635 | # vi:sw=2 |
8636 | |||