Deleted Added
full compact
ltmain.sh (117610) ltmain.sh (125647)
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 ltconfig.
2# NOTE: Changing this file will not affect anything until you rerun configure.
3#
3#
4# Copyright (C) 1996-1999 Free Software Foundation, Inc.
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5# Free Software Foundation, Inc.
5# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful, but

--- 5 unchanged lines hidden (view full) ---

18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20#
21# As a special exception to the GNU General Public License, if you
22# distribute this file as part of a program that contains a
23# configuration script generated by Autoconf, you may include it under
24# the same distribution terms that you use for the rest of that program.
25
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
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
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but

--- 5 unchanged lines hidden (view full) ---

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.
21#
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
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.
26
26EXPR_COMPAT=1
27export EXPR_COMPAT
28
29# Check that we have a working $echo.
30if test "X$1" = X--no-reexec; then
31 # Discard the --no-reexec flag, and continue.
32 shift
33elif test "X$1" = X--fallback-echo; then
34 # Avoid inline document here, it may be left over
35 :
36elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then

--- 9 unchanged lines hidden (view full) ---

46 shift
47 cat <<EOF
48$*
49EOF
50 exit 0
51fi
52
53# The name of this program.
27# Check that we have a working $echo.
28if test "X$1" = X--no-reexec; then
29 # Discard the --no-reexec flag, and continue.
30 shift
31elif test "X$1" = X--fallback-echo; then
32 # Avoid inline document here, it may be left over
33 :
34elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then

--- 9 unchanged lines hidden (view full) ---

44 shift
45 cat <<EOF
46$*
47EOF
48 exit 0
49fi
50
51# The name of this program.
54progname=`$echo "$0" | sed 's%^.*/%%'`
52progname=`$echo "$0" | ${SED} 's%^.*/%%'`
55modename="$progname"
56
57# Constants.
58PROGRAM=ltmain.sh
59PACKAGE=libtool
53modename="$progname"
54
55# Constants.
56PROGRAM=ltmain.sh
57PACKAGE=libtool
60VERSION=1.3.5-freebsd-ports
61TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
58VERSION=1.4.3
59TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
62
63default_mode=
64help="Try \`$progname --help' for more information."
65magic="%%%MAGIC variable%%%"
66mkdir="mkdir"
67mv="mv -f"
68rm="rm -f"
69
70# Sed substitution that helps us do robust quoting. It backslashifies
71# metacharacters that are still active within double-quoted strings.
60
61default_mode=
62help="Try \`$progname --help' for more information."
63magic="%%%MAGIC variable%%%"
64mkdir="mkdir"
65mv="mv -f"
66rm="rm -f"
67
68# Sed substitution that helps us do robust quoting. It backslashifies
69# metacharacters that are still active within double-quoted strings.
72Xsed='sed -e 1s/^X//'
70Xsed="${SED}"' -e 1s/^X//'
73sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
71sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
74SP2NL='tr \040 \012'
75NL2SP='tr \015\012 \040\040'
72# test EBCDIC or ASCII
73case `echo A|od -x` in
74 *[Cc]1*) # EBCDIC based system
75 SP2NL="tr '\100' '\n'"
76 NL2SP="tr '\r\n' '\100\100'"
77 ;;
78 *) # Assume ASCII based system
79 SP2NL="tr '\040' '\012'"
80 NL2SP="tr '\015\012' '\040\040'"
81 ;;
82esac
76
77# NLS nuisances.
78# Only set LANG and LC_ALL to C if already set.
79# These must not be set unconditionally because not all systems understand
80# e.g. LANG=C (notably SCO).
81# We save the old values to restore during execute mode.
82if test "${LC_ALL+set}" = set; then
83 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
84fi
85if test "${LANG+set}" = set; then
86 save_LANG="$LANG"; LANG=C; export LANG
87fi
88
83
84# NLS nuisances.
85# Only set LANG and LC_ALL to C if already set.
86# These must not be set unconditionally because not all systems understand
87# e.g. LANG=C (notably SCO).
88# We save the old values to restore during execute mode.
89if test "${LC_ALL+set}" = set; then
90 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
91fi
92if test "${LANG+set}" = set; then
93 save_LANG="$LANG"; LANG=C; export LANG
94fi
95
89if test "$LTCONFIG_VERSION" != "$VERSION"; then
90 echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
91 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
92 exit 1
93fi
96# Make sure IFS has a sensible default
97: ${IFS=" "}
94
95if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
96 echo "$modename: not configured to build any kind of library" 1>&2
97 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
98 exit 1
99fi
100
101# Global variables.

--- 9 unchanged lines hidden (view full) ---

111o2lo="s/\\.${objext}\$/.lo/"
112
113# Parse our command line options once, thoroughly.
114while test $# -gt 0
115do
116 arg="$1"
117 shift
118
98
99if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
100 echo "$modename: not configured to build any kind of library" 1>&2
101 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
102 exit 1
103fi
104
105# Global variables.

--- 9 unchanged lines hidden (view full) ---

115o2lo="s/\\.${objext}\$/.lo/"
116
117# Parse our command line options once, thoroughly.
118while test $# -gt 0
119do
120 arg="$1"
121 shift
122
119 case "$arg" in
123 case $arg in
120 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) optarg= ;;
122 esac
123
124 # If the previous option needs an argument, assign it.
125 if test -n "$prev"; then
124 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
125 *) optarg= ;;
126 esac
127
128 # If the previous option needs an argument, assign it.
129 if test -n "$prev"; then
126 case "$prev" in
130 case $prev in
127 execute_dlfiles)
131 execute_dlfiles)
128 eval "$prev=\"\$$prev \$arg\""
132 execute_dlfiles="$execute_dlfiles $arg"
129 ;;
130 *)
131 eval "$prev=\$arg"
132 ;;
133 esac
134
135 prev=
136 prevopt=
137 continue
138 fi
139
140 # Have we seen a non-optional argument yet?
133 ;;
134 *)
135 eval "$prev=\$arg"
136 ;;
137 esac
138
139 prev=
140 prevopt=
141 continue
142 fi
143
144 # Have we seen a non-optional argument yet?
141 case "$arg" in
145 case $arg in
142 --help)
143 show_help=yes
144 ;;
145
146 --version)
147 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
148 exit 0
149 ;;
150
151 --config)
146 --help)
147 show_help=yes
148 ;;
149
150 --version)
151 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
152 exit 0
153 ;;
154
155 --config)
152 sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
156 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
153 exit 0
154 ;;
155
156 --debug)
157 echo "$progname: enabling shell trace mode"
158 set -x
159 ;;
160

--- 16 unchanged lines hidden (view full) ---

177 exit 0
178 ;;
179
180 --finish) mode="finish" ;;
181
182 --mode) prevopt="--mode" prev=mode ;;
183 --mode=*) mode="$optarg" ;;
184
157 exit 0
158 ;;
159
160 --debug)
161 echo "$progname: enabling shell trace mode"
162 set -x
163 ;;
164

--- 16 unchanged lines hidden (view full) ---

181 exit 0
182 ;;
183
184 --finish) mode="finish" ;;
185
186 --mode) prevopt="--mode" prev=mode ;;
187 --mode=*) mode="$optarg" ;;
188
189 --preserve-dup-deps) duplicate_deps="yes" ;;
190
185 --quiet | --silent)
186 show=:
187 ;;
188
189 -dlopen)
190 prevopt="-dlopen"
191 prev=execute_dlfiles
192 ;;

--- 12 unchanged lines hidden (view full) ---

205done
206
207if test -n "$prevopt"; then
208 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
209 $echo "$help" 1>&2
210 exit 1
211fi
212
191 --quiet | --silent)
192 show=:
193 ;;
194
195 -dlopen)
196 prevopt="-dlopen"
197 prev=execute_dlfiles
198 ;;

--- 12 unchanged lines hidden (view full) ---

211done
212
213if test -n "$prevopt"; then
214 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
215 $echo "$help" 1>&2
216 exit 1
217fi
218
219# If this variable is set in any of the actions, the command in it
220# will be execed at the end. This prevents here-documents from being
221# left over by shells.
222exec_cmd=
223
213if test -z "$show_help"; then
214
215 # Infer the operation mode.
216 if test -z "$mode"; then
224if test -z "$show_help"; then
225
226 # Infer the operation mode.
227 if test -z "$mode"; then
217 case "$nonopt" in
218 *cc | *++ | gcc* | *-gcc*)
228 case $nonopt in
229 *cc | *++ | gcc* | *-gcc* | xlc*)
219 mode=link
220 for arg
221 do
230 mode=link
231 for arg
232 do
222 case "$arg" in
233 case $arg in
223 -c)
224 mode=compile
225 break
226 ;;
227 esac
228 done
229 ;;
230 *db | *dbx | *strace | *truss)

--- 28 unchanged lines hidden (view full) ---

259 exit 1
260 fi
261
262 # Change the help message to a mode-specific one.
263 generic_help="$help"
264 help="Try \`$modename --help --mode=$mode' for more information."
265
266 # These modes are in order of execution frequency so that they run quickly.
234 -c)
235 mode=compile
236 break
237 ;;
238 esac
239 done
240 ;;
241 *db | *dbx | *strace | *truss)

--- 28 unchanged lines hidden (view full) ---

270 exit 1
271 fi
272
273 # Change the help message to a mode-specific one.
274 generic_help="$help"
275 help="Try \`$modename --help --mode=$mode' for more information."
276
277 # These modes are in order of execution frequency so that they run quickly.
267 case "$mode" in
278 case $mode in
268 # libtool compile mode
269 compile)
270 modename="$modename: compile"
271 # Get the compilation command and the source file.
272 base_compile=
279 # libtool compile mode
280 compile)
281 modename="$modename: compile"
282 # Get the compilation command and the source file.
283 base_compile=
284 prev=
273 lastarg=
274 srcfile="$nonopt"
275 suppress_output=
276
277 user_target=no
278 for arg
279 do
285 lastarg=
286 srcfile="$nonopt"
287 suppress_output=
288
289 user_target=no
290 for arg
291 do
292 case $prev in
293 "") ;;
294 xcompiler)
295 # Aesthetically quote the previous argument.
296 prev=
297 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
298
299 case $arg in
300 # Double-quote args containing other shell metacharacters.
301 # Many Bourne shells cannot handle close brackets correctly
302 # in scan sets, so we specify it separately.
303 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
304 arg="\"$arg\""
305 ;;
306 esac
307
308 # Add the previous argument to base_compile.
309 if test -z "$base_compile"; then
310 base_compile="$lastarg"
311 else
312 base_compile="$base_compile $lastarg"
313 fi
314 continue
315 ;;
316 esac
317
280 # Accept any command-line options.
318 # Accept any command-line options.
281 case "$arg" in
319 case $arg in
282 -o)
283 if test "$user_target" != "no"; then
284 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
285 exit 1
286 fi
287 user_target=next
288 ;;
289
290 -static)
291 build_old_libs=yes
292 continue
293 ;;
320 -o)
321 if test "$user_target" != "no"; then
322 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
323 exit 1
324 fi
325 user_target=next
326 ;;
327
328 -static)
329 build_old_libs=yes
330 continue
331 ;;
332
333 -prefer-pic)
334 pic_mode=yes
335 continue
336 ;;
337
338 -prefer-non-pic)
339 pic_mode=no
340 continue
341 ;;
342
343 -Xcompiler)
344 prev=xcompiler
345 continue
346 ;;
347
348 -Wc,*)
349 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
350 lastarg=
351 save_ifs="$IFS"; IFS=','
352 for arg in $args; do
353 IFS="$save_ifs"
354
355 # Double-quote args containing other shell metacharacters.
356 # Many Bourne shells cannot handle close brackets correctly
357 # in scan sets, so we specify it separately.
358 case $arg in
359 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
360 arg="\"$arg\""
361 ;;
362 esac
363 lastarg="$lastarg $arg"
364 done
365 IFS="$save_ifs"
366 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
367
368 # Add the arguments to base_compile.
369 if test -z "$base_compile"; then
370 base_compile="$lastarg"
371 else
372 base_compile="$base_compile $lastarg"
373 fi
374 continue
375 ;;
294 esac
295
376 esac
377
296 case "$user_target" in
378 case $user_target in
297 next)
298 # The next one is the -o target name
299 user_target=yes
300 continue
301 ;;
302 yes)
303 # We got the output file
304 user_target=set

--- 9 unchanged lines hidden (view full) ---

314 # Aesthetically quote the previous argument.
315
316 # Backslashify any backslashes, double quotes, and dollar signs.
317 # These are the only characters that are still specially
318 # interpreted inside of double-quoted scrings.
319 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
320
321 # Double-quote args containing other shell metacharacters.
379 next)
380 # The next one is the -o target name
381 user_target=yes
382 continue
383 ;;
384 yes)
385 # We got the output file
386 user_target=set

--- 9 unchanged lines hidden (view full) ---

396 # Aesthetically quote the previous argument.
397
398 # Backslashify any backslashes, double quotes, and dollar signs.
399 # These are the only characters that are still specially
400 # interpreted inside of double-quoted scrings.
401 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
402
403 # Double-quote args containing other shell metacharacters.
322 # Many Bourne shells cannot handle close brackets correctly in scan
323 # sets, so we specify it separately.
324 case "$lastarg" in
325 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
404 # Many Bourne shells cannot handle close brackets correctly
405 # in scan sets, so we specify it separately.
406 case $lastarg in
407 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
326 lastarg="\"$lastarg\""
327 ;;
328 esac
329
330 # Add the previous argument to base_compile.
331 if test -z "$base_compile"; then
332 base_compile="$lastarg"
333 else
334 base_compile="$base_compile $lastarg"
335 fi
336 done
337
408 lastarg="\"$lastarg\""
409 ;;
410 esac
411
412 # Add the previous argument to base_compile.
413 if test -z "$base_compile"; then
414 base_compile="$lastarg"
415 else
416 base_compile="$base_compile $lastarg"
417 fi
418 done
419
338 case "$user_target" in
420 case $user_target in
339 set)
340 ;;
341 no)
342 # Get the name of the library object.
343 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
344 ;;
345 *)
346 $echo "$modename: you must specify a target with \`-o'" 1>&2
347 exit 1
348 ;;
349 esac
350
351 # Recognize several different file suffixes.
352 # If the user specifies -o file.o, it is replaced with file.lo
353 xform='[cCFSfmso]'
421 set)
422 ;;
423 no)
424 # Get the name of the library object.
425 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
426 ;;
427 *)
428 $echo "$modename: you must specify a target with \`-o'" 1>&2
429 exit 1
430 ;;
431 esac
432
433 # Recognize several different file suffixes.
434 # If the user specifies -o file.o, it is replaced with file.lo
435 xform='[cCFSfmso]'
354 case "$libobj" in
436 case $libobj in
355 *.ada) xform=ada ;;
356 *.adb) xform=adb ;;
357 *.ads) xform=ads ;;
358 *.asm) xform=asm ;;
359 *.c++) xform=c++ ;;
360 *.cc) xform=cc ;;
361 *.cpp) xform=cpp ;;
362 *.cxx) xform=cxx ;;
363 *.f90) xform=f90 ;;
364 *.for) xform=for ;;
365 esac
366
367 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
368
437 *.ada) xform=ada ;;
438 *.adb) xform=adb ;;
439 *.ads) xform=ads ;;
440 *.asm) xform=asm ;;
441 *.c++) xform=c++ ;;
442 *.cc) xform=cc ;;
443 *.cpp) xform=cpp ;;
444 *.cxx) xform=cxx ;;
445 *.f90) xform=f90 ;;
446 *.for) xform=for ;;
447 esac
448
449 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
450
369 case "$libobj" in
451 case $libobj in
370 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
371 *)
372 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
373 exit 1
374 ;;
375 esac
376
377 if test -z "$base_compile"; then

--- 7 unchanged lines hidden (view full) ---

385 removelist="$obj $libobj"
386 else
387 removelist="$libobj"
388 fi
389
390 $run $rm $removelist
391 trap "$run $rm $removelist; exit 1" 1 2 15
392
452 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
453 *)
454 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
455 exit 1
456 ;;
457 esac
458
459 if test -z "$base_compile"; then

--- 7 unchanged lines hidden (view full) ---

467 removelist="$obj $libobj"
468 else
469 removelist="$libobj"
470 fi
471
472 $run $rm $removelist
473 trap "$run $rm $removelist; exit 1" 1 2 15
474
475 # On Cygwin there's no "real" PIC flag so we must build both object types
476 case $host_os in
477 cygwin* | mingw* | pw32* | os2*)
478 pic_mode=default
479 ;;
480 esac
481 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
482 # non-PIC code in shared libraries is not supported
483 pic_mode=default
484 fi
485
393 # Calculate the filename of the output object if compiler does
394 # not support -o with -c
395 if test "$compiler_c_o" = no; then
486 # Calculate the filename of the output object if compiler does
487 # not support -o with -c
488 if test "$compiler_c_o" = no; then
396 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
489 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
397 lockfile="$output_obj.lock"
398 removelist="$removelist $output_obj $lockfile"
399 trap "$run $rm $removelist; exit 1" 1 2 15
400 else
401 need_locks=no
402 lockfile=
403 fi
404
405 # Lock this critical section if it is needed
406 # We use this script file to make the link, it avoids creating a new file
407 if test "$need_locks" = yes; then
490 lockfile="$output_obj.lock"
491 removelist="$removelist $output_obj $lockfile"
492 trap "$run $rm $removelist; exit 1" 1 2 15
493 else
494 need_locks=no
495 lockfile=
496 fi
497
498 # Lock this critical section if it is needed
499 # We use this script file to make the link, it avoids creating a new file
500 if test "$need_locks" = yes; then
408 until ln "$0" "$lockfile" 2>/dev/null; do
501 until $run ln "$0" "$lockfile" 2>/dev/null; do
409 $show "Waiting for $lockfile to be removed"
410 sleep 2
411 done
412 elif test "$need_locks" = warn; then
413 if test -f "$lockfile"; then
414 echo "\
415*** ERROR, $lockfile exists and contains:
416`cat $lockfile 2>/dev/null`

--- 15 unchanged lines hidden (view full) ---

432 eval srcfile=\"$fix_srcfile_path\"
433 fi
434
435 # Only build a PIC object if we are building libtool libraries.
436 if test "$build_libtool_libs" = yes; then
437 # Without this assignment, base_compile gets emptied.
438 fbsd_hideous_sh_bug=$base_compile
439
502 $show "Waiting for $lockfile to be removed"
503 sleep 2
504 done
505 elif test "$need_locks" = warn; then
506 if test -f "$lockfile"; then
507 echo "\
508*** ERROR, $lockfile exists and contains:
509`cat $lockfile 2>/dev/null`

--- 15 unchanged lines hidden (view full) ---

525 eval srcfile=\"$fix_srcfile_path\"
526 fi
527
528 # Only build a PIC object if we are building libtool libraries.
529 if test "$build_libtool_libs" = yes; then
530 # Without this assignment, base_compile gets emptied.
531 fbsd_hideous_sh_bug=$base_compile
532
440 # All platforms use -DPIC, to notify preprocessed assembler code.
441 command="$base_compile $srcfile $pic_flag -DPIC"
533 if test "$pic_mode" != no; then
534 # All platforms use -DPIC, to notify preprocessed assembler code.
535 command="$base_compile $srcfile $pic_flag -DPIC"
536 else
537 # Don't build PIC code
538 command="$base_compile $srcfile"
539 fi
442 if test "$build_old_libs" = yes; then
443 lo_libobj="$libobj"
444 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
445 if test "X$dir" = "X$libobj"; then
446 dir="$objdir"
447 else
448 dir="$dir/$objdir"
449 fi

--- 54 unchanged lines hidden (view full) ---

504 else
505 error=$?
506 $run $rm $removelist
507 exit $error
508 fi
509 fi
510
511 # If we have no pic_flag, then copy the object into place and finish.
540 if test "$build_old_libs" = yes; then
541 lo_libobj="$libobj"
542 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
543 if test "X$dir" = "X$libobj"; then
544 dir="$objdir"
545 else
546 dir="$dir/$objdir"
547 fi

--- 54 unchanged lines hidden (view full) ---

602 else
603 error=$?
604 $run $rm $removelist
605 exit $error
606 fi
607 fi
608
609 # If we have no pic_flag, then copy the object into place and finish.
512 if test -z "$pic_flag" && test "$build_old_libs" = yes; then
610 if (test -z "$pic_flag" || test "$pic_mode" != default) &&
611 test "$build_old_libs" = yes; then
513 # Rename the .lo from within objdir to obj
514 if test -f $obj; then
515 $show $rm $obj
516 $run $rm $obj
517 fi
518
519 $show "$mv $libobj $obj"
520 if $run $mv $libobj $obj; then :

--- 9 unchanged lines hidden (view full) ---

530 else
531 xdir="$xdir"
532 fi
533 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
534 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
535 # Now arrange that obj and lo_libobj become the same file
536 $show "(cd $xdir && $LN_S $baseobj $libobj)"
537 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
612 # Rename the .lo from within objdir to obj
613 if test -f $obj; then
614 $show $rm $obj
615 $run $rm $obj
616 fi
617
618 $show "$mv $libobj $obj"
619 if $run $mv $libobj $obj; then :

--- 9 unchanged lines hidden (view full) ---

629 else
630 xdir="$xdir"
631 fi
632 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
633 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
634 # Now arrange that obj and lo_libobj become the same file
635 $show "(cd $xdir && $LN_S $baseobj $libobj)"
636 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
637 # Unlock the critical section if it was locked
638 if test "$need_locks" != no; then
639 $run $rm "$lockfile"
640 fi
538 exit 0
539 else
540 error=$?
541 $run $rm $removelist
542 exit $error
543 fi
544 fi
545
546 # Allow error messages only from the first compilation.
547 suppress_output=' >/dev/null 2>&1'
548 fi
549
550 # Only build a position-dependent object if we build old libraries.
551 if test "$build_old_libs" = yes; then
641 exit 0
642 else
643 error=$?
644 $run $rm $removelist
645 exit $error
646 fi
647 fi
648
649 # Allow error messages only from the first compilation.
650 suppress_output=' >/dev/null 2>&1'
651 fi
652
653 # Only build a position-dependent object if we build old libraries.
654 if test "$build_old_libs" = yes; then
552 command="$base_compile $srcfile"
655 if test "$pic_mode" != yes; then
656 # Don't build PIC code
657 command="$base_compile $srcfile"
658 else
659 # All platforms use -DPIC, to notify preprocessed assembler code.
660 command="$base_compile $srcfile $pic_flag -DPIC"
661 fi
553 if test "$compiler_c_o" = yes; then
554 command="$command -o $obj"
555 output_obj="$obj"
556 fi
557
558 # Suppress compiler output if we already did a PIC compilation.
559 command="$command$suppress_output"
560 $run $rm "$output_obj"

--- 49 unchanged lines hidden (view full) ---

610 $run $rm $removelist
611 exit $error
612 fi
613 fi
614 fi
615
616 # Unlock the critical section if it was locked
617 if test "$need_locks" != no; then
662 if test "$compiler_c_o" = yes; then
663 command="$command -o $obj"
664 output_obj="$obj"
665 fi
666
667 # Suppress compiler output if we already did a PIC compilation.
668 command="$command$suppress_output"
669 $run $rm "$output_obj"

--- 49 unchanged lines hidden (view full) ---

719 $run $rm $removelist
720 exit $error
721 fi
722 fi
723 fi
724
725 # Unlock the critical section if it was locked
726 if test "$need_locks" != no; then
618 $rm "$lockfile"
727 $run $rm "$lockfile"
619 fi
620
621 exit 0
622 ;;
623
624 # libtool link mode
728 fi
729
730 exit 0
731 ;;
732
733 # libtool link mode
625 link)
734 link | relink)
626 modename="$modename: link"
735 modename="$modename: link"
627 case "$host" in
628 *-*-cygwin* | *-*-mingw* | *-*-os2*)
736 case $host in
737 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
629 # It is impossible to link a dll without this setting, and
630 # we shouldn't force the makefile maintainer to figure out
631 # which system we are compiling for in order to pass an extra
632 # flag for every libtool invokation.
633 # allow_undefined=no
634
635 # FIXME: Unfortunately, there are problems with the above when trying
636 # to make a dll which has undefined symbols, in which case not
637 # even a static library is built. For now, we need to specify
638 # -no-undefined on the libtool link line when we can be certain
639 # that all symbols are satisfied, otherwise we get a static library.
640 allow_undefined=yes
738 # It is impossible to link a dll without this setting, and
739 # we shouldn't force the makefile maintainer to figure out
740 # which system we are compiling for in order to pass an extra
741 # flag for every libtool invokation.
742 # allow_undefined=no
743
744 # FIXME: Unfortunately, there are problems with the above when trying
745 # to make a dll which has undefined symbols, in which case not
746 # even a static library is built. For now, we need to specify
747 # -no-undefined on the libtool link line when we can be certain
748 # that all symbols are satisfied, otherwise we get a static library.
749 allow_undefined=yes
641
642 # This is a source program that is used to create dlls on Windows
643 # Don't remove nor modify the starting and closing comments
644# /* ltdll.c starts here */
645# #define WIN32_LEAN_AND_MEAN
646# #include <windows.h>
647# #undef WIN32_LEAN_AND_MEAN
648# #include <stdio.h>
649#
650# #ifndef __CYGWIN__
651# # ifdef __CYGWIN32__
652# # define __CYGWIN__ __CYGWIN32__
653# # endif
654# #endif
655#
656# #ifdef __cplusplus
657# extern "C" {
658# #endif
659# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
660# #ifdef __cplusplus
661# }
662# #endif
663#
664# #ifdef __CYGWIN__
665# #include <cygwin/cygwin_dll.h>
666# DECLARE_CYGWIN_DLL( DllMain );
667# #endif
668# HINSTANCE __hDllInstance_base;
669#
670# BOOL APIENTRY
671# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
672# {
673# __hDllInstance_base = hInst;
674# return TRUE;
675# }
676# /* ltdll.c ends here */
677 # This is a source program that is used to create import libraries
678 # on Windows for dlls which lack them. Don't remove nor modify the
679 # starting and closing comments
680# /* impgen.c starts here */
681# /* Copyright (C) 1999 Free Software Foundation, Inc.
682#
683# This file is part of GNU libtool.
684#
685# This program is free software; you can redistribute it and/or modify
686# it under the terms of the GNU General Public License as published by
687# the Free Software Foundation; either version 2 of the License, or
688# (at your option) any later version.
689#
690# This program is distributed in the hope that it will be useful,
691# but WITHOUT ANY WARRANTY; without even the implied warranty of
692# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
693# GNU General Public License for more details.
694#
695# You should have received a copy of the GNU General Public License
696# along with this program; if not, write to the Free Software
697# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
698# */
699#
700# #include <stdio.h> /* for printf() */
701# #include <unistd.h> /* for open(), lseek(), read() */
702# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
703# #include <string.h> /* for strdup() */
704#
705# static unsigned int
706# pe_get16 (fd, offset)
707# int fd;
708# int offset;
709# {
710# unsigned char b[2];
711# lseek (fd, offset, SEEK_SET);
712# read (fd, b, 2);
713# return b[0] + (b[1]<<8);
714# }
715#
716# static unsigned int
717# pe_get32 (fd, offset)
718# int fd;
719# int offset;
720# {
721# unsigned char b[4];
722# lseek (fd, offset, SEEK_SET);
723# read (fd, b, 4);
724# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
725# }
726#
727# static unsigned int
728# pe_as32 (ptr)
729# void *ptr;
730# {
731# unsigned char *b = ptr;
732# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
733# }
734#
735# int
736# main (argc, argv)
737# int argc;
738# char *argv[];
739# {
740# int dll;
741# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
742# unsigned long export_rva, export_size, nsections, secptr, expptr;
743# unsigned long name_rvas, nexp;
744# unsigned char *expdata, *erva;
745# char *filename, *dll_name;
746#
747# filename = argv[1];
748#
749# dll = open(filename, O_RDONLY|O_BINARY);
750# if (!dll)
751# return 1;
752#
753# dll_name = filename;
754#
755# for (i=0; filename[i]; i++)
756# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
757# dll_name = filename + i +1;
758#
759# pe_header_offset = pe_get32 (dll, 0x3c);
760# opthdr_ofs = pe_header_offset + 4 + 20;
761# num_entries = pe_get32 (dll, opthdr_ofs + 92);
762#
763# if (num_entries < 1) /* no exports */
764# return 1;
765#
766# export_rva = pe_get32 (dll, opthdr_ofs + 96);
767# export_size = pe_get32 (dll, opthdr_ofs + 100);
768# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
769# secptr = (pe_header_offset + 4 + 20 +
770# pe_get16 (dll, pe_header_offset + 4 + 16));
771#
772# expptr = 0;
773# for (i = 0; i < nsections; i++)
774# {
775# char sname[8];
776# unsigned long secptr1 = secptr + 40 * i;
777# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
778# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
779# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
780# lseek(dll, secptr1, SEEK_SET);
781# read(dll, sname, 8);
782# if (vaddr <= export_rva && vaddr+vsize > export_rva)
783# {
784# expptr = fptr + (export_rva - vaddr);
785# if (export_rva + export_size > vaddr + vsize)
786# export_size = vsize - (export_rva - vaddr);
787# break;
788# }
789# }
790#
791# expdata = (unsigned char*)malloc(export_size);
792# lseek (dll, expptr, SEEK_SET);
793# read (dll, expdata, export_size);
794# erva = expdata - export_rva;
795#
796# nexp = pe_as32 (expdata+24);
797# name_rvas = pe_as32 (expdata+32);
798#
799# printf ("EXPORTS\n");
800# for (i = 0; i<nexp; i++)
801# {
802# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
803# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
804# }
805#
806# return 0;
807# }
808# /* impgen.c ends here */
809 ;;
810 *)
811 allow_undefined=yes
812 ;;
813 esac
750 ;;
751 *)
752 allow_undefined=yes
753 ;;
754 esac
755 libtool_args="$nonopt"
814 compile_command="$nonopt"
815 finalize_command="$nonopt"
816
817 compile_rpath=
818 finalize_rpath=
819 compile_shlibpath=
820 finalize_shlibpath=
821 convenience=
822 old_convenience=
823 deplibs=
756 compile_command="$nonopt"
757 finalize_command="$nonopt"
758
759 compile_rpath=
760 finalize_rpath=
761 compile_shlibpath=
762 finalize_shlibpath=
763 convenience=
764 old_convenience=
765 deplibs=
824 linkopts=
766 old_deplibs=
767 compiler_flags=
768 linker_flags=
769 dllsearchpath=
770 lib_search_path=`pwd`
825
771
826 if test -n "$shlibpath_var"; then
827 # get the directories listed in $shlibpath_var
828 eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
829 else
830 lib_search_path=
831 fi
832 # now prepend the system-specific ones
833 eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
834 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
835
836 avoid_version=no
837 dlfiles=
838 dlprefiles=
839 dlself=no
840 export_dynamic=no
841 export_symbols=
842 export_symbols_regex=
843 generated=
844 libobjs=
772 avoid_version=no
773 dlfiles=
774 dlprefiles=
775 dlself=no
776 export_dynamic=no
777 export_symbols=
778 export_symbols_regex=
779 generated=
780 libobjs=
845 link_against_libtool_libs=
846 ltlibs=
847 module=no
781 ltlibs=
782 module=no
783 no_install=no
848 objs=
849 prefer_static_libs=no
850 preload=no
851 prev=
852 prevarg=
853 release=
854 rpath=
855 xrpath=
856 perm_rpath=
857 temp_rpath=
858 thread_safe=no
859 vinfo=
860
861 # We need to know -static, to get the right output filenames.
862 for arg
863 do
784 objs=
785 prefer_static_libs=no
786 preload=no
787 prev=
788 prevarg=
789 release=
790 rpath=
791 xrpath=
792 perm_rpath=
793 temp_rpath=
794 thread_safe=no
795 vinfo=
796
797 # We need to know -static, to get the right output filenames.
798 for arg
799 do
864 case "$arg" in
800 case $arg in
865 -all-static | -static)
866 if test "X$arg" = "X-all-static"; then
867 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
868 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
869 fi
870 if test -n "$link_static_flag"; then
871 dlopen_self=$dlopen_self_static
872 fi

--- 12 unchanged lines hidden (view full) ---

885
886 # See if our shared archives depend on static archives.
887 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
888
889 # Go through the arguments, transforming them on the way.
890 while test $# -gt 0; do
891 arg="$1"
892 shift
801 -all-static | -static)
802 if test "X$arg" = "X-all-static"; then
803 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
804 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
805 fi
806 if test -n "$link_static_flag"; then
807 dlopen_self=$dlopen_self_static
808 fi

--- 12 unchanged lines hidden (view full) ---

821
822 # See if our shared archives depend on static archives.
823 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
824
825 # Go through the arguments, transforming them on the way.
826 while test $# -gt 0; do
827 arg="$1"
828 shift
829 case $arg in
830 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
831 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
832 ;;
833 *) qarg=$arg ;;
834 esac
835 libtool_args="$libtool_args $qarg"
893
894 # If the previous option needs an argument, assign it.
895 if test -n "$prev"; then
836
837 # If the previous option needs an argument, assign it.
838 if test -n "$prev"; then
896 case "$prev" in
839 case $prev in
897 output)
898 compile_command="$compile_command @OUTPUT@"
899 finalize_command="$finalize_command @OUTPUT@"
900 ;;
901 esac
902
840 output)
841 compile_command="$compile_command @OUTPUT@"
842 finalize_command="$finalize_command @OUTPUT@"
843 ;;
844 esac
845
903 case "$prev" in
846 case $prev in
904 dlfiles|dlprefiles)
905 if test "$preload" = no; then
906 # Add the symbol object into the linking commands.
907 compile_command="$compile_command @SYMFILE@"
908 finalize_command="$finalize_command @SYMFILE@"
909 preload=yes
910 fi
847 dlfiles|dlprefiles)
848 if test "$preload" = no; then
849 # Add the symbol object into the linking commands.
850 compile_command="$compile_command @SYMFILE@"
851 finalize_command="$finalize_command @SYMFILE@"
852 preload=yes
853 fi
911 case "$arg" in
854 case $arg in
912 *.la | *.lo) ;; # We handle these cases below.
913 force)
914 if test "$dlself" = no; then
915 dlself=needless
916 export_dynamic=yes
917 fi
918 prev=
919 continue

--- 12 unchanged lines hidden (view full) ---

932 ;;
933 *)
934 if test "$prev" = dlfiles; then
935 dlfiles="$dlfiles $arg"
936 else
937 dlprefiles="$dlprefiles $arg"
938 fi
939 prev=
855 *.la | *.lo) ;; # We handle these cases below.
856 force)
857 if test "$dlself" = no; then
858 dlself=needless
859 export_dynamic=yes
860 fi
861 prev=
862 continue

--- 12 unchanged lines hidden (view full) ---

875 ;;
876 *)
877 if test "$prev" = dlfiles; then
878 dlfiles="$dlfiles $arg"
879 else
880 dlprefiles="$dlprefiles $arg"
881 fi
882 prev=
883 continue
940 ;;
941 esac
942 ;;
943 expsyms)
944 export_symbols="$arg"
945 if test ! -f "$arg"; then
946 $echo "$modename: symbol file \`$arg' does not exist"
947 exit 1
948 fi
949 prev=
950 continue
951 ;;
952 expsyms_regex)
953 export_symbols_regex="$arg"
954 prev=
955 continue
956 ;;
957 release)
884 ;;
885 esac
886 ;;
887 expsyms)
888 export_symbols="$arg"
889 if test ! -f "$arg"; then
890 $echo "$modename: symbol file \`$arg' does not exist"
891 exit 1
892 fi
893 prev=
894 continue
895 ;;
896 expsyms_regex)
897 export_symbols_regex="$arg"
898 prev=
899 continue
900 ;;
901 release)
958 if test "$release_suffix" = all; then
959 release="$arg"
960 elif test "$release_suffix" = yes; then
961 release="-$arg"
902 release="-$arg"
962 fi
963 prev=
964 continue
965 ;;
966 rpath | xrpath)
967 # We need an absolute path.
903 prev=
904 continue
905 ;;
906 rpath | xrpath)
907 # We need an absolute path.
968 case "$arg" in
908 case $arg in
969 [\\/]* | [A-Za-z]:[\\/]*) ;;
970 *)
971 $echo "$modename: only absolute run-paths are allowed" 1>&2
972 exit 1
973 ;;
974 esac
975 if test "$prev" = rpath; then
976 case "$rpath " in

--- 4 unchanged lines hidden (view full) ---

981 case "$xrpath " in
982 *" $arg "*) ;;
983 *) xrpath="$xrpath $arg" ;;
984 esac
985 fi
986 prev=
987 continue
988 ;;
909 [\\/]* | [A-Za-z]:[\\/]*) ;;
910 *)
911 $echo "$modename: only absolute run-paths are allowed" 1>&2
912 exit 1
913 ;;
914 esac
915 if test "$prev" = rpath; then
916 case "$rpath " in

--- 4 unchanged lines hidden (view full) ---

921 case "$xrpath " in
922 *" $arg "*) ;;
923 *) xrpath="$xrpath $arg" ;;
924 esac
925 fi
926 prev=
927 continue
928 ;;
929 xcompiler)
930 compiler_flags="$compiler_flags $qarg"
931 prev=
932 compile_command="$compile_command $qarg"
933 finalize_command="$finalize_command $qarg"
934 continue
935 ;;
936 xlinker)
937 linker_flags="$linker_flags $qarg"
938 compiler_flags="$compiler_flags $wl$qarg"
939 prev=
940 compile_command="$compile_command $wl$qarg"
941 finalize_command="$finalize_command $wl$qarg"
942 continue
943 ;;
989 *)
990 eval "$prev=\"\$arg\""
991 prev=
992 continue
993 ;;
994 esac
944 *)
945 eval "$prev=\"\$arg\""
946 prev=
947 continue
948 ;;
949 esac
995 fi
950 fi # test -n $prev
996
997 prevarg="$arg"
998
951
952 prevarg="$arg"
953
999 case "$arg" in
954 case $arg in
1000 -all-static)
1001 if test -n "$link_static_flag"; then
1002 compile_command="$compile_command $link_static_flag"
1003 finalize_command="$finalize_command $link_static_flag"
1004 fi
1005 continue
1006 ;;
1007
1008 -allow-undefined)
1009 # FIXME: remove this flag sometime in the future.
1010 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1011 continue
1012 ;;
1013
1014 -avoid-version)
955 -all-static)
956 if test -n "$link_static_flag"; then
957 compile_command="$compile_command $link_static_flag"
958 finalize_command="$finalize_command $link_static_flag"
959 fi
960 continue
961 ;;
962
963 -allow-undefined)
964 # FIXME: remove this flag sometime in the future.
965 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
966 continue
967 ;;
968
969 -avoid-version)
1015 build_old_libs=no
1016 avoid_version=yes
1017 continue
1018 ;;
1019
1020 -dlopen)
1021 prev=dlfiles
1022 continue
1023 ;;

--- 5 unchanged lines hidden (view full) ---

1029
1030 -export-dynamic)
1031 export_dynamic=yes
1032 continue
1033 ;;
1034
1035 -export-symbols | -export-symbols-regex)
1036 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
970 avoid_version=yes
971 continue
972 ;;
973
974 -dlopen)
975 prev=dlfiles
976 continue
977 ;;

--- 5 unchanged lines hidden (view full) ---

983
984 -export-dynamic)
985 export_dynamic=yes
986 continue
987 ;;
988
989 -export-symbols | -export-symbols-regex)
990 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1037 $echo "$modename: not more than one -exported-symbols argument allowed"
991 $echo "$modename: more than one -exported-symbols argument is not allowed"
1038 exit 1
1039 fi
1040 if test "X$arg" = "X-export-symbols"; then
1041 prev=expsyms
1042 else
1043 prev=expsyms_regex
1044 fi
1045 continue
1046 ;;
1047
992 exit 1
993 fi
994 if test "X$arg" = "X-export-symbols"; then
995 prev=expsyms
996 else
997 prev=expsyms_regex
998 fi
999 continue
1000 ;;
1001
1002 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1003 # so, if we see these flags be careful not to treat them like -L
1004 -L[A-Z][A-Z]*:*)
1005 case $with_gcc/$host in
1006 no/*-*-irix* | no/*-*-nonstopux*)
1007 compile_command="$compile_command $arg"
1008 finalize_command="$finalize_command $arg"
1009 ;;
1010 esac
1011 continue
1012 ;;
1013
1048 -L*)
1049 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1050 # We need an absolute path.
1014 -L*)
1015 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1016 # We need an absolute path.
1051 case "$dir" in
1017 case $dir in
1052 [\\/]* | [A-Za-z]:[\\/]*) ;;
1053 *)
1054 absdir=`cd "$dir" && pwd`
1055 if test -z "$absdir"; then
1018 [\\/]* | [A-Za-z]:[\\/]*) ;;
1019 *)
1020 absdir=`cd "$dir" && pwd`
1021 if test -z "$absdir"; then
1056 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1057 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1058 absdir="$dir"
1022 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1023 exit 1
1059 fi
1060 dir="$absdir"
1061 ;;
1062 esac
1024 fi
1025 dir="$absdir"
1026 ;;
1027 esac
1063 case " $deplibs " in
1064 *" $arg "*) ;;
1065 *) deplibs="$deplibs $arg";;
1028 case "$deplibs " in
1029 *" -L$dir "*) ;;
1030 *)
1031 deplibs="$deplibs -L$dir"
1032 lib_search_path="$lib_search_path $dir"
1033 ;;
1066 esac
1034 esac
1067 case " $lib_search_path " in
1068 *" $dir "*) ;;
1069 *) lib_search_path="$lib_search_path $dir";;
1070 esac
1071 case "$host" in
1072 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1073 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1074 case ":$dllsearchpath:" in
1075 ::) dllsearchpath="$dllsearchdir";;
1076 *":$dllsearchdir:"*) ;;
1077 *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
1035 case $host in
1036 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1037 case :$dllsearchpath: in
1038 *":$dir:"*) ;;
1039 *) dllsearchpath="$dllsearchpath:$dir";;
1078 esac
1079 ;;
1080 esac
1040 esac
1041 ;;
1042 esac
1043 continue
1081 ;;
1082
1083 -l*)
1044 ;;
1045
1046 -l*)
1084 if test "$arg" = "-lc"; then
1085 case "$host" in
1086 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1087 # These systems don't actually have c library (as such)
1047 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1048 case $host in
1049 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1050 # These systems don't actually have a C or math library (as such)
1088 continue
1089 ;;
1051 continue
1052 ;;
1053 *-*-mingw* | *-*-os2*)
1054 # These systems don't actually have a C library (as such)
1055 test "X$arg" = "X-lc" && continue
1056 ;;
1057 *-*-openbsd* | *-*-freebsd*)
1058 # Do not include libc due to us having libc/libc_r.
1059 test "X$arg" = "X-lc" && continue
1060 ;;
1090 esac
1061 esac
1091 elif test "$arg" = "-lm"; then
1092 case "$host" in
1093 *-*-cygwin* | *-*-beos*)
1094 # These systems don't actually have math library (as such)
1062 elif test "X$arg" = "X-lc_r"; then
1063 case $host in
1064 *-*-openbsd* | *-*-freebsd4*)
1065 # Do not include libc_r directly, use -pthread flag.
1095 continue
1096 ;;
1097 esac
1098 fi
1099 deplibs="$deplibs $arg"
1066 continue
1067 ;;
1068 esac
1069 fi
1070 deplibs="$deplibs $arg"
1071 continue
1100 ;;
1101
1072 ;;
1073
1102 -?thread)
1103 deplibs="$deplibs $arg"
1104 ;;
1105
1106 -module)
1107 module=yes
1074 -module)
1075 module=yes
1076 case $host in
1077 *-*-freebsd*)
1078 # Do not build the useless static library
1079 build_old_libs=no
1080 ;;
1081 esac
1108 continue
1109 ;;
1110
1082 continue
1083 ;;
1084
1085 -no-fast-install)
1086 fast_install=no
1087 continue
1088 ;;
1089
1090 -no-install)
1091 case $host in
1092 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1093 # The PATH hackery in wrapper scripts is required on Windows
1094 # in order for the loader to find any dlls it needs.
1095 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1096 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1097 fast_install=no
1098 ;;
1099 *) no_install=yes ;;
1100 esac
1101 continue
1102 ;;
1103
1111 -no-undefined)
1112 allow_undefined=no
1113 continue
1114 ;;
1115
1116 -o) prev=output ;;
1117
1118 -release)

--- 9 unchanged lines hidden (view full) ---

1128 -R)
1129 prev=xrpath
1130 continue
1131 ;;
1132
1133 -R*)
1134 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1135 # We need an absolute path.
1104 -no-undefined)
1105 allow_undefined=no
1106 continue
1107 ;;
1108
1109 -o) prev=output ;;
1110
1111 -release)

--- 9 unchanged lines hidden (view full) ---

1121 -R)
1122 prev=xrpath
1123 continue
1124 ;;
1125
1126 -R*)
1127 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1128 # We need an absolute path.
1136 case "$dir" in
1129 case $dir in
1137 [\\/]* | [A-Za-z]:[\\/]*) ;;
1138 *)
1139 $echo "$modename: only absolute run-paths are allowed" 1>&2
1140 exit 1
1141 ;;
1142 esac
1143 case "$xrpath " in
1144 *" $dir "*) ;;
1145 *) xrpath="$xrpath $dir" ;;
1146 esac
1147 continue
1148 ;;
1149
1150 -static)
1130 [\\/]* | [A-Za-z]:[\\/]*) ;;
1131 *)
1132 $echo "$modename: only absolute run-paths are allowed" 1>&2
1133 exit 1
1134 ;;
1135 esac
1136 case "$xrpath " in
1137 *" $dir "*) ;;
1138 *) xrpath="$xrpath $dir" ;;
1139 esac
1140 continue
1141 ;;
1142
1143 -static)
1151 # If we have no pic_flag, then this is the same as -all-static.
1152 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1153 compile_command="$compile_command $link_static_flag"
1154 finalize_command="$finalize_command $link_static_flag"
1155 fi
1144 # The effects of -static are defined in a previous loop.
1145 # We used to do the same as -all-static on platforms that
1146 # didn't have a PIC flag, but the assumption that the effects
1147 # would be equivalent was wrong. It would break on at least
1148 # Digital Unix and AIX.
1156 continue
1157 ;;
1158
1159 -thread-safe)
1160 thread_safe=yes
1161 continue
1162 ;;
1163
1164 -version-info)
1165 prev=vinfo
1166 continue
1167 ;;
1168
1149 continue
1150 ;;
1151
1152 -thread-safe)
1153 thread_safe=yes
1154 continue
1155 ;;
1156
1157 -version-info)
1158 prev=vinfo
1159 continue
1160 ;;
1161
1162 -Wc,*)
1163 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1164 arg=
1165 save_ifs="$IFS"; IFS=','
1166 for flag in $args; do
1167 IFS="$save_ifs"
1168 case $flag in
1169 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1170 flag="\"$flag\""
1171 ;;
1172 esac
1173 arg="$arg $wl$flag"
1174 compiler_flags="$compiler_flags $flag"
1175 done
1176 IFS="$save_ifs"
1177 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1178 ;;
1179
1180 -Wl,*)
1181 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1182 arg=
1183 save_ifs="$IFS"; IFS=','
1184 for flag in $args; do
1185 IFS="$save_ifs"
1186 case $flag in
1187 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1188 flag="\"$flag\""
1189 ;;
1190 esac
1191 arg="$arg $wl$flag"
1192 compiler_flags="$compiler_flags $wl$flag"
1193 linker_flags="$linker_flags $flag"
1194 done
1195 IFS="$save_ifs"
1196 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1197 ;;
1198
1199 -Xcompiler)
1200 prev=xcompiler
1201 continue
1202 ;;
1203
1204 -Xlinker)
1205 prev=xlinker
1206 continue
1207 ;;
1208
1169 # Some other compiler flag.
1170 -* | +*)
1171 # Unknown arguments in both finalize_command and compile_command need
1172 # to be aesthetically quoted because they are evaled later.
1173 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1209 # Some other compiler flag.
1210 -* | +*)
1211 # Unknown arguments in both finalize_command and compile_command need
1212 # to be aesthetically quoted because they are evaled later.
1213 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1174 case "$arg" in
1175 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1214 case $arg in
1215 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1176 arg="\"$arg\""
1177 ;;
1178 esac
1179 ;;
1180
1216 arg="\"$arg\""
1217 ;;
1218 esac
1219 ;;
1220
1181 *.o | *.obj | *.a | *.lib)
1182 # A standard object.
1183 libobjs="$libobjs $arg"
1184 ;;
1185
1186 *.lo)
1187 # A library object.
1221 *.lo | *.$objext)
1222 # A library or standard object.
1188 if test "$prev" = dlfiles; then
1223 if test "$prev" = dlfiles; then
1189 dlfiles="$dlfiles $arg"
1190 if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
1224 # This file was specified with -dlopen.
1225 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1226 dlfiles="$dlfiles $arg"
1191 prev=
1192 continue
1193 else
1194 # If libtool objects are unsupported, then we need to preload.
1195 prev=dlprefiles
1196 fi
1197 fi
1198
1199 if test "$prev" = dlprefiles; then
1200 # Preload the old-style object.
1201 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1202 prev=
1227 prev=
1228 continue
1229 else
1230 # If libtool objects are unsupported, then we need to preload.
1231 prev=dlprefiles
1232 fi
1233 fi
1234
1235 if test "$prev" = dlprefiles; then
1236 # Preload the old-style object.
1237 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1238 prev=
1239 else
1240 case $arg in
1241 *.lo) libobjs="$libobjs $arg" ;;
1242 *) objs="$objs $arg" ;;
1243 esac
1203 fi
1244 fi
1204 libobjs="$libobjs $arg"
1205 ;;
1206
1245 ;;
1246
1247 *.$libext)
1248 # An archive.
1249 deplibs="$deplibs $arg"
1250 old_deplibs="$old_deplibs $arg"
1251 continue
1252 ;;
1253
1207 *.la)
1208 # A libtool-controlled library.
1209
1254 *.la)
1255 # A libtool-controlled library.
1256
1210 dlname=
1211 libdir=
1212 library_names=
1213 old_library=
1257 if test "$prev" = dlfiles; then
1258 # This library was specified with -dlopen.
1259 dlfiles="$dlfiles $arg"
1260 prev=
1261 elif test "$prev" = dlprefiles; then
1262 # The library was specified with -dlpreopen.
1263 dlprefiles="$dlprefiles $arg"
1264 prev=
1265 else
1266 deplibs="$deplibs $arg"
1267 fi
1268 continue
1269 ;;
1214
1270
1271 # Some other compiler argument.
1272 *)
1273 # Unknown arguments in both finalize_command and compile_command need
1274 # to be aesthetically quoted because they are evaled later.
1275 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1276 case $arg in
1277 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1278 arg="\"$arg\""
1279 ;;
1280 esac
1281 ;;
1282 esac # arg
1283
1284 # Now actually substitute the argument into the commands.
1285 if test -n "$arg"; then
1286 compile_command="$compile_command $arg"
1287 finalize_command="$finalize_command $arg"
1288 fi
1289 done # argument parsing loop
1290
1291 if test -n "$prev"; then
1292 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1293 $echo "$help" 1>&2
1294 exit 1
1295 fi
1296
1297 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1298 eval arg=\"$export_dynamic_flag_spec\"
1299 compile_command="$compile_command $arg"
1300 finalize_command="$finalize_command $arg"
1301 fi
1302
1303 # calculate the name of the file, without its directory
1304 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1305 libobjs_save="$libobjs"
1306
1307 if test -n "$shlibpath_var"; then
1308 # get the directories listed in $shlibpath_var
1309 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1310 else
1311 shlib_search_path=
1312 fi
1313 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1314 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1315
1316 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1317 if test "X$output_objdir" = "X$output"; then
1318 output_objdir="$objdir"
1319 else
1320 output_objdir="$output_objdir/$objdir"
1321 fi
1322 # Create the object directory.
1323 if test ! -d $output_objdir; then
1324 $show "$mkdir $output_objdir"
1325 $run $mkdir $output_objdir
1326 status=$?
1327 if test $status -ne 0 && test ! -d $output_objdir; then
1328 exit $status
1329 fi
1330 fi
1331
1332 # Determine the type of output
1333 case $output in
1334 "")
1335 $echo "$modename: you must specify an output file" 1>&2
1336 $echo "$help" 1>&2
1337 exit 1
1338 ;;
1339 *.$libext) linkmode=oldlib ;;
1340 *.lo | *.$objext) linkmode=obj ;;
1341 *.la) linkmode=lib ;;
1342 *) linkmode=prog ;; # Anything else should be a program.
1343 esac
1344
1345 specialdeplibs=
1346 libs=
1347 # Find all interdependent deplibs by searching for libraries
1348 # that are linked more than once (e.g. -la -lb -la)
1349 for deplib in $deplibs; do
1350 if test "X$duplicate_deps" = "Xyes" ; then
1351 case "$libs " in
1352 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1353 esac
1354 fi
1355 libs="$libs $deplib"
1356 done
1357 deplibs=
1358 newdependency_libs=
1359 newlib_search_path=
1360 need_relink=no # whether we're linking any uninstalled libtool libraries
1361 notinst_deplibs= # not-installed libtool libraries
1362 notinst_path= # paths that contain not-installed libtool libraries
1363 case $linkmode in
1364 lib)
1365 passes="conv link"
1366 for file in $dlfiles $dlprefiles; do
1367 case $file in
1368 *.la) ;;
1369 *)
1370 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
1371 exit 1
1372 ;;
1373 esac
1374 done
1375 ;;
1376 prog)
1377 compile_deplibs=
1378 finalize_deplibs=
1379 alldeplibs=no
1380 newdlfiles=
1381 newdlprefiles=
1382 passes="conv scan dlopen dlpreopen link"
1383 ;;
1384 *) passes="conv"
1385 ;;
1386 esac
1387 for pass in $passes; do
1388 if test $linkmode = prog; then
1389 # Determine which files to process
1390 case $pass in
1391 dlopen)
1392 libs="$dlfiles"
1393 save_deplibs="$deplibs" # Collect dlpreopened libraries
1394 deplibs=
1395 ;;
1396 dlpreopen) libs="$dlprefiles" ;;
1397 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1398 esac
1399 fi
1400 for deplib in $libs; do
1401 lib=
1402 found=no
1403 case $deplib in
1404 -l*)
1405 if test $linkmode = oldlib && test $linkmode = obj; then
1406 $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
1407 continue
1408 fi
1409 if test $pass = conv; then
1410 deplibs="$deplib $deplibs"
1411 continue
1412 fi
1413 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1414 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
1415 # Search the libtool library
1416 lib="$searchdir/lib${name}.la"
1417 if test -f "$lib"; then
1418 found=yes
1419 break
1420 fi
1421 done
1422 if test "$found" != yes; then
1423 # deplib doesn't seem to be a libtool library
1424 if test "$linkmode,$pass" = "prog,link"; then
1425 compile_deplibs="$deplib $compile_deplibs"
1426 finalize_deplibs="$deplib $finalize_deplibs"
1427 else
1428 deplibs="$deplib $deplibs"
1429 test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
1430 fi
1431 continue
1432 fi
1433 ;; # -l
1434 -L*)
1435 case $linkmode in
1436 lib)
1437 deplibs="$deplib $deplibs"
1438 test $pass = conv && continue
1439 newdependency_libs="$deplib $newdependency_libs"
1440 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1441 ;;
1442 prog)
1443 if test $pass = conv; then
1444 deplibs="$deplib $deplibs"
1445 continue
1446 fi
1447 if test $pass = scan; then
1448 deplibs="$deplib $deplibs"
1449 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1450 else
1451 compile_deplibs="$deplib $compile_deplibs"
1452 finalize_deplibs="$deplib $finalize_deplibs"
1453 fi
1454 ;;
1455 *)
1456 $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
1457 ;;
1458 esac # linkmode
1459 continue
1460 ;; # -L
1461 -R*)
1462 if test $pass = link; then
1463 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1464 # Make sure the xrpath contains only unique directories.
1465 case "$xrpath " in
1466 *" $dir "*) ;;
1467 *) xrpath="$xrpath $dir" ;;
1468 esac
1469 fi
1470 deplibs="$deplib $deplibs"
1471 continue
1472 ;;
1473 *.la) lib="$deplib" ;;
1474 *.$libext)
1475 if test $pass = conv; then
1476 deplibs="$deplib $deplibs"
1477 continue
1478 fi
1479 case $linkmode in
1480 lib)
1481 if test "$deplibs_check_method" != pass_all; then
1482 echo
1483 echo "*** Warning: Trying to link with static lib archive $deplib."
1484 echo "*** I have the capability to make that library automatically link in when"
1485 echo "*** you link to this library. But I can only do this if you have a"
1486 echo "*** shared version of the library, which you do not appear to have"
1487 echo "*** because the file extensions .$libext of this argument makes me believe"
1488 echo "*** that it is just a static archive that I should not used here."
1489 else
1490 echo
1491 echo "*** Warning: Linking the shared library $output against the"
1492 echo "*** static library $deplib is not portable!"
1493 deplibs="$deplib $deplibs"
1494 fi
1495 continue
1496 ;;
1497 prog)
1498 if test $pass != link; then
1499 deplibs="$deplib $deplibs"
1500 else
1501 compile_deplibs="$deplib $compile_deplibs"
1502 finalize_deplibs="$deplib $finalize_deplibs"
1503 fi
1504 continue
1505 ;;
1506 esac # linkmode
1507 ;; # *.$libext
1508 *.lo | *.$objext)
1509 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1510 # If there is no dlopen support or we're linking statically,
1511 # we need to preload.
1512 newdlprefiles="$newdlprefiles $deplib"
1513 compile_deplibs="$deplib $compile_deplibs"
1514 finalize_deplibs="$deplib $finalize_deplibs"
1515 else
1516 newdlfiles="$newdlfiles $deplib"
1517 fi
1518 continue
1519 ;;
1520 %DEPLIBS%)
1521 alldeplibs=yes
1522 continue
1523 ;;
1524 esac # case $deplib
1525 if test $found = yes || test -f "$lib"; then :
1526 else
1527 $echo "$modename: cannot find the library \`$lib'" 1>&2
1528 exit 1
1529 fi
1530
1215 # Check to see that this really is a libtool archive.
1531 # Check to see that this really is a libtool archive.
1216 if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1532 if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1217 else
1533 else
1218 $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
1534 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1219 exit 1
1220 fi
1221
1535 exit 1
1536 fi
1537
1538 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1539 test "X$ladir" = "X$lib" && ladir="."
1540
1541 dlname=
1542 dlopen=
1543 dlpreopen=
1544 libdir=
1545 library_names=
1546 old_library=
1222 # If the library was installed with an old release of libtool,
1223 # it will not redefine variable installed.
1224 installed=yes
1225
1226 # Read the .la file
1547 # If the library was installed with an old release of libtool,
1548 # it will not redefine variable installed.
1549 installed=yes
1550
1551 # Read the .la file
1227 # If there is no directory component, then add one.
1228 case "$arg" in
1229 */* | *\\*) . $arg ;;
1230 *) . ./$arg ;;
1552 case $lib in
1553 */* | *\\*) . $lib ;;
1554 *) . ./$lib ;;
1231 esac
1232
1555 esac
1556
1557 if test "$linkmode,$pass" = "lib,link" ||
1558 test "$linkmode,$pass" = "prog,scan" ||
1559 { test $linkmode = oldlib && test $linkmode = obj; }; then
1560 # Add dl[pre]opened files of deplib
1561 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
1562 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
1563 fi
1564
1565 if test $pass = conv; then
1566 # Only check for convenience libraries
1567 deplibs="$lib $deplibs"
1568 if test -z "$libdir"; then
1569 if test -z "$old_library"; then
1570 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1571 exit 1
1572 fi
1573 # It is a libtool convenience library, so add in its objects.
1574 convenience="$convenience $ladir/$objdir/$old_library"
1575 old_convenience="$old_convenience $ladir/$objdir/$old_library"
1576 tmp_libs=
1577 for deplib in $dependency_libs; do
1578 deplibs="$deplib $deplibs"
1579 if test "X$duplicate_deps" = "Xyes" ; then
1580 case "$tmp_libs " in
1581 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1582 esac
1583 fi
1584 tmp_libs="$tmp_libs $deplib"
1585 done
1586 elif test $linkmode != prog && test $linkmode != lib; then
1587 $echo "$modename: \`$lib' is not a convenience library" 1>&2
1588 exit 1
1589 fi
1590 continue
1591 fi # $pass = conv
1592
1233 # Get the name of the library we link against.
1234 linklib=
1235 for l in $old_library $library_names; do
1236 linklib="$l"
1237 done
1593 # Get the name of the library we link against.
1594 linklib=
1595 for l in $old_library $library_names; do
1596 linklib="$l"
1597 done
1238
1239 if test -z "$linklib"; then
1598 if test -z "$linklib"; then
1240 $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
1599 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1241 exit 1
1242 fi
1243
1600 exit 1
1601 fi
1602
1244 # Find the relevant object directory and library name.
1245 name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
1246
1247 if test "X$installed" = Xyes; then
1248 dir="$libdir"
1249 else
1250 dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1251 if test "X$dir" = "X$arg"; then
1252 dir="$objdir"
1603 # This library was specified with -dlopen.
1604 if test $pass = dlopen; then
1605 if test -z "$libdir"; then
1606 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
1607 exit 1
1608 fi
1609 if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1610 # If there is no dlname, no dlopen support or we're linking
1611 # statically, we need to preload.
1612 dlprefiles="$dlprefiles $lib"
1253 else
1613 else
1254 dir="$dir/$objdir"
1614 newdlfiles="$newdlfiles $lib"
1255 fi
1615 fi
1256 fi
1257
1258 if test -n "$dependency_libs"; then
1259 # Extract -R and -L from dependency_libs
1260 temp_deplibs=
1261 for deplib in $dependency_libs; do
1262 case "$deplib" in
1263 -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1264 case " $rpath $xrpath " in
1265 *" $temp_xrpath "*) ;;
1266 *) xrpath="$xrpath $temp_xrpath";;
1267 esac;;
1268 -L*) case "$compile_command $temp_deplibs " in
1269 *" $deplib "*) ;;
1270 *) temp_deplibs="$temp_deplibs $deplib";;
1271 esac
1272 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1273 case " $lib_search_path " in
1274 *" $temp_dir "*) ;;
1275 *) lib_search_path="$lib_search_path $temp_dir";;
1276 esac
1277 ;;
1278 *) temp_deplibs="$temp_deplibs $deplib";;
1279 esac
1280 done
1281 dependency_libs="$temp_deplibs"
1282 fi
1283
1284 if test -z "$libdir"; then
1285 # It is a libtool convenience library, so add in its objects.
1286 convenience="$convenience $dir/$old_library"
1287 old_convenience="$old_convenience $dir/$old_library"
1288 deplibs="$deplibs$dependency_libs"
1289 compile_command="$compile_command $dir/$old_library$dependency_libs"
1290 finalize_command="$finalize_command $dir/$old_library$dependency_libs"
1291 continue
1616 continue
1292 fi
1617 fi # $pass = dlopen
1293
1618
1294 # This library was specified with -dlopen.
1295 if test "$prev" = dlfiles; then
1296 dlfiles="$dlfiles $arg"
1297 if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
1298 # If there is no dlname, no dlopen support or we're linking statically,
1299 # we need to preload.
1300 prev=dlprefiles
1619 # We need an absolute path.
1620 case $ladir in
1621 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1622 *)
1623 abs_ladir=`cd "$ladir" && pwd`
1624 if test -z "$abs_ladir"; then
1625 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1626 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1627 abs_ladir="$ladir"
1628 fi
1629 ;;
1630 esac
1631 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1632
1633 # Find the relevant object directory and library name.
1634 if test "X$installed" = Xyes; then
1635 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1636 $echo "$modename: warning: library \`$lib' was moved." 1>&2
1637 dir="$ladir"
1638 absdir="$abs_ladir"
1639 libdir="$abs_ladir"
1301 else
1640 else
1302 # We should not create a dependency on this library, but we
1303 # may need any libraries it requires.
1304 compile_command="$compile_command$dependency_libs"
1305 finalize_command="$finalize_command$dependency_libs"
1306 prev=
1307 continue
1641 dir="$libdir"
1642 absdir="$libdir"
1308 fi
1643 fi
1309 fi
1644 else
1645 dir="$ladir/$objdir"
1646 absdir="$abs_ladir/$objdir"
1647 # Remove this search path later
1648 notinst_path="$notinst_path $abs_ladir"
1649 fi # $installed = yes
1650 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1310
1651
1311 # The library was specified with -dlpreopen.
1312 if test "$prev" = dlprefiles; then
1652 # This library was specified with -dlpreopen.
1653 if test $pass = dlpreopen; then
1654 if test -z "$libdir"; then
1655 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
1656 exit 1
1657 fi
1313 # Prefer using a static library (so that no silly _DYNAMIC symbols
1314 # are required to link).
1315 if test -n "$old_library"; then
1658 # Prefer using a static library (so that no silly _DYNAMIC symbols
1659 # are required to link).
1660 if test -n "$old_library"; then
1316 dlprefiles="$dlprefiles $dir/$old_library"
1661 newdlprefiles="$newdlprefiles $dir/$old_library"
1662 # Otherwise, use the dlname, so that lt_dlopen finds it.
1663 elif test -n "$dlname"; then
1664 newdlprefiles="$newdlprefiles $dir/$dlname"
1317 else
1665 else
1318 dlprefiles="$dlprefiles $dir/$linklib"
1666 newdlprefiles="$newdlprefiles $dir/$linklib"
1319 fi
1667 fi
1320 prev=
1668 fi # $pass = dlpreopen
1669
1670 if test -z "$libdir"; then
1671 # Link the convenience library
1672 if test $linkmode = lib; then
1673 deplibs="$dir/$old_library $deplibs"
1674 elif test "$linkmode,$pass" = "prog,link"; then
1675 compile_deplibs="$dir/$old_library $compile_deplibs"
1676 finalize_deplibs="$dir/$old_library $finalize_deplibs"
1677 else
1678 deplibs="$lib $deplibs"
1679 fi
1680 continue
1321 fi
1322
1681 fi
1682
1323 if test -n "$library_names" &&
1324 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1325 link_against_libtool_libs="$link_against_libtool_libs $arg"
1326 if test -n "$shlibpath_var"; then
1327 # Make sure the rpath contains only unique directories.
1328 case "$temp_rpath " in
1329 *" $dir "*) ;;
1330 *) temp_rpath="$temp_rpath $dir" ;;
1331 esac
1683 if test $linkmode = prog && test $pass != link; then
1684 newlib_search_path="$newlib_search_path $ladir"
1685 deplibs="$lib $deplibs"
1686
1687 linkalldeplibs=no
1688 if test "$link_all_deplibs" != no || test -z "$library_names" ||
1689 test "$build_libtool_libs" = no; then
1690 linkalldeplibs=yes
1332 fi
1333
1691 fi
1692
1334 # We need an absolute path.
1335 case "$dir" in
1336 [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
1337 *)
1338 absdir=`cd "$dir" && pwd`
1339 if test -z "$absdir"; then
1340 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1341 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1342 absdir="$dir"
1693 tmp_libs=
1694 for deplib in $dependency_libs; do
1695 case $deplib in
1696 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1697 esac
1698 # Need to link against all dependency_libs?
1699 if test $linkalldeplibs = yes; then
1700 deplibs="$deplib $deplibs"
1701 else
1702 # Need to hardcode shared library paths
1703 # or/and link against static libraries
1704 newdependency_libs="$deplib $newdependency_libs"
1343 fi
1705 fi
1344 ;;
1345 esac
1346
1347 # This is the magic to use -rpath.
1348 # Skip directories that are in the system default run-time
1349 # search path, unless they have been requested with -R.
1350 case " $sys_lib_dlsearch_path " in
1351 *" $absdir "*) ;;
1352 *)
1353 case "$compile_rpath " in
1706 if test "X$duplicate_deps" = "Xyes" ; then
1707 case "$tmp_libs " in
1708 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1709 esac
1710 fi
1711 tmp_libs="$tmp_libs $deplib"
1712 done # for deplib
1713 continue
1714 fi # $linkmode = prog...
1715
1716 link_static=no # Whether the deplib will be linked statically
1717 if test -n "$library_names" &&
1718 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1719 # Link against this shared library
1720
1721 if test "$linkmode,$pass" = "prog,link" ||
1722 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
1723 # Hardcode the library path.
1724 # Skip directories that are in the system default run-time
1725 # search path.
1726 case " $sys_lib_dlsearch_path " in
1354 *" $absdir "*) ;;
1727 *" $absdir "*) ;;
1355 *) compile_rpath="$compile_rpath $absdir"
1728 *)
1729 case "$compile_rpath " in
1730 *" $absdir "*) ;;
1731 *) compile_rpath="$compile_rpath $absdir"
1732 esac
1733 ;;
1356 esac
1734 esac
1357 ;;
1358 esac
1359
1360 case " $sys_lib_dlsearch_path " in
1361 *" $libdir "*) ;;
1362 *)
1363 case "$finalize_rpath " in
1735 case " $sys_lib_dlsearch_path " in
1364 *" $libdir "*) ;;
1736 *" $libdir "*) ;;
1365 *) finalize_rpath="$finalize_rpath $libdir"
1737 *)
1738 case "$finalize_rpath " in
1739 *" $libdir "*) ;;
1740 *) finalize_rpath="$finalize_rpath $libdir"
1741 esac
1742 ;;
1366 esac
1743 esac
1367 ;;
1368 esac
1744 if test $linkmode = prog; then
1745 # We need to hardcode the library path
1746 if test -n "$shlibpath_var"; then
1747 # Make sure the rpath contains only unique directories.
1748 case "$temp_rpath " in
1749 *" $dir "*) ;;
1750 *" $absdir "*) ;;
1751 *) temp_rpath="$temp_rpath $dir" ;;
1752 esac
1753 fi
1754 fi
1755 fi # $linkmode,$pass = prog,link...
1369
1756
1370 lib_linked=yes
1371 case "$hardcode_action" in
1372 immediate | unsupported)
1373 if test "$hardcode_direct" = no; then
1374 compile_command="$compile_command $dir/$linklib"
1375 deplibs="$deplibs $dir/$linklib"
1376 case "$host" in
1377 *-*-cygwin* | *-*-mingw* | *-*-os2*)
1378 dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
1379 if test -n "$dllsearchpath"; then
1380 dllsearchpath="$dllsearchpath:$dllsearchdir"
1381 else
1382 dllsearchpath="$dllsearchdir"
1383 fi
1757 if test "$alldeplibs" = yes &&
1758 { test "$deplibs_check_method" = pass_all ||
1759 { test "$build_libtool_libs" = yes &&
1760 test -n "$library_names"; }; }; then
1761 # We only need to search for static libraries
1762 continue
1763 fi
1764
1765 if test "$installed" = no; then
1766 notinst_deplibs="$notinst_deplibs $lib"
1767 need_relink=yes
1768 fi
1769
1770 if test -n "$old_archive_from_expsyms_cmds"; then
1771 # figure out the soname
1772 set dummy $library_names
1773 realname="$2"
1774 shift; shift
1775 libname=`eval \\$echo \"$libname_spec\"`
1776 # use dlname if we got it. it's perfectly good, no?
1777 if test -n "$dlname"; then
1778 soname="$dlname"
1779 elif test -n "$soname_spec"; then
1780 # bleh windows
1781 case $host in
1782 *cygwin*)
1783 major=`expr $current - $age`
1784 versuffix="-$major"
1384 ;;
1385 esac
1785 ;;
1786 esac
1386 elif test "$hardcode_minus_L" = no; then
1387 case "$host" in
1388 *-*-sunos*)
1389 compile_shlibpath="$compile_shlibpath$dir:"
1390 ;;
1787 eval soname=\"$soname_spec\"
1788 else
1789 soname="$realname"
1790 fi
1791
1792 # Make a new name for the extract_expsyms_cmds to use
1793 soroot="$soname"
1794 soname=`echo $soroot | ${SED} -e 's/^.*\///'`
1795 newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
1796
1797 # If the library has no export list, then create one now
1798 if test -f "$output_objdir/$soname-def"; then :
1799 else
1800 $show "extracting exported symbol list from \`$soname'"
1801 save_ifs="$IFS"; IFS='~'
1802 eval cmds=\"$extract_expsyms_cmds\"
1803 for cmd in $cmds; do
1804 IFS="$save_ifs"
1805 $show "$cmd"
1806 $run eval "$cmd" || exit $?
1807 done
1808 IFS="$save_ifs"
1809 fi
1810
1811 # Create $newlib
1812 if test -f "$output_objdir/$newlib"; then :; else
1813 $show "generating import library for \`$soname'"
1814 save_ifs="$IFS"; IFS='~'
1815 eval cmds=\"$old_archive_from_expsyms_cmds\"
1816 for cmd in $cmds; do
1817 IFS="$save_ifs"
1818 $show "$cmd"
1819 $run eval "$cmd" || exit $?
1820 done
1821 IFS="$save_ifs"
1822 fi
1823 # make sure the library variables are pointing to the new library
1824 dir=$output_objdir
1825 linklib=$newlib
1826 fi # test -n $old_archive_from_expsyms_cmds
1827
1828 if test $linkmode = prog || test "$mode" != relink; then
1829 add_shlibpath=
1830 add_dir=
1831 add=
1832 lib_linked=yes
1833 case $hardcode_action in
1834 immediate | unsupported)
1835 if test "$hardcode_direct" = no; then
1836 add="$dir/$linklib"
1837 elif test "$hardcode_minus_L" = no; then
1838 case $host in
1839 *-*-sunos*) add_shlibpath="$dir" ;;
1840 esac
1841 add_dir="-L$dir"
1842 add="-l$name"
1843 elif test "$hardcode_shlibpath_var" = no; then
1844 add_shlibpath="$dir"
1845 add="-l$name"
1846 else
1847 lib_linked=no
1848 fi
1849 ;;
1850 relink)
1851 if test "$hardcode_direct" = yes; then
1852 add="$dir/$linklib"
1853 elif test "$hardcode_minus_L" = yes; then
1854 add_dir="-L$dir"
1855 add="-l$name"
1856 elif test "$hardcode_shlibpath_var" = yes; then
1857 add_shlibpath="$dir"
1858 add="-l$name"
1859 else
1860 lib_linked=no
1861 fi
1862 ;;
1863 *) lib_linked=no ;;
1864 esac
1865
1866 if test "$lib_linked" != yes; then
1867 $echo "$modename: configuration error: unsupported hardcode properties"
1868 exit 1
1869 fi
1870
1871 if test -n "$add_shlibpath"; then
1872 case :$compile_shlibpath: in
1873 *":$add_shlibpath:"*) ;;
1874 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
1391 esac
1875 esac
1392 case "$compile_command " in
1393 *" -L$dir "*) ;;
1394 *) compile_command="$compile_command -L$dir";;
1395 esac
1396 compile_command="$compile_command -l$name"
1397 deplibs="$deplibs -L$dir -l$name"
1398 elif test "$hardcode_shlibpath_var" = no; then
1399 case ":$compile_shlibpath:" in
1400 *":$dir:"*) ;;
1401 *) compile_shlibpath="$compile_shlibpath$dir:";;
1402 esac
1403 compile_command="$compile_command -l$name"
1404 deplibs="$deplibs -l$name"
1876 fi
1877 if test $linkmode = prog; then
1878 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
1879 test -n "$add" && compile_deplibs="$add $compile_deplibs"
1405 else
1880 else
1406 lib_linked=no
1881 test -n "$add_dir" && deplibs="$add_dir $deplibs"
1882 test -n "$add" && deplibs="$add $deplibs"
1883 if test "$hardcode_direct" != yes && \
1884 test "$hardcode_minus_L" != yes && \
1885 test "$hardcode_shlibpath_var" = yes; then
1886 case :$finalize_shlibpath: in
1887 *":$libdir:"*) ;;
1888 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
1889 esac
1890 fi
1407 fi
1891 fi
1408 ;;
1892 fi
1409
1893
1410 relink)
1894 if test $linkmode = prog || test "$mode" = relink; then
1895 add_shlibpath=
1896 add_dir=
1897 add=
1898 # Finalize command for both is simple: just hardcode it.
1411 if test "$hardcode_direct" = yes; then
1899 if test "$hardcode_direct" = yes; then
1412 compile_command="$compile_command $absdir/$linklib"
1413 deplibs="$deplibs $absdir/$linklib"
1900 add="$libdir/$linklib"
1414 elif test "$hardcode_minus_L" = yes; then
1901 elif test "$hardcode_minus_L" = yes; then
1415 case "$compile_command " in
1416 *" -L$absdir "*) ;;
1417 *) compile_command="$compile_command -L$absdir";;
1418 esac
1419 compile_command="$compile_command -l$name"
1420 deplibs="$deplibs -L$absdir -l$name"
1902 add_dir="-L$libdir"
1903 add="-l$name"
1421 elif test "$hardcode_shlibpath_var" = yes; then
1904 elif test "$hardcode_shlibpath_var" = yes; then
1422 case ":$compile_shlibpath:" in
1423 *":$absdir:"*) ;;
1424 *) compile_shlibpath="$compile_shlibpath$absdir:";;
1905 case :$finalize_shlibpath: in
1906 *":$libdir:"*) ;;
1907 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
1425 esac
1908 esac
1426 compile_command="$compile_command -l$name"
1427 deplibs="$deplibs -l$name"
1909 add="-l$name"
1428 else
1910 else
1429 lib_linked=no
1911 # We cannot seem to hardcode it, guess we'll fake it.
1912 add_dir="-L$libdir"
1913 add="-l$name"
1430 fi
1914 fi
1431 ;;
1432
1915
1433 *)
1434 lib_linked=no
1435 ;;
1436 esac
1437
1438 if test "$lib_linked" != yes; then
1439 $echo "$modename: configuration error: unsupported hardcode properties"
1440 exit 1
1916 if test $linkmode = prog; then
1917 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
1918 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
1919 else
1920 test -n "$add_dir" && deplibs="$add_dir $deplibs"
1921 test -n "$add" && deplibs="$add $deplibs"
1922 fi
1441 fi
1923 fi
1442
1443 # Finalize command for both is simple: just hardcode it.
1444 if test "$hardcode_direct" = yes; then
1445 finalize_command="$finalize_command $libdir/$linklib"
1446 elif test "$hardcode_minus_L" = yes; then
1447 case "$finalize_command " in
1448 *" -L$libdir "*) ;;
1449 *) finalize_command="$finalize_command -L$libdir";;
1450 esac
1451 finalize_command="$finalize_command -l$name"
1452 elif test "$hardcode_shlibpath_var" = yes; then
1453 case ":$finalize_shlibpath:" in
1454 *":$libdir:"*) ;;
1455 *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
1456 esac
1457 finalize_command="$finalize_command -l$name"
1458 else
1459 # We cannot seem to hardcode it, guess we'll fake it.
1460 case "$finalize_command " in
1461 *" -L$dir "*) ;;
1462 *) finalize_command="$finalize_command -L$libdir";;
1463 esac
1464 finalize_command="$finalize_command -l$name"
1924 elif test $linkmode = prog; then
1925 if test "$alldeplibs" = yes &&
1926 { test "$deplibs_check_method" = pass_all ||
1927 { test "$build_libtool_libs" = yes &&
1928 test -n "$library_names"; }; }; then
1929 # We only need to search for static libraries
1930 continue
1465 fi
1931 fi
1466 else
1467 # Transform directly to old archives if we don't build new libraries.
1468 if test -n "$pic_flag" && test -z "$old_library"; then
1469 $echo "$modename: cannot find static library for \`$arg'" 1>&2
1470 exit 1
1471 fi
1472
1932
1933 # Try to link the static library
1473 # Here we assume that one of hardcode_direct or hardcode_minus_L
1474 # is not unsupported. This is valid on all known static and
1475 # shared platforms.
1476 if test "$hardcode_direct" != unsupported; then
1477 test -n "$old_library" && linklib="$old_library"
1934 # Here we assume that one of hardcode_direct or hardcode_minus_L
1935 # is not unsupported. This is valid on all known static and
1936 # shared platforms.
1937 if test "$hardcode_direct" != unsupported; then
1938 test -n "$old_library" && linklib="$old_library"
1478 compile_command="$compile_command $dir/$linklib"
1479 finalize_command="$finalize_command $dir/$linklib"
1939 compile_deplibs="$dir/$linklib $compile_deplibs"
1940 finalize_deplibs="$dir/$linklib $finalize_deplibs"
1480 else
1941 else
1481 case "$compile_command " in
1482 *" -L$dir "*) ;;
1483 *) compile_command="$compile_command -L$dir";;
1484 esac
1485 compile_command="$compile_command -l$name"
1486 case "$finalize_command " in
1487 *" -L$dir "*) ;;
1488 *) finalize_command="$finalize_command -L$dir";;
1489 esac
1490 finalize_command="$finalize_command -l$name"
1942 compile_deplibs="-l$name -L$dir $compile_deplibs"
1943 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
1491 fi
1944 fi
1492 fi
1945 elif test "$build_libtool_libs" = yes; then
1946 # Not a shared library
1947 if test "$deplibs_check_method" != pass_all; then
1948 # We're trying link a shared library against a static one
1949 # but the system doesn't support it.
1493
1950
1494 # Add in any libraries that this one depends upon.
1495 compile_command="$compile_command$dependency_libs"
1496 finalize_command="$finalize_command$dependency_libs"
1497 continue
1498 ;;
1951 # Just print a warning and add the library to dependency_libs so
1952 # that the program can be linked against the static library.
1953 echo
1954 echo "*** Warning: This system can not link to static lib archive $lib."
1955 echo "*** I have the capability to make that library automatically link in when"
1956 echo "*** you link to this library. But I can only do this if you have a"
1957 echo "*** shared version of the library, which you do not appear to have."
1958 if test "$module" = yes; then
1959 echo "*** But as you try to build a module library, libtool will still create "
1960 echo "*** a static module, that should work as long as the dlopening application"
1961 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
1962 if test -z "$global_symbol_pipe"; then
1963 echo
1964 echo "*** However, this would only work if libtool was able to extract symbol"
1965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
1966 echo "*** not find such a program. So, this module is probably useless."
1967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
1968 fi
1969 if test "$build_old_libs" = no; then
1970 build_libtool_libs=module
1971 build_old_libs=yes
1972 else
1973 build_libtool_libs=no
1974 fi
1975 fi
1976 else
1977 convenience="$convenience $dir/$old_library"
1978 old_convenience="$old_convenience $dir/$old_library"
1979 deplibs="$dir/$old_library $deplibs"
1980 link_static=yes
1981 fi
1982 fi # link shared/static library?
1499
1983
1500 # Some other compiler argument.
1501 *)
1502 # Unknown arguments in both finalize_command and compile_command need
1503 # to be aesthetically quoted because they are evaled later.
1504 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1505 case "$arg" in
1506 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
1507 arg="\"$arg\""
1508 ;;
1509 esac
1510 ;;
1511 esac
1984 if test $linkmode = lib; then
1985 if test -n "$dependency_libs" &&
1986 { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
1987 test $link_static = yes; }; then
1988 # Extract -R from dependency_libs
1989 temp_deplibs=
1990 for libdir in $dependency_libs; do
1991 case $libdir in
1992 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
1993 case " $xrpath " in
1994 *" $temp_xrpath "*) ;;
1995 *) xrpath="$xrpath $temp_xrpath";;
1996 esac;;
1997 *) temp_deplibs="$temp_deplibs $libdir";;
1998 esac
1999 done
2000 dependency_libs="$temp_deplibs"
2001 fi
1512
2002
1513 # Now actually substitute the argument into the commands.
1514 if test -n "$arg"; then
1515 compile_command="$compile_command $arg"
1516 finalize_command="$finalize_command $arg"
1517 fi
1518 done
2003 newlib_search_path="$newlib_search_path $absdir"
2004 # Link against this library
2005 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2006 # ... and its dependency_libs
2007 tmp_libs=
2008 for deplib in $dependency_libs; do
2009 newdependency_libs="$deplib $newdependency_libs"
2010 if test "X$duplicate_deps" = "Xyes" ; then
2011 case "$tmp_libs " in
2012 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2013 esac
2014 fi
2015 tmp_libs="$tmp_libs $deplib"
2016 done
1519
2017
1520 if test -n "$prev"; then
1521 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1522 $echo "$help" 1>&2
1523 exit 1
1524 fi
1525
1526 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1527 eval arg=\"$export_dynamic_flag_spec\"
1528 compile_command="$compile_command $arg"
1529 finalize_command="$finalize_command $arg"
1530 fi
1531
1532 oldlibs=
1533 # calculate the name of the file, without its directory
1534 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1535 libobjs_save="$libobjs"
1536
1537 case "$output" in
1538 "")
1539 $echo "$modename: you must specify an output file" 1>&2
1540 $echo "$help" 1>&2
1541 exit 1
1542 ;;
1543
1544 *.a | *.lib)
1545 if test -n "$link_against_libtool_libs"; then
1546 $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
1547 exit 1
2018 if test $link_all_deplibs != no; then
2019 # Add the search paths of all dependency libraries
2020 for deplib in $dependency_libs; do
2021 case $deplib in
2022 -L*) path="$deplib" ;;
2023 *.la)
2024 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2025 test "X$dir" = "X$deplib" && dir="."
2026 # We need an absolute path.
2027 case $dir in
2028 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2029 *)
2030 absdir=`cd "$dir" && pwd`
2031 if test -z "$absdir"; then
2032 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2033 absdir="$dir"
2034 fi
2035 ;;
2036 esac
2037 if grep "^installed=no" $deplib > /dev/null; then
2038 path="-L$absdir/$objdir"
2039 else
2040 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2041 if test -z "$libdir"; then
2042 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2043 exit 1
2044 fi
2045 if test "$absdir" != "$libdir"; then
2046 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2047 fi
2048 path="-L$absdir"
2049 fi
2050 ;;
2051 *) continue ;;
2052 esac
2053 case " $deplibs " in
2054 *" $path "*) ;;
2055 *) deplibs="$deplibs $path" ;;
2056 esac
2057 done
2058 fi # link_all_deplibs != no
2059 fi # linkmode = lib
2060 done # for deplib in $libs
2061 if test $pass = dlpreopen; then
2062 # Link the dlpreopened libraries before other libraries
2063 for deplib in $save_deplibs; do
2064 deplibs="$deplib $deplibs"
2065 done
1548 fi
2066 fi
2067 if test $pass != dlopen; then
2068 test $pass != scan && dependency_libs="$newdependency_libs"
2069 if test $pass != conv; then
2070 # Make sure lib_search_path contains only unique directories.
2071 lib_search_path=
2072 for dir in $newlib_search_path; do
2073 case "$lib_search_path " in
2074 *" $dir "*) ;;
2075 *) lib_search_path="$lib_search_path $dir" ;;
2076 esac
2077 done
2078 newlib_search_path=
2079 fi
1549
2080
1550 if test -n "$deplibs"; then
1551 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2081 if test "$linkmode,$pass" != "prog,link"; then
2082 vars="deplibs"
2083 else
2084 vars="compile_deplibs finalize_deplibs"
2085 fi
2086 for var in $vars dependency_libs; do
2087 # Add libraries to $var in reverse order
2088 eval tmp_libs=\"\$$var\"
2089 new_libs=
2090 for deplib in $tmp_libs; do
2091 case $deplib in
2092 -L*) new_libs="$deplib $new_libs" ;;
2093 *)
2094 case " $specialdeplibs " in
2095 *" $deplib "*) new_libs="$deplib $new_libs" ;;
2096 *)
2097 case " $new_libs " in
2098 *" $deplib "*) ;;
2099 *) new_libs="$deplib $new_libs" ;;
2100 esac
2101 ;;
2102 esac
2103 ;;
2104 esac
2105 done
2106 tmp_libs=
2107 for deplib in $new_libs; do
2108 case $deplib in
2109 -L*)
2110 case " $tmp_libs " in
2111 *" $deplib "*) ;;
2112 *) tmp_libs="$tmp_libs $deplib" ;;
2113 esac
2114 ;;
2115 *) tmp_libs="$tmp_libs $deplib" ;;
2116 esac
2117 done
2118 eval $var=\"$tmp_libs\"
2119 done # for var
1552 fi
2120 fi
2121 if test "$pass" = "conv" &&
2122 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
2123 libs="$deplibs" # reset libs
2124 deplibs=
2125 fi
2126 done # for pass
2127 if test $linkmode = prog; then
2128 dlfiles="$newdlfiles"
2129 dlprefiles="$newdlprefiles"
2130 fi
1553
2131
2132 case $linkmode in
2133 oldlib)
1554 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1555 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
1556 fi
1557
1558 if test -n "$rpath"; then
1559 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
1560 fi
1561

--- 11 unchanged lines hidden (view full) ---

1573
1574 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1575 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
1576 fi
1577
1578 # Now set the variables for building old libraries.
1579 build_libtool_libs=no
1580 oldlibs="$output"
2134 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2135 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2136 fi
2137
2138 if test -n "$rpath"; then
2139 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2140 fi
2141

--- 11 unchanged lines hidden (view full) ---

2153
2154 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2155 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2156 fi
2157
2158 # Now set the variables for building old libraries.
2159 build_libtool_libs=no
2160 oldlibs="$output"
2161 objs="$objs$old_deplibs"
1581 ;;
1582
2162 ;;
2163
1583 *.la)
2164 lib)
1584 # Make sure we only generate libraries of the form `libNAME.la'.
2165 # Make sure we only generate libraries of the form `libNAME.la'.
1585 case "$outputname" in
2166 case $outputname in
1586 lib*)
1587 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1588 eval libname=\"$libname_spec\"
1589 ;;
1590 *)
1591 if test "$module" = no; then
1592 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
1593 $echo "$help" 1>&2

--- 4 unchanged lines hidden (view full) ---

1598 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1599 eval libname=\"$libname_spec\"
1600 else
1601 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
1602 fi
1603 ;;
1604 esac
1605
2167 lib*)
2168 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2169 eval libname=\"$libname_spec\"
2170 ;;
2171 *)
2172 if test "$module" = no; then
2173 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2174 $echo "$help" 1>&2

--- 4 unchanged lines hidden (view full) ---

2179 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2180 eval libname=\"$libname_spec\"
2181 else
2182 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2183 fi
2184 ;;
2185 esac
2186
1606 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1607 if test "X$output_objdir" = "X$output"; then
1608 output_objdir="$objdir"
1609 else
1610 output_objdir="$output_objdir/$objdir"
1611 fi
1612
1613 if test -n "$objs"; then
2187 if test -n "$objs"; then
1614 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
1615 exit 1
2188 if test "$deplibs_check_method" != pass_all; then
2189 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2190 exit 1
2191 else
2192 echo
2193 echo "*** Warning: Linking the shared library $output against the non-libtool"
2194 echo "*** objects $objs is not portable!"
2195 libobjs="$libobjs $objs"
2196 fi
1616 fi
1617
2197 fi
2198
1618 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
1619 $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
2199 if test "$dlself" != no; then
2200 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
1620 fi
1621
1622 set dummy $rpath
1623 if test $# -gt 2; then
1624 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
1625 fi
1626 install_libdir="$2"
1627
1628 oldlibs=
1629 if test -z "$rpath"; then
1630 if test "$build_libtool_libs" = yes; then
1631 # Building a libtool convenience library.
1632 libext=al
1633 oldlibs="$output_objdir/$libname.$libext $oldlibs"
1634 build_libtool_libs=convenience
1635 build_old_libs=yes
1636 fi
2201 fi
2202
2203 set dummy $rpath
2204 if test $# -gt 2; then
2205 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2206 fi
2207 install_libdir="$2"
2208
2209 oldlibs=
2210 if test -z "$rpath"; then
2211 if test "$build_libtool_libs" = yes; then
2212 # Building a libtool convenience library.
2213 libext=al
2214 oldlibs="$output_objdir/$libname.$libext $oldlibs"
2215 build_libtool_libs=convenience
2216 build_old_libs=yes
2217 fi
1637 dependency_libs="$deplibs"
1638
1639 if test -n "$vinfo"; then
1640 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
1641 fi
1642
1643 if test -n "$release"; then
1644 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
1645 fi
1646 else
1647
1648 # Parse the version information argument.
2218
2219 if test -n "$vinfo"; then
2220 $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2221 fi
2222
2223 if test -n "$release"; then
2224 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2225 fi
2226 else
2227
2228 # Parse the version information argument.
1649 IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
2229 save_ifs="$IFS"; IFS=':'
1650 set dummy $vinfo 0 0 0
1651 IFS="$save_ifs"
1652
1653 if test -n "$8"; then
1654 $echo "$modename: too many parameters to \`-version-info'" 1>&2
1655 $echo "$help" 1>&2
1656 exit 1
1657 fi
1658
1659 current="$2"
1660 revision="$3"
1661 age="$4"
1662
1663 # Check that each of the things are valid numbers.
2230 set dummy $vinfo 0 0 0
2231 IFS="$save_ifs"
2232
2233 if test -n "$8"; then
2234 $echo "$modename: too many parameters to \`-version-info'" 1>&2
2235 $echo "$help" 1>&2
2236 exit 1
2237 fi
2238
2239 current="$2"
2240 revision="$3"
2241 age="$4"
2242
2243 # Check that each of the things are valid numbers.
1664 case "$current" in
1665 0 | [1-9] | [1-9][0-9]*) ;;
2244 case $current in
2245 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
1666 *)
1667 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
1668 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1669 exit 1
1670 ;;
1671 esac
1672
2246 *)
2247 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2248 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2249 exit 1
2250 ;;
2251 esac
2252
1673 case "$revision" in
1674 0 | [1-9] | [1-9][0-9]*) ;;
2253 case $revision in
2254 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
1675 *)
1676 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
1677 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1678 exit 1
1679 ;;
1680 esac
1681
2255 *)
2256 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2257 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2258 exit 1
2259 ;;
2260 esac
2261
1682 case "$age" in
1683 0 | [1-9] | [1-9][0-9]*) ;;
2262 case $age in
2263 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
1684 *)
1685 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
1686 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1687 exit 1
1688 ;;
1689 esac
1690
1691 if test $age -gt $current; then
1692 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
1693 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
1694 exit 1
1695 fi
1696
1697 # Calculate the version variables.
1698 major=
1699 versuffix=
1700 verstring=
2264 *)
2265 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2266 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2267 exit 1
2268 ;;
2269 esac
2270
2271 if test $age -gt $current; then
2272 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2273 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
2274 exit 1
2275 fi
2276
2277 # Calculate the version variables.
2278 major=
2279 versuffix=
2280 verstring=
1701 case "$version_type" in
2281 case $version_type in
1702 none) ;;
1703
2282 none) ;;
2283
1704 irix)
2284 darwin)
2285 # Like Linux, but with the current version available in
2286 # verstring for coding it into the library header
2287 major=.`expr $current - $age`
2288 versuffix="$major.$age.$revision"
2289 # Darwin ld doesn't like 0 for these options...
2290 minor_current=`expr $current + 1`
2291 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
2292 ;;
2293
2294 freebsd-aout)
2295 major=".$current"
2296 versuffix=".$current.$revision";
2297 ;;
2298
2299 freebsd-elf)
2300 major=".$current"
2301 versuffix=".$current";
2302 ;;
2303
2304 irix | nonstopux)
1705 major=`expr $current - $age + 1`
2305 major=`expr $current - $age + 1`
1706 versuffix="$major.$revision"
1707 verstring="sgi$major.$revision"
1708
2306
2307 case $version_type in
2308 nonstopux) verstring_prefix=nonstopux ;;
2309 *) verstring_prefix=sgi ;;
2310 esac
2311 verstring="$verstring_prefix$major.$revision"
2312
1709 # Add in all the interfaces that we are compatible with.
1710 loop=$revision
1711 while test $loop != 0; do
1712 iface=`expr $revision - $loop`
1713 loop=`expr $loop - 1`
2313 # Add in all the interfaces that we are compatible with.
2314 loop=$revision
2315 while test $loop != 0; do
2316 iface=`expr $revision - $loop`
2317 loop=`expr $loop - 1`
1714 verstring="sgi$major.$iface:$verstring"
2318 verstring="$verstring_prefix$major.$iface:$verstring"
1715 done
2319 done
2320
2321 # Before this point, $major must not contain `.'.
2322 major=.$major
2323 versuffix="$major.$revision"
1716 ;;
1717
1718 linux)
1719 major=.`expr $current - $age`
1720 versuffix="$major.$age.$revision"
1721 ;;
1722
1723 osf)
2324 ;;
2325
2326 linux)
2327 major=.`expr $current - $age`
2328 versuffix="$major.$age.$revision"
2329 ;;
2330
2331 osf)
1724 major=`expr $current - $age`
2332 major=.`expr $current - $age`
1725 versuffix=".$current.$age.$revision"
1726 verstring="$current.$age.$revision"
1727
1728 # Add in all the interfaces that we are compatible with.
1729 loop=$age
1730 while test $loop != 0; do
1731 iface=`expr $current - $loop`
1732 loop=`expr $loop - 1`

--- 4 unchanged lines hidden (view full) ---

1737 verstring="$verstring:${current}.0"
1738 ;;
1739
1740 sunos)
1741 major=".$current"
1742 versuffix=".$current.$revision"
1743 ;;
1744
2333 versuffix=".$current.$age.$revision"
2334 verstring="$current.$age.$revision"
2335
2336 # Add in all the interfaces that we are compatible with.
2337 loop=$age
2338 while test $loop != 0; do
2339 iface=`expr $current - $loop`
2340 loop=`expr $loop - 1`

--- 4 unchanged lines hidden (view full) ---

2345 verstring="$verstring:${current}.0"
2346 ;;
2347
2348 sunos)
2349 major=".$current"
2350 versuffix=".$current.$revision"
2351 ;;
2352
1745 freebsd-aout)
1746 major=".$current"
1747 versuffix=".$current.$revision";
1748 ;;
1749
1750 freebsd-elf)
1751 major=".$current"
1752 versuffix=".$current";
1753 ;;
1754
1755 windows)
2353 windows)
1756 # Like Linux, but with '-' rather than '.', since we only
1757 # want one extension on Windows 95.
2354 # Use '-' rather than '.', since we only want one
2355 # extension on DOS 8.3 filesystems.
1758 major=`expr $current - $age`
2356 major=`expr $current - $age`
1759 versuffix="-$major-$age-$revision"
2357 versuffix="-$major"
1760 ;;
1761
1762 *)
1763 $echo "$modename: unknown library version type \`$version_type'" 1>&2
1764 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
1765 exit 1
1766 ;;
1767 esac
1768
1769 # Clear the version info if we defaulted, and they specified a release.
1770 if test -z "$vinfo" && test -n "$release"; then
1771 major=
1772 verstring="0.0"
2358 ;;
2359
2360 *)
2361 $echo "$modename: unknown library version type \`$version_type'" 1>&2
2362 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2363 exit 1
2364 ;;
2365 esac
2366
2367 # Clear the version info if we defaulted, and they specified a release.
2368 if test -z "$vinfo" && test -n "$release"; then
2369 major=
2370 verstring="0.0"
2371 case $version_type in
2372 darwin)
2373 # we can't check for "0.0" in archive_cmds due to quoting
2374 # problems, so we reset it completely
2375 verstring=""
2376 ;;
2377 *)
2378 verstring="0.0"
2379 ;;
2380 esac
1773 if test "$need_version" = no; then
1774 versuffix=
1775 else
1776 versuffix=".0.0"
1777 fi
1778 fi
1779
1780 # Remove version info from name if versioning should be avoided
1781 if test "$avoid_version" = yes && test "$need_version" = no; then
1782 major=
1783 versuffix=
1784 verstring=""
1785 fi
2381 if test "$need_version" = no; then
2382 versuffix=
2383 else
2384 versuffix=".0.0"
2385 fi
2386 fi
2387
2388 # Remove version info from name if versioning should be avoided
2389 if test "$avoid_version" = yes && test "$need_version" = no; then
2390 major=
2391 versuffix=
2392 verstring=""
2393 fi
1786
2394
1787 # Check to see if the archive will have undefined symbols.
1788 if test "$allow_undefined" = yes; then
1789 if test "$allow_undefined_flag" = unsupported; then
1790 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
1791 build_libtool_libs=no
1792 build_old_libs=yes
1793 fi
1794 else
1795 # Don't allow undefined symbols.
1796 allow_undefined_flag="$no_undefined_flag"
1797 fi
2395 # Check to see if the archive will have undefined symbols.
2396 if test "$allow_undefined" = yes; then
2397 if test "$allow_undefined_flag" = unsupported; then
2398 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2399 build_libtool_libs=no
2400 build_old_libs=yes
2401 fi
2402 else
2403 # Don't allow undefined symbols.
2404 allow_undefined_flag="$no_undefined_flag"
2405 fi
2406 fi
1798
2407
1799 dependency_libs="$deplibs"
1800 case "$host" in
1801 *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1802 # these systems don't actually have a c library (as such)!
1803 ;;
1804 *-*-rhapsody*)
1805 # rhapsody is a little odd...
1806 deplibs="$deplibs -framework System"
1807 ;;
1808 *-*-freebsd*)
1809 # FreeBSD doesn't need this...
1810 ;;
1811 *)
1812 # Add libc to deplibs on all other systems.
1813 deplibs="$deplibs -lc"
1814 ;;
1815 esac
2408 if test "$mode" != relink; then
2409 # Remove our outputs.
2410 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2411 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
1816 fi
1817
2412 fi
2413
1818 if test -n "$rpath$xrpath"; then
2414 # Now set the variables for building old libraries.
2415 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
2416 oldlibs="$oldlibs $output_objdir/$libname.$libext"
2417
2418 # Transform .lo files to .o files.
2419 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2420 fi
2421
2422 # Eliminate all temporary directories.
2423 for path in $notinst_path; do
2424 lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
2425 deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
2426 dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
2427 done
2428
2429 if test -n "$xrpath"; then
1819 # If the user specified any rpath flags, then add them.
2430 # If the user specified any rpath flags, then add them.
1820 for libdir in $rpath $xrpath; do
1821 # This is the magic to use -rpath.
1822 case "$compile_rpath " in
1823 *" $libdir "*) ;;
1824 *) compile_rpath="$compile_rpath $libdir" ;;
1825 esac
2431 temp_xrpath=
2432 for libdir in $xrpath; do
2433 temp_xrpath="$temp_xrpath -R$libdir"
1826 case "$finalize_rpath " in
1827 *" $libdir "*) ;;
1828 *) finalize_rpath="$finalize_rpath $libdir" ;;
1829 esac
1830 done
2434 case "$finalize_rpath " in
2435 *" $libdir "*) ;;
2436 *) finalize_rpath="$finalize_rpath $libdir" ;;
2437 esac
2438 done
2439 if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
2440 dependency_libs="$temp_xrpath $dependency_libs"
2441 fi
1831 fi
1832
2442 fi
2443
1833 # Now hardcode the library paths
1834 rpath=
1835 hardcode_libdirs=
1836 for libdir in $compile_rpath; do
1837 if test -n "$hardcode_libdir_flag_spec"; then
1838 if test -n "$hardcode_libdir_separator"; then
1839 if test -z "$hardcode_libdirs"; then
1840 hardcode_libdirs="$libdir"
1841 else
1842 # Just accumulate the unique libdirs.
1843 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
1844 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
1845 ;;
1846 *)
1847 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
1848 ;;
1849 esac
1850 fi
1851 else
1852 eval flag=\"$hardcode_libdir_flag_spec\"
1853 rpath="$rpath $flag"
1854 fi
1855 elif test -n "$runpath_var"; then
1856 case "$perm_rpath " in
1857 *" $libdir "*) ;;
1858 *) perm_rpath="$perm_rpath $libdir" ;;
1859 esac
1860 fi
2444 # Make sure dlfiles contains only unique files that won't be dlpreopened
2445 old_dlfiles="$dlfiles"
2446 dlfiles=
2447 for lib in $old_dlfiles; do
2448 case " $dlprefiles $dlfiles " in
2449 *" $lib "*) ;;
2450 *) dlfiles="$dlfiles $lib" ;;
2451 esac
1861 done
2452 done
1862 # Substitute the hardcoded libdirs into the rpath.
1863 if test -n "$hardcode_libdir_separator" &&
1864 test -n "$hardcode_libdirs"; then
1865 libdir="$hardcode_libdirs"
1866 eval rpath=\" $hardcode_libdir_flag_spec\"
1867 fi
1868 compile_rpath="$rpath"
1869
2453
1870 rpath=
1871 hardcode_libdirs=
1872 for libdir in $finalize_rpath; do
1873 if test -n "$hardcode_libdir_flag_spec"; then
1874 if test -n "$hardcode_libdir_separator"; then
1875 if test -z "$hardcode_libdirs"; then
1876 hardcode_libdirs="$libdir"
1877 else
1878 # Just accumulate the unique libdirs.
1879 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
1880 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
1881 ;;
1882 *)
1883 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
1884 ;;
1885 esac
2454 # Make sure dlprefiles contains only unique files
2455 old_dlprefiles="$dlprefiles"
2456 dlprefiles=
2457 for lib in $old_dlprefiles; do
2458 case "$dlprefiles " in
2459 *" $lib "*) ;;
2460 *) dlprefiles="$dlprefiles $lib" ;;
2461 esac
2462 done
2463
2464 if test "$build_libtool_libs" = yes; then
2465 if test -n "$rpath"; then
2466 case $host in
2467 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
2468 # these systems don't actually have a c library (as such)!
2469 ;;
2470 *-*-rhapsody* | *-*-darwin1.[012])
2471 # Rhapsody C library is in the System framework
2472 deplibs="$deplibs -framework System"
2473 ;;
2474 *-*-netbsd*)
2475 # Don't link with libc until the a.out ld.so is fixed.
2476 ;;
2477 *-*-openbsd* | *-*-freebsd*)
2478 # Do not include libc due to us having libc/libc_r.
2479 ;;
2480 *)
2481 # Add libc to deplibs on all other systems if necessary.
2482 if test $build_libtool_need_lc = "yes"; then
2483 deplibs="$deplibs -lc"
1886 fi
2484 fi
1887 else
1888 eval flag=\"$hardcode_libdir_flag_spec\"
1889 rpath="$rpath $flag"
1890 fi
1891 elif test -n "$runpath_var"; then
1892 case "$finalize_perm_rpath " in
1893 *" $libdir "*) ;;
1894 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
2485 ;;
1895 esac
1896 fi
2486 esac
2487 fi
1897 done
1898 # Substitute the hardcoded libdirs into the rpath.
1899 if test -n "$hardcode_libdir_separator" &&
1900 test -n "$hardcode_libdirs"; then
1901 libdir="$hardcode_libdirs"
1902 eval rpath=\" $hardcode_libdir_flag_spec\"
1903 fi
1904 finalize_rpath="$rpath"
1905
2488
1906 # Create the output directory, or remove our outputs if we need to.
1907 if test -d $output_objdir; then
1908 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
1909 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
1910 else
1911 $show "$mkdir $output_objdir"
1912 $run $mkdir $output_objdir
1913 status=$?
1914 if test $status -ne 0 && test ! -d $output_objdir; then
1915 exit $status
1916 fi
1917 fi
1918
1919 # Now set the variables for building old libraries.
1920 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
1921 if test "$release_suffix" = all; then
1922 oldlibs="$oldlibs $output_objdir/$libname$release.$libext"
1923 else
1924 oldlibs="$oldlibs $output_objdir/$libname.$libext"
1925 fi
1926
1927 # Transform .lo files to .o files.
1928 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
1929 fi
1930
1931 if test "$build_libtool_libs" = yes; then
1932 # Transform deplibs into only deplibs that can be linked in shared.
1933 name_save=$name
1934 libname_save=$libname
1935 release_save=$release
1936 versuffix_save=$versuffix
1937 major_save=$major
1938 # I'm not sure if I'm treating the release correctly. I think
1939 # release should show up in the -l (ie -lgmp5) so we don't want to
1940 # add it in twice. Is that correct?
1941 release=""
1942 versuffix=""
1943 major=""
1944 newdeplibs=
1945 droppeddeps=no
2489 # Transform deplibs into only deplibs that can be linked in shared.
2490 name_save=$name
2491 libname_save=$libname
2492 release_save=$release
2493 versuffix_save=$versuffix
2494 major_save=$major
2495 # I'm not sure if I'm treating the release correctly. I think
2496 # release should show up in the -l (ie -lgmp5) so we don't want to
2497 # add it in twice. Is that correct?
2498 release=""
2499 versuffix=""
2500 major=""
2501 newdeplibs=
2502 droppeddeps=no
1946 case "$deplibs_check_method" in
2503 case $deplibs_check_method in
1947 pass_all)
1948 # Don't check for shared/static. Everything works.
1949 # This might be a little naive. We might want to check
1950 # whether the library exists or not. But this is on
1951 # osf3 & osf4 and I'm not really sure... Just
1952 # implementing what was already the behaviour.
1953 newdeplibs=$deplibs
1954 ;;

--- 8 unchanged lines hidden (view full) ---

1963EOF
1964 $rm conftest
1965 $CC -o conftest conftest.c $deplibs
1966 if test $? -eq 0 ; then
1967 ldd_output=`ldd conftest`
1968 for i in $deplibs; do
1969 name="`expr $i : '-l\(.*\)'`"
1970 # If $name is empty we are operating on a -L argument.
2504 pass_all)
2505 # Don't check for shared/static. Everything works.
2506 # This might be a little naive. We might want to check
2507 # whether the library exists or not. But this is on
2508 # osf3 & osf4 and I'm not really sure... Just
2509 # implementing what was already the behaviour.
2510 newdeplibs=$deplibs
2511 ;;

--- 8 unchanged lines hidden (view full) ---

2520EOF
2521 $rm conftest
2522 $CC -o conftest conftest.c $deplibs
2523 if test $? -eq 0 ; then
2524 ldd_output=`ldd conftest`
2525 for i in $deplibs; do
2526 name="`expr $i : '-l\(.*\)'`"
2527 # If $name is empty we are operating on a -L argument.
1971 if test "$name" != "" ; then
2528 if test -n "$name" && test "$name" != "0"; then
1972 libname=`eval \\$echo \"$libname_spec\"`
1973 deplib_matches=`eval \\$echo \"$library_names_spec\"`
1974 set dummy $deplib_matches
1975 deplib_match=$2
1976 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
1977 newdeplibs="$newdeplibs $i"
1978 else
1979 droppeddeps=yes
1980 echo
2529 libname=`eval \\$echo \"$libname_spec\"`
2530 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2531 set dummy $deplib_matches
2532 deplib_match=$2
2533 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2534 newdeplibs="$newdeplibs $i"
2535 else
2536 droppeddeps=yes
2537 echo
1981 echo "*** Warning: This library needs some functionality provided by $i."
2538 echo "*** Warning: dynamic linker does not accept needed library $i."
1982 echo "*** I have the capability to make that library automatically link in when"
1983 echo "*** you link to this library. But I can only do this if you have a"
2539 echo "*** I have the capability to make that library automatically link in when"
2540 echo "*** you link to this library. But I can only do this if you have a"
1984 echo "*** shared version of the library, which you do not appear to have."
2541 echo "*** shared version of the library, which I believe you do not have"
2542 echo "*** because a test_compile did reveal that the linker did not use it for"
2543 echo "*** its dynamic dependency list that programs get resolved with at runtime."
1985 fi
1986 else
1987 newdeplibs="$newdeplibs $i"
1988 fi
1989 done
1990 else
2544 fi
2545 else
2546 newdeplibs="$newdeplibs $i"
2547 fi
2548 done
2549 else
1991 # Error occured in the first compile. Let's try to salvage the situation:
1992 # Compile a seperate program for each library.
2550 # Error occured in the first compile. Let's try to salvage
2551 # the situation: Compile a separate program for each library.
1993 for i in $deplibs; do
1994 name="`expr $i : '-l\(.*\)'`"
1995 # If $name is empty we are operating on a -L argument.
2552 for i in $deplibs; do
2553 name="`expr $i : '-l\(.*\)'`"
2554 # If $name is empty we are operating on a -L argument.
1996 if test "$name" != "" ; then
2555 if test -n "$name" && test "$name" != "0"; then
1997 $rm conftest
1998 $CC -o conftest conftest.c $i
1999 # Did it work?
2000 if test $? -eq 0 ; then
2001 ldd_output=`ldd conftest`
2002 libname=`eval \\$echo \"$libname_spec\"`
2003 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2004 set dummy $deplib_matches
2005 deplib_match=$2
2006 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2007 newdeplibs="$newdeplibs $i"
2008 else
2009 droppeddeps=yes
2010 echo
2556 $rm conftest
2557 $CC -o conftest conftest.c $i
2558 # Did it work?
2559 if test $? -eq 0 ; then
2560 ldd_output=`ldd conftest`
2561 libname=`eval \\$echo \"$libname_spec\"`
2562 deplib_matches=`eval \\$echo \"$library_names_spec\"`
2563 set dummy $deplib_matches
2564 deplib_match=$2
2565 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2566 newdeplibs="$newdeplibs $i"
2567 else
2568 droppeddeps=yes
2569 echo
2011 echo "*** Warning: This library needs some functionality provided by $i."
2570 echo "*** Warning: dynamic linker does not accept needed library $i."
2012 echo "*** I have the capability to make that library automatically link in when"
2013 echo "*** you link to this library. But I can only do this if you have a"
2571 echo "*** I have the capability to make that library automatically link in when"
2572 echo "*** you link to this library. But I can only do this if you have a"
2014 echo "*** shared version of the library, which you do not appear to have."
2573 echo "*** shared version of the library, which you do not appear to have"
2574 echo "*** because a test_compile did reveal that the linker did not use this one"
2575 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
2015 fi
2016 else
2017 droppeddeps=yes
2018 echo
2019 echo "*** Warning! Library $i is needed by this library but I was not able to"
2020 echo "*** make it link in! You will probably need to install it or some"
2021 echo "*** library that it depends on before this library will be fully"
2022 echo "*** functional. Installing it before continuing would be even better."
2023 fi
2024 else
2025 newdeplibs="$newdeplibs $i"
2026 fi
2027 done
2028 fi
2029 ;;
2030 file_magic*)
2031 set dummy $deplibs_check_method
2576 fi
2577 else
2578 droppeddeps=yes
2579 echo
2580 echo "*** Warning! Library $i is needed by this library but I was not able to"
2581 echo "*** make it link in! You will probably need to install it or some"
2582 echo "*** library that it depends on before this library will be fully"
2583 echo "*** functional. Installing it before continuing would be even better."
2584 fi
2585 else
2586 newdeplibs="$newdeplibs $i"
2587 fi
2588 done
2589 fi
2590 ;;
2591 file_magic*)
2592 set dummy $deplibs_check_method
2032 file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
2593 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2033 for a_deplib in $deplibs; do
2034 name="`expr $a_deplib : '-l\(.*\)'`"
2035 # If $name is empty we are operating on a -L argument.
2594 for a_deplib in $deplibs; do
2595 name="`expr $a_deplib : '-l\(.*\)'`"
2596 # If $name is empty we are operating on a -L argument.
2036 if test "$name" != "" ; then
2597 if test -n "$name" && test "$name" != "0"; then
2037 libname=`eval \\$echo \"$libname_spec\"`
2598 libname=`eval \\$echo \"$libname_spec\"`
2038 for i in $lib_search_path; do
2599 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2039 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2040 for potent_lib in $potential_libs; do
2041 # Follow soft links.
2042 if ls -lLd "$potent_lib" 2>/dev/null \
2043 | grep " -> " >/dev/null; then
2600 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2601 for potent_lib in $potential_libs; do
2602 # Follow soft links.
2603 if ls -lLd "$potent_lib" 2>/dev/null \
2604 | grep " -> " >/dev/null; then
2044 continue
2605 continue
2045 fi
2046 # The statement above tries to avoid entering an
2047 # endless loop below, in case of cyclic links.
2048 # We might still enter an endless loop, since a link
2049 # loop can be closed while we follow links,
2050 # but so what?
2051 potlib="$potent_lib"
2052 while test -h "$potlib" 2>/dev/null; do
2606 fi
2607 # The statement above tries to avoid entering an
2608 # endless loop below, in case of cyclic links.
2609 # We might still enter an endless loop, since a link
2610 # loop can be closed while we follow links,
2611 # but so what?
2612 potlib="$potent_lib"
2613 while test -h "$potlib" 2>/dev/null; do
2053 potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2054 case "$potliblink" in
2614 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
2615 case $potliblink in
2055 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2056 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2057 esac
2058 done
2059 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2616 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2617 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2618 esac
2619 done
2620 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2060 | sed 10q \
2621 | ${SED} 10q \
2061 | egrep "$file_magic_regex" > /dev/null; then
2062 newdeplibs="$newdeplibs $a_deplib"
2063 a_deplib=""
2064 break 2
2065 fi
2066 done
2067 done
2068 if test -n "$a_deplib" ; then
2069 droppeddeps=yes
2070 echo
2622 | egrep "$file_magic_regex" > /dev/null; then
2623 newdeplibs="$newdeplibs $a_deplib"
2624 a_deplib=""
2625 break 2
2626 fi
2627 done
2628 done
2629 if test -n "$a_deplib" ; then
2630 droppeddeps=yes
2631 echo
2071 echo "*** Warning: This library needs some functionality provided by $a_deplib."
2632 echo "*** Warning: linker path does not have real file for library $a_deplib."
2072 echo "*** I have the capability to make that library automatically link in when"
2073 echo "*** you link to this library. But I can only do this if you have a"
2633 echo "*** I have the capability to make that library automatically link in when"
2634 echo "*** you link to this library. But I can only do this if you have a"
2074 echo "*** shared version of the library, which you do not appear to have."
2635 echo "*** shared version of the library, which you do not appear to have"
2636 echo "*** because I did check the linker path looking for a file starting"
2637 if test -z "$potlib" ; then
2638 echo "*** with $libname but no candidates were found. (...for file magic test)"
2639 else
2640 echo "*** with $libname and none of the candidates passed a file format test"
2641 echo "*** using a file magic. Last file checked: $potlib"
2642 fi
2075 fi
2076 else
2077 # Add a -L argument.
2078 newdeplibs="$newdeplibs $a_deplib"
2079 fi
2080 done # Gone through all deplibs.
2081 ;;
2643 fi
2644 else
2645 # Add a -L argument.
2646 newdeplibs="$newdeplibs $a_deplib"
2647 fi
2648 done # Gone through all deplibs.
2649 ;;
2650 match_pattern*)
2651 set dummy $deplibs_check_method
2652 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2653 for a_deplib in $deplibs; do
2654 name="`expr $a_deplib : '-l\(.*\)'`"
2655 # If $name is empty we are operating on a -L argument.
2656 if test -n "$name" && test "$name" != "0"; then
2657 libname=`eval \\$echo \"$libname_spec\"`
2658 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
2659 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2660 for potent_lib in $potential_libs; do
2661 potlib="$potent_lib" # see symlink-check below in file_magic test
2662 if eval echo \"$potent_lib\" 2>/dev/null \
2663 | ${SED} 10q \
2664 | egrep "$match_pattern_regex" > /dev/null; then
2665 newdeplibs="$newdeplibs $a_deplib"
2666 a_deplib=""
2667 break 2
2668 fi
2669 done
2670 done
2671 if test -n "$a_deplib" ; then
2672 droppeddeps=yes
2673 echo
2674 echo "*** Warning: linker path does not have real file for library $a_deplib."
2675 echo "*** I have the capability to make that library automatically link in when"
2676 echo "*** you link to this library. But I can only do this if you have a"
2677 echo "*** shared version of the library, which you do not appear to have"
2678 echo "*** because I did check the linker path looking for a file starting"
2679 if test -z "$potlib" ; then
2680 echo "*** with $libname but no candidates were found. (...for regex pattern test)"
2681 else
2682 echo "*** with $libname and none of the candidates passed a file format test"
2683 echo "*** using a regex pattern. Last file checked: $potlib"
2684 fi
2685 fi
2686 else
2687 # Add a -L argument.
2688 newdeplibs="$newdeplibs $a_deplib"
2689 fi
2690 done # Gone through all deplibs.
2691 ;;
2082 none | unknown | *)
2083 newdeplibs=""
2084 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2085 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2086 grep . >/dev/null; then
2087 echo
2088 if test "X$deplibs_check_method" = "Xnone"; then
2089 echo "*** Warning: inter-library dependencies are not supported in this platform."

--- 6 unchanged lines hidden (view full) ---

2096 ;;
2097 esac
2098 versuffix=$versuffix_save
2099 major=$major_save
2100 release=$release_save
2101 libname=$libname_save
2102 name=$name_save
2103
2692 none | unknown | *)
2693 newdeplibs=""
2694 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2695 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2696 grep . >/dev/null; then
2697 echo
2698 if test "X$deplibs_check_method" = "Xnone"; then
2699 echo "*** Warning: inter-library dependencies are not supported in this platform."

--- 6 unchanged lines hidden (view full) ---

2706 ;;
2707 esac
2708 versuffix=$versuffix_save
2709 major=$major_save
2710 release=$release_save
2711 libname=$libname_save
2712 name=$name_save
2713
2714 case $host in
2715 *-*-rhapsody* | *-*-darwin1.[012])
2716 # On Rhapsody replace the C library is the System framework
2717 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
2718 ;;
2719 esac
2720
2104 if test "$droppeddeps" = yes; then
2105 if test "$module" = yes; then
2106 echo
2107 echo "*** Warning: libtool could not satisfy all declared inter-library"
2108 echo "*** dependencies of module $libname. Therefore, libtool will create"
2109 echo "*** a static module, that should work as long as the dlopening"
2110 echo "*** application is linked with the -dlopen flag."
2111 if test -z "$global_symbol_pipe"; then
2112 echo
2113 echo "*** However, this would only work if libtool was able to extract symbol"
2114 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2115 echo "*** not find such a program. So, this module is probably useless."
2116 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2117 fi
2118 if test "$build_old_libs" = no; then
2721 if test "$droppeddeps" = yes; then
2722 if test "$module" = yes; then
2723 echo
2724 echo "*** Warning: libtool could not satisfy all declared inter-library"
2725 echo "*** dependencies of module $libname. Therefore, libtool will create"
2726 echo "*** a static module, that should work as long as the dlopening"
2727 echo "*** application is linked with the -dlopen flag."
2728 if test -z "$global_symbol_pipe"; then
2729 echo
2730 echo "*** However, this would only work if libtool was able to extract symbol"
2731 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2732 echo "*** not find such a program. So, this module is probably useless."
2733 echo "*** \`nm' from GNU binutils and a full rebuild may help."
2734 fi
2735 if test "$build_old_libs" = no; then
2119 if test "$release_suffix" = all; then
2120 oldlibs="$output_objdir/$libname$release.$libext"
2121 else
2122 oldlibs="$output_objdir/$libname.$libext"
2736 oldlibs="$output_objdir/$libname.$libext"
2123 fi
2124 build_libtool_libs=module
2125 build_old_libs=yes
2126 else
2127 build_libtool_libs=no
2128 fi
2129 else
2130 echo "*** The inter-library dependencies that have been dropped here will be"
2131 echo "*** automatically added whenever a program is linked with this library"
2132 echo "*** or is declared to -dlopen it."
2737 build_libtool_libs=module
2738 build_old_libs=yes
2739 else
2740 build_libtool_libs=no
2741 fi
2742 else
2743 echo "*** The inter-library dependencies that have been dropped here will be"
2744 echo "*** automatically added whenever a program is linked with this library"
2745 echo "*** or is declared to -dlopen it."
2746
2747 if test $allow_undefined = no; then
2748 echo
2749 echo "*** Since this library must not contain undefined symbols,"
2750 echo "*** because either the platform does not support them or"
2751 echo "*** it was explicitly requested with -no-undefined,"
2752 echo "*** libtool will only create a static version of it."
2753 if test "$build_old_libs" = no; then
2754 oldlibs="$output_objdir/$libname.$libext"
2755 build_libtool_libs=module
2756 build_old_libs=yes
2757 else
2758 build_libtool_libs=no
2759 fi
2760 fi
2133 fi
2134 fi
2135 # Done checking deplibs!
2136 deplibs=$newdeplibs
2137 fi
2138
2139 # All the library-specific variables (install_libdir is set above).
2140 library_names=
2141 old_library=
2142 dlname=
2761 fi
2762 fi
2763 # Done checking deplibs!
2764 deplibs=$newdeplibs
2765 fi
2766
2767 # All the library-specific variables (install_libdir is set above).
2768 library_names=
2769 old_library=
2770 dlname=
2143
2771
2144 # Test again, we may have decided not to build it any more
2145 if test "$build_libtool_libs" = yes; then
2772 # Test again, we may have decided not to build it any more
2773 if test "$build_libtool_libs" = yes; then
2774 if test $hardcode_into_libs = yes; then
2775 # Hardcode the library paths
2776 hardcode_libdirs=
2777 dep_rpath=
2778 rpath="$finalize_rpath"
2779 test "$mode" != relink && rpath="$compile_rpath$rpath"
2780 for libdir in $rpath; do
2781 if test -n "$hardcode_libdir_flag_spec"; then
2782 if test -n "$hardcode_libdir_separator"; then
2783 if test -z "$hardcode_libdirs"; then
2784 hardcode_libdirs="$libdir"
2785 else
2786 # Just accumulate the unique libdirs.
2787 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
2788 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2789 ;;
2790 *)
2791 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2792 ;;
2793 esac
2794 fi
2795 else
2796 eval flag=\"$hardcode_libdir_flag_spec\"
2797 dep_rpath="$dep_rpath $flag"
2798 fi
2799 elif test -n "$runpath_var"; then
2800 case "$perm_rpath " in
2801 *" $libdir "*) ;;
2802 *) perm_rpath="$perm_rpath $libdir" ;;
2803 esac
2804 fi
2805 done
2806 # Substitute the hardcoded libdirs into the rpath.
2807 if test -n "$hardcode_libdir_separator" &&
2808 test -n "$hardcode_libdirs"; then
2809 libdir="$hardcode_libdirs"
2810 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
2811 fi
2812 if test -n "$runpath_var" && test -n "$perm_rpath"; then
2813 # We should set the runpath_var.
2814 rpath=
2815 for dir in $perm_rpath; do
2816 rpath="$rpath$dir:"
2817 done
2818 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
2819 fi
2820 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
2821 fi
2822
2823 shlibpath="$finalize_shlibpath"
2824 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
2825 if test -n "$shlibpath"; then
2826 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
2827 fi
2828
2146 # Get the real and link names of the library.
2147 eval library_names=\"$library_names_spec\"
2148 set dummy $library_names
2149 realname="$2"
2150 shift; shift
2151
2152 if test -n "$soname_spec"; then
2153 eval soname=\"$soname_spec\"
2154 else
2155 soname="$realname"
2156 fi
2829 # Get the real and link names of the library.
2830 eval library_names=\"$library_names_spec\"
2831 set dummy $library_names
2832 realname="$2"
2833 shift; shift
2834
2835 if test -n "$soname_spec"; then
2836 eval soname=\"$soname_spec\"
2837 else
2838 soname="$realname"
2839 fi
2840 test -z "$dlname" && dlname=$soname
2157
2158 lib="$output_objdir/$realname"
2159 for link
2160 do
2161 linknames="$linknames $link"
2162 done
2163
2164 # Ensure that we have .o objects for linkers which dislike .lo

--- 18 unchanged lines hidden (view full) ---

2183
2184 # Prepare the list of exported symbols
2185 if test -z "$export_symbols"; then
2186 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2187 $show "generating symbol list for \`$libname.la'"
2188 export_symbols="$output_objdir/$libname.exp"
2189 $run $rm $export_symbols
2190 eval cmds=\"$export_symbols_cmds\"
2841
2842 lib="$output_objdir/$realname"
2843 for link
2844 do
2845 linknames="$linknames $link"
2846 done
2847
2848 # Ensure that we have .o objects for linkers which dislike .lo

--- 18 unchanged lines hidden (view full) ---

2867
2868 # Prepare the list of exported symbols
2869 if test -z "$export_symbols"; then
2870 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2871 $show "generating symbol list for \`$libname.la'"
2872 export_symbols="$output_objdir/$libname.exp"
2873 $run $rm $export_symbols
2874 eval cmds=\"$export_symbols_cmds\"
2191 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2875 save_ifs="$IFS"; IFS='~'
2192 for cmd in $cmds; do
2193 IFS="$save_ifs"
2194 $show "$cmd"
2195 $run eval "$cmd" || exit $?
2196 done
2197 IFS="$save_ifs"
2198 if test -n "$export_symbols_regex"; then
2199 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""

--- 20 unchanged lines hidden (view full) ---

2220 status=$?
2221 if test $status -ne 0 && test ! -d "$gentop"; then
2222 exit $status
2223 fi
2224 generated="$generated $gentop"
2225
2226 for xlib in $convenience; do
2227 # Extract the objects.
2876 for cmd in $cmds; do
2877 IFS="$save_ifs"
2878 $show "$cmd"
2879 $run eval "$cmd" || exit $?
2880 done
2881 IFS="$save_ifs"
2882 if test -n "$export_symbols_regex"; then
2883 $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""

--- 20 unchanged lines hidden (view full) ---

2904 status=$?
2905 if test $status -ne 0 && test ! -d "$gentop"; then
2906 exit $status
2907 fi
2908 generated="$generated $gentop"
2909
2910 for xlib in $convenience; do
2911 # Extract the objects.
2228 case "$xlib" in
2912 case $xlib in
2229 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2230 *) xabs=`pwd`"/$xlib" ;;
2231 esac
2232 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2233 xdir="$gentop/$xlib"
2234
2235 $show "${rm}r $xdir"
2236 $run ${rm}r "$xdir"

--- 8 unchanged lines hidden (view full) ---

2245
2246 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2247 done
2248 fi
2249 fi
2250
2251 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2252 eval flag=\"$thread_safe_flag_spec\"
2913 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2914 *) xabs=`pwd`"/$xlib" ;;
2915 esac
2916 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2917 xdir="$gentop/$xlib"
2918
2919 $show "${rm}r $xdir"
2920 $run ${rm}r "$xdir"

--- 8 unchanged lines hidden (view full) ---

2929
2930 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2931 done
2932 fi
2933 fi
2934
2935 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2936 eval flag=\"$thread_safe_flag_spec\"
2253 linkopts="$linkopts $flag"
2937 linker_flags="$linker_flags $flag"
2254 fi
2255
2938 fi
2939
2940 # Make a backup of the uninstalled library when relinking
2941 if test "$mode" = relink; then
2942 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
2943 fi
2944
2256 # Do each of the archive commands.
2257 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2258 eval cmds=\"$archive_expsym_cmds\"
2259 else
2945 # Do each of the archive commands.
2946 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2947 eval cmds=\"$archive_expsym_cmds\"
2948 else
2949 save_deplibs="$deplibs"
2950 for conv in $convenience; do
2951 tmp_deplibs=
2952 for test_deplib in $deplibs; do
2953 if test "$test_deplib" != "$conv"; then
2954 tmp_deplibs="$tmp_deplibs $test_deplib"
2955 fi
2956 done
2957 deplibs="$tmp_deplibs"
2958 done
2260 eval cmds=\"$archive_cmds\"
2959 eval cmds=\"$archive_cmds\"
2960 deplibs="$save_deplibs"
2261 fi
2961 fi
2262 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2962 save_ifs="$IFS"; IFS='~'
2263 for cmd in $cmds; do
2264 IFS="$save_ifs"
2265 $show "$cmd"
2266 $run eval "$cmd" || exit $?
2267 done
2268 IFS="$save_ifs"
2269
2963 for cmd in $cmds; do
2964 IFS="$save_ifs"
2965 $show "$cmd"
2966 $run eval "$cmd" || exit $?
2967 done
2968 IFS="$save_ifs"
2969
2970 # Restore the uninstalled library and exit
2971 if test "$mode" = relink; then
2972 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
2973 exit 0
2974 fi
2975
2270 # Create links to the real library.
2271 for linkname in $linknames; do
2272 if test "$realname" != "$linkname"; then
2273 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2274 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2275 fi
2276 done
2277
2278 # If -module or -export-dynamic was specified, set the dlname.
2279 if test "$module" = yes || test "$export_dynamic" = yes; then
2280 # On all known operating systems, these are identical.
2281 dlname="$soname"
2282 fi
2283 fi
2284 ;;
2285
2976 # Create links to the real library.
2977 for linkname in $linknames; do
2978 if test "$realname" != "$linkname"; then
2979 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2980 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2981 fi
2982 done
2983
2984 # If -module or -export-dynamic was specified, set the dlname.
2985 if test "$module" = yes || test "$export_dynamic" = yes; then
2986 # On all known operating systems, these are identical.
2987 dlname="$soname"
2988 fi
2989 fi
2990 ;;
2991
2286 *.lo | *.o | *.obj)
2287 if test -n "$link_against_libtool_libs"; then
2288 $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
2289 exit 1
2290 fi
2291
2992 obj)
2292 if test -n "$deplibs"; then
2293 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2294 fi
2295
2296 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2297 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2298 fi
2299

--- 8 unchanged lines hidden (view full) ---

2308 if test -n "$vinfo"; then
2309 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2310 fi
2311
2312 if test -n "$release"; then
2313 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2314 fi
2315
2993 if test -n "$deplibs"; then
2994 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2995 fi
2996
2997 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2998 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2999 fi
3000

--- 8 unchanged lines hidden (view full) ---

3009 if test -n "$vinfo"; then
3010 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3011 fi
3012
3013 if test -n "$release"; then
3014 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3015 fi
3016
2316 case "$output" in
3017 case $output in
2317 *.lo)
3018 *.lo)
2318 if test -n "$objs"; then
3019 if test -n "$objs$old_deplibs"; then
2319 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2320 exit 1
2321 fi
2322 libobj="$output"
2323 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
2324 ;;
2325 *)
2326 libobj=

--- 7 unchanged lines hidden (view full) ---

2334 # Objects from convenience libraries. This assumes
2335 # single-version convenience libraries. Whenever we create
2336 # different ones for PIC/non-PIC, this we'll have to duplicate
2337 # the extraction.
2338 reload_conv_objs=
2339 gentop=
2340 # reload_cmds runs $LD directly, so let us get rid of
2341 # -Wl from whole_archive_flag_spec
3020 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3021 exit 1
3022 fi
3023 libobj="$output"
3024 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
3025 ;;
3026 *)
3027 libobj=

--- 7 unchanged lines hidden (view full) ---

3035 # Objects from convenience libraries. This assumes
3036 # single-version convenience libraries. Whenever we create
3037 # different ones for PIC/non-PIC, this we'll have to duplicate
3038 # the extraction.
3039 reload_conv_objs=
3040 gentop=
3041 # reload_cmds runs $LD directly, so let us get rid of
3042 # -Wl from whole_archive_flag_spec
2342 wl=
3043 wl=
2343
2344 if test -n "$convenience"; then
2345 if test -n "$whole_archive_flag_spec"; then
2346 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
2347 else
2348 gentop="$output_objdir/${obj}x"
2349 $show "${rm}r $gentop"
2350 $run ${rm}r "$gentop"
2351 $show "mkdir $gentop"
2352 $run mkdir "$gentop"
2353 status=$?
2354 if test $status -ne 0 && test ! -d "$gentop"; then
2355 exit $status
2356 fi
2357 generated="$generated $gentop"
2358
2359 for xlib in $convenience; do
2360 # Extract the objects.
3044
3045 if test -n "$convenience"; then
3046 if test -n "$whole_archive_flag_spec"; then
3047 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3048 else
3049 gentop="$output_objdir/${obj}x"
3050 $show "${rm}r $gentop"
3051 $run ${rm}r "$gentop"
3052 $show "mkdir $gentop"
3053 $run mkdir "$gentop"
3054 status=$?
3055 if test $status -ne 0 && test ! -d "$gentop"; then
3056 exit $status
3057 fi
3058 generated="$generated $gentop"
3059
3060 for xlib in $convenience; do
3061 # Extract the objects.
2361 case "$xlib" in
3062 case $xlib in
2362 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2363 *) xabs=`pwd`"/$xlib" ;;
2364 esac
2365 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2366 xdir="$gentop/$xlib"
2367
2368 $show "${rm}r $xdir"
2369 $run ${rm}r "$xdir"

--- 7 unchanged lines hidden (view full) ---

2377 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2378
2379 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2380 done
2381 fi
2382 fi
2383
2384 # Create the old-style object.
3063 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3064 *) xabs=`pwd`"/$xlib" ;;
3065 esac
3066 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3067 xdir="$gentop/$xlib"
3068
3069 $show "${rm}r $xdir"
3070 $run ${rm}r "$xdir"

--- 7 unchanged lines hidden (view full) ---

3078 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3079
3080 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3081 done
3082 fi
3083 fi
3084
3085 # Create the old-style object.
2385 reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
3086 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
2386
2387 output="$obj"
2388 eval cmds=\"$reload_cmds\"
3087
3088 output="$obj"
3089 eval cmds=\"$reload_cmds\"
2389 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3090 save_ifs="$IFS"; IFS='~'
2390 for cmd in $cmds; do
2391 IFS="$save_ifs"
2392 $show "$cmd"
2393 $run eval "$cmd" || exit $?
2394 done
2395 IFS="$save_ifs"
2396
2397 # Exit if we aren't doing a library object file.

--- 14 unchanged lines hidden (view full) ---

2412
2413 # Create an invalid libtool object if no PIC, so that we don't
2414 # accidentally link it into a program.
2415 $show "echo timestamp > $libobj"
2416 $run eval "echo timestamp > $libobj" || exit $?
2417 exit 0
2418 fi
2419
3091 for cmd in $cmds; do
3092 IFS="$save_ifs"
3093 $show "$cmd"
3094 $run eval "$cmd" || exit $?
3095 done
3096 IFS="$save_ifs"
3097
3098 # Exit if we aren't doing a library object file.

--- 14 unchanged lines hidden (view full) ---

3113
3114 # Create an invalid libtool object if no PIC, so that we don't
3115 # accidentally link it into a program.
3116 $show "echo timestamp > $libobj"
3117 $run eval "echo timestamp > $libobj" || exit $?
3118 exit 0
3119 fi
3120
2420 if test -n "$pic_flag"; then
3121 if test -n "$pic_flag" || test "$pic_mode" != default; then
2421 # Only do commands if we really have different PIC objects.
2422 reload_objs="$libobjs $reload_conv_objs"
2423 output="$libobj"
2424 eval cmds=\"$reload_cmds\"
3122 # Only do commands if we really have different PIC objects.
3123 reload_objs="$libobjs $reload_conv_objs"
3124 output="$libobj"
3125 eval cmds=\"$reload_cmds\"
2425 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3126 save_ifs="$IFS"; IFS='~'
2426 for cmd in $cmds; do
2427 IFS="$save_ifs"
2428 $show "$cmd"
2429 $run eval "$cmd" || exit $?
2430 done
2431 IFS="$save_ifs"
2432 else
2433 # Just create a symlink.

--- 14 unchanged lines hidden (view full) ---

2448 if test -n "$gentop"; then
2449 $show "${rm}r $gentop"
2450 $run ${rm}r $gentop
2451 fi
2452
2453 exit 0
2454 ;;
2455
3127 for cmd in $cmds; do
3128 IFS="$save_ifs"
3129 $show "$cmd"
3130 $run eval "$cmd" || exit $?
3131 done
3132 IFS="$save_ifs"
3133 else
3134 # Just create a symlink.

--- 14 unchanged lines hidden (view full) ---

3149 if test -n "$gentop"; then
3150 $show "${rm}r $gentop"
3151 $run ${rm}r $gentop
3152 fi
3153
3154 exit 0
3155 ;;
3156
2456 # Anything else should be a program.
2457 *)
3157 prog)
3158 case $host in
3159 *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
3160 esac
2458 if test -n "$vinfo"; then
2459 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2460 fi
2461
2462 if test -n "$release"; then
2463 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2464 fi
2465
2466 if test "$preload" = yes; then
3161 if test -n "$vinfo"; then
3162 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3163 fi
3164
3165 if test -n "$release"; then
3166 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3167 fi
3168
3169 if test "$preload" = yes; then
2467 if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
3170 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
2468 test "$dlopen_self_static" = unknown; then
2469 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3171 test "$dlopen_self_static" = unknown; then
3172 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2470 fi
3173 fi
2471 fi
3174 fi
2472
3175
3176 case $host in
3177 *-*-rhapsody* | *-*-darwin1.[012])
3178 # On Rhapsody replace the C library is the System framework
3179 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3180 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
3181 case $host in
3182 *darwin*)
3183 # Don't allow lazy linking, it breaks C++ global constructors
3184 compile_command="$compile_command ${wl}-bind_at_load"
3185 finalize_command="$finalize_command ${wl}-bind_at_load"
3186 ;;
3187 esac
3188 ;;
3189 esac
3190
3191 compile_command="$compile_command $compile_deplibs"
3192 finalize_command="$finalize_command $finalize_deplibs"
3193
2473 if test -n "$rpath$xrpath"; then
2474 # If the user specified any rpath flags, then add them.
2475 for libdir in $rpath $xrpath; do
2476 # This is the magic to use -rpath.
3194 if test -n "$rpath$xrpath"; then
3195 # If the user specified any rpath flags, then add them.
3196 for libdir in $rpath $xrpath; do
3197 # This is the magic to use -rpath.
2477 case "$compile_rpath " in
2478 *" $libdir "*) ;;
2479 *) compile_rpath="$compile_rpath $libdir" ;;
2480 esac
2481 case "$finalize_rpath " in
2482 *" $libdir "*) ;;
2483 *) finalize_rpath="$finalize_rpath $libdir" ;;
2484 esac
2485 done
2486 fi
2487
2488 # Now hardcode the library paths
2489 rpath=
2490 hardcode_libdirs=
2491 for libdir in $compile_rpath $finalize_rpath; do
2492 if test -n "$hardcode_libdir_flag_spec"; then
2493 if test -n "$hardcode_libdir_separator"; then
2494 if test -z "$hardcode_libdirs"; then
2495 hardcode_libdirs="$libdir"
2496 else
2497 # Just accumulate the unique libdirs.
3198 case "$finalize_rpath " in
3199 *" $libdir "*) ;;
3200 *) finalize_rpath="$finalize_rpath $libdir" ;;
3201 esac
3202 done
3203 fi
3204
3205 # Now hardcode the library paths
3206 rpath=
3207 hardcode_libdirs=
3208 for libdir in $compile_rpath $finalize_rpath; do
3209 if test -n "$hardcode_libdir_flag_spec"; then
3210 if test -n "$hardcode_libdir_separator"; then
3211 if test -z "$hardcode_libdirs"; then
3212 hardcode_libdirs="$libdir"
3213 else
3214 # Just accumulate the unique libdirs.
2498 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
3215 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
2499 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2500 ;;
2501 *)
2502 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2503 ;;
2504 esac
2505 fi
2506 else
2507 eval flag=\"$hardcode_libdir_flag_spec\"
2508 rpath="$rpath $flag"
2509 fi
2510 elif test -n "$runpath_var"; then
2511 case "$perm_rpath " in
2512 *" $libdir "*) ;;
2513 *) perm_rpath="$perm_rpath $libdir" ;;
2514 esac
2515 fi
3216 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3217 ;;
3218 *)
3219 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3220 ;;
3221 esac
3222 fi
3223 else
3224 eval flag=\"$hardcode_libdir_flag_spec\"
3225 rpath="$rpath $flag"
3226 fi
3227 elif test -n "$runpath_var"; then
3228 case "$perm_rpath " in
3229 *" $libdir "*) ;;
3230 *) perm_rpath="$perm_rpath $libdir" ;;
3231 esac
3232 fi
3233 case $host in
3234 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
3235 case :$dllsearchpath: in
3236 *":$libdir:"*) ;;
3237 *) dllsearchpath="$dllsearchpath:$libdir";;
3238 esac
3239 ;;
3240 esac
2516 done
2517 # Substitute the hardcoded libdirs into the rpath.
2518 if test -n "$hardcode_libdir_separator" &&
2519 test -n "$hardcode_libdirs"; then
2520 libdir="$hardcode_libdirs"
2521 eval rpath=\" $hardcode_libdir_flag_spec\"
2522 fi
2523 compile_rpath="$rpath"
2524
2525 rpath=
2526 hardcode_libdirs=
2527 for libdir in $finalize_rpath; do
2528 if test -n "$hardcode_libdir_flag_spec"; then
2529 if test -n "$hardcode_libdir_separator"; then
2530 if test -z "$hardcode_libdirs"; then
2531 hardcode_libdirs="$libdir"
2532 else
2533 # Just accumulate the unique libdirs.
3241 done
3242 # Substitute the hardcoded libdirs into the rpath.
3243 if test -n "$hardcode_libdir_separator" &&
3244 test -n "$hardcode_libdirs"; then
3245 libdir="$hardcode_libdirs"
3246 eval rpath=\" $hardcode_libdir_flag_spec\"
3247 fi
3248 compile_rpath="$rpath"
3249
3250 rpath=
3251 hardcode_libdirs=
3252 for libdir in $finalize_rpath; do
3253 if test -n "$hardcode_libdir_flag_spec"; then
3254 if test -n "$hardcode_libdir_separator"; then
3255 if test -z "$hardcode_libdirs"; then
3256 hardcode_libdirs="$libdir"
3257 else
3258 # Just accumulate the unique libdirs.
2534 case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
3259 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
2535 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2536 ;;
2537 *)
2538 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2539 ;;
2540 esac
2541 fi
2542 else

--- 10 unchanged lines hidden (view full) ---

2553 # Substitute the hardcoded libdirs into the rpath.
2554 if test -n "$hardcode_libdir_separator" &&
2555 test -n "$hardcode_libdirs"; then
2556 libdir="$hardcode_libdirs"
2557 eval rpath=\" $hardcode_libdir_flag_spec\"
2558 fi
2559 finalize_rpath="$rpath"
2560
3260 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3261 ;;
3262 *)
3263 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3264 ;;
3265 esac
3266 fi
3267 else

--- 10 unchanged lines hidden (view full) ---

3278 # Substitute the hardcoded libdirs into the rpath.
3279 if test -n "$hardcode_libdir_separator" &&
3280 test -n "$hardcode_libdirs"; then
3281 libdir="$hardcode_libdirs"
3282 eval rpath=\" $hardcode_libdir_flag_spec\"
3283 fi
3284 finalize_rpath="$rpath"
3285
2561 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2562 if test "X$output_objdir" = "X$output"; then
2563 output_objdir="$objdir"
2564 else
2565 output_objdir="$output_objdir/$objdir"
2566 fi
2567
2568 # Create the binary in the object directory, then wrap it.
2569 if test ! -d $output_objdir; then
2570 $show "$mkdir $output_objdir"
2571 $run $mkdir $output_objdir
2572 status=$?
2573 if test $status -ne 0 && test ! -d $output_objdir; then
2574 exit $status
2575 fi
2576 fi
2577
2578 if test -n "$libobjs" && test "$build_old_libs" = yes; then
2579 # Transform all the library objects into standard objects.
2580 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2581 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2582 fi
2583
2584 dlsyms=
2585 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2586 if test -n "$NM" && test -n "$global_symbol_pipe"; then
2587 dlsyms="${outputname}S.c"
2588 else
2589 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
2590 fi
2591 fi
2592
2593 if test -n "$dlsyms"; then
3286 if test -n "$libobjs" && test "$build_old_libs" = yes; then
3287 # Transform all the library objects into standard objects.
3288 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3289 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3290 fi
3291
3292 dlsyms=
3293 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3294 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3295 dlsyms="${outputname}S.c"
3296 else
3297 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3298 fi
3299 fi
3300
3301 if test -n "$dlsyms"; then
2594 case "$dlsyms" in
3302 case $dlsyms in
2595 "") ;;
2596 *.c)
2597 # Discover the nlist of each of the dlfiles.
2598 nlist="$output_objdir/${outputname}.nm"
2599
2600 $show "$rm $nlist ${nlist}S ${nlist}T"
2601 $run $rm "$nlist" "${nlist}S" "${nlist}T"
2602

--- 15 unchanged lines hidden (view full) ---

2618"
2619
2620 if test "$dlself" = yes; then
2621 $show "generating symbol list for \`$output'"
2622
2623 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
2624
2625 # Add our own program objects to the symbol list.
3303 "") ;;
3304 *.c)
3305 # Discover the nlist of each of the dlfiles.
3306 nlist="$output_objdir/${outputname}.nm"
3307
3308 $show "$rm $nlist ${nlist}S ${nlist}T"
3309 $run $rm "$nlist" "${nlist}S" "${nlist}T"
3310

--- 15 unchanged lines hidden (view full) ---

3326"
3327
3328 if test "$dlself" = yes; then
3329 $show "generating symbol list for \`$output'"
3330
3331 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3332
3333 # Add our own program objects to the symbol list.
2626 progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3334 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2627 for arg in $progfiles; do
2628 $show "extracting global C symbols from \`$arg'"
2629 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2630 done
2631
2632 if test -n "$exclude_expsyms"; then
2633 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
2634 $run eval '$mv "$nlist"T "$nlist"'
2635 fi
3335 for arg in $progfiles; do
3336 $show "extracting global C symbols from \`$arg'"
3337 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3338 done
3339
3340 if test -n "$exclude_expsyms"; then
3341 $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3342 $run eval '$mv "$nlist"T "$nlist"'
3343 fi
2636
3344
2637 if test -n "$export_symbols_regex"; then
2638 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
2639 $run eval '$mv "$nlist"T "$nlist"'
2640 fi
2641
2642 # Prepare the list of exported symbols
2643 if test -z "$export_symbols"; then
2644 export_symbols="$output_objdir/$output.exp"
2645 $run $rm $export_symbols
3345 if test -n "$export_symbols_regex"; then
3346 $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3347 $run eval '$mv "$nlist"T "$nlist"'
3348 fi
3349
3350 # Prepare the list of exported symbols
3351 if test -z "$export_symbols"; then
3352 export_symbols="$output_objdir/$output.exp"
3353 $run $rm $export_symbols
2646 $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3354 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
2647 else
3355 else
2648 $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3356 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
2649 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
2650 $run eval 'mv "$nlist"T "$nlist"'
2651 fi
2652 fi
2653
2654 for arg in $dlprefiles; do
2655 $show "extracting global C symbols from \`$arg'"
3357 $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3358 $run eval 'mv "$nlist"T "$nlist"'
3359 fi
3360 fi
3361
3362 for arg in $dlprefiles; do
3363 $show "extracting global C symbols from \`$arg'"
2656 name=`echo "$arg" | sed -e 's%^.*/%%'`
3364 name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
2657 $run eval 'echo ": $name " >> "$nlist"'
2658 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
2659 done
2660
2661 if test -z "$run"; then
2662 # Make sure we have at least an empty file.
2663 test -f "$nlist" || : > "$nlist"
2664
2665 if test -n "$exclude_expsyms"; then
2666 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
2667 $mv "$nlist"T "$nlist"
2668 fi
2669
2670 # Try sorting and uniquifying the output.
3365 $run eval 'echo ": $name " >> "$nlist"'
3366 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3367 done
3368
3369 if test -z "$run"; then
3370 # Make sure we have at least an empty file.
3371 test -f "$nlist" || : > "$nlist"
3372
3373 if test -n "$exclude_expsyms"; then
3374 egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3375 $mv "$nlist"T "$nlist"
3376 fi
3377
3378 # Try sorting and uniquifying the output.
2671 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3379 if grep -v "^: " < "$nlist" |
3380 if sort -k 3 </dev/null >/dev/null 2>&1; then
3381 sort -k 3
3382 else
3383 sort +2
3384 fi |
3385 uniq > "$nlist"S; then
2672 :
2673 else
2674 grep -v "^: " < "$nlist" > "$nlist"S
2675 fi
2676
2677 if test -f "$nlist"S; then
2678 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
2679 else
2680 echo '/* NONE */' >> "$output_objdir/$dlsyms"
2681 fi
2682
2683 $echo >> "$output_objdir/$dlsyms" "\
2684
2685#undef lt_preloaded_symbols
2686
2687#if defined (__STDC__) && __STDC__
3386 :
3387 else
3388 grep -v "^: " < "$nlist" > "$nlist"S
3389 fi
3390
3391 if test -f "$nlist"S; then
3392 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3393 else
3394 echo '/* NONE */' >> "$output_objdir/$dlsyms"
3395 fi
3396
3397 $echo >> "$output_objdir/$dlsyms" "\
3398
3399#undef lt_preloaded_symbols
3400
3401#if defined (__STDC__) && __STDC__
2688# define lt_ptr_t void *
3402# define lt_ptr void *
2689#else
3403#else
2690# define lt_ptr_t char *
3404# define lt_ptr char *
2691# define const
2692#endif
2693
2694/* The mapping between symbol names and symbols. */
2695const struct {
2696 const char *name;
3405# define const
3406#endif
3407
3408/* The mapping between symbol names and symbols. */
3409const struct {
3410 const char *name;
2697 lt_ptr_t address;
3411 lt_ptr address;
2698}
2699lt_preloaded_symbols[] =
2700{\
2701"
2702
3412}
3413lt_preloaded_symbols[] =
3414{\
3415"
3416
2703 sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
2704 -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
2705 < "$nlist" >> "$output_objdir/$dlsyms"
3417 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
2706
2707 $echo >> "$output_objdir/$dlsyms" "\
3418
3419 $echo >> "$output_objdir/$dlsyms" "\
2708 {0, (lt_ptr_t) 0}
3420 {0, (lt_ptr) 0}
2709};
2710
2711/* This works around a problem in FreeBSD linker */
2712#ifdef FREEBSD_WORKAROUND
2713static const void *lt_preloaded_setup() {
2714 return lt_preloaded_symbols;
2715}
2716#endif
2717
2718#ifdef __cplusplus
2719}
2720#endif\
2721"
2722 fi
2723
2724 pic_flag_for_symtable=
3421};
3422
3423/* This works around a problem in FreeBSD linker */
3424#ifdef FREEBSD_WORKAROUND
3425static const void *lt_preloaded_setup() {
3426 return lt_preloaded_symbols;
3427}
3428#endif
3429
3430#ifdef __cplusplus
3431}
3432#endif\
3433"
3434 fi
3435
3436 pic_flag_for_symtable=
2725 case "$host" in
3437 case $host in
2726 # compiling the symbol table file with pic_flag works around
2727 # a FreeBSD bug that causes programs to crash when -lm is
2728 # linked before any other PIC object. But we must not use
2729 # pic_flag when linking with -static. The problem exists in
2730 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2731 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
2732 case "$compile_command " in
2733 *" -static "*) ;;

--- 13 unchanged lines hidden (view full) ---

2747 # Clean up the generated files.
2748 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
2749 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
2750
2751 # Transform the symbol file into the correct name.
2752 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2753 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
2754 ;;
3438 # compiling the symbol table file with pic_flag works around
3439 # a FreeBSD bug that causes programs to crash when -lm is
3440 # linked before any other PIC object. But we must not use
3441 # pic_flag when linking with -static. The problem exists in
3442 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3443 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3444 case "$compile_command " in
3445 *" -static "*) ;;

--- 13 unchanged lines hidden (view full) ---

3459 # Clean up the generated files.
3460 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3461 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3462
3463 # Transform the symbol file into the correct name.
3464 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3465 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3466 ;;
3467 *-*-freebsd*)
3468 # FreeBSD doesn't need this...
3469 ;;
2755 *)
2756 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
2757 exit 1
2758 ;;
2759 esac
2760 else
2761 # We keep going just in case the user didn't refer to
2762 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
2763 # really was required.
2764
2765 # Nullify the symbol file.
2766 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2767 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
2768 fi
2769
3470 *)
3471 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3472 exit 1
3473 ;;
3474 esac
3475 else
3476 # We keep going just in case the user didn't refer to
3477 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3478 # really was required.
3479
3480 # Nullify the symbol file.
3481 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3482 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3483 fi
3484
2770 if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
3485 if test $need_relink = no || test "$build_libtool_libs" != yes; then
2771 # Replace the output file specification.
2772 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
2773 link_command="$compile_command$compile_rpath"
2774
2775 # We have no uninstalled library dependencies, so finalize right now.
2776 $show "$link_command"
2777 $run eval "$link_command"
2778 status=$?
3486 # Replace the output file specification.
3487 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3488 link_command="$compile_command$compile_rpath"
3489
3490 # We have no uninstalled library dependencies, so finalize right now.
3491 $show "$link_command"
3492 $run eval "$link_command"
3493 status=$?
2779
3494
2780 # Delete the generated files.
2781 if test -n "$dlsyms"; then
2782 $show "$rm $output_objdir/${outputname}S.${objext}"
2783 $run $rm "$output_objdir/${outputname}S.${objext}"
2784 fi
2785
2786 exit $status
2787 fi
2788
2789 if test -n "$shlibpath_var"; then
2790 # We should set the shlibpath_var
2791 rpath=
2792 for dir in $temp_rpath; do
3495 # Delete the generated files.
3496 if test -n "$dlsyms"; then
3497 $show "$rm $output_objdir/${outputname}S.${objext}"
3498 $run $rm "$output_objdir/${outputname}S.${objext}"
3499 fi
3500
3501 exit $status
3502 fi
3503
3504 if test -n "$shlibpath_var"; then
3505 # We should set the shlibpath_var
3506 rpath=
3507 for dir in $temp_rpath; do
2793 case "$dir" in
3508 case $dir in
2794 [\\/]* | [A-Za-z]:[\\/]*)
2795 # Absolute path.
2796 rpath="$rpath$dir:"
2797 ;;
2798 *)
2799 # Relative path: add a thisdir entry.
2800 rpath="$rpath\$thisdir/$dir:"
2801 ;;

--- 25 unchanged lines hidden (view full) ---

2827 rpath=
2828 for dir in $finalize_perm_rpath; do
2829 rpath="$rpath$dir:"
2830 done
2831 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
2832 fi
2833 fi
2834
3509 [\\/]* | [A-Za-z]:[\\/]*)
3510 # Absolute path.
3511 rpath="$rpath$dir:"
3512 ;;
3513 *)
3514 # Relative path: add a thisdir entry.
3515 rpath="$rpath\$thisdir/$dir:"
3516 ;;

--- 25 unchanged lines hidden (view full) ---

3542 rpath=
3543 for dir in $finalize_perm_rpath; do
3544 rpath="$rpath$dir:"
3545 done
3546 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
3547 fi
3548 fi
3549
3550 if test "$no_install" = yes; then
3551 # We don't need to create a wrapper script.
3552 link_command="$compile_var$compile_command$compile_rpath"
3553 # Replace the output file specification.
3554 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3555 # Delete the old output file.
3556 $run $rm $output
3557 # Link the executable and exit
3558 $show "$link_command"
3559 $run eval "$link_command" || exit $?
3560 exit 0
3561 fi
3562
2835 if test "$hardcode_action" = relink; then
2836 # Fast installation is not supported
2837 link_command="$compile_var$compile_command$compile_rpath"
2838 relink_command="$finalize_var$finalize_command$finalize_rpath"
3563 if test "$hardcode_action" = relink; then
3564 # Fast installation is not supported
3565 link_command="$compile_var$compile_command$compile_rpath"
3566 relink_command="$finalize_var$finalize_command$finalize_rpath"
2839
3567
2840 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
2841 $echo "$modename: \`$output' will be relinked during installation" 1>&2
2842 else
2843 if test "$fast_install" != no; then
2844 link_command="$finalize_var$compile_command$finalize_rpath"
2845 if test "$fast_install" = yes; then
2846 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
2847 else
2848 # fast_install is set to needless
2849 relink_command=
2850 fi
2851 else
2852 link_command="$compile_var$compile_command$compile_rpath"
2853 relink_command="$finalize_var$finalize_command$finalize_rpath"
2854 fi
2855 fi
2856
2857 # Replace the output file specification.
2858 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3568 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3569 $echo "$modename: \`$output' will be relinked during installation" 1>&2
3570 else
3571 if test "$fast_install" != no; then
3572 link_command="$finalize_var$compile_command$finalize_rpath"
3573 if test "$fast_install" = yes; then
3574 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3575 else
3576 # fast_install is set to needless
3577 relink_command=
3578 fi
3579 else
3580 link_command="$compile_var$compile_command$compile_rpath"
3581 relink_command="$finalize_var$finalize_command$finalize_rpath"
3582 fi
3583 fi
3584
3585 # Replace the output file specification.
3586 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
2859
3587
2860 # Delete the old output files.
2861 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
2862
2863 $show "$link_command"
2864 $run eval "$link_command" || exit $?
2865
2866 # Now create the wrapper script.
2867 $show "creating $output"
2868
2869 # Quote the relink command for shipping.
2870 if test -n "$relink_command"; then
3588 # Delete the old output files.
3589 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
3590
3591 $show "$link_command"
3592 $run eval "$link_command" || exit $?
3593
3594 # Now create the wrapper script.
3595 $show "creating $output"
3596
3597 # Quote the relink command for shipping.
3598 if test -n "$relink_command"; then
3599 # Preserve any variables that may affect compiler behavior
3600 for var in $variables_saved_for_relink; do
3601 if eval test -z \"\${$var+set}\"; then
3602 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3603 elif eval var_value=\$$var; test -z "$var_value"; then
3604 relink_command="$var=; export $var; $relink_command"
3605 else
3606 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3607 relink_command="$var=\"$var_value\"; export $var; $relink_command"
3608 fi
3609 done
3610 relink_command="(cd `pwd`; $relink_command)"
2871 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
2872 fi
2873
2874 # Quote $echo for shipping.
2875 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3611 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3612 fi
3613
3614 # Quote $echo for shipping.
3615 if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
2876 case "$0" in
3616 case $0 in
2877 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
2878 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
2879 esac
2880 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
2881 else
2882 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
2883 fi
2884
2885 # Only actually do things if our run command is non-null.
2886 if test -z "$run"; then
2887 # win32 will think the script is a binary if it has
2888 # a .exe suffix, so we strip it off here.
2889 case $output in
3617 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3618 *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3619 esac
3620 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3621 else
3622 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3623 fi
3624
3625 # Only actually do things if our run command is non-null.
3626 if test -z "$run"; then
3627 # win32 will think the script is a binary if it has
3628 # a .exe suffix, so we strip it off here.
3629 case $output in
2890 *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3630 *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
2891 esac
3631 esac
3632 # test for cygwin because mv fails w/o .exe extensions
3633 case $host in
3634 *cygwin*) exeext=.exe ;;
3635 *) exeext= ;;
3636 esac
2892 $rm $output
2893 trap "$rm $output; exit 1" 1 2 15
2894
2895 $echo > $output "\
2896#! $SHELL
2897
2898# $output - temporary wrapper script for $objdir/$outputname
2899# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
2900#
2901# The $output program cannot be directly executed until all the libtool
2902# libraries that it depends on are installed.
2903#
2904# This wrapper script should never be moved out of the build directory.
2905# If it is, it will not operate correctly.
2906
2907# Sed substitution that helps us do robust quoting. It backslashifies
2908# metacharacters that are still active within double-quoted strings.
3637 $rm $output
3638 trap "$rm $output; exit 1" 1 2 15
3639
3640 $echo > $output "\
3641#! $SHELL
3642
3643# $output - temporary wrapper script for $objdir/$outputname
3644# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3645#
3646# The $output program cannot be directly executed until all the libtool
3647# libraries that it depends on are installed.
3648#
3649# This wrapper script should never be moved out of the build directory.
3650# If it is, it will not operate correctly.
3651
3652# Sed substitution that helps us do robust quoting. It backslashifies
3653# metacharacters that are still active within double-quoted strings.
2909Xsed='sed -e 1s/^X//'
3654Xsed="${SED}"' -e 1s/^X//'
2910sed_quote_subst='$sed_quote_subst'
2911
2912# The HP-UX ksh and POSIX shell print the target directory to stdout
2913# if CDPATH is set.
2914if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
2915
2916relink_command=\"$relink_command\"
2917
2918# This environment variable determines our operation mode.
2919if test \"\$libtool_install_magic\" = \"$magic\"; then
2920 # install mode needs the following variable:
3655sed_quote_subst='$sed_quote_subst'
3656
3657# The HP-UX ksh and POSIX shell print the target directory to stdout
3658# if CDPATH is set.
3659if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3660
3661relink_command=\"$relink_command\"
3662
3663# This environment variable determines our operation mode.
3664if test \"\$libtool_install_magic\" = \"$magic\"; then
3665 # install mode needs the following variable:
2921 link_against_libtool_libs='$link_against_libtool_libs'
3666 notinst_deplibs='$notinst_deplibs'
2922else
2923 # When we are sourced in execute mode, \$file and \$echo are already set.
2924 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2925 echo=\"$qecho\"
2926 file=\"\$0\"
2927 # Make sure echo works.
2928 if test \"X\$1\" = X--no-reexec; then
2929 # Discard the --no-reexec flag, and continue.

--- 9 unchanged lines hidden (view full) ---

2939"
2940 $echo >> $output "\
2941
2942 # Find the directory that this script lives in.
2943 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2944 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2945
2946 # Follow symbolic links until we get to the real thisdir.
3667else
3668 # When we are sourced in execute mode, \$file and \$echo are already set.
3669 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3670 echo=\"$qecho\"
3671 file=\"\$0\"
3672 # Make sure echo works.
3673 if test \"X\$1\" = X--no-reexec; then
3674 # Discard the --no-reexec flag, and continue.

--- 9 unchanged lines hidden (view full) ---

3684"
3685 $echo >> $output "\
3686
3687 # Find the directory that this script lives in.
3688 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3689 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3690
3691 # Follow symbolic links until we get to the real thisdir.
2947 file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3692 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2948 while test -n \"\$file\"; do
2949 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2950
2951 # If there was a directory component, then change thisdir.
2952 if test \"x\$destdir\" != \"x\$file\"; then
2953 case \"\$destdir\" in
3693 while test -n \"\$file\"; do
3694 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3695
3696 # If there was a directory component, then change thisdir.
3697 if test \"x\$destdir\" != \"x\$file\"; then
3698 case \"\$destdir\" in
2954 [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
3699 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2955 *) thisdir=\"\$thisdir/\$destdir\" ;;
2956 esac
2957 fi
2958
2959 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3700 *) thisdir=\"\$thisdir/\$destdir\" ;;
3701 esac
3702 fi
3703
3704 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2960 file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3705 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2961 done
2962
2963 # Try to get the absolute directory name.
2964 absdir=\`cd \"\$thisdir\" && pwd\`
2965 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2966"
2967
2968 if test "$fast_install" = yes; then
2969 echo >> $output "\
3706 done
3707
3708 # Try to get the absolute directory name.
3709 absdir=\`cd \"\$thisdir\" && pwd\`
3710 test -n \"\$absdir\" && thisdir=\"\$absdir\"
3711"
3712
3713 if test "$fast_install" = yes; then
3714 echo >> $output "\
2970 program=lt-'$outputname'
3715 program=lt-'$outputname'$exeext
2971 progdir=\"\$thisdir/$objdir\"
3716 progdir=\"\$thisdir/$objdir\"
2972
3717
2973 if test ! -f \"\$progdir/\$program\" || \\
3718 if test ! -f \"\$progdir/\$program\" || \\
2974 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3719 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2975 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2976
2977 file=\"\$\$-\$program\"
2978
2979 if test ! -d \"\$progdir\"; then
2980 $mkdir \"\$progdir\"
2981 else
2982 $rm \"\$progdir/\$file\"
2983 fi"
2984
2985 echo >> $output "\
2986
2987 # relink executable if necessary
2988 if test -n \"\$relink_command\"; then
3720 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3721
3722 file=\"\$\$-\$program\"
3723
3724 if test ! -d \"\$progdir\"; then
3725 $mkdir \"\$progdir\"
3726 else
3727 $rm \"\$progdir/\$file\"
3728 fi"
3729
3730 echo >> $output "\
3731
3732 # relink executable if necessary
3733 if test -n \"\$relink_command\"; then
2989 if (cd \"\$thisdir\" && eval \$relink_command); then :
3734 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2990 else
3735 else
3736 $echo \"\$relink_command_output\" >&2
2991 $rm \"\$progdir/\$file\"
2992 exit 1
2993 fi
2994 fi
2995
2996 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2997 { $rm \"\$progdir/\$program\";
2998 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }

--- 12 unchanged lines hidden (view full) ---

3011
3012 # Export our shlibpath_var if we have one.
3013 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3014 $echo >> $output "\
3015 # Add our own library path to $shlibpath_var
3016 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3017
3018 # Some systems cannot cope with colon-terminated $shlibpath_var
3737 $rm \"\$progdir/\$file\"
3738 exit 1
3739 fi
3740 fi
3741
3742 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
3743 { $rm \"\$progdir/\$program\";
3744 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }

--- 12 unchanged lines hidden (view full) ---

3757
3758 # Export our shlibpath_var if we have one.
3759 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3760 $echo >> $output "\
3761 # Add our own library path to $shlibpath_var
3762 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3763
3764 # Some systems cannot cope with colon-terminated $shlibpath_var
3019 # The second colon is a workaround for a bug in BeOS R4 sed
3765 # The second colon is a workaround for a bug in BeOS R4 ${SED}
3020 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3021
3022 export $shlibpath_var
3023"
3024 fi
3025
3026 # fixup the dll searchpath if we need to.
3027 if test -n "$dllsearchpath"; then
3028 $echo >> $output "\
3029 # Add the dll search path components to the executable PATH
3030 PATH=$dllsearchpath:\$PATH
3031"
3032 fi
3033
3034 $echo >> $output "\
3035 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3036 # Run the actual program with our arguments.
3037"
3038 case $host in
3766 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3767
3768 export $shlibpath_var
3769"
3770 fi
3771
3772 # fixup the dll searchpath if we need to.
3773 if test -n "$dllsearchpath"; then
3774 $echo >> $output "\
3775 # Add the dll search path components to the executable PATH
3776 PATH=$dllsearchpath:\$PATH
3777"
3778 fi
3779
3780 $echo >> $output "\
3781 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3782 # Run the actual program with our arguments.
3783"
3784 case $host in
3039 # win32 systems need to use the prog path for dll
3040 # lookup to work
3041 *-*-cygwin*)
3785 # win32 systems need to use the prog path for dll
3786 # lookup to work
3787 *-*-cygwin* | *-*-pw32*)
3042 $echo >> $output "\
3043 exec \$progdir/\$program \${1+\"\$@\"}
3044"
3045 ;;
3046
3047 # Backslashes separate directories on plain windows
3048 *-*-mingw | *-*-os2*)
3049 $echo >> $output "\

--- 37 unchanged lines hidden (view full) ---

3087 oldobjs="$libobjs_save"
3088 addlibs="$convenience"
3089 build_libtool_libs=no
3090 else
3091 if test "$build_libtool_libs" = module; then
3092 oldobjs="$libobjs_save"
3093 build_libtool_libs=no
3094 else
3788 $echo >> $output "\
3789 exec \$progdir/\$program \${1+\"\$@\"}
3790"
3791 ;;
3792
3793 # Backslashes separate directories on plain windows
3794 *-*-mingw | *-*-os2*)
3795 $echo >> $output "\

--- 37 unchanged lines hidden (view full) ---

3833 oldobjs="$libobjs_save"
3834 addlibs="$convenience"
3835 build_libtool_libs=no
3836 else
3837 if test "$build_libtool_libs" = module; then
3838 oldobjs="$libobjs_save"
3839 build_libtool_libs=no
3840 else
3095 oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3841 oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3096 fi
3097 addlibs="$old_convenience"
3098 fi
3099
3100 if test -n "$addlibs"; then
3101 gentop="$output_objdir/${outputname}x"
3102 $show "${rm}r $gentop"
3103 $run ${rm}r "$gentop"
3104 $show "mkdir $gentop"
3105 $run mkdir "$gentop"
3106 status=$?
3107 if test $status -ne 0 && test ! -d "$gentop"; then
3108 exit $status
3109 fi
3110 generated="$generated $gentop"
3842 fi
3843 addlibs="$old_convenience"
3844 fi
3845
3846 if test -n "$addlibs"; then
3847 gentop="$output_objdir/${outputname}x"
3848 $show "${rm}r $gentop"
3849 $run ${rm}r "$gentop"
3850 $show "mkdir $gentop"
3851 $run mkdir "$gentop"
3852 status=$?
3853 if test $status -ne 0 && test ! -d "$gentop"; then
3854 exit $status
3855 fi
3856 generated="$generated $gentop"
3111
3857
3112 # Add in members from convenience archives.
3113 for xlib in $addlibs; do
3114 # Extract the objects.
3858 # Add in members from convenience archives.
3859 for xlib in $addlibs; do
3860 # Extract the objects.
3115 case "$xlib" in
3861 case $xlib in
3116 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3117 *) xabs=`pwd`"/$xlib" ;;
3118 esac
3119 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3120 xdir="$gentop/$xlib"
3121
3122 $show "${rm}r $xdir"
3123 $run ${rm}r "$xdir"

--- 29 unchanged lines hidden (view full) ---

3153 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3154 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
3155 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3156 fi
3157 done
3158
3159 eval cmds=\"$old_archive_cmds\"
3160 fi
3862 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3863 *) xabs=`pwd`"/$xlib" ;;
3864 esac
3865 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3866 xdir="$gentop/$xlib"
3867
3868 $show "${rm}r $xdir"
3869 $run ${rm}r "$xdir"

--- 29 unchanged lines hidden (view full) ---

3899 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3900 $show "(cd $xdir && ${LN_S} $obj $baseobj)"
3901 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3902 fi
3903 done
3904
3905 eval cmds=\"$old_archive_cmds\"
3906 fi
3161 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3907 save_ifs="$IFS"; IFS='~'
3162 for cmd in $cmds; do
3163 IFS="$save_ifs"
3164 $show "$cmd"
3165 $run eval "$cmd" || exit $?
3166 done
3167 IFS="$save_ifs"
3168 done
3169
3170 if test -n "$generated"; then
3171 $show "${rm}r$generated"
3172 $run ${rm}r$generated
3173 fi
3174
3175 # Now create the libtool archive.
3908 for cmd in $cmds; do
3909 IFS="$save_ifs"
3910 $show "$cmd"
3911 $run eval "$cmd" || exit $?
3912 done
3913 IFS="$save_ifs"
3914 done
3915
3916 if test -n "$generated"; then
3917 $show "${rm}r$generated"
3918 $run ${rm}r$generated
3919 fi
3920
3921 # Now create the libtool archive.
3176 case "$output" in
3922 case $output in
3177 *.la)
3178 old_library=
3923 *.la)
3924 old_library=
3179 if test "$release_suffix" = all; then
3180 test "$build_old_libs" = yes && old_library="$libname$release.$libext"
3181 else
3182 test "$build_old_libs" = yes && old_library="$libname.$libext"
3925 test "$build_old_libs" = yes && old_library="$libname.$libext"
3183 fi
3184 $show "creating $output"
3185
3926 $show "creating $output"
3927
3186 if test -n "$xrpath"; then
3187 temp_xrpath=
3188 for libdir in $xrpath; do
3189 temp_xrpath="$temp_xrpath -R$libdir"
3190 done
3191 dependency_libs="$temp_xrpath $dependency_libs"
3192 fi
3928 # Preserve any variables that may affect compiler behavior
3929 for var in $variables_saved_for_relink; do
3930 if eval test -z \"\${$var+set}\"; then
3931 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
3932 elif eval var_value=\$$var; test -z "$var_value"; then
3933 relink_command="$var=; export $var; $relink_command"
3934 else
3935 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
3936 relink_command="$var=\"$var_value\"; export $var; $relink_command"
3937 fi
3938 done
3939 # Quote the link command for shipping.
3940 relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
3941 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3193
3194 # Only create the output if not a dry run.
3195 if test -z "$run"; then
3196 for installed in no yes; do
3197 if test "$installed" = yes; then
3198 if test -z "$install_libdir"; then
3199 break
3200 fi
3201 output="$output_objdir/$outputname"i
3942
3943 # Only create the output if not a dry run.
3944 if test -z "$run"; then
3945 for installed in no yes; do
3946 if test "$installed" = yes; then
3947 if test -z "$install_libdir"; then
3948 break
3949 fi
3950 output="$output_objdir/$outputname"i
3951 # Replace all uninstalled libtool libraries with the installed ones
3952 newdependency_libs=
3953 for deplib in $dependency_libs; do
3954 case $deplib in
3955 *.la)
3956 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3957 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3958 if test -z "$libdir"; then
3959 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3960 exit 1
3961 fi
3962 newdependency_libs="$newdependency_libs $libdir/$name"
3963 ;;
3964 *) newdependency_libs="$newdependency_libs $deplib" ;;
3965 esac
3966 done
3967 dependency_libs="$newdependency_libs"
3968 newdlfiles=
3969 for lib in $dlfiles; do
3970 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3971 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3972 if test -z "$libdir"; then
3973 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3974 exit 1
3975 fi
3976 newdlfiles="$newdlfiles $libdir/$name"
3977 done
3978 dlfiles="$newdlfiles"
3979 newdlprefiles=
3980 for lib in $dlprefiles; do
3981 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3982 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3983 if test -z "$libdir"; then
3984 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3985 exit 1
3986 fi
3987 newdlprefiles="$newdlprefiles $libdir/$name"
3988 done
3989 dlprefiles="$newdlprefiles"
3202 fi
3203 $rm $output
3990 fi
3991 $rm $output
3992 # place dlname in correct position for cygwin
3993 tdlname=$dlname
3994 case $host,$output,$installed,$module,$dlname in
3995 *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
3996 esac
3204 $echo > $output "\
3205# $outputname - a libtool library file
3206# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3207#
3208# Please DO NOT delete this file!
3209# It is necessary for linking the library.
3210
3211# The name that we can dlopen(3).
3997 $echo > $output "\
3998# $outputname - a libtool library file
3999# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4000#
4001# Please DO NOT delete this file!
4002# It is necessary for linking the library.
4003
4004# The name that we can dlopen(3).
3212dlname='$dlname'
4005dlname='$tdlname'
3213
3214# Names of this library.
3215library_names='$library_names'
3216
3217# The name of the static archive.
3218old_library='$old_library'
3219
3220# Libraries that this one depends upon.
3221dependency_libs='$dependency_libs'
3222
3223# Version information for $libname.
3224current=$current
3225age=$age
3226revision=$revision
3227
3228# Is this an already installed library?
3229installed=$installed
3230
4006
4007# Names of this library.
4008library_names='$library_names'
4009
4010# The name of the static archive.
4011old_library='$old_library'
4012
4013# Libraries that this one depends upon.
4014dependency_libs='$dependency_libs'
4015
4016# Version information for $libname.
4017current=$current
4018age=$age
4019revision=$revision
4020
4021# Is this an already installed library?
4022installed=$installed
4023
4024# Files to dlopen/dlpreopen
4025dlopen='$dlfiles'
4026dlpreopen='$dlprefiles'
4027
3231# Directory that this library needs to be installed in:
4028# Directory that this library needs to be installed in:
3232libdir='$install_libdir'\
3233"
4029libdir='$install_libdir'"
4030 if test "$installed" = no && test $need_relink = yes; then
4031 $echo >> $output "\
4032relink_command=\"$relink_command\""
4033 fi
3234 done
3235 fi
3236
3237 # Do a symbolic link so that the libtool archive can be found in
3238 # LD_LIBRARY_PATH before the program is installed.
3239 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4034 done
4035 fi
4036
4037 # Do a symbolic link so that the libtool archive can be found in
4038 # LD_LIBRARY_PATH before the program is installed.
4039 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
3240 $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
4040 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
3241 ;;
3242 esac
3243 exit 0
3244 ;;
3245
3246 # libtool install mode
3247 install)
3248 modename="$modename: install"
3249
3250 # There may be an optional sh(1) argument at the beginning of
3251 # install_prog (especially on Windows NT).
4041 ;;
4042 esac
4043 exit 0
4044 ;;
4045
4046 # libtool install mode
4047 install)
4048 modename="$modename: install"
4049
4050 # There may be an optional sh(1) argument at the beginning of
4051 # install_prog (especially on Windows NT).
3252 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
4052 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
4053 # Allow the use of GNU shtool's install command.
4054 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
3253 # Aesthetically quote it.
3254 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4055 # Aesthetically quote it.
4056 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
3255 case "$arg" in
4057 case $arg in
3256 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3257 arg="\"$arg\""
3258 ;;
3259 esac
3260 install_prog="$arg "
3261 arg="$1"
3262 shift
3263 else
3264 install_prog=
3265 arg="$nonopt"
3266 fi
3267
3268 # The real first argument should be the name of the installation program.
3269 # Aesthetically quote it.
3270 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4058 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4059 arg="\"$arg\""
4060 ;;
4061 esac
4062 install_prog="$arg "
4063 arg="$1"
4064 shift
4065 else
4066 install_prog=
4067 arg="$nonopt"
4068 fi
4069
4070 # The real first argument should be the name of the installation program.
4071 # Aesthetically quote it.
4072 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3271 case "$arg" in
4073 case $arg in
3272 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3273 arg="\"$arg\""
3274 ;;
3275 esac
3276 install_prog="$install_prog$arg"
3277
3278 # We need to accept at least all the BSD install flags.
3279 dest=

--- 6 unchanged lines hidden (view full) ---

3286 for arg
3287 do
3288 if test -n "$dest"; then
3289 files="$files $dest"
3290 dest="$arg"
3291 continue
3292 fi
3293
4074 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4075 arg="\"$arg\""
4076 ;;
4077 esac
4078 install_prog="$install_prog$arg"
4079
4080 # We need to accept at least all the BSD install flags.
4081 dest=

--- 6 unchanged lines hidden (view full) ---

4088 for arg
4089 do
4090 if test -n "$dest"; then
4091 files="$files $dest"
4092 dest="$arg"
4093 continue
4094 fi
4095
3294 case "$arg" in
4096 case $arg in
3295 -d) isdir=yes ;;
3296 -f) prev="-f" ;;
3297 -g) prev="-g" ;;
3298 -m) prev="-m" ;;
3299 -o) prev="-o" ;;
3300 -s)
3301 stripme=" -s"
3302 continue

--- 8 unchanged lines hidden (view full) ---

3311 dest="$arg"
3312 continue
3313 fi
3314 ;;
3315 esac
3316
3317 # Aesthetically quote the argument.
3318 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4097 -d) isdir=yes ;;
4098 -f) prev="-f" ;;
4099 -g) prev="-g" ;;
4100 -m) prev="-m" ;;
4101 -o) prev="-o" ;;
4102 -s)
4103 stripme=" -s"
4104 continue

--- 8 unchanged lines hidden (view full) ---

4113 dest="$arg"
4114 continue
4115 fi
4116 ;;
4117 esac
4118
4119 # Aesthetically quote the argument.
4120 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3319 case "$arg" in
4121 case $arg in
3320 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3321 arg="\"$arg\""
3322 ;;
3323 esac
3324 install_prog="$install_prog $arg"
3325 done
3326
3327 if test -z "$install_prog"; then

--- 34 unchanged lines hidden (view full) ---

3362 # Not a directory, so check to see that there is only one file specified.
3363 set dummy $files
3364 if test $# -gt 2; then
3365 $echo "$modename: \`$dest' is not a directory" 1>&2
3366 $echo "$help" 1>&2
3367 exit 1
3368 fi
3369 fi
4122 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4123 arg="\"$arg\""
4124 ;;
4125 esac
4126 install_prog="$install_prog $arg"
4127 done
4128
4129 if test -z "$install_prog"; then

--- 34 unchanged lines hidden (view full) ---

4164 # Not a directory, so check to see that there is only one file specified.
4165 set dummy $files
4166 if test $# -gt 2; then
4167 $echo "$modename: \`$dest' is not a directory" 1>&2
4168 $echo "$help" 1>&2
4169 exit 1
4170 fi
4171 fi
3370 case "$destdir" in
4172 case $destdir in
3371 [\\/]* | [A-Za-z]:[\\/]*) ;;
3372 *)
3373 for file in $files; do
4173 [\\/]* | [A-Za-z]:[\\/]*) ;;
4174 *)
4175 for file in $files; do
3374 case "$file" in
4176 case $file in
3375 *.lo) ;;
3376 *)
3377 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3378 $echo "$help" 1>&2
3379 exit 1
3380 ;;
3381 esac
3382 done

--- 5 unchanged lines hidden (view full) ---

3388 libtool_install_magic="$magic"
3389
3390 staticlibs=
3391 future_libdirs=
3392 current_libdirs=
3393 for file in $files; do
3394
3395 # Do each installation.
4177 *.lo) ;;
4178 *)
4179 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4180 $echo "$help" 1>&2
4181 exit 1
4182 ;;
4183 esac
4184 done

--- 5 unchanged lines hidden (view full) ---

4190 libtool_install_magic="$magic"
4191
4192 staticlibs=
4193 future_libdirs=
4194 current_libdirs=
4195 for file in $files; do
4196
4197 # Do each installation.
3396 case "$file" in
3397 *.a | *.lib)
4198 case $file in
4199 *.$libext)
3398 # Do the static libraries later.
3399 staticlibs="$staticlibs $file"
3400 ;;
3401
3402 *.la)
3403 # Check to see that this really is a libtool archive.
4200 # Do the static libraries later.
4201 staticlibs="$staticlibs $file"
4202 ;;
4203
4204 *.la)
4205 # Check to see that this really is a libtool archive.
3404 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4206 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3405 else
3406 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3407 $echo "$help" 1>&2
3408 exit 1
3409 fi
3410
3411 library_names=
3412 old_library=
4207 else
4208 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4209 $echo "$help" 1>&2
4210 exit 1
4211 fi
4212
4213 library_names=
4214 old_library=
4215 relink_command=
3413 # If there is no directory component, then add one.
4216 # If there is no directory component, then add one.
3414 case "$file" in
4217 case $file in
3415 */* | *\\*) . $file ;;
3416 *) . ./$file ;;
3417 esac
3418
3419 # Add the libdir to current_libdirs if it is the destination.
3420 if test "X$destdir" = "X$libdir"; then
3421 case "$current_libdirs " in
3422 *" $libdir "*) ;;
3423 *) current_libdirs="$current_libdirs $libdir" ;;
3424 esac
3425 else
3426 # Note the libdir as a future libdir.
3427 case "$future_libdirs " in
3428 *" $libdir "*) ;;
3429 *) future_libdirs="$future_libdirs $libdir" ;;
3430 esac
3431 fi
3432
4218 */* | *\\*) . $file ;;
4219 *) . ./$file ;;
4220 esac
4221
4222 # Add the libdir to current_libdirs if it is the destination.
4223 if test "X$destdir" = "X$libdir"; then
4224 case "$current_libdirs " in
4225 *" $libdir "*) ;;
4226 *) current_libdirs="$current_libdirs $libdir" ;;
4227 esac
4228 else
4229 # Note the libdir as a future libdir.
4230 case "$future_libdirs " in
4231 *" $libdir "*) ;;
4232 *) future_libdirs="$future_libdirs $libdir" ;;
4233 esac
4234 fi
4235
3433 dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
4236 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
3434 test "X$dir" = "X$file/" && dir=
3435 dir="$dir$objdir"
3436
4237 test "X$dir" = "X$file/" && dir=
4238 dir="$dir$objdir"
4239
4240 if test -n "$relink_command"; then
4241 $echo "$modename: warning: relinking \`$file'" 1>&2
4242 $show "$relink_command"
4243 if $run eval "$relink_command"; then :
4244 else
4245 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4246 continue
4247 fi
4248 fi
4249
3437 # See the names of the shared library.
3438 set dummy $library_names
3439 if test -n "$2"; then
3440 realname="$2"
3441 shift
3442 shift
3443
4250 # See the names of the shared library.
4251 set dummy $library_names
4252 if test -n "$2"; then
4253 realname="$2"
4254 shift
4255 shift
4256
4257 srcname="$realname"
4258 test -n "$relink_command" && srcname="$realname"T
4259
3444 # Install the shared library and build the symlinks.
4260 # Install the shared library and build the symlinks.
3445 $show "$install_prog $dir/$realname $destdir/$realname"
3446 $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
4261 $show "$install_prog $dir/$srcname $destdir/$realname"
4262 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
4263 if test -n "$stripme" && test -n "$striplib"; then
4264 $show "$striplib $destdir/$realname"
4265 $run eval "$striplib $destdir/$realname" || exit $?
4266 fi
3447
3448 if test $# -gt 0; then
3449 # Delete the old symlinks, and create new ones.
3450 for linkname
3451 do
3452 if test "$linkname" != "$realname"; then
3453 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3454 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3455 fi
3456 done
3457 fi
3458
3459 # Do each command in the postinstall commands.
3460 lib="$destdir/$realname"
3461 eval cmds=\"$postinstall_cmds\"
4267
4268 if test $# -gt 0; then
4269 # Delete the old symlinks, and create new ones.
4270 for linkname
4271 do
4272 if test "$linkname" != "$realname"; then
4273 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4274 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4275 fi
4276 done
4277 fi
4278
4279 # Do each command in the postinstall commands.
4280 lib="$destdir/$realname"
4281 eval cmds=\"$postinstall_cmds\"
3462 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4282 save_ifs="$IFS"; IFS='~'
3463 for cmd in $cmds; do
3464 IFS="$save_ifs"
3465 $show "$cmd"
3466 $run eval "$cmd" || exit $?
3467 done
3468 IFS="$save_ifs"
3469 fi
3470
3471 # Install the pseudo-library for information purposes.
4283 for cmd in $cmds; do
4284 IFS="$save_ifs"
4285 $show "$cmd"
4286 $run eval "$cmd" || exit $?
4287 done
4288 IFS="$save_ifs"
4289 fi
4290
4291 # Install the pseudo-library for information purposes.
3472 if test "$install_ltlibs" = yes; then
3473 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3474 instname="$dir/$name"i
3475 $show "$install_prog $instname $destdir/$name"
3476 $run eval "$install_prog $instname $destdir/$name" || exit $?
3477 fi
4292 case $host in
4293 *-*-freebsd*)
4294 # Do not install the useless pseudo-library
4295 ;;
4296 *)
4297 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4298 instname="$dir/$name"i
4299 $show "$install_prog $instname $destdir/$name"
4300 $run eval "$install_prog $instname $destdir/$name" || exit $?
4301 ;;
4302 esac
3478
3479 # Maybe install the static library, too.
3480 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3481 ;;
3482
3483 *.lo)
3484 # Install (i.e. copy) a libtool object.
3485
3486 # Figure out destination file name, if it wasn't already specified.
3487 if test -n "$destname"; then
3488 destfile="$destdir/$destname"
3489 else
3490 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3491 destfile="$destdir/$destfile"
3492 fi
3493
3494 # Deduce the name of the destination old-style object file.
4303
4304 # Maybe install the static library, too.
4305 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
4306 ;;
4307
4308 *.lo)
4309 # Install (i.e. copy) a libtool object.
4310
4311 # Figure out destination file name, if it wasn't already specified.
4312 if test -n "$destname"; then
4313 destfile="$destdir/$destname"
4314 else
4315 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4316 destfile="$destdir/$destfile"
4317 fi
4318
4319 # Deduce the name of the destination old-style object file.
3495 case "$destfile" in
4320 case $destfile in
3496 *.lo)
3497 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
3498 ;;
4321 *.lo)
4322 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4323 ;;
3499 *.o | *.obj)
4324 *.$objext)
3500 staticdest="$destfile"
3501 destfile=
3502 ;;
3503 *)
3504 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
3505 $echo "$help" 1>&2
3506 exit 1
3507 ;;

--- 21 unchanged lines hidden (view full) ---

3529 if test -n "$destname"; then
3530 destfile="$destdir/$destname"
3531 else
3532 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3533 destfile="$destdir/$destfile"
3534 fi
3535
3536 # Do a test to see if this is really a libtool program.
4325 staticdest="$destfile"
4326 destfile=
4327 ;;
4328 *)
4329 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4330 $echo "$help" 1>&2
4331 exit 1
4332 ;;

--- 21 unchanged lines hidden (view full) ---

4354 if test -n "$destname"; then
4355 destfile="$destdir/$destname"
4356 else
4357 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4358 destfile="$destdir/$destfile"
4359 fi
4360
4361 # Do a test to see if this is really a libtool program.
3537 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3538 link_against_libtool_libs=
4362 case $host in
4363 *cygwin*|*mingw*)
4364 wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
4365 ;;
4366 *)
4367 wrapper=$file
4368 ;;
4369 esac
4370 if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
4371 notinst_deplibs=
3539 relink_command=
3540
3541 # If there is no directory component, then add one.
4372 relink_command=
4373
4374 # If there is no directory component, then add one.
3542 case "$file" in
3543 */* | *\\*) . $file ;;
3544 *) . ./$file ;;
4375 case $file in
4376 */* | *\\*) . $wrapper ;;
4377 *) . ./$wrapper ;;
3545 esac
3546
3547 # Check the variables that should have been set.
4378 esac
4379
4380 # Check the variables that should have been set.
3548 if test -z "$link_against_libtool_libs"; then
3549 $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4381 if test -z "$notinst_deplibs"; then
4382 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
3550 exit 1
3551 fi
3552
3553 finalize=yes
4383 exit 1
4384 fi
4385
4386 finalize=yes
3554 for lib in $link_against_libtool_libs; do
4387 for lib in $notinst_deplibs; do
3555 # Check to see that each library is installed.
3556 libdir=
3557 if test -f "$lib"; then
3558 # If there is no directory component, then add one.
4388 # Check to see that each library is installed.
4389 libdir=
4390 if test -f "$lib"; then
4391 # If there is no directory component, then add one.
3559 case "$lib" in
4392 case $lib in
3560 */* | *\\*) . $lib ;;
3561 *) . ./$lib ;;
3562 esac
3563 fi
4393 */* | *\\*) . $lib ;;
4394 *) . ./$lib ;;
4395 esac
4396 fi
3564 libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
4397 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
3565 if test -n "$libdir" && test ! -f "$libfile"; then
4398 if test -n "$libdir" && test ! -f "$libfile"; then
4399 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
3566 finalize=no
3567 fi
3568 done
3569
4400 finalize=no
4401 fi
4402 done
4403
4404 relink_command=
4405 # If there is no directory component, then add one.
4406 case $file in
4407 */* | *\\*) . $wrapper ;;
4408 *) . ./$wrapper ;;
4409 esac
4410
3570 outputname=
3571 if test "$fast_install" = no && test -n "$relink_command"; then
3572 if test "$finalize" = yes && test -z "$run"; then
3573 tmpdir="/tmp"
3574 test -n "$TMPDIR" && tmpdir="$TMPDIR"
3575 tmpdir="$tmpdir/libtool-$$"
3576 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
3577 else
3578 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
3579 continue
3580 fi
4411 outputname=
4412 if test "$fast_install" = no && test -n "$relink_command"; then
4413 if test "$finalize" = yes && test -z "$run"; then
4414 tmpdir="/tmp"
4415 test -n "$TMPDIR" && tmpdir="$TMPDIR"
4416 tmpdir="$tmpdir/libtool-$$"
4417 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4418 else
4419 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4420 continue
4421 fi
4422 file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3581 outputname="$tmpdir/$file"
3582 # Replace the output file specification.
3583 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3584
3585 $show "$relink_command"
3586 if $run eval "$relink_command"; then :
3587 else
3588 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2

--- 5 unchanged lines hidden (view full) ---

3594 $echo "$modename: warning: cannot relink \`$file'" 1>&2
3595 fi
3596 else
3597 # Install the binary that we compiled earlier.
3598 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3599 fi
3600 fi
3601
4423 outputname="$tmpdir/$file"
4424 # Replace the output file specification.
4425 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4426
4427 $show "$relink_command"
4428 if $run eval "$relink_command"; then :
4429 else
4430 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2

--- 5 unchanged lines hidden (view full) ---

4436 $echo "$modename: warning: cannot relink \`$file'" 1>&2
4437 fi
4438 else
4439 # Install the binary that we compiled earlier.
4440 file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4441 fi
4442 fi
4443
4444 # remove .exe since cygwin /usr/bin/install will append another
4445 # one anyways
4446 case $install_prog,$host in
4447 /usr/bin/install*,*cygwin*)
4448 case $file:$destfile in
4449 *.exe:*.exe)
4450 # this is ok
4451 ;;
4452 *.exe:*)
4453 destfile=$destfile.exe
4454 ;;
4455 *:*.exe)
4456 destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
4457 ;;
4458 esac
4459 ;;
4460 esac
3602 $show "$install_prog$stripme $file $destfile"
3603 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
3604 test -n "$outputname" && ${rm}r "$tmpdir"
3605 ;;
3606 esac
3607 done
3608
3609 for file in $staticlibs; do
3610 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3611
3612 # Set up the ranlib parameters.
3613 oldlib="$destdir/$name"
3614
3615 $show "$install_prog $file $oldlib"
3616 $run eval "$install_prog \$file \$oldlib" || exit $?
3617
4461 $show "$install_prog$stripme $file $destfile"
4462 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
4463 test -n "$outputname" && ${rm}r "$tmpdir"
4464 ;;
4465 esac
4466 done
4467
4468 for file in $staticlibs; do
4469 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4470
4471 # Set up the ranlib parameters.
4472 oldlib="$destdir/$name"
4473
4474 $show "$install_prog $file $oldlib"
4475 $run eval "$install_prog \$file \$oldlib" || exit $?
4476
4477 if test -n "$stripme" && test -n "$striplib"; then
4478 $show "$old_striplib $oldlib"
4479 $run eval "$old_striplib $oldlib" || exit $?
4480 fi
4481
3618 # Do each command in the postinstall commands.
3619 eval cmds=\"$old_postinstall_cmds\"
4482 # Do each command in the postinstall commands.
4483 eval cmds=\"$old_postinstall_cmds\"
3620 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4484 save_ifs="$IFS"; IFS='~'
3621 for cmd in $cmds; do
3622 IFS="$save_ifs"
3623 $show "$cmd"
3624 $run eval "$cmd" || exit $?
3625 done
3626 IFS="$save_ifs"
3627 done
3628
3629 if test -n "$future_libdirs"; then
3630 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
3631 fi
3632
3633 if test -n "$current_libdirs"; then
3634 # Maybe just do a dry run.
3635 test -n "$run" && current_libdirs=" -n$current_libdirs"
4485 for cmd in $cmds; do
4486 IFS="$save_ifs"
4487 $show "$cmd"
4488 $run eval "$cmd" || exit $?
4489 done
4490 IFS="$save_ifs"
4491 done
4492
4493 if test -n "$future_libdirs"; then
4494 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4495 fi
4496
4497 if test -n "$current_libdirs"; then
4498 # Maybe just do a dry run.
4499 test -n "$run" && current_libdirs=" -n$current_libdirs"
3636 exec $SHELL $0 --finish$current_libdirs
3637 exit 1
4500 exec_cmd='$SHELL $0 --finish$current_libdirs'
4501 else
4502 exit 0
3638 fi
4503 fi
3639
3640 exit 0
3641 ;;
3642
3643 # libtool finish mode
3644 finish)
3645 modename="$modename: finish"
3646 libdirs="$nonopt"
3647 admincmds=
3648
3649 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
3650 for dir
3651 do
3652 libdirs="$libdirs $dir"
3653 done
3654
3655 for libdir in $libdirs; do
3656 if test -n "$finish_cmds"; then
3657 # Do each command in the finish commands.
3658 eval cmds=\"$finish_cmds\"
4504 ;;
4505
4506 # libtool finish mode
4507 finish)
4508 modename="$modename: finish"
4509 libdirs="$nonopt"
4510 admincmds=
4511
4512 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4513 for dir
4514 do
4515 libdirs="$libdirs $dir"
4516 done
4517
4518 for libdir in $libdirs; do
4519 if test -n "$finish_cmds"; then
4520 # Do each command in the finish commands.
4521 eval cmds=\"$finish_cmds\"
3659 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4522 save_ifs="$IFS"; IFS='~'
3660 for cmd in $cmds; do
3661 IFS="$save_ifs"
3662 $show "$cmd"
3663 $run eval "$cmd" || admincmds="$admincmds
3664 $cmd"
3665 done
3666 IFS="$save_ifs"
3667 fi
3668 if test -n "$finish_eval"; then
3669 # Do the single finish_eval.
3670 eval cmds=\"$finish_eval\"
3671 $run eval "$cmds" || admincmds="$admincmds
3672 $cmds"
3673 fi
3674 done
3675 fi
3676
3677 # Exit here if they wanted silent mode.
4523 for cmd in $cmds; do
4524 IFS="$save_ifs"
4525 $show "$cmd"
4526 $run eval "$cmd" || admincmds="$admincmds
4527 $cmd"
4528 done
4529 IFS="$save_ifs"
4530 fi
4531 if test -n "$finish_eval"; then
4532 # Do the single finish_eval.
4533 eval cmds=\"$finish_eval\"
4534 $run eval "$cmds" || admincmds="$admincmds
4535 $cmds"
4536 fi
4537 done
4538 fi
4539
4540 # Exit here if they wanted silent mode.
3678 test "$show" = : && exit 0
4541 test "$show" = ":" && exit 0
3679
3680 echo "----------------------------------------------------------------------"
3681 echo "Libraries have been installed in:"
3682 for libdir in $libdirs; do
3683 echo " $libdir"
3684 done
3685 echo
3686 echo "If you ever happen to want to link against installed libraries"
3687 echo "in a given directory, LIBDIR, you must either use libtool, and"
4542
4543 echo "----------------------------------------------------------------------"
4544 echo "Libraries have been installed in:"
4545 for libdir in $libdirs; do
4546 echo " $libdir"
4547 done
4548 echo
4549 echo "If you ever happen to want to link against installed libraries"
4550 echo "in a given directory, LIBDIR, you must either use libtool, and"
3688 echo "specify the full pathname of the library, or use \`-LLIBDIR'"
4551 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
3689 echo "flag during linking and do at least one of the following:"
3690 if test -n "$shlibpath_var"; then
3691 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
3692 echo " during execution"
3693 fi
3694 if test -n "$runpath_var"; then
3695 echo " - add LIBDIR to the \`$runpath_var' environment variable"
3696 echo " during linking"

--- 33 unchanged lines hidden (view full) ---

3730 for file in $execute_dlfiles; do
3731 if test ! -f "$file"; then
3732 $echo "$modename: \`$file' is not a file" 1>&2
3733 $echo "$help" 1>&2
3734 exit 1
3735 fi
3736
3737 dir=
4552 echo "flag during linking and do at least one of the following:"
4553 if test -n "$shlibpath_var"; then
4554 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4555 echo " during execution"
4556 fi
4557 if test -n "$runpath_var"; then
4558 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4559 echo " during linking"

--- 33 unchanged lines hidden (view full) ---

4593 for file in $execute_dlfiles; do
4594 if test ! -f "$file"; then
4595 $echo "$modename: \`$file' is not a file" 1>&2
4596 $echo "$help" 1>&2
4597 exit 1
4598 fi
4599
4600 dir=
3738 case "$file" in
4601 case $file in
3739 *.la)
3740 # Check to see that this really is a libtool archive.
4602 *.la)
4603 # Check to see that this really is a libtool archive.
3741 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4604 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3742 else
3743 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3744 $echo "$help" 1>&2
3745 exit 1
3746 fi
3747
3748 # Read the libtool library.
3749 dlname=
3750 library_names=
3751
3752 # If there is no directory component, then add one.
4605 else
4606 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4607 $echo "$help" 1>&2
4608 exit 1
4609 fi
4610
4611 # Read the libtool library.
4612 dlname=
4613 library_names=
4614
4615 # If there is no directory component, then add one.
3753 case "$file" in
4616 case $file in
3754 */* | *\\*) . $file ;;
3755 *) . ./$file ;;
3756 esac
3757
3758 # Skip this library if it cannot be dlopened.
3759 if test -z "$dlname"; then
3760 # Warn if it was a shared library.
3761 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"

--- 38 unchanged lines hidden (view full) ---

3800 # This variable tells wrapper scripts just to set shlibpath_var
3801 # rather than running their programs.
3802 libtool_execute_magic="$magic"
3803
3804 # Check if any of the arguments is a wrapper script.
3805 args=
3806 for file
3807 do
4617 */* | *\\*) . $file ;;
4618 *) . ./$file ;;
4619 esac
4620
4621 # Skip this library if it cannot be dlopened.
4622 if test -z "$dlname"; then
4623 # Warn if it was a shared library.
4624 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"

--- 38 unchanged lines hidden (view full) ---

4663 # This variable tells wrapper scripts just to set shlibpath_var
4664 # rather than running their programs.
4665 libtool_execute_magic="$magic"
4666
4667 # Check if any of the arguments is a wrapper script.
4668 args=
4669 for file
4670 do
3808 case "$file" in
4671 case $file in
3809 -*) ;;
3810 *)
3811 # Do a test to see if this is really a libtool program.
4672 -*) ;;
4673 *)
4674 # Do a test to see if this is really a libtool program.
3812 if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4675 if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3813 # If there is no directory component, then add one.
4676 # If there is no directory component, then add one.
3814 case "$file" in
4677 case $file in
3815 */* | *\\*) . $file ;;
3816 *) . ./$file ;;
3817 esac
3818
3819 # Transform arg to wrapped name.
3820 file="$progdir/$program"
3821 fi
3822 ;;
3823 esac
3824 # Quote arguments (to preserve shell metacharacters).
3825 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
3826 args="$args \"$file\""
3827 done
3828
3829 if test -z "$run"; then
3830 if test -n "$shlibpath_var"; then
4678 */* | *\\*) . $file ;;
4679 *) . ./$file ;;
4680 esac
4681
4682 # Transform arg to wrapped name.
4683 file="$progdir/$program"
4684 fi
4685 ;;
4686 esac
4687 # Quote arguments (to preserve shell metacharacters).
4688 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
4689 args="$args \"$file\""
4690 done
4691
4692 if test -z "$run"; then
4693 if test -n "$shlibpath_var"; then
3831 # Export the shlibpath_var.
3832 eval "export $shlibpath_var"
4694 # Export the shlibpath_var.
4695 eval "export $shlibpath_var"
3833 fi
3834
3835 # Restore saved enviroment variables
3836 if test "${save_LC_ALL+set}" = set; then
3837 LC_ALL="$save_LC_ALL"; export LC_ALL
3838 fi
3839 if test "${save_LANG+set}" = set; then
3840 LANG="$save_LANG"; export LANG
3841 fi
3842
4696 fi
4697
4698 # Restore saved enviroment variables
4699 if test "${save_LC_ALL+set}" = set; then
4700 LC_ALL="$save_LC_ALL"; export LC_ALL
4701 fi
4702 if test "${save_LANG+set}" = set; then
4703 LANG="$save_LANG"; export LANG
4704 fi
4705
3843 # Now actually exec the command.
3844 eval "exec \$cmd$args"
3845
3846 $echo "$modename: cannot exec \$cmd$args"
3847 exit 1
4706 # Now prepare to actually exec the command.
4707 exec_cmd="\$cmd$args"
3848 else
3849 # Display what would be done.
3850 if test -n "$shlibpath_var"; then
4708 else
4709 # Display what would be done.
4710 if test -n "$shlibpath_var"; then
3851 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
3852 $echo "export $shlibpath_var"
4711 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
4712 $echo "export $shlibpath_var"
3853 fi
3854 $echo "$cmd$args"
3855 exit 0
3856 fi
3857 ;;
3858
4713 fi
4714 $echo "$cmd$args"
4715 exit 0
4716 fi
4717 ;;
4718
3859 # libtool uninstall mode
3860 uninstall)
3861 modename="$modename: uninstall"
4719 # libtool clean and uninstall mode
4720 clean | uninstall)
4721 modename="$modename: $mode"
3862 rm="$nonopt"
3863 files=
4722 rm="$nonopt"
4723 files=
4724 rmforce=
4725 exit_status=0
3864
4726
4727 # This variable tells wrapper scripts just to set variables rather
4728 # than running their programs.
4729 libtool_install_magic="$magic"
4730
3865 for arg
3866 do
4731 for arg
4732 do
3867 case "$arg" in
4733 case $arg in
4734 -f) rm="$rm $arg"; rmforce=yes ;;
3868 -*) rm="$rm $arg" ;;
3869 *) files="$files $arg" ;;
3870 esac
3871 done
3872
3873 if test -z "$rm"; then
3874 $echo "$modename: you must specify an RM program" 1>&2
3875 $echo "$help" 1>&2
3876 exit 1
3877 fi
3878
4735 -*) rm="$rm $arg" ;;
4736 *) files="$files $arg" ;;
4737 esac
4738 done
4739
4740 if test -z "$rm"; then
4741 $echo "$modename: you must specify an RM program" 1>&2
4742 $echo "$help" 1>&2
4743 exit 1
4744 fi
4745
4746 rmdirs=
4747
3879 for file in $files; do
3880 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4748 for file in $files; do
4749 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
3881 test "X$dir" = "X$file" && dir=.
4750 if test "X$dir" = "X$file"; then
4751 dir=.
4752 objdir="$objdir"
4753 else
4754 objdir="$dir/$objdir"
4755 fi
3882 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4756 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4757 test $mode = uninstall && objdir="$dir"
3883
4758
4759 # Remember objdir for removal later, being careful to avoid duplicates
4760 if test $mode = clean; then
4761 case " $rmdirs " in
4762 *" $objdir "*) ;;
4763 *) rmdirs="$rmdirs $objdir" ;;
4764 esac
4765 fi
4766
4767 # Don't error if the file doesn't exist and rm -f was used.
4768 if (test -L "$file") >/dev/null 2>&1 \
4769 || (test -h "$file") >/dev/null 2>&1 \
4770 || test -f "$file"; then
4771 :
4772 elif test -d "$file"; then
4773 exit_status=1
4774 continue
4775 elif test "$rmforce" = yes; then
4776 continue
4777 fi
4778
3884 rmfiles="$file"
3885
4779 rmfiles="$file"
4780
3886 case "$name" in
4781 case $name in
3887 *.la)
3888 # Possibly a libtool archive, so verify it.
4782 *.la)
4783 # Possibly a libtool archive, so verify it.
3889 if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4784 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
3890 . $dir/$name
3891
3892 # Delete the libtool libraries and symlinks.
3893 for n in $library_names; do
4785 . $dir/$name
4786
4787 # Delete the libtool libraries and symlinks.
4788 for n in $library_names; do
3894 rmfiles="$rmfiles $dir/$n"
4789 rmfiles="$rmfiles $objdir/$n"
3895 done
4790 done
3896 test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
4791 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
4792 test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
3897
4793
3898 $show "$rm $rmfiles"
3899 $run $rm $rmfiles
3900
3901 if test -n "$library_names"; then
3902 # Do each command in the postuninstall commands.
3903 eval cmds=\"$postuninstall_cmds\"
3904 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3905 for cmd in $cmds; do
4794 if test $mode = uninstall; then
4795 if test -n "$library_names"; then
4796 # Do each command in the postuninstall commands.
4797 eval cmds=\"$postuninstall_cmds\"
4798 save_ifs="$IFS"; IFS='~'
4799 for cmd in $cmds; do
4800 IFS="$save_ifs"
4801 $show "$cmd"
4802 $run eval "$cmd"
4803 if test $? != 0 && test "$rmforce" != yes; then
4804 exit_status=1
4805 fi
4806 done
3906 IFS="$save_ifs"
4807 IFS="$save_ifs"
3907 $show "$cmd"
3908 $run eval "$cmd"
3909 done
3910 IFS="$save_ifs"
3911 fi
4808 fi
3912
4809
3913 if test -n "$old_library"; then
3914 # Do each command in the old_postuninstall commands.
3915 eval cmds=\"$old_postuninstall_cmds\"
3916 IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3917 for cmd in $cmds; do
4810 if test -n "$old_library"; then
4811 # Do each command in the old_postuninstall commands.
4812 eval cmds=\"$old_postuninstall_cmds\"
4813 save_ifs="$IFS"; IFS='~'
4814 for cmd in $cmds; do
4815 IFS="$save_ifs"
4816 $show "$cmd"
4817 $run eval "$cmd"
4818 if test $? != 0 && test "$rmforce" != yes; then
4819 exit_status=1
4820 fi
4821 done
3918 IFS="$save_ifs"
4822 IFS="$save_ifs"
3919 $show "$cmd"
3920 $run eval "$cmd"
3921 done
3922 IFS="$save_ifs"
4823 fi
4824 # FIXME: should reinstall the best remaining shared library.
3923 fi
4825 fi
3924
3925 # FIXME: should reinstall the best remaining shared library.
3926 fi
3927 ;;
3928
3929 *.lo)
3930 if test "$build_old_libs" = yes; then
3931 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
3932 rmfiles="$rmfiles $dir/$oldobj"
3933 fi
4826 fi
4827 ;;
4828
4829 *.lo)
4830 if test "$build_old_libs" = yes; then
4831 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
4832 rmfiles="$rmfiles $dir/$oldobj"
4833 fi
3934 $show "$rm $rmfiles"
3935 $run $rm $rmfiles
3936 ;;
3937
3938 *)
4834 ;;
4835
4836 *)
3939 $show "$rm $rmfiles"
3940 $run $rm $rmfiles
4837 # Do a test to see if this is a libtool program.
4838 if test $mode = clean &&
4839 (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4840 relink_command=
4841 . $dir/$file
4842
4843 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
4844 if test "$fast_install" = yes && test -n "$relink_command"; then
4845 rmfiles="$rmfiles $objdir/lt-$name"
4846 fi
4847 fi
3941 ;;
3942 esac
4848 ;;
4849 esac
4850 $show "$rm $rmfiles"
4851 $run $rm $rmfiles || exit_status=1
3943 done
4852 done
3944 exit 0
4853
4854 # Try to remove the ${objdir}s in the directories where we deleted files
4855 for dir in $rmdirs; do
4856 if test -d "$dir"; then
4857 $show "rmdir $dir"
4858 $run rmdir $dir >/dev/null 2>&1
4859 fi
4860 done
4861
4862 exit $exit_status
3945 ;;
3946
3947 "")
3948 $echo "$modename: you must specify a MODE" 1>&2
3949 $echo "$generic_help" 1>&2
3950 exit 1
3951 ;;
3952 esac
3953
4863 ;;
4864
4865 "")
4866 $echo "$modename: you must specify a MODE" 1>&2
4867 $echo "$generic_help" 1>&2
4868 exit 1
4869 ;;
4870 esac
4871
3954 $echo "$modename: invalid operation mode \`$mode'" 1>&2
3955 $echo "$generic_help" 1>&2
3956 exit 1
4872 if test -z "$exec_cmd"; then
4873 $echo "$modename: invalid operation mode \`$mode'" 1>&2
4874 $echo "$generic_help" 1>&2
4875 exit 1
4876 fi
3957fi # test -z "$show_help"
3958
4877fi # test -z "$show_help"
4878
4879if test -n "$exec_cmd"; then
4880 eval exec $exec_cmd
4881 exit 1
4882fi
4883
3959# We need to display help for each of the modes.
4884# We need to display help for each of the modes.
3960case "$mode" in
4885case $mode in
3961"") $echo \
3962"Usage: $modename [OPTION]... [MODE-ARG]...
3963
3964Provide generalized library-building support services.
3965
3966 --config show all configuration variables
3967 --debug enable verbose shell tracing
3968-n, --dry-run display commands without modifying any files
3969 --features display basic configuration information and exit
3970 --finish same as \`--mode=finish'
3971 --help display this help message and exit
3972 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
3973 --quiet same as \`--silent'
3974 --silent don't print informational messages
3975 --version print version information
3976
3977MODE must be one of the following:
3978
4886"") $echo \
4887"Usage: $modename [OPTION]... [MODE-ARG]...
4888
4889Provide generalized library-building support services.
4890
4891 --config show all configuration variables
4892 --debug enable verbose shell tracing
4893-n, --dry-run display commands without modifying any files
4894 --features display basic configuration information and exit
4895 --finish same as \`--mode=finish'
4896 --help display this help message and exit
4897 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
4898 --quiet same as \`--silent'
4899 --silent don't print informational messages
4900 --version print version information
4901
4902MODE must be one of the following:
4903
4904 clean remove files from the build directory
3979 compile compile a source file into a libtool object
3980 execute automatically set library path, then run a program
3981 finish complete the installation of libtool libraries
3982 install install libraries or executables
3983 link create a library or an executable
3984 uninstall remove libraries from an installed directory
3985
3986MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
3987a more detailed description of MODE."
3988 exit 0
3989 ;;
3990
4905 compile compile a source file into a libtool object
4906 execute automatically set library path, then run a program
4907 finish complete the installation of libtool libraries
4908 install install libraries or executables
4909 link create a library or an executable
4910 uninstall remove libraries from an installed directory
4911
4912MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
4913a more detailed description of MODE."
4914 exit 0
4915 ;;
4916
4917clean)
4918 $echo \
4919"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
4920
4921Remove files from the build directory.
4922
4923RM is the name of the program to use to delete files associated with each FILE
4924(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4925to RM.
4926
4927If FILE is a libtool library, object or program, all the files associated
4928with it are deleted. Otherwise, only FILE itself is deleted using RM."
4929 ;;
4930
3991compile)
3992 $echo \
3993"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
3994
3995Compile a source file into a libtool library object.
3996
3997This mode accepts the following additional options:
3998
3999 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
4931compile)
4932 $echo \
4933"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
4934
4935Compile a source file into a libtool library object.
4936
4937This mode accepts the following additional options:
4938
4939 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
4940 -prefer-pic try to building PIC objects only
4941 -prefer-non-pic try to building non-PIC objects only
4000 -static always build a \`.o' file suitable for static linking
4001
4002COMPILE-COMMAND is a command to be used in creating a \`standard' object file
4003from the given SOURCEFILE.
4004
4005The output file name is determined by removing the directory component from
4006SOURCEFILE, then substituting the C source code suffix \`.c' with the
4007library object suffix, \`.lo'."

--- 63 unchanged lines hidden (view full) ---

4071 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
4072 -export-symbols SYMFILE
4073 try to export only the symbols listed in SYMFILE
4074 -export-symbols-regex REGEX
4075 try to export only the symbols matching REGEX
4076 -LLIBDIR search LIBDIR for required installed libraries
4077 -lNAME OUTPUT-FILE requires the installed library libNAME
4078 -module build a library that can dlopened
4942 -static always build a \`.o' file suitable for static linking
4943
4944COMPILE-COMMAND is a command to be used in creating a \`standard' object file
4945from the given SOURCEFILE.
4946
4947The output file name is determined by removing the directory component from
4948SOURCEFILE, then substituting the C source code suffix \`.c' with the
4949library object suffix, \`.lo'."

--- 63 unchanged lines hidden (view full) ---

5013 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
5014 -export-symbols SYMFILE
5015 try to export only the symbols listed in SYMFILE
5016 -export-symbols-regex REGEX
5017 try to export only the symbols matching REGEX
5018 -LLIBDIR search LIBDIR for required installed libraries
5019 -lNAME OUTPUT-FILE requires the installed library libNAME
5020 -module build a library that can dlopened
5021 -no-fast-install disable the fast-install mode
5022 -no-install link a not-installable executable
4079 -no-undefined declare that a library does not refer to external symbols
4080 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
4081 -release RELEASE specify package release information
4082 -rpath LIBDIR the created library will eventually be installed in LIBDIR
4083 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
4084 -static do not do any dynamic linking of libtool libraries
4085 -version-info CURRENT[:REVISION[:AGE]]
4086 specify library version info [each variable defaults to 0]

--- 48 unchanged lines hidden ---
5023 -no-undefined declare that a library does not refer to external symbols
5024 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
5025 -release RELEASE specify package release information
5026 -rpath LIBDIR the created library will eventually be installed in LIBDIR
5027 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
5028 -static do not do any dynamic linking of libtool libraries
5029 -version-info CURRENT[:REVISION[:AGE]]
5030 specify library version info [each variable defaults to 0]

--- 48 unchanged lines hidden ---