Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: ltmain.sh

Issue 3581012: Upgrade from trousers 0.3.3 to 0.3.6 and from testsuite 0.2 to 0.3. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/trousers.git
Patch Set: git cl push Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « install-sh ('k') | man/man5/tcsd.conf.5 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # ltmain.sh - Provide generalized library-building support services. 1 # ltmain.sh - Provide generalized library-building support services.
2 # NOTE: Changing this file will not affect anything until you rerun configure. 2 # NOTE: Changing this file will not affect anything until you rerun configure.
3 # 3 #
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # Free Software Foundation, Inc. 5 # 2007, 2008 Free Software Foundation, Inc.
6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 # 7 #
8 # This program is free software; you can redistribute it and/or modify 8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by 9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or 10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version. 11 # (at your option) any later version.
12 # 12 #
13 # This program is distributed in the hope that it will be useful, but 13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of 14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details. 16 # General Public License for more details.
17 # 17 #
18 # You should have received a copy of the GNU General Public License 18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software 19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 # 21 #
22 # As a special exception to the GNU General Public License, if you 22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a 23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under 24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program. 25 # the same distribution terms that you use for the rest of that program.
26 26
27 basename="s,^.*/,,g" 27 basename="s,^.*/,,g"
28 28
29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 29 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
30 # is ksh but when the shell is invoked as "sh" and the current value of 30 # is ksh but when the shell is invoked as "sh" and the current value of
31 # the _XPG environment variable is not equal to 1 (one), the special 31 # the _XPG environment variable is not equal to 1 (one), the special
32 # positional parameter $0, within a function call, is the name of the 32 # positional parameter $0, within a function call, is the name of the
33 # function. 33 # function.
34 progpath="$0" 34 progpath="$0"
35 35
36 # RH: define SED for historic ltconfig's generated by Libtool 1.3
37 [ -z "$SED" ] && SED=sed
38
39 # The name of this program: 36 # The name of this program:
40 progname=`echo "$progpath" | $SED $basename` 37 progname=`echo "$progpath" | $SED $basename`
41 modename="$progname" 38 modename="$progname"
42 39
43 # Global variables: 40 # Global variables:
44 EXIT_SUCCESS=0 41 EXIT_SUCCESS=0
45 EXIT_FAILURE=1 42 EXIT_FAILURE=1
46 43
47 PROGRAM=ltmain.sh 44 PROGRAM=ltmain.sh
48 PACKAGE=libtool 45 PACKAGE=libtool
49 VERSION=1.5.6 46 VERSION="1.5.26 Debian 1.5.26-1ubuntu1"
50 TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)" 47 TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
51 48
49 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
50 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
51 emulate sh
52 NULLCMD=:
53 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
54 # is contrary to our usage. Disable this feature.
55 alias -g '${1+"$@"}'='"$@"'
56 setopt NO_GLOB_SUBST
57 else
58 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
59 fi
60 BIN_SH=xpg4; export BIN_SH # for Tru64
61 DUALCASE=1; export DUALCASE # for MKS sh
52 62
53 # Check that we have a working $echo. 63 # Check that we have a working $echo.
54 if test "X$1" = X--no-reexec; then 64 if test "X$1" = X--no-reexec; then
55 # Discard the --no-reexec flag, and continue. 65 # Discard the --no-reexec flag, and continue.
56 shift 66 shift
57 elif test "X$1" = X--fallback-echo; then 67 elif test "X$1" = X--fallback-echo; then
58 # Avoid inline document here, it may be left over 68 # Avoid inline document here, it may be left over
59 : 69 :
60 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then 70 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
61 # Yippee, $echo works! 71 # Yippee, $echo works!
(...skipping 17 matching lines...) Expand all
79 magic="%%%MAGIC variable%%%" 89 magic="%%%MAGIC variable%%%"
80 mkdir="mkdir" 90 mkdir="mkdir"
81 mv="mv -f" 91 mv="mv -f"
82 rm="rm -f" 92 rm="rm -f"
83 93
84 # Sed substitution that helps us do robust quoting. It backslashifies 94 # Sed substitution that helps us do robust quoting. It backslashifies
85 # metacharacters that are still active within double-quoted strings. 95 # metacharacters that are still active within double-quoted strings.
86 Xsed="${SED}"' -e 1s/^X//' 96 Xsed="${SED}"' -e 1s/^X//'
87 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' 97 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
88 # test EBCDIC or ASCII 98 # test EBCDIC or ASCII
89 case `echo A|tr A '\301'` in 99 case `echo X|tr X '\101'` in
90 A) # EBCDIC based system 100 A) # ASCII based system
91 SP2NL="tr '\100' '\n'" 101 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
92 NL2SP="tr '\r\n' '\100\100'" 102 SP2NL='tr \040 \012'
103 NL2SP='tr \015\012 \040\040'
93 ;; 104 ;;
94 *) # Assume ASCII based system 105 *) # EBCDIC based system
95 SP2NL="tr '\040' '\012'" 106 SP2NL='tr \100 \n'
96 NL2SP="tr '\015\012' '\040\040'" 107 NL2SP='tr \r\n \100\100'
97 ;; 108 ;;
98 esac 109 esac
99 110
100 # NLS nuisances. 111 # NLS nuisances.
101 # Only set LANG and LC_ALL to C if already set. 112 # Only set LANG and LC_ALL to C if already set.
102 # These must not be set unconditionally because not all systems understand 113 # These must not be set unconditionally because not all systems understand
103 # e.g. LANG=C (notably SCO). 114 # e.g. LANG=C (notably SCO).
104 # We save the old values to restore during execute mode. 115 # We save the old values to restore during execute mode.
105 if test "${LC_ALL+set}" = set; then 116 lt_env=
106 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL 117 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
107 fi 118 do
108 if test "${LANG+set}" = set; then 119 eval "if test \"\${$lt_var+set}\" = set; then
109 save_LANG="$LANG"; LANG=C; export LANG 120 » save_$lt_var=\$$lt_var
121 » lt_env=\"$lt_var=\$$lt_var \$lt_env\"
122 » $lt_var=C
123 » export $lt_var
124 » fi"
125 done
126
127 if test -n "$lt_env"; then
128 lt_env="env $lt_env"
110 fi 129 fi
111 130
112 # Make sure IFS has a sensible default 131 # Make sure IFS has a sensible default
113 : ${IFS=" » 132 lt_nl='
114 "} 133 '
134 IFS=" » $lt_nl"
115 135
116 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 136 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
117 $echo "$modename: not configured to build any kind of library" 1>&2 137 $echo "$modename: not configured to build any kind of library" 1>&2
118 $echo "Fatal configuration error. See the $PACKAGE docs for more information. " 1>&2 138 $echo "Fatal configuration error. See the $PACKAGE docs for more information. " 1>&2
119 exit $EXIT_FAILURE 139 exit $EXIT_FAILURE
120 fi 140 fi
121 141
122 # Global variables. 142 # Global variables.
123 mode=$default_mode 143 mode=$default_mode
124 nonopt= 144 nonopt=
125 prev= 145 prev=
126 prevopt= 146 prevopt=
127 run= 147 run=
128 show="$echo" 148 show="$echo"
129 show_help= 149 show_help=
130 execute_dlfiles= 150 execute_dlfiles=
151 duplicate_deps=no
152 preserve_args=
131 lo2o="s/\\.lo\$/.${objext}/" 153 lo2o="s/\\.lo\$/.${objext}/"
132 o2lo="s/\\.${objext}\$/.lo/" 154 o2lo="s/\\.${objext}\$/.lo/"
155 extracted_archives=
156 extracted_serial=0
133 157
134 ##################################### 158 #####################################
135 # Shell function definitions: 159 # Shell function definitions:
136 # This seems to be the best place for them 160 # This seems to be the best place for them
137 161
162 # func_mktempdir [string]
163 # Make a temporary directory that won't clash with other running
164 # libtool processes, and avoids race conditions if possible. If
165 # given, STRING is the basename for that directory.
166 func_mktempdir ()
167 {
168 my_template="${TMPDIR-/tmp}/${1-$progname}"
169
170 if test "$run" = ":"; then
171 # Return a directory name, but don't create it in dry-run mode
172 my_tmpdir="${my_template}-$$"
173 else
174
175 # If mktemp works, use that first and foremost
176 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
177
178 if test ! -d "$my_tmpdir"; then
179 # Failing that, at least try and use $RANDOM to avoid a race
180 my_tmpdir="${my_template}-${RANDOM-0}$$"
181
182 save_mktempdir_umask=`umask`
183 umask 0077
184 $mkdir "$my_tmpdir"
185 umask $save_mktempdir_umask
186 fi
187
188 # If we're not in dry-run mode, bomb out on failure
189 test -d "$my_tmpdir" || {
190 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
191 exit $EXIT_FAILURE
192 }
193 fi
194
195 $echo "X$my_tmpdir" | $Xsed
196 }
197
198
138 # func_win32_libid arg 199 # func_win32_libid arg
139 # return the library type of file 'arg' 200 # return the library type of file 'arg'
140 # 201 #
141 # Need a lot of goo to handle *both* DLLs and import libs 202 # Need a lot of goo to handle *both* DLLs and import libs
142 # Has to be a shell function in order to 'eat' the argument 203 # Has to be a shell function in order to 'eat' the argument
143 # that is supplied when $file_magic_command is called. 204 # that is supplied when $file_magic_command is called.
144 func_win32_libid () { 205 func_win32_libid ()
206 {
145 win32_libid_type="unknown" 207 win32_libid_type="unknown"
146 win32_fileres=`file -L $1 2>/dev/null` 208 win32_fileres=`file -L $1 2>/dev/null`
147 case $win32_fileres in 209 case $win32_fileres in
148 *ar\ archive\ import\ library*) # definitely import 210 *ar\ archive\ import\ library*) # definitely import
149 win32_libid_type="x86 archive import" 211 win32_libid_type="x86 archive import"
150 ;; 212 ;;
151 *ar\ archive*) # could be an import, or static 213 *ar\ archive*) # could be an import, or static
152 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 214 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
153 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 215 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
154 win32_nmres=`eval $NM -f posix -A $1 | \ 216 win32_nmres=`eval $NM -f posix -A $1 | \
155 » sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 217 » $SED -n -e '1,100{
156 if test "X$win32_nmres" = "Ximport" ; then 218 » » / I /{
157 win32_libid_type="x86 archive import" 219 » » » s,.*,import,
158 else 220 » » » p
159 win32_libid_type="x86 archive static" 221 » » » q
160 fi 222 » » » }
223 » » }'`
224 case $win32_nmres in
225 import*) win32_libid_type="x86 archive import";;
226 *) win32_libid_type="x86 archive static";;
227 esac
161 fi 228 fi
162 ;; 229 ;;
163 *DLL*) 230 *DLL*)
164 win32_libid_type="x86 DLL" 231 win32_libid_type="x86 DLL"
165 ;; 232 ;;
166 *executable*) # but shell scripts are "executable" too... 233 *executable*) # but shell scripts are "executable" too...
167 case $win32_fileres in 234 case $win32_fileres in
168 *MS\ Windows\ PE\ Intel*) 235 *MS\ Windows\ PE\ Intel*)
169 win32_libid_type="x86 DLL" 236 win32_libid_type="x86 DLL"
170 ;; 237 ;;
171 esac 238 esac
172 ;; 239 ;;
173 esac 240 esac
174 $echo $win32_libid_type 241 $echo $win32_libid_type
175 } 242 }
176 243
177 244
178 # func_infer_tag arg 245 # func_infer_tag arg
179 # Infer tagged configuration to use if any are available and 246 # Infer tagged configuration to use if any are available and
180 # if one wasn't chosen via the "--tag" command line option. 247 # if one wasn't chosen via the "--tag" command line option.
181 # Only attempt this if the compiler in the base compile 248 # Only attempt this if the compiler in the base compile
182 # command doesn't match the default compiler. 249 # command doesn't match the default compiler.
183 # arg is usually of the form 'gcc ...' 250 # arg is usually of the form 'gcc ...'
184 func_infer_tag () { 251 func_infer_tag ()
252 {
185 if test -n "$available_tags" && test -z "$tagname"; then 253 if test -n "$available_tags" && test -z "$tagname"; then
186 CC_quoted= 254 CC_quoted=
187 for arg in $CC; do 255 for arg in $CC; do
188 case $arg in 256 case $arg in
189 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 257 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
190 arg="\"$arg\"" 258 arg="\"$arg\""
191 ;; 259 ;;
192 esac 260 esac
193 CC_quoted="$CC_quoted $arg" 261 CC_quoted="$CC_quoted $arg"
194 done 262 done
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 $echo "$modename: unable to infer tagged configuration" 299 $echo "$modename: unable to infer tagged configuration"
232 $echo "$modename: specify a tag with \`--tag'" 1>&2 300 $echo "$modename: specify a tag with \`--tag'" 1>&2
233 exit $EXIT_FAILURE 301 exit $EXIT_FAILURE
234 # else 302 # else
235 # $echo "$modename: using $tagname tagged configuration" 303 # $echo "$modename: using $tagname tagged configuration"
236 fi 304 fi
237 ;; 305 ;;
238 esac 306 esac
239 fi 307 fi
240 } 308 }
309
310
311 # func_extract_an_archive dir oldlib
312 func_extract_an_archive ()
313 {
314 f_ex_an_ar_dir="$1"; shift
315 f_ex_an_ar_oldlib="$1"
316
317 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
318 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
319 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
320 :
321 else
322 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_a r_oldlib" 1>&2
323 exit $EXIT_FAILURE
324 fi
325 }
326
327 # func_extract_archives gentop oldlib ...
328 func_extract_archives ()
329 {
330 my_gentop="$1"; shift
331 my_oldlibs=${1+"$@"}
332 my_oldobjs=""
333 my_xlib=""
334 my_xabs=""
335 my_xdir=""
336 my_status=""
337
338 $show "${rm}r $my_gentop"
339 $run ${rm}r "$my_gentop"
340 $show "$mkdir $my_gentop"
341 $run $mkdir "$my_gentop"
342 my_status=$?
343 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
344 exit $my_status
345 fi
346
347 for my_xlib in $my_oldlibs; do
348 # Extract the objects.
349 case $my_xlib in
350 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
351 *) my_xabs=`pwd`"/$my_xlib" ;;
352 esac
353 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
354 my_xlib_u=$my_xlib
355 while :; do
356 case " $extracted_archives " in
357 *" $my_xlib_u "*)
358 extracted_serial=`expr $extracted_serial + 1`
359 my_xlib_u=lt$extracted_serial-$my_xlib ;;
360 *) break ;;
361 esac
362 done
363 extracted_archives="$extracted_archives $my_xlib_u"
364 my_xdir="$my_gentop/$my_xlib_u"
365
366 $show "${rm}r $my_xdir"
367 $run ${rm}r "$my_xdir"
368 $show "$mkdir $my_xdir"
369 $run $mkdir "$my_xdir"
370 exit_status=$?
371 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
372 exit $exit_status
373 fi
374 case $host in
375 *-darwin*)
376 $show "Extracting $my_xabs"
377 # Do not bother doing anything if just a dry run
378 if test -z "$run"; then
379 darwin_orig_dir=`pwd`
380 cd $my_xdir || exit $?
381 darwin_archive=$my_xabs
382 darwin_curdir=`pwd`
383 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
384 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Archi tectures 2>/dev/null`
385 if test -n "$darwin_arches"; then
386 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
387 darwin_arch=
388 $show "$darwin_base_archive has multiple architectures $darwin_arche s"
389 for darwin_arch in $darwin_arches ; do
390 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
391 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-$ {darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
392 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
393 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
394 cd "$darwin_curdir"
395 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_ archive}"
396 done # $darwin_arches
397 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
398 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \* .lo -print| xargs basename | sort -u | $NL2SP`
399 darwin_file=
400 darwin_files=
401 for darwin_file in $darwin_filelist; do
402 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
403 lipo -create -output "$darwin_file" $darwin_files
404 done # $darwin_filelist
405 ${rm}r unfat-$$
406 cd "$darwin_orig_dir"
407 else
408 cd "$darwin_orig_dir"
409 func_extract_an_archive "$my_xdir" "$my_xabs"
410 fi # $darwin_arches
411 fi # $run
412 ;;
413 *)
414 func_extract_an_archive "$my_xdir" "$my_xabs"
415 ;;
416 esac
417 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \ *.lo -print | $NL2SP`
418 done
419 func_extract_archives_result="$my_oldobjs"
420 }
241 # End of Shell function definitions 421 # End of Shell function definitions
242 ##################################### 422 #####################################
243 423
244 # Darwin sucks 424 # Darwin sucks
245 eval std_shrext=\"$shrext_cmds\" 425 eval std_shrext=\"$shrext_cmds\"
246 426
427 disable_libs=no
428
247 # Parse our command line options once, thoroughly. 429 # Parse our command line options once, thoroughly.
248 while test "$#" -gt 0 430 while test "$#" -gt 0
249 do 431 do
250 arg="$1" 432 arg="$1"
251 shift 433 shift
252 434
253 case $arg in 435 case $arg in
254 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 436 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
255 *) optarg= ;; 437 *) optarg= ;;
256 esac 438 esac
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 continue 481 continue
300 fi 482 fi
301 483
302 # Have we seen a non-optional argument yet? 484 # Have we seen a non-optional argument yet?
303 case $arg in 485 case $arg in
304 --help) 486 --help)
305 show_help=yes 487 show_help=yes
306 ;; 488 ;;
307 489
308 --version) 490 --version)
309 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 491 echo "\
310 $echo 492 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
311 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 493
312 $echo "This is free software; see the source for copying conditions. There is NO" 494 Copyright (C) 2008 Free Software Foundation, Inc.
313 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PU RPOSE." 495 This is free software; see the source for copying conditions. There is NO
314 exit $EXIT_SUCCESS 496 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
497 exit $?
315 ;; 498 ;;
316 499
317 --config) 500 --config)
318 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/ ,$d' $progpath 501 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/ ,$d' $progpath
319 # Now print the configurations for the tags. 502 # Now print the configurations for the tags.
320 for tagname in $taglist; do 503 for tagname in $taglist; do
321 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIB TOOL TAG CONFIG: $tagname$/p" < "$progpath" 504 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIB TOOL TAG CONFIG: $tagname$/p" < "$progpath"
322 done 505 done
323 exit $EXIT_SUCCESS 506 exit $?
324 ;; 507 ;;
325 508
326 --debug) 509 --debug)
327 $echo "$progname: enabling shell trace mode" 510 $echo "$progname: enabling shell trace mode"
328 set -x 511 set -x
329 preserve_args="$preserve_args $arg" 512 preserve_args="$preserve_args $arg"
330 ;; 513 ;;
331 514
332 --dry-run | -n) 515 --dry-run | -n)
333 run=: 516 run=:
334 ;; 517 ;;
335 518
336 --features) 519 --features)
337 $echo "host: $host" 520 $echo "host: $host"
338 if test "$build_libtool_libs" = yes; then 521 if test "$build_libtool_libs" = yes; then
339 $echo "enable shared libraries" 522 $echo "enable shared libraries"
340 else 523 else
341 $echo "disable shared libraries" 524 $echo "disable shared libraries"
342 fi 525 fi
343 if test "$build_old_libs" = yes; then 526 if test "$build_old_libs" = yes; then
344 $echo "enable static libraries" 527 $echo "enable static libraries"
345 else 528 else
346 $echo "disable static libraries" 529 $echo "disable static libraries"
347 fi 530 fi
348 exit $EXIT_SUCCESS 531 exit $?
349 ;; 532 ;;
350 533
351 --finish) mode="finish" ;; 534 --finish) mode="finish" ;;
352 535
353 --mode) prevopt="--mode" prev=mode ;; 536 --mode) prevopt="--mode" prev=mode ;;
354 --mode=*) mode="$optarg" ;; 537 --mode=*) mode="$optarg" ;;
355 538
356 --preserve-dup-deps) duplicate_deps="yes" ;; 539 --preserve-dup-deps) duplicate_deps="yes" ;;
357 540
358 --quiet | --silent) 541 --quiet | --silent)
359 show=: 542 show=:
360 preserve_args="$preserve_args $arg" 543 preserve_args="$preserve_args $arg"
361 ;; 544 ;;
362 545
363 --tag) prevopt="--tag" prev=tag ;; 546 --tag)
547 prevopt="--tag"
548 prev=tag
549 preserve_args="$preserve_args --tag"
550 ;;
364 --tag=*) 551 --tag=*)
365 set tag "$optarg" ${1+"$@"} 552 set tag "$optarg" ${1+"$@"}
366 shift 553 shift
367 prev=tag 554 prev=tag
368 preserve_args="$preserve_args --tag" 555 preserve_args="$preserve_args --tag"
369 ;; 556 ;;
370 557
371 -dlopen) 558 -dlopen)
372 prevopt="-dlopen" 559 prevopt="-dlopen"
373 prev=execute_dlfiles 560 prev=execute_dlfiles
(...skipping 11 matching lines...) Expand all
385 ;; 572 ;;
386 esac 573 esac
387 done 574 done
388 575
389 if test -n "$prevopt"; then 576 if test -n "$prevopt"; then
390 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 577 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
391 $echo "$help" 1>&2 578 $echo "$help" 1>&2
392 exit $EXIT_FAILURE 579 exit $EXIT_FAILURE
393 fi 580 fi
394 581
582 case $disable_libs in
583 no)
584 ;;
585 shared)
586 build_libtool_libs=no
587 build_old_libs=yes
588 ;;
589 static)
590 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
591 ;;
592 esac
593
395 # If this variable is set in any of the actions, the command in it 594 # If this variable is set in any of the actions, the command in it
396 # will be execed at the end. This prevents here-documents from being 595 # will be execed at the end. This prevents here-documents from being
397 # left over by shells. 596 # left over by shells.
398 exec_cmd= 597 exec_cmd=
399 598
400 if test -z "$show_help"; then 599 if test -z "$show_help"; then
401 600
402 # Infer the operation mode. 601 # Infer the operation mode.
403 if test -z "$mode"; then 602 if test -z "$mode"; then
404 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 603 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
405 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 604 $echo "*** Future versions of Libtool will require --mode=MODE be specified. " 1>&2
406 case $nonopt in 605 case $nonopt in
407 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) 606 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
408 mode=link 607 mode=link
409 for arg 608 for arg
410 do 609 do
411 case $arg in 610 case $arg in
412 -c) 611 -c)
413 mode=compile 612 mode=compile
414 break 613 break
415 ;; 614 ;;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 base_compile= 660 base_compile=
462 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 661 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
463 suppress_opt=yes 662 suppress_opt=yes
464 suppress_output= 663 suppress_output=
465 arg_mode=normal 664 arg_mode=normal
466 libobj= 665 libobj=
467 later= 666 later=
468 667
469 for arg 668 for arg
470 do 669 do
471 case "$arg_mode" in 670 case $arg_mode in
472 arg ) 671 arg )
473 # do not "continue". Instead, add this to base_compile 672 # do not "continue". Instead, add this to base_compile
474 lastarg="$arg" 673 lastarg="$arg"
475 arg_mode=normal 674 arg_mode=normal
476 ;; 675 ;;
477 676
478 target ) 677 target )
479 libobj="$arg" 678 libobj="$arg"
480 arg_mode=normal 679 arg_mode=normal
481 continue 680 continue
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 esac # case $arg 742 esac # case $arg
544 ;; 743 ;;
545 esac # case $arg_mode 744 esac # case $arg_mode
546 745
547 # Aesthetically quote the previous argument. 746 # Aesthetically quote the previous argument.
548 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 747 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
549 748
550 case $lastarg in 749 case $lastarg in
551 # Double-quote args containing other shell metacharacters. 750 # Double-quote args containing other shell metacharacters.
552 # Many Bourne shells cannot handle close brackets correctly 751 # Many Bourne shells cannot handle close brackets correctly
553 # in scan sets, so we specify it separately. 752 # in scan sets, and some SunOS ksh mistreat backslash-escaping
753 # in scan sets (worked around with variable expansion),
754 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
755 # at all, so we specify them separately.
554 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 756 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
555 lastarg="\"$lastarg\"" 757 lastarg="\"$lastarg\""
556 ;; 758 ;;
557 esac 759 esac
558 760
559 base_compile="$base_compile $lastarg" 761 base_compile="$base_compile $lastarg"
560 done # for arg 762 done # for arg
561 763
562 case $arg_mode in 764 case $arg_mode in
563 arg) 765 arg)
(...skipping 17 matching lines...) Expand all
581 *.ada) xform=ada ;; 783 *.ada) xform=ada ;;
582 *.adb) xform=adb ;; 784 *.adb) xform=adb ;;
583 *.ads) xform=ads ;; 785 *.ads) xform=ads ;;
584 *.asm) xform=asm ;; 786 *.asm) xform=asm ;;
585 *.c++) xform=c++ ;; 787 *.c++) xform=c++ ;;
586 *.cc) xform=cc ;; 788 *.cc) xform=cc ;;
587 *.ii) xform=ii ;; 789 *.ii) xform=ii ;;
588 *.class) xform=class ;; 790 *.class) xform=class ;;
589 *.cpp) xform=cpp ;; 791 *.cpp) xform=cpp ;;
590 *.cxx) xform=cxx ;; 792 *.cxx) xform=cxx ;;
591 *.f90) xform=f90 ;; 793 *.[fF][09]?) xform=[fF][09]. ;;
592 *.for) xform=for ;; 794 *.for) xform=for ;;
593 *.java) xform=java ;; 795 *.java) xform=java ;;
796 *.obj) xform=obj ;;
797 *.sx) xform=sx ;;
594 esac 798 esac
595 799
596 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` 800 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
597 801
598 case $libobj in 802 case $libobj in
599 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; 803 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
600 *) 804 *)
601 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 805 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
602 exit $EXIT_FAILURE 806 exit $EXIT_FAILURE
603 ;; 807 ;;
(...skipping 13 matching lines...) Expand all
617 continue 821 continue
618 ;; 822 ;;
619 823
620 -prefer-non-pic) 824 -prefer-non-pic)
621 pic_mode=no 825 pic_mode=no
622 continue 826 continue
623 ;; 827 ;;
624 esac 828 esac
625 done 829 done
626 830
831 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
832 case $qlibobj in
833 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
834 qlibobj="\"$qlibobj\"" ;;
835 esac
836 test "X$libobj" != "X$qlibobj" \
837 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
838 && $echo "$modename: libobj name \`$libobj' may not contain shell specia l characters."
627 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 839 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
628 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 840 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
629 if test "X$xdir" = "X$obj"; then 841 if test "X$xdir" = "X$obj"; then
630 xdir= 842 xdir=
631 else 843 else
632 xdir=$xdir/ 844 xdir=$xdir/
633 fi 845 fi
634 lobj=${xdir}$objdir/$objname 846 lobj=${xdir}$objdir/$objname
635 847
636 if test -z "$base_compile"; then 848 if test -z "$base_compile"; then
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 This indicates that another process is trying to use the same 901 This indicates that another process is trying to use the same
690 temporary object file, and libtool could not work around it because 902 temporary object file, and libtool could not work around it because
691 your compiler does not support \`-c' and \`-o' together. If you 903 your compiler does not support \`-c' and \`-o' together. If you
692 repeat this compilation, it may succeed, by chance, but you had better 904 repeat this compilation, it may succeed, by chance, but you had better
693 avoid parallel builds (make -j) in this platform, or get a better 905 avoid parallel builds (make -j) in this platform, or get a better
694 compiler." 906 compiler."
695 907
696 $run $rm $removelist 908 $run $rm $removelist
697 exit $EXIT_FAILURE 909 exit $EXIT_FAILURE
698 fi 910 fi
699 $echo $srcfile > "$lockfile" 911 $echo "$srcfile" > "$lockfile"
700 fi 912 fi
701 913
702 if test -n "$fix_srcfile_path"; then 914 if test -n "$fix_srcfile_path"; then
703 eval srcfile=\"$fix_srcfile_path\" 915 eval srcfile=\"$fix_srcfile_path\"
704 fi 916 fi
917 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
918 case $qsrcfile in
919 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
920 qsrcfile="\"$qsrcfile\"" ;;
921 esac
705 922
706 $run $rm "$libobj" "${libobj}T" 923 $run $rm "$libobj" "${libobj}T"
707 924
708 # Create a libtool object file (analogous to a ".la" file), 925 # Create a libtool object file (analogous to a ".la" file),
709 # but don't create it if we're doing a dry run. 926 # but don't create it if we're doing a dry run.
710 test -z "$run" && cat > ${libobj}T <<EOF 927 test -z "$run" && cat > ${libobj}T <<EOF
711 # $libobj - a libtool object file 928 # $libobj - a libtool object file
712 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 929 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
713 # 930 #
714 # Please DO NOT delete this file! 931 # Please DO NOT delete this file!
715 # It is necessary for linking the library. 932 # It is necessary for linking the library.
716 933
717 # Name of the PIC object. 934 # Name of the PIC object.
718 EOF 935 EOF
719 936
720 # Only build a PIC object if we are building libtool libraries. 937 # Only build a PIC object if we are building libtool libraries.
721 if test "$build_libtool_libs" = yes; then 938 if test "$build_libtool_libs" = yes; then
722 # Without this assignment, base_compile gets emptied. 939 # Without this assignment, base_compile gets emptied.
723 fbsd_hideous_sh_bug=$base_compile 940 fbsd_hideous_sh_bug=$base_compile
724 941
725 if test "$pic_mode" != no; then 942 if test "$pic_mode" != no; then
726 » command="$base_compile $srcfile $pic_flag" 943 » command="$base_compile $qsrcfile $pic_flag"
727 else 944 else
728 # Don't build PIC code 945 # Don't build PIC code
729 » command="$base_compile $srcfile" 946 » command="$base_compile $qsrcfile"
730 fi 947 fi
731 948
732 if test ! -d "${xdir}$objdir"; then 949 if test ! -d "${xdir}$objdir"; then
733 $show "$mkdir ${xdir}$objdir" 950 $show "$mkdir ${xdir}$objdir"
734 $run $mkdir ${xdir}$objdir 951 $run $mkdir ${xdir}$objdir
735 » status=$? 952 » exit_status=$?
736 » if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then 953 » if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
737 » exit $status 954 » exit $exit_status
738 fi 955 fi
739 fi 956 fi
740 957
741 if test -z "$output_obj"; then 958 if test -z "$output_obj"; then
742 # Place PIC objects in $objdir 959 # Place PIC objects in $objdir
743 command="$command -o $lobj" 960 command="$command -o $lobj"
744 fi 961 fi
745 962
746 $run $rm "$lobj" "$output_obj" 963 $run $rm "$lobj" "$output_obj"
747 964
748 $show "$command" 965 $show "$command"
749 if $run eval "$command"; then : 966 if $run eval $lt_env "$command"; then :
750 else 967 else
751 test -n "$output_obj" && $run $rm $removelist 968 test -n "$output_obj" && $run $rm $removelist
752 exit $EXIT_FAILURE 969 exit $EXIT_FAILURE
753 fi 970 fi
754 971
755 if test "$need_locks" = warn && 972 if test "$need_locks" = warn &&
756 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 973 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
757 $echo "\ 974 $echo "\
758 *** ERROR, $lockfile contains: 975 *** ERROR, $lockfile contains:
759 `cat $lockfile 2>/dev/null` 976 `cat $lockfile 2>/dev/null`
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 test -z "$run" && cat >> ${libobj}T <<EOF 1016 test -z "$run" && cat >> ${libobj}T <<EOF
800 pic_object=none 1017 pic_object=none
801 1018
802 EOF 1019 EOF
803 fi 1020 fi
804 1021
805 # Only build a position-dependent object if we build old libraries. 1022 # Only build a position-dependent object if we build old libraries.
806 if test "$build_old_libs" = yes; then 1023 if test "$build_old_libs" = yes; then
807 if test "$pic_mode" != yes; then 1024 if test "$pic_mode" != yes; then
808 # Don't build PIC code 1025 # Don't build PIC code
809 » command="$base_compile $srcfile" 1026 » command="$base_compile $qsrcfile"
810 else 1027 else
811 » command="$base_compile $srcfile $pic_flag" 1028 » command="$base_compile $qsrcfile $pic_flag"
812 fi 1029 fi
813 if test "$compiler_c_o" = yes; then 1030 if test "$compiler_c_o" = yes; then
814 command="$command -o $obj" 1031 command="$command -o $obj"
815 fi 1032 fi
816 1033
817 # Suppress compiler output if we already did a PIC compilation. 1034 # Suppress compiler output if we already did a PIC compilation.
818 command="$command$suppress_output" 1035 command="$command$suppress_output"
819 $run $rm "$obj" "$output_obj" 1036 $run $rm "$obj" "$output_obj"
820 $show "$command" 1037 $show "$command"
821 if $run eval "$command"; then : 1038 if $run eval $lt_env "$command"; then :
822 else 1039 else
823 $run $rm $removelist 1040 $run $rm $removelist
824 exit $EXIT_FAILURE 1041 exit $EXIT_FAILURE
825 fi 1042 fi
826 1043
827 if test "$need_locks" = warn && 1044 if test "$need_locks" = warn &&
828 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 1045 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
829 $echo "\ 1046 $echo "\
830 *** ERROR, $lockfile contains: 1047 *** ERROR, $lockfile contains:
831 `cat $lockfile 2>/dev/null` 1048 `cat $lockfile 2>/dev/null`
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 export_dynamic=no 1147 export_dynamic=no
931 export_symbols= 1148 export_symbols=
932 export_symbols_regex= 1149 export_symbols_regex=
933 generated= 1150 generated=
934 libobjs= 1151 libobjs=
935 ltlibs= 1152 ltlibs=
936 module=no 1153 module=no
937 no_install=no 1154 no_install=no
938 objs= 1155 objs=
939 non_pic_objects= 1156 non_pic_objects=
1157 notinst_path= # paths that contain not-installed libtool libraries
940 precious_files_regex= 1158 precious_files_regex=
941 prefer_static_libs=no 1159 prefer_static_libs=no
942 preload=no 1160 preload=no
943 prev= 1161 prev=
944 prevarg= 1162 prevarg=
945 release= 1163 release=
946 rpath= 1164 rpath=
947 xrpath= 1165 xrpath=
948 perm_rpath= 1166 perm_rpath=
949 temp_rpath= 1167 temp_rpath=
950 thread_safe=no 1168 thread_safe=no
951 vinfo= 1169 vinfo=
952 vinfo_number=no 1170 vinfo_number=no
1171 single_module="${wl}-single_module"
953 1172
954 func_infer_tag $base_compile 1173 func_infer_tag $base_compile
955 1174
956 # We need to know -static, to get the right output filenames. 1175 # We need to know -static, to get the right output filenames.
957 for arg 1176 for arg
958 do 1177 do
959 case $arg in 1178 case $arg in
960 -all-static | -static) 1179 -all-static | -static | -static-libtool-libs)
961 » if test "X$arg" = "X-all-static"; then 1180 » case $arg in
1181 » -all-static)
962 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; th en 1182 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; th en
963 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 1183 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
964 fi 1184 fi
965 if test -n "$link_static_flag"; then 1185 if test -n "$link_static_flag"; then
966 dlopen_self=$dlopen_self_static 1186 dlopen_self=$dlopen_self_static
967 fi 1187 fi
968 » else 1188 » prefer_static_libs=yes
1189 » ;;
1190 » -static)
969 if test -z "$pic_flag" && test -n "$link_static_flag"; then 1191 if test -z "$pic_flag" && test -n "$link_static_flag"; then
970 dlopen_self=$dlopen_self_static 1192 dlopen_self=$dlopen_self_static
971 fi 1193 fi
972 » fi 1194 » prefer_static_libs=built
1195 » ;;
1196 » -static-libtool-libs)
1197 » if test -z "$pic_flag" && test -n "$link_static_flag"; then
1198 » dlopen_self=$dlopen_self_static
1199 » fi
1200 » prefer_static_libs=yes
1201 » ;;
1202 » esac
973 build_libtool_libs=no 1203 build_libtool_libs=no
974 build_old_libs=yes 1204 build_old_libs=yes
975 prefer_static_libs=yes
976 break 1205 break
977 ;; 1206 ;;
978 esac 1207 esac
979 done 1208 done
980 1209
981 # See if our shared archives depend on static archives. 1210 # See if our shared archives depend on static archives.
982 test -n "$old_archive_from_new_cmds" && build_old_libs=yes 1211 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
983 1212
984 # Go through the arguments, transforming them on the way. 1213 # Go through the arguments, transforming them on the way.
985 while test "$#" -gt 0; do 1214 while test "$#" -gt 0; do
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 # Non-PIC object. 1369 # Non-PIC object.
1141 if test "$non_pic_object" != none; then 1370 if test "$non_pic_object" != none; then
1142 # Prepend the subdirectory the object is found in. 1371 # Prepend the subdirectory the object is found in.
1143 non_pic_object="$xdir$non_pic_object" 1372 non_pic_object="$xdir$non_pic_object"
1144 1373
1145 # A standard non-PIC object 1374 # A standard non-PIC object
1146 non_pic_objects="$non_pic_objects $non_pic_object" 1375 non_pic_objects="$non_pic_objects $non_pic_object"
1147 if test -z "$pic_object" || test "$pic_object" = none ; then 1376 if test -z "$pic_object" || test "$pic_object" = none ; then
1148 arg="$non_pic_object" 1377 arg="$non_pic_object"
1149 fi 1378 fi
1379 else
1380 # If the PIC object exists, use it instead.
1381 # $xdir was prepended to $pic_object above.
1382 non_pic_object="$pic_object"
1383 non_pic_objects="$non_pic_objects $non_pic_object"
1150 fi 1384 fi
1151 else 1385 else
1152 # Only an error if not doing a dry-run. 1386 # Only an error if not doing a dry-run.
1153 if test -z "$run"; then 1387 if test -z "$run"; then
1154 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1388 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1155 exit $EXIT_FAILURE 1389 exit $EXIT_FAILURE
1156 else 1390 else
1157 # Dry-run case. 1391 # Dry-run case.
1158 1392
1159 # Extract subdirectory from the argument. 1393 # Extract subdirectory from the argument.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 prev= 1457 prev=
1224 compile_command="$compile_command $qarg" 1458 compile_command="$compile_command $qarg"
1225 finalize_command="$finalize_command $qarg" 1459 finalize_command="$finalize_command $qarg"
1226 continue 1460 continue
1227 ;; 1461 ;;
1228 shrext) 1462 shrext)
1229 shrext_cmds="$arg" 1463 shrext_cmds="$arg"
1230 prev= 1464 prev=
1231 continue 1465 continue
1232 ;; 1466 ;;
1467 darwin_framework|darwin_framework_skip)
1468 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $ arg"
1469 compile_command="$compile_command $arg"
1470 finalize_command="$finalize_command $arg"
1471 prev=
1472 continue
1473 ;;
1233 *) 1474 *)
1234 eval "$prev=\"\$arg\"" 1475 eval "$prev=\"\$arg\""
1235 prev= 1476 prev=
1236 continue 1477 continue
1237 ;; 1478 ;;
1238 esac 1479 esac
1239 fi # test -n "$prev" 1480 fi # test -n "$prev"
1240 1481
1241 prevarg="$arg" 1482 prevarg="$arg"
1242 1483
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 exit $EXIT_FAILURE 1522 exit $EXIT_FAILURE
1282 fi 1523 fi
1283 if test "X$arg" = "X-export-symbols"; then 1524 if test "X$arg" = "X-export-symbols"; then
1284 prev=expsyms 1525 prev=expsyms
1285 else 1526 else
1286 prev=expsyms_regex 1527 prev=expsyms_regex
1287 fi 1528 fi
1288 continue 1529 continue
1289 ;; 1530 ;;
1290 1531
1532 -framework|-arch|-isysroot)
1533 case " $CC " in
1534 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1535 prev=darwin_framework_skip ;;
1536 *) compiler_flags="$compiler_flags $arg"
1537 prev=darwin_framework ;;
1538 esac
1539 compile_command="$compile_command $arg"
1540 finalize_command="$finalize_command $arg"
1541 continue
1542 ;;
1543
1291 -inst-prefix-dir) 1544 -inst-prefix-dir)
1292 prev=inst_prefix 1545 prev=inst_prefix
1293 continue 1546 continue
1294 ;; 1547 ;;
1295 1548
1296 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* 1549 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1297 # so, if we see these flags be careful not to treat them like -L 1550 # so, if we see these flags be careful not to treat them like -L
1298 -L[A-Z][A-Z]*:*) 1551 -L[A-Z][A-Z]*:*)
1299 case $with_gcc/$host in 1552 case $with_gcc/$host in
1300 no/*-*-irix* | /*-*-irix*) 1553 no/*-*-irix* | /*-*-irix*)
1301 compile_command="$compile_command $arg" 1554 compile_command="$compile_command $arg"
1302 finalize_command="$finalize_command $arg" 1555 finalize_command="$finalize_command $arg"
1303 ;; 1556 ;;
1304 esac 1557 esac
1305 continue 1558 continue
1306 ;; 1559 ;;
1307 1560
1308 -L*) 1561 -L*)
1309 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` 1562 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1310 # We need an absolute path. 1563 # We need an absolute path.
1311 case $dir in 1564 case $dir in
1312 [\\/]* | [A-Za-z]:[\\/]*) ;; 1565 [\\/]* | [A-Za-z]:[\\/]*) ;;
1313 *) 1566 *)
1314 absdir=`cd "$dir" && pwd` 1567 absdir=`cd "$dir" && pwd`
1315 if test -z "$absdir"; then 1568 if test -z "$absdir"; then
1316 $echo "$modename: cannot determine absolute directory name of \`$dir '" 1>&2 1569 $echo "$modename: cannot determine absolute directory name of \`$dir '" 1>&2
1317 » exit $EXIT_FAILURE 1570 » absdir="$dir"
1571 » notinst_path="$notinst_path $dir"
1318 fi 1572 fi
1319 dir="$absdir" 1573 dir="$absdir"
1320 ;; 1574 ;;
1321 esac 1575 esac
1322 case "$deplibs " in 1576 case "$deplibs " in
1323 *" -L$dir "*) ;; 1577 *" -L$dir "*) ;;
1324 *) 1578 *)
1325 deplibs="$deplibs -L$dir" 1579 deplibs="$deplibs -L$dir"
1326 lib_search_path="$lib_search_path $dir" 1580 lib_search_path="$lib_search_path $dir"
1327 ;; 1581 ;;
1328 esac 1582 esac
1329 case $host in 1583 case $host in
1330 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1584 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1585 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1331 case :$dllsearchpath: in 1586 case :$dllsearchpath: in
1332 *":$dir:"*) ;; 1587 *":$dir:"*) ;;
1333 *) dllsearchpath="$dllsearchpath:$dir";; 1588 *) dllsearchpath="$dllsearchpath:$dir";;
1334 esac 1589 esac
1590 case :$dllsearchpath: in
1591 *":$testbindir:"*) ;;
1592 *) dllsearchpath="$dllsearchpath:$testbindir";;
1593 esac
1335 ;; 1594 ;;
1336 esac 1595 esac
1337 continue 1596 continue
1338 ;; 1597 ;;
1339 1598
1340 -l*) 1599 -l*)
1341 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then 1600 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1342 case $host in 1601 case $host in
1343 » *-*-cygwin* | *-*-pw32* | *-*-beos*) 1602 » *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1344 # These systems don't actually have a C or math library (as such) 1603 # These systems don't actually have a C or math library (as such)
1345 continue 1604 continue
1346 ;; 1605 ;;
1347 » *-*-mingw* | *-*-os2*) 1606 » *-*-os2*)
1348 # These systems don't actually have a C library (as such) 1607 # These systems don't actually have a C library (as such)
1349 test "X$arg" = "X-lc" && continue 1608 test "X$arg" = "X-lc" && continue
1350 ;; 1609 ;;
1351 » *-*-openbsd* | *-*-freebsd*) 1610 » *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1352 # Do not include libc due to us having libc/libc_r. 1611 # Do not include libc due to us having libc/libc_r.
1353 test "X$arg" = "X-lc" && continue 1612 test "X$arg" = "X-lc" && continue
1354 ;; 1613 ;;
1355 *-*-rhapsody* | *-*-darwin1.[012]) 1614 *-*-rhapsody* | *-*-darwin1.[012])
1356 # Rhapsody C and math libraries are in the System framework 1615 # Rhapsody C and math libraries are in the System framework
1357 deplibs="$deplibs -framework System" 1616 deplibs="$deplibs -framework System"
1358 continue 1617 continue
1618 ;;
1619 *-*-sco3.2v5* | *-*-sco5v6*)
1620 # Causes problems with __ctype
1621 test "X$arg" = "X-lc" && continue
1622 ;;
1623 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1624 # Compiler inserts libc in the correct place for threads to work
1625 test "X$arg" = "X-lc" && continue
1626 ;;
1359 esac 1627 esac
1360 elif test "X$arg" = "X-lc_r"; then 1628 elif test "X$arg" = "X-lc_r"; then
1361 case $host in 1629 case $host in
1362 » *-*-openbsd* | *-*-freebsd*) 1630 » *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1363 # Do not include libc_r directly, use -pthread flag. 1631 # Do not include libc_r directly, use -pthread flag.
1364 continue 1632 continue
1365 ;; 1633 ;;
1366 esac 1634 esac
1367 fi 1635 fi
1368 deplibs="$deplibs $arg" 1636 deplibs="$deplibs $arg"
1369 continue 1637 continue
1370 ;; 1638 ;;
1371 1639
1372 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1640 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1373 » deplibs="$deplibs $arg" 1641 # classes, name mangling, and exception handling.
1642 -model)
1643 » compile_command="$compile_command $arg"
1644 » compiler_flags="$compiler_flags $arg"
1645 » finalize_command="$finalize_command $arg"
1646 » prev=xcompiler
1374 continue 1647 continue
1375 ;; 1648 ;;
1376 1649
1650 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1651 compiler_flags="$compiler_flags $arg"
1652 compile_command="$compile_command $arg"
1653 finalize_command="$finalize_command $arg"
1654 continue
1655 ;;
1656
1657 -multi_module)
1658 single_module="${wl}-multi_module"
1659 continue
1660 ;;
1661
1377 -module) 1662 -module)
1378 module=yes 1663 module=yes
1379 continue 1664 continue
1380 ;; 1665 ;;
1381 1666
1382 # gcc -m* arguments should be passed to the linker via $compiler_flags 1667 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1383 # in order to pass architecture information to the linker 1668 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1384 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo 1669 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1385 # but this is not reliable with gcc because gcc may use -mfoo to 1670 # +DA*, +DD* enable 64-bit mode on the HP compiler
1386 # select a different linker, different libraries, etc, while 1671 # -q* pass through compiler args for the IBM compiler
1387 # -Wl,-mfoo simply passes -mfoo to the linker. 1672 # -m* pass through architecture-specific compiler args for GCC
1388 -m*) 1673 # -m*, -t[45]*, -txscale* pass through architecture-specific
1674 # compiler args for GCC
1675 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
1676 # -F/path gives path to uninstalled frameworks, gcc on darwin
1677 # @file GCC response files
1678 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
1679 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1680
1389 # Unknown arguments in both finalize_command and compile_command need 1681 # Unknown arguments in both finalize_command and compile_command need
1390 # to be aesthetically quoted because they are evaled later. 1682 # to be aesthetically quoted because they are evaled later.
1391 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1683 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1392 case $arg in 1684 case $arg in
1393 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1685 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1394 arg="\"$arg\"" 1686 arg="\"$arg\""
1395 ;; 1687 ;;
1396 esac 1688 esac
1397 compile_command="$compile_command $arg" 1689 compile_command="$compile_command $arg"
1398 finalize_command="$finalize_command $arg" 1690 finalize_command="$finalize_command $arg"
1399 if test "$with_gcc" = "yes" ; then 1691 compiler_flags="$compiler_flags $arg"
1400 compiler_flags="$compiler_flags $arg"
1401 fi
1402 continue 1692 continue
1403 ;; 1693 ;;
1404 1694
1405 -shrext) 1695 -shrext)
1406 prev=shrext 1696 prev=shrext
1407 continue 1697 continue
1408 ;; 1698 ;;
1409 1699
1410 -no-fast-install) 1700 -no-fast-install)
1411 fast_install=no 1701 fast_install=no
1412 continue 1702 continue
1413 ;; 1703 ;;
1414 1704
1415 -no-install) 1705 -no-install)
1416 case $host in 1706 case $host in
1417 » *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 1707 » *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1418 # The PATH hackery in wrapper scripts is required on Windows 1708 # The PATH hackery in wrapper scripts is required on Windows
1419 » # in order for the loader to find any dlls it needs. 1709 » # and Darwin in order for the loader to find any dlls it needs.
1420 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 1710 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1421 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 1711 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1422 fast_install=no 1712 fast_install=no
1423 ;; 1713 ;;
1424 *) no_install=yes ;; 1714 *) no_install=yes ;;
1425 esac 1715 esac
1426 continue 1716 continue
1427 ;; 1717 ;;
1428 1718
1429 -no-undefined) 1719 -no-undefined)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 exit $EXIT_FAILURE 1758 exit $EXIT_FAILURE
1469 ;; 1759 ;;
1470 esac 1760 esac
1471 case "$xrpath " in 1761 case "$xrpath " in
1472 *" $dir "*) ;; 1762 *" $dir "*) ;;
1473 *) xrpath="$xrpath $dir" ;; 1763 *) xrpath="$xrpath $dir" ;;
1474 esac 1764 esac
1475 continue 1765 continue
1476 ;; 1766 ;;
1477 1767
1478 -static) 1768 -static | -static-libtool-libs)
1479 # The effects of -static are defined in a previous loop. 1769 # The effects of -static are defined in a previous loop.
1480 # We used to do the same as -all-static on platforms that 1770 # We used to do the same as -all-static on platforms that
1481 # didn't have a PIC flag, but the assumption that the effects 1771 # didn't have a PIC flag, but the assumption that the effects
1482 # would be equivalent was wrong. It would break on at least 1772 # would be equivalent was wrong. It would break on at least
1483 # Digital Unix and AIX. 1773 # Digital Unix and AIX.
1484 continue 1774 continue
1485 ;; 1775 ;;
1486 1776
1487 -thread-safe) 1777 -thread-safe)
1488 thread_safe=yes 1778 thread_safe=yes
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 # Non-PIC object. 1919 # Non-PIC object.
1630 if test "$non_pic_object" != none; then 1920 if test "$non_pic_object" != none; then
1631 # Prepend the subdirectory the object is found in. 1921 # Prepend the subdirectory the object is found in.
1632 non_pic_object="$xdir$non_pic_object" 1922 non_pic_object="$xdir$non_pic_object"
1633 1923
1634 # A standard non-PIC object 1924 # A standard non-PIC object
1635 non_pic_objects="$non_pic_objects $non_pic_object" 1925 non_pic_objects="$non_pic_objects $non_pic_object"
1636 if test -z "$pic_object" || test "$pic_object" = none ; then 1926 if test -z "$pic_object" || test "$pic_object" = none ; then
1637 arg="$non_pic_object" 1927 arg="$non_pic_object"
1638 fi 1928 fi
1929 else
1930 # If the PIC object exists, use it instead.
1931 # $xdir was prepended to $pic_object above.
1932 non_pic_object="$pic_object"
1933 non_pic_objects="$non_pic_objects $non_pic_object"
1639 fi 1934 fi
1640 else 1935 else
1641 # Only an error if not doing a dry-run. 1936 # Only an error if not doing a dry-run.
1642 if test -z "$run"; then 1937 if test -z "$run"; then
1643 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1938 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1644 exit $EXIT_FAILURE 1939 exit $EXIT_FAILURE
1645 else 1940 else
1646 # Dry-run case. 1941 # Dry-run case.
1647 1942
1648 # Extract subdirectory from the argument. 1943 # Extract subdirectory from the argument.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` 2029 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1735 if test "X$output_objdir" = "X$output"; then 2030 if test "X$output_objdir" = "X$output"; then
1736 output_objdir="$objdir" 2031 output_objdir="$objdir"
1737 else 2032 else
1738 output_objdir="$output_objdir/$objdir" 2033 output_objdir="$output_objdir/$objdir"
1739 fi 2034 fi
1740 # Create the object directory. 2035 # Create the object directory.
1741 if test ! -d "$output_objdir"; then 2036 if test ! -d "$output_objdir"; then
1742 $show "$mkdir $output_objdir" 2037 $show "$mkdir $output_objdir"
1743 $run $mkdir $output_objdir 2038 $run $mkdir $output_objdir
1744 status=$? 2039 exit_status=$?
1745 if test "$status" -ne 0 && test ! -d "$output_objdir"; then 2040 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1746 » exit $status 2041 » exit $exit_status
1747 fi 2042 fi
1748 fi 2043 fi
1749 2044
1750 # Determine the type of output 2045 # Determine the type of output
1751 case $output in 2046 case $output in
1752 "") 2047 "")
1753 $echo "$modename: you must specify an output file" 1>&2 2048 $echo "$modename: you must specify an output file" 1>&2
1754 $echo "$help" 1>&2 2049 $echo "$help" 1>&2
1755 exit $EXIT_FAILURE 2050 exit $EXIT_FAILURE
1756 ;; 2051 ;;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 done 2094 done
1800 fi 2095 fi
1801 pre_post_deps= 2096 pre_post_deps=
1802 fi 2097 fi
1803 2098
1804 deplibs= 2099 deplibs=
1805 newdependency_libs= 2100 newdependency_libs=
1806 newlib_search_path= 2101 newlib_search_path=
1807 need_relink=no # whether we're linking any uninstalled libtool libraries 2102 need_relink=no # whether we're linking any uninstalled libtool libraries
1808 notinst_deplibs= # not-installed libtool libraries 2103 notinst_deplibs= # not-installed libtool libraries
1809 notinst_path= # paths that contain not-installed libtool libraries
1810 case $linkmode in 2104 case $linkmode in
1811 lib) 2105 lib)
1812 passes="conv link" 2106 passes="conv link"
1813 for file in $dlfiles $dlprefiles; do 2107 for file in $dlfiles $dlprefiles; do
1814 case $file in 2108 case $file in
1815 *.la) ;; 2109 *.la) ;;
1816 *) 2110 *)
1817 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $ file" 1>&2 2111 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $ file" 1>&2
1818 exit $EXIT_FAILURE 2112 exit $EXIT_FAILURE
1819 ;; 2113 ;;
(...skipping 14 matching lines...) Expand all
1834 for pass in $passes; do 2128 for pass in $passes; do
1835 if test "$linkmode,$pass" = "lib,link" || 2129 if test "$linkmode,$pass" = "lib,link" ||
1836 test "$linkmode,$pass" = "prog,scan"; then 2130 test "$linkmode,$pass" = "prog,scan"; then
1837 libs="$deplibs" 2131 libs="$deplibs"
1838 deplibs= 2132 deplibs=
1839 fi 2133 fi
1840 if test "$linkmode" = prog; then 2134 if test "$linkmode" = prog; then
1841 case $pass in 2135 case $pass in
1842 dlopen) libs="$dlfiles" ;; 2136 dlopen) libs="$dlfiles" ;;
1843 dlpreopen) libs="$dlprefiles" ;; 2137 dlpreopen) libs="$dlprefiles" ;;
1844 » link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 2138 » link)
2139 » libs="$deplibs %DEPLIBS%"
2140 » test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2141 » ;;
1845 esac 2142 esac
1846 fi 2143 fi
1847 if test "$pass" = dlopen; then 2144 if test "$pass" = dlopen; then
1848 # Collect dlpreopened libraries 2145 # Collect dlpreopened libraries
1849 save_deplibs="$deplibs" 2146 save_deplibs="$deplibs"
1850 deplibs= 2147 deplibs=
1851 fi 2148 fi
1852 for deplib in $libs; do 2149 for deplib in $libs; do
1853 lib= 2150 lib=
1854 found=no 2151 found=no
1855 case $deplib in 2152 case $deplib in
1856 » -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 2153 » -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-thread s)
1857 if test "$linkmode,$pass" = "prog,link"; then 2154 if test "$linkmode,$pass" = "prog,link"; then
1858 compile_deplibs="$deplib $compile_deplibs" 2155 compile_deplibs="$deplib $compile_deplibs"
1859 finalize_deplibs="$deplib $finalize_deplibs" 2156 finalize_deplibs="$deplib $finalize_deplibs"
1860 else 2157 else
1861 » deplibs="$deplib $deplibs" 2158 » compiler_flags="$compiler_flags $deplib"
1862 fi 2159 fi
1863 continue 2160 continue
1864 ;; 2161 ;;
1865 -l*) 2162 -l*)
1866 if test "$linkmode" != lib && test "$linkmode" != prog; then 2163 if test "$linkmode" != lib && test "$linkmode" != prog; then
1867 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1> &2 2164 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1> &2
1868 continue 2165 continue
1869 fi 2166 fi
1870 » if test "$pass" = conv; then 2167 » name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1871 » deplibs="$deplib $deplibs" 2168 » if test "$linkmode" = lib; then
1872 » continue 2169 » searchdirs="$newlib_search_path $lib_search_path $compiler_lib_searc h_dirs $sys_lib_search_path $shlib_search_path"
2170 » else
2171 » searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_pat h $shlib_search_path"
1873 fi 2172 fi
1874 » name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 2173 » for searchdir in $searchdirs; do
1875 » for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_ path $shlib_search_path; do
1876 for search_ext in .la $std_shrext .so .a; do 2174 for search_ext in .la $std_shrext .so .a; do
1877 # Search the libtool library 2175 # Search the libtool library
1878 lib="$searchdir/lib${name}${search_ext}" 2176 lib="$searchdir/lib${name}${search_ext}"
1879 if test -f "$lib"; then 2177 if test -f "$lib"; then
1880 if test "$search_ext" = ".la"; then 2178 if test "$search_ext" = ".la"; then
1881 found=yes 2179 found=yes
1882 else 2180 else
1883 found=no 2181 found=no
1884 fi 2182 fi
1885 break 2 2183 break 2
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1974 continue 2272 continue
1975 ;; 2273 ;;
1976 *.la) lib="$deplib" ;; 2274 *.la) lib="$deplib" ;;
1977 *.$libext) 2275 *.$libext)
1978 if test "$pass" = conv; then 2276 if test "$pass" = conv; then
1979 deplibs="$deplib $deplibs" 2277 deplibs="$deplib $deplibs"
1980 continue 2278 continue
1981 fi 2279 fi
1982 case $linkmode in 2280 case $linkmode in
1983 lib) 2281 lib)
1984 » if test "$deplibs_check_method" != pass_all; then 2282 » valid_a_lib=no
2283 » case $deplibs_check_method in
2284 » match_pattern*)
2285 » » set dummy $deplibs_check_method
2286 » match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2287 » » if eval $echo \"$deplib\" 2>/dev/null \
2288 » » | $SED 10q \
2289 » » | $EGREP "$match_pattern_regex" > /dev/null; then
2290 » » valid_a_lib=yes
2291 » » fi
2292 » » ;;
2293 » pass_all)
2294 » » valid_a_lib=yes
2295 » » ;;
2296 esac
2297 » if test "$valid_a_lib" != yes; then
1985 $echo 2298 $echo
1986 $echo "*** Warning: Trying to link with static lib archive $deplib ." 2299 $echo "*** Warning: Trying to link with static lib archive $deplib ."
1987 $echo "*** I have the capability to make that library automaticall y link in when" 2300 $echo "*** I have the capability to make that library automaticall y link in when"
1988 $echo "*** you link to this library. But I can only do this if yo u have a" 2301 $echo "*** you link to this library. But I can only do this if yo u have a"
1989 $echo "*** shared version of the library, which you do not appear to have" 2302 $echo "*** shared version of the library, which you do not appear to have"
1990 $echo "*** because the file extensions .$libext of this argument m akes me believe" 2303 $echo "*** because the file extensions .$libext of this argument m akes me believe"
1991 $echo "*** that it is just a static archive that I should not used here." 2304 $echo "*** that it is just a static archive that I should not used here."
1992 else 2305 else
1993 $echo 2306 $echo
1994 $echo "*** Warning: Linking the shared library $output against the " 2307 $echo "*** Warning: Linking the shared library $output against the "
(...skipping 29 matching lines...) Expand all
2024 fi 2337 fi
2025 continue 2338 continue
2026 ;; 2339 ;;
2027 %DEPLIBS%) 2340 %DEPLIBS%)
2028 alldeplibs=yes 2341 alldeplibs=yes
2029 continue 2342 continue
2030 ;; 2343 ;;
2031 esac # case $deplib 2344 esac # case $deplib
2032 if test "$found" = yes || test -f "$lib"; then : 2345 if test "$found" = yes || test -f "$lib"; then :
2033 else 2346 else
2034 » $echo "$modename: cannot find the library \`$lib'" 1>&2 2347 » $echo "$modename: cannot find the library \`$lib' or unhandled argumen t \`$deplib'" 1>&2
2035 exit $EXIT_FAILURE 2348 exit $EXIT_FAILURE
2036 fi 2349 fi
2037 2350
2038 # Check to see that this really is a libtool archive. 2351 # Check to see that this really is a libtool archive.
2039 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 2352 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2040 else 2353 else
2041 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 2354 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2042 exit $EXIT_FAILURE 2355 exit $EXIT_FAILURE
2043 fi 2356 fi
2044 2357
2045 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2358 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2046 test "X$ladir" = "X$lib" && ladir="." 2359 test "X$ladir" = "X$lib" && ladir="."
2047 2360
2048 dlname= 2361 dlname=
2049 dlopen= 2362 dlopen=
2050 dlpreopen= 2363 dlpreopen=
2051 libdir= 2364 libdir=
2052 library_names= 2365 library_names=
2053 old_library= 2366 old_library=
2054 # If the library was installed with an old release of libtool, 2367 # If the library was installed with an old release of libtool,
2055 # it will not redefine variables installed, or shouldnotlink 2368 # it will not redefine variables installed, or shouldnotlink
2056 installed=yes 2369 installed=yes
2057 shouldnotlink=no 2370 shouldnotlink=no
2371 avoidtemprpath=
2372
2058 2373
2059 # Read the .la file 2374 # Read the .la file
2060 case $lib in 2375 case $lib in
2061 */* | *\\*) . $lib ;; 2376 */* | *\\*) . $lib ;;
2062 *) . ./$lib ;; 2377 *) . ./$lib ;;
2063 esac 2378 esac
2064 2379
2065 if test "$linkmode,$pass" = "lib,link" || 2380 if test "$linkmode,$pass" = "lib,link" ||
2066 test "$linkmode,$pass" = "prog,scan" || 2381 test "$linkmode,$pass" = "prog,scan" ||
2067 { test "$linkmode" != prog && test "$linkmode" != lib; }; then 2382 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 if test "X$installed" = Xyes; then 2461 if test "X$installed" = Xyes; then
2147 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then 2462 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2148 $echo "$modename: warning: library \`$lib' was moved." 1>&2 2463 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2149 dir="$ladir" 2464 dir="$ladir"
2150 absdir="$abs_ladir" 2465 absdir="$abs_ladir"
2151 libdir="$abs_ladir" 2466 libdir="$abs_ladir"
2152 else 2467 else
2153 dir="$libdir" 2468 dir="$libdir"
2154 absdir="$libdir" 2469 absdir="$libdir"
2155 fi 2470 fi
2471 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2156 else 2472 else
2157 » dir="$ladir/$objdir" 2473 » if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib "; then
2158 » absdir="$abs_ladir/$objdir" 2474 » dir="$ladir"
2159 » # Remove this search path later 2475 » absdir="$abs_ladir"
2160 » notinst_path="$notinst_path $abs_ladir" 2476 » # Remove this search path later
2477 » notinst_path="$notinst_path $abs_ladir"
2478 » else
2479 » dir="$ladir/$objdir"
2480 » absdir="$abs_ladir/$objdir"
2481 » # Remove this search path later
2482 » notinst_path="$notinst_path $abs_ladir"
2483 » fi
2161 fi # $installed = yes 2484 fi # $installed = yes
2162 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2485 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2163 2486
2164 # This library was specified with -dlpreopen. 2487 # This library was specified with -dlpreopen.
2165 if test "$pass" = dlpreopen; then 2488 if test "$pass" = dlpreopen; then
2166 if test -z "$libdir"; then 2489 if test -z "$libdir"; then
2167 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 2490 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2168 exit $EXIT_FAILURE 2491 exit $EXIT_FAILURE
2169 fi 2492 fi
2170 # Prefer using a static library (so that no silly _DYNAMIC symbols 2493 # Prefer using a static library (so that no silly _DYNAMIC symbols
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; 2544 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2222 esac 2545 esac
2223 fi 2546 fi
2224 tmp_libs="$tmp_libs $deplib" 2547 tmp_libs="$tmp_libs $deplib"
2225 done # for deplib 2548 done # for deplib
2226 continue 2549 continue
2227 fi # $linkmode = prog... 2550 fi # $linkmode = prog...
2228 2551
2229 if test "$linkmode,$pass" = "prog,link"; then 2552 if test "$linkmode,$pass" = "prog,link"; then
2230 if test -n "$library_names" && 2553 if test -n "$library_names" &&
2231 » { test "$prefer_static_libs" = no || test -z "$old_library"; }; the n 2554 » { { test "$prefer_static_libs" = no ||
2555 » » test "$prefer_static_libs,$installed" = "built,yes"; } ||
2556 » test -z "$old_library"; }; then
2232 # We need to hardcode the library path 2557 # We need to hardcode the library path
2233 » if test -n "$shlibpath_var"; then 2558 » if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2234 # Make sure the rpath contains only unique directories. 2559 # Make sure the rpath contains only unique directories.
2235 case "$temp_rpath " in 2560 case "$temp_rpath " in
2236 *" $dir "*) ;; 2561 *" $dir "*) ;;
2237 *" $absdir "*) ;; 2562 *" $absdir "*) ;;
2238 » *) temp_rpath="$temp_rpath $dir" ;; 2563 » *) temp_rpath="$temp_rpath $absdir" ;;
2239 esac 2564 esac
2240 fi 2565 fi
2241 2566
2242 # Hardcode the library path. 2567 # Hardcode the library path.
2243 # Skip directories that are in the system default run-time 2568 # Skip directories that are in the system default run-time
2244 # search path. 2569 # search path.
2245 case " $sys_lib_dlsearch_path " in 2570 case " $sys_lib_dlsearch_path " in
2246 *" $absdir "*) ;; 2571 *" $absdir "*) ;;
2247 *) 2572 *)
2248 case "$compile_rpath " in 2573 case "$compile_rpath " in
(...skipping 16 matching lines...) Expand all
2265 if test "$alldeplibs" = yes && 2590 if test "$alldeplibs" = yes &&
2266 { test "$deplibs_check_method" = pass_all || 2591 { test "$deplibs_check_method" = pass_all ||
2267 { test "$build_libtool_libs" = yes && 2592 { test "$build_libtool_libs" = yes &&
2268 test -n "$library_names"; }; }; then 2593 test -n "$library_names"; }; }; then
2269 # We only need to search for static libraries 2594 # We only need to search for static libraries
2270 continue 2595 continue
2271 fi 2596 fi
2272 fi 2597 fi
2273 2598
2274 link_static=no # Whether the deplib will be linked statically 2599 link_static=no # Whether the deplib will be linked statically
2600 use_static_libs=$prefer_static_libs
2601 if test "$use_static_libs" = built && test "$installed" = yes ; then
2602 use_static_libs=no
2603 fi
2275 if test -n "$library_names" && 2604 if test -n "$library_names" &&
2276 » { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2605 » { test "$use_static_libs" = no || test -z "$old_library"; }; then
2277 if test "$installed" = no; then 2606 if test "$installed" = no; then
2278 notinst_deplibs="$notinst_deplibs $lib" 2607 notinst_deplibs="$notinst_deplibs $lib"
2279 need_relink=yes 2608 need_relink=yes
2280 fi 2609 fi
2281 # This is a shared library 2610 # This is a shared library
2282 2611
2283 # Warn about portability, can't link against -module's on 2612 # Warn about portability, can't link against -module's on
2284 # some systems (darwin) 2613 # some systems (darwin)
2285 if test "$shouldnotlink" = yes && test "$pass" = link ; then 2614 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2286 $echo 2615 $echo
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 if test "$linkmode" = prog || test "$mode" != relink; then 2708 if test "$linkmode" = prog || test "$mode" != relink; then
2380 add_shlibpath= 2709 add_shlibpath=
2381 add_dir= 2710 add_dir=
2382 add= 2711 add=
2383 lib_linked=yes 2712 lib_linked=yes
2384 case $hardcode_action in 2713 case $hardcode_action in
2385 immediate | unsupported) 2714 immediate | unsupported)
2386 if test "$hardcode_direct" = no; then 2715 if test "$hardcode_direct" = no; then
2387 add="$dir/$linklib" 2716 add="$dir/$linklib"
2388 case $host in 2717 case $host in
2389 » » *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2718 » » *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2719 » » *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2720 » » *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2721 » » *-*-unixware7*) add_dir="-L$dir" ;;
2390 *-*-darwin* ) 2722 *-*-darwin* )
2391 # if the lib is a module then we can not link against 2723 # if the lib is a module then we can not link against
2392 # it, someone is ignoring the new warnings I added 2724 # it, someone is ignoring the new warnings I added
2393 » » if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/de v/null ; then 2725 » » if /usr/bin/file -L $add 2> /dev/null |
2726 $EGREP ": [^:]* bundle" >/dev/null ; then
2394 $echo "** Warning, lib $linklib is a module, not a shared library" 2727 $echo "** Warning, lib $linklib is a module, not a shared library"
2395 if test -z "$old_library" ; then 2728 if test -z "$old_library" ; then
2396 $echo 2729 $echo
2397 $echo "** And there doesn't seem to be a static archive available" 2730 $echo "** And there doesn't seem to be a static archive available"
2398 $echo "** The link will probably fail, sorry" 2731 $echo "** The link will probably fail, sorry"
2399 else 2732 else
2400 add="$dir/$old_library" 2733 add="$dir/$old_library"
2401 fi 2734 fi
2402 fi 2735 fi
2403 esac 2736 esac
(...skipping 10 matching lines...) Expand all
2414 lib_linked=no 2747 lib_linked=no
2415 fi 2748 fi
2416 ;; 2749 ;;
2417 relink) 2750 relink)
2418 if test "$hardcode_direct" = yes; then 2751 if test "$hardcode_direct" = yes; then
2419 add="$dir/$linklib" 2752 add="$dir/$linklib"
2420 elif test "$hardcode_minus_L" = yes; then 2753 elif test "$hardcode_minus_L" = yes; then
2421 add_dir="-L$dir" 2754 add_dir="-L$dir"
2422 # Try looking first in the location we're being installed to. 2755 # Try looking first in the location we're being installed to.
2423 if test -n "$inst_prefix_dir"; then 2756 if test -n "$inst_prefix_dir"; then
2424 » » case "$libdir" in 2757 » » case $libdir in
2425 [\\/]*) 2758 [\\/]*)
2426 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2759 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2427 ;; 2760 ;;
2428 esac 2761 esac
2429 fi 2762 fi
2430 add="-l$name" 2763 add="-l$name"
2431 elif test "$hardcode_shlibpath_var" = yes; then 2764 elif test "$hardcode_shlibpath_var" = yes; then
2432 add_shlibpath="$dir" 2765 add_shlibpath="$dir"
2433 add="-l$name" 2766 add="-l$name"
2434 else 2767 else
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 test -f "$inst_prefix_dir$libdir/$linklib" ; then 2820 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2488 add="$inst_prefix_dir$libdir/$linklib" 2821 add="$inst_prefix_dir$libdir/$linklib"
2489 else 2822 else
2490 add="$libdir/$linklib" 2823 add="$libdir/$linklib"
2491 fi 2824 fi
2492 else 2825 else
2493 # We cannot seem to hardcode it, guess we'll fake it. 2826 # We cannot seem to hardcode it, guess we'll fake it.
2494 add_dir="-L$libdir" 2827 add_dir="-L$libdir"
2495 # Try looking first in the location we're being installed to. 2828 # Try looking first in the location we're being installed to.
2496 if test -n "$inst_prefix_dir"; then 2829 if test -n "$inst_prefix_dir"; then
2497 » » case "$libdir" in 2830 » » case $libdir in
2498 [\\/]*) 2831 [\\/]*)
2499 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2832 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2500 ;; 2833 ;;
2501 esac 2834 esac
2502 fi 2835 fi
2503 add="-l$name" 2836 add="-l$name"
2504 fi 2837 fi
2505 2838
2506 if test "$linkmode" = prog; then 2839 if test "$linkmode" = prog; then
2507 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs " 2840 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs "
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 $echo "*** \`nm' from GNU binutils and a full rebuild may help." 2881 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2549 fi 2882 fi
2550 if test "$build_old_libs" = no; then 2883 if test "$build_old_libs" = no; then
2551 build_libtool_libs=module 2884 build_libtool_libs=module
2552 build_old_libs=yes 2885 build_old_libs=yes
2553 else 2886 else
2554 build_libtool_libs=no 2887 build_libtool_libs=no
2555 fi 2888 fi
2556 fi 2889 fi
2557 else 2890 else
2558 convenience="$convenience $dir/$old_library"
2559 old_convenience="$old_convenience $dir/$old_library"
2560 deplibs="$dir/$old_library $deplibs" 2891 deplibs="$dir/$old_library $deplibs"
2561 link_static=yes 2892 link_static=yes
2562 fi 2893 fi
2563 fi # link shared/static library? 2894 fi # link shared/static library?
2564 2895
2565 if test "$linkmode" = lib; then 2896 if test "$linkmode" = lib; then
2566 if test -n "$dependency_libs" && 2897 if test -n "$dependency_libs" &&
2567 { test "$hardcode_into_libs" != yes || 2898 { test "$hardcode_into_libs" != yes ||
2568 test "$build_old_libs" = yes || 2899 test "$build_old_libs" = yes ||
2569 test "$link_static" = yes; }; then 2900 test "$link_static" = yes; }; then
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 $echo "$modename: warning: \`$deplib' seems to be moved" 1>& 2 2959 $echo "$modename: warning: \`$deplib' seems to be moved" 1>& 2
2629 fi 2960 fi
2630 path="$absdir" 2961 path="$absdir"
2631 fi 2962 fi
2632 depdepl= 2963 depdepl=
2633 case $host in 2964 case $host in
2634 *-*-darwin*) 2965 *-*-darwin*)
2635 # we do not want to link against static libs, 2966 # we do not want to link against static libs,
2636 # but need to link against shared 2967 # but need to link against shared
2637 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/ \1/p' $deplib` 2968 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/ \1/p' $deplib`
2969 eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2638 if test -n "$deplibrary_names" ; then 2970 if test -n "$deplibrary_names" ; then
2639 for tmp in $deplibrary_names ; do 2971 for tmp in $deplibrary_names ; do
2640 depdepl=$tmp 2972 depdepl=$tmp
2641 done 2973 done
2642 » » if test -f "$path/$depdepl" ; then 2974 » » if test -f "$deplibdir/$depdepl" ; then
2975 » » depdepl="$deplibdir/$depdepl"
2976 » » elif test -f "$path/$depdepl" ; then
2643 depdepl="$path/$depdepl" 2977 depdepl="$path/$depdepl"
2978 else
2979 # Can't find it, oh well...
2980 depdepl=
2644 fi 2981 fi
2645 # do not add paths which are already there 2982 # do not add paths which are already there
2646 case " $newlib_search_path " in 2983 case " $newlib_search_path " in
2647 *" $path "*) ;; 2984 *" $path "*) ;;
2648 *) newlib_search_path="$newlib_search_path $path";; 2985 *) newlib_search_path="$newlib_search_path $path";;
2649 esac 2986 esac
2650 fi 2987 fi
2651 path="" 2988 path=""
2652 ;; 2989 ;;
2653 *) 2990 *)
(...skipping 13 matching lines...) Expand all
2667 fi 3004 fi
2668 done 3005 done
2669 path="" 3006 path=""
2670 ;; 3007 ;;
2671 *) continue ;; 3008 *) continue ;;
2672 esac 3009 esac
2673 ;; 3010 ;;
2674 *) continue ;; 3011 *) continue ;;
2675 esac 3012 esac
2676 case " $deplibs " in 3013 case " $deplibs " in
3014 *" $path "*) ;;
3015 *) deplibs="$path $deplibs" ;;
3016 esac
3017 case " $deplibs " in
2677 *" $depdepl "*) ;; 3018 *" $depdepl "*) ;;
2678 *) deplibs="$depdepl $deplibs" ;; 3019 *) deplibs="$depdepl $deplibs" ;;
2679 esac 3020 esac
2680 case " $deplibs " in
2681 *" $path "*) ;;
2682 *) deplibs="$deplibs $path" ;;
2683 esac
2684 done 3021 done
2685 fi # link_all_deplibs != no 3022 fi # link_all_deplibs != no
2686 fi # linkmode = lib 3023 fi # linkmode = lib
2687 done # for deplib in $libs 3024 done # for deplib in $libs
2688 dependency_libs="$newdependency_libs" 3025 dependency_libs="$newdependency_libs"
2689 if test "$pass" = dlpreopen; then 3026 if test "$pass" = dlpreopen; then
2690 # Link the dlpreopened libraries before other libraries 3027 # Link the dlpreopened libraries before other libraries
2691 for deplib in $save_deplibs; do 3028 for deplib in $save_deplibs; do
2692 deplibs="$deplib $deplibs" 3029 deplibs="$deplib $deplibs"
2693 done 3030 done
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 done 3118 done
2782 dependency_libs=$tmp_libs 3119 dependency_libs=$tmp_libs
2783 done # for pass 3120 done # for pass
2784 if test "$linkmode" = prog; then 3121 if test "$linkmode" = prog; then
2785 dlfiles="$newdlfiles" 3122 dlfiles="$newdlfiles"
2786 dlprefiles="$newdlprefiles" 3123 dlprefiles="$newdlprefiles"
2787 fi 3124 fi
2788 3125
2789 case $linkmode in 3126 case $linkmode in
2790 oldlib) 3127 oldlib)
2791 if test -n "$deplibs"; then 3128 case " $deplibs" in
2792 » $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>& 2 3129 *\ -l* | *\ -L*)
2793 fi 3130 » $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>& 2 ;;
3131 esac
2794 3132
2795 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 3133 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2796 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 3134 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2797 fi 3135 fi
2798 3136
2799 if test -n "$rpath"; then 3137 if test -n "$rpath"; then
2800 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 3138 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2801 fi 3139 fi
2802 3140
2803 if test -n "$xrpath"; then 3141 if test -n "$xrpath"; then
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 number_minor="$3" 3249 number_minor="$3"
2912 number_revision="$4" 3250 number_revision="$4"
2913 # 3251 #
2914 # There are really only two kinds -- those that 3252 # There are really only two kinds -- those that
2915 # use the current revision as the major version 3253 # use the current revision as the major version
2916 # and those that subtract age and use age as 3254 # and those that subtract age and use age as
2917 # a minor version. But, then there is irix 3255 # a minor version. But, then there is irix
2918 # which has an extra 1 added just for fun 3256 # which has an extra 1 added just for fun
2919 # 3257 #
2920 case $version_type in 3258 case $version_type in
2921 » darwin|linux|osf|windows) 3259 » darwin|linux|osf|windows|none)
2922 current=`expr $number_major + $number_minor` 3260 current=`expr $number_major + $number_minor`
2923 age="$number_minor" 3261 age="$number_minor"
2924 revision="$number_revision" 3262 revision="$number_revision"
2925 ;; 3263 ;;
2926 freebsd-aout|freebsd-elf|sunos) 3264 freebsd-aout|freebsd-elf|sunos)
2927 current="$number_major" 3265 current="$number_major"
2928 revision="$number_minor" 3266 revision="$number_minor"
2929 age="0" 3267 age="0"
2930 ;; 3268 ;;
2931 irix|nonstopux) 3269 irix|nonstopux)
2932 » current=`expr $number_major + $number_minor - 1` 3270 » current=`expr $number_major + $number_minor`
2933 age="$number_minor" 3271 age="$number_minor"
2934 revision="$number_minor" 3272 revision="$number_minor"
3273 lt_irix_increment=no
3274 ;;
3275 *)
3276 $echo "$modename: unknown library version type \`$version_type'" 1>& 2
3277 $echo "Fatal configuration error. See the $PACKAGE docs for more in formation." 1>&2
3278 exit $EXIT_FAILURE
2935 ;; 3279 ;;
2936 esac 3280 esac
2937 ;; 3281 ;;
2938 no) 3282 no)
2939 current="$2" 3283 current="$2"
2940 revision="$3" 3284 revision="$3"
2941 age="$4" 3285 age="$4"
2942 ;; 3286 ;;
2943 esac 3287 esac
2944 3288
2945 # Check that each of the things are valid numbers. 3289 # Check that each of the things are valid numbers.
2946 case $current in 3290 case $current in
2947 » [0-9]*) ;; 3291 » 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][ 0-9][0-9]) ;;
2948 *) 3292 *)
2949 » $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1> &2 3293 » $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1 >&2
2950 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3294 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2951 exit $EXIT_FAILURE 3295 exit $EXIT_FAILURE
2952 ;; 3296 ;;
2953 esac 3297 esac
2954 3298
2955 case $revision in 3299 case $revision in
2956 » [0-9]*) ;; 3300 » 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][ 0-9][0-9]) ;;
2957 *) 3301 *)
2958 » $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 3302 » $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
2959 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3303 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2960 exit $EXIT_FAILURE 3304 exit $EXIT_FAILURE
2961 ;; 3305 ;;
2962 esac 3306 esac
2963 3307
2964 case $age in 3308 case $age in
2965 » [0-9]*) ;; 3309 » 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][ 0-9][0-9]) ;;
2966 *) 3310 *)
2967 » $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 3311 » $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
2968 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3312 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2969 exit $EXIT_FAILURE 3313 exit $EXIT_FAILURE
2970 ;; 3314 ;;
2971 esac 3315 esac
2972 3316
2973 if test "$age" -gt "$current"; then 3317 if test "$age" -gt "$current"; then
2974 $echo "$modename: AGE \`$age' is greater than the current interface nu mber \`$current'" 1>&2 3318 $echo "$modename: AGE \`$age' is greater than the current interface nu mber \`$current'" 1>&2
2975 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 3319 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2976 exit $EXIT_FAILURE 3320 exit $EXIT_FAILURE
2977 fi 3321 fi
2978 3322
2979 # Calculate the version variables. 3323 # Calculate the version variables.
2980 major= 3324 major=
2981 versuffix= 3325 versuffix=
2982 verstring= 3326 verstring=
2983 case $version_type in 3327 case $version_type in
2984 none) ;; 3328 none) ;;
2985 3329
2986 darwin) 3330 darwin)
2987 # Like Linux, but with the current version available in 3331 # Like Linux, but with the current version available in
2988 # verstring for coding it into the library header 3332 # verstring for coding it into the library header
2989 major=.`expr $current - $age` 3333 major=.`expr $current - $age`
2990 versuffix="$major.$age.$revision" 3334 versuffix="$major.$age.$revision"
2991 # Darwin ld doesn't like 0 for these options... 3335 # Darwin ld doesn't like 0 for these options...
2992 minor_current=`expr $current + 1` 3336 minor_current=`expr $current + 1`
3337 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-cu rrent_version ${wl}$minor_current.$revision"
2993 verstring="-compatibility_version $minor_current -current_version $min or_current.$revision" 3338 verstring="-compatibility_version $minor_current -current_version $min or_current.$revision"
2994 ;; 3339 ;;
2995 3340
2996 freebsd-aout) 3341 freebsd-aout)
2997 major=".$current" 3342 major=".$current"
2998 versuffix=".$current.$revision"; 3343 versuffix=".$current.$revision";
2999 ;; 3344 ;;
3000 3345
3001 freebsd-elf) 3346 freebsd-elf)
3002 major=".$current" 3347 major=".$current"
3003 versuffix=".$current"; 3348 versuffix=".$current";
3004 ;; 3349 ;;
3005 3350
3006 irix | nonstopux) 3351 irix | nonstopux)
3007 » major=`expr $current - $age + 1` 3352 » if test "X$lt_irix_increment" = "Xno"; then
3008 3353 » major=`expr $current - $age`
3354 » else
3355 » major=`expr $current - $age + 1`
3356 » fi
3009 case $version_type in 3357 case $version_type in
3010 nonstopux) verstring_prefix=nonstopux ;; 3358 nonstopux) verstring_prefix=nonstopux ;;
3011 *) verstring_prefix=sgi ;; 3359 *) verstring_prefix=sgi ;;
3012 esac 3360 esac
3013 verstring="$verstring_prefix$major.$revision" 3361 verstring="$verstring_prefix$major.$revision"
3014 3362
3015 # Add in all the interfaces that we are compatible with. 3363 # Add in all the interfaces that we are compatible with.
3016 loop=$revision 3364 loop=$revision
3017 while test "$loop" -ne 0; do 3365 while test "$loop" -ne 0; do
3018 iface=`expr $revision - $loop` 3366 iface=`expr $revision - $loop`
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3135 3483
3136 # Now set the variables for building old libraries. 3484 # Now set the variables for building old libraries.
3137 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenien ce ; then 3485 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenien ce ; then
3138 oldlibs="$oldlibs $output_objdir/$libname.$libext" 3486 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3139 3487
3140 # Transform .lo files to .o files. 3488 # Transform .lo files to .o files.
3141 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/ d' -e "$lo2o" | $NL2SP` 3489 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/ d' -e "$lo2o" | $NL2SP`
3142 fi 3490 fi
3143 3491
3144 # Eliminate all temporary directories. 3492 # Eliminate all temporary directories.
3145 for path in $notinst_path; do 3493 #for path in $notinst_path; do
3146 » lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` 3494 #»lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3147 » deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` 3495 #»deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3148 » dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g' ` 3496 #»dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g" `
3149 done 3497 #done
3150 3498
3151 if test -n "$xrpath"; then 3499 if test -n "$xrpath"; then
3152 # If the user specified any rpath flags, then add them. 3500 # If the user specified any rpath flags, then add them.
3153 temp_xrpath= 3501 temp_xrpath=
3154 for libdir in $xrpath; do 3502 for libdir in $xrpath; do
3155 temp_xrpath="$temp_xrpath -R$libdir" 3503 temp_xrpath="$temp_xrpath -R$libdir"
3156 case "$finalize_rpath " in 3504 case "$finalize_rpath " in
3157 *" $libdir "*) ;; 3505 *" $libdir "*) ;;
3158 *) finalize_rpath="$finalize_rpath $libdir" ;; 3506 *) finalize_rpath="$finalize_rpath $libdir" ;;
3159 esac 3507 esac
(...skipping 29 matching lines...) Expand all
3189 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) 3537 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3190 # these systems don't actually have a c library (as such)! 3538 # these systems don't actually have a c library (as such)!
3191 ;; 3539 ;;
3192 *-*-rhapsody* | *-*-darwin1.[012]) 3540 *-*-rhapsody* | *-*-darwin1.[012])
3193 # Rhapsody C library is in the System framework 3541 # Rhapsody C library is in the System framework
3194 deplibs="$deplibs -framework System" 3542 deplibs="$deplibs -framework System"
3195 ;; 3543 ;;
3196 *-*-netbsd*) 3544 *-*-netbsd*)
3197 # Don't link with libc until the a.out ld.so is fixed. 3545 # Don't link with libc until the a.out ld.so is fixed.
3198 ;; 3546 ;;
3199 » *-*-openbsd* | *-*-freebsd*) 3547 » *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3200 # Do not include libc due to us having libc/libc_r. 3548 # Do not include libc due to us having libc/libc_r.
3201 » test "X$arg" = "X-lc" && continue 3549 » ;;
3550 » *-*-sco3.2v5* | *-*-sco5v6*)
3551 » # Causes problems with __ctype
3552 » ;;
3553 » *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3554 » # Compiler inserts libc in the correct place for threads to work
3202 ;; 3555 ;;
3203 *) 3556 *)
3204 # Add libc to deplibs on all other systems if necessary. 3557 # Add libc to deplibs on all other systems if necessary.
3205 if test "$build_libtool_need_lc" = "yes"; then 3558 if test "$build_libtool_need_lc" = "yes"; then
3206 deplibs="$deplibs -lc" 3559 deplibs="$deplibs -lc"
3207 fi 3560 fi
3208 ;; 3561 ;;
3209 esac 3562 esac
3210 fi 3563 fi
3211 3564
(...skipping 23 matching lines...) Expand all
3235 test_compile) 3588 test_compile)
3236 # This code stresses the "libraries are programs" paradigm to its 3589 # This code stresses the "libraries are programs" paradigm to its
3237 # limits. Maybe even breaks it. We compile a program, linking it 3590 # limits. Maybe even breaks it. We compile a program, linking it
3238 # against the deplibs as a proxy for the library. Then we can check 3591 # against the deplibs as a proxy for the library. Then we can check
3239 # whether they linked in statically or dynamically with ldd. 3592 # whether they linked in statically or dynamically with ldd.
3240 $rm conftest.c 3593 $rm conftest.c
3241 cat > conftest.c <<EOF 3594 cat > conftest.c <<EOF
3242 int main() { return 0; } 3595 int main() { return 0; }
3243 EOF 3596 EOF
3244 $rm conftest 3597 $rm conftest
3245 » $LTCC -o conftest conftest.c $deplibs 3598 » if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3246 » if test "$?" -eq 0 ; then
3247 ldd_output=`ldd conftest` 3599 ldd_output=`ldd conftest`
3248 for i in $deplibs; do 3600 for i in $deplibs; do
3249 » name="`expr $i : '-l\(.*\)'`" 3601 » name=`expr $i : '-l\(.*\)'`
3250 # If $name is empty we are operating on a -L argument. 3602 # If $name is empty we are operating on a -L argument.
3251 if test "$name" != "" && test "$name" -ne "0"; then 3603 if test "$name" != "" && test "$name" != "0"; then
3252 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; t hen 3604 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; t hen
3253 case " $predeps $postdeps " in 3605 case " $predeps $postdeps " in
3254 *" $i "*) 3606 *" $i "*)
3255 newdeplibs="$newdeplibs $i" 3607 newdeplibs="$newdeplibs $i"
3256 i="" 3608 i=""
3257 ;; 3609 ;;
3258 esac 3610 esac
3259 fi 3611 fi
3260 if test -n "$i" ; then 3612 if test -n "$i" ; then
3261 libname=`eval \\$echo \"$libname_spec\"` 3613 libname=`eval \\$echo \"$libname_spec\"`
(...skipping 14 matching lines...) Expand all
3276 fi 3628 fi
3277 fi 3629 fi
3278 else 3630 else
3279 newdeplibs="$newdeplibs $i" 3631 newdeplibs="$newdeplibs $i"
3280 fi 3632 fi
3281 done 3633 done
3282 else 3634 else
3283 # Error occurred in the first compile. Let's try to salvage 3635 # Error occurred in the first compile. Let's try to salvage
3284 # the situation: Compile a separate program for each library. 3636 # the situation: Compile a separate program for each library.
3285 for i in $deplibs; do 3637 for i in $deplibs; do
3286 » name="`expr $i : '-l\(.*\)'`" 3638 » name=`expr $i : '-l\(.*\)'`
3287 # If $name is empty we are operating on a -L argument. 3639 # If $name is empty we are operating on a -L argument.
3288 if test "$name" != "" && test "$name" != "0"; then 3640 if test "$name" != "" && test "$name" != "0"; then
3289 $rm conftest 3641 $rm conftest
3290 » » $LTCC -o conftest conftest.c $i 3642 » » if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3291 » » # Did it work?
3292 » » if test "$?" -eq 0 ; then
3293 ldd_output=`ldd conftest` 3643 ldd_output=`ldd conftest`
3294 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3644 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3295 case " $predeps $postdeps " in 3645 case " $predeps $postdeps " in
3296 *" $i "*) 3646 *" $i "*)
3297 newdeplibs="$newdeplibs $i" 3647 newdeplibs="$newdeplibs $i"
3298 i="" 3648 i=""
3299 ;; 3649 ;;
3300 esac 3650 esac
3301 fi 3651 fi
3302 if test -n "$i" ; then 3652 if test -n "$i" ; then
(...skipping 11 matching lines...) Expand all
3314 $echo "*** you link to this library. But I can only do th is if you have a" 3664 $echo "*** you link to this library. But I can only do th is if you have a"
3315 $echo "*** shared version of the library, which you do not appear to have" 3665 $echo "*** shared version of the library, which you do not appear to have"
3316 $echo "*** because a test_compile did reveal that the link er did not use this one" 3666 $echo "*** because a test_compile did reveal that the link er did not use this one"
3317 $echo "*** as a dynamic dependency that programs can get r esolved with at runtime." 3667 $echo "*** as a dynamic dependency that programs can get r esolved with at runtime."
3318 fi 3668 fi
3319 fi 3669 fi
3320 else 3670 else
3321 droppeddeps=yes 3671 droppeddeps=yes
3322 $echo 3672 $echo
3323 $echo "*** Warning! Library $i is needed by this library but I was not able to" 3673 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3324 » » $echo "*** make it link in! You will probably need to instal l it or some" 3674 » » $echo "*** make it link in! You will probably need to install it or some"
3325 $echo "*** library that it depends on before this library will be fully" 3675 $echo "*** library that it depends on before this library will be fully"
3326 $echo "*** functional. Installing it before continuing would be even better." 3676 $echo "*** functional. Installing it before continuing would be even better."
3327 fi 3677 fi
3328 else 3678 else
3329 newdeplibs="$newdeplibs $i" 3679 newdeplibs="$newdeplibs $i"
3330 fi 3680 fi
3331 done 3681 done
3332 fi 3682 fi
3333 ;; 3683 ;;
3334 file_magic*) 3684 file_magic*)
3335 set dummy $deplibs_check_method 3685 set dummy $deplibs_check_method
3336 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3686 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3337 for a_deplib in $deplibs; do 3687 for a_deplib in $deplibs; do
3338 » name="`expr $a_deplib : '-l\(.*\)'`" 3688 » name=`expr $a_deplib : '-l\(.*\)'`
3339 # If $name is empty we are operating on a -L argument. 3689 # If $name is empty we are operating on a -L argument.
3340 if test "$name" != "" && test "$name" != "0"; then 3690 if test "$name" != "" && test "$name" != "0"; then
3341 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; the n 3691 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; the n
3342 case " $predeps $postdeps " in 3692 case " $predeps $postdeps " in
3343 *" $a_deplib "*) 3693 *" $a_deplib "*)
3344 newdeplibs="$newdeplibs $a_deplib" 3694 newdeplibs="$newdeplibs $a_deplib"
3345 a_deplib="" 3695 a_deplib=""
3346 ;; 3696 ;;
3347 esac 3697 esac
3348 fi 3698 fi
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3397 else 3747 else
3398 # Add a -L argument. 3748 # Add a -L argument.
3399 newdeplibs="$newdeplibs $a_deplib" 3749 newdeplibs="$newdeplibs $a_deplib"
3400 fi 3750 fi
3401 done # Gone through all deplibs. 3751 done # Gone through all deplibs.
3402 ;; 3752 ;;
3403 match_pattern*) 3753 match_pattern*)
3404 set dummy $deplibs_check_method 3754 set dummy $deplibs_check_method
3405 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` 3755 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3406 for a_deplib in $deplibs; do 3756 for a_deplib in $deplibs; do
3407 » name="`expr $a_deplib : '-l\(.*\)'`" 3757 » name=`expr $a_deplib : '-l\(.*\)'`
3408 # If $name is empty we are operating on a -L argument. 3758 # If $name is empty we are operating on a -L argument.
3409 if test -n "$name" && test "$name" != "0"; then 3759 if test -n "$name" && test "$name" != "0"; then
3410 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; the n 3760 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; the n
3411 case " $predeps $postdeps " in 3761 case " $predeps $postdeps " in
3412 *" $a_deplib "*) 3762 *" $a_deplib "*)
3413 newdeplibs="$newdeplibs $a_deplib" 3763 newdeplibs="$newdeplibs $a_deplib"
3414 a_deplib="" 3764 a_deplib=""
3415 ;; 3765 ;;
3416 esac 3766 esac
3417 fi 3767 fi
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
3527 else 3877 else
3528 build_libtool_libs=no 3878 build_libtool_libs=no
3529 fi 3879 fi
3530 fi 3880 fi
3531 fi 3881 fi
3532 fi 3882 fi
3533 # Done checking deplibs! 3883 # Done checking deplibs!
3534 deplibs=$newdeplibs 3884 deplibs=$newdeplibs
3535 fi 3885 fi
3536 3886
3887
3888 # move library search paths that coincide with paths to not yet
3889 # installed libraries to the beginning of the library search list
3890 new_libs=
3891 for path in $notinst_path; do
3892 case " $new_libs " in
3893 *" -L$path/$objdir "*) ;;
3894 *)
3895 case " $deplibs " in
3896 *" -L$path/$objdir "*)
3897 new_libs="$new_libs -L$path/$objdir" ;;
3898 esac
3899 ;;
3900 esac
3901 done
3902 for deplib in $deplibs; do
3903 case $deplib in
3904 -L*)
3905 case " $new_libs " in
3906 *" $deplib "*) ;;
3907 *) new_libs="$new_libs $deplib" ;;
3908 esac
3909 ;;
3910 *) new_libs="$new_libs $deplib" ;;
3911 esac
3912 done
3913 deplibs="$new_libs"
3914
3915
3537 # All the library-specific variables (install_libdir is set above). 3916 # All the library-specific variables (install_libdir is set above).
3538 library_names= 3917 library_names=
3539 old_library= 3918 old_library=
3540 dlname= 3919 dlname=
3541 3920
3542 # Test again, we may have decided not to build it any more 3921 # Test again, we may have decided not to build it any more
3543 if test "$build_libtool_libs" = yes; then 3922 if test "$build_libtool_libs" = yes; then
3544 if test "$hardcode_into_libs" = yes; then 3923 if test "$hardcode_into_libs" = yes; then
3545 # Hardcode the library paths 3924 # Hardcode the library paths
3546 hardcode_libdirs= 3925 hardcode_libdirs=
(...skipping 24 matching lines...) Expand all
3571 *" $libdir "*) ;; 3950 *" $libdir "*) ;;
3572 *) perm_rpath="$perm_rpath $libdir" ;; 3951 *) perm_rpath="$perm_rpath $libdir" ;;
3573 esac 3952 esac
3574 fi 3953 fi
3575 done 3954 done
3576 # Substitute the hardcoded libdirs into the rpath. 3955 # Substitute the hardcoded libdirs into the rpath.
3577 if test -n "$hardcode_libdir_separator" && 3956 if test -n "$hardcode_libdir_separator" &&
3578 test -n "$hardcode_libdirs"; then 3957 test -n "$hardcode_libdirs"; then
3579 libdir="$hardcode_libdirs" 3958 libdir="$hardcode_libdirs"
3580 if test -n "$hardcode_libdir_flag_spec_ld"; then 3959 if test -n "$hardcode_libdir_flag_spec_ld"; then
3581 » eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" 3960 » case $archive_cmds in
3961 » *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
3962 » *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
3963 » esac
3582 else 3964 else
3583 eval dep_rpath=\"$hardcode_libdir_flag_spec\" 3965 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3584 fi 3966 fi
3585 fi 3967 fi
3586 if test -n "$runpath_var" && test -n "$perm_rpath"; then 3968 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3587 # We should set the runpath_var. 3969 # We should set the runpath_var.
3588 rpath= 3970 rpath=
3589 for dir in $perm_rpath; do 3971 for dir in $perm_rpath; do
3590 rpath="$rpath$dir:" 3972 rpath="$rpath$dir:"
3591 done 3973 done
(...skipping 18 matching lines...) Expand all
3610 if test -n "$soname_spec"; then 3992 if test -n "$soname_spec"; then
3611 eval soname=\"$soname_spec\" 3993 eval soname=\"$soname_spec\"
3612 else 3994 else
3613 soname="$realname" 3995 soname="$realname"
3614 fi 3996 fi
3615 if test -z "$dlname"; then 3997 if test -z "$dlname"; then
3616 dlname=$soname 3998 dlname=$soname
3617 fi 3999 fi
3618 4000
3619 lib="$output_objdir/$realname" 4001 lib="$output_objdir/$realname"
4002 linknames=
3620 for link 4003 for link
3621 do 4004 do
3622 linknames="$linknames $link" 4005 linknames="$linknames $link"
3623 done 4006 done
3624 4007
3625 # Use standard objects if they are pic 4008 # Use standard objects if they are pic
3626 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$ lo2o" | $NL2SP` 4009 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$ lo2o" | $NL2SP`
3627 4010
3628 # Prepare the list of exported symbols 4011 # Prepare the list of exported symbols
3629 if test -z "$export_symbols"; then 4012 if test -z "$export_symbols"; then
3630 if test "$always_export_symbols" = yes || test -n "$export_symbols_reg ex"; then 4013 if test "$always_export_symbols" = yes || test -n "$export_symbols_reg ex"; then
3631 $show "generating symbol list for \`$libname.la'" 4014 $show "generating symbol list for \`$libname.la'"
3632 export_symbols="$output_objdir/$libname.exp" 4015 export_symbols="$output_objdir/$libname.exp"
3633 $run $rm $export_symbols 4016 $run $rm $export_symbols
3634 cmds=$export_symbols_cmds 4017 cmds=$export_symbols_cmds
3635 save_ifs="$IFS"; IFS='~' 4018 save_ifs="$IFS"; IFS='~'
3636 for cmd in $cmds; do 4019 for cmd in $cmds; do
3637 IFS="$save_ifs" 4020 IFS="$save_ifs"
3638 eval cmd=\"$cmd\" 4021 eval cmd=\"$cmd\"
3639 if len=`expr "X$cmd" : ".*"` && 4022 if len=`expr "X$cmd" : ".*"` &&
3640 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; the n 4023 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; the n
3641 $show "$cmd" 4024 $show "$cmd"
3642 $run eval "$cmd" || exit $? 4025 $run eval "$cmd" || exit $?
3643 skipped_export=false 4026 skipped_export=false
3644 else 4027 else
3645 # The command line is too long to execute in one step. 4028 # The command line is too long to execute in one step.
3646 $show "using reloadable object file for export list..." 4029 $show "using reloadable object file for export list..."
3647 skipped_export=: 4030 skipped_export=:
4031 # Break out early, otherwise skipped_export may be
4032 # set to false by a later but shorter cmd.
4033 break
3648 fi 4034 fi
3649 done 4035 done
3650 IFS="$save_ifs" 4036 IFS="$save_ifs"
3651 if test -n "$export_symbols_regex"; then 4037 if test -n "$export_symbols_regex"; then
3652 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \ "${export_symbols}T\"" 4038 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \ "${export_symbols}T\""
3653 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > " ${export_symbols}T"' 4039 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > " ${export_symbols}T"'
3654 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" 4040 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3655 $run eval '$mv "${export_symbols}T" "$export_symbols"' 4041 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3656 fi 4042 fi
3657 fi 4043 fi
(...skipping 13 matching lines...) Expand all
3671 esac 4057 esac
3672 done 4058 done
3673 deplibs="$tmp_deplibs" 4059 deplibs="$tmp_deplibs"
3674 4060
3675 if test -n "$convenience"; then 4061 if test -n "$convenience"; then
3676 if test -n "$whole_archive_flag_spec"; then 4062 if test -n "$whole_archive_flag_spec"; then
3677 save_libobjs=$libobjs 4063 save_libobjs=$libobjs
3678 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 4064 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3679 else 4065 else
3680 gentop="$output_objdir/${outputname}x" 4066 gentop="$output_objdir/${outputname}x"
3681 $show "${rm}r $gentop"
3682 $run ${rm}r "$gentop"
3683 $show "$mkdir $gentop"
3684 $run $mkdir "$gentop"
3685 status=$?
3686 if test "$status" -ne 0 && test ! -d "$gentop"; then
3687 exit $status
3688 fi
3689 generated="$generated $gentop" 4067 generated="$generated $gentop"
3690 4068
3691 » for xlib in $convenience; do 4069 » func_extract_archives $gentop $convenience
3692 » # Extract the objects. 4070 » libobjs="$libobjs $func_extract_archives_result"
3693 » case $xlib in
3694 » [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3695 » *) xabs=`pwd`"/$xlib" ;;
3696 » esac
3697 » xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3698 » xdir="$gentop/$xlib"
3699
3700 » $show "${rm}r $xdir"
3701 » $run ${rm}r "$xdir"
3702 » $show "$mkdir $xdir"
3703 » $run $mkdir "$xdir"
3704 » status=$?
3705 » if test "$status" -ne 0 && test ! -d "$xdir"; then
3706 » » exit $status
3707 » fi
3708 » # We will extract separately just the conflicting names and we wil l no
3709 » # longer touch any unique names. It is faster to leave these extra ct
3710 » # automatically by $AR in one run.
3711 » $show "(cd $xdir && $AR x $xabs)"
3712 » $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3713 » if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
3714 » » :
3715 » else
3716 » » $echo "$modename: warning: object name conflicts; renaming objec t files" 1>&2
3717 » » $echo "$modename: warning: to ensure that they will not overwrit e" 1>&2
3718 » » $AR t "$xabs" | sort | uniq -cd | while read -r count name
3719 » » do
3720 » » i=1
3721 » » while test "$i" -le "$count"
3722 » » do
3723 » » # Put our $i before any first dot (extension)
3724 » » # Never overwrite any file
3725 » » name_to="$name"
3726 » » while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
3727 » » do
3728 » » name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
3729 » » done
3730 » » $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$ name_to')"
3731 » » $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$na me' '$name_to')" || exit $?
3732 » » i=`expr $i + 1`
3733 » » done
3734 » » done
3735 » fi
3736
3737 » libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \* .lo -print | $NL2SP`
3738 » done
3739 fi 4071 fi
3740 fi 4072 fi
3741 4073 »
3742 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 4074 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
3743 eval flag=\"$thread_safe_flag_spec\" 4075 eval flag=\"$thread_safe_flag_spec\"
3744 linker_flags="$linker_flags $flag" 4076 linker_flags="$linker_flags $flag"
3745 fi 4077 fi
3746 4078
3747 # Make a backup of the uninstalled library when relinking 4079 # Make a backup of the uninstalled library when relinking
3748 if test "$mode" = relink; then 4080 if test "$mode" = relink; then
3749 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${r ealname}U)' || exit $? 4081 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${r ealname}U)' || exit $?
3750 fi 4082 fi
3751 4083
3752 # Do each of the archive commands. 4084 # Do each of the archive commands.
3753 if test "$module" = yes && test -n "$module_cmds" ; then 4085 if test "$module" = yes && test -n "$module_cmds" ; then
3754 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 4086 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
3755 eval test_cmds=\"$module_expsym_cmds\" 4087 eval test_cmds=\"$module_expsym_cmds\"
3756 cmds=$module_expsym_cmds 4088 cmds=$module_expsym_cmds
3757 else 4089 else
3758 eval test_cmds=\"$module_cmds\" 4090 eval test_cmds=\"$module_cmds\"
3759 cmds=$module_cmds 4091 cmds=$module_cmds
3760 fi 4092 fi
3761 else 4093 else
3762 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 4094 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
3763 eval test_cmds=\"$archive_expsym_cmds\" 4095 eval test_cmds=\"$archive_expsym_cmds\"
3764 cmds=$archive_expsym_cmds 4096 cmds=$archive_expsym_cmds
3765 else 4097 else
3766 eval test_cmds=\"$archive_cmds\" 4098 eval test_cmds=\"$archive_cmds\"
3767 cmds=$archive_cmds 4099 cmds=$archive_cmds
3768 fi 4100 fi
3769 fi 4101 fi
3770 4102
3771 » if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && 4103 » if test "X$skipped_export" != "X:" &&
4104 » len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3772 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 4105 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3773 : 4106 :
3774 else 4107 else
3775 # The command line is too long to link in one step, link piecewise. 4108 # The command line is too long to link in one step, link piecewise.
3776 $echo "creating reloadable object files..." 4109 $echo "creating reloadable object files..."
3777 4110
3778 # Save the value of $output and $libobjs because we want to 4111 # Save the value of $output and $libobjs because we want to
3779 # use them later. If we have whole_archive_flag_spec, we 4112 # use them later. If we have whole_archive_flag_spec, we
3780 # want to use save_libobjs as it was before 4113 # want to use save_libobjs as it was before
3781 # whole_archive_flag_spec was expanded, because we can't 4114 # whole_archive_flag_spec was expanded, because we can't
3782 # assume the linker understands whole_archive_flag_spec. 4115 # assume the linker understands whole_archive_flag_spec.
3783 # This may have to be revisited, in case too many 4116 # This may have to be revisited, in case too many
3784 # convenience libraries get linked in and end up exceeding 4117 # convenience libraries get linked in and end up exceeding
3785 # the spec. 4118 # the spec.
3786 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 4119 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
3787 save_libobjs=$libobjs 4120 save_libobjs=$libobjs
3788 fi 4121 fi
3789 save_output=$output 4122 save_output=$output
4123 output_la=`$echo "X$output" | $Xsed -e "$basename"`
3790 4124
3791 # Clear the reloadable object creation command queue and 4125 # Clear the reloadable object creation command queue and
3792 # initialize k to one. 4126 # initialize k to one.
3793 test_cmds= 4127 test_cmds=
3794 concat_cmds= 4128 concat_cmds=
3795 objlist= 4129 objlist=
3796 delfiles= 4130 delfiles=
3797 last_robj= 4131 last_robj=
3798 k=1 4132 k=1
3799 » output=$output_objdir/$save_output-${k}.$objext 4133 » output=$output_objdir/$output_la-${k}.$objext
3800 # Loop over the list of objects to be linked. 4134 # Loop over the list of objects to be linked.
3801 for obj in $save_libobjs 4135 for obj in $save_libobjs
3802 do 4136 do
3803 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 4137 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
3804 if test "X$objlist" = X || 4138 if test "X$objlist" = X ||
3805 » { len=`expr "X$test_cmds" : ".*"` && 4139 » { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
3806 test "$len" -le "$max_cmd_len"; }; then 4140 test "$len" -le "$max_cmd_len"; }; then
3807 objlist="$objlist $obj" 4141 objlist="$objlist $obj"
3808 else 4142 else
3809 # The command $test_cmds is almost too long, add a 4143 # The command $test_cmds is almost too long, add a
3810 # command to the queue. 4144 # command to the queue.
3811 if test "$k" -eq 1 ; then 4145 if test "$k" -eq 1 ; then
3812 # The first file doesn't have a previous command to add. 4146 # The first file doesn't have a previous command to add.
3813 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 4147 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
3814 else 4148 else
3815 # All subsequent reloadable object files will link in 4149 # All subsequent reloadable object files will link in
3816 # the last one created. 4150 # the last one created.
3817 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_rob j\" 4151 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_rob j\"
3818 fi 4152 fi
3819 » last_robj=$output_objdir/$save_output-${k}.$objext 4153 » last_robj=$output_objdir/$output_la-${k}.$objext
3820 k=`expr $k + 1` 4154 k=`expr $k + 1`
3821 » output=$output_objdir/$save_output-${k}.$objext 4155 » output=$output_objdir/$output_la-${k}.$objext
3822 objlist=$obj 4156 objlist=$obj
3823 len=1 4157 len=1
3824 fi 4158 fi
3825 done 4159 done
3826 # Handle the remaining objects by creating one last 4160 # Handle the remaining objects by creating one last
3827 # reloadable object file. All subsequent reloadable object 4161 # reloadable object file. All subsequent reloadable object
3828 # files will link in the last one created. 4162 # files will link in the last one created.
3829 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 4163 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
3830 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 4164 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
3831 4165
3832 if ${skipped_export-false}; then 4166 if ${skipped_export-false}; then
3833 $show "generating symbol list for \`$libname.la'" 4167 $show "generating symbol list for \`$libname.la'"
3834 export_symbols="$output_objdir/$libname.exp" 4168 export_symbols="$output_objdir/$libname.exp"
3835 $run $rm $export_symbols 4169 $run $rm $export_symbols
3836 libobjs=$output 4170 libobjs=$output
3837 # Append the command to create the export file. 4171 # Append the command to create the export file.
3838 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" 4172 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
3839 fi 4173 fi
3840 4174
3841 » # Set up a command to remove the reloadale object files 4175 » # Set up a command to remove the reloadable object files
3842 # after they are used. 4176 # after they are used.
3843 i=0 4177 i=0
3844 while test "$i" -lt "$k" 4178 while test "$i" -lt "$k"
3845 do 4179 do
3846 i=`expr $i + 1` 4180 i=`expr $i + 1`
3847 » delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 4181 » delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
3848 done 4182 done
3849 4183
3850 $echo "creating a temporary reloadable object file: $output" 4184 $echo "creating a temporary reloadable object file: $output"
3851 4185
3852 # Loop through the commands generated above and execute them. 4186 # Loop through the commands generated above and execute them.
3853 save_ifs="$IFS"; IFS='~' 4187 save_ifs="$IFS"; IFS='~'
3854 for cmd in $concat_cmds; do 4188 for cmd in $concat_cmds; do
3855 IFS="$save_ifs" 4189 IFS="$save_ifs"
3856 $show "$cmd" 4190 $show "$cmd"
3857 $run eval "$cmd" || exit $? 4191 $run eval "$cmd" || exit $?
(...skipping 27 matching lines...) Expand all
3885 4219
3886 # Append the command to remove the reloadable object files 4220 # Append the command to remove the reloadable object files
3887 # to the just-reset $cmds. 4221 # to the just-reset $cmds.
3888 eval cmds=\"\$cmds~\$rm $delfiles\" 4222 eval cmds=\"\$cmds~\$rm $delfiles\"
3889 fi 4223 fi
3890 save_ifs="$IFS"; IFS='~' 4224 save_ifs="$IFS"; IFS='~'
3891 for cmd in $cmds; do 4225 for cmd in $cmds; do
3892 IFS="$save_ifs" 4226 IFS="$save_ifs"
3893 eval cmd=\"$cmd\" 4227 eval cmd=\"$cmd\"
3894 $show "$cmd" 4228 $show "$cmd"
3895 » $run eval "$cmd" || exit $? 4229 » $run eval "$cmd" || {
4230 » lt_exit=$?
4231
4232 » # Restore the uninstalled library and exit
4233 » if test "$mode" = relink; then
4234 » $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realnam e}U $realname)'
4235 » fi
4236
4237 » exit $lt_exit
4238 » }
3896 done 4239 done
3897 IFS="$save_ifs" 4240 IFS="$save_ifs"
3898 4241
3899 # Restore the uninstalled library and exit 4242 # Restore the uninstalled library and exit
3900 if test "$mode" = relink; then 4243 if test "$mode" = relink; then
3901 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${r ealname}T && $mv "$realname"U $realname)' || exit $? 4244 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${r ealname}T && $mv "$realname"U $realname)' || exit $?
4245
4246 if test -n "$convenience"; then
4247 if test -z "$whole_archive_flag_spec"; then
4248 $show "${rm}r $gentop"
4249 $run ${rm}r "$gentop"
4250 fi
4251 fi
4252
3902 exit $EXIT_SUCCESS 4253 exit $EXIT_SUCCESS
3903 fi 4254 fi
3904 4255
3905 # Create links to the real library. 4256 # Create links to the real library.
3906 for linkname in $linknames; do 4257 for linkname in $linknames; do
3907 if test "$realname" != "$linkname"; then 4258 if test "$realname" != "$linkname"; then
3908 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkn ame)" 4259 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkn ame)"
3909 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $l inkname)' || exit $? 4260 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $l inkname)' || exit $?
3910 fi 4261 fi
3911 done 4262 done
3912 4263
3913 # If -module or -export-dynamic was specified, set the dlname. 4264 # If -module or -export-dynamic was specified, set the dlname.
3914 if test "$module" = yes || test "$export_dynamic" = yes; then 4265 if test "$module" = yes || test "$export_dynamic" = yes; then
3915 # On all known operating systems, these are identical. 4266 # On all known operating systems, these are identical.
3916 dlname="$soname" 4267 dlname="$soname"
3917 fi 4268 fi
3918 fi 4269 fi
3919 ;; 4270 ;;
3920 4271
3921 obj) 4272 obj)
3922 if test -n "$deplibs"; then 4273 case " $deplibs" in
3923 » $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 4274 *\ -l* | *\ -L*)
3924 fi 4275 » $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
4276 esac
3925 4277
3926 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 4278 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3927 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 4279 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3928 fi 4280 fi
3929 4281
3930 if test -n "$rpath"; then 4282 if test -n "$rpath"; then
3931 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 4283 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3932 fi 4284 fi
3933 4285
3934 if test -n "$xrpath"; then 4286 if test -n "$xrpath"; then
(...skipping 26 matching lines...) Expand all
3961 # Delete the old objects. 4313 # Delete the old objects.
3962 $run $rm $obj $libobj 4314 $run $rm $obj $libobj
3963 4315
3964 # Objects from convenience libraries. This assumes 4316 # Objects from convenience libraries. This assumes
3965 # single-version convenience libraries. Whenever we create 4317 # single-version convenience libraries. Whenever we create
3966 # different ones for PIC/non-PIC, this we'll have to duplicate 4318 # different ones for PIC/non-PIC, this we'll have to duplicate
3967 # the extraction. 4319 # the extraction.
3968 reload_conv_objs= 4320 reload_conv_objs=
3969 gentop= 4321 gentop=
3970 # reload_cmds runs $LD directly, so let us get rid of 4322 # reload_cmds runs $LD directly, so let us get rid of
3971 # -Wl from whole_archive_flag_spec 4323 # -Wl from whole_archive_flag_spec and hope we can get by with
4324 # turning comma into space..
3972 wl= 4325 wl=
3973 4326
3974 if test -n "$convenience"; then 4327 if test -n "$convenience"; then
3975 if test -n "$whole_archive_flag_spec"; then 4328 if test -n "$whole_archive_flag_spec"; then
3976 » eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" 4329 » eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4330 » reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $X sed -e 's|,| |g'`
3977 else 4331 else
3978 gentop="$output_objdir/${obj}x" 4332 gentop="$output_objdir/${obj}x"
3979 $show "${rm}r $gentop"
3980 $run ${rm}r "$gentop"
3981 $show "$mkdir $gentop"
3982 $run $mkdir "$gentop"
3983 status=$?
3984 if test "$status" -ne 0 && test ! -d "$gentop"; then
3985 exit $status
3986 fi
3987 generated="$generated $gentop" 4333 generated="$generated $gentop"
3988 4334
3989 » for xlib in $convenience; do 4335 » func_extract_archives $gentop $convenience
3990 » # Extract the objects. 4336 » reload_conv_objs="$reload_objs $func_extract_archives_result"
3991 » case $xlib in
3992 » [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3993 » *) xabs=`pwd`"/$xlib" ;;
3994 » esac
3995 » xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3996 » xdir="$gentop/$xlib"
3997
3998 » $show "${rm}r $xdir"
3999 » $run ${rm}r "$xdir"
4000 » $show "$mkdir $xdir"
4001 » $run $mkdir "$xdir"
4002 » status=$?
4003 » if test "$status" -ne 0 && test ! -d "$xdir"; then
4004 » exit $status
4005 » fi
4006 » # We will extract separately just the conflicting names and we will no
4007 » # longer touch any unique names. It is faster to leave these extract
4008 » # automatically by $AR in one run.
4009 » $show "(cd $xdir && $AR x $xabs)"
4010 » $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4011 » if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4012 » :
4013 » else
4014 » $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4015 » $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4016 » $AR t "$xabs" | sort | uniq -cd | while read -r count name
4017 » do
4018 » » i=1
4019 » » while test "$i" -le "$count"
4020 » » do
4021 » » # Put our $i before any first dot (extension)
4022 » » # Never overwrite any file
4023 » » name_to="$name"
4024 » » while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4025 » » do
4026 » » name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4027 » » done
4028 » » $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$na me_to')"
4029 » » $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name ' '$name_to')" || exit $?
4030 » » i=`expr $i + 1`
4031 » » done
4032 » done
4033 » fi
4034
4035 » reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4036 » done
4037 fi 4337 fi
4038 fi 4338 fi
4039 4339
4040 # Create the old-style object. 4340 # Create the old-style object.
4041 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\ .'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### tes tsuite: skip nested quoting test 4341 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\ .'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### tes tsuite: skip nested quoting test
4042 4342
4043 output="$obj" 4343 output="$obj"
4044 cmds=$reload_cmds 4344 cmds=$reload_cmds
4045 save_ifs="$IFS"; IFS='~' 4345 save_ifs="$IFS"; IFS='~'
4046 for cmd in $cmds; do 4346 for cmd in $cmds; do
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
4127 case $host in 4427 case $host in
4128 *darwin*) 4428 *darwin*)
4129 # Don't allow lazy linking, it breaks C++ global constructors 4429 # Don't allow lazy linking, it breaks C++ global constructors
4130 if test "$tagname" = CXX ; then 4430 if test "$tagname" = CXX ; then
4131 compile_command="$compile_command ${wl}-bind_at_load" 4431 compile_command="$compile_command ${wl}-bind_at_load"
4132 finalize_command="$finalize_command ${wl}-bind_at_load" 4432 finalize_command="$finalize_command ${wl}-bind_at_load"
4133 fi 4433 fi
4134 ;; 4434 ;;
4135 esac 4435 esac
4136 4436
4437
4438 # move library search paths that coincide with paths to not yet
4439 # installed libraries to the beginning of the library search list
4440 new_libs=
4441 for path in $notinst_path; do
4442 case " $new_libs " in
4443 *" -L$path/$objdir "*) ;;
4444 *)
4445 case " $compile_deplibs " in
4446 *" -L$path/$objdir "*)
4447 new_libs="$new_libs -L$path/$objdir" ;;
4448 esac
4449 ;;
4450 esac
4451 done
4452 for deplib in $compile_deplibs; do
4453 case $deplib in
4454 -L*)
4455 case " $new_libs " in
4456 *" $deplib "*) ;;
4457 *) new_libs="$new_libs $deplib" ;;
4458 esac
4459 ;;
4460 *) new_libs="$new_libs $deplib" ;;
4461 esac
4462 done
4463 compile_deplibs="$new_libs"
4464
4465
4137 compile_command="$compile_command $compile_deplibs" 4466 compile_command="$compile_command $compile_deplibs"
4138 finalize_command="$finalize_command $finalize_deplibs" 4467 finalize_command="$finalize_command $finalize_deplibs"
4139 4468
4140 if test -n "$rpath$xrpath"; then 4469 if test -n "$rpath$xrpath"; then
4141 # If the user specified any rpath flags, then add them. 4470 # If the user specified any rpath flags, then add them.
4142 for libdir in $rpath $xrpath; do 4471 for libdir in $rpath $xrpath; do
4143 # This is the magic to use -rpath. 4472 # This is the magic to use -rpath.
4144 case "$finalize_rpath " in 4473 case "$finalize_rpath " in
4145 *" $libdir "*) ;; 4474 *" $libdir "*) ;;
4146 *) finalize_rpath="$finalize_rpath $libdir" ;; 4475 *) finalize_rpath="$finalize_rpath $libdir" ;;
(...skipping 24 matching lines...) Expand all
4171 rpath="$rpath $flag" 4500 rpath="$rpath $flag"
4172 fi 4501 fi
4173 elif test -n "$runpath_var"; then 4502 elif test -n "$runpath_var"; then
4174 case "$perm_rpath " in 4503 case "$perm_rpath " in
4175 *" $libdir "*) ;; 4504 *" $libdir "*) ;;
4176 *) perm_rpath="$perm_rpath $libdir" ;; 4505 *) perm_rpath="$perm_rpath $libdir" ;;
4177 esac 4506 esac
4178 fi 4507 fi
4179 case $host in 4508 case $host in
4180 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) 4509 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4510 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4181 case :$dllsearchpath: in 4511 case :$dllsearchpath: in
4182 *":$libdir:"*) ;; 4512 *":$libdir:"*) ;;
4183 *) dllsearchpath="$dllsearchpath:$libdir";; 4513 *) dllsearchpath="$dllsearchpath:$libdir";;
4184 esac 4514 esac
4515 case :$dllsearchpath: in
4516 *":$testbindir:"*) ;;
4517 *) dllsearchpath="$dllsearchpath:$testbindir";;
4518 esac
4185 ;; 4519 ;;
4186 esac 4520 esac
4187 done 4521 done
4188 # Substitute the hardcoded libdirs into the rpath. 4522 # Substitute the hardcoded libdirs into the rpath.
4189 if test -n "$hardcode_libdir_separator" && 4523 if test -n "$hardcode_libdir_separator" &&
4190 test -n "$hardcode_libdirs"; then 4524 test -n "$hardcode_libdirs"; then
4191 libdir="$hardcode_libdirs" 4525 libdir="$hardcode_libdirs"
4192 eval rpath=\" $hardcode_libdir_flag_spec\" 4526 eval rpath=\" $hardcode_libdir_flag_spec\"
4193 fi 4527 fi
4194 compile_rpath="$rpath" 4528 compile_rpath="$rpath"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 $run eval '$mv "$nlist"T "$nlist"' 4622 $run eval '$mv "$nlist"T "$nlist"'
4289 fi 4623 fi
4290 4624
4291 if test -n "$export_symbols_regex"; then 4625 if test -n "$export_symbols_regex"; then
4292 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' 4626 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4293 $run eval '$mv "$nlist"T "$nlist"' 4627 $run eval '$mv "$nlist"T "$nlist"'
4294 fi 4628 fi
4295 4629
4296 # Prepare the list of exported symbols 4630 # Prepare the list of exported symbols
4297 if test -z "$export_symbols"; then 4631 if test -z "$export_symbols"; then
4298 » export_symbols="$output_objdir/$output.exp" 4632 » export_symbols="$output_objdir/$outputname.exp"
4299 $run $rm $export_symbols 4633 $run $rm $export_symbols
4300 » $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' 4634 » $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p ' "'< "$nlist" > "$export_symbols"'
4635 case $host in
4636 *cygwin* | *mingw* )
4637 » $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4638 » » $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname. def"'
4639 ;;
4640 esac
4301 else 4641 else
4302 » $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$ /'"' < "$export_symbols" > "$output_objdir/$output.exp"' 4642 » $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$ /$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4303 » $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nli st"T' 4643 » $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > " $nlist"T'
4304 $run eval 'mv "$nlist"T "$nlist"' 4644 $run eval 'mv "$nlist"T "$nlist"'
4645 case $host in
4646 *cygwin* | *mingw* )
4647 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4648 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4649 ;;
4650 esac
4305 fi 4651 fi
4306 fi 4652 fi
4307 4653
4308 for arg in $dlprefiles; do 4654 for arg in $dlprefiles; do
4309 $show "extracting global C symbols from \`$arg'" 4655 $show "extracting global C symbols from \`$arg'"
4310 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` 4656 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4311 $run eval '$echo ": $name " >> "$nlist"' 4657 $run eval '$echo ": $name " >> "$nlist"'
4312 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 4658 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4313 done 4659 done
4314 4660
(...skipping 30 matching lines...) Expand all
4345 #undef lt_preloaded_symbols 4691 #undef lt_preloaded_symbols
4346 4692
4347 #if defined (__STDC__) && __STDC__ 4693 #if defined (__STDC__) && __STDC__
4348 # define lt_ptr void * 4694 # define lt_ptr void *
4349 #else 4695 #else
4350 # define lt_ptr char * 4696 # define lt_ptr char *
4351 # define const 4697 # define const
4352 #endif 4698 #endif
4353 4699
4354 /* The mapping between symbol names and symbols. */ 4700 /* The mapping between symbol names and symbols. */
4701 "
4702
4703 case $host in
4704 *cygwin* | *mingw* )
4705 $echo >> "$output_objdir/$dlsyms" "\
4706 /* DATA imports from DLLs on WIN32 can't be const, because
4707 runtime relocations are performed -- see ld's documentation
4708 on pseudo-relocs */
4709 struct {
4710 "
4711 ;;
4712 * )
4713 $echo >> "$output_objdir/$dlsyms" "\
4355 const struct { 4714 const struct {
4715 "
4716 ;;
4717 esac
4718
4719
4720 $echo >> "$output_objdir/$dlsyms" "\
4356 const char *name; 4721 const char *name;
4357 lt_ptr address; 4722 lt_ptr address;
4358 } 4723 }
4359 lt_preloaded_symbols[] = 4724 lt_preloaded_symbols[] =
4360 {\ 4725 {\
4361 " 4726 "
4362 4727
4363 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdi r/$dlsyms" 4728 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdi r/$dlsyms"
4364 4729
4365 $echo >> "$output_objdir/$dlsyms" "\ 4730 $echo >> "$output_objdir/$dlsyms" "\
(...skipping 26 matching lines...) Expand all
4392 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; 4757 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4393 esac;; 4758 esac;;
4394 *-*-hpux*) 4759 *-*-hpux*)
4395 case "$compile_command " in 4760 case "$compile_command " in
4396 *" -static "*) ;; 4761 *" -static "*) ;;
4397 *) pic_flag_for_symtable=" $pic_flag";; 4762 *) pic_flag_for_symtable=" $pic_flag";;
4398 esac 4763 esac
4399 esac 4764 esac
4400 4765
4401 # Now compile the dynamic symbol file. 4766 # Now compile the dynamic symbol file.
4402 » $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_sym table \"$dlsyms\")" 4767 » $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_f lag_for_symtable \"$dlsyms\")"
4403 » $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for _symtable "$dlsyms")' || exit $? 4768 » $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$p ic_flag_for_symtable "$dlsyms")' || exit $?
4404 4769
4405 # Clean up the generated files. 4770 # Clean up the generated files.
4406 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" 4771 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4407 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" 4772 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4408 4773
4409 # Transform the symbol file into the correct name. 4774 # Transform the symbol file into the correct name.
4410 » compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$ou tput_objdir/${outputname}S.${objext}%"` 4775 case $host in
4411 » finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$ output_objdir/${outputname}S.${objext}%"` 4776 *cygwin* | *mingw* )
4777 if test -f "$output_objdir/${outputname}.def" ; then
4778 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objex t}%" | $NL2SP`
4779 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e " s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${obj ext}%" | $NL2SP`
4780 else
4781 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4782 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e " s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4783 fi
4784 ;;
4785 * )
4786 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@S YMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4787 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4788 ;;
4789 esac
4412 ;; 4790 ;;
4413 *) 4791 *)
4414 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 4792 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4415 exit $EXIT_FAILURE 4793 exit $EXIT_FAILURE
4416 ;; 4794 ;;
4417 esac 4795 esac
4418 else 4796 else
4419 # We keep going just in case the user didn't refer to 4797 # We keep going just in case the user didn't refer to
4420 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe 4798 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4421 # really was required. 4799 # really was required.
4422 4800
4423 # Nullify the symbol file. 4801 # Nullify the symbol file.
4424 » compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` 4802 » compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMF ILE@%%" | $NL2SP`
4425 » finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%" ` 4803 » finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SY MFILE@%%" | $NL2SP`
4426 fi 4804 fi
4427 4805
4428 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 4806 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4429 # Replace the output file specification. 4807 # Replace the output file specification.
4430 » compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$out put"'%g'` 4808 » compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPU T@%'"$output"'%g' | $NL2SP`
4431 link_command="$compile_command$compile_rpath" 4809 link_command="$compile_command$compile_rpath"
4432 4810
4433 # We have no uninstalled library dependencies, so finalize right now. 4811 # We have no uninstalled library dependencies, so finalize right now.
4434 $show "$link_command" 4812 $show "$link_command"
4435 $run eval "$link_command" 4813 $run eval "$link_command"
4436 » status=$? 4814 » exit_status=$?
4437 4815
4438 # Delete the generated files. 4816 # Delete the generated files.
4439 if test -n "$dlsyms"; then 4817 if test -n "$dlsyms"; then
4440 $show "$rm $output_objdir/${outputname}S.${objext}" 4818 $show "$rm $output_objdir/${outputname}S.${objext}"
4441 $run $rm "$output_objdir/${outputname}S.${objext}" 4819 $run $rm "$output_objdir/${outputname}S.${objext}"
4442 fi 4820 fi
4443 4821
4444 » exit $status 4822 » exit $exit_status
4445 fi 4823 fi
4446 4824
4447 if test -n "$shlibpath_var"; then 4825 if test -n "$shlibpath_var"; then
4448 # We should set the shlibpath_var 4826 # We should set the shlibpath_var
4449 rpath= 4827 rpath=
4450 for dir in $temp_rpath; do 4828 for dir in $temp_rpath; do
4451 case $dir in 4829 case $dir in
4452 [\\/]* | [A-Za-z]:[\\/]*) 4830 [\\/]* | [A-Za-z]:[\\/]*)
4453 # Absolute path. 4831 # Absolute path.
4454 rpath="$rpath$dir:" 4832 rpath="$rpath$dir:"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
4507 # Fast installation is not supported 4885 # Fast installation is not supported
4508 link_command="$compile_var$compile_command$compile_rpath" 4886 link_command="$compile_var$compile_command$compile_rpath"
4509 relink_command="$finalize_var$finalize_command$finalize_rpath" 4887 relink_command="$finalize_var$finalize_command$finalize_rpath"
4510 4888
4511 $echo "$modename: warning: this platform does not like uninstalled share d libraries" 1>&2 4889 $echo "$modename: warning: this platform does not like uninstalled share d libraries" 1>&2
4512 $echo "$modename: \`$output' will be relinked during installation" 1>&2 4890 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4513 else 4891 else
4514 if test "$fast_install" != no; then 4892 if test "$fast_install" != no; then
4515 link_command="$finalize_var$compile_command$finalize_rpath" 4893 link_command="$finalize_var$compile_command$finalize_rpath"
4516 if test "$fast_install" = yes; then 4894 if test "$fast_install" = yes; then
4517 » relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` 4895 » relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4518 else 4896 else
4519 # fast_install is set to needless 4897 # fast_install is set to needless
4520 relink_command= 4898 relink_command=
4521 fi 4899 fi
4522 else 4900 else
4523 link_command="$compile_var$compile_command$compile_rpath" 4901 link_command="$compile_var$compile_command$compile_rpath"
4524 relink_command="$finalize_var$finalize_command$finalize_rpath" 4902 relink_command="$finalize_var$finalize_command$finalize_rpath"
4525 fi 4903 fi
4526 fi 4904 fi
4527 4905
(...skipping 16 matching lines...) Expand all
4544 if eval test -z \"\${$var+set}\"; then 4922 if eval test -z \"\${$var+set}\"; then
4545 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" 4923 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4546 elif eval var_value=\$$var; test -z "$var_value"; then 4924 elif eval var_value=\$$var; test -z "$var_value"; then
4547 relink_command="$var=; export $var; $relink_command" 4925 relink_command="$var=; export $var; $relink_command"
4548 else 4926 else
4549 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 4927 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4550 relink_command="$var=\"$var_value\"; export $var; $relink_command" 4928 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4551 fi 4929 fi
4552 done 4930 done
4553 relink_command="(cd `pwd`; $relink_command)" 4931 relink_command="(cd `pwd`; $relink_command)"
4554 » relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 4932 » relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote _subst" | $NL2SP`
4555 fi 4933 fi
4556 4934
4557 # Quote $echo for shipping. 4935 # Quote $echo for shipping.
4558 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then 4936 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4559 case $progpath in 4937 case $progpath in
4560 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; 4938 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4561 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; 4939 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4562 esac 4940 esac
4563 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` 4941 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4564 else 4942 else
4565 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` 4943 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4566 fi 4944 fi
4567 4945
4568 # Only actually do things if our run command is non-null. 4946 # Only actually do things if our run command is non-null.
4569 if test -z "$run"; then 4947 if test -z "$run"; then
4570 # win32 will think the script is a binary if it has 4948 # win32 will think the script is a binary if it has
4571 # a .exe suffix, so we strip it off here. 4949 # a .exe suffix, so we strip it off here.
4572 case $output in 4950 case $output in
4573 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; 4951 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4574 esac 4952 esac
4575 # test for cygwin because mv fails w/o .exe extensions 4953 # test for cygwin because mv fails w/o .exe extensions
4576 case $host in 4954 case $host in
4577 *cygwin*) 4955 *cygwin*)
4578 exeext=.exe 4956 exeext=.exe
4579 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; 4957 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4580 *) exeext= ;; 4958 *) exeext= ;;
4581 esac 4959 esac
4582 case $host in 4960 case $host in
4583 *cygwin* | *mingw* ) 4961 *cygwin* | *mingw* )
4584 » cwrappersource=`$echo ${objdir}/lt-${output}.c` 4962 output_name=`basename $output`
4585 » cwrapper=`$echo ${output}.exe` 4963 output_path=`dirname $output`
4586 » $rm $cwrappersource $cwrapper 4964 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4587 » trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4965 cwrapper="$output_path/$output_name.exe"
4966 $rm $cwrappersource $cwrapper
4967 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4588 4968
4589 cat > $cwrappersource <<EOF 4969 cat > $cwrappersource <<EOF
4590 4970
4591 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname 4971 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4592 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4972 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4593 4973
4594 The $output program cannot be directly executed until all the libtool 4974 The $output program cannot be directly executed until all the libtool
4595 libraries that it depends on are installed. 4975 libraries that it depends on are installed.
4596 4976
4597 This wrapper executable should never be moved out of the build directory. 4977 This wrapper executable should never be moved out of the build directory.
4598 If it is, it will not operate correctly. 4978 If it is, it will not operate correctly.
4599 4979
4600 Currently, it simply execs the wrapper *script* "/bin/sh $output", 4980 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4601 but could eventually absorb all of the scripts functionality and 4981 but could eventually absorb all of the scripts functionality and
4602 exec $objdir/$outputname directly. 4982 exec $objdir/$outputname directly.
4603 */ 4983 */
4604 EOF 4984 EOF
4605 cat >> $cwrappersource<<"EOF" 4985 cat >> $cwrappersource<<"EOF"
4606 #include <stdio.h> 4986 #include <stdio.h>
4607 #include <stdlib.h> 4987 #include <stdlib.h>
4608 #include <unistd.h> 4988 #include <unistd.h>
4609 #include <malloc.h> 4989 #include <malloc.h>
4610 #include <stdarg.h> 4990 #include <stdarg.h>
4611 #include <assert.h> 4991 #include <assert.h>
4992 #include <string.h>
4993 #include <ctype.h>
4994 #include <sys/stat.h>
4612 4995
4613 #if defined(PATH_MAX) 4996 #if defined(PATH_MAX)
4614 # define LT_PATHMAX PATH_MAX 4997 # define LT_PATHMAX PATH_MAX
4615 #elif defined(MAXPATHLEN) 4998 #elif defined(MAXPATHLEN)
4616 # define LT_PATHMAX MAXPATHLEN 4999 # define LT_PATHMAX MAXPATHLEN
4617 #else 5000 #else
4618 # define LT_PATHMAX 1024 5001 # define LT_PATHMAX 1024
4619 #endif 5002 #endif
4620 5003
4621 #ifndef DIR_SEPARATOR 5004 #ifndef DIR_SEPARATOR
4622 #define DIR_SEPARATOR '/' 5005 # define DIR_SEPARATOR '/'
5006 # define PATH_SEPARATOR ':'
4623 #endif 5007 #endif
4624 5008
4625 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 5009 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4626 defined (__OS2__) 5010 defined (__OS2__)
4627 #define HAVE_DOS_BASED_FILE_SYSTEM 5011 # define HAVE_DOS_BASED_FILE_SYSTEM
4628 #ifndef DIR_SEPARATOR_2 5012 # ifndef DIR_SEPARATOR_2
4629 #define DIR_SEPARATOR_2 '\\' 5013 # define DIR_SEPARATOR_2 '\\'
4630 #endif 5014 # endif
5015 # ifndef PATH_SEPARATOR_2
5016 # define PATH_SEPARATOR_2 ';'
5017 # endif
4631 #endif 5018 #endif
4632 5019
4633 #ifndef DIR_SEPARATOR_2 5020 #ifndef DIR_SEPARATOR_2
4634 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) 5021 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4635 #else /* DIR_SEPARATOR_2 */ 5022 #else /* DIR_SEPARATOR_2 */
4636 # define IS_DIR_SEPARATOR(ch) \ 5023 # define IS_DIR_SEPARATOR(ch) \
4637 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) 5024 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4638 #endif /* DIR_SEPARATOR_2 */ 5025 #endif /* DIR_SEPARATOR_2 */
4639 5026
5027 #ifndef PATH_SEPARATOR_2
5028 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5029 #else /* PATH_SEPARATOR_2 */
5030 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5031 #endif /* PATH_SEPARATOR_2 */
5032
4640 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 5033 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4641 #define XFREE(stale) do { \ 5034 #define XFREE(stale) do { \
4642 if (stale) { free ((void *) stale); stale = 0; } \ 5035 if (stale) { free ((void *) stale); stale = 0; } \
4643 } while (0) 5036 } while (0)
4644 5037
5038 /* -DDEBUG is fairly common in CFLAGS. */
5039 #undef DEBUG
5040 #if defined DEBUGWRAPPER
5041 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5042 #else
5043 # define DEBUG(format, ...)
5044 #endif
5045
4645 const char *program_name = NULL; 5046 const char *program_name = NULL;
4646 5047
4647 void * xmalloc (size_t num); 5048 void * xmalloc (size_t num);
4648 char * xstrdup (const char *string); 5049 char * xstrdup (const char *string);
4649 char * basename (const char *name); 5050 const char * base_name (const char *name);
4650 char * fnqualify(const char *path); 5051 char * find_executable(const char *wrapper);
5052 int check_executable(const char *path);
4651 char * strendzap(char *str, const char *pat); 5053 char * strendzap(char *str, const char *pat);
4652 void lt_fatal (const char *message, ...); 5054 void lt_fatal (const char *message, ...);
4653 5055
4654 int 5056 int
4655 main (int argc, char *argv[]) 5057 main (int argc, char *argv[])
4656 { 5058 {
4657 char **newargz; 5059 char **newargz;
4658 int i; 5060 int i;
4659 5061
4660 program_name = (char *) xstrdup ((char *) basename (argv[0])); 5062 program_name = (char *) xstrdup (base_name (argv[0]));
5063 DEBUG("(main) argv[0] : %s\n",argv[0]);
5064 DEBUG("(main) program_name : %s\n",program_name);
4661 newargz = XMALLOC(char *, argc+2); 5065 newargz = XMALLOC(char *, argc+2);
4662 EOF 5066 EOF
4663 5067
4664 » cat >> $cwrappersource <<EOF 5068 cat >> $cwrappersource <<EOF
4665 newargz[0] = "$SHELL"; 5069 newargz[0] = (char *) xstrdup("$SHELL");
4666 EOF 5070 EOF
4667 5071
4668 » cat >> $cwrappersource <<"EOF" 5072 cat >> $cwrappersource <<"EOF"
4669 newargz[1] = fnqualify(argv[0]); 5073 newargz[1] = find_executable(argv[0]);
5074 if (newargz[1] == NULL)
5075 lt_fatal("Couldn't find %s", argv[0]);
5076 DEBUG("(main) found exe at : %s\n",newargz[1]);
4670 /* we know the script has the same name, without the .exe */ 5077 /* we know the script has the same name, without the .exe */
4671 /* so make sure newargz[1] doesn't end in .exe */ 5078 /* so make sure newargz[1] doesn't end in .exe */
4672 strendzap(newargz[1],".exe"); 5079 strendzap(newargz[1],".exe");
4673 for (i = 1; i < argc; i++) 5080 for (i = 1; i < argc; i++)
4674 newargz[i+1] = xstrdup(argv[i]); 5081 newargz[i+1] = xstrdup(argv[i]);
4675 newargz[argc+1] = NULL; 5082 newargz[argc+1] = NULL;
5083
5084 for (i=0; i<argc+1; i++)
5085 {
5086 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5087 ;
5088 }
5089
4676 EOF 5090 EOF
4677 5091
4678 » cat >> $cwrappersource <<EOF 5092 case $host_os in
5093 mingw*)
5094 cat >> $cwrappersource <<EOF
5095 execv("$SHELL",(char const **)newargz);
5096 EOF
5097 ;;
5098 *)
5099 cat >> $cwrappersource <<EOF
4679 execv("$SHELL",newargz); 5100 execv("$SHELL",newargz);
4680 EOF 5101 EOF
5102 ;;
5103 esac
4681 5104
4682 » cat >> $cwrappersource <<"EOF" 5105 cat >> $cwrappersource <<"EOF"
5106 return 127;
4683 } 5107 }
4684 5108
4685 void * 5109 void *
4686 xmalloc (size_t num) 5110 xmalloc (size_t num)
4687 { 5111 {
4688 void * p = (void *) malloc (num); 5112 void * p = (void *) malloc (num);
4689 if (!p) 5113 if (!p)
4690 lt_fatal ("Memory exhausted"); 5114 lt_fatal ("Memory exhausted");
4691 5115
4692 return p; 5116 return p;
4693 } 5117 }
4694 5118
4695 char * 5119 char *
4696 xstrdup (const char *string) 5120 xstrdup (const char *string)
4697 { 5121 {
4698 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL 5122 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
4699 ; 5123 ;
4700 } 5124 }
4701 5125
4702 char * 5126 const char *
4703 basename (const char *name) 5127 base_name (const char *name)
4704 { 5128 {
4705 const char *base; 5129 const char *base;
4706 5130
4707 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 5131 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4708 /* Skip over the disk name in MSDOS pathnames. */ 5132 /* Skip over the disk name in MSDOS pathnames. */
4709 if (isalpha (name[0]) && name[1] == ':') 5133 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
4710 name += 2; 5134 name += 2;
4711 #endif 5135 #endif
4712 5136
4713 for (base = name; *name; name++) 5137 for (base = name; *name; name++)
4714 if (IS_DIR_SEPARATOR (*name)) 5138 if (IS_DIR_SEPARATOR (*name))
4715 base = name + 1; 5139 base = name + 1;
4716 return (char *) base; 5140 return base;
5141 }
5142
5143 int
5144 check_executable(const char * path)
5145 {
5146 struct stat st;
5147
5148 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!" );
5149 if ((!path) || (!*path))
5150 return 0;
5151
5152 if ((stat (path, &st) >= 0) &&
5153 (
5154 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5155 #if defined (S_IXOTH)
5156 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5157 #endif
5158 #if defined (S_IXGRP)
5159 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5160 #endif
5161 ((st.st_mode & S_IXUSR) == S_IXUSR))
5162 )
5163 return 1;
5164 else
5165 return 0;
5166 }
5167
5168 /* Searches for the full path of the wrapper. Returns
5169 newly allocated full path name if found, NULL otherwise */
5170 char *
5171 find_executable (const char* wrapper)
5172 {
5173 int has_slash = 0;
5174 const char* p;
5175 const char* p_next;
5176 /* static buffer for getcwd */
5177 char tmp[LT_PATHMAX + 1];
5178 int tmp_len;
5179 char* concat_name;
5180
5181 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5182
5183 if ((wrapper == NULL) || (*wrapper == '\0'))
5184 return NULL;
5185
5186 /* Absolute path? */
5187 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5188 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5189 {
5190 concat_name = xstrdup (wrapper);
5191 if (check_executable(concat_name))
5192 return concat_name;
5193 XFREE(concat_name);
5194 }
5195 else
5196 {
5197 #endif
5198 if (IS_DIR_SEPARATOR (wrapper[0]))
5199 {
5200 concat_name = xstrdup (wrapper);
5201 if (check_executable(concat_name))
5202 return concat_name;
5203 XFREE(concat_name);
5204 }
5205 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5206 }
5207 #endif
5208
5209 for (p = wrapper; *p; p++)
5210 if (*p == '/')
5211 {
5212 has_slash = 1;
5213 break;
5214 }
5215 if (!has_slash)
5216 {
5217 /* no slashes; search PATH */
5218 const char* path = getenv ("PATH");
5219 if (path != NULL)
5220 {
5221 for (p = path; *p; p = p_next)
5222 {
5223 const char* q;
5224 size_t p_len;
5225 for (q = p; *q; q++)
5226 if (IS_PATH_SEPARATOR(*q))
5227 break;
5228 p_len = q - p;
5229 p_next = (*q == '\0' ? q : q + 1);
5230 if (p_len == 0)
5231 {
5232 /* empty path: current directory */
5233 if (getcwd (tmp, LT_PATHMAX) == NULL)
5234 lt_fatal ("getcwd failed");
5235 tmp_len = strlen(tmp);
5236 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5237 memcpy (concat_name, tmp, tmp_len);
5238 concat_name[tmp_len] = '/';
5239 strcpy (concat_name + tmp_len + 1, wrapper);
5240 }
5241 else
5242 {
5243 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5244 memcpy (concat_name, p, p_len);
5245 concat_name[p_len] = '/';
5246 strcpy (concat_name + p_len + 1, wrapper);
5247 }
5248 if (check_executable(concat_name))
5249 return concat_name;
5250 XFREE(concat_name);
5251 }
5252 }
5253 /* not found in PATH; assume curdir */
5254 }
5255 /* Relative path | not found in path: prepend cwd */
5256 if (getcwd (tmp, LT_PATHMAX) == NULL)
5257 lt_fatal ("getcwd failed");
5258 tmp_len = strlen(tmp);
5259 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5260 memcpy (concat_name, tmp, tmp_len);
5261 concat_name[tmp_len] = '/';
5262 strcpy (concat_name + tmp_len + 1, wrapper);
5263
5264 if (check_executable(concat_name))
5265 return concat_name;
5266 XFREE(concat_name);
5267 return NULL;
4717 } 5268 }
4718 5269
4719 char * 5270 char *
4720 fnqualify(const char *path)
4721 {
4722 size_t size;
4723 char *p;
4724 char tmp[LT_PATHMAX + 1];
4725
4726 assert(path != NULL);
4727
4728 /* Is it qualified already? */
4729 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4730 if (isalpha (path[0]) && path[1] == ':')
4731 return xstrdup (path);
4732 #endif
4733 if (IS_DIR_SEPARATOR (path[0]))
4734 return xstrdup (path);
4735
4736 /* prepend the current directory */
4737 /* doesn't handle '~' */
4738 if (getcwd (tmp, LT_PATHMAX) == NULL)
4739 lt_fatal ("getcwd failed");
4740 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
4741 p = XMALLOC(char, size);
4742 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
4743 return p;
4744 }
4745
4746 char *
4747 strendzap(char *str, const char *pat) 5271 strendzap(char *str, const char *pat)
4748 { 5272 {
4749 size_t len, patlen; 5273 size_t len, patlen;
4750 5274
4751 assert(str != NULL); 5275 assert(str != NULL);
4752 assert(pat != NULL); 5276 assert(pat != NULL);
4753 5277
4754 len = strlen(str); 5278 len = strlen(str);
4755 patlen = strlen(pat); 5279 patlen = strlen(pat);
4756 5280
(...skipping 20 matching lines...) Expand all
4777 5301
4778 void 5302 void
4779 lt_fatal (const char *message, ...) 5303 lt_fatal (const char *message, ...)
4780 { 5304 {
4781 va_list ap; 5305 va_list ap;
4782 va_start (ap, message); 5306 va_start (ap, message);
4783 lt_error_core (EXIT_FAILURE, "FATAL", message, ap); 5307 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4784 va_end (ap); 5308 va_end (ap);
4785 } 5309 }
4786 EOF 5310 EOF
4787 » # we should really use a build-platform specific compiler 5311 # we should really use a build-platform specific compiler
4788 » # here, but OTOH, the wrappers (shell script and this C one) 5312 # here, but OTOH, the wrappers (shell script and this C one)
4789 » # are only useful if you want to execute the "real" binary. 5313 # are only useful if you want to execute the "real" binary.
4790 » # Since the "real" binary is built for $host, then this 5314 # Since the "real" binary is built for $host, then this
4791 » # wrapper might as well be built for $host, too. 5315 # wrapper might as well be built for $host, too.
4792 » $run $LTCC -s -o $cwrapper $cwrappersource 5316 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
4793 » ;; 5317 ;;
4794 » esac 5318 esac
4795 » $rm $output 5319 $rm $output
4796 » trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 5320 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
4797 5321
4798 $echo > $output "\ 5322 $echo > $output "\
4799 #! $SHELL 5323 #! $SHELL
4800 5324
4801 # $output - temporary wrapper script for $objdir/$outputname 5325 # $output - temporary wrapper script for $objdir/$outputname
4802 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 5326 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4803 # 5327 #
4804 # The $output program cannot be directly executed until all the libtool 5328 # The $output program cannot be directly executed until all the libtool
4805 # libraries that it depends on are installed. 5329 # libraries that it depends on are installed.
4806 # 5330 #
4807 # This wrapper script should never be moved out of the build directory. 5331 # This wrapper script should never be moved out of the build directory.
4808 # If it is, it will not operate correctly. 5332 # If it is, it will not operate correctly.
4809 5333
4810 # Sed substitution that helps us do robust quoting. It backslashifies 5334 # Sed substitution that helps us do robust quoting. It backslashifies
4811 # metacharacters that are still active within double-quoted strings. 5335 # metacharacters that are still active within double-quoted strings.
4812 Xsed='${SED} -e 1s/^X//' 5336 Xsed='${SED} -e 1s/^X//'
4813 sed_quote_subst='$sed_quote_subst' 5337 sed_quote_subst='$sed_quote_subst'
4814 5338
5339 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5340 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5341 emulate sh
5342 NULLCMD=:
5343 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5344 # is contrary to our usage. Disable this feature.
5345 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5346 setopt NO_GLOB_SUBST
5347 else
5348 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5349 fi
5350 BIN_SH=xpg4; export BIN_SH # for Tru64
5351 DUALCASE=1; export DUALCASE # for MKS sh
5352
4815 # The HP-UX ksh and POSIX shell print the target directory to stdout 5353 # The HP-UX ksh and POSIX shell print the target directory to stdout
4816 # if CDPATH is set. 5354 # if CDPATH is set.
4817 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi 5355 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4818 5356
4819 relink_command=\"$relink_command\" 5357 relink_command=\"$relink_command\"
4820 5358
4821 # This environment variable determines our operation mode. 5359 # This environment variable determines our operation mode.
4822 if test \"\$libtool_install_magic\" = \"$magic\"; then 5360 if test \"\$libtool_install_magic\" = \"$magic\"; then
4823 # install mode needs the following variable: 5361 # install mode needs the following variable:
4824 notinst_deplibs='$notinst_deplibs' 5362 notinst_deplibs='$notinst_deplibs'
4825 else 5363 else
4826 # When we are sourced in execute mode, \$file and \$echo are already set. 5364 # When we are sourced in execute mode, \$file and \$echo are already set.
4827 if test \"\$libtool_execute_magic\" != \"$magic\"; then 5365 if test \"\$libtool_execute_magic\" != \"$magic\"; then
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 fi 5474 fi
4937 5475
4938 $echo >> $output "\ 5476 $echo >> $output "\
4939 if test \"\$libtool_execute_magic\" != \"$magic\"; then 5477 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4940 # Run the actual program with our arguments. 5478 # Run the actual program with our arguments.
4941 " 5479 "
4942 case $host in 5480 case $host in
4943 # Backslashes separate directories on plain windows 5481 # Backslashes separate directories on plain windows
4944 *-*-mingw | *-*-os2*) 5482 *-*-mingw | *-*-os2*)
4945 $echo >> $output "\ 5483 $echo >> $output "\
4946 exec \$progdir\\\\\$program \${1+\"\$@\"} 5484 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
4947 " 5485 "
4948 ;; 5486 ;;
4949 5487
4950 *) 5488 *)
4951 $echo >> $output "\ 5489 $echo >> $output "\
4952 exec \$progdir/\$program \${1+\"\$@\"} 5490 exec \"\$progdir/\$program\" \${1+\"\$@\"}
4953 " 5491 "
4954 ;; 5492 ;;
4955 esac 5493 esac
4956 $echo >> $output "\ 5494 $echo >> $output "\
4957 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 5495 \$echo \"\$0: cannot exec \$program \$*\"
4958 exit $EXIT_FAILURE 5496 exit $EXIT_FAILURE
4959 fi 5497 fi
4960 else 5498 else
4961 # The program doesn't exist. 5499 # The program doesn't exist.
4962 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 5500 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4963 \$echo \"This script is just a wrapper for \$program.\" 1>&2 5501 \$echo \"This script is just a wrapper for \$program.\" 1>&2
4964 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 5502 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
4965 exit $EXIT_FAILURE 5503 exit $EXIT_FAILURE
4966 fi 5504 fi
4967 fi\ 5505 fi\
4968 " 5506 "
4969 chmod +x $output 5507 chmod +x $output
4970 fi 5508 fi
4971 exit $EXIT_SUCCESS 5509 exit $EXIT_SUCCESS
4972 ;; 5510 ;;
(...skipping 11 matching lines...) Expand all
4984 oldobjs="$libobjs_save" 5522 oldobjs="$libobjs_save"
4985 build_libtool_libs=no 5523 build_libtool_libs=no
4986 else 5524 else
4987 oldobjs="$old_deplibs $non_pic_objects" 5525 oldobjs="$old_deplibs $non_pic_objects"
4988 fi 5526 fi
4989 addlibs="$old_convenience" 5527 addlibs="$old_convenience"
4990 fi 5528 fi
4991 5529
4992 if test -n "$addlibs"; then 5530 if test -n "$addlibs"; then
4993 gentop="$output_objdir/${outputname}x" 5531 gentop="$output_objdir/${outputname}x"
4994 $show "${rm}r $gentop"
4995 $run ${rm}r "$gentop"
4996 $show "$mkdir $gentop"
4997 $run $mkdir "$gentop"
4998 status=$?
4999 if test "$status" -ne 0 && test ! -d "$gentop"; then
5000 exit $status
5001 fi
5002 generated="$generated $gentop" 5532 generated="$generated $gentop"
5003 5533
5004 » # Add in members from convenience archives. 5534 » func_extract_archives $gentop $addlibs
5005 » for xlib in $addlibs; do 5535 » oldobjs="$oldobjs $func_extract_archives_result"
5006 » # Extract the objects.
5007 » case $xlib in
5008 » [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5009 » *) xabs=`pwd`"/$xlib" ;;
5010 » esac
5011 » xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5012 » xdir="$gentop/$xlib"
5013
5014 » $show "${rm}r $xdir"
5015 » $run ${rm}r "$xdir"
5016 » $show "$mkdir $xdir"
5017 » $run $mkdir "$xdir"
5018 » status=$?
5019 » if test "$status" -ne 0 && test ! -d "$xdir"; then
5020 » exit $status
5021 » fi
5022 » # We will extract separately just the conflicting names and we will no
5023 » # longer touch any unique names. It is faster to leave these extract
5024 » # automatically by $AR in one run.
5025 » $show "(cd $xdir && $AR x $xabs)"
5026 » $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5027 » if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5028 » :
5029 » else
5030 » $echo "$modename: warning: object name conflicts; renaming object fi les" 1>&2
5031 » $echo "$modename: warning: to ensure that they will not overwrite" 1 >&2
5032 » $AR t "$xabs" | sort | uniq -cd | while read -r count name
5033 » do
5034 » i=1
5035 » while test "$i" -le "$count"
5036 » do
5037 » # Put our $i before any first dot (extension)
5038 » # Never overwrite any file
5039 » name_to="$name"
5040 » while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5041 » do
5042 » » name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5043 » done
5044 » $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name _to')"
5045 » $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5046 » i=`expr $i + 1`
5047 » done
5048 » done
5049 » fi
5050
5051 » oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.l o -print | $NL2SP`
5052 » done
5053 fi 5536 fi
5054 5537
5055 # Do each command in the archive commands. 5538 # Do each command in the archive commands.
5056 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = ye s; then 5539 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = ye s; then
5057 cmds=$old_archive_from_new_cmds 5540 cmds=$old_archive_from_new_cmds
5058 else 5541 else
5542 # POSIX demands no paths to be encoded in archives. We have
5543 # to avoid creating archives with duplicate basenames if we
5544 # might have to extract them afterwards, e.g., when creating a
5545 # static archive out of a convenience library, or when linking
5546 # the entirety of a libtool archive into another (currently
5547 # not supported by libtool).
5548 if (for obj in $oldobjs
5549 do
5550 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5551 done | sort | sort -uc >/dev/null 2>&1); then
5552 :
5553 else
5554 $echo "copying selected object files to avoid basename conflicts..."
5555
5556 if test -z "$gentop"; then
5557 gentop="$output_objdir/${outputname}x"
5558 generated="$generated $gentop"
5559
5560 $show "${rm}r $gentop"
5561 $run ${rm}r "$gentop"
5562 $show "$mkdir $gentop"
5563 $run $mkdir "$gentop"
5564 exit_status=$?
5565 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5566 exit $exit_status
5567 fi
5568 fi
5569
5570 save_oldobjs=$oldobjs
5571 oldobjs=
5572 counter=1
5573 for obj in $save_oldobjs
5574 do
5575 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5576 case " $oldobjs " in
5577 " ") oldobjs=$obj ;;
5578 *[\ /]"$objbase "*)
5579 while :; do
5580 # Make sure we don't pick an alternate name that also
5581 # overlaps.
5582 newobj=lt$counter-$objbase
5583 counter=`expr $counter + 1`
5584 case " $oldobjs " in
5585 *[\ /]"$newobj "*) ;;
5586 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5587 esac
5588 done
5589 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5590 $run ln "$obj" "$gentop/$newobj" ||
5591 $run cp "$obj" "$gentop/$newobj"
5592 oldobjs="$oldobjs $gentop/$newobj"
5593 ;;
5594 *) oldobjs="$oldobjs $obj" ;;
5595 esac
5596 done
5597 fi
5598
5059 eval cmds=\"$old_archive_cmds\" 5599 eval cmds=\"$old_archive_cmds\"
5060 5600
5061 if len=`expr "X$cmds" : ".*"` && 5601 if len=`expr "X$cmds" : ".*"` &&
5062 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5602 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5063 cmds=$old_archive_cmds 5603 cmds=$old_archive_cmds
5064 else 5604 else
5065 # the command line is too long to link in one step, link in parts 5605 # the command line is too long to link in one step, link in parts
5066 $echo "using piecewise archive linking..." 5606 $echo "using piecewise archive linking..."
5067 save_RANLIB=$RANLIB 5607 save_RANLIB=$RANLIB
5068 RANLIB=: 5608 RANLIB=:
5069 objlist= 5609 objlist=
5070 concat_cmds= 5610 concat_cmds=
5071 save_oldobjs=$oldobjs 5611 save_oldobjs=$oldobjs
5072 » # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5612
5073 » # encoded into archives. This makes 'ar r' malfunction in
5074 » # this piecewise linking case whenever conflicting object
5075 » # names appear in distinct ar calls; check, warn and compensate.
5076 » if (for obj in $save_oldobjs
5077 » do
5078 » $echo "X$obj" | $Xsed -e 's%^.*/%%'
5079 » done | sort | sort -uc >/dev/null 2>&1); then
5080 » :
5081 » else
5082 » $echo "$modename: warning: object name conflicts; overriding AR_FLAG S to 'cq'" 1>&2
5083 » $echo "$modename: warning: to ensure that POSIX-compatible ar will w ork" 1>&2
5084 » AR_FLAGS=cq
5085 » fi
5086 # Is there a better way of finding the last object in the list? 5613 # Is there a better way of finding the last object in the list?
5087 for obj in $save_oldobjs 5614 for obj in $save_oldobjs
5088 do 5615 do
5089 last_oldobj=$obj 5616 last_oldobj=$obj
5090 done 5617 done
5091 for obj in $save_oldobjs 5618 for obj in $save_oldobjs
5092 do 5619 do
5093 oldobjs="$objlist $obj" 5620 oldobjs="$objlist $obj"
5094 objlist="$objlist $obj" 5621 objlist="$objlist $obj"
5095 eval test_cmds=\"$old_archive_cmds\" 5622 eval test_cmds=\"$old_archive_cmds\"
5096 » if len=`expr "X$test_cmds" : ".*"` && 5623 » if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5097 test "$len" -le "$max_cmd_len"; then 5624 test "$len" -le "$max_cmd_len"; then
5098 : 5625 :
5099 else 5626 else
5100 # the above command should be used before it gets too long 5627 # the above command should be used before it gets too long
5101 oldobjs=$objlist 5628 oldobjs=$objlist
5102 if test "$obj" = "$last_oldobj" ; then 5629 if test "$obj" = "$last_oldobj" ; then
5103 RANLIB=$save_RANLIB 5630 RANLIB=$save_RANLIB
5104 fi 5631 fi
5105 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5632 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5106 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 5633 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
5144 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; e xport $var; }; }; $relink_command" 5671 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; e xport $var; }; }; $relink_command"
5145 elif eval var_value=\$$var; test -z "$var_value"; then 5672 elif eval var_value=\$$var; test -z "$var_value"; then
5146 relink_command="$var=; export $var; $relink_command" 5673 relink_command="$var=; export $var; $relink_command"
5147 else 5674 else
5148 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` 5675 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5149 relink_command="$var=\"$var_value\"; export $var; $relink_command" 5676 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5150 fi 5677 fi
5151 done 5678 done
5152 # Quote the link command for shipping. 5679 # Quote the link command for shipping.
5153 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $ libtool_args @inst_prefix_dir@)" 5680 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $ libtool_args @inst_prefix_dir@)"
5154 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 5681 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_s ubst" | $NL2SP`
5155 if test "$hardcode_automatic" = yes ; then 5682 if test "$hardcode_automatic" = yes ; then
5156 relink_command= 5683 relink_command=
5157 fi 5684 fi
5158 5685
5159 5686
5160 # Only create the output if not a dry run. 5687 # Only create the output if not a dry run.
5161 if test -z "$run"; then 5688 if test -z "$run"; then
5162 for installed in no yes; do 5689 for installed in no yes; do
5163 if test "$installed" = yes; then 5690 if test "$installed" = yes; then
5164 if test -z "$install_libdir"; then 5691 if test -z "$install_libdir"; then
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
5283 ;; 5810 ;;
5284 5811
5285 # libtool install mode 5812 # libtool install mode
5286 install) 5813 install)
5287 modename="$modename: install" 5814 modename="$modename: install"
5288 5815
5289 # There may be an optional sh(1) argument at the beginning of 5816 # There may be an optional sh(1) argument at the beginning of
5290 # install_prog (especially on Windows NT). 5817 # install_prog (especially on Windows NT).
5291 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || 5818 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5292 # Allow the use of GNU shtool's install command. 5819 # Allow the use of GNU shtool's install command.
5293 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then 5820 $echo "X$nonopt" | grep shtool > /dev/null; then
5294 # Aesthetically quote it. 5821 # Aesthetically quote it.
5295 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` 5822 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5296 case $arg in 5823 case $arg in
5297 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*) 5824 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*|"")
5298 arg="\"$arg\"" 5825 arg="\"$arg\""
5299 ;; 5826 ;;
5300 esac 5827 esac
5301 install_prog="$arg " 5828 install_prog="$arg "
5302 arg="$1" 5829 arg="$1"
5303 shift 5830 shift
5304 else 5831 else
5305 install_prog= 5832 install_prog=
5306 arg="$nonopt" 5833 arg=$nonopt
5307 fi 5834 fi
5308 5835
5309 # The real first argument should be the name of the installation program. 5836 # The real first argument should be the name of the installation program.
5310 # Aesthetically quote it. 5837 # Aesthetically quote it.
5311 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5838 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5312 case $arg in 5839 case $arg in
5313 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*) 5840 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*|"")
5314 arg="\"$arg\"" 5841 arg="\"$arg\""
5315 ;; 5842 ;;
5316 esac 5843 esac
5317 install_prog="$install_prog$arg" 5844 install_prog="$install_prog$arg"
5318 5845
5319 # We need to accept at least all the BSD install flags. 5846 # We need to accept at least all the BSD install flags.
5320 dest= 5847 dest=
5321 files= 5848 files=
5322 opts= 5849 opts=
5323 prev= 5850 prev=
5324 install_type= 5851 install_type=
5325 isdir=no 5852 isdir=no
5326 stripme= 5853 stripme=
5327 for arg 5854 for arg
5328 do 5855 do
5329 if test -n "$dest"; then 5856 if test -n "$dest"; then
5330 files="$files $dest" 5857 files="$files $dest"
5331 » dest="$arg" 5858 » dest=$arg
5332 continue 5859 continue
5333 fi 5860 fi
5334 5861
5335 case $arg in 5862 case $arg in
5336 -d) isdir=yes ;; 5863 -d) isdir=yes ;;
5337 -f) prev="-f" ;; 5864 -f)
5338 -g) prev="-g" ;; 5865 » case " $install_prog " in
5339 -m) prev="-m" ;; 5866 » *[\\\ /]cp\ *) ;;
5340 -o) prev="-o" ;; 5867 » *) prev=$arg ;;
5868 » esac
5869 » ;;
5870 -g | -m | -o) prev=$arg ;;
5341 -s) 5871 -s)
5342 stripme=" -s" 5872 stripme=" -s"
5343 continue 5873 continue
5344 ;; 5874 ;;
5345 -*) ;; 5875 -*)
5346 5876 » ;;
5347 *) 5877 *)
5348 # If the previous option needed an argument, then skip it. 5878 # If the previous option needed an argument, then skip it.
5349 if test -n "$prev"; then 5879 if test -n "$prev"; then
5350 prev= 5880 prev=
5351 else 5881 else
5352 » dest="$arg" 5882 » dest=$arg
5353 continue 5883 continue
5354 fi 5884 fi
5355 ;; 5885 ;;
5356 esac 5886 esac
5357 5887
5358 # Aesthetically quote the argument. 5888 # Aesthetically quote the argument.
5359 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 5889 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5360 case $arg in 5890 case $arg in
5361 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*) 5891 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \» ]*|*]*|"")
5362 arg="\"$arg\"" 5892 arg="\"$arg\""
5363 ;; 5893 ;;
5364 esac 5894 esac
5365 install_prog="$install_prog $arg" 5895 install_prog="$install_prog $arg"
5366 done 5896 done
5367 5897
5368 if test -z "$install_prog"; then 5898 if test -z "$install_prog"; then
5369 $echo "$modename: you must specify an install program" 1>&2 5899 $echo "$modename: you must specify an install program" 1>&2
5370 $echo "$help" 1>&2 5900 $echo "$help" 1>&2
5371 exit $EXIT_FAILURE 5901 exit $EXIT_FAILURE
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 # At present, this check doesn't affect windows .dll's that 6016 # At present, this check doesn't affect windows .dll's that
5487 # are installed into $libdir/../bin (currently, that works fine) 6017 # are installed into $libdir/../bin (currently, that works fine)
5488 # but it's something to keep an eye on. 6018 # but it's something to keep an eye on.
5489 if test "$inst_prefix_dir" = "$destdir"; then 6019 if test "$inst_prefix_dir" = "$destdir"; then
5490 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 6020 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5491 exit $EXIT_FAILURE 6021 exit $EXIT_FAILURE
5492 fi 6022 fi
5493 6023
5494 if test -n "$inst_prefix_dir"; then 6024 if test -n "$inst_prefix_dir"; then
5495 # Stick the inst_prefix_dir data into the link command. 6025 # Stick the inst_prefix_dir data into the link command.
5496 » relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@% -inst-prefix-dir $inst_prefix_dir%"` 6026 » relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_pre fix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
5497 else 6027 else
5498 » relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@% %"` 6028 » relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_pre fix_dir@%%" | $NL2SP`
5499 fi 6029 fi
5500 6030
5501 $echo "$modename: warning: relinking \`$file'" 1>&2 6031 $echo "$modename: warning: relinking \`$file'" 1>&2
5502 $show "$relink_command" 6032 $show "$relink_command"
5503 if $run eval "$relink_command"; then : 6033 if $run eval "$relink_command"; then :
5504 else 6034 else
5505 $echo "$modename: error: relink \`$file' with the above command befo re installing it" 1>&2 6035 $echo "$modename: error: relink \`$file' with the above command befo re installing it" 1>&2
5506 exit $EXIT_FAILURE 6036 exit $EXIT_FAILURE
5507 fi 6037 fi
5508 fi 6038 fi
(...skipping 11 matching lines...) Expand all
5520 # Install the shared library and build the symlinks. 6050 # Install the shared library and build the symlinks.
5521 $show "$install_prog $dir/$srcname $destdir/$realname" 6051 $show "$install_prog $dir/$srcname $destdir/$realname"
5522 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? 6052 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5523 if test -n "$stripme" && test -n "$striplib"; then 6053 if test -n "$stripme" && test -n "$striplib"; then
5524 $show "$striplib $destdir/$realname" 6054 $show "$striplib $destdir/$realname"
5525 $run eval "$striplib $destdir/$realname" || exit $? 6055 $run eval "$striplib $destdir/$realname" || exit $?
5526 fi 6056 fi
5527 6057
5528 if test "$#" -gt 0; then 6058 if test "$#" -gt 0; then
5529 # Delete the old symlinks, and create new ones. 6059 # Delete the old symlinks, and create new ones.
6060 # Try `ln -sf' first, because the `ln' binary might depend on
6061 # the symlink we replace! Solaris /bin/ln does not understand -f,
6062 # so we also need to try rm && ln -s.
5530 for linkname 6063 for linkname
5531 do 6064 do
5532 if test "$linkname" != "$realname"; then 6065 if test "$linkname" != "$realname"; then
5533 » » $show "(cd $destdir && $rm $linkname && $LN_S $realname $linknam e)" 6066 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $ linkname && $LN_S $realname $linkname; }; })"
5534 » » $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $lin kname)" 6067 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $ rm $linkname && $LN_S $realname $linkname; }; })"
5535 fi 6068 fi
5536 done 6069 done
5537 fi 6070 fi
5538 6071
5539 # Do each command in the postinstall commands. 6072 # Do each command in the postinstall commands.
5540 lib="$destdir/$realname" 6073 lib="$destdir/$realname"
5541 cmds=$postinstall_cmds 6074 cmds=$postinstall_cmds
5542 save_ifs="$IFS"; IFS='~' 6075 save_ifs="$IFS"; IFS='~'
5543 for cmd in $cmds; do 6076 for cmd in $cmds; do
5544 IFS="$save_ifs" 6077 IFS="$save_ifs"
5545 eval cmd=\"$cmd\" 6078 eval cmd=\"$cmd\"
5546 $show "$cmd" 6079 $show "$cmd"
5547 » $run eval "$cmd" || exit $? 6080 » $run eval "$cmd" || {
6081 » lt_exit=$?
6082
6083 » # Restore the uninstalled library and exit
6084 » if test "$mode" = relink; then
6085 » » $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realn ame}U $realname)'
6086 » fi
6087
6088 » exit $lt_exit
6089 » }
5548 done 6090 done
5549 IFS="$save_ifs" 6091 IFS="$save_ifs"
5550 fi 6092 fi
5551 6093
5552 # Install the pseudo-library for information purposes. 6094 # Install the pseudo-library for information purposes.
5553 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 6095 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5554 instname="$dir/$name"i 6096 instname="$dir/$name"i
5555 $show "$install_prog $instname $destdir/$name" 6097 $show "$install_prog $instname $destdir/$name"
5556 $run eval "$install_prog $instname $destdir/$name" || exit $? 6098 $run eval "$install_prog $instname $destdir/$name" || exit $?
5557 6099
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
5631 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` 6173 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
5632 ;; 6174 ;;
5633 *) 6175 *)
5634 wrapper=$file 6176 wrapper=$file
5635 ;; 6177 ;;
5636 esac 6178 esac
5637 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/nu ll 2>&1; then 6179 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/nu ll 2>&1; then
5638 notinst_deplibs= 6180 notinst_deplibs=
5639 relink_command= 6181 relink_command=
5640 6182
5641 » # To insure that "foo" is sourced, and not "foo.exe", 6183 » # Note that it is not necessary on cygwin/mingw to append a dot to
5642 » # finese the cygwin/MSYS system by explicitly sourcing "foo." 6184 » # foo even if both foo and FILE.exe exist: automatic-append-.exe
5643 » # which disallows the automatic-append-.exe behavior. 6185 » # behavior happens only for exec(3), not for open(2)! Also, sourcing
5644 » case $build in 6186 » # `FILE.' does not work on cygwin managed mounts.
5645 » *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 6187 » #
5646 » *) wrapperdot=${wrapper} ;;
5647 » esac
5648 # If there is no directory component, then add one. 6188 # If there is no directory component, then add one.
5649 » case $file in 6189 » case $wrapper in
5650 » */* | *\\*) . ${wrapperdot} ;; 6190 » */* | *\\*) . ${wrapper} ;;
5651 » *) . ./${wrapperdot} ;; 6191 » *) . ./${wrapper} ;;
5652 esac 6192 esac
5653 6193
5654 # Check the variables that should have been set. 6194 # Check the variables that should have been set.
5655 if test -z "$notinst_deplibs"; then 6195 if test -z "$notinst_deplibs"; then
5656 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 6196 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
5657 exit $EXIT_FAILURE 6197 exit $EXIT_FAILURE
5658 fi 6198 fi
5659 6199
5660 finalize=yes 6200 finalize=yes
5661 for lib in $notinst_deplibs; do 6201 for lib in $notinst_deplibs; do
5662 # Check to see that each library is installed. 6202 # Check to see that each library is installed.
5663 libdir= 6203 libdir=
5664 if test -f "$lib"; then 6204 if test -f "$lib"; then
5665 # If there is no directory component, then add one. 6205 # If there is no directory component, then add one.
5666 case $lib in 6206 case $lib in
5667 */* | *\\*) . $lib ;; 6207 */* | *\\*) . $lib ;;
5668 *) . ./$lib ;; 6208 *) . ./$lib ;;
5669 esac 6209 esac
5670 fi 6210 fi
5671 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsui te: skip nested quoting test 6211 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsui te: skip nested quoting test
5672 if test -n "$libdir" && test ! -f "$libfile"; then 6212 if test -n "$libdir" && test ! -f "$libfile"; then
5673 $echo "$modename: warning: \`$lib' has not been installed in \`$li bdir'" 1>&2 6213 $echo "$modename: warning: \`$lib' has not been installed in \`$li bdir'" 1>&2
5674 finalize=no 6214 finalize=no
5675 fi 6215 fi
5676 done 6216 done
5677 6217
5678 relink_command= 6218 relink_command=
5679 » # To insure that "foo" is sourced, and not "foo.exe", 6219 » # Note that it is not necessary on cygwin/mingw to append a dot to
5680 » # finese the cygwin/MSYS system by explicitly sourcing "foo." 6220 » # foo even if both foo and FILE.exe exist: automatic-append-.exe
5681 » # which disallows the automatic-append-.exe behavior. 6221 » # behavior happens only for exec(3), not for open(2)! Also, sourcing
5682 » case $build in 6222 » # `FILE.' does not work on cygwin managed mounts.
5683 » *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 6223 » #
5684 » *) wrapperdot=${wrapper} ;;
5685 » esac
5686 # If there is no directory component, then add one. 6224 # If there is no directory component, then add one.
5687 » case $file in 6225 » case $wrapper in
5688 » */* | *\\*) . ${wrapperdot} ;; 6226 » */* | *\\*) . ${wrapper} ;;
5689 » *) . ./${wrapperdot} ;; 6227 » *) . ./${wrapper} ;;
5690 esac 6228 esac
5691 6229
5692 outputname= 6230 outputname=
5693 if test "$fast_install" = no && test -n "$relink_command"; then 6231 if test "$fast_install" = no && test -n "$relink_command"; then
5694 if test "$finalize" = yes && test -z "$run"; then 6232 if test "$finalize" = yes && test -z "$run"; then
5695 » tmpdir="/tmp" 6233 » tmpdir=`func_mktempdir`
5696 » test -n "$TMPDIR" && tmpdir="$TMPDIR"
5697 » tmpdir="$tmpdir/libtool-$$"
5698 » save_umask=`umask`
5699 » umask 0077
5700 » if $mkdir "$tmpdir"; then
5701 » umask $save_umask
5702 » else
5703 » umask $save_umask
5704 » » $echo "$modename: error: cannot create temporary directory \`$tm pdir'" 1>&2
5705 » » continue
5706 » fi
5707 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` 6234 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
5708 outputname="$tmpdir/$file" 6235 outputname="$tmpdir/$file"
5709 # Replace the output file specification. 6236 # Replace the output file specification.
5710 » relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'" $outputname"'%g'` 6237 » relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@O UTPUT@%'"$outputname"'%g' | $NL2SP`
5711 6238
5712 $show "$relink_command" 6239 $show "$relink_command"
5713 if $run eval "$relink_command"; then : 6240 if $run eval "$relink_command"; then :
5714 else 6241 else
5715 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 6242 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5716 ${rm}r "$tmpdir" 6243 ${rm}r "$tmpdir"
5717 continue 6244 continue
5718 fi 6245 fi
5719 file="$outputname" 6246 file="$outputname"
5720 else 6247 else
5721 $echo "$modename: warning: cannot relink \`$file'" 1>&2 6248 $echo "$modename: warning: cannot relink \`$file'" 1>&2
5722 fi 6249 fi
5723 else 6250 else
5724 # Install the binary that we compiled earlier. 6251 # Install the binary that we compiled earlier.
5725 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\ 1%"` 6252 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\ 1%"`
5726 fi 6253 fi
5727 fi 6254 fi
5728 6255
5729 # remove .exe since cygwin /usr/bin/install will append another 6256 # remove .exe since cygwin /usr/bin/install will append another
5730 » # one anyways 6257 » # one anyway
5731 case $install_prog,$host in 6258 case $install_prog,$host in
5732 */usr/bin/install*,*cygwin*) 6259 */usr/bin/install*,*cygwin*)
5733 case $file:$destfile in 6260 case $file:$destfile in
5734 *.exe:*.exe) 6261 *.exe:*.exe)
5735 # this is ok 6262 # this is ok
5736 ;; 6263 ;;
5737 *.exe:*) 6264 *.exe:*)
5738 destfile=$destfile.exe 6265 destfile=$destfile.exe
5739 ;; 6266 ;;
5740 *:*.exe) 6267 *:*.exe)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
5820 eval cmds=\"$finish_eval\" 6347 eval cmds=\"$finish_eval\"
5821 $run eval "$cmds" || admincmds="$admincmds 6348 $run eval "$cmds" || admincmds="$admincmds
5822 $cmds" 6349 $cmds"
5823 fi 6350 fi
5824 done 6351 done
5825 fi 6352 fi
5826 6353
5827 # Exit here if they wanted silent mode. 6354 # Exit here if they wanted silent mode.
5828 test "$show" = : && exit $EXIT_SUCCESS 6355 test "$show" = : && exit $EXIT_SUCCESS
5829 6356
5830 $echo "--------------------------------------------------------------------- -" 6357 $echo "X-------------------------------------------------------------------- --" | $Xsed
5831 $echo "Libraries have been installed in:" 6358 $echo "Libraries have been installed in:"
5832 for libdir in $libdirs; do 6359 for libdir in $libdirs; do
5833 $echo " $libdir" 6360 $echo " $libdir"
5834 done 6361 done
5835 $echo 6362 $echo
5836 $echo "If you ever happen to want to link against installed libraries" 6363 $echo "If you ever happen to want to link against installed libraries"
5837 $echo "in a given directory, LIBDIR, you must either use libtool, and" 6364 $echo "in a given directory, LIBDIR, you must either use libtool, and"
5838 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 6365 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
5839 $echo "flag during linking and do at least one of the following:" 6366 $echo "flag during linking and do at least one of the following:"
5840 if test -n "$shlibpath_var"; then 6367 if test -n "$shlibpath_var"; then
(...skipping 12 matching lines...) Expand all
5853 fi 6380 fi
5854 if test -n "$admincmds"; then 6381 if test -n "$admincmds"; then
5855 $echo " - have your system administrator run these commands:$admincmds" 6382 $echo " - have your system administrator run these commands:$admincmds"
5856 fi 6383 fi
5857 if test -f /etc/ld.so.conf; then 6384 if test -f /etc/ld.so.conf; then
5858 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf '" 6385 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf '"
5859 fi 6386 fi
5860 $echo 6387 $echo
5861 $echo "See any operating system documentation about shared libraries for" 6388 $echo "See any operating system documentation about shared libraries for"
5862 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 6389 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
5863 $echo "--------------------------------------------------------------------- -" 6390 $echo "X-------------------------------------------------------------------- --" | $Xsed
5864 exit $EXIT_SUCCESS 6391 exit $EXIT_SUCCESS
5865 ;; 6392 ;;
5866 6393
5867 # libtool execute mode 6394 # libtool execute mode
5868 execute) 6395 execute)
5869 modename="$modename: execute" 6396 modename="$modename: execute"
5870 6397
5871 # The first argument is the command name. 6398 # The first argument is the command name.
5872 cmd="$nonopt" 6399 cmd="$nonopt"
5873 if test -z "$cmd"; then 6400 if test -z "$cmd"; then
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
5911 test -n "$library_names" && $echo "$modename: warning: \`$file' was no t linked with \`-export-dynamic'" 6438 test -n "$library_names" && $echo "$modename: warning: \`$file' was no t linked with \`-export-dynamic'"
5912 continue 6439 continue
5913 fi 6440 fi
5914 6441
5915 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6442 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5916 test "X$dir" = "X$file" && dir=. 6443 test "X$dir" = "X$file" && dir=.
5917 6444
5918 if test -f "$dir/$objdir/$dlname"; then 6445 if test -f "$dir/$objdir/$dlname"; then
5919 dir="$dir/$objdir" 6446 dir="$dir/$objdir"
5920 else 6447 else
5921 » $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir' " 1>&2 6448 » if test ! -f "$dir/$dlname"; then
5922 » exit $EXIT_FAILURE 6449 » $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdi r'" 1>&2
6450 » exit $EXIT_FAILURE
6451 » fi
5923 fi 6452 fi
5924 ;; 6453 ;;
5925 6454
5926 *.lo) 6455 *.lo)
5927 # Just add the directory containing the .lo file. 6456 # Just add the directory containing the .lo file.
5928 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 6457 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5929 test "X$dir" = "X$file" && dir=. 6458 test "X$dir" = "X$file" && dir=.
5930 ;; 6459 ;;
5931 6460
5932 *) 6461 *)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
5976 args="$args \"$file\"" 6505 args="$args \"$file\""
5977 done 6506 done
5978 6507
5979 if test -z "$run"; then 6508 if test -z "$run"; then
5980 if test -n "$shlibpath_var"; then 6509 if test -n "$shlibpath_var"; then
5981 # Export the shlibpath_var. 6510 # Export the shlibpath_var.
5982 eval "export $shlibpath_var" 6511 eval "export $shlibpath_var"
5983 fi 6512 fi
5984 6513
5985 # Restore saved environment variables 6514 # Restore saved environment variables
5986 if test "${save_LC_ALL+set}" = set; then 6515 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
5987 » LC_ALL="$save_LC_ALL"; export LC_ALL 6516 do
5988 fi 6517 » eval "if test \"\${save_$lt_var+set}\" = set; then
5989 if test "${save_LANG+set}" = set; then 6518 » » $lt_var=\$save_$lt_var; export $lt_var
5990 » LANG="$save_LANG"; export LANG 6519 » fi"
5991 fi 6520 done
5992 6521
5993 # Now prepare to actually exec the command. 6522 # Now prepare to actually exec the command.
5994 exec_cmd="\$cmd$args" 6523 exec_cmd="\$cmd$args"
5995 else 6524 else
5996 # Display what would be done. 6525 # Display what would be done.
5997 if test -n "$shlibpath_var"; then 6526 if test -n "$shlibpath_var"; then
5998 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" 6527 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5999 $echo "export $shlibpath_var" 6528 $echo "export $shlibpath_var"
6000 fi 6529 fi
6001 $echo "$cmd$args" 6530 $echo "$cmd$args"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
6070 *.la) 6599 *.la)
6071 # Possibly a libtool archive, so verify it. 6600 # Possibly a libtool archive, so verify it.
6072 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6601 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6073 . $dir/$name 6602 . $dir/$name
6074 6603
6075 # Delete the libtool libraries and symlinks. 6604 # Delete the libtool libraries and symlinks.
6076 for n in $library_names; do 6605 for n in $library_names; do
6077 rmfiles="$rmfiles $objdir/$n" 6606 rmfiles="$rmfiles $objdir/$n"
6078 done 6607 done
6079 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" 6608 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6080 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name }i"
6081 6609
6082 » if test "$mode" = uninstall; then 6610 » case "$mode" in
6611 » clean)
6612 » case " $library_names " in
6613 » # " " in the beginning catches empty $dlname
6614 » *" $dlname "*) ;;
6615 » *) rmfiles="$rmfiles $objdir/$dlname" ;;
6616 » esac
6617 » test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name }i"
6618 » ;;
6619 » uninstall)
6083 if test -n "$library_names"; then 6620 if test -n "$library_names"; then
6084 # Do each command in the postuninstall commands. 6621 # Do each command in the postuninstall commands.
6085 cmds=$postuninstall_cmds 6622 cmds=$postuninstall_cmds
6086 save_ifs="$IFS"; IFS='~' 6623 save_ifs="$IFS"; IFS='~'
6087 for cmd in $cmds; do 6624 for cmd in $cmds; do
6088 IFS="$save_ifs" 6625 IFS="$save_ifs"
6089 eval cmd=\"$cmd\" 6626 eval cmd=\"$cmd\"
6090 $show "$cmd" 6627 $show "$cmd"
6091 $run eval "$cmd" 6628 $run eval "$cmd"
6092 if test "$?" -ne 0 && test "$rmforce" != yes; then 6629 if test "$?" -ne 0 && test "$rmforce" != yes; then
(...skipping 12 matching lines...) Expand all
6105 eval cmd=\"$cmd\" 6642 eval cmd=\"$cmd\"
6106 $show "$cmd" 6643 $show "$cmd"
6107 $run eval "$cmd" 6644 $run eval "$cmd"
6108 if test "$?" -ne 0 && test "$rmforce" != yes; then 6645 if test "$?" -ne 0 && test "$rmforce" != yes; then
6109 exit_status=1 6646 exit_status=1
6110 fi 6647 fi
6111 done 6648 done
6112 IFS="$save_ifs" 6649 IFS="$save_ifs"
6113 fi 6650 fi
6114 # FIXME: should reinstall the best remaining shared library. 6651 # FIXME: should reinstall the best remaining shared library.
6115 » fi 6652 » ;;
6653 » esac
6116 fi 6654 fi
6117 ;; 6655 ;;
6118 6656
6119 *.lo) 6657 *.lo)
6120 # Possibly a libtool object, so verify it. 6658 # Possibly a libtool object, so verify it.
6121 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6659 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6122 6660
6123 # Read the .lo file 6661 # Read the .lo file
6124 . $dir/$name 6662 . $dir/$name
6125 6663
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
6329 a program from several object files. 6867 a program from several object files.
6330 6868
6331 The following components of LINK-COMMAND are treated specially: 6869 The following components of LINK-COMMAND are treated specially:
6332 6870
6333 -all-static do not do any dynamic linking at all 6871 -all-static do not do any dynamic linking at all
6334 -avoid-version do not add a version suffix if possible 6872 -avoid-version do not add a version suffix if possible
6335 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime 6873 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6336 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols 6874 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6337 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) 6875 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6338 -export-symbols SYMFILE 6876 -export-symbols SYMFILE
6339 » » try to export only the symbols listed in SYMFILE 6877 try to export only the symbols listed in SYMFILE
6340 -export-symbols-regex REGEX 6878 -export-symbols-regex REGEX
6341 » » try to export only the symbols matching REGEX 6879 try to export only the symbols matching REGEX
6342 -LLIBDIR search LIBDIR for required installed libraries 6880 -LLIBDIR search LIBDIR for required installed libraries
6343 -lNAME OUTPUT-FILE requires the installed library libNAME 6881 -lNAME OUTPUT-FILE requires the installed library libNAME
6344 -module build a library that can dlopened 6882 -module build a library that can dlopened
6345 -no-fast-install disable the fast-install mode 6883 -no-fast-install disable the fast-install mode
6346 -no-install link a not-installable executable 6884 -no-install link a not-installable executable
6347 -no-undefined declare that a library does not refer to external symbols 6885 -no-undefined declare that a library does not refer to external symbols
6348 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 6886 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6349 -objectlist FILE Use a list of object files found in FILE to specify objects 6887 -objectlist FILE Use a list of object files found in FILE to specify objects
6350 -precious-files-regex REGEX 6888 -precious-files-regex REGEX
6351 don't remove output files matching REGEX 6889 don't remove output files matching REGEX
6352 -release RELEASE specify package release information 6890 -release RELEASE specify package release information
6353 -rpath LIBDIR the created library will eventually be installed in LIBDIR 6891 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6354 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries 6892 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6355 -static do not do any dynamic linking of libtool libraries 6893 -static do not do any dynamic linking of uninstalled libtool librari es
6894 -static-libtool-libs
6895 do not do any dynamic linking of libtool libraries
6356 -version-info CURRENT[:REVISION[:AGE]] 6896 -version-info CURRENT[:REVISION[:AGE]]
6357 » » specify library version info [each variable defaults to 0] 6897 specify library version info [each variable defaults to 0]
6358 6898
6359 All other options (arguments beginning with \`-') are ignored. 6899 All other options (arguments beginning with \`-') are ignored.
6360 6900
6361 Every other argument is treated as a filename. Files ending in \`.la' are 6901 Every other argument is treated as a filename. Files ending in \`.la' are
6362 treated as uninstalled libtool libraries, other files are standard or library 6902 treated as uninstalled libtool libraries, other files are standard or library
6363 object files. 6903 object files.
6364 6904
6365 If the OUTPUT-FILE ends in \`.la', then a libtool library is created, 6905 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6366 only library objects (\`.lo' files) may be specified, and \`-rpath' is 6906 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6367 required, except when creating a convenience library. 6907 required, except when creating a convenience library.
(...skipping 22 matching lines...) Expand all
6390 *) 6930 *)
6391 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6931 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6392 $echo "$help" 1>&2 6932 $echo "$help" 1>&2
6393 exit $EXIT_FAILURE 6933 exit $EXIT_FAILURE
6394 ;; 6934 ;;
6395 esac 6935 esac
6396 6936
6397 $echo 6937 $echo
6398 $echo "Try \`$modename --help' for more information about other modes." 6938 $echo "Try \`$modename --help' for more information about other modes."
6399 6939
6400 exit $EXIT_SUCCESS 6940 exit $?
6401 6941
6402 # The TAGs below are defined such that we never get into a situation 6942 # The TAGs below are defined such that we never get into a situation
6403 # in which we disable both kinds of libraries. Given conflicting 6943 # in which we disable both kinds of libraries. Given conflicting
6404 # choices, we go for a static library, that is the most portable, 6944 # choices, we go for a static library, that is the most portable,
6405 # since we can't tell whether shared libraries were disabled because 6945 # since we can't tell whether shared libraries were disabled because
6406 # the user asked for that or because the platform doesn't support 6946 # the user asked for that or because the platform doesn't support
6407 # them. This is particularly important on AIX, because we don't 6947 # them. This is particularly important on AIX, because we don't
6408 # support having both static and shared libraries enabled at the same 6948 # support having both static and shared libraries enabled at the same
6409 # time on that platform, so we default to a shared-only configuration. 6949 # time on that platform, so we default to a shared-only configuration.
6410 # If a disable-shared tag is given, we'll fallback to a static-only 6950 # If a disable-shared tag is given, we'll fallback to a static-only
6411 # configuration. But we'll never go from static-only to shared-only. 6951 # configuration. But we'll never go from static-only to shared-only.
6412 6952
6413 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared 6953 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6414 build_libtool_libs=no 6954 disable_libs=shared
6415 build_old_libs=yes
6416 # ### END LIBTOOL TAG CONFIG: disable-shared 6955 # ### END LIBTOOL TAG CONFIG: disable-shared
6417 6956
6418 # ### BEGIN LIBTOOL TAG CONFIG: disable-static 6957 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6419 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` 6958 disable_libs=static
6420 # ### END LIBTOOL TAG CONFIG: disable-static 6959 # ### END LIBTOOL TAG CONFIG: disable-static
6421 6960
6422 # Local Variables: 6961 # Local Variables:
6423 # mode:shell-script 6962 # mode:shell-script
6424 # sh-indentation:2 6963 # sh-indentation:2
6425 # End: 6964 # End:
OLDNEW
« no previous file with comments | « install-sh ('k') | man/man5/tcsd.conf.5 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698