1 diff -rup ace-1.2-orig/games/golf.c ace-1.2/games/golf.c
2 --- ace-1.2-orig/games/golf.c 2001-04-15 02:26:57.000000000 -0400
3 +++ ace-1.2/games/golf.c 2008-02-07 12:23:56.000000000 -0500
4 @@ -31,7 +31,7 @@ Picture *arrow, *no_arrow;
6 Stack *deck, *discard, *stacks[7];
8 -static int table_width, table_height;
9 +int table_width, table_height;
11 int supress_arrows = 0;
13 diff -rup ace-1.2-orig/games/solitaire.c ace-1.2/games/solitaire.c
14 --- ace-1.2-orig/games/solitaire.c 2001-05-05 22:57:49.000000000 -0400
15 +++ ace-1.2/games/solitaire.c 2008-02-07 12:25:12.000000000 -0500
16 @@ -337,7 +337,7 @@ auto_move()
17 return something_moved;
22 check_for_end_of_game()
25 Only in ace-1.2: libtool
26 diff -rup ace-1.2-orig/ltconfig ace-1.2/ltconfig
27 --- ace-1.2-orig/ltconfig 2001-04-07 23:19:19.000000000 -0400
28 +++ ace-1.2/ltconfig 2007-06-11 04:53:14.000000000 -0400
32 -# ltconfig - Create a system-specific libtool.
33 -# Copyright (C) 1996-1999 Free Software Foundation, Inc.
34 -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
36 -# This file is free software; you can redistribute it and/or modify it
37 -# under the terms of the GNU General Public License as published by
38 -# the Free Software Foundation; either version 2 of the License, or
39 -# (at your option) any later version.
41 -# This program is distributed in the hope that it will be useful, but
42 -# WITHOUT ANY WARRANTY; without even the implied warranty of
43 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44 -# General Public License for more details.
46 -# You should have received a copy of the GNU General Public License
47 -# along with this program; if not, write to the Free Software
48 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
50 -# As a special exception to the GNU General Public License, if you
51 -# distribute this file as part of a program that contains a
52 -# configuration script generated by Autoconf, you may include it under
53 -# the same distribution terms that you use for the rest of that program.
55 -# A lot of this script is taken from autoconf-2.10.
57 -# Check that we are running under the correct shell.
58 -SHELL=${CONFIG_SHELL-/bin/sh}
60 -if test "X$1" = X--no-reexec; then
61 - # Discard the --no-reexec flag, and continue.
63 -elif test "X$1" = X--fallback-echo; then
64 - # Avoid inline document here, it may be left over
66 -elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
67 - # Yippee, $echo works!
70 - # Restart under the correct shell.
71 - exec "$SHELL" "$0" --no-reexec ${1+"$@"}
74 -if test "X$1" = X--fallback-echo; then
75 - # used as fallback echo
83 -# Find the correct PATH separator. Usually this is `:', but
84 -# DJGPP uses `;' like DOS.
85 -if test "X${PATH_SEPARATOR+set}" != Xset; then
86 - UNAME=${UNAME-`uname 2>/dev/null`}
88 - *-DOS) PATH_SEPARATOR=';' ;;
89 - *) PATH_SEPARATOR=':' ;;
93 -# The HP-UX ksh and POSIX shell print the target directory to stdout
95 -if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
97 -if test "X${echo_test_string+set}" != Xset; then
98 - # find a string as large as possible, as long as the shell can cope with it
99 - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
100 - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
101 - if (echo_test_string="`eval $cmd`") 2>/dev/null &&
102 - echo_test_string="`eval $cmd`" &&
103 - (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
109 -if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
110 - test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
111 - # The Solaris, AIX, and Digital Unix default echo programs unquote
112 - # backslashes. This makes it impossible to quote backslashes using
113 - # echo "$something" | sed 's/\\/\\\\/g'
115 - # So, first we look for a working echo in the user's PATH.
117 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
118 - for dir in $PATH /usr/ucb; do
119 - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
120 - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
121 - test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
128 - if test "X$echo" = Xecho; then
129 - # We didn't find a better echo, so look for alternatives.
130 - if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
131 - test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
132 - # This shell has a builtin print -r that does the trick.
134 - elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
135 - test "X$CONFIG_SHELL" != X/bin/ksh; then
136 - # If we have ksh, try running ltconfig again with it.
137 - ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
138 - export ORIGINAL_CONFIG_SHELL
139 - CONFIG_SHELL=/bin/ksh
140 - export CONFIG_SHELL
141 - exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
143 - # Try using printf.
144 - echo='printf "%s\n"'
145 - if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
146 - test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
147 - # Cool, printf works
149 - elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
150 - test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
151 - CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
152 - export CONFIG_SHELL
153 - SHELL="$CONFIG_SHELL"
155 - echo="$CONFIG_SHELL $0 --fallback-echo"
156 - elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
157 - test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
158 - echo="$CONFIG_SHELL $0 --fallback-echo"
160 - # maybe with a smaller string...
163 - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
164 - if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
170 - if test "$prev" != 'sed 50q "$0"'; then
171 - echo_test_string=`eval $prev`
172 - export echo_test_string
173 - exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
175 - # Oops. We lost completely, so just stick with echo.
183 -# Sed substitution that helps us do robust quoting. It backslashifies
184 -# metacharacters that are still active within double-quoted strings.
185 -Xsed='sed -e s/^X//'
186 -sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
188 -# Same as above, but do not quote variable references.
189 -double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
191 -# Sed substitution to delay expansion of an escaped shell variable in a
192 -# double_quote_subst'ed string.
193 -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
195 -# The name of this program.
196 -progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
202 -TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
203 -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
204 -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
207 -help="Try \`$progname --help' for more information."
210 -default_ofile=libtool
211 -can_build_shared=yes
213 -# All known linkers require a `.a' archive for static linking (except M$VC,
214 -# which needs '.lib').
216 -enable_fast_install=yes
217 -enable_dlopen=unknown
226 -ofile="$default_ofile"
239 -old_CFLAGS="$CFLAGS"
240 -old_CPPFLAGS="$CPPFLAGS"
241 -old_LDFLAGS="$LDFLAGS"
246 -old_RANLIB="$RANLIB"
247 -old_DLLTOOL="$DLLTOOL"
248 -old_OBJDUMP="$OBJDUMP"
251 -# Parse the command line options.
257 - -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
261 - # If the previous option needs an argument, assign it.
262 - if test -n "$prev"; then
263 - eval "$prev=\$option"
270 -Usage: $progname [OPTION]... [HOST [LTMAIN]]
272 -Generate a system-specific libtool script.
274 - --debug enable verbose shell tracing
275 - --disable-shared do not build shared libraries
276 - --disable-static do not build static libraries
277 - --disable-fast-install do not optimize for fast installation
278 - --enable-dlopen enable dlopen support
279 - --enable-win32-dll enable building dlls on win32 hosts
280 - --help display this help and exit
281 - --no-verify do not verify that HOST is a valid host type
282 --o, --output=FILE specify the output file [default=$default_ofile]
283 - --quiet same as \`--silent'
284 - --silent do not print informational messages
285 - --srcdir=DIR find \`config.guess' in DIR
286 - --version output version information and exit
287 - --with-gcc assume that the GNU C compiler will be used
288 - --with-gnu-ld assume that the C compiler uses the GNU linker
289 - --disable-lock disable file locking
290 - --cache-file=FILE configure cache file
292 -LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
293 -that provides basic libtool functionality.
295 -HOST is the canonical host system name [default=guessed].
301 - echo "$progname: enabling shell trace mode"
305 - --disable-shared) enable_shared=no ;;
307 - --disable-static) enable_static=no ;;
309 - --disable-fast-install) enable_fast_install=no ;;
311 - --enable-dlopen) enable_dlopen=yes ;;
313 - --enable-win32-dll) enable_win32_dll=yes ;;
315 - --quiet | --silent) silent=yes ;;
317 - --srcdir) prev=srcdir ;;
318 - --srcdir=*) srcdir="$optarg" ;;
320 - --no-verify) verify_host=no ;;
322 - --output | -o) prev=ofile ;;
323 - --output=*) ofile="$optarg" ;;
325 - --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
327 - --with-gcc) with_gcc=yes ;;
328 - --with-gnu-ld) with_gnu_ld=yes ;;
330 - --disable-lock) need_locks=no ;;
332 - --cache-file=*) cache_file="$optarg" ;;
335 - echo "$progname: unrecognized option \`$option'" 1>&2
341 - if test -z "$ltmain"; then
343 - elif test -z "$host"; then
344 -# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
345 -# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
346 -# echo "$progname: warning \`$option' is not a valid host type" 1>&2
350 - echo "$progname: too many arguments" 1>&2
357 -if test -z "$ltmain"; then
358 - echo "$progname: you must specify a LTMAIN file" 1>&2
363 -if test ! -f "$ltmain"; then
364 - echo "$progname: \`$ltmain' does not exist" 1>&2
369 -# Quote any args containing shell metacharacters.
374 - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
375 - ltconfig_args="$ltconfig_args '$arg'" ;;
376 - *) ltconfig_args="$ltconfig_args $arg" ;;
380 -# A relevant subset of AC_INIT.
382 -# File descriptor usage:
385 -# 2 errors and warnings
386 -# 3 some systems may open it to /dev/tty
387 -# 4 used on the Kubota Titan
388 -# 5 compiler messages saved in config.log
389 -# 6 checking for... messages and results
390 -if test "$silent" = yes; then
395 -exec 5>>./config.log
398 -# Only set LANG and LC_ALL to C if already set.
399 -# These must not be set unconditionally because not all systems understand
400 -# e.g. LANG=C (notably SCO).
401 -if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
402 -if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
404 -if test -n "$cache_file" && test -r "$cache_file"; then
405 - echo "loading cache $cache_file within ltconfig"
409 -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
410 - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
411 - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
415 - ac_n=-n ac_c= ac_t=
418 - ac_n= ac_c='\c' ac_t=
421 -if test -z "$srcdir"; then
422 - # Assume the source directory is the same one as the path to LTMAIN.
423 - srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
424 - test "$srcdir" = "$ltmain" && srcdir=.
427 -trap "$rm conftest*; exit 1" 1 2 15
428 -if test "$verify_host" = yes; then
429 - # Check for config.guess and config.sub.
431 - for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
432 - if test -f $ac_dir/config.guess; then
437 - if test -z "$ac_aux_dir"; then
438 - echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
442 - ac_config_guess=$ac_aux_dir/config.guess
443 - ac_config_sub=$ac_aux_dir/config.sub
445 - # Make sure we can run config.sub.
446 - if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
448 - echo "$progname: cannot run $ac_config_sub" 1>&2
453 - echo $ac_n "checking host system type""... $ac_c" 1>&6
456 - case "$host_alias" in
458 - if host_alias=`$SHELL $ac_config_guess`; then :
460 - echo "$progname: cannot guess host type; you must specify one" 1>&2
465 - host=`$SHELL $ac_config_sub $host_alias`
466 - echo "$ac_t$host" 1>&6
468 - # Make sure the host verified.
469 - test -z "$host" && exit 1
471 -elif test -z "$host"; then
472 - echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
479 -# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
482 -linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
485 -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
486 -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
487 -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
491 - # AIX sometimes has problems with the GCC collect2 program. For some
492 - # reason, if we set the COLLECT_NAMES environment variable, the problems
493 - # vanish in a puff of smoke.
494 - if test "X${COLLECT_NAMES+set}" != Xset; then
496 - export COLLECT_NAMES
501 -# Determine commands to create old-style static archives.
502 -old_archive_cmds='$AR cru $oldlib$oldobjs'
503 -old_postinstall_cmds='chmod 644 $oldlib'
504 -old_postuninstall_cmds=
506 -# Set a sane default for `AR'.
507 -test -z "$AR" && AR=ar
509 -# Set a sane default for `OBJDUMP'.
510 -test -z "$OBJDUMP" && OBJDUMP=objdump
512 -# If RANLIB is not set, then run the test.
513 -if test "${RANLIB+set}" != "set"; then
516 - echo $ac_n "checking for ranlib... $ac_c" 1>&6
517 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
518 - for dir in $PATH; do
519 - test -z "$dir" && dir=.
520 - if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
528 - echo "$ac_t$result" 1>&6
531 -if test -n "$RANLIB"; then
532 - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
533 - old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
536 -# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
537 -test -z "$DLLTOOL" && DLLTOOL=dlltool
538 -test -z "$OBJDUMP" && OBJDUMP=objdump
539 -test -z "$AS" && AS=as
541 -# Check to see if we are using GCC.
542 -if test "$with_gcc" != yes || test -z "$CC"; then
543 - # If CC is not set, then try to find GCC or a usable CC.
544 - if test -z "$CC"; then
545 - echo $ac_n "checking for gcc... $ac_c" 1>&6
546 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
547 - for dir in $PATH; do
548 - test -z "$dir" && dir=.
549 - if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
556 - if test -n "$CC"; then
557 - echo "$ac_t$CC" 1>&6
559 - echo "$ac_t"no 1>&6
563 - # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
564 - if test -z "$CC"; then
565 - echo $ac_n "checking for cc... $ac_c" 1>&6
566 - IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
568 - for dir in $PATH; do
569 - test -z "$dir" && dir=.
570 - if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
571 - if test "$dir/cc" = "/usr/ucb/cc"; then
580 - if test $cc_rejected = yes; then
581 - # We found a bogon in the path, so make sure we never use it.
584 - if test $# -gt 0; then
585 - # We chose a different compiler from the bogus one.
586 - # However, it has the same name, so the bogon will be chosen
587 - # first if we set CC to just the name; use the full file name.
589 - set dummy "$dir/cc" "$@"
595 - if test -n "$CC"; then
596 - echo "$ac_t$CC" 1>&6
598 - echo "$ac_t"no 1>&6
601 - if test -z "$CC"; then
602 - echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
607 - # Now see if the compiler is really GCC.
609 - echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
610 - echo "$progname:581: checking whether we are using GNU C" >&5
613 - cat > conftest.c <<EOF
618 - if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
622 - echo "$ac_t$with_gcc" 1>&6
625 -# Allow CC to be a program name with arguments.
629 -echo $ac_n "checking for object suffix... $ac_c" 1>&6
631 -echo 'int i = 1;' > conftest.c
632 -echo "$progname:603: checking for object suffix" >& 5
633 -if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
634 - # Append any warnings to the config.log.
635 - cat conftest.err 1>&5
637 - for ac_file in conftest.*; do
640 - *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
644 - cat conftest.err 1>&5
645 - echo "$progname: failed program was:" >&5
649 -echo "$ac_t$objext" 1>&6
651 -echo $ac_n "checking for executable suffix... $ac_c" 1>&6
652 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
653 - echo $ac_n "(cached) $ac_c" 1>&6
657 - echo 'main () { return 0; }' > conftest.c
658 - echo "$progname:629: checking for executable suffix" >& 5
659 - if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
660 - # Append any warnings to the config.log.
661 - cat conftest.err 1>&5
663 - for ac_file in conftest.*; do
665 - *.c | *.err | *.$objext ) ;;
666 - *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
670 - cat conftest.err 1>&5
671 - echo "$progname: failed program was:" >&5
676 -if test "X$ac_cv_exeext" = Xno; then
679 - exeext="$ac_cv_exeext"
681 -echo "$ac_t$ac_cv_exeext" 1>&6
683 -echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
685 -special_shlib_compile_flags=
690 -if test "$with_gcc" = yes; then
692 - link_static_flag='-static'
695 - beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
696 - # PIC is the default for these OSes.
699 - # Below there is a dirty hack to force normal static linking with -ldl
700 - # The problem is because libdl dynamically linked with both libc and
701 - # libC (AIX C++ library), which obviously doesn't included in libraries
702 - # list by gcc. This cause undefined symbols with -static flags.
703 - # This hack allows C programs to be linked with "-static -ldl", but
704 - # we not sure about C++ programs.
705 - link_static_flag="$link_static_flag ${wl}-lC"
707 - cygwin* | mingw* | os2*)
708 - # We can build DLLs from non-PIC.
711 - # FIXME: we need at least 68020 code to build shared libraries, but
712 - # adding the `-m68020' flag to GCC prevents building anything better,
714 - pic_flag='-m68020 -resident32 -malways-restore-a4'
717 - if test -d /usr/nec; then
718 - pic_flag=-Kconform_pic
726 - # PORTME Check for PIC flags for the system compiler.
729 - # All AIX code is PIC.
730 - link_static_flag='-bnso -bI:/lib/syscalls.exp'
733 - hpux9* | hpux10* | hpux11*)
734 - # Is there a better link_static_flag that works with the bundled CC?
736 - link_static_flag="${wl}-a ${wl}archive"
742 - link_static_flag='-non_shared'
743 - # PIC (with -KPIC) is the default.
746 - cygwin* | mingw* | os2*)
747 - # We can build DLLs from non-PIC.
750 - osf3* | osf4* | osf5*)
751 - # All OSF/1 code is PIC.
753 - link_static_flag='-non_shared'
758 - link_static_flag='-dn'
759 - special_shlib_compile_flags='-belf'
764 - link_static_flag='-Bstatic'
770 - link_static_flag='-Bstatic'
774 - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
776 - link_static_flag='-Bstatic'
782 - link_static_flag='-Bstatic'
785 - if test -d /usr/nec ;then
786 - pic_flag='-Kconform_pic'
787 - link_static_flag='-Bstatic'
791 - can_build_shared=no
796 -if test -n "$pic_flag"; then
797 - echo "$ac_t$pic_flag" 1>&6
799 - # Check to make sure the pic_flag actually works.
800 - echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
802 - echo "int some_variable = 0;" > conftest.c
803 - save_CFLAGS="$CFLAGS"
804 - CFLAGS="$CFLAGS $pic_flag -DPIC"
805 - echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
806 - if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
807 - # Append any warnings to the config.log.
808 - cat conftest.err 1>&5
811 - hpux9* | hpux10* | hpux11*)
812 - # On HP-UX, both CC and GCC only warn that PIC is supported... then they
813 - # create non-PIC objects. So, if there were any warnings, we assume that
814 - # PIC is not supported.
815 - if test -s conftest.err; then
816 - echo "$ac_t"no 1>&6
817 - can_build_shared=no
820 - echo "$ac_t"yes 1>&6
821 - pic_flag=" $pic_flag"
825 - echo "$ac_t"yes 1>&6
826 - pic_flag=" $pic_flag"
830 - # Append any errors to the config.log.
831 - cat conftest.err 1>&5
832 - can_build_shared=no
834 - echo "$ac_t"no 1>&6
836 - CFLAGS="$save_CFLAGS"
839 - echo "$ac_t"none 1>&6
842 -# Check to see if options -o and -c are simultaneously supported by compiler
843 -echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
844 -$rm -r conftest 2>/dev/null
848 -echo "int some_variable = 0;" > conftest.c
850 -# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
851 -# that will create temporary files in the current directory regardless of
852 -# the output directory. Thus, making CWD read-only will cause this test
853 -# to fail, enabling locking or at least warning the user not to do parallel
856 -save_CFLAGS="$CFLAGS"
857 -CFLAGS="$CFLAGS -o out/conftest2.o"
858 -echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
859 -if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
861 - # The compiler can only warn and ignore the option if not recognized
862 - # So say no if there are warnings
863 - if test -s out/conftest.err; then
864 - echo "$ac_t"no 1>&6
867 - echo "$ac_t"yes 1>&6
871 - # Append any errors to the config.log.
872 - cat out/conftest.err 1>&5
874 - echo "$ac_t"no 1>&6
876 -CFLAGS="$save_CFLAGS"
882 -$rm -r conftest 2>/dev/null
884 -if test x"$compiler_c_o" = x"yes"; then
885 - # Check to see if we can write to a .lo
886 - echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
888 - echo "int some_variable = 0;" > conftest.c
889 - save_CFLAGS="$CFLAGS"
890 - CFLAGS="$CFLAGS -c -o conftest.lo"
891 - echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
892 -if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
894 - # The compiler can only warn and ignore the option if not recognized
895 - # So say no if there are warnings
896 - if test -s conftest.err; then
897 - echo "$ac_t"no 1>&6
900 - echo "$ac_t"yes 1>&6
904 - # Append any errors to the config.log.
905 - cat conftest.err 1>&5
907 - echo "$ac_t"no 1>&6
909 - CFLAGS="$save_CFLAGS"
915 -# Check to see if we can do hard links to lock some files if needed
916 -hard_links="nottested"
917 -if test "$compiler_c_o" = no && test "$need_locks" != no; then
918 - # do not overwrite the value of need_locks provided by the user
919 - echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
922 - ln conftest.a conftest.b 2>/dev/null && hard_links=no
924 - ln conftest.a conftest.b 2>&5 || hard_links=no
925 - ln conftest.a conftest.b 2>/dev/null && hard_links=no
926 - echo "$ac_t$hard_links" 1>&6
928 - if test "$hard_links" = no; then
929 - echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
936 -if test "$with_gcc" = yes; then
937 - # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
938 - echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
940 - echo "int some_variable = 0;" > conftest.c
941 - save_CFLAGS="$CFLAGS"
942 - CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
943 - echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
944 - if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
946 - # The compiler can only warn and ignore the option if not recognized
947 - # So say no if there are warnings
948 - if test -s conftest.err; then
949 - echo "$ac_t"no 1>&6
950 - compiler_rtti_exceptions=no
952 - echo "$ac_t"yes 1>&6
953 - compiler_rtti_exceptions=yes
956 - # Append any errors to the config.log.
957 - cat conftest.err 1>&5
958 - compiler_rtti_exceptions=no
959 - echo "$ac_t"no 1>&6
961 - CFLAGS="$save_CFLAGS"
964 - if test "$compiler_rtti_exceptions" = "yes"; then
965 - no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
967 - no_builtin_flag=' -fno-builtin'
972 -# Check for any special shared library compilation flags.
973 -if test -n "$special_shlib_compile_flags"; then
974 - echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
975 - if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
977 - echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
978 - can_build_shared=no
982 -echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
984 -echo 'main(){return(0);}' > conftest.c
985 -save_LDFLAGS="$LDFLAGS"
986 -LDFLAGS="$LDFLAGS $link_static_flag"
987 -echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
988 -if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
989 - echo "$ac_t$link_static_flag" 1>&6
991 - echo "$ac_t"none 1>&6
994 -LDFLAGS="$save_LDFLAGS"
997 -if test -z "$LN_S"; then
998 - # Check to see if we can use ln -s, or we need hard links.
999 - echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
1001 - if ln -s X conftest.dat 2>/dev/null; then
1007 - if test "$LN_S" = "ln -s"; then
1008 - echo "$ac_t"yes 1>&6
1010 - echo "$ac_t"no 1>&6
1014 -# Make sure LD is an absolute path.
1015 -if test -z "$LD"; then
1017 - if test "$with_gcc" = yes; then
1018 - # Check if gcc -print-prog-name=ld gives a path.
1019 - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
1020 - echo "$progname:991: checking for ld used by GCC" >&5
1021 - ac_prog=`($CC -print-prog-name=ld) 2>&5`
1022 - case "$ac_prog" in
1023 - # Accept absolute paths.
1024 - [\\/]* | [A-Za-z]:[\\/]*)
1025 - re_direlt='/[^/][^/]*/\.\./'
1026 - # Canonicalize the path of ld
1027 - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1028 - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1029 - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1031 - test -z "$LD" && LD="$ac_prog"
1034 - # If it fails, then pretend we are not using GCC.
1038 - # If it is relative, then search for the first ld in PATH.
1039 - with_gnu_ld=unknown
1042 - elif test "$with_gnu_ld" = yes; then
1043 - echo $ac_n "checking for GNU ld... $ac_c" 1>&6
1044 - echo "$progname:1015: checking for GNU ld" >&5
1046 - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1047 - echo "$progname:1018: checking for non-GNU ld" >&5
1050 - if test -z "$LD"; then
1051 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1052 - for ac_dir in $PATH; do
1053 - test -z "$ac_dir" && ac_dir=.
1054 - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1055 - LD="$ac_dir/$ac_prog"
1056 - # Check to see if the program is GNU ld. I'd rather use --version,
1057 - # but apparently some GNU ld's only accept -v.
1058 - # Break only if it was the GNU/non-GNU ld that we prefer.
1059 - if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1060 - test "$with_gnu_ld" != no && break
1062 - test "$with_gnu_ld" != yes && break
1066 - IFS="$ac_save_ifs"
1069 - if test -n "$LD"; then
1070 - echo "$ac_t$LD" 1>&6
1072 - echo "$ac_t"no 1>&6
1075 - if test -z "$LD"; then
1076 - echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
1081 -# Check to see if it really is or is not GNU ld.
1082 -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
1083 -# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1084 -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1089 -echo "$ac_t$with_gnu_ld" 1>&6
1091 -# See if the linker supports building shared libraries.
1092 -echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
1094 -allow_undefined_flag=
1096 -need_lib_prefix=unknown
1097 -need_version=unknown
1098 -# when you set need_version to no, make sure it does not cause -set_version
1099 -# flags to be left without arguments
1101 -archive_expsym_cmds=
1102 -old_archive_from_new_cmds=
1103 -export_dynamic_flag_spec=
1104 -whole_archive_flag_spec=
1105 -thread_safe_flag_spec=
1106 -hardcode_libdir_flag_spec=
1107 -hardcode_libdir_separator=
1109 -hardcode_minus_L=no
1110 -hardcode_shlibpath_var=unsupported
1112 -always_export_symbols=no
1113 -export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1114 -# include_expsyms should be a list of space-separated symbols to be *always*
1115 -# included in the symbol list
1117 -# exclude_expsyms can be an egrep regular expression of symbols to exclude
1118 -# it will be wrapped by ` (' and `)$', so one must not match beginning or
1119 -# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1120 -# as well as any symbol that contains `d'.
1121 -exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1122 -# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1123 -# platforms (ab)use it in PIC code, but their linkers get confused if
1124 -# the symbol is explicitly referenced. Since portable code cannot
1125 -# rely on this symbol name, it's probably fine to never include it in
1126 -# preloaded symbol tables.
1130 - # FIXME: the MSVC++ port hasn't been tested in a loooong time
1131 - # When not using gcc, we currently assume that we are using
1132 - # Microsoft Visual C++.
1133 - if test "$with_gcc" != yes; then
1141 -if test "$with_gnu_ld" = yes; then
1142 - # If archive_cmds runs LD, not CC, wlarc should be empty
1145 - # See if GNU ld supports shared libraries.
1146 - case "$host_os" in
1148 - # On AIX, the GNU linker is very broken
1152 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported
1153 -*** to be unable to reliably create shared libraries on AIX.
1154 -*** Therefore, libtool is disabling shared libraries support. If you
1155 -*** really care for shared libraries, you may want to modify your PATH
1156 -*** so that a non-GNU linker is found, and then restart.
1162 - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1163 - hardcode_libdir_flag_spec='-L$libdir'
1164 - hardcode_minus_L=yes
1166 - # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1167 - # that the semantics of dynamic libraries on AmigaOS, at least up
1168 - # to version 4, is to share data among multiple programs linked
1169 - # with the same dynamic library. Since this doesn't match the
1170 - # behavior of shared libraries on other platforms, we can use
1176 - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1177 - allow_undefined_flag=unsupported
1178 - # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1179 - # support --undefined. This deserves some investigation. FIXME
1180 - archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1187 - # hardcode_libdir_flag_spec is actually meaningless, as there is
1188 - # no search path for DLLs.
1189 - hardcode_libdir_flag_spec='-L$libdir'
1190 - allow_undefined_flag=unsupported
1191 - always_export_symbols=yes
1193 - # Extract the symbol export list from an `--export-all' def file,
1194 - # then regenerate the def file from the symbol export list, so that
1195 - # the compiled dll only exports the symbol export list.
1196 - export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1197 - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1198 - $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
1199 - sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
1201 - archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1203 - for symbol in `cat $export_symbols`; do
1204 - echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
1205 - _lt_hint=`expr 1 + \$_lt_hint`;
1207 - test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
1208 - test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
1209 - $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1210 - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1211 - $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
1212 - $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1213 - $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
1215 - old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
1219 - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1220 - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1221 - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1223 - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
1224 - # can we support soname and/or expsyms with a.out? -oliva
1228 - solaris* | sysv5*)
1229 - if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1233 -*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1234 -*** create shared libraries on Solaris systems. Therefore, libtool
1235 -*** is disabling shared libraries support. We urge you to upgrade GNU
1236 -*** binutils to release 2.9.1 or newer. Another option is to modify
1237 -*** your PATH or compiler configuration so that the native linker is
1238 -*** used, and then restart.
1241 - elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1242 - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1243 - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1250 - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
1252 - hardcode_direct=yes
1253 - hardcode_shlibpath_var=no
1257 - if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1258 - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
1259 - archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1266 - if test "$ld_shlibs" = yes; then
1267 - runpath_var=LD_RUN_PATH
1268 - hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1269 - export_dynamic_flag_spec='${wl}--export-dynamic'
1272 - # dlltool doesn't understand --whole-archive et. al.
1273 - whole_archive_flag_spec=
1276 - # ancient GNU ld didn't support --whole-archive et. al.
1277 - if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1278 - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1280 - whole_archive_flag_spec=
1286 - # PORTME fill in a description of your system's linker (not GNU ld)
1287 - case "$host_os" in
1289 - allow_undefined_flag=unsupported
1290 - always_export_symbols=yes
1291 - archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1292 - # Note: this linker hardcodes the directories in LIBPATH if there
1293 - # are no directories specified by -L.
1294 - hardcode_minus_L=yes
1295 - if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1296 - # Neither direct hardcoding nor static linking is supported with a
1297 - # broken collect2.
1298 - hardcode_direct=unsupported
1303 - hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1304 - hardcode_libdir_separator=':'
1305 - if test "$with_gcc" = yes; then
1306 - collect2name=`${CC} -print-prog-name=collect2`
1307 - if test -f "$collect2name" && \
1308 - strings "$collect2name" | grep resolve_lib_name >/dev/null
1310 - # We have reworked collect2
1311 - hardcode_direct=yes
1313 - # We have old collect2
1314 - hardcode_direct=unsupported
1315 - # It fails to find uninstalled libraries when the uninstalled
1316 - # path is not listed in the libpath. Setting hardcode_minus_L
1317 - # to unsupported forces relinking
1318 - hardcode_minus_L=yes
1319 - hardcode_libdir_flag_spec='-L$libdir'
1320 - hardcode_libdir_separator=
1322 - shared_flag='-shared'
1324 - shared_flag='${wl}-bM:SRE'
1325 - hardcode_direct=yes
1327 - allow_undefined_flag=' ${wl}-berok'
1328 - archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1329 - archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1330 - case "$host_os" in aix4.[01]|aix4.[01].*)
1331 - # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1332 - always_export_symbols=yes ;;
1337 - archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
1338 - hardcode_libdir_flag_spec='-L$libdir'
1339 - hardcode_minus_L=yes
1340 - # see comment about different semantics on the GNU ld section
1345 - # When not using gcc, we currently assume that we are using
1346 - # Microsoft Visual C++.
1347 - # hardcode_libdir_flag_spec is actually meaningless, as there is
1348 - # no search path for DLLs.
1349 - hardcode_libdir_flag_spec=' '
1350 - allow_undefined_flag=unsupported
1351 - # Tell ltmain to make .lib files, not .a files.
1353 - # FIXME: Setting linknames here is a bad hack.
1354 - archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1355 - # The linker will automatically build a .lib file if we build a DLL.
1356 - old_archive_from_new_cmds='true'
1357 - # FIXME: Should let the user specify the lib program.
1358 - old_archive_cmds='lib /OUT:$oldlib$oldobjs'
1359 - fix_srcfile_path='`cygpath -w $srcfile`'
1366 - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1367 - # support. Future versions do this automatically, but an explicit c++rt0.o
1368 - # does not break anything, and helps significantly (at the cost of a little
1371 - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
1372 - hardcode_libdir_flag_spec='-R$libdir'
1373 - hardcode_direct=yes
1374 - hardcode_shlibpath_var=no
1377 - # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1379 - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1380 - hardcode_direct=yes
1381 - hardcode_minus_L=yes
1382 - hardcode_shlibpath_var=no
1385 - # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1387 - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
1388 - hardcode_libdir_flag_spec='-R$libdir'
1389 - hardcode_direct=yes
1390 - hardcode_shlibpath_var=no
1393 - hpux9* | hpux10* | hpux11*)
1394 - case "$host_os" in
1395 - hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
1396 - *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
1398 - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1399 - hardcode_libdir_separator=:
1400 - hardcode_direct=yes
1401 - hardcode_minus_L=yes # Not in the search PATH, but as the default
1402 - # location of the library.
1403 - export_dynamic_flag_spec='${wl}-E'
1407 - if test "$with_gcc" = yes; then
1408 - archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1410 - archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1412 - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1413 - hardcode_libdir_separator=:
1417 - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1418 - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
1420 - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
1422 - hardcode_libdir_flag_spec='${wl}-R$libdir'
1423 - hardcode_direct=yes
1424 - hardcode_shlibpath_var=no
1428 - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
1429 - hardcode_libdir_flag_spec='-R$libdir'
1430 - hardcode_direct=yes
1431 - hardcode_shlibpath_var=no
1435 - hardcode_libdir_flag_spec='-L$libdir'
1436 - hardcode_minus_L=yes
1437 - allow_undefined_flag=unsupported
1438 - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
1439 - old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
1443 - if test "$with_gcc" = yes; then
1444 - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1445 - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1447 - allow_undefined_flag=' -expect_unresolved \*'
1448 - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1450 - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1451 - hardcode_libdir_separator=:
1454 - osf4* | osf5*) # As osf3* with the addition of the -msym flag
1455 - if test "$with_gcc" = yes; then
1456 - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1457 - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
1459 - allow_undefined_flag=' -expect_unresolved \*'
1460 - archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
1462 - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1463 - hardcode_libdir_separator=:
1467 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1468 - hardcode_shlibpath_var=no
1469 - runpath_var=LD_RUN_PATH
1470 - hardcode_runpath_var=yes
1474 - no_undefined_flag=' -z text'
1475 - # $CC -shared without GNU ld will not create a library from C++
1476 - # object files and a static libstdc++, better avoid it by now
1477 - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1478 - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1479 - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1480 - hardcode_libdir_flag_spec='-R$libdir'
1481 - hardcode_shlibpath_var=no
1482 - case "$host_os" in
1483 - solaris2.[0-5] | solaris2.[0-5].*) ;;
1484 - *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1485 - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1490 - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
1491 - hardcode_libdir_flag_spec='-L$libdir'
1492 - hardcode_direct=yes
1493 - hardcode_minus_L=yes
1494 - hardcode_shlibpath_var=no
1498 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1499 - runpath_var='LD_RUN_PATH'
1500 - hardcode_shlibpath_var=no
1501 - hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1505 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1506 - hardcode_shlibpath_var=no
1507 - export_dynamic_flag_spec='-Bexport'
1511 - no_undefined_flag=' -z text'
1512 - # $CC -shared without GNU ld will not create a library from C++
1513 - # object files and a static libstdc++, better avoid it by now
1514 - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
1515 - archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1516 - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
1517 - hardcode_libdir_flag_spec=
1518 - hardcode_shlibpath_var=no
1519 - runpath_var='LD_RUN_PATH'
1523 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1524 - hardcode_libdir_flag_spec='-L$libdir'
1525 - hardcode_shlibpath_var=no
1529 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1530 - hardcode_libdir_flag_spec='-L$libdir'
1531 - hardcode_shlibpath_var=no
1535 - if test -d /usr/nec; then
1536 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1537 - hardcode_shlibpath_var=no
1538 - runpath_var=LD_RUN_PATH
1539 - hardcode_runpath_var=yes
1545 - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
1546 - hardcode_direct=yes
1547 - hardcode_minus_L=no
1548 - hardcode_shlibpath_var=no
1549 - hardcode_runpath_var=yes
1550 - runpath_var=LD_RUN_PATH
1554 - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1555 - runpath_var='LD_RUN_PATH'
1556 - hardcode_shlibpath_var=no
1564 -echo "$ac_t$ld_shlibs" 1>&6
1565 -test "$ld_shlibs" = no && can_build_shared=no
1567 -if test -z "$NM"; then
1568 - echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
1570 - [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
1572 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
1573 - for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
1574 - test -z "$ac_dir" && ac_dir=.
1575 - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
1576 - # Check to see if the nm accepts a BSD-compat flag.
1577 - # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1578 - # nm: unknown option "B" ignored
1579 - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1580 - NM="$ac_dir/nm -B"
1582 - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1583 - NM="$ac_dir/nm -p"
1586 - NM=${NM="$ac_dir/nm"} # keep the first match, but
1587 - continue # so that we can try to find one that supports BSD flags
1591 - IFS="$ac_save_ifs"
1592 - test -z "$NM" && NM=nm
1595 - echo "$ac_t$NM" 1>&6
1598 -# Check for command to grab the raw symbol name followed by C symbol from nm.
1599 -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
1601 -# These are sane defaults that work on at least a few old systems.
1602 -# [They come from Ultrix. What could be older than Ultrix?!! ;)]
1604 -# Character class describing NM global symbol codes.
1605 -symcode='[BCDEGRST]'
1607 -# Regexp to match symbols that can be accessed directly from C.
1608 -sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1610 -# Transform the above into a raw symbol and a C symbol.
1611 -symxfrm='\1 \2\3 \3'
1613 -# Transform an extracted symbol line into a proper C declaration
1614 -global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1616 -# Define system-specific variables.
1622 - symcode='[ABCDGISTW]'
1624 -hpux*) # Its linker distinguishes data from code symbols
1625 - global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1628 - symcode='[BCDEGRST]'
1634 - symcode='[DFNSTU]'
1638 -# If we're using GNU nm, then use its standard symbol codes.
1639 -if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1640 - symcode='[ABCDGISTW]'
1643 -# Try without a prefix undercore, then with it.
1644 -for ac_symprfx in "" "_"; do
1646 - # Write the raw and C identifiers.
1647 - global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
1649 - # Check to see that the pipe works correctly.
1652 - cat > conftest.c <<EOF
1657 -void nm_test_func(){}
1661 -main(){nm_test_var='a';nm_test_func();return(0);}
1664 - echo "$progname:1635: checking if global_symbol_pipe works" >&5
1665 - if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
1666 - # Now try to grab the symbols.
1668 - if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
1670 - # Try sorting and uniquifying the output.
1671 - if sort "$nlist" | uniq > "$nlist"T; then
1672 - mv -f "$nlist"T "$nlist"
1677 - # Make sure that we snagged all the symbols we need.
1678 - if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1679 - if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1680 - cat <<EOF > conftest.c
1686 - # Now generate the symbol file.
1687 - eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
1689 - cat <<EOF >> conftest.c
1690 -#if defined (__STDC__) && __STDC__
1691 -# define lt_ptr_t void *
1693 -# define lt_ptr_t char *
1697 -/* The mapping between symbol names and symbols. */
1702 -lt_preloaded_symbols[] =
1705 - sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
1706 - cat <<\EOF >> conftest.c
1714 - # Now try linking the two files.
1715 - mv conftest.$objext conftstm.$objext
1717 - save_CFLAGS="$CFLAGS"
1718 - LIBS="conftstm.$objext"
1719 - CFLAGS="$CFLAGS$no_builtin_flag"
1720 - if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1723 - echo "$progname: failed program was:" >&5
1724 - cat conftest.c >&5
1728 - echo "cannot find nm_test_func in $nlist" >&5
1731 - echo "cannot find nm_test_var in $nlist" >&5
1734 - echo "cannot run $global_symbol_pipe" >&5
1737 - echo "$progname: failed program was:" >&5
1738 - cat conftest.c >&5
1740 - $rm conftest* conftst*
1742 - # Do not use the global_symbol_pipe unless it works.
1743 - if test "$pipe_works" = yes; then
1746 - global_symbol_pipe=
1749 -if test "$pipe_works" = yes; then
1750 - echo "${ac_t}ok" 1>&6
1752 - echo "${ac_t}failed" 1>&6
1755 -if test -z "$global_symbol_pipe"; then
1756 - global_symbol_to_cdecl=
1759 -# Check hardcoding attributes.
1760 -echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
1762 -if test -n "$hardcode_libdir_flag_spec" || \
1763 - test -n "$runpath_var"; then
1765 - # We can hardcode non-existant directories.
1766 - if test "$hardcode_direct" != no &&
1767 - # If the only mechanism to avoid hardcoding is shlibpath_var, we
1768 - # have to relink, otherwise we might link with an installed library
1769 - # when we should be linking with a yet-to-be-installed one
1770 - ## test "$hardcode_shlibpath_var" != no &&
1771 - test "$hardcode_minus_L" != no; then
1772 - # Linking always hardcodes the temporary library directory.
1773 - hardcode_action=relink
1775 - # We can link without hardcoding, and we can hardcode nonexisting dirs.
1776 - hardcode_action=immediate
1779 - # We cannot hardcode anything, or else we can only hardcode existing
1781 - hardcode_action=unsupported
1783 -echo "$ac_t$hardcode_action" 1>&6
1787 -reload_cmds='$LD$reload_flag -o $output$reload_objs'
1788 -echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
1789 -# PORTME Some linkers may need a different reload flag.
1791 -echo "$ac_t$reload_flag" 1>&6
1792 -test -n "$reload_flag" && reload_flag=" $reload_flag"
1794 -# PORTME Fill in your ld.so characteristics
1795 -library_names_spec=
1796 -libname_spec='lib$name'
1799 -postuninstall_cmds=
1803 -shlibpath_overrides_runpath=unknown
1805 -dynamic_linker="$host_os ld.so"
1806 -sys_lib_dlsearch_path_spec="/lib /usr/lib"
1807 -sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1809 -file_magic_test_file=
1810 -deplibs_check_method='unknown'
1811 -# Need to set the preceding variable on all platforms that support
1812 -# interlibrary dependencies.
1813 -# 'none' -- dependencies not supported.
1814 -# `unknown' -- same as none, but documents that we really don't know.
1815 -# 'pass_all' -- all dependencies passed with no checks.
1816 -# 'test_compile' -- check by making test program.
1817 -# 'file_magic [regex]' -- check by looking for files in library path
1818 -# which responds to the $file_magic_cmd with a given egrep regex.
1819 -# If you have `file' or equivalent on your system and you're not sure
1820 -# whether `pass_all' will *always* work, you probably want this one.
1821 -echo $ac_n "checking dynamic linker characteristics for $host_os ... $ac_c" 1>&6
1824 - version_type=linux
1825 - library_names_spec='${libname}${release}.so$versuffix $libname.a'
1826 - shlibpath_var=LIBPATH
1828 - # AIX has no versioning support, so we append a major version to the name.
1829 - soname_spec='${libname}${release}.so$major'
1833 - version_type=linux
1834 - # AIX has no versioning support, so currently we can not hardcode correct
1835 - # soname into executable. Probably we can add versioning support to
1836 - # collect2, so additional links can be useful in future.
1837 - # We preserve .a as extension for shared libraries though AIX4.2
1838 - # and later linker supports .so
1839 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1840 - shlibpath_var=LIBPATH
1841 - deplibs_check_method=pass_all
1845 - library_names_spec='$libname.ixlibrary $libname.a'
1846 - # Create ${libname}_ixlibrary.a entries in /sys/libs.
1847 - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
1851 - library_names_spec='${libname}.so'
1852 - dynamic_linker="$host_os ld.so"
1853 - shlibpath_var=LIBRARY_PATH
1854 - deplibs_check_method=pass_all
1855 - lt_cv_dlopen="load_add_on"
1856 - lt_cv_dlopen_libs=
1857 - lt_cv_dlopen_self=yes
1861 - version_type=linux
1863 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1864 - soname_spec='${libname}${release}.so$major'
1865 - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1866 - shlibpath_var=LD_LIBRARY_PATH
1867 - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1868 - file_magic_cmd=/usr/bin/file
1869 - file_magic_test_file=/shlib/libc.so
1870 - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1871 - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1872 - export_dynamic_flag_spec=-rdynamic
1873 - # the default ld.so.conf also contains /usr/contrib/lib and
1874 - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1875 - # libtool to hard-code these into programs
1879 - version_type=windows
1881 - need_lib_prefix=no
1882 - if test "$with_gcc" = yes; then
1883 - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
1885 - library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
1887 - dynamic_linker='Win32 ld.exe'
1888 - deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1889 - file_magic_cmd='${OBJDUMP} -f'
1890 - # FIXME: first we should search . and the directory the executable is in
1891 - shlibpath_var=PATH
1892 - lt_cv_dlopen="LoadLibrary"
1893 - lt_cv_dlopen_libs=
1901 - objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1902 - version_type=freebsd-$objformat
1903 - case "$version_type" in
1905 - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
1906 - file_magic_cmd=/usr/bin/file
1907 - file_magic_test_file=`echo /usr/lib/libc.so*`
1908 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1910 - need_lib_prefix=no
1913 - deplibs_check_method=unknown
1914 - library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1918 - shlibpath_var=LD_LIBRARY_PATH
1919 - case "$host_os" in
1920 - freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
1921 - shlibpath_overrides_runpath=yes
1924 - shlibpath_overrides_runpath=no
1930 - version_type=linux
1931 - need_lib_prefix=no
1933 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1934 - soname_spec='${libname}${release}.so$major'
1935 - shlibpath_var=LD_LIBRARY_PATH
1938 -hpux9* | hpux10* | hpux11*)
1939 - # Give a soname corresponding to the major version so that dld.sl refuses to
1940 - # link against other versions.
1941 - dynamic_linker="$host_os dld.sl"
1942 - version_type=sunos
1943 - need_lib_prefix=no
1945 - shlibpath_var=SHLIB_PATH
1946 - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1947 - library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1948 - soname_spec='${libname}${release}.sl$major'
1949 - # HP-UX runs *really* slowly unless shared libraries are mode 555.
1950 - postinstall_cmds='chmod 555 $lib'
1955 - need_lib_prefix=no
1957 - soname_spec='${libname}${release}.so.$major'
1958 - library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
1959 - case "$host_os" in
1961 - libsuff= shlibsuff=
1962 - # this will be overridden with pass_all, but let us keep it just in case
1963 - deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1966 - case "$LD" in # libtool.m4 will add one of these switches to LD
1967 - *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1968 - *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1969 - *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1970 - *) libsuff= shlibsuff= libmagic=never-match;;
1974 - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1975 - shlibpath_overrides_runpath=no
1976 - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1977 - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1978 - file_magic_cmd=/usr/bin/file
1979 - file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1980 - deplibs_check_method='pass_all'
1983 -# No shared lib support for Linux oldld, aout, or coff.
1984 -linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1988 -# This must be Linux ELF.
1989 -linux-gnu* | *-linux)
1990 - version_type=linux
1991 - need_lib_prefix=no
1993 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1994 - soname_spec='${libname}${release}.so$major'
1995 - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1996 - shlibpath_var=LD_LIBRARY_PATH
1997 - shlibpath_overrides_runpath=no
1998 - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
1999 - file_magic_cmd=/usr/bin/file
2000 - file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2002 - if test -f /lib/ld.so.1; then
2003 - dynamic_linker='GNU ld.so'
2005 - # Only the GNU ld.so supports shared libraries on MkLinux.
2006 - case "$host_cpu" in
2007 - powerpc*) dynamic_linker=no ;;
2008 - *) dynamic_linker='Linux ld.so' ;;
2014 - version_type=sunos
2015 - if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2016 - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2017 - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2018 - dynamic_linker='NetBSD (a.out) ld.so'
2020 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2021 - soname_spec='${libname}${release}.so$major'
2022 - dynamic_linker='NetBSD ld.elf_so'
2024 - shlibpath_var=LD_LIBRARY_PATH
2028 - version_type=sunos
2029 - if test "$with_gnu_ld" = yes; then
2030 - need_lib_prefix=no
2033 - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2034 - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2035 - shlibpath_var=LD_LIBRARY_PATH
2039 - libname_spec='$name'
2040 - need_lib_prefix=no
2041 - library_names_spec='$libname.dll $libname.a'
2042 - dynamic_linker='OS/2 ld.exe'
2043 - shlibpath_var=LIBPATH
2046 -osf3* | osf4* | osf5*)
2049 - soname_spec='${libname}${release}.so'
2050 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2051 - shlibpath_var=LD_LIBRARY_PATH
2052 - # this will be overridden with pass_all, but let us keep it just in case
2053 - deplibs_check_method='file_magic COFF format alpha shared library'
2054 - file_magic_cmd=/usr/bin/file
2055 - file_magic_test_file=/shlib/libc.so
2056 - deplibs_check_method='pass_all'
2057 - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2058 - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2063 - soname_spec='${libname}${release}.so$major'
2064 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2065 - shlibpath_var=LD_LIBRARY_PATH
2069 - version_type=linux
2070 - need_lib_prefix=no
2072 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2073 - soname_spec='${libname}${release}.so$major'
2074 - shlibpath_var=LD_LIBRARY_PATH
2075 - shlibpath_overrides_runpath=yes
2076 - # ldd complains unless libraries are executable
2077 - postinstall_cmds='chmod +x $lib'
2078 - deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
2079 - file_magic_cmd=/usr/bin/file
2080 - file_magic_test_file=/lib/libc.so
2084 - version_type=sunos
2085 - library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2086 - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2087 - shlibpath_var=LD_LIBRARY_PATH
2088 - shlibpath_overrides_runpath=yes
2089 - if test "$with_gnu_ld" = yes; then
2090 - need_lib_prefix=no
2095 -sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2096 - version_type=linux
2097 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2098 - soname_spec='${libname}${release}.so$major'
2099 - shlibpath_var=LD_LIBRARY_PATH
2100 - case "$host_vendor" in
2102 - deplibs_check_method='pass_all'
2105 - need_lib_prefix=no
2107 - shlibpath_overrides_runpath=no
2108 - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2109 - deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2110 - file_magic_cmd=/usr/bin/file
2111 - file_magic_test_file=`echo /usr/lib/libc.so*`
2117 - version_type=linux
2118 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2119 - soname_spec='${libname}${release}.so$major'
2120 - shlibpath_var=LD_LIBRARY_PATH
2124 - version_type=linux
2125 - need_lib_prefix=no
2127 - library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2128 - soname_spec='${libname}${release}.so$major'
2129 - shlibpath_var=LD_LIBRARY_PATH
2133 - if test -d /usr/nec ;then
2134 - version_type=linux
2135 - library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2136 - soname_spec='$libname.so.$major'
2137 - shlibpath_var=LD_LIBRARY_PATH
2145 -echo "$ac_t$dynamic_linker" 1>&6
2146 -test "$dynamic_linker" = no && can_build_shared=no
2148 -# Report the final consequences.
2149 -echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
2151 -# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
2152 -# configure.in, otherwise build static only libraries.
2154 -cygwin* | mingw* | os2*)
2155 - if test x$can_build_shared = xyes; then
2156 - test x$enable_win32_dll = xno && can_build_shared=no
2157 - echo "checking if package supports dlls... $can_build_shared" 1>&6
2162 -if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
2163 - case "$deplibs_check_method" in
2165 - file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2166 - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2167 - egrep "$file_magic_regex" > /dev/null; then
2172 -*** Warning: the command libtool uses to detect shared libraries,
2173 -*** $file_magic_cmd, produces output that libtool cannot recognize.
2174 -*** The result is that libtool may fail to recognize shared libraries
2175 -*** as such. This will affect the creation of libtool libraries that
2176 -*** depend on shared libraries, but programs linked with such libtool
2177 -*** libraries will work regardless of this problem. Nevertheless, you
2178 -*** may want to report the problem to your system manager and/or to
2179 -*** bug-libtool@gnu.org
2186 -echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
2187 -test "$can_build_shared" = "no" && enable_shared=no
2189 -# On AIX, shared libraries and static libraries use the same namespace, and
2190 -# are all built from PIC.
2193 - test "$enable_shared" = yes && enable_static=no
2194 - if test -n "$RANLIB"; then
2195 - archive_cmds="$archive_cmds~\$RANLIB \$lib"
2196 - postinstall_cmds='$RANLIB $lib'
2201 - test "$enable_shared" = yes && enable_static=no
2205 -echo "$ac_t$enable_shared" 1>&6
2207 -# Make sure either enable_shared or enable_static is yes.
2208 -test "$enable_shared" = yes || enable_static=yes
2210 -echo "checking whether to build static libraries... $enable_static" 1>&6
2212 -if test "$hardcode_action" = relink; then
2213 - # Fast installation is not supported
2214 - enable_fast_install=no
2215 -elif test "$shlibpath_overrides_runpath" = yes ||
2216 - test "$enable_shared" = no; then
2217 - # Fast installation is not necessary
2218 - enable_fast_install=needless
2221 -echo $ac_n "checking for objdir... $ac_c" 1>&6
2222 -rm -f .libs 2>/dev/null
2223 -mkdir .libs 2>/dev/null
2224 -if test -d .libs; then
2227 - # MS-DOS does not allow filenames that begin with a dot.
2230 -rmdir .libs 2>/dev/null
2231 -echo "$ac_t$objdir" 1>&6
2233 -if test "x$enable_dlopen" != xyes; then
2234 - enable_dlopen=unknown
2235 - enable_dlopen_self=unknown
2236 - enable_dlopen_self_static=unknown
2238 -if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
2239 - lt_cv_dlopen=no lt_cv_dlopen_libs=
2240 -echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2241 -echo "$progname:2212: checking for dlopen in -ldl" >&5
2242 -ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2243 -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2244 - echo $ac_n "(cached) $ac_c" 1>&6
2246 - ac_save_LIBS="$LIBS"
2248 -cat > conftest.$ac_ext <<EOF
2249 -#line 2220 "ltconfig"
2250 -/* Override any gcc2 internal prototype to avoid an error. */
2251 -/* We use char because int might match the return type of a gcc2
2252 - builtin and then its argument prototype would still apply. */
2262 -if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2264 - eval "ac_cv_lib_$ac_lib_var=yes"
2266 - echo "$progname: failed program was:" >&5
2267 - cat conftest.$ac_ext >&5
2269 - eval "ac_cv_lib_$ac_lib_var=no"
2272 -LIBS="$ac_save_LIBS"
2275 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2276 - echo "$ac_t""yes" 1>&6
2277 - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
2279 - echo "$ac_t""no" 1>&6
2280 -echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2281 -echo "$progname:2252: checking for dlopen" >&5
2282 -if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
2283 - echo $ac_n "(cached) $ac_c" 1>&6
2285 - cat > conftest.$ac_ext <<EOF
2286 -#line 2257 "ltconfig"
2287 -/* System header to define __stub macros and hopefully few prototypes,
2288 - which can conflict with char dlopen(); below. */
2289 -#include <assert.h>
2290 -/* Override any gcc2 internal prototype to avoid an error. */
2291 -/* We use char because int might match the return type of a gcc2
2292 - builtin and then its argument prototype would still apply. */
2300 -/* The GNU C library defines this for functions which it implements
2301 - to always fail with ENOSYS. Some functions are actually named
2302 - something starting with __ and the normal name is an alias. */
2303 -#if defined (__stub_dlopen) || defined (__stub___dlopen)
2311 -if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2313 - eval "ac_cv_func_dlopen=yes"
2315 - echo "$progname: failed program was:" >&5
2316 - cat conftest.$ac_ext >&5
2318 - eval "ac_cv_func_dlopen=no"
2322 -if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
2323 - echo "$ac_t""yes" 1>&6
2324 - lt_cv_dlopen="dlopen"
2326 - echo "$ac_t""no" 1>&6
2327 -echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
2328 -echo "$progname:2299: checking for dld_link in -ldld" >&5
2329 -ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
2330 -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2331 - echo $ac_n "(cached) $ac_c" 1>&6
2333 - ac_save_LIBS="$LIBS"
2335 -cat > conftest.$ac_ext <<EOF
2336 -#line 2307 "ltconfig"
2337 -/* Override any gcc2 internal prototype to avoid an error. */
2338 -/* We use char because int might match the return type of a gcc2
2339 - builtin and then its argument prototype would still apply. */
2349 -if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2351 - eval "ac_cv_lib_$ac_lib_var=yes"
2353 - echo "$progname: failed program was:" >&5
2354 - cat conftest.$ac_ext >&5
2356 - eval "ac_cv_lib_$ac_lib_var=no"
2359 -LIBS="$ac_save_LIBS"
2362 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2363 - echo "$ac_t""yes" 1>&6
2364 - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
2366 - echo "$ac_t""no" 1>&6
2367 -echo $ac_n "checking for shl_load""... $ac_c" 1>&6
2368 -echo "$progname:2339: checking for shl_load" >&5
2369 -if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
2370 - echo $ac_n "(cached) $ac_c" 1>&6
2372 - cat > conftest.$ac_ext <<EOF
2373 -#line 2344 "ltconfig"
2374 -/* System header to define __stub macros and hopefully few prototypes,
2375 - which can conflict with char shl_load(); below. */
2376 -#include <assert.h>
2377 -/* Override any gcc2 internal prototype to avoid an error. */
2378 -/* We use char because int might match the return type of a gcc2
2379 - builtin and then its argument prototype would still apply. */
2387 -/* The GNU C library defines this for functions which it implements
2388 - to always fail with ENOSYS. Some functions are actually named
2389 - something starting with __ and the normal name is an alias. */
2390 -#if defined (__stub_shl_load) || defined (__stub___shl_load)
2398 -if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2400 - eval "ac_cv_func_shl_load=yes"
2402 - echo "$progname: failed program was:" >&5
2403 - cat conftest.$ac_ext >&5
2405 - eval "ac_cv_func_shl_load=no"
2410 -if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
2411 - echo "$ac_t""yes" 1>&6
2412 - lt_cv_dlopen="shl_load"
2414 - echo "$ac_t""no" 1>&6
2415 -echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
2416 -echo "$progname:2387: checking for shl_load in -ldld" >&5
2417 -ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
2418 -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2419 - echo $ac_n "(cached) $ac_c" 1>&6
2421 - ac_save_LIBS="$LIBS"
2423 -cat > conftest.$ac_ext <<EOF
2424 -#line 2395 "ltconfig"
2425 -#include "confdefs.h"
2426 -/* Override any gcc2 internal prototype to avoid an error. */
2427 -/* We use char because int might match the return type of a gcc2
2428 - builtin and then its argument prototype would still apply. */
2438 -if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2440 - eval "ac_cv_lib_$ac_lib_var=yes"
2442 - echo "$progname: failed program was:" >&5
2443 - cat conftest.$ac_ext >&5
2445 - eval "ac_cv_lib_$ac_lib_var=no"
2448 -LIBS="$ac_save_LIBS"
2451 -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2452 - echo "$ac_t""yes" 1>&6
2453 - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
2455 - echo "$ac_t""no" 1>&6
2472 - if test "x$lt_cv_dlopen" != xno; then
2476 - case "$lt_cv_dlopen" in
2478 -for ac_hdr in dlfcn.h; do
2479 -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2480 -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2481 -echo "$progname:2452: checking for $ac_hdr" >&5
2482 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2483 - echo $ac_n "(cached) $ac_c" 1>&6
2485 - cat > conftest.$ac_ext <<EOF
2486 -#line 2457 "ltconfig"
2490 -ac_try="$ac_compile >/dev/null 2>conftest.out"
2491 -{ (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2492 -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2493 -if test -z "$ac_err"; then
2495 - eval "ac_cv_header_$ac_safe=yes"
2497 - echo "$ac_err" >&5
2498 - echo "$progname: failed program was:" >&5
2499 - cat conftest.$ac_ext >&5
2501 - eval "ac_cv_header_$ac_safe=no"
2505 -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2506 - echo "$ac_t""yes" 1>&6
2508 - echo "$ac_t""no" 1>&6
2512 - if test "x$ac_cv_header_dlfcn_h" = xyes; then
2513 - CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2515 - eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2516 - LIBS="$lt_cv_dlopen_libs $LIBS"
2518 - echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
2519 -echo "$progname:2490: checking whether a program can dlopen itself" >&5
2520 -if test "${lt_cv_dlopen_self+set}" = set; then
2521 - echo $ac_n "(cached) $ac_c" 1>&6
2523 - if test "$cross_compiling" = yes; then
2524 - lt_cv_dlopen_self=cross
2526 - cat > conftest.c <<EOF
2527 -#line 2498 "ltconfig"
2536 -# define LTDL_GLOBAL RTLD_GLOBAL
2539 -# define LTDL_GLOBAL DL_GLOBAL
2541 -# define LTDL_GLOBAL 0
2545 -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2546 - find out it does not work in some platform. */
2547 -#ifndef LTDL_LAZY_OR_NOW
2549 -# define LTDL_LAZY_OR_NOW RTLD_LAZY
2552 -# define LTDL_LAZY_OR_NOW DL_LAZY
2555 -# define LTDL_LAZY_OR_NOW RTLD_NOW
2558 -# define LTDL_LAZY_OR_NOW DL_NOW
2560 -# define LTDL_LAZY_OR_NOW 0
2567 -fnord() { int i=42;}
2568 -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2569 - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2570 - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2573 -if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2575 - lt_cv_dlopen_self=yes
2577 - echo "$progname: failed program was:" >&5
2578 - cat conftest.$ac_ext >&5
2580 - lt_cv_dlopen_self=no
2587 -echo "$ac_t""$lt_cv_dlopen_self" 1>&6
2589 - if test "$lt_cv_dlopen_self" = yes; then
2590 - LDFLAGS="$LDFLAGS $link_static_flag"
2591 - echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
2592 -echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5
2593 -if test "${lt_cv_dlopen_self_static+set}" = set; then
2594 - echo $ac_n "(cached) $ac_c" 1>&6
2596 - if test "$cross_compiling" = yes; then
2597 - lt_cv_dlopen_self_static=cross
2599 - cat > conftest.c <<EOF
2600 -#line 2571 "ltconfig"
2609 -# define LTDL_GLOBAL RTLD_GLOBAL
2612 -# define LTDL_GLOBAL DL_GLOBAL
2614 -# define LTDL_GLOBAL 0
2618 -/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
2619 - find out it does not work in some platform. */
2620 -#ifndef LTDL_LAZY_OR_NOW
2622 -# define LTDL_LAZY_OR_NOW RTLD_LAZY
2625 -# define LTDL_LAZY_OR_NOW DL_LAZY
2628 -# define LTDL_LAZY_OR_NOW RTLD_NOW
2631 -# define LTDL_LAZY_OR_NOW DL_NOW
2633 -# define LTDL_LAZY_OR_NOW 0
2640 -fnord() { int i=42;}
2641 -main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
2642 - if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
2643 - if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
2646 -if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2648 - lt_cv_dlopen_self_static=yes
2650 - echo "$progname: failed program was:" >&5
2651 - cat conftest.$ac_ext >&5
2653 - lt_cv_dlopen_self_static=no
2660 -echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
2665 - case "$lt_cv_dlopen_self" in
2666 - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2667 - *) enable_dlopen_self=unknown ;;
2670 - case "$lt_cv_dlopen_self_static" in
2671 - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2672 - *) enable_dlopen_self_static=unknown ;;
2676 -# Copy echo and quote the copy, instead of the original, because it is
2679 -if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
2680 - ltecho="$CONFIG_SHELL \$0 --fallback-echo"
2684 -LTCONFIG_VERSION="$VERSION"
2686 -# Only quote variables if we're using ltmain.sh.
2689 - # Now quote all the things that may contain metacharacters.
2690 - for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
2691 - old_LD old_LDFLAGS old_LIBS \
2692 - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
2693 - AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
2694 - reload_flag reload_cmds wl \
2695 - pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2696 - thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2697 - library_names_spec soname_spec \
2698 - RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2699 - old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
2700 - file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
2701 - finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2702 - hardcode_libdir_flag_spec hardcode_libdir_separator \
2703 - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2704 - compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2707 - reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2708 - old_postinstall_cmds | old_postuninstall_cmds | \
2709 - export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2710 - postinstall_cmds | postuninstall_cmds | \
2711 - finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2712 - # Double-quote double-evaled strings.
2713 - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2716 - eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2722 - *'\$0 --fallback-echo"')
2723 - ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
2727 - trap "$rm \"$ofile\"; exit 1" 1 2 15
2728 - echo "creating $ofile"
2730 - cat <<EOF > "$ofile"
2733 -# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2734 -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2735 -# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
2737 -# Copyright (C) 1996-1999 Free Software Foundation, Inc.
2738 -# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2740 -# This program is free software; you can redistribute it and/or modify
2741 -# it under the terms of the GNU General Public License as published by
2742 -# the Free Software Foundation; either version 2 of the License, or
2743 -# (at your option) any later version.
2745 -# This program is distributed in the hope that it will be useful, but
2746 -# WITHOUT ANY WARRANTY; without even the implied warranty of
2747 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2748 -# General Public License for more details.
2750 -# You should have received a copy of the GNU General Public License
2751 -# along with this program; if not, write to the Free Software
2752 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2754 -# As a special exception to the GNU General Public License, if you
2755 -# distribute this file as part of a program that contains a
2756 -# configuration script generated by Autoconf, you may include it under
2757 -# the same distribution terms that you use for the rest of that program.
2759 -# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2760 -Xsed="sed -e s/^X//"
2762 -# The HP-UX ksh and POSIX shell print the target directory to stdout
2763 -# if CDPATH is set.
2764 -if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2766 -### BEGIN LIBTOOL CONFIG
2772 - # Double-quote the variables that need it (for aesthetics).
2773 - for var in old_CC old_CFLAGS old_CPPFLAGS \
2774 - old_LD old_LDFLAGS old_LIBS \
2775 - old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
2776 - eval "$var=\\\"\$var\\\""
2779 - # Just create a config file.
2780 - cfgfile="$ofile.cfg"
2781 - trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2782 - echo "creating $cfgfile"
2784 - cat <<EOF > "$cfgfile"
2785 -# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
2786 -# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2791 -cat <<EOF >> "$cfgfile"
2792 -# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2794 -# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
2795 -# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
2796 -# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
2797 -# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
2800 -# Compiler and other test output produced by $progname, useful for
2801 -# debugging $progname, is in ./config.log if it exists.
2803 -# The version of $progname that generated this script.
2804 -LTCONFIG_VERSION=$LTCONFIG_VERSION
2806 -# Shell to use when invoking shell scripts.
2809 -# Whether or not to build shared libraries.
2810 -build_libtool_libs=$enable_shared
2812 -# Whether or not to build static libraries.
2813 -build_old_libs=$enable_static
2815 -# Whether or not to optimize for fast installation.
2816 -fast_install=$enable_fast_install
2819 -host_alias=$host_alias
2822 -# An echo program that does not interpret backslashes.
2828 -# The default C compiler.
2831 -# The linker used to build libraries.
2834 -# Whether we need hard or soft links.
2837 -# A BSD-compatible nm program.
2840 -# Used on cygwin: DLL creation program.
2843 -# Used on cygwin: object dumper.
2846 -# Used on cygwin: assembler.
2849 -# The name of the directory that contains temporary libtool files.
2852 -# How to create reloadable object files.
2853 -reload_flag=$reload_flag
2854 -reload_cmds=$reload_cmds
2856 -# How to pass a linker flag through the compiler.
2859 -# Object file suffix (normally "o").
2862 -# Old archive suffix (normally "a").
2865 -# Executable file suffix (normally "").
2868 -# Additional compiler flags for building library objects.
2871 -# Does compiler simultaneously support -c and -o options?
2872 -compiler_c_o=$compiler_c_o
2874 -# Can we write directly to a .lo ?
2875 -compiler_o_lo=$compiler_o_lo
2877 -# Must we lock files when doing compilation ?
2878 -need_locks=$need_locks
2880 -# Do we need the lib prefix for modules?
2881 -need_lib_prefix=$need_lib_prefix
2883 -# Do we need a version for libraries?
2884 -need_version=$need_version
2886 -# Whether dlopen is supported.
2887 -dlopen=$enable_dlopen
2889 -# Whether dlopen of programs is supported.
2890 -dlopen_self=$enable_dlopen_self
2892 -# Whether dlopen of statically linked programs is supported.
2893 -dlopen_self_static=$enable_dlopen_self_static
2895 -# Compiler flag to prevent dynamic linking.
2896 -link_static_flag=$link_static_flag
2898 -# Compiler flag to turn off builtin functions.
2899 -no_builtin_flag=$no_builtin_flag
2901 -# Compiler flag to allow reflexive dlopens.
2902 -export_dynamic_flag_spec=$export_dynamic_flag_spec
2904 -# Compiler flag to generate shared objects directly from archives.
2905 -whole_archive_flag_spec=$whole_archive_flag_spec
2907 -# Compiler flag to generate thread-safe objects.
2908 -thread_safe_flag_spec=$thread_safe_flag_spec
2910 -# Library versioning type.
2911 -version_type=$version_type
2913 -# Format of library name prefix.
2914 -libname_spec=$libname_spec
2916 -# List of archive names. First name is the real one, the rest are links.
2917 -# The last name is the one that the linker finds with -lNAME.
2918 -library_names_spec=$library_names_spec
2920 -# The coded name of the library, if different from the real name.
2921 -soname_spec=$soname_spec
2923 -# Commands used to build and install an old-style archive.
2925 -old_archive_cmds=$old_archive_cmds
2926 -old_postinstall_cmds=$old_postinstall_cmds
2927 -old_postuninstall_cmds=$old_postuninstall_cmds
2929 -# Create an old-style archive from a shared archive.
2930 -old_archive_from_new_cmds=$old_archive_from_new_cmds
2932 -# Commands used to build and install a shared archive.
2933 -archive_cmds=$archive_cmds
2934 -archive_expsym_cmds=$archive_expsym_cmds
2935 -postinstall_cmds=$postinstall_cmds
2936 -postuninstall_cmds=$postuninstall_cmds
2938 -# Method to check whether dependent libraries are shared objects.
2939 -deplibs_check_method=$deplibs_check_method
2941 -# Command to use when deplibs_check_method == file_magic.
2942 -file_magic_cmd=$file_magic_cmd
2944 -# Flag that allows shared libraries with undefined symbols to be built.
2945 -allow_undefined_flag=$allow_undefined_flag
2947 -# Flag that forces no undefined symbols.
2948 -no_undefined_flag=$no_undefined_flag
2950 -# Commands used to finish a libtool library installation in a directory.
2951 -finish_cmds=$finish_cmds
2953 -# Same as above, but a single script fragment to be evaled but not shown.
2954 -finish_eval=$finish_eval
2956 -# Take the output of nm and produce a listing of raw symbols and C names.
2957 -global_symbol_pipe=$global_symbol_pipe
2959 -# Transform the output of nm in a proper C declaration
2960 -global_symbol_to_cdecl=$global_symbol_to_cdecl
2962 -# This is the shared library runtime path variable.
2963 -runpath_var=$runpath_var
2965 -# This is the shared library path variable.
2966 -shlibpath_var=$shlibpath_var
2968 -# Is shlibpath searched before the hard-coded library search path?
2969 -shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2971 -# How to hardcode a shared library path into an executable.
2972 -hardcode_action=$hardcode_action
2974 -# Flag to hardcode \$libdir into a binary during linking.
2975 -# This must work even if \$libdir does not exist.
2976 -hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
2978 -# Whether we need a single -rpath flag with a separated argument.
2979 -hardcode_libdir_separator=$hardcode_libdir_separator
2981 -# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2982 -# resulting binary.
2983 -hardcode_direct=$hardcode_direct
2985 -# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2986 -# resulting binary.
2987 -hardcode_minus_L=$hardcode_minus_L
2989 -# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2990 -# the resulting binary.
2991 -hardcode_shlibpath_var=$hardcode_shlibpath_var
2993 -# Compile-time system search path for libraries
2994 -sys_lib_search_path_spec=$sys_lib_search_path_spec
2996 -# Run-time system search path for libraries
2997 -sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
2999 -# Fix the shell variable \$srcfile for the compiler.
3000 -fix_srcfile_path="$fix_srcfile_path"
3002 -# Set to yes if exported symbols are required.
3003 -always_export_symbols=$always_export_symbols
3005 -# The commands to list exported symbols.
3006 -export_symbols_cmds=$export_symbols_cmds
3008 -# Symbols that should not be listed in the preloaded symbols.
3009 -exclude_expsyms=$exclude_expsyms
3011 -# Symbols that must always be exported.
3012 -include_expsyms=$include_expsyms
3018 - echo '### END LIBTOOL CONFIG' >> "$ofile"
3020 - case "$host_os" in
3022 - cat <<\EOF >> "$ofile"
3024 -# AIX sometimes has problems with the GCC collect2 program. For some
3025 -# reason, if we set the COLLECT_NAMES environment variable, the problems
3026 -# vanish in a puff of smoke.
3027 -if test "X${COLLECT_NAMES+set}" != Xset; then
3029 - export COLLECT_NAMES
3035 - # Append the ltmain.sh script.
3036 - sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
3037 - # We use sed instead of cat because bash on DJGPP gets confused if
3038 - # if finds mixed CR/LF and LF-only lines. Since sed operates in
3039 - # text mode, it properly converts lines to CR/LF. This bash problem
3040 - # is reportedly fixed, but why not run on old versions too?
3046 - # Compile the libtool program.
3047 - echo "FIXME: would compile $ltmain"
3051 -test -n "$cache_file" || exit 0
3055 -cat > confcache <<\EOF
3056 -# This file is a shell script that caches the results of configure
3057 -# tests run on this system so they can be shared between configure
3058 -# scripts and configure runs. It is not useful on other systems.
3059 -# If it contains results you don't want to keep, you may remove or edit it.
3061 -# By default, configure uses ./config.cache as the cache file,
3062 -# creating it if it does not exist already. You can give configure
3063 -# the --cache-file=FILE option to use a different cache file; that is
3064 -# what configure does when it calls configure scripts in
3065 -# subdirectories, so they share the cache.
3066 -# Giving --cache-file=/dev/null disables caching, for debugging configure.
3067 -# config.status only pays attention to the cache file if you give it the
3068 -# --recheck option to rerun configure.
3071 -# The following way of writing the cache mishandles newlines in values,
3072 -# but we know of no workaround that is simple, portable, and efficient.
3073 -# So, don't put newlines in cache variables' values.
3074 -# Ultrix sh set writes to stderr and can't be redirected directly,
3075 -# and sets the high bit in the cache file unless we assign to the vars.
3077 - case `(ac_space=' '; set | grep ac_space) 2>&1` in
3079 - # `set' does not quote correctly, so add quotes (double-quote substitution
3080 - # turns \\\\ into \\, and sed turns \\ into \).
3082 - -e "s/'/'\\\\''/g" \
3083 - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3086 - # `set' quotes correctly as required by POSIX, so do not add quotes.
3087 - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3090 -if cmp -s $cache_file confcache; then
3093 - if test -w $cache_file; then
3094 - echo "updating cache $cache_file"
3095 - cat confcache > $cache_file
3097 - echo "not updating unwritable cache $cache_file"
3105 -# mode:shell-script
3108 diff -rup ace-1.2-orig/ltmain.sh ace-1.2/ltmain.sh
3109 --- ace-1.2-orig/ltmain.sh 2001-04-07 23:19:19.000000000 -0400
3110 +++ ace-1.2/ltmain.sh 2006-11-25 06:04:27.000000000 -0500
3112 # ltmain.sh - Provide generalized library-building support services.
3113 -# NOTE: Changing this file will not affect anything until you rerun ltconfig.
3114 +# NOTE: Changing this file will not affect anything until you rerun configure.
3116 -# Copyright (C) 1996-1999 Free Software Foundation, Inc.
3117 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3118 +# Free Software Foundation, Inc.
3119 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3121 # This program is free software; you can redistribute it and/or modify
3124 # You should have received a copy of the GNU General Public License
3125 # along with this program; if not, write to the Free Software
3126 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3127 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3129 # As a special exception to the GNU General Public License, if you
3130 # distribute this file as part of a program that contains a
3131 # configuration script generated by Autoconf, you may include it under
3132 # the same distribution terms that you use for the rest of that program.
3134 +basename="s,^.*/,,g"
3136 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
3137 +# is ksh but when the shell is invoked as "sh" and the current value of
3138 +# the _XPG environment variable is not equal to 1 (one), the special
3139 +# positional parameter $0, within a function call, is the name of the
3143 +# The name of this program:
3144 +progname=`echo "$progpath" | $SED $basename`
3145 +modename="$progname"
3147 +# Global variables:
3154 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
3156 +# See if we are running on zsh, and set the options which allow our
3157 +# commands through without removal of \ escapes.
3158 +if test -n "${ZSH_VERSION+set}" ; then
3159 + setopt NO_GLOB_SUBST
3162 # Check that we have a working $echo.
3163 if test "X$1" = X--no-reexec; then
3164 # Discard the --no-reexec flag, and continue.
3165 @@ -35,7 +64,7 @@ elif test "X`($echo '\t') 2>/dev/null`"
3168 # Restart under the correct shell, and then maybe $echo will work.
3169 - exec $SHELL "$0" --no-reexec ${1+"$@"}
3170 + exec $SHELL "$progpath" --no-reexec ${1+"$@"}
3173 if test "X$1" = X--fallback-echo; then
3174 @@ -44,19 +73,9 @@ if test "X$1" = X--fallback-echo; then
3179 + exit $EXIT_SUCCESS
3182 -# The name of this program.
3183 -progname=`$echo "$0" | sed 's%^.*/%%'`
3184 -modename="$progname"
3190 -TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
3193 help="Try \`$progname --help' for more information."
3194 magic="%%%MAGIC variable%%%"
3195 @@ -66,10 +85,20 @@ rm="rm -f"
3197 # Sed substitution that helps us do robust quoting. It backslashifies
3198 # metacharacters that are still active within double-quoted strings.
3199 -Xsed='sed -e 1s/^X//'
3200 +Xsed="${SED}"' -e 1s/^X//'
3201 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
3202 -SP2NL='tr \040 \012'
3203 -NL2SP='tr \015\012 \040\040'
3204 +# test EBCDIC or ASCII
3205 +case `echo X|tr X '\101'` in
3206 + A) # ASCII based system
3207 + # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
3208 + SP2NL='tr \040 \012'
3209 + NL2SP='tr \015\012 \040\040'
3211 + *) # EBCDIC based system
3212 + SP2NL='tr \100 \n'
3213 + NL2SP='tr \r\n \100\100'
3218 # Only set LANG and LC_ALL to C if already set.
3219 @@ -83,16 +112,15 @@ if test "${LANG+set}" = set; then
3220 save_LANG="$LANG"; LANG=C; export LANG
3223 -if test "$LTCONFIG_VERSION" != "$VERSION"; then
3224 - echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
3225 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3228 +# Make sure IFS has a sensible default
3233 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
3234 - echo "$modename: not configured to build any kind of library" 1>&2
3235 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3237 + $echo "$modename: not configured to build any kind of library" 1>&2
3238 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3239 + exit $EXIT_FAILURE
3243 @@ -104,25 +132,310 @@ run=
3249 lo2o="s/\\.lo\$/.${objext}/"
3250 o2lo="s/\\.${objext}\$/.lo/"
3252 +#####################################
3253 +# Shell function definitions:
3254 +# This seems to be the best place for them
3256 +# func_mktempdir [string]
3257 +# Make a temporary directory that won't clash with other running
3258 +# libtool processes, and avoids race conditions if possible. If
3259 +# given, STRING is the basename for that directory.
3262 + my_template="${TMPDIR-/tmp}/${1-$progname}"
3264 + if test "$run" = ":"; then
3265 + # Return a directory name, but don't create it in dry-run mode
3266 + my_tmpdir="${my_template}-$$"
3269 + # If mktemp works, use that first and foremost
3270 + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
3272 + if test ! -d "$my_tmpdir"; then
3273 + # Failing that, at least try and use $RANDOM to avoid a race
3274 + my_tmpdir="${my_template}-${RANDOM-0}$$"
3276 + save_mktempdir_umask=`umask`
3278 + $mkdir "$my_tmpdir"
3279 + umask $save_mktempdir_umask
3282 + # If we're not in dry-run mode, bomb out on failure
3283 + test -d "$my_tmpdir" || {
3284 + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
3285 + exit $EXIT_FAILURE
3289 + $echo "X$my_tmpdir" | $Xsed
3293 +# func_win32_libid arg
3294 +# return the library type of file 'arg'
3296 +# Need a lot of goo to handle *both* DLLs and import libs
3297 +# Has to be a shell function in order to 'eat' the argument
3298 +# that is supplied when $file_magic_command is called.
3299 +func_win32_libid ()
3301 + win32_libid_type="unknown"
3302 + win32_fileres=`file -L $1 2>/dev/null`
3303 + case $win32_fileres in
3304 + *ar\ archive\ import\ library*) # definitely import
3305 + win32_libid_type="x86 archive import"
3307 + *ar\ archive*) # could be an import, or static
3308 + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
3309 + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
3310 + win32_nmres=`eval $NM -f posix -A $1 | \
3311 + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
3312 + case $win32_nmres in
3313 + import*) win32_libid_type="x86 archive import";;
3314 + *) win32_libid_type="x86 archive static";;
3319 + win32_libid_type="x86 DLL"
3321 + *executable*) # but shell scripts are "executable" too...
3322 + case $win32_fileres in
3323 + *MS\ Windows\ PE\ Intel*)
3324 + win32_libid_type="x86 DLL"
3329 + $echo $win32_libid_type
3333 +# func_infer_tag arg
3334 +# Infer tagged configuration to use if any are available and
3335 +# if one wasn't chosen via the "--tag" command line option.
3336 +# Only attempt this if the compiler in the base compile
3337 +# command doesn't match the default compiler.
3338 +# arg is usually of the form 'gcc ...'
3341 + if test -n "$available_tags" && test -z "$tagname"; then
3343 + for arg in $CC; do
3345 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
3349 + CC_quoted="$CC_quoted $arg"
3352 + # Blanks in the command may have been stripped by the calling shell,
3353 + # but not from the CC environment variable when configure was run.
3354 + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
3355 + # Blanks at the start of $base_compile will cause this to fail
3356 + # if we don't check for them as well.
3358 + for z in $available_tags; do
3359 + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
3360 + # Evaluate the configuration.
3361 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
3363 + for arg in $CC; do
3364 + # Double-quote args containing other shell metacharacters.
3366 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
3370 + CC_quoted="$CC_quoted $arg"
3373 + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
3374 + # The compiler in the base compile command matches
3375 + # the one in the tagged configuration.
3376 + # Assume this is the tagged configuration we want.
3383 + # If $tagname still isn't set, then no tagged configuration
3384 + # was found and let the user know that the "--tag" command
3385 + # line option must be used.
3386 + if test -z "$tagname"; then
3387 + $echo "$modename: unable to infer tagged configuration"
3388 + $echo "$modename: specify a tag with \`--tag'" 1>&2
3389 + exit $EXIT_FAILURE
3391 +# $echo "$modename: using $tagname tagged configuration"
3399 +# func_extract_an_archive dir oldlib
3400 +func_extract_an_archive ()
3402 + f_ex_an_ar_dir="$1"; shift
3403 + f_ex_an_ar_oldlib="$1"
3405 + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
3406 + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
3407 + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
3410 + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
3411 + exit $EXIT_FAILURE
3415 +# func_extract_archives gentop oldlib ...
3416 +func_extract_archives ()
3418 + my_gentop="$1"; shift
3419 + my_oldlibs=${1+"$@"}
3426 + $show "${rm}r $my_gentop"
3427 + $run ${rm}r "$my_gentop"
3428 + $show "$mkdir $my_gentop"
3429 + $run $mkdir "$my_gentop"
3431 + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
3435 + for my_xlib in $my_oldlibs; do
3436 + # Extract the objects.
3438 + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
3439 + *) my_xabs=`pwd`"/$my_xlib" ;;
3441 + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
3442 + my_xdir="$my_gentop/$my_xlib"
3444 + $show "${rm}r $my_xdir"
3445 + $run ${rm}r "$my_xdir"
3446 + $show "$mkdir $my_xdir"
3447 + $run $mkdir "$my_xdir"
3449 + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
3454 + $show "Extracting $my_xabs"
3455 + # Do not bother doing anything if just a dry run
3456 + if test -z "$run"; then
3457 + darwin_orig_dir=`pwd`
3458 + cd $my_xdir || exit $?
3459 + darwin_archive=$my_xabs
3460 + darwin_curdir=`pwd`
3461 + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
3462 + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
3463 + if test -n "$darwin_arches"; then
3464 + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
3466 + $show "$darwin_base_archive has multiple architectures $darwin_arches"
3467 + for darwin_arch in $darwin_arches ; do
3468 + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3469 + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3470 + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3471 + func_extract_an_archive "`pwd`" "${darwin_base_archive}"
3472 + cd "$darwin_curdir"
3473 + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
3474 + done # $darwin_arches
3475 + ## Okay now we have a bunch of thin objects, gotta fatten them up :)
3476 + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
3479 + for darwin_file in $darwin_filelist; do
3480 + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
3481 + lipo -create -output "$darwin_file" $darwin_files
3482 + done # $darwin_filelist
3484 + cd "$darwin_orig_dir"
3486 + cd "$darwin_orig_dir"
3487 + func_extract_an_archive "$my_xdir" "$my_xabs"
3488 + fi # $darwin_arches
3492 + func_extract_an_archive "$my_xdir" "$my_xabs"
3495 + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3497 + func_extract_archives_result="$my_oldobjs"
3499 +# End of Shell function definitions
3500 +#####################################
3503 +eval std_shrext=\"$shrext_cmds\"
3507 # Parse our command line options once, thoroughly.
3508 -while test $# -gt 0
3509 +while test "$#" -gt 0
3516 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
3520 # If the previous option needs an argument, assign it.
3521 if test -n "$prev"; then
3525 - eval "$prev=\"\$$prev \$arg\""
3526 + execute_dlfiles="$execute_dlfiles $arg"
3530 + preserve_args="${preserve_args}=$arg"
3532 + # Check whether tagname contains only valid characters
3534 + *[!-_A-Za-z0-9,/]*)
3535 + $echo "$progname: invalid tag name: $tagname" 1>&2
3536 + exit $EXIT_FAILURE
3542 + # Don't test for the "default" C tag, as we know, it's there, but
3543 + # not specially marked.
3546 + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
3547 + taglist="$taglist $tagname"
3548 + # Evaluate the configuration.
3549 + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
3551 + $echo "$progname: ignoring unknown tag $tagname" 1>&2
3558 @@ -135,24 +448,33 @@ do
3561 # Have we seen a non-optional argument yet?
3569 - echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
3571 + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
3573 + $echo "Copyright (C) 2005 Free Software Foundation, Inc."
3574 + $echo "This is free software; see the source for copying conditions. There is NO"
3575 + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
3580 - sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
3582 + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
3583 + # Now print the configurations for the tags.
3584 + for tagname in $taglist; do
3585 + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
3591 - echo "$progname: enabling shell trace mode"
3592 + $echo "$progname: enabling shell trace mode"
3594 + preserve_args="$preserve_args $arg"
3598 @@ -160,18 +482,18 @@ do
3602 - echo "host: $host"
3603 + $echo "host: $host"
3604 if test "$build_libtool_libs" = yes; then
3605 - echo "enable shared libraries"
3606 + $echo "enable shared libraries"
3608 - echo "disable shared libraries"
3609 + $echo "disable shared libraries"
3611 if test "$build_old_libs" = yes; then
3612 - echo "enable static libraries"
3613 + $echo "enable static libraries"
3615 - echo "disable static libraries"
3616 + $echo "disable static libraries"
3622 --finish) mode="finish" ;;
3623 @@ -179,8 +501,23 @@ do
3624 --mode) prevopt="--mode" prev=mode ;;
3625 --mode=*) mode="$optarg" ;;
3627 + --preserve-dup-deps) duplicate_deps="yes" ;;
3631 + preserve_args="$preserve_args $arg"
3637 + preserve_args="$preserve_args --tag"
3640 + set tag "$optarg" ${1+"$@"}
3643 + preserve_args="$preserve_args --tag"
3647 @@ -191,7 +528,7 @@ do
3649 $echo "$modename: unrecognized option \`$arg'" 1>&2
3652 + exit $EXIT_FAILURE
3656 @@ -204,19 +541,38 @@ done
3657 if test -n "$prevopt"; then
3658 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
3661 + exit $EXIT_FAILURE
3664 +case $disable_libs in
3668 + build_libtool_libs=no
3669 + build_old_libs=yes
3672 + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
3676 +# If this variable is set in any of the actions, the command in it
3677 +# will be execed at the end. This prevents here-documents from being
3678 +# left over by shells.
3681 if test -z "$show_help"; then
3683 # Infer the operation mode.
3684 if test -z "$mode"; then
3686 - *cc | *++ | gcc* | *-gcc*)
3687 + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
3688 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
3690 + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
3699 @@ -253,7 +609,7 @@ if test -z "$show_help"; then
3700 if test -n "$execute_dlfiles" && test "$mode" != execute; then
3701 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
3704 + exit $EXIT_FAILURE
3707 # Change the help message to a mode-specific one.
3708 @@ -261,140 +617,233 @@ if test -z "$show_help"; then
3709 help="Try \`$modename --help --mode=$mode' for more information."
3711 # These modes are in order of execution frequency so that they run quickly.
3714 # libtool compile mode
3716 modename="$modename: compile"
3717 # Get the compilation command and the source file.
3721 + srcfile="$nonopt" # always keep a non-empty value in "srcfile"
3731 - # Accept any command-line options.
3734 - if test "$user_target" != "no"; then
3735 - $echo "$modename: you cannot specify \`-o' more than once" 1>&2
3742 - build_old_libs=yes
3746 + # do not "continue". Instead, add this to base_compile
3752 - case "$user_target" in
3754 - # The next one is the -o target name
3759 - # We got the output file
3768 - # Accept the current argument as the source file.
3769 - lastarg="$srcfile"
3772 + # Accept any command-line options.
3775 + if test -n "$libobj" ; then
3776 + $echo "$modename: you cannot specify \`-o' more than once" 1>&2
3777 + exit $EXIT_FAILURE
3783 - # Aesthetically quote the previous argument.
3784 + -static | -prefer-pic | -prefer-non-pic)
3785 + later="$later $arg"
3789 - # Backslashify any backslashes, double quotes, and dollar signs.
3790 - # These are the only characters that are still specially
3791 - # interpreted inside of double-quoted scrings.
3798 + arg_mode=arg # the next one goes into the "base_compile" arg list
3799 + continue # The current "srcfile" will either be retained or
3800 + ;; # replaced later. I would guess that would be a bug.
3803 + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
3805 + save_ifs="$IFS"; IFS=','
3806 + for arg in $args; do
3809 + # Double-quote args containing other shell metacharacters.
3810 + # Many Bourne shells cannot handle close brackets correctly
3811 + # in scan sets, so we specify it separately.
3813 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
3817 + lastarg="$lastarg $arg"
3820 + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
3822 + # Add the arguments to base_compile.
3823 + base_compile="$base_compile $lastarg"
3828 + # Accept the current argument as the source file.
3829 + # The previous "srcfile" becomes the current argument.
3831 + lastarg="$srcfile"
3836 + esac # case $arg_mode
3838 + # Aesthetically quote the previous argument.
3839 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
3842 # Double-quote args containing other shell metacharacters.
3843 - # Many Bourne shells cannot handle close brackets correctly in scan
3844 - # sets, so we specify it separately.
3845 - case "$lastarg" in
3846 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3847 + # Many Bourne shells cannot handle close brackets correctly
3848 + # in scan sets, and some SunOS ksh mistreat backslash-escaping
3849 + # in scan sets (worked around with variable expansion),
3850 + # and furthermore cannot handle '|' '&' '(' ')' in scan sets
3851 + # at all, so we specify them separately.
3852 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
3853 lastarg="\"$lastarg\""
3857 - # Add the previous argument to base_compile.
3858 - if test -z "$base_compile"; then
3859 - base_compile="$lastarg"
3861 - base_compile="$base_compile $lastarg"
3864 + base_compile="$base_compile $lastarg"
3867 - case "$user_target" in
3871 + $echo "$modename: you must specify an argument for -Xcompile"
3872 + exit $EXIT_FAILURE
3875 - # Get the name of the library object.
3876 - libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
3878 + $echo "$modename: you must specify a target with \`-o'" 1>&2
3879 + exit $EXIT_FAILURE
3882 - $echo "$modename: you must specify a target with \`-o'" 1>&2
3884 + # Get the name of the library object.
3885 + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
3889 # Recognize several different file suffixes.
3890 # If the user specifies -o file.o, it is replaced with file.lo
3891 - xform='[cCFSfmso]'
3893 + xform='[cCFSifmso]'
3902 + *.class) xform=class ;;
3907 + *.java) xform=java ;;
3910 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
3914 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
3916 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
3918 + exit $EXIT_FAILURE
3922 + func_infer_tag $base_compile
3924 + for arg in $later; do
3927 + build_old_libs=yes
3943 + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
3945 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
3946 + qlibobj="\"$qlibobj\"" ;;
3948 + test "X$libobj" != "X$qlibobj" \
3949 + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
3950 + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
3951 + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
3952 + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
3953 + if test "X$xdir" = "X$obj"; then
3958 + lobj=${xdir}$objdir/$objname
3960 if test -z "$base_compile"; then
3961 $echo "$modename: you must specify a compilation command" 1>&2
3964 + exit $EXIT_FAILURE
3967 # Delete any leftover library objects.
3968 if test "$build_old_libs" = yes; then
3969 - removelist="$obj $libobj"
3970 + removelist="$obj $lobj $libobj ${libobj}T"
3972 - removelist="$libobj"
3973 + removelist="$lobj $libobj ${libobj}T"
3976 $run $rm $removelist
3977 - trap "$run $rm $removelist; exit 1" 1 2 15
3978 + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
3980 + # On Cygwin there's no "real" PIC flag so we must build both object types
3982 + cygwin* | mingw* | pw32* | os2*)
3986 + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
3987 + # non-PIC code in shared libraries is not supported
3991 # Calculate the filename of the output object if compiler does
3992 # not support -o with -c
3993 if test "$compiler_c_o" = no; then
3994 - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
3995 + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
3996 lockfile="$output_obj.lock"
3997 removelist="$removelist $output_obj $lockfile"
3998 - trap "$run $rm $removelist; exit 1" 1 2 15
3999 + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
4005 @@ -402,13 +851,13 @@ if test -z "$show_help"; then
4006 # Lock this critical section if it is needed
4007 # We use this script file to make the link, it avoids creating a new file
4008 if test "$need_locks" = yes; then
4009 - until ln "$0" "$lockfile" 2>/dev/null; do
4010 + until $run ln "$progpath" "$lockfile" 2>/dev/null; do
4011 $show "Waiting for $lockfile to be removed"
4014 elif test "$need_locks" = warn; then
4015 if test -f "$lockfile"; then
4018 *** ERROR, $lockfile exists and contains:
4019 `cat $lockfile 2>/dev/null`
4021 @@ -420,63 +869,72 @@ avoid parallel builds (make -j) in this
4024 $run $rm $removelist
4026 + exit $EXIT_FAILURE
4028 - echo $srcfile > "$lockfile"
4029 + $echo "$srcfile" > "$lockfile"
4032 if test -n "$fix_srcfile_path"; then
4033 eval srcfile=\"$fix_srcfile_path\"
4035 + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
4037 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
4038 + qsrcfile="\"$qsrcfile\"" ;;
4041 + $run $rm "$libobj" "${libobj}T"
4043 + # Create a libtool object file (analogous to a ".la" file),
4044 + # but don't create it if we're doing a dry run.
4045 + test -z "$run" && cat > ${libobj}T <<EOF
4046 +# $libobj - a libtool object file
4047 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4049 +# Please DO NOT delete this file!
4050 +# It is necessary for linking the library.
4052 +# Name of the PIC object.
4055 # Only build a PIC object if we are building libtool libraries.
4056 if test "$build_libtool_libs" = yes; then
4057 # Without this assignment, base_compile gets emptied.
4058 fbsd_hideous_sh_bug=$base_compile
4060 - # All platforms use -DPIC, to notify preprocessed assembler code.
4061 - command="$base_compile $srcfile $pic_flag -DPIC"
4062 - if test "$build_old_libs" = yes; then
4063 - lo_libobj="$libobj"
4064 - dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
4065 - if test "X$dir" = "X$libobj"; then
4068 - dir="$dir/$objdir"
4070 - libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
4071 + if test "$pic_mode" != no; then
4072 + command="$base_compile $qsrcfile $pic_flag"
4074 + # Don't build PIC code
4075 + command="$base_compile $qsrcfile"
4078 - if test -d "$dir"; then
4079 - $show "$rm $libobj"
4082 - $show "$mkdir $dir"
4085 - if test $status -ne 0 && test ! -d $dir; then
4088 + if test ! -d "${xdir}$objdir"; then
4089 + $show "$mkdir ${xdir}$objdir"
4090 + $run $mkdir ${xdir}$objdir
4092 + if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
4096 - if test "$compiler_o_lo" = yes; then
4097 - output_obj="$libobj"
4098 - command="$command -o $output_obj"
4099 - elif test "$compiler_c_o" = yes; then
4101 - command="$command -o $output_obj"
4103 + if test -z "$output_obj"; then
4104 + # Place PIC objects in $objdir
4105 + command="$command -o $lobj"
4108 - $run $rm "$output_obj"
4109 + $run $rm "$lobj" "$output_obj"
4112 if $run eval "$command"; then :
4114 test -n "$output_obj" && $run $rm $removelist
4116 + exit $EXIT_FAILURE
4119 if test "$need_locks" = warn &&
4120 - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
4122 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
4124 *** ERROR, $lockfile contains:
4125 `cat $lockfile 2>/dev/null`
4127 @@ -491,13 +949,13 @@ avoid parallel builds (make -j) in this
4130 $run $rm $removelist
4132 + exit $EXIT_FAILURE
4135 # Just move the object if needed, then go on to compile the next one
4136 - if test x"$output_obj" != x"$libobj"; then
4137 - $show "$mv $output_obj $libobj"
4138 - if $run $mv $output_obj $libobj; then :
4139 + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
4140 + $show "$mv $output_obj $lobj"
4141 + if $run $mv $output_obj $lobj; then :
4144 $run $rm $removelist
4145 @@ -505,66 +963,50 @@ compiler."
4149 - # If we have no pic_flag, then copy the object into place and finish.
4150 - if test -z "$pic_flag" && test "$build_old_libs" = yes; then
4151 - # Rename the .lo from within objdir to obj
4152 - if test -f $obj; then
4156 + # Append the name of the PIC object to the libtool object file.
4157 + test -z "$run" && cat >> ${libobj}T <<EOF
4158 +pic_object='$objdir/$objname'
4160 - $show "$mv $libobj $obj"
4161 - if $run $mv $libobj $obj; then :
4164 - $run $rm $removelist
4169 - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
4170 - if test "X$xdir" = "X$obj"; then
4175 - baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
4176 - libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
4177 - # Now arrange that obj and lo_libobj become the same file
4178 - $show "(cd $xdir && $LN_S $baseobj $libobj)"
4179 - if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
4183 - $run $rm $removelist
4186 + # Allow error messages only from the first compilation.
4187 + if test "$suppress_opt" = yes; then
4188 + suppress_output=' >/dev/null 2>&1'
4191 + # No PIC object so indicate it doesn't exist in the libtool
4193 + test -z "$run" && cat >> ${libobj}T <<EOF
4196 - # Allow error messages only from the first compilation.
4197 - suppress_output=' >/dev/null 2>&1'
4201 # Only build a position-dependent object if we build old libraries.
4202 if test "$build_old_libs" = yes; then
4203 - command="$base_compile $srcfile"
4204 + if test "$pic_mode" != yes; then
4205 + # Don't build PIC code
4206 + command="$base_compile $qsrcfile"
4208 + command="$base_compile $qsrcfile $pic_flag"
4210 if test "$compiler_c_o" = yes; then
4211 command="$command -o $obj"
4215 # Suppress compiler output if we already did a PIC compilation.
4216 command="$command$suppress_output"
4217 - $run $rm "$output_obj"
4218 + $run $rm "$obj" "$output_obj"
4220 if $run eval "$command"; then :
4222 $run $rm $removelist
4224 + exit $EXIT_FAILURE
4227 if test "$need_locks" = warn &&
4228 - test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
4230 + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
4232 *** ERROR, $lockfile contains:
4233 `cat $lockfile 2>/dev/null`
4235 @@ -579,11 +1021,11 @@ avoid parallel builds (make -j) in this
4238 $run $rm $removelist
4240 + exit $EXIT_FAILURE
4243 # Just move the object if needed
4244 - if test x"$output_obj" != x"$obj"; then
4245 + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
4246 $show "$mv $output_obj $obj"
4247 if $run $mv $output_obj $obj; then :
4249 @@ -593,40 +1035,42 @@ compiler."
4253 - # Create an invalid libtool object if no PIC, so that we do not
4254 - # accidentally link it into a program.
4255 - if test "$build_libtool_libs" != yes; then
4256 - $show "echo timestamp > $libobj"
4257 - $run eval "echo timestamp > \$libobj" || exit $?
4259 - # Move the .lo from within objdir
4260 - $show "$mv $libobj $lo_libobj"
4261 - if $run $mv $libobj $lo_libobj; then :
4264 - $run $rm $removelist
4268 + # Append the name of the non-PIC object the libtool object file.
4269 + # Only append if the libtool object file exists.
4270 + test -z "$run" && cat >> ${libobj}T <<EOF
4271 +# Name of the non-PIC object.
4272 +non_pic_object='$objname'
4276 + # Append the name of the non-PIC object the libtool object file.
4277 + # Only append if the libtool object file exists.
4278 + test -z "$run" && cat >> ${libobj}T <<EOF
4279 +# Name of the non-PIC object.
4280 +non_pic_object=none
4285 + $run $mv "${libobj}T" "${libobj}"
4287 # Unlock the critical section if it was locked
4288 if test "$need_locks" != no; then
4290 + $run $rm "$lockfile"
4294 + exit $EXIT_SUCCESS
4300 modename="$modename: link"
4302 - *-*-cygwin* | *-*-mingw* | *-*-os2*)
4304 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4305 # It is impossible to link a dll without this setting, and
4306 # we shouldn't force the makefile maintainer to figure out
4307 # which system we are compiling for in order to pass an extra
4308 - # flag for every libtool invokation.
4309 + # flag for every libtool invocation.
4310 # allow_undefined=no
4312 # FIXME: Unfortunately, there are problems with the above when trying
4313 @@ -635,179 +1079,13 @@ compiler."
4314 # -no-undefined on the libtool link line when we can be certain
4315 # that all symbols are satisfied, otherwise we get a static library.
4318 - # This is a source program that is used to create dlls on Windows
4319 - # Don't remove nor modify the starting and closing comments
4320 -# /* ltdll.c starts here */
4321 -# #define WIN32_LEAN_AND_MEAN
4322 -# #include <windows.h>
4323 -# #undef WIN32_LEAN_AND_MEAN
4324 -# #include <stdio.h>
4326 -# #ifndef __CYGWIN__
4327 -# # ifdef __CYGWIN32__
4328 -# # define __CYGWIN__ __CYGWIN32__
4332 -# #ifdef __cplusplus
4335 -# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
4336 -# #ifdef __cplusplus
4340 -# #ifdef __CYGWIN__
4341 -# #include <cygwin/cygwin_dll.h>
4342 -# DECLARE_CYGWIN_DLL( DllMain );
4344 -# HINSTANCE __hDllInstance_base;
4347 -# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
4349 -# __hDllInstance_base = hInst;
4352 -# /* ltdll.c ends here */
4353 - # This is a source program that is used to create import libraries
4354 - # on Windows for dlls which lack them. Don't remove nor modify the
4355 - # starting and closing comments
4356 -# /* impgen.c starts here */
4357 -# /* Copyright (C) 1999 Free Software Foundation, Inc.
4359 -# This file is part of GNU libtool.
4361 -# This program is free software; you can redistribute it and/or modify
4362 -# it under the terms of the GNU General Public License as published by
4363 -# the Free Software Foundation; either version 2 of the License, or
4364 -# (at your option) any later version.
4366 -# This program is distributed in the hope that it will be useful,
4367 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
4368 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4369 -# GNU General Public License for more details.
4371 -# You should have received a copy of the GNU General Public License
4372 -# along with this program; if not, write to the Free Software
4373 -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4376 -# #include <stdio.h> /* for printf() */
4377 -# #include <unistd.h> /* for open(), lseek(), read() */
4378 -# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
4379 -# #include <string.h> /* for strdup() */
4381 -# static unsigned int
4382 -# pe_get16 (fd, offset)
4386 -# unsigned char b[2];
4387 -# lseek (fd, offset, SEEK_SET);
4389 -# return b[0] + (b[1]<<8);
4392 -# static unsigned int
4393 -# pe_get32 (fd, offset)
4397 -# unsigned char b[4];
4398 -# lseek (fd, offset, SEEK_SET);
4400 -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
4403 -# static unsigned int
4407 -# unsigned char *b = ptr;
4408 -# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
4412 -# main (argc, argv)
4417 -# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
4418 -# unsigned long export_rva, export_size, nsections, secptr, expptr;
4419 -# unsigned long name_rvas, nexp;
4420 -# unsigned char *expdata, *erva;
4421 -# char *filename, *dll_name;
4423 -# filename = argv[1];
4425 -# dll = open(filename, O_RDONLY|O_BINARY);
4429 -# dll_name = filename;
4431 -# for (i=0; filename[i]; i++)
4432 -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
4433 -# dll_name = filename + i +1;
4435 -# pe_header_offset = pe_get32 (dll, 0x3c);
4436 -# opthdr_ofs = pe_header_offset + 4 + 20;
4437 -# num_entries = pe_get32 (dll, opthdr_ofs + 92);
4439 -# if (num_entries < 1) /* no exports */
4442 -# export_rva = pe_get32 (dll, opthdr_ofs + 96);
4443 -# export_size = pe_get32 (dll, opthdr_ofs + 100);
4444 -# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
4445 -# secptr = (pe_header_offset + 4 + 20 +
4446 -# pe_get16 (dll, pe_header_offset + 4 + 16));
4449 -# for (i = 0; i < nsections; i++)
4452 -# unsigned long secptr1 = secptr + 40 * i;
4453 -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
4454 -# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
4455 -# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
4456 -# lseek(dll, secptr1, SEEK_SET);
4457 -# read(dll, sname, 8);
4458 -# if (vaddr <= export_rva && vaddr+vsize > export_rva)
4460 -# expptr = fptr + (export_rva - vaddr);
4461 -# if (export_rva + export_size > vaddr + vsize)
4462 -# export_size = vsize - (export_rva - vaddr);
4467 -# expdata = (unsigned char*)malloc(export_size);
4468 -# lseek (dll, expptr, SEEK_SET);
4469 -# read (dll, expdata, export_size);
4470 -# erva = expdata - export_rva;
4472 -# nexp = pe_as32 (expdata+24);
4473 -# name_rvas = pe_as32 (expdata+32);
4475 -# printf ("EXPORTS\n");
4476 -# for (i = 0; i<nexp; i++)
4478 -# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
4479 -# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
4484 -# /* impgen.c ends here */
4490 + libtool_args="$nonopt"
4491 + base_compile="$nonopt $@"
4492 compile_command="$nonopt"
4493 finalize_command="$nonopt"
4495 @@ -818,18 +1096,13 @@ compiler."
4504 + lib_search_path=`pwd`
4507 - if test -n "$shlibpath_var"; then
4508 - # get the directories listed in $shlibpath_var
4509 - eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
4513 - # now prepend the system-specific ones
4514 - eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
4515 - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
4520 @@ -839,10 +1112,13 @@ compiler."
4521 export_symbols_regex=
4524 - link_against_libtool_libs=
4530 + notinst_path= # paths that contain not-installed libtool libraries
4531 + precious_files_regex=
4532 prefer_static_libs=no
4535 @@ -854,11 +1130,14 @@ compiler."
4541 + func_infer_tag $base_compile
4543 # We need to know -static, to get the right output filenames.
4548 -all-static | -static)
4549 if test "X$arg" = "X-all-static"; then
4550 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
4551 @@ -867,14 +1146,15 @@ compiler."
4552 if test -n "$link_static_flag"; then
4553 dlopen_self=$dlopen_self_static
4555 + prefer_static_libs=yes
4557 if test -z "$pic_flag" && test -n "$link_static_flag"; then
4558 dlopen_self=$dlopen_self_static
4560 + prefer_static_libs=built
4562 build_libtool_libs=no
4564 - prefer_static_libs=yes
4568 @@ -884,20 +1164,27 @@ compiler."
4569 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
4571 # Go through the arguments, transforming them on the way.
4572 - while test $# -gt 0; do
4573 + while test "$#" -gt 0; do
4577 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
4578 + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
4582 + libtool_args="$libtool_args $qarg"
4584 # If the previous option needs an argument, assign it.
4585 if test -n "$prev"; then
4589 compile_command="$compile_command @OUTPUT@"
4590 finalize_command="$finalize_command @OUTPUT@"
4597 if test "$preload" = no; then
4598 # Add the symbol object into the linking commands.
4599 @@ -905,7 +1192,7 @@ compiler."
4600 finalize_command="$finalize_command @SYMFILE@"
4605 *.la | *.lo) ;; # We handle these cases below.
4607 if test "$dlself" = no; then
4608 @@ -934,6 +1221,7 @@ compiler."
4609 dlprefiles="$dlprefiles $arg"
4616 @@ -941,7 +1229,7 @@ compiler."
4617 export_symbols="$arg"
4618 if test ! -f "$arg"; then
4619 $echo "$modename: symbol file \`$arg' does not exist"
4621 + exit $EXIT_FAILURE
4625 @@ -951,18 +1239,140 @@ compiler."
4630 + inst_prefix_dir="$arg"
4635 + precious_files_regex="$arg"
4645 + if test -f "$arg"; then
4648 + for fil in `cat $save_arg`
4650 +# moreargs="$moreargs $fil"
4652 + # A libtool-controlled object.
4654 + # Check to see that this really is a libtool object.
4655 + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4659 + # Read the .lo file
4660 + # If there is no directory component, then add one.
4662 + */* | *\\*) . $arg ;;
4666 + if test -z "$pic_object" || \
4667 + test -z "$non_pic_object" ||
4668 + test "$pic_object" = none && \
4669 + test "$non_pic_object" = none; then
4670 + $echo "$modename: cannot find name of object for \`$arg'" 1>&2
4671 + exit $EXIT_FAILURE
4674 + # Extract subdirectory from the argument.
4675 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
4676 + if test "X$xdir" = "X$arg"; then
4682 + if test "$pic_object" != none; then
4683 + # Prepend the subdirectory the object is found in.
4684 + pic_object="$xdir$pic_object"
4686 + if test "$prev" = dlfiles; then
4687 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4688 + dlfiles="$dlfiles $pic_object"
4692 + # If libtool objects are unsupported, then we need to preload.
4697 + # CHECK ME: I think I busted this. -Ossama
4698 + if test "$prev" = dlprefiles; then
4699 + # Preload the old-style object.
4700 + dlprefiles="$dlprefiles $pic_object"
4705 + libobjs="$libobjs $pic_object"
4710 + if test "$non_pic_object" != none; then
4711 + # Prepend the subdirectory the object is found in.
4712 + non_pic_object="$xdir$non_pic_object"
4714 + # A standard non-PIC object
4715 + non_pic_objects="$non_pic_objects $non_pic_object"
4716 + if test -z "$pic_object" || test "$pic_object" = none ; then
4717 + arg="$non_pic_object"
4720 + # If the PIC object exists, use it instead.
4721 + # $xdir was prepended to $pic_object above.
4722 + non_pic_object="$pic_object"
4723 + non_pic_objects="$non_pic_objects $non_pic_object"
4726 + # Only an error if not doing a dry-run.
4727 + if test -z "$run"; then
4728 + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
4729 + exit $EXIT_FAILURE
4733 + # Extract subdirectory from the argument.
4734 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
4735 + if test "X$xdir" = "X$arg"; then
4741 + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
4742 + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
4743 + libobjs="$libobjs $pic_object"
4744 + non_pic_objects="$non_pic_objects $non_pic_object"
4749 + $echo "$modename: link input file \`$save_arg' does not exist"
4750 + exit $EXIT_FAILURE
4757 # We need an absolute path.
4760 [\\/]* | [A-Za-z]:[\\/]*) ;;
4762 $echo "$modename: only absolute run-paths are allowed" 1>&2
4764 + exit $EXIT_FAILURE
4767 if test "$prev" = rpath; then
4768 @@ -979,17 +1389,52 @@ compiler."
4773 + compiler_flags="$compiler_flags $qarg"
4775 + compile_command="$compile_command $qarg"
4776 + finalize_command="$finalize_command $qarg"
4780 + linker_flags="$linker_flags $qarg"
4781 + compiler_flags="$compiler_flags $wl$qarg"
4783 + compile_command="$compile_command $wl$qarg"
4784 + finalize_command="$finalize_command $wl$qarg"
4788 + linker_flags="$linker_flags $qarg"
4789 + compiler_flags="$compiler_flags $qarg"
4791 + compile_command="$compile_command $qarg"
4792 + finalize_command="$finalize_command $qarg"
4796 + shrext_cmds="$arg"
4800 + darwin_framework|darwin_framework_skip)
4801 + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
4802 + compile_command="$compile_command $arg"
4803 + finalize_command="$finalize_command $arg"
4808 eval "$prev=\"\$arg\""
4814 + fi # test -n "$prev"
4821 if test -n "$link_static_flag"; then
4822 compile_command="$compile_command $link_static_flag"
4823 @@ -1026,8 +1471,8 @@ compiler."
4825 -export-symbols | -export-symbols-regex)
4826 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
4827 - $echo "$modename: not more than one -exported-symbols argument allowed"
4829 + $echo "$modename: more than one -exported-symbols argument is not allowed"
4830 + exit $EXIT_FAILURE
4832 if test "X$arg" = "X-export-symbols"; then
4834 @@ -1037,58 +1482,129 @@ compiler."
4838 + -framework|-arch|-isysroot)
4840 + *" ${arg} ${1} "* | *" ${arg} ${1} "*)
4841 + prev=darwin_framework_skip ;;
4842 + *) compiler_flags="$compiler_flags $arg"
4843 + prev=darwin_framework ;;
4845 + compile_command="$compile_command $arg"
4846 + finalize_command="$finalize_command $arg"
4855 + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
4856 + # so, if we see these flags be careful not to treat them like -L
4858 + case $with_gcc/$host in
4859 + no/*-*-irix* | /*-*-irix*)
4860 + compile_command="$compile_command $arg"
4861 + finalize_command="$finalize_command $arg"
4868 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
4869 # We need an absolute path.
4872 [\\/]* | [A-Za-z]:[\\/]*) ;;
4874 absdir=`cd "$dir" && pwd`
4875 if test -z "$absdir"; then
4876 - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
4877 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
4878 + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
4880 + notinst_path="$notinst_path $dir"
4885 - case " $deplibs " in
4887 - *) deplibs="$deplibs $arg";;
4889 - case " $lib_search_path " in
4891 - *) lib_search_path="$lib_search_path $dir";;
4892 + case "$deplibs " in
4895 + deplibs="$deplibs -L$dir"
4896 + lib_search_path="$lib_search_path $dir"
4900 - *-*-cygwin* | *-*-mingw* | *-*-os2*)
4901 - dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
4902 - case ":$dllsearchpath:" in
4903 - ::) dllsearchpath="$dllsearchdir";;
4904 - *":$dllsearchdir:"*) ;;
4905 - *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
4907 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4908 + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
4909 + case :$dllsearchpath: in
4911 + *) dllsearchpath="$dllsearchpath:$dir";;
4913 + case :$dllsearchpath: in
4914 + *":$testbindir:"*) ;;
4915 + *) dllsearchpath="$dllsearchpath:$testbindir";;
4923 - if test "$arg" = "-lc"; then
4925 - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
4926 - # These systems don't actually have c library (as such)
4927 + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
4929 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
4930 + # These systems don't actually have a C or math library (as such)
4934 - elif test "$arg" = "-lm"; then
4936 - *-*-cygwin* | *-*-beos*)
4937 - # These systems don't actually have math library (as such)
4939 + # These systems don't actually have a C library (as such)
4940 + test "X$arg" = "X-lc" && continue
4942 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4943 + # Do not include libc due to us having libc/libc_r.
4944 + test "X$arg" = "X-lc" && continue
4946 + *-*-rhapsody* | *-*-darwin1.[012])
4947 + # Rhapsody C and math libraries are in the System framework
4948 + deplibs="$deplibs -framework System"
4951 + *-*-sco3.2v5* | *-*-sco5v6*)
4952 + # Causes problems with __ctype
4953 + test "X$arg" = "X-lc" && continue
4955 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
4956 + # Compiler inserts libc in the correct place for threads to work
4957 + test "X$arg" = "X-lc" && continue
4960 + elif test "X$arg" = "X-lc_r"; then
4962 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
4963 + # Do not include libc_r directly, use -pthread flag.
4968 deplibs="$deplibs $arg"
4972 + # Tru64 UNIX uses -model [arg] to determine the layout of C++
4973 + # classes, name mangling, and exception handling.
4975 + compile_command="$compile_command $arg"
4976 + compiler_flags="$compiler_flags $arg"
4977 + finalize_command="$finalize_command $arg"
4982 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
4983 + compiler_flags="$compiler_flags $arg"
4984 + compile_command="$compile_command $arg"
4985 + finalize_command="$finalize_command $arg"
4990 @@ -1096,13 +1612,74 @@ compiler."
4994 + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4995 + # -r[0-9][0-9]* specifies the processor on the SGI compiler
4996 + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4997 + # +DA*, +DD* enable 64-bit mode on the HP compiler
4998 + # -q* pass through compiler args for the IBM compiler
4999 + # -m* pass through architecture-specific compiler args for GCC
5000 + # -m*, -t[45]*, -txscale* pass through architecture-specific
5001 + # compiler args for GCC
5002 + # -pg pass through profiling flag for GCC
5003 + # @file GCC response files
5004 + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
5005 + -t[45]*|-txscale*|@*)
5007 + # Unknown arguments in both finalize_command and compile_command need
5008 + # to be aesthetically quoted because they are evaled later.
5009 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5011 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5015 + compile_command="$compile_command $arg"
5016 + finalize_command="$finalize_command $arg"
5017 + compiler_flags="$compiler_flags $arg"
5033 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
5034 + # The PATH hackery in wrapper scripts is required on Windows
5035 + # in order for the loader to find any dlls it needs.
5036 + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
5037 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
5040 + *) no_install=yes ;;
5057 + -precious-files-regex)
5058 + prev=precious_regex
5065 @@ -1121,11 +1698,11 @@ compiler."
5067 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
5068 # We need an absolute path.
5071 [\\/]* | [A-Za-z]:[\\/]*) ;;
5073 $echo "$modename: only absolute run-paths are allowed" 1>&2
5075 + exit $EXIT_FAILURE
5079 @@ -1136,11 +1713,11 @@ compiler."
5083 - # If we have no pic_flag, then this is the same as -all-static.
5084 - if test -z "$pic_flag" && test -n "$link_static_flag"; then
5085 - compile_command="$compile_command $link_static_flag"
5086 - finalize_command="$finalize_command $link_static_flag"
5088 + # The effects of -static are defined in a previous loop.
5089 + # We used to do the same as -all-static on platforms that
5090 + # didn't have a PIC flag, but the assumption that the effects
5091 + # would be equivalent was wrong. It would break on at least
5092 + # Digital Unix and AIX.
5096 @@ -1153,388 +1730,1332 @@ compiler."
5107 + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
5109 + save_ifs="$IFS"; IFS=','
5110 + for flag in $args; do
5113 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5117 + arg="$arg $wl$flag"
5118 + compiler_flags="$compiler_flags $flag"
5121 + arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
5125 + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
5127 + save_ifs="$IFS"; IFS=','
5128 + for flag in $args; do
5131 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5135 + arg="$arg $wl$flag"
5136 + compiler_flags="$compiler_flags $wl$flag"
5137 + linker_flags="$linker_flags $flag"
5140 + arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
5158 # Some other compiler flag.
5160 # Unknown arguments in both finalize_command and compile_command need
5161 # to be aesthetically quoted because they are evaled later.
5162 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5164 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5166 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5172 - *.o | *.obj | *.a | *.lib)
5174 # A standard object.
5179 - # A library object.
5180 - if test "$prev" = dlfiles; then
5181 - dlfiles="$dlfiles $arg"
5182 - if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
5185 + # A libtool-controlled object.
5187 + # Check to see that this really is a libtool object.
5188 + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5192 + # Read the .lo file
5193 + # If there is no directory component, then add one.
5195 + */* | *\\*) . $arg ;;
5199 + if test -z "$pic_object" || \
5200 + test -z "$non_pic_object" ||
5201 + test "$pic_object" = none && \
5202 + test "$non_pic_object" = none; then
5203 + $echo "$modename: cannot find name of object for \`$arg'" 1>&2
5204 + exit $EXIT_FAILURE
5207 + # Extract subdirectory from the argument.
5208 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
5209 + if test "X$xdir" = "X$arg"; then
5215 + if test "$pic_object" != none; then
5216 + # Prepend the subdirectory the object is found in.
5217 + pic_object="$xdir$pic_object"
5219 + if test "$prev" = dlfiles; then
5220 + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
5221 + dlfiles="$dlfiles $pic_object"
5225 + # If libtool objects are unsupported, then we need to preload.
5230 + # CHECK ME: I think I busted this. -Ossama
5231 + if test "$prev" = dlprefiles; then
5232 + # Preload the old-style object.
5233 + dlprefiles="$dlprefiles $pic_object"
5238 + libobjs="$libobjs $pic_object"
5243 + if test "$non_pic_object" != none; then
5244 + # Prepend the subdirectory the object is found in.
5245 + non_pic_object="$xdir$non_pic_object"
5247 + # A standard non-PIC object
5248 + non_pic_objects="$non_pic_objects $non_pic_object"
5249 + if test -z "$pic_object" || test "$pic_object" = none ; then
5250 + arg="$non_pic_object"
5253 - # If libtool objects are unsupported, then we need to preload.
5255 + # If the PIC object exists, use it instead.
5256 + # $xdir was prepended to $pic_object above.
5257 + non_pic_object="$pic_object"
5258 + non_pic_objects="$non_pic_objects $non_pic_object"
5262 + # Only an error if not doing a dry-run.
5263 + if test -z "$run"; then
5264 + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
5265 + exit $EXIT_FAILURE
5269 - if test "$prev" = dlprefiles; then
5270 - # Preload the old-style object.
5271 - dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
5273 + # Extract subdirectory from the argument.
5274 + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
5275 + if test "X$xdir" = "X$arg"; then
5281 + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
5282 + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
5283 + libobjs="$libobjs $pic_object"
5284 + non_pic_objects="$non_pic_objects $non_pic_object"
5287 - libobjs="$libobjs $arg"
5292 + deplibs="$deplibs $arg"
5293 + old_deplibs="$old_deplibs $arg"
5298 # A libtool-controlled library.
5304 + if test "$prev" = dlfiles; then
5305 + # This library was specified with -dlopen.
5306 + dlfiles="$dlfiles $arg"
5308 + elif test "$prev" = dlprefiles; then
5309 + # The library was specified with -dlpreopen.
5310 + dlprefiles="$dlprefiles $arg"
5313 + deplibs="$deplibs $arg"
5318 + # Some other compiler argument.
5320 + # Unknown arguments in both finalize_command and compile_command need
5321 + # to be aesthetically quoted because they are evaled later.
5322 + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5324 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5331 + # Now actually substitute the argument into the commands.
5332 + if test -n "$arg"; then
5333 + compile_command="$compile_command $arg"
5334 + finalize_command="$finalize_command $arg"
5336 + done # argument parsing loop
5338 + if test -n "$prev"; then
5339 + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
5340 + $echo "$help" 1>&2
5341 + exit $EXIT_FAILURE
5344 + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
5345 + eval arg=\"$export_dynamic_flag_spec\"
5346 + compile_command="$compile_command $arg"
5347 + finalize_command="$finalize_command $arg"
5351 + # calculate the name of the file, without its directory
5352 + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
5353 + libobjs_save="$libobjs"
5355 + if test -n "$shlibpath_var"; then
5356 + # get the directories listed in $shlibpath_var
5357 + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
5359 + shlib_search_path=
5361 + eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
5362 + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
5364 + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
5365 + if test "X$output_objdir" = "X$output"; then
5366 + output_objdir="$objdir"
5368 + output_objdir="$output_objdir/$objdir"
5370 + # Create the object directory.
5371 + if test ! -d "$output_objdir"; then
5372 + $show "$mkdir $output_objdir"
5373 + $run $mkdir $output_objdir
5375 + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
5380 + # Determine the type of output
5383 + $echo "$modename: you must specify an output file" 1>&2
5384 + $echo "$help" 1>&2
5385 + exit $EXIT_FAILURE
5387 + *.$libext) linkmode=oldlib ;;
5388 + *.lo | *.$objext) linkmode=obj ;;
5389 + *.la) linkmode=lib ;;
5390 + *) linkmode=prog ;; # Anything else should be a program.
5394 + *cygwin* | *mingw* | *pw32*)
5395 + # don't eliminate duplications in $postdeps and $predeps
5396 + duplicate_compiler_generated_deps=yes
5399 + duplicate_compiler_generated_deps=$duplicate_deps
5405 + # Find all interdependent deplibs by searching for libraries
5406 + # that are linked more than once (e.g. -la -lb -la)
5407 + for deplib in $deplibs; do
5408 + if test "X$duplicate_deps" = "Xyes" ; then
5410 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5413 + libs="$libs $deplib"
5416 + if test "$linkmode" = lib; then
5417 + libs="$predeps $libs $compiler_lib_search_path $postdeps"
5419 + # Compute libraries that are listed more than once in $predeps
5420 + # $postdeps and mark them as special (i.e., whose duplicates are
5421 + # not to be eliminated).
5423 + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
5424 + for pre_post_dep in $predeps $postdeps; do
5425 + case "$pre_post_deps " in
5426 + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
5428 + pre_post_deps="$pre_post_deps $pre_post_dep"
5435 + newdependency_libs=
5436 + newlib_search_path=
5437 + need_relink=no # whether we're linking any uninstalled libtool libraries
5438 + notinst_deplibs= # not-installed libtool libraries
5441 + passes="conv link"
5442 + for file in $dlfiles $dlprefiles; do
5446 + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
5447 + exit $EXIT_FAILURE
5458 + passes="conv scan dlopen dlpreopen link"
5463 + for pass in $passes; do
5464 + if test "$linkmode,$pass" = "lib,link" ||
5465 + test "$linkmode,$pass" = "prog,scan"; then
5469 + if test "$linkmode" = prog; then
5471 + dlopen) libs="$dlfiles" ;;
5472 + dlpreopen) libs="$dlprefiles" ;;
5473 + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
5476 + if test "$pass" = dlopen; then
5477 + # Collect dlpreopened libraries
5478 + save_deplibs="$deplibs"
5481 + for deplib in $libs; do
5485 + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
5486 + if test "$linkmode,$pass" = "prog,link"; then
5487 + compile_deplibs="$deplib $compile_deplibs"
5488 + finalize_deplibs="$deplib $finalize_deplibs"
5490 + compiler_flags="$compiler_flags $deplib"
5495 + if test "$linkmode" != lib && test "$linkmode" != prog; then
5496 + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
5499 + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
5500 + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
5501 + for search_ext in .la $std_shrext .so .a; do
5502 + # Search the libtool library
5503 + lib="$searchdir/lib${name}${search_ext}"
5504 + if test -f "$lib"; then
5505 + if test "$search_ext" = ".la"; then
5514 + if test "$found" != yes; then
5515 + # deplib doesn't seem to be a libtool library
5516 + if test "$linkmode,$pass" = "prog,link"; then
5517 + compile_deplibs="$deplib $compile_deplibs"
5518 + finalize_deplibs="$deplib $finalize_deplibs"
5520 + deplibs="$deplib $deplibs"
5521 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5524 + else # deplib is a libtool library
5525 + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
5526 + # We need to do some special things here, and not later.
5527 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
5528 + case " $predeps $postdeps " in
5530 + if (${SED} -e '2q' $lib |
5531 + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5535 + */* | *\\*) . $lib ;;
5538 + for l in $old_library $library_names; do
5541 + if test "X$ll" = "X$old_library" ; then # only static version available
5543 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
5544 + test "X$ladir" = "X$lib" && ladir="."
5545 + lib=$ladir/$old_library
5546 + if test "$linkmode,$pass" = "prog,link"; then
5547 + compile_deplibs="$deplib $compile_deplibs"
5548 + finalize_deplibs="$deplib $finalize_deplibs"
5550 + deplibs="$deplib $deplibs"
5551 + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
5565 + deplibs="$deplib $deplibs"
5566 + test "$pass" = conv && continue
5567 + newdependency_libs="$deplib $newdependency_libs"
5568 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
5571 + if test "$pass" = conv; then
5572 + deplibs="$deplib $deplibs"
5575 + if test "$pass" = scan; then
5576 + deplibs="$deplib $deplibs"
5578 + compile_deplibs="$deplib $compile_deplibs"
5579 + finalize_deplibs="$deplib $finalize_deplibs"
5581 + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
5584 + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
5590 + if test "$pass" = link; then
5591 + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
5592 + # Make sure the xrpath contains only unique directories.
5593 + case "$xrpath " in
5595 + *) xrpath="$xrpath $dir" ;;
5598 + deplibs="$deplib $deplibs"
5601 + *.la) lib="$deplib" ;;
5603 + if test "$pass" = conv; then
5604 + deplibs="$deplib $deplibs"
5610 + case $deplibs_check_method in
5612 + set dummy $deplibs_check_method
5613 + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
5614 + if eval $echo \"$deplib\" 2>/dev/null \
5616 + | $EGREP "$match_pattern_regex" > /dev/null; then
5624 + if test "$valid_a_lib" != yes; then
5626 + $echo "*** Warning: Trying to link with static lib archive $deplib."
5627 + $echo "*** I have the capability to make that library automatically link in when"
5628 + $echo "*** you link to this library. But I can only do this if you have a"
5629 + $echo "*** shared version of the library, which you do not appear to have"
5630 + $echo "*** because the file extensions .$libext of this argument makes me believe"
5631 + $echo "*** that it is just a static archive that I should not used here."
5634 + $echo "*** Warning: Linking the shared library $output against the"
5635 + $echo "*** static library $deplib is not portable!"
5636 + deplibs="$deplib $deplibs"
5641 + if test "$pass" != link; then
5642 + deplibs="$deplib $deplibs"
5644 + compile_deplibs="$deplib $compile_deplibs"
5645 + finalize_deplibs="$deplib $finalize_deplibs"
5652 + if test "$pass" = conv; then
5653 + deplibs="$deplib $deplibs"
5654 + elif test "$linkmode" = prog; then
5655 + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5656 + # If there is no dlopen support or we're linking statically,
5657 + # we need to preload.
5658 + newdlprefiles="$newdlprefiles $deplib"
5659 + compile_deplibs="$deplib $compile_deplibs"
5660 + finalize_deplibs="$deplib $finalize_deplibs"
5662 + newdlfiles="$newdlfiles $deplib"
5671 + esac # case $deplib
5672 + if test "$found" = yes || test -f "$lib"; then :
5674 + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
5675 + exit $EXIT_FAILURE
5678 # Check to see that this really is a libtool archive.
5679 - if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5680 + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5682 - $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
5684 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5685 + exit $EXIT_FAILURE
5688 + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
5689 + test "X$ladir" = "X$lib" && ladir="."
5697 # If the library was installed with an old release of libtool,
5698 - # it will not redefine variable installed.
5699 + # it will not redefine variables installed, or shouldnotlink
5706 - # If there is no directory component, then add one.
5708 - */* | *\\*) . $arg ;;
5711 + */* | *\\*) . $lib ;;
5715 + if test "$linkmode,$pass" = "lib,link" ||
5716 + test "$linkmode,$pass" = "prog,scan" ||
5717 + { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5718 + test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5719 + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
5722 + if test "$pass" = conv; then
5723 + # Only check for convenience libraries
5724 + deplibs="$lib $deplibs"
5725 + if test -z "$libdir"; then
5726 + if test -z "$old_library"; then
5727 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
5728 + exit $EXIT_FAILURE
5730 + # It is a libtool convenience library, so add in its objects.
5731 + convenience="$convenience $ladir/$objdir/$old_library"
5732 + old_convenience="$old_convenience $ladir/$objdir/$old_library"
5734 + for deplib in $dependency_libs; do
5735 + deplibs="$deplib $deplibs"
5736 + if test "X$duplicate_deps" = "Xyes" ; then
5737 + case "$tmp_libs " in
5738 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5741 + tmp_libs="$tmp_libs $deplib"
5743 + elif test "$linkmode" != prog && test "$linkmode" != lib; then
5744 + $echo "$modename: \`$lib' is not a convenience library" 1>&2
5745 + exit $EXIT_FAILURE
5751 # Get the name of the library we link against.
5753 for l in $old_library $library_names; do
5757 if test -z "$linklib"; then
5758 - $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
5760 + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
5761 + exit $EXIT_FAILURE
5764 - # Find the relevant object directory and library name.
5765 - name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
5766 + # This library was specified with -dlopen.
5767 + if test "$pass" = dlopen; then
5768 + if test -z "$libdir"; then
5769 + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
5770 + exit $EXIT_FAILURE
5772 + if test -z "$dlname" ||
5773 + test "$dlopen_support" != yes ||
5774 + test "$build_libtool_libs" = no; then
5775 + # If there is no dlname, no dlopen support or we're linking
5776 + # statically, we need to preload. We also need to preload any
5777 + # dependent libraries so libltdl's deplib preloader doesn't
5778 + # bomb out in the load deplibs phase.
5779 + dlprefiles="$dlprefiles $lib $dependency_libs"
5781 + newdlfiles="$newdlfiles $lib"
5784 + fi # $pass = dlopen
5786 + # We need an absolute path.
5788 + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
5790 + abs_ladir=`cd "$ladir" && pwd`
5791 + if test -z "$abs_ladir"; then
5792 + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
5793 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
5794 + abs_ladir="$ladir"
5798 + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5800 + # Find the relevant object directory and library name.
5801 if test "X$installed" = Xyes; then
5803 + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5804 + $echo "$modename: warning: library \`$lib' was moved." 1>&2
5806 + absdir="$abs_ladir"
5807 + libdir="$abs_ladir"
5812 + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5814 - dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
5815 - if test "X$dir" = "X$arg"; then
5817 + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5819 + absdir="$abs_ladir"
5820 + # Remove this search path later
5821 + notinst_path="$notinst_path $abs_ladir"
5823 - dir="$dir/$objdir"
5824 + dir="$ladir/$objdir"
5825 + absdir="$abs_ladir/$objdir"
5826 + # Remove this search path later
5827 + notinst_path="$notinst_path $abs_ladir"
5829 + fi # $installed = yes
5830 + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
5832 + # This library was specified with -dlpreopen.
5833 + if test "$pass" = dlpreopen; then
5834 + if test -z "$libdir"; then
5835 + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
5836 + exit $EXIT_FAILURE
5838 + # Prefer using a static library (so that no silly _DYNAMIC symbols
5839 + # are required to link).
5840 + if test -n "$old_library"; then
5841 + newdlprefiles="$newdlprefiles $dir/$old_library"
5842 + # Otherwise, use the dlname, so that lt_dlopen finds it.
5843 + elif test -n "$dlname"; then
5844 + newdlprefiles="$newdlprefiles $dir/$dlname"
5846 + newdlprefiles="$newdlprefiles $dir/$linklib"
5848 + fi # $pass = dlpreopen
5850 + if test -z "$libdir"; then
5851 + # Link the convenience library
5852 + if test "$linkmode" = lib; then
5853 + deplibs="$dir/$old_library $deplibs"
5854 + elif test "$linkmode,$pass" = "prog,link"; then
5855 + compile_deplibs="$dir/$old_library $compile_deplibs"
5856 + finalize_deplibs="$dir/$old_library $finalize_deplibs"
5858 + deplibs="$lib $deplibs" # used for prog,scan pass
5863 - if test -n "$dependency_libs"; then
5864 - # Extract -R and -L from dependency_libs
5867 + if test "$linkmode" = prog && test "$pass" != link; then
5868 + newlib_search_path="$newlib_search_path $ladir"
5869 + deplibs="$lib $deplibs"
5872 + if test "$link_all_deplibs" != no || test -z "$library_names" ||
5873 + test "$build_libtool_libs" = no; then
5874 + linkalldeplibs=yes
5878 for deplib in $dependency_libs; do
5880 - -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
5881 - case " $rpath $xrpath " in
5882 - *" $temp_xrpath "*) ;;
5883 - *) xrpath="$xrpath $temp_xrpath";;
5885 - -L*) case "$compile_command $temp_deplibs " in
5887 - *) temp_deplibs="$temp_deplibs $deplib";;
5889 - temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
5890 - case " $lib_search_path " in
5891 - *" $temp_dir "*) ;;
5892 - *) lib_search_path="$lib_search_path $temp_dir";;
5895 - *) temp_deplibs="$temp_deplibs $deplib";;
5897 + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
5900 - dependency_libs="$temp_deplibs"
5903 - if test -z "$libdir"; then
5904 - # It is a libtool convenience library, so add in its objects.
5905 - convenience="$convenience $dir/$old_library"
5906 - old_convenience="$old_convenience $dir/$old_library"
5907 - deplibs="$deplibs$dependency_libs"
5908 - compile_command="$compile_command $dir/$old_library$dependency_libs"
5909 - finalize_command="$finalize_command $dir/$old_library$dependency_libs"
5910 + # Need to link against all dependency_libs?
5911 + if test "$linkalldeplibs" = yes; then
5912 + deplibs="$deplib $deplibs"
5914 + # Need to hardcode shared library paths
5915 + # or/and link against static libraries
5916 + newdependency_libs="$deplib $newdependency_libs"
5918 + if test "X$duplicate_deps" = "Xyes" ; then
5919 + case "$tmp_libs " in
5920 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5923 + tmp_libs="$tmp_libs $deplib"
5927 + fi # $linkmode = prog...
5929 - # This library was specified with -dlopen.
5930 - if test "$prev" = dlfiles; then
5931 - dlfiles="$dlfiles $arg"
5932 - if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
5933 - # If there is no dlname, no dlopen support or we're linking statically,
5934 - # we need to preload.
5937 - # We should not create a dependency on this library, but we
5938 - # may need any libraries it requires.
5939 - compile_command="$compile_command$dependency_libs"
5940 - finalize_command="$finalize_command$dependency_libs"
5942 + if test "$linkmode,$pass" = "prog,link"; then
5943 + if test -n "$library_names" &&
5944 + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
5945 + # We need to hardcode the library path
5946 + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
5947 + # Make sure the rpath contains only unique directories.
5948 + case "$temp_rpath " in
5951 + *) temp_rpath="$temp_rpath $absdir" ;;
5955 + # Hardcode the library path.
5956 + # Skip directories that are in the system default run-time
5958 + case " $sys_lib_dlsearch_path " in
5961 + case "$compile_rpath " in
5963 + *) compile_rpath="$compile_rpath $absdir"
5967 + case " $sys_lib_dlsearch_path " in
5970 + case "$finalize_rpath " in
5972 + *) finalize_rpath="$finalize_rpath $libdir"
5976 + fi # $linkmode,$pass = prog,link...
5978 + if test "$alldeplibs" = yes &&
5979 + { test "$deplibs_check_method" = pass_all ||
5980 + { test "$build_libtool_libs" = yes &&
5981 + test -n "$library_names"; }; }; then
5982 + # We only need to search for static libraries
5987 - # The library was specified with -dlpreopen.
5988 - if test "$prev" = dlprefiles; then
5989 - # Prefer using a static library (so that no silly _DYNAMIC symbols
5990 - # are required to link).
5991 - if test -n "$old_library"; then
5992 - dlprefiles="$dlprefiles $dir/$old_library"
5994 - dlprefiles="$dlprefiles $dir/$linklib"
5997 + link_static=no # Whether the deplib will be linked statically
5998 + use_static_libs=$prefer_static_libs
5999 + if test "$use_static_libs" = built && test "$installed" = yes ; then
6000 + use_static_libs=no
6003 if test -n "$library_names" &&
6004 - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
6005 - link_against_libtool_libs="$link_against_libtool_libs $arg"
6006 - if test -n "$shlibpath_var"; then
6007 - # Make sure the rpath contains only unique directories.
6008 - case "$temp_rpath " in
6010 - *) temp_rpath="$temp_rpath $dir" ;;
6014 - # We need an absolute path.
6016 - [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
6018 - absdir=`cd "$dir" && pwd`
6019 - if test -z "$absdir"; then
6020 - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
6021 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
6023 + { test "$use_static_libs" = no || test -z "$old_library"; }; then
6024 + if test "$installed" = no; then
6025 + notinst_deplibs="$notinst_deplibs $lib"
6028 + # This is a shared library
6030 + # Warn about portability, can't link against -module's on
6031 + # some systems (darwin)
6032 + if test "$shouldnotlink" = yes && test "$pass" = link ; then
6034 + if test "$linkmode" = prog; then
6035 + $echo "*** Warning: Linking the executable $output against the loadable module"
6037 + $echo "*** Warning: Linking the shared library $output against the loadable module"
6042 - # This is the magic to use -rpath.
6043 - # Skip directories that are in the system default run-time
6044 - # search path, unless they have been requested with -R.
6045 - case " $sys_lib_dlsearch_path " in
6048 - case "$compile_rpath " in
6049 + $echo "*** $linklib is not portable!"
6051 + if test "$linkmode" = lib &&
6052 + test "$hardcode_into_libs" = yes; then
6053 + # Hardcode the library path.
6054 + # Skip directories that are in the system default run-time
6056 + case " $sys_lib_dlsearch_path " in
6058 - *) compile_rpath="$compile_rpath $absdir"
6060 + case "$compile_rpath " in
6062 + *) compile_rpath="$compile_rpath $absdir"
6069 - case " $sys_lib_dlsearch_path " in
6072 - case "$finalize_rpath " in
6073 + case " $sys_lib_dlsearch_path " in
6075 - *) finalize_rpath="$finalize_rpath $libdir"
6077 + case "$finalize_rpath " in
6079 + *) finalize_rpath="$finalize_rpath $libdir"
6088 - case "$hardcode_action" in
6089 - immediate | unsupported)
6090 - if test "$hardcode_direct" = no; then
6091 - compile_command="$compile_command $dir/$linklib"
6092 - deplibs="$deplibs $dir/$linklib"
6094 - *-*-cygwin* | *-*-mingw* | *-*-os2*)
6095 - dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
6096 - if test -n "$dllsearchpath"; then
6097 - dllsearchpath="$dllsearchpath:$dllsearchdir"
6099 - dllsearchpath="$dllsearchdir"
6101 + if test -n "$old_archive_from_expsyms_cmds"; then
6102 + # figure out the soname
6103 + set dummy $library_names
6106 + libname=`eval \\$echo \"$libname_spec\"`
6107 + # use dlname if we got it. it's perfectly good, no?
6108 + if test -n "$dlname"; then
6110 + elif test -n "$soname_spec"; then
6113 + *cygwin* | mingw*)
6114 + major=`expr $current - $age`
6115 + versuffix="-$major"
6118 - elif test "$hardcode_minus_L" = no; then
6121 - compile_shlibpath="$compile_shlibpath$dir:"
6124 - case "$compile_command " in
6126 - *) compile_command="$compile_command -L$dir";;
6128 - compile_command="$compile_command -l$name"
6129 - deplibs="$deplibs -L$dir -l$name"
6130 - elif test "$hardcode_shlibpath_var" = no; then
6131 - case ":$compile_shlibpath:" in
6133 - *) compile_shlibpath="$compile_shlibpath$dir:";;
6134 + eval soname=\"$soname_spec\"
6136 + soname="$realname"
6139 + # Make a new name for the extract_expsyms_cmds to use
6141 + soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
6142 + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
6144 + # If the library has no export list, then create one now
6145 + if test -f "$output_objdir/$soname-def"; then :
6147 + $show "extracting exported symbol list from \`$soname'"
6148 + save_ifs="$IFS"; IFS='~'
6149 + cmds=$extract_expsyms_cmds
6150 + for cmd in $cmds; do
6154 + $run eval "$cmd" || exit $?
6160 + if test -f "$output_objdir/$newlib"; then :; else
6161 + $show "generating import library for \`$soname'"
6162 + save_ifs="$IFS"; IFS='~'
6163 + cmds=$old_archive_from_expsyms_cmds
6164 + for cmd in $cmds; do
6168 + $run eval "$cmd" || exit $?
6172 + # make sure the library variables are pointing to the new library
6173 + dir=$output_objdir
6175 + fi # test -n "$old_archive_from_expsyms_cmds"
6177 + if test "$linkmode" = prog || test "$mode" != relink; then
6182 + case $hardcode_action in
6183 + immediate | unsupported)
6184 + if test "$hardcode_direct" = no; then
6185 + add="$dir/$linklib"
6187 + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6188 + *-*-sysv4*uw2*) add_dir="-L$dir" ;;
6189 + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6190 + *-*-unixware7*) add_dir="-L$dir" ;;
6192 + # if the lib is a module then we can not link against
6193 + # it, someone is ignoring the new warnings I added
6194 + if /usr/bin/file -L $add 2> /dev/null |
6195 + $EGREP ": [^:]* bundle" >/dev/null ; then
6196 + $echo "** Warning, lib $linklib is a module, not a shared library"
6197 + if test -z "$old_library" ; then
6199 + $echo "** And there doesn't seem to be a static archive available"
6200 + $echo "** The link will probably fail, sorry"
6202 + add="$dir/$old_library"
6206 + elif test "$hardcode_minus_L" = no; then
6208 + *-*-sunos*) add_shlibpath="$dir" ;;
6212 + elif test "$hardcode_shlibpath_var" = no; then
6213 + add_shlibpath="$dir"
6220 + if test "$hardcode_direct" = yes; then
6221 + add="$dir/$linklib"
6222 + elif test "$hardcode_minus_L" = yes; then
6224 + # Try looking first in the location we're being installed to.
6225 + if test -n "$inst_prefix_dir"; then
6228 + add_dir="$add_dir -L$inst_prefix_dir$libdir"
6233 + elif test "$hardcode_shlibpath_var" = yes; then
6234 + add_shlibpath="$dir"
6240 + *) lib_linked=no ;;
6243 + if test "$lib_linked" != yes; then
6244 + $echo "$modename: configuration error: unsupported hardcode properties"
6245 + exit $EXIT_FAILURE
6248 + if test -n "$add_shlibpath"; then
6249 + case :$compile_shlibpath: in
6250 + *":$add_shlibpath:"*) ;;
6251 + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
6253 - compile_command="$compile_command -l$name"
6254 - deplibs="$deplibs -l$name"
6256 + if test "$linkmode" = prog; then
6257 + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
6258 + test -n "$add" && compile_deplibs="$add $compile_deplibs"
6261 + test -n "$add_dir" && deplibs="$add_dir $deplibs"
6262 + test -n "$add" && deplibs="$add $deplibs"
6263 + if test "$hardcode_direct" != yes && \
6264 + test "$hardcode_minus_L" != yes && \
6265 + test "$hardcode_shlibpath_var" = yes; then
6266 + case :$finalize_shlibpath: in
6268 + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6276 + if test "$linkmode" = prog || test "$mode" = relink; then
6280 + # Finalize command for both is simple: just hardcode it.
6281 if test "$hardcode_direct" = yes; then
6282 - compile_command="$compile_command $absdir/$linklib"
6283 - deplibs="$deplibs $absdir/$linklib"
6284 + add="$libdir/$linklib"
6285 elif test "$hardcode_minus_L" = yes; then
6286 - case "$compile_command " in
6287 - *" -L$absdir "*) ;;
6288 - *) compile_command="$compile_command -L$absdir";;
6290 - compile_command="$compile_command -l$name"
6291 - deplibs="$deplibs -L$absdir -l$name"
6292 + add_dir="-L$libdir"
6294 elif test "$hardcode_shlibpath_var" = yes; then
6295 - case ":$compile_shlibpath:" in
6297 - *) compile_shlibpath="$compile_shlibpath$absdir:";;
6298 + case :$finalize_shlibpath: in
6300 + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6302 - compile_command="$compile_command -l$name"
6303 - deplibs="$deplibs -l$name"
6305 + elif test "$hardcode_automatic" = yes; then
6306 + if test -n "$inst_prefix_dir" &&
6307 + test -f "$inst_prefix_dir$libdir/$linklib" ; then
6308 + add="$inst_prefix_dir$libdir/$linklib"
6310 + add="$libdir/$linklib"
6314 + # We cannot seem to hardcode it, guess we'll fake it.
6315 + add_dir="-L$libdir"
6316 + # Try looking first in the location we're being installed to.
6317 + if test -n "$inst_prefix_dir"; then
6320 + add_dir="$add_dir -L$inst_prefix_dir$libdir"
6333 - if test "$lib_linked" != yes; then
6334 - $echo "$modename: configuration error: unsupported hardcode properties"
6338 - # Finalize command for both is simple: just hardcode it.
6339 - if test "$hardcode_direct" = yes; then
6340 - finalize_command="$finalize_command $libdir/$linklib"
6341 - elif test "$hardcode_minus_L" = yes; then
6342 - case "$finalize_command " in
6343 - *" -L$libdir "*) ;;
6344 - *) finalize_command="$finalize_command -L$libdir";;
6346 - finalize_command="$finalize_command -l$name"
6347 - elif test "$hardcode_shlibpath_var" = yes; then
6348 - case ":$finalize_shlibpath:" in
6350 - *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
6352 - finalize_command="$finalize_command -l$name"
6354 - # We cannot seem to hardcode it, guess we'll fake it.
6355 - case "$finalize_command " in
6357 - *) finalize_command="$finalize_command -L$libdir";;
6359 - finalize_command="$finalize_command -l$name"
6362 - # Transform directly to old archives if we don't build new libraries.
6363 - if test -n "$pic_flag" && test -z "$old_library"; then
6364 - $echo "$modename: cannot find static library for \`$arg'" 1>&2
6366 + if test "$linkmode" = prog; then
6367 + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
6368 + test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
6370 + test -n "$add_dir" && deplibs="$add_dir $deplibs"
6371 + test -n "$add" && deplibs="$add $deplibs"
6375 + elif test "$linkmode" = prog; then
6376 # Here we assume that one of hardcode_direct or hardcode_minus_L
6377 # is not unsupported. This is valid on all known static and
6379 if test "$hardcode_direct" != unsupported; then
6380 test -n "$old_library" && linklib="$old_library"
6381 - compile_command="$compile_command $dir/$linklib"
6382 - finalize_command="$finalize_command $dir/$linklib"
6383 + compile_deplibs="$dir/$linklib $compile_deplibs"
6384 + finalize_deplibs="$dir/$linklib $finalize_deplibs"
6386 - case "$compile_command " in
6388 - *) compile_command="$compile_command -L$dir";;
6390 - compile_command="$compile_command -l$name"
6391 - case "$finalize_command " in
6393 - *) finalize_command="$finalize_command -L$dir";;
6395 - finalize_command="$finalize_command -l$name"
6396 + compile_deplibs="-l$name -L$dir $compile_deplibs"
6397 + finalize_deplibs="-l$name -L$dir $finalize_deplibs"
6400 + elif test "$build_libtool_libs" = yes; then
6401 + # Not a shared library
6402 + if test "$deplibs_check_method" != pass_all; then
6403 + # We're trying link a shared library against a static one
6404 + # but the system doesn't support it.
6406 + # Just print a warning and add the library to dependency_libs so
6407 + # that the program can be linked against the static library.
6409 + $echo "*** Warning: This system can not link to static lib archive $lib."
6410 + $echo "*** I have the capability to make that library automatically link in when"
6411 + $echo "*** you link to this library. But I can only do this if you have a"
6412 + $echo "*** shared version of the library, which you do not appear to have."
6413 + if test "$module" = yes; then
6414 + $echo "*** But as you try to build a module library, libtool will still create "
6415 + $echo "*** a static module, that should work as long as the dlopening application"
6416 + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
6417 + if test -z "$global_symbol_pipe"; then
6419 + $echo "*** However, this would only work if libtool was able to extract symbol"
6420 + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6421 + $echo "*** not find such a program. So, this module is probably useless."
6422 + $echo "*** \`nm' from GNU binutils and a full rebuild may help."
6424 + if test "$build_old_libs" = no; then
6425 + build_libtool_libs=module
6426 + build_old_libs=yes
6428 + build_libtool_libs=no
6432 + deplibs="$dir/$old_library $deplibs"
6435 + fi # link shared/static library?
6437 - # Add in any libraries that this one depends upon.
6438 - compile_command="$compile_command$dependency_libs"
6439 - finalize_command="$finalize_command$dependency_libs"
6442 + if test "$linkmode" = lib; then
6443 + if test -n "$dependency_libs" &&
6444 + { test "$hardcode_into_libs" != yes ||
6445 + test "$build_old_libs" = yes ||
6446 + test "$link_static" = yes; }; then
6447 + # Extract -R from dependency_libs
6449 + for libdir in $dependency_libs; do
6451 + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
6452 + case " $xrpath " in
6453 + *" $temp_xrpath "*) ;;
6454 + *) xrpath="$xrpath $temp_xrpath";;
6456 + *) temp_deplibs="$temp_deplibs $libdir";;
6459 + dependency_libs="$temp_deplibs"
6462 - # Some other compiler argument.
6464 - # Unknown arguments in both finalize_command and compile_command need
6465 - # to be aesthetically quoted because they are evaled later.
6466 - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6468 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
6474 + newlib_search_path="$newlib_search_path $absdir"
6475 + # Link against this library
6476 + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
6477 + # ... and its dependency_libs
6479 + for deplib in $dependency_libs; do
6480 + newdependency_libs="$deplib $newdependency_libs"
6481 + if test "X$duplicate_deps" = "Xyes" ; then
6482 + case "$tmp_libs " in
6483 + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6486 + tmp_libs="$tmp_libs $deplib"
6489 - # Now actually substitute the argument into the commands.
6490 - if test -n "$arg"; then
6491 - compile_command="$compile_command $arg"
6492 - finalize_command="$finalize_command $arg"
6493 + if test "$link_all_deplibs" != no; then
6494 + # Add the search paths of all dependency libraries
6495 + for deplib in $dependency_libs; do
6497 + -L*) path="$deplib" ;;
6499 + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
6500 + test "X$dir" = "X$deplib" && dir="."
6501 + # We need an absolute path.
6503 + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
6505 + absdir=`cd "$dir" && pwd`
6506 + if test -z "$absdir"; then
6507 + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
6512 + if grep "^installed=no" $deplib > /dev/null; then
6513 + path="$absdir/$objdir"
6515 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6516 + if test -z "$libdir"; then
6517 + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6518 + exit $EXIT_FAILURE
6520 + if test "$absdir" != "$libdir"; then
6521 + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
6528 + # we do not want to link against static libs,
6529 + # but need to link against shared
6530 + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
6531 + if test -n "$deplibrary_names" ; then
6532 + for tmp in $deplibrary_names ; do
6535 + if test -f "$path/$depdepl" ; then
6536 + depdepl="$path/$depdepl"
6538 + # do not add paths which are already there
6539 + case " $newlib_search_path " in
6541 + *) newlib_search_path="$newlib_search_path $path";;
6554 + # Again, we only want to link against shared libraries
6555 + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
6556 + for tmp in $newlib_search_path ; do
6557 + if test -f "$tmp/lib$tmp_libs.dylib" ; then
6558 + eval depdepl="$tmp/lib$tmp_libs.dylib"
6569 + case " $deplibs " in
6571 + *) deplibs="$path $deplibs" ;;
6573 + case " $deplibs " in
6574 + *" $depdepl "*) ;;
6575 + *) deplibs="$depdepl $deplibs" ;;
6578 + fi # link_all_deplibs != no
6579 + fi # linkmode = lib
6580 + done # for deplib in $libs
6581 + dependency_libs="$newdependency_libs"
6582 + if test "$pass" = dlpreopen; then
6583 + # Link the dlpreopened libraries before other libraries
6584 + for deplib in $save_deplibs; do
6585 + deplibs="$deplib $deplibs"
6590 - if test -n "$prev"; then
6591 - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
6592 - $echo "$help" 1>&2
6596 - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
6597 - eval arg=\"$export_dynamic_flag_spec\"
6598 - compile_command="$compile_command $arg"
6599 - finalize_command="$finalize_command $arg"
6603 - # calculate the name of the file, without its directory
6604 - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
6605 - libobjs_save="$libobjs"
6609 - $echo "$modename: you must specify an output file" 1>&2
6610 - $echo "$help" 1>&2
6613 + if test "$pass" != dlopen; then
6614 + if test "$pass" != conv; then
6615 + # Make sure lib_search_path contains only unique directories.
6617 + for dir in $newlib_search_path; do
6618 + case "$lib_search_path " in
6620 + *) lib_search_path="$lib_search_path $dir" ;;
6623 + newlib_search_path=
6627 - if test -n "$link_against_libtool_libs"; then
6628 - $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
6630 + if test "$linkmode,$pass" != "prog,link"; then
6633 + vars="compile_deplibs finalize_deplibs"
6635 + for var in $vars dependency_libs; do
6636 + # Add libraries to $var in reverse order
6637 + eval tmp_libs=\"\$$var\"
6639 + for deplib in $tmp_libs; do
6640 + # FIXME: Pedantically, this is the right thing to do, so
6641 + # that some nasty dependency loop isn't accidentally
6643 + #new_libs="$deplib $new_libs"
6644 + # Pragmatically, this seems to cause very few problems in
6647 + -L*) new_libs="$deplib $new_libs" ;;
6650 + # And here is the reason: when a library appears more
6651 + # than once as an explicit dependence of a library, or
6652 + # is implicitly linked in more than once by the
6653 + # compiler, it is considered special, and multiple
6654 + # occurrences thereof are not removed. Compare this
6655 + # with having the same library being listed as a
6656 + # dependency of multiple other libraries: in this case,
6657 + # we know (pedantically, we assume) the library does not
6658 + # need to be listed more than once, so we keep only the
6659 + # last copy. This is not always right, but it is rare
6660 + # enough that we require users that really mean to play
6661 + # such unportable linking tricks to link the library
6662 + # using -Wl,-lname, so that libtool does not consider it
6663 + # for duplicate removal.
6664 + case " $specialdeplibs " in
6665 + *" $deplib "*) new_libs="$deplib $new_libs" ;;
6667 + case " $new_libs " in
6669 + *) new_libs="$deplib $new_libs" ;;
6677 + for deplib in $new_libs; do
6680 + case " $tmp_libs " in
6682 + *) tmp_libs="$tmp_libs $deplib" ;;
6685 + *) tmp_libs="$tmp_libs $deplib" ;;
6688 + eval $var=\"$tmp_libs\"
6691 + # Last step: remove runtime libs from dependency_libs
6692 + # (they stay in deplibs)
6694 + for i in $dependency_libs ; do
6695 + case " $predeps $postdeps $compiler_lib_search_path " in
6700 + if test -n "$i" ; then
6701 + tmp_libs="$tmp_libs $i"
6704 + dependency_libs=$tmp_libs
6706 + if test "$linkmode" = prog; then
6707 + dlfiles="$newdlfiles"
6708 + dlprefiles="$newdlprefiles"
6713 if test -n "$deplibs"; then
6714 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
6716 @@ -1552,7 +3073,7 @@ compiler."
6719 if test -n "$vinfo"; then
6720 - $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
6721 + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
6724 if test -n "$release"; then
6725 @@ -1566,24 +3087,27 @@ compiler."
6726 # Now set the variables for building old libraries.
6727 build_libtool_libs=no
6729 + objs="$objs$old_deplibs"
6734 # Make sure we only generate libraries of the form `libNAME.la'.
6735 - case "$outputname" in
6736 + case $outputname in
6738 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
6739 + eval shared_ext=\"$shrext_cmds\"
6740 eval libname=\"$libname_spec\"
6743 if test "$module" = no; then
6744 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
6747 + exit $EXIT_FAILURE
6749 if test "$need_lib_prefix" != no; then
6750 # Add the "lib" prefix for modules if required
6751 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
6752 + eval shared_ext=\"$shrext_cmds\"
6753 eval libname=\"$libname_spec\"
6755 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
6756 @@ -1591,30 +3115,24 @@ compiler."
6760 - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
6761 - if test "X$output_objdir" = "X$output"; then
6762 - output_objdir="$objdir"
6764 - output_objdir="$output_objdir/$objdir"
6767 if test -n "$objs"; then
6768 - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
6772 - # How the heck are we supposed to write a wrapper for a shared library?
6773 - if test -n "$link_against_libtool_libs"; then
6774 - $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
6776 + if test "$deplibs_check_method" != pass_all; then
6777 + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
6778 + exit $EXIT_FAILURE
6781 + $echo "*** Warning: Linking the shared library $output against the non-libtool"
6782 + $echo "*** objects $objs is not portable!"
6783 + libobjs="$libobjs $objs"
6787 - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
6788 - $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
6789 + if test "$dlself" != no; then
6790 + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
6794 - if test $# -gt 2; then
6795 + if test "$#" -gt 2; then
6796 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
6799 @@ -1623,15 +3141,16 @@ compiler."
6800 if test -z "$rpath"; then
6801 if test "$build_libtool_libs" = yes; then
6802 # Building a libtool convenience library.
6804 + # Some compilers have problems with a `.al' extension so
6805 + # convenience libraries should have the same extension an
6806 + # archive normally would.
6807 oldlibs="$output_objdir/$libname.$libext $oldlibs"
6808 build_libtool_libs=convenience
6811 - dependency_libs="$deplibs"
6813 if test -n "$vinfo"; then
6814 - $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
6815 + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
6818 if test -n "$release"; then
6819 @@ -1640,73 +3159,138 @@ compiler."
6822 # Parse the version information argument.
6823 - IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
6824 + save_ifs="$IFS"; IFS=':'
6825 set dummy $vinfo 0 0 0
6828 if test -n "$8"; then
6829 $echo "$modename: too many parameters to \`-version-info'" 1>&2
6832 + exit $EXIT_FAILURE
6838 + # convert absolute version numbers to libtool ages
6839 + # this retains compatibility with .la files and attempts
6840 + # to make the code below a bit more comprehensible
6842 + case $vinfo_number in
6846 + number_revision="$4"
6848 + # There are really only two kinds -- those that
6849 + # use the current revision as the major version
6850 + # and those that subtract age and use age as
6851 + # a minor version. But, then there is irix
6852 + # which has an extra 1 added just for fun
6854 + case $version_type in
6855 + darwin|linux|osf|windows)
6856 + current=`expr $number_major + $number_minor`
6857 + age="$number_minor"
6858 + revision="$number_revision"
6860 + freebsd-aout|freebsd-elf|sunos)
6861 + current="$number_major"
6862 + revision="$number_minor"
6866 + current=`expr $number_major + $number_minor - 1`
6867 + age="$number_minor"
6868 + revision="$number_minor"
6879 # Check that each of the things are valid numbers.
6880 - case "$current" in
6881 - 0 | [1-9] | [1-9][0-9]*) ;;
6883 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6885 - $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
6886 + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
6887 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
6889 + exit $EXIT_FAILURE
6893 - case "$revision" in
6894 - 0 | [1-9] | [1-9][0-9]*) ;;
6896 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6898 - $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
6899 + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
6900 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
6902 + exit $EXIT_FAILURE
6907 - 0 | [1-9] | [1-9][0-9]*) ;;
6909 + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
6911 - $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
6912 + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
6913 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
6915 + exit $EXIT_FAILURE
6919 - if test $age -gt $current; then
6920 + if test "$age" -gt "$current"; then
6921 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
6922 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
6924 + exit $EXIT_FAILURE
6927 # Calculate the version variables.
6931 - case "$version_type" in
6932 + case $version_type in
6937 + # Like Linux, but with the current version available in
6938 + # verstring for coding it into the library header
6939 + major=.`expr $current - $age`
6940 + versuffix="$major.$age.$revision"
6941 + # Darwin ld doesn't like 0 for these options...
6942 + minor_current=`expr $current + 1`
6943 + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
6948 + versuffix=".$current.$revision";
6953 + versuffix=".$current";
6957 major=`expr $current - $age + 1`
6958 - versuffix="$major.$revision"
6959 - verstring="sgi$major.$revision"
6961 + case $version_type in
6962 + nonstopux) verstring_prefix=nonstopux ;;
6963 + *) verstring_prefix=sgi ;;
6965 + verstring="$verstring_prefix$major.$revision"
6967 # Add in all the interfaces that we are compatible with.
6969 - while test $loop != 0; do
6970 + while test "$loop" -ne 0; do
6971 iface=`expr $revision - $loop`
6972 loop=`expr $loop - 1`
6973 - verstring="sgi$major.$iface:$verstring"
6974 + verstring="$verstring_prefix$major.$iface:$verstring"
6977 + # Before this point, $major must not contain `.'.
6979 + versuffix="$major.$revision"
6983 @@ -1715,13 +3299,13 @@ compiler."
6987 - major=`expr $current - $age`
6988 + major=.`expr $current - $age`
6989 versuffix=".$current.$age.$revision"
6990 verstring="$current.$age.$revision"
6992 # Add in all the interfaces that we are compatible with.
6994 - while test $loop != 0; do
6995 + while test "$loop" -ne 0; do
6996 iface=`expr $current - $loop`
6997 loop=`expr $loop - 1`
6998 verstring="$verstring:${iface}.0"
6999 @@ -1736,34 +3320,33 @@ compiler."
7000 versuffix=".$current.$revision"
7005 - versuffix=".$current.$revision";
7010 - versuffix=".$current";
7014 - # Like Linux, but with '-' rather than '.', since we only
7015 - # want one extension on Windows 95.
7016 + # Use '-' rather than '.', since we only want one
7017 + # extension on DOS 8.3 filesystems.
7018 major=`expr $current - $age`
7019 - versuffix="-$major-$age-$revision"
7020 + versuffix="-$major"
7024 $echo "$modename: unknown library version type \`$version_type'" 1>&2
7025 - echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
7027 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
7028 + exit $EXIT_FAILURE
7032 # Clear the version info if we defaulted, and they specified a release.
7033 if test -z "$vinfo" && test -n "$release"; then
7036 + case $version_type in
7038 + # we can't check for "0.0" in archive_cmds due to quoting
7039 + # problems, so we reset it completely
7046 if test "$need_version" = no; then
7049 @@ -1777,7 +3360,7 @@ compiler."
7055 # Check to see if the archive will have undefined symbols.
7056 if test "$allow_undefined" = yes; then
7057 if test "$allow_undefined_flag" = unsupported; then
7058 @@ -1789,29 +3372,32 @@ compiler."
7059 # Don't allow undefined symbols.
7060 allow_undefined_flag="$no_undefined_flag"
7063 - dependency_libs="$deplibs"
7065 - *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
7066 - # these systems don't actually have a c library (as such)!
7069 - # Add libc to deplibs on all other systems.
7070 - deplibs="$deplibs -lc"
7075 - # Create the output directory, or remove our outputs if we need to.
7076 - if test -d $output_objdir; then
7077 - $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
7078 - $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
7080 - $show "$mkdir $output_objdir"
7081 - $run $mkdir $output_objdir
7083 - if test $status -ne 0 && test ! -d $output_objdir; then
7085 + if test "$mode" != relink; then
7086 + # Remove our outputs, but don't remove object files since they
7087 + # may have been created when compiling PIC objects.
7089 + tempremovelist=`$echo "$output_objdir/*"`
7090 + for p in $tempremovelist; do
7094 + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7095 + if test "X$precious_files_regex" != "X"; then
7096 + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
7101 + removelist="$removelist $p"
7106 + if test -n "$removelist"; then
7107 + $show "${rm}r $removelist"
7108 + $run ${rm}r $removelist
7112 @@ -1823,7 +3409,79 @@ compiler."
7113 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
7116 + # Eliminate all temporary directories.
7117 + for path in $notinst_path; do
7118 + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
7119 + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
7120 + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
7123 + if test -n "$xrpath"; then
7124 + # If the user specified any rpath flags, then add them.
7126 + for libdir in $xrpath; do
7127 + temp_xrpath="$temp_xrpath -R$libdir"
7128 + case "$finalize_rpath " in
7130 + *) finalize_rpath="$finalize_rpath $libdir" ;;
7133 + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
7134 + dependency_libs="$temp_xrpath $dependency_libs"
7138 + # Make sure dlfiles contains only unique files that won't be dlpreopened
7139 + old_dlfiles="$dlfiles"
7141 + for lib in $old_dlfiles; do
7142 + case " $dlprefiles $dlfiles " in
7144 + *) dlfiles="$dlfiles $lib" ;;
7148 + # Make sure dlprefiles contains only unique files
7149 + old_dlprefiles="$dlprefiles"
7151 + for lib in $old_dlprefiles; do
7152 + case "$dlprefiles " in
7154 + *) dlprefiles="$dlprefiles $lib" ;;
7158 if test "$build_libtool_libs" = yes; then
7159 + if test -n "$rpath"; then
7161 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
7162 + # these systems don't actually have a c library (as such)!
7164 + *-*-rhapsody* | *-*-darwin1.[012])
7165 + # Rhapsody C library is in the System framework
7166 + deplibs="$deplibs -framework System"
7169 + # Don't link with libc until the a.out ld.so is fixed.
7171 + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7172 + # Do not include libc due to us having libc/libc_r.
7174 + *-*-sco3.2v5* | *-*-sco5v6*)
7175 + # Causes problems with __ctype
7177 + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
7178 + # Compiler inserts libc in the correct place for threads to work
7181 + # Add libc to deplibs on all other systems if necessary.
7182 + if test "$build_libtool_need_lc" = "yes"; then
7183 + deplibs="$deplibs -lc"
7189 # Transform deplibs into only deplibs that can be linked in shared.
7191 libname_save=$libname
7192 @@ -1838,13 +3496,13 @@ compiler."
7196 - case "$deplibs_check_method" in
7197 + case $deplibs_check_method in
7199 # Don't check for shared/static. Everything works.
7200 # This might be a little naive. We might want to check
7201 # whether the library exists or not. But this is on
7202 # osf3 & osf4 and I'm not really sure... Just
7203 - # implementing what was already the behaviour.
7204 + # implementing what was already the behavior.
7208 @@ -1857,64 +3515,88 @@ compiler."
7209 int main() { return 0; }
7212 - $CC -o conftest conftest.c $deplibs
7213 - if test $? -eq 0 ; then
7214 + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
7215 + if test "$?" -eq 0 ; then
7216 ldd_output=`ldd conftest`
7217 for i in $deplibs; do
7218 - name="`expr $i : '-l\(.*\)'`"
7219 + name=`expr $i : '-l\(.*\)'`
7220 # If $name is empty we are operating on a -L argument.
7221 - if test "$name" != "" ; then
7222 - libname=`eval \\$echo \"$libname_spec\"`
7223 - deplib_matches=`eval \\$echo \"$library_names_spec\"`
7224 - set dummy $deplib_matches
7226 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7227 - newdeplibs="$newdeplibs $i"
7231 - echo "*** Warning: This library needs some functionality provided by $i."
7232 - echo "*** I have the capability to make that library automatically link in when"
7233 - echo "*** you link to this library. But I can only do this if you have a"
7234 - echo "*** shared version of the library, which you do not appear to have."
7235 + if test "$name" != "" && test "$name" -ne "0"; then
7236 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7237 + case " $predeps $postdeps " in
7239 + newdeplibs="$newdeplibs $i"
7244 + if test -n "$i" ; then
7245 + libname=`eval \\$echo \"$libname_spec\"`
7246 + deplib_matches=`eval \\$echo \"$library_names_spec\"`
7247 + set dummy $deplib_matches
7249 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7250 + newdeplibs="$newdeplibs $i"
7254 + $echo "*** Warning: dynamic linker does not accept needed library $i."
7255 + $echo "*** I have the capability to make that library automatically link in when"
7256 + $echo "*** you link to this library. But I can only do this if you have a"
7257 + $echo "*** shared version of the library, which I believe you do not have"
7258 + $echo "*** because a test_compile did reveal that the linker did not use it for"
7259 + $echo "*** its dynamic dependency list that programs get resolved with at runtime."
7263 newdeplibs="$newdeplibs $i"
7267 - # Error occured in the first compile. Let's try to salvage the situation:
7268 - # Compile a seperate program for each library.
7269 + # Error occurred in the first compile. Let's try to salvage
7270 + # the situation: Compile a separate program for each library.
7271 for i in $deplibs; do
7272 - name="`expr $i : '-l\(.*\)'`"
7273 - # If $name is empty we are operating on a -L argument.
7274 - if test "$name" != "" ; then
7275 + name=`expr $i : '-l\(.*\)'`
7276 + # If $name is empty we are operating on a -L argument.
7277 + if test "$name" != "" && test "$name" != "0"; then
7279 - $CC -o conftest conftest.c $i
7280 + $LTCC $LTCFLAGS -o conftest conftest.c $i
7282 - if test $? -eq 0 ; then
7283 + if test "$?" -eq 0 ; then
7284 ldd_output=`ldd conftest`
7285 - libname=`eval \\$echo \"$libname_spec\"`
7286 - deplib_matches=`eval \\$echo \"$library_names_spec\"`
7287 - set dummy $deplib_matches
7289 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7290 - newdeplibs="$newdeplibs $i"
7294 - echo "*** Warning: This library needs some functionality provided by $i."
7295 - echo "*** I have the capability to make that library automatically link in when"
7296 - echo "*** you link to this library. But I can only do this if you have a"
7297 - echo "*** shared version of the library, which you do not appear to have."
7298 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7299 + case " $predeps $postdeps " in
7301 + newdeplibs="$newdeplibs $i"
7306 + if test -n "$i" ; then
7307 + libname=`eval \\$echo \"$libname_spec\"`
7308 + deplib_matches=`eval \\$echo \"$library_names_spec\"`
7309 + set dummy $deplib_matches
7311 + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
7312 + newdeplibs="$newdeplibs $i"
7316 + $echo "*** Warning: dynamic linker does not accept needed library $i."
7317 + $echo "*** I have the capability to make that library automatically link in when"
7318 + $echo "*** you link to this library. But I can only do this if you have a"
7319 + $echo "*** shared version of the library, which you do not appear to have"
7320 + $echo "*** because a test_compile did reveal that the linker did not use this one"
7321 + $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
7327 - echo "*** Warning! Library $i is needed by this library but I was not able to"
7328 - echo "*** make it link in! You will probably need to install it or some"
7329 - echo "*** library that it depends on before this library will be fully"
7330 - echo "*** functional. Installing it before continuing would be even better."
7332 + $echo "*** Warning! Library $i is needed by this library but I was not able to"
7333 + $echo "*** make it link in! You will probably need to install it or some"
7334 + $echo "*** library that it depends on before this library will be fully"
7335 + $echo "*** functional. Installing it before continuing would be even better."
7338 newdeplibs="$newdeplibs $i"
7339 @@ -1924,19 +3606,28 @@ EOF
7342 set dummy $deplibs_check_method
7343 - file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
7344 + file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
7345 for a_deplib in $deplibs; do
7346 - name="`expr $a_deplib : '-l\(.*\)'`"
7347 + name=`expr $a_deplib : '-l\(.*\)'`
7348 # If $name is empty we are operating on a -L argument.
7349 - if test "$name" != "" ; then
7350 - libname=`eval \\$echo \"$libname_spec\"`
7351 - for i in $lib_search_path; do
7352 - potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7353 - for potent_lib in $potential_libs; do
7354 + if test "$name" != "" && test "$name" != "0"; then
7355 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7356 + case " $predeps $postdeps " in
7358 + newdeplibs="$newdeplibs $a_deplib"
7363 + if test -n "$a_deplib" ; then
7364 + libname=`eval \\$echo \"$libname_spec\"`
7365 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7366 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7367 + for potent_lib in $potential_libs; do
7368 # Follow soft links.
7369 if ls -lLd "$potent_lib" 2>/dev/null \
7370 | grep " -> " >/dev/null; then
7374 # The statement above tries to avoid entering an
7375 # endless loop below, in case of cyclic links.
7376 @@ -1945,28 +3636,88 @@ EOF
7378 potlib="$potent_lib"
7379 while test -h "$potlib" 2>/dev/null; do
7380 - potliblink=`ls -ld $potlib | sed 's/.* -> //'`
7381 - case "$potliblink" in
7382 + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
7383 + case $potliblink in
7384 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7385 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
7388 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
7390 - | egrep "$file_magic_regex" > /dev/null; then
7392 + | $EGREP "$file_magic_regex" > /dev/null; then
7393 newdeplibs="$newdeplibs $a_deplib"
7402 + if test -n "$a_deplib" ; then
7405 + $echo "*** Warning: linker path does not have real file for library $a_deplib."
7406 + $echo "*** I have the capability to make that library automatically link in when"
7407 + $echo "*** you link to this library. But I can only do this if you have a"
7408 + $echo "*** shared version of the library, which you do not appear to have"
7409 + $echo "*** because I did check the linker path looking for a file starting"
7410 + if test -z "$potlib" ; then
7411 + $echo "*** with $libname but no candidates were found. (...for file magic test)"
7413 + $echo "*** with $libname and none of the candidates passed a file format test"
7414 + $echo "*** using a file magic. Last file checked: $potlib"
7418 + # Add a -L argument.
7419 + newdeplibs="$newdeplibs $a_deplib"
7421 + done # Gone through all deplibs.
7424 + set dummy $deplibs_check_method
7425 + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
7426 + for a_deplib in $deplibs; do
7427 + name=`expr $a_deplib : '-l\(.*\)'`
7428 + # If $name is empty we are operating on a -L argument.
7429 + if test -n "$name" && test "$name" != "0"; then
7430 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7431 + case " $predeps $postdeps " in
7433 + newdeplibs="$newdeplibs $a_deplib"
7438 + if test -n "$a_deplib" ; then
7439 + libname=`eval \\$echo \"$libname_spec\"`
7440 + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7441 + potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7442 + for potent_lib in $potential_libs; do
7443 + potlib="$potent_lib" # see symlink-check above in file_magic test
7444 + if eval $echo \"$potent_lib\" 2>/dev/null \
7446 + | $EGREP "$match_pattern_regex" > /dev/null; then
7447 + newdeplibs="$newdeplibs $a_deplib"
7454 if test -n "$a_deplib" ; then
7457 - echo "*** Warning: This library needs some functionality provided by $a_deplib."
7458 - echo "*** I have the capability to make that library automatically link in when"
7459 - echo "*** you link to this library. But I can only do this if you have a"
7460 - echo "*** shared version of the library, which you do not appear to have."
7462 + $echo "*** Warning: linker path does not have real file for library $a_deplib."
7463 + $echo "*** I have the capability to make that library automatically link in when"
7464 + $echo "*** you link to this library. But I can only do this if you have a"
7465 + $echo "*** shared version of the library, which you do not appear to have"
7466 + $echo "*** because I did check the linker path looking for a file starting"
7467 + if test -z "$potlib" ; then
7468 + $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
7470 + $echo "*** with $libname and none of the candidates passed a file format test"
7471 + $echo "*** using a regex pattern. Last file checked: $potlib"
7475 # Add a -L argument.
7476 @@ -1976,16 +3727,23 @@ EOF
7480 - if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
7481 - -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
7482 - grep . >/dev/null; then
7484 + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
7485 + -e 's/ -[LR][^ ]*//g'`
7486 + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7487 + for i in $predeps $postdeps ; do
7488 + # can't use Xsed below, because $i might contain '/'
7489 + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
7492 + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
7493 + | grep . >/dev/null; then
7495 if test "X$deplibs_check_method" = "Xnone"; then
7496 - echo "*** Warning: inter-library dependencies are not supported in this platform."
7497 + $echo "*** Warning: inter-library dependencies are not supported in this platform."
7499 - echo "*** Warning: inter-library dependencies are not known to be supported."
7500 + $echo "*** Warning: inter-library dependencies are not known to be supported."
7502 - echo "*** All declared inter-library dependencies are being dropped."
7503 + $echo "*** All declared inter-library dependencies are being dropped."
7507 @@ -1996,19 +3754,26 @@ EOF
7508 libname=$libname_save
7512 + *-*-rhapsody* | *-*-darwin1.[012])
7513 + # On Rhapsody replace the C library is the System framework
7514 + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
7518 if test "$droppeddeps" = yes; then
7519 if test "$module" = yes; then
7521 - echo "*** Warning: libtool could not satisfy all declared inter-library"
7522 - echo "*** dependencies of module $libname. Therefore, libtool will create"
7523 - echo "*** a static module, that should work as long as the dlopening"
7524 - echo "*** application is linked with the -dlopen flag."
7526 + $echo "*** Warning: libtool could not satisfy all declared inter-library"
7527 + $echo "*** dependencies of module $libname. Therefore, libtool will create"
7528 + $echo "*** a static module, that should work as long as the dlopening"
7529 + $echo "*** application is linked with the -dlopen flag."
7530 if test -z "$global_symbol_pipe"; then
7532 - echo "*** However, this would only work if libtool was able to extract symbol"
7533 - echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7534 - echo "*** not find such a program. So, this module is probably useless."
7535 - echo "*** \`nm' from GNU binutils and a full rebuild may help."
7537 + $echo "*** However, this would only work if libtool was able to extract symbol"
7538 + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7539 + $echo "*** not find such a program. So, this module is probably useless."
7540 + $echo "*** \`nm' from GNU binutils and a full rebuild may help."
7542 if test "$build_old_libs" = no; then
7543 oldlibs="$output_objdir/$libname.$libext"
7544 @@ -2018,23 +3783,127 @@ EOF
7545 build_libtool_libs=no
7548 - echo "*** The inter-library dependencies that have been dropped here will be"
7549 - echo "*** automatically added whenever a program is linked with this library"
7550 - echo "*** or is declared to -dlopen it."
7551 + $echo "*** The inter-library dependencies that have been dropped here will be"
7552 + $echo "*** automatically added whenever a program is linked with this library"
7553 + $echo "*** or is declared to -dlopen it."
7555 + if test "$allow_undefined" = no; then
7557 + $echo "*** Since this library must not contain undefined symbols,"
7558 + $echo "*** because either the platform does not support them or"
7559 + $echo "*** it was explicitly requested with -no-undefined,"
7560 + $echo "*** libtool will only create a static version of it."
7561 + if test "$build_old_libs" = no; then
7562 + oldlibs="$output_objdir/$libname.$libext"
7563 + build_libtool_libs=module
7564 + build_old_libs=yes
7566 + build_libtool_libs=no
7571 # Done checking deplibs!
7576 + # move library search paths that coincide with paths to not yet
7577 + # installed libraries to the beginning of the library search list
7579 + for path in $notinst_path; do
7580 + case " $new_libs " in
7581 + *" -L$path/$objdir "*) ;;
7583 + case " $deplibs " in
7584 + *" -L$path/$objdir "*)
7585 + new_libs="$new_libs -L$path/$objdir" ;;
7590 + for deplib in $deplibs; do
7593 + case " $new_libs " in
7595 + *) new_libs="$new_libs $deplib" ;;
7598 + *) new_libs="$new_libs $deplib" ;;
7601 + deplibs="$new_libs"
7604 # All the library-specific variables (install_libdir is set above).
7610 # Test again, we may have decided not to build it any more
7611 if test "$build_libtool_libs" = yes; then
7612 + if test "$hardcode_into_libs" = yes; then
7613 + # Hardcode the library paths
7616 + rpath="$finalize_rpath"
7617 + test "$mode" != relink && rpath="$compile_rpath$rpath"
7618 + for libdir in $rpath; do
7619 + if test -n "$hardcode_libdir_flag_spec"; then
7620 + if test -n "$hardcode_libdir_separator"; then
7621 + if test -z "$hardcode_libdirs"; then
7622 + hardcode_libdirs="$libdir"
7624 + # Just accumulate the unique libdirs.
7625 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
7626 + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
7629 + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
7634 + eval flag=\"$hardcode_libdir_flag_spec\"
7635 + dep_rpath="$dep_rpath $flag"
7637 + elif test -n "$runpath_var"; then
7638 + case "$perm_rpath " in
7640 + *) perm_rpath="$perm_rpath $libdir" ;;
7644 + # Substitute the hardcoded libdirs into the rpath.
7645 + if test -n "$hardcode_libdir_separator" &&
7646 + test -n "$hardcode_libdirs"; then
7647 + libdir="$hardcode_libdirs"
7648 + if test -n "$hardcode_libdir_flag_spec_ld"; then
7649 + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
7651 + eval dep_rpath=\"$hardcode_libdir_flag_spec\"
7654 + if test -n "$runpath_var" && test -n "$perm_rpath"; then
7655 + # We should set the runpath_var.
7657 + for dir in $perm_rpath; do
7658 + rpath="$rpath$dir:"
7660 + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
7662 + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
7665 + shlibpath="$finalize_shlibpath"
7666 + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
7667 + if test -n "$shlibpath"; then
7668 + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
7671 # Get the real and link names of the library.
7672 + eval shared_ext=\"$shrext_cmds\"
7673 eval library_names=\"$library_names_spec\"
7674 set dummy $library_names
7676 @@ -2045,30 +3914,17 @@ EOF
7680 + if test -z "$dlname"; then
7684 lib="$output_objdir/$realname"
7688 linknames="$linknames $link"
7691 - # Ensure that we have .o objects for linkers which dislike .lo
7692 - # (e.g. aix) in case we are running --disable-static
7693 - for obj in $libobjs; do
7694 - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
7695 - if test "X$xdir" = "X$obj"; then
7700 - baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
7701 - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
7702 - if test ! -f $xdir/$oldobj; then
7703 - $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
7704 - $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
7708 # Use standard objects if they are pic
7709 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7711 @@ -2078,17 +3934,29 @@ EOF
7712 $show "generating symbol list for \`$libname.la'"
7713 export_symbols="$output_objdir/$libname.exp"
7714 $run $rm $export_symbols
7715 - eval cmds=\"$export_symbols_cmds\"
7716 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
7717 + cmds=$export_symbols_cmds
7718 + save_ifs="$IFS"; IFS='~'
7719 for cmd in $cmds; do
7722 - $run eval "$cmd" || exit $?
7724 + if len=`expr "X$cmd" : ".*"` &&
7725 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7727 + $run eval "$cmd" || exit $?
7728 + skipped_export=false
7730 + # The command line is too long to execute in one step.
7731 + $show "using reloadable object file for export list..."
7733 + # Break out early, otherwise skipped_export may be
7734 + # set to false by a later but shorter cmd.
7739 if test -n "$export_symbols_regex"; then
7740 - $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
7741 - $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7742 + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
7743 + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
7744 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
7745 $run eval '$mv "${export_symbols}T" "$export_symbols"'
7747 @@ -2099,65 +3967,212 @@ EOF
7748 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
7752 + for test_deplib in $deplibs; do
7753 + case " $convenience " in
7754 + *" $test_deplib "*) ;;
7756 + tmp_deplibs="$tmp_deplibs $test_deplib"
7760 + deplibs="$tmp_deplibs"
7762 if test -n "$convenience"; then
7763 if test -n "$whole_archive_flag_spec"; then
7764 + save_libobjs=$libobjs
7765 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7767 gentop="$output_objdir/${outputname}x"
7768 - $show "${rm}r $gentop"
7769 - $run ${rm}r "$gentop"
7770 - $show "mkdir $gentop"
7771 - $run mkdir "$gentop"
7773 - if test $status -ne 0 && test ! -d "$gentop"; then
7776 generated="$generated $gentop"
7778 - for xlib in $convenience; do
7779 - # Extract the objects.
7781 - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
7782 - *) xabs=`pwd`"/$xlib" ;;
7784 - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
7785 - xdir="$gentop/$xlib"
7787 - $show "${rm}r $xdir"
7788 - $run ${rm}r "$xdir"
7789 - $show "mkdir $xdir"
7790 - $run mkdir "$xdir"
7792 - if test $status -ne 0 && test ! -d "$xdir"; then
7795 - $show "(cd $xdir && $AR x $xabs)"
7796 - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
7798 - libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
7800 + func_extract_archives $gentop $convenience
7801 + libobjs="$libobjs $func_extract_archives_result"
7806 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
7807 eval flag=\"$thread_safe_flag_spec\"
7808 - linkopts="$linkopts $flag"
7809 + linker_flags="$linker_flags $flag"
7812 + # Make a backup of the uninstalled library when relinking
7813 + if test "$mode" = relink; then
7814 + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
7817 # Do each of the archive commands.
7818 + if test "$module" = yes && test -n "$module_cmds" ; then
7819 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7820 + eval test_cmds=\"$module_expsym_cmds\"
7821 + cmds=$module_expsym_cmds
7823 + eval test_cmds=\"$module_cmds\"
7827 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7828 - eval cmds=\"$archive_expsym_cmds\"
7829 + eval test_cmds=\"$archive_expsym_cmds\"
7830 + cmds=$archive_expsym_cmds
7832 + eval test_cmds=\"$archive_cmds\"
7833 + cmds=$archive_cmds
7837 + if test "X$skipped_export" != "X:" &&
7838 + len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
7839 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7842 - eval cmds=\"$archive_cmds\"
7843 + # The command line is too long to link in one step, link piecewise.
7844 + $echo "creating reloadable object files..."
7846 + # Save the value of $output and $libobjs because we want to
7847 + # use them later. If we have whole_archive_flag_spec, we
7848 + # want to use save_libobjs as it was before
7849 + # whole_archive_flag_spec was expanded, because we can't
7850 + # assume the linker understands whole_archive_flag_spec.
7851 + # This may have to be revisited, in case too many
7852 + # convenience libraries get linked in and end up exceeding
7854 + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
7855 + save_libobjs=$libobjs
7857 + save_output=$output
7858 + output_la=`$echo "X$output" | $Xsed -e "$basename"`
7860 + # Clear the reloadable object creation command queue and
7861 + # initialize k to one.
7868 + output=$output_objdir/$output_la-${k}.$objext
7869 + # Loop over the list of objects to be linked.
7870 + for obj in $save_libobjs
7872 + eval test_cmds=\"$reload_cmds $objlist $last_robj\"
7873 + if test "X$objlist" = X ||
7874 + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
7875 + test "$len" -le "$max_cmd_len"; }; then
7876 + objlist="$objlist $obj"
7878 + # The command $test_cmds is almost too long, add a
7879 + # command to the queue.
7880 + if test "$k" -eq 1 ; then
7881 + # The first file doesn't have a previous command to add.
7882 + eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
7884 + # All subsequent reloadable object files will link in
7885 + # the last one created.
7886 + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
7888 + last_robj=$output_objdir/$output_la-${k}.$objext
7890 + output=$output_objdir/$output_la-${k}.$objext
7895 + # Handle the remaining objects by creating one last
7896 + # reloadable object file. All subsequent reloadable object
7897 + # files will link in the last one created.
7898 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7899 + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
7901 + if ${skipped_export-false}; then
7902 + $show "generating symbol list for \`$libname.la'"
7903 + export_symbols="$output_objdir/$libname.exp"
7904 + $run $rm $export_symbols
7906 + # Append the command to create the export file.
7907 + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
7910 + # Set up a command to remove the reloadable object files
7911 + # after they are used.
7913 + while test "$i" -lt "$k"
7916 + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
7919 + $echo "creating a temporary reloadable object file: $output"
7921 + # Loop through the commands generated above and execute them.
7922 + save_ifs="$IFS"; IFS='~'
7923 + for cmd in $concat_cmds; do
7926 + $run eval "$cmd" || exit $?
7931 + # Restore the value of output.
7932 + output=$save_output
7934 + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
7935 + eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
7937 + # Expand the library linking commands again to reset the
7938 + # value of $libobjs for piecewise linking.
7940 + # Do each of the archive commands.
7941 + if test "$module" = yes && test -n "$module_cmds" ; then
7942 + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
7943 + cmds=$module_expsym_cmds
7948 + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
7949 + cmds=$archive_expsym_cmds
7951 + cmds=$archive_cmds
7955 + # Append the command to remove the reloadable object files
7956 + # to the just-reset $cmds.
7957 + eval cmds=\"\$cmds~\$rm $delfiles\"
7959 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
7960 + save_ifs="$IFS"; IFS='~'
7961 for cmd in $cmds; do
7965 - $run eval "$cmd" || exit $?
7966 + $run eval "$cmd" || {
7969 + # Restore the uninstalled library and exit
7970 + if test "$mode" = relink; then
7971 + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
7979 + # Restore the uninstalled library and exit
7980 + if test "$mode" = relink; then
7981 + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
7983 + if test -n "$convenience"; then
7984 + if test -z "$whole_archive_flag_spec"; then
7985 + $show "${rm}r $gentop"
7986 + $run ${rm}r "$gentop"
7990 + exit $EXIT_SUCCESS
7993 # Create links to the real library.
7994 for linkname in $linknames; do
7995 if test "$realname" != "$linkname"; then
7996 @@ -2174,12 +4189,7 @@ EOF
8000 - *.lo | *.o | *.obj)
8001 - if test -n "$link_against_libtool_libs"; then
8002 - $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
8007 if test -n "$deplibs"; then
8008 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
8010 @@ -2204,11 +4214,11 @@ EOF
8011 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
8017 - if test -n "$objs"; then
8018 + if test -n "$objs$old_deplibs"; then
8019 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
8021 + exit $EXIT_FAILURE
8024 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
8025 @@ -2230,56 +4240,29 @@ EOF
8027 # reload_cmds runs $LD directly, so let us get rid of
8028 # -Wl from whole_archive_flag_spec
8032 if test -n "$convenience"; then
8033 if test -n "$whole_archive_flag_spec"; then
8034 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
8036 gentop="$output_objdir/${obj}x"
8037 - $show "${rm}r $gentop"
8038 - $run ${rm}r "$gentop"
8039 - $show "mkdir $gentop"
8040 - $run mkdir "$gentop"
8042 - if test $status -ne 0 && test ! -d "$gentop"; then
8045 generated="$generated $gentop"
8047 - for xlib in $convenience; do
8048 - # Extract the objects.
8050 - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
8051 - *) xabs=`pwd`"/$xlib" ;;
8053 - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
8054 - xdir="$gentop/$xlib"
8056 - $show "${rm}r $xdir"
8057 - $run ${rm}r "$xdir"
8058 - $show "mkdir $xdir"
8059 - $run mkdir "$xdir"
8061 - if test $status -ne 0 && test ! -d "$xdir"; then
8064 - $show "(cd $xdir && $AR x $xabs)"
8065 - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
8067 - reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
8069 + func_extract_archives $gentop $convenience
8070 + reload_conv_objs="$reload_objs $func_extract_archives_result"
8074 # Create the old-style object.
8075 - reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
8076 + 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
8079 - eval cmds=\"$reload_cmds\"
8080 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
8082 + save_ifs="$IFS"; IFS='~'
8083 for cmd in $cmds; do
8087 $run eval "$cmd" || exit $?
8089 @@ -2292,7 +4275,7 @@ EOF
8094 + exit $EXIT_SUCCESS
8097 if test "$build_libtool_libs" != yes; then
8098 @@ -2303,37 +4286,24 @@ EOF
8100 # Create an invalid libtool object if no PIC, so that we don't
8101 # accidentally link it into a program.
8102 - $show "echo timestamp > $libobj"
8103 - $run eval "echo timestamp > $libobj" || exit $?
8105 + # $show "echo timestamp > $libobj"
8106 + # $run eval "echo timestamp > $libobj" || exit $?
8107 + exit $EXIT_SUCCESS
8110 - if test -n "$pic_flag"; then
8111 + if test -n "$pic_flag" || test "$pic_mode" != default; then
8112 # Only do commands if we really have different PIC objects.
8113 reload_objs="$libobjs $reload_conv_objs"
8115 - eval cmds=\"$reload_cmds\"
8116 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
8118 + save_ifs="$IFS"; IFS='~'
8119 for cmd in $cmds; do
8123 $run eval "$cmd" || exit $?
8127 - # Just create a symlink.
8130 - xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
8131 - if test "X$xdir" = "X$libobj"; then
8136 - baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
8137 - oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
8138 - $show "(cd $xdir && $LN_S $oldobj $baseobj)"
8139 - $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
8142 if test -n "$gentop"; then
8143 @@ -2341,11 +4311,13 @@ EOF
8148 + exit $EXIT_SUCCESS
8151 - # Anything else should be a program.
8155 + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
8157 if test -n "$vinfo"; then
8158 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
8160 @@ -2355,20 +4327,66 @@ EOF
8163 if test "$preload" = yes; then
8164 - if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
8165 + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
8166 test "$dlopen_self_static" = unknown; then
8167 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
8174 + *-*-rhapsody* | *-*-darwin1.[012])
8175 + # On Rhapsody replace the C library is the System framework
8176 + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
8177 + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
8183 + # Don't allow lazy linking, it breaks C++ global constructors
8184 + if test "$tagname" = CXX ; then
8185 + compile_command="$compile_command ${wl}-bind_at_load"
8186 + finalize_command="$finalize_command ${wl}-bind_at_load"
8192 + # move library search paths that coincide with paths to not yet
8193 + # installed libraries to the beginning of the library search list
8195 + for path in $notinst_path; do
8196 + case " $new_libs " in
8197 + *" -L$path/$objdir "*) ;;
8199 + case " $compile_deplibs " in
8200 + *" -L$path/$objdir "*)
8201 + new_libs="$new_libs -L$path/$objdir" ;;
8206 + for deplib in $compile_deplibs; do
8209 + case " $new_libs " in
8211 + *) new_libs="$new_libs $deplib" ;;
8214 + *) new_libs="$new_libs $deplib" ;;
8217 + compile_deplibs="$new_libs"
8220 + compile_command="$compile_command $compile_deplibs"
8221 + finalize_command="$finalize_command $finalize_deplibs"
8223 if test -n "$rpath$xrpath"; then
8224 # If the user specified any rpath flags, then add them.
8225 for libdir in $rpath $xrpath; do
8226 # This is the magic to use -rpath.
8227 - case "$compile_rpath " in
8229 - *) compile_rpath="$compile_rpath $libdir" ;;
8231 case "$finalize_rpath " in
8233 *) finalize_rpath="$finalize_rpath $libdir" ;;
8234 @@ -2386,7 +4404,7 @@ EOF
8235 hardcode_libdirs="$libdir"
8237 # Just accumulate the unique libdirs.
8238 - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
8239 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8240 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8243 @@ -2404,6 +4422,19 @@ EOF
8244 *) perm_rpath="$perm_rpath $libdir" ;;
8248 + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
8249 + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
8250 + case :$dllsearchpath: in
8252 + *) dllsearchpath="$dllsearchpath:$libdir";;
8254 + case :$dllsearchpath: in
8255 + *":$testbindir:"*) ;;
8256 + *) dllsearchpath="$dllsearchpath:$testbindir";;
8261 # Substitute the hardcoded libdirs into the rpath.
8262 if test -n "$hardcode_libdir_separator" &&
8263 @@ -2422,7 +4453,7 @@ EOF
8264 hardcode_libdirs="$libdir"
8266 # Just accumulate the unique libdirs.
8267 - case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
8268 + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
8269 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
8272 @@ -2449,23 +4480,6 @@ EOF
8274 finalize_rpath="$rpath"
8276 - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
8277 - if test "X$output_objdir" = "X$output"; then
8278 - output_objdir="$objdir"
8280 - output_objdir="$output_objdir/$objdir"
8283 - # Create the binary in the object directory, then wrap it.
8284 - if test ! -d $output_objdir; then
8285 - $show "$mkdir $output_objdir"
8286 - $run $mkdir $output_objdir
8288 - if test $status -ne 0 && test ! -d $output_objdir; then
8293 if test -n "$libobjs" && test "$build_old_libs" = yes; then
8294 # Transform all the library objects into standard objects.
8295 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8296 @@ -2482,7 +4496,7 @@ EOF
8299 if test -n "$dlsyms"; then
8304 # Discover the nlist of each of the dlfiles.
8305 @@ -2514,38 +4528,50 @@ extern \"C\" {
8306 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
8308 # Add our own program objects to the symbol list.
8309 - progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8310 + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8311 for arg in $progfiles; do
8312 $show "extracting global C symbols from \`$arg'"
8313 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
8316 if test -n "$exclude_expsyms"; then
8317 - $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
8318 + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
8319 $run eval '$mv "$nlist"T "$nlist"'
8323 if test -n "$export_symbols_regex"; then
8324 - $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
8325 + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
8326 $run eval '$mv "$nlist"T "$nlist"'
8329 # Prepare the list of exported symbols
8330 if test -z "$export_symbols"; then
8331 - export_symbols="$output_objdir/$output.exp"
8332 + export_symbols="$output_objdir/$outputname.exp"
8333 $run $rm $export_symbols
8334 - $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
8335 + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
8337 + *cygwin* | *mingw* )
8338 + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
8339 + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
8343 - $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
8344 - $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
8345 + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
8346 + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
8347 $run eval 'mv "$nlist"T "$nlist"'
8349 + *cygwin* | *mingw* )
8350 + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
8351 + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
8357 for arg in $dlprefiles; do
8358 $show "extracting global C symbols from \`$arg'"
8359 - name=`echo "$arg" | sed -e 's%^.*/%%'`
8360 - $run eval 'echo ": $name " >> "$nlist"'
8361 + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
8362 + $run eval '$echo ": $name " >> "$nlist"'
8363 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
8366 @@ -2554,12 +4580,18 @@ extern \"C\" {
8367 test -f "$nlist" || : > "$nlist"
8369 if test -n "$exclude_expsyms"; then
8370 - egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
8371 + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
8372 $mv "$nlist"T "$nlist"
8375 # Try sorting and uniquifying the output.
8376 - if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
8377 + if grep -v "^: " < "$nlist" |
8378 + if sort -k 3 </dev/null >/dev/null 2>&1; then
8383 + uniq > "$nlist"S; then
8386 grep -v "^: " < "$nlist" > "$nlist"S
8387 @@ -2568,7 +4600,7 @@ extern \"C\" {
8388 if test -f "$nlist"S; then
8389 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
8391 - echo '/* NONE */' >> "$output_objdir/$dlsyms"
8392 + $echo '/* NONE */' >> "$output_objdir/$dlsyms"
8395 $echo >> "$output_objdir/$dlsyms" "\
8396 @@ -2576,27 +4608,44 @@ extern \"C\" {
8397 #undef lt_preloaded_symbols
8399 #if defined (__STDC__) && __STDC__
8400 -# define lt_ptr_t void *
8401 +# define lt_ptr void *
8403 -# define lt_ptr_t char *
8404 +# define lt_ptr char *
8408 /* The mapping between symbol names and symbols. */
8412 + *cygwin* | *mingw* )
8413 + $echo >> "$output_objdir/$dlsyms" "\
8414 +/* DATA imports from DLLs on WIN32 can't be const, because
8415 + runtime relocations are performed -- see ld's documentation
8416 + on pseudo-relocs */
8421 + $echo >> "$output_objdir/$dlsyms" "\
8428 + $echo >> "$output_objdir/$dlsyms" "\
8433 lt_preloaded_symbols[] =
8437 - sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
8438 - -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
8439 - < "$nlist" >> "$output_objdir/$dlsyms"
8440 + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
8442 $echo >> "$output_objdir/$dlsyms" "\
8447 /* This works around a problem in FreeBSD linker */
8448 @@ -2613,39 +4662,52 @@ static const void *lt_preloaded_setup()
8451 pic_flag_for_symtable=
8454 # compiling the symbol table file with pic_flag works around
8455 # a FreeBSD bug that causes programs to crash when -lm is
8456 # linked before any other PIC object. But we must not use
8457 # pic_flag when linking with -static. The problem exists in
8458 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
8459 - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
8460 + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
8461 case "$compile_command " in
8463 - *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
8464 + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
8467 case "$compile_command " in
8469 - *) pic_flag_for_symtable=" $pic_flag -DPIC";;
8470 + *) pic_flag_for_symtable=" $pic_flag";;
8474 # Now compile the dynamic symbol file.
8475 - $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
8476 - $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
8477 + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
8478 + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
8480 # Clean up the generated files.
8481 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
8482 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
8484 # Transform the symbol file into the correct name.
8485 - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8486 - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8488 + *cygwin* | *mingw* )
8489 + if test -f "$output_objdir/${outputname}.def" ; then
8490 + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
8491 + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
8493 + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8494 + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8498 + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8499 + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
8504 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
8506 + exit $EXIT_FAILURE
8510 @@ -2658,7 +4720,7 @@ static const void *lt_preloaded_setup()
8511 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
8514 - if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
8515 + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8516 # Replace the output file specification.
8517 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8518 link_command="$compile_command$compile_rpath"
8519 @@ -2666,22 +4728,22 @@ static const void *lt_preloaded_setup()
8520 # We have no uninstalled library dependencies, so finalize right now.
8521 $show "$link_command"
8522 $run eval "$link_command"
8527 # Delete the generated files.
8528 if test -n "$dlsyms"; then
8529 $show "$rm $output_objdir/${outputname}S.${objext}"
8530 $run $rm "$output_objdir/${outputname}S.${objext}"
8537 if test -n "$shlibpath_var"; then
8538 # We should set the shlibpath_var
8540 for dir in $temp_rpath; do
8543 [\\/]* | [A-Za-z]:[\\/]*)
8546 @@ -2723,11 +4785,24 @@ static const void *lt_preloaded_setup()
8550 + if test "$no_install" = yes; then
8551 + # We don't need to create a wrapper script.
8552 + link_command="$compile_var$compile_command$compile_rpath"
8553 + # Replace the output file specification.
8554 + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8555 + # Delete the old output file.
8557 + # Link the executable and exit
8558 + $show "$link_command"
8559 + $run eval "$link_command" || exit $?
8560 + exit $EXIT_SUCCESS
8563 if test "$hardcode_action" = relink; then
8564 # Fast installation is not supported
8565 link_command="$compile_var$compile_command$compile_rpath"
8566 relink_command="$finalize_var$finalize_command$finalize_rpath"
8569 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
8570 $echo "$modename: \`$output' will be relinked during installation" 1>&2
8572 @@ -2747,7 +4822,7 @@ static const void *lt_preloaded_setup()
8574 # Replace the output file specification.
8575 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8578 # Delete the old output files.
8579 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
8581 @@ -2759,14 +4834,26 @@ static const void *lt_preloaded_setup()
8583 # Quote the relink command for shipping.
8584 if test -n "$relink_command"; then
8585 + # Preserve any variables that may affect compiler behavior
8586 + for var in $variables_saved_for_relink; do
8587 + if eval test -z \"\${$var+set}\"; then
8588 + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
8589 + elif eval var_value=\$$var; test -z "$var_value"; then
8590 + relink_command="$var=; export $var; $relink_command"
8592 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
8593 + relink_command="$var=\"$var_value\"; export $var; $relink_command"
8596 + relink_command="(cd `pwd`; $relink_command)"
8597 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
8600 # Quote $echo for shipping.
8601 - if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
8603 - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
8604 - *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
8605 + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
8607 + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
8608 + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
8610 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
8612 @@ -2778,10 +4865,376 @@ static const void *lt_preloaded_setup()
8613 # win32 will think the script is a binary if it has
8614 # a .exe suffix, so we strip it off here.
8616 - *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
8617 + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
8619 + # test for cygwin because mv fails w/o .exe extensions
8623 + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
8627 - trap "$rm $output; exit 1" 1 2 15
8629 + *cygwin* | *mingw* )
8630 + output_name=`basename $output`
8631 + output_path=`dirname $output`
8632 + cwrappersource="$output_path/$objdir/lt-$output_name.c"
8633 + cwrapper="$output_path/$output_name.exe"
8634 + $rm $cwrappersource $cwrapper
8635 + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
8637 + cat > $cwrappersource <<EOF
8639 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
8640 + Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
8642 + The $output program cannot be directly executed until all the libtool
8643 + libraries that it depends on are installed.
8645 + This wrapper executable should never be moved out of the build directory.
8646 + If it is, it will not operate correctly.
8648 + Currently, it simply execs the wrapper *script* "/bin/sh $output",
8649 + but could eventually absorb all of the scripts functionality and
8650 + exec $objdir/$outputname directly.
8653 + cat >> $cwrappersource<<"EOF"
8655 +#include <stdlib.h>
8656 +#include <unistd.h>
8657 +#include <malloc.h>
8658 +#include <stdarg.h>
8659 +#include <assert.h>
8660 +#include <string.h>
8662 +#include <sys/stat.h>
8664 +#if defined(PATH_MAX)
8665 +# define LT_PATHMAX PATH_MAX
8666 +#elif defined(MAXPATHLEN)
8667 +# define LT_PATHMAX MAXPATHLEN
8669 +# define LT_PATHMAX 1024
8672 +#ifndef DIR_SEPARATOR
8673 +# define DIR_SEPARATOR '/'
8674 +# define PATH_SEPARATOR ':'
8677 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
8679 +# define HAVE_DOS_BASED_FILE_SYSTEM
8680 +# ifndef DIR_SEPARATOR_2
8681 +# define DIR_SEPARATOR_2 '\\'
8683 +# ifndef PATH_SEPARATOR_2
8684 +# define PATH_SEPARATOR_2 ';'
8688 +#ifndef DIR_SEPARATOR_2
8689 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
8690 +#else /* DIR_SEPARATOR_2 */
8691 +# define IS_DIR_SEPARATOR(ch) \
8692 + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
8693 +#endif /* DIR_SEPARATOR_2 */
8695 +#ifndef PATH_SEPARATOR_2
8696 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
8697 +#else /* PATH_SEPARATOR_2 */
8698 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
8699 +#endif /* PATH_SEPARATOR_2 */
8701 +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
8702 +#define XFREE(stale) do { \
8703 + if (stale) { free ((void *) stale); stale = 0; } \
8706 +/* -DDEBUG is fairly common in CFLAGS. */
8708 +#if defined DEBUGWRAPPER
8709 +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
8711 +# define DEBUG(format, ...)
8714 +const char *program_name = NULL;
8716 +void * xmalloc (size_t num);
8717 +char * xstrdup (const char *string);
8718 +const char * base_name (const char *name);
8719 +char * find_executable(const char *wrapper);
8720 +int check_executable(const char *path);
8721 +char * strendzap(char *str, const char *pat);
8722 +void lt_fatal (const char *message, ...);
8725 +main (int argc, char *argv[])
8730 + program_name = (char *) xstrdup (base_name (argv[0]));
8731 + DEBUG("(main) argv[0] : %s\n",argv[0]);
8732 + DEBUG("(main) program_name : %s\n",program_name);
8733 + newargz = XMALLOC(char *, argc+2);
8736 + cat >> $cwrappersource <<EOF
8737 + newargz[0] = (char *) xstrdup("$SHELL");
8740 + cat >> $cwrappersource <<"EOF"
8741 + newargz[1] = find_executable(argv[0]);
8742 + if (newargz[1] == NULL)
8743 + lt_fatal("Couldn't find %s", argv[0]);
8744 + DEBUG("(main) found exe at : %s\n",newargz[1]);
8745 + /* we know the script has the same name, without the .exe */
8746 + /* so make sure newargz[1] doesn't end in .exe */
8747 + strendzap(newargz[1],".exe");
8748 + for (i = 1; i < argc; i++)
8749 + newargz[i+1] = xstrdup(argv[i]);
8750 + newargz[argc+1] = NULL;
8752 + for (i=0; i<argc+1; i++)
8754 + DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
8762 + cat >> $cwrappersource <<EOF
8763 + execv("$SHELL",(char const **)newargz);
8767 + cat >> $cwrappersource <<EOF
8768 + execv("$SHELL",newargz);
8773 + cat >> $cwrappersource <<"EOF"
8778 +xmalloc (size_t num)
8780 + void * p = (void *) malloc (num);
8782 + lt_fatal ("Memory exhausted");
8788 +xstrdup (const char *string)
8790 + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
8795 +base_name (const char *name)
8799 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
8800 + /* Skip over the disk name in MSDOS pathnames. */
8801 + if (isalpha ((unsigned char)name[0]) && name[1] == ':')
8805 + for (base = name; *name; name++)
8806 + if (IS_DIR_SEPARATOR (*name))
8812 +check_executable(const char * path)
8816 + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
8817 + if ((!path) || (!*path))
8820 + if ((stat (path, &st) >= 0) &&
8822 + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
8823 +#if defined (S_IXOTH)
8824 + ((st.st_mode & S_IXOTH) == S_IXOTH) ||
8826 +#if defined (S_IXGRP)
8827 + ((st.st_mode & S_IXGRP) == S_IXGRP) ||
8829 + ((st.st_mode & S_IXUSR) == S_IXUSR))
8836 +/* Searches for the full path of the wrapper. Returns
8837 + newly allocated full path name if found, NULL otherwise */
8839 +find_executable (const char* wrapper)
8841 + int has_slash = 0;
8843 + const char* p_next;
8844 + /* static buffer for getcwd */
8845 + char tmp[LT_PATHMAX + 1];
8847 + char* concat_name;
8849 + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
8851 + if ((wrapper == NULL) || (*wrapper == '\0'))
8854 + /* Absolute path? */
8855 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
8856 + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
8858 + concat_name = xstrdup (wrapper);
8859 + if (check_executable(concat_name))
8860 + return concat_name;
8861 + XFREE(concat_name);
8866 + if (IS_DIR_SEPARATOR (wrapper[0]))
8868 + concat_name = xstrdup (wrapper);
8869 + if (check_executable(concat_name))
8870 + return concat_name;
8871 + XFREE(concat_name);
8873 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
8877 + for (p = wrapper; *p; p++)
8885 + /* no slashes; search PATH */
8886 + const char* path = getenv ("PATH");
8889 + for (p = path; *p; p = p_next)
8893 + for (q = p; *q; q++)
8894 + if (IS_PATH_SEPARATOR(*q))
8897 + p_next = (*q == '\0' ? q : q + 1);
8900 + /* empty path: current directory */
8901 + if (getcwd (tmp, LT_PATHMAX) == NULL)
8902 + lt_fatal ("getcwd failed");
8903 + tmp_len = strlen(tmp);
8904 + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
8905 + memcpy (concat_name, tmp, tmp_len);
8906 + concat_name[tmp_len] = '/';
8907 + strcpy (concat_name + tmp_len + 1, wrapper);
8911 + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
8912 + memcpy (concat_name, p, p_len);
8913 + concat_name[p_len] = '/';
8914 + strcpy (concat_name + p_len + 1, wrapper);
8916 + if (check_executable(concat_name))
8917 + return concat_name;
8918 + XFREE(concat_name);
8921 + /* not found in PATH; assume curdir */
8923 + /* Relative path | not found in path: prepend cwd */
8924 + if (getcwd (tmp, LT_PATHMAX) == NULL)
8925 + lt_fatal ("getcwd failed");
8926 + tmp_len = strlen(tmp);
8927 + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
8928 + memcpy (concat_name, tmp, tmp_len);
8929 + concat_name[tmp_len] = '/';
8930 + strcpy (concat_name + tmp_len + 1, wrapper);
8932 + if (check_executable(concat_name))
8933 + return concat_name;
8934 + XFREE(concat_name);
8939 +strendzap(char *str, const char *pat)
8941 + size_t len, patlen;
8943 + assert(str != NULL);
8944 + assert(pat != NULL);
8946 + len = strlen(str);
8947 + patlen = strlen(pat);
8949 + if (patlen <= len)
8951 + str += len - patlen;
8952 + if (strcmp(str, pat) == 0)
8959 +lt_error_core (int exit_status, const char * mode,
8960 + const char * message, va_list ap)
8962 + fprintf (stderr, "%s: %s: ", program_name, mode);
8963 + vfprintf (stderr, message, ap);
8964 + fprintf (stderr, ".\n");
8966 + if (exit_status >= 0)
8967 + exit (exit_status);
8971 +lt_fatal (const char *message, ...)
8974 + va_start (ap, message);
8975 + lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
8979 + # we should really use a build-platform specific compiler
8980 + # here, but OTOH, the wrappers (shell script and this C one)
8981 + # are only useful if you want to execute the "real" binary.
8982 + # Since the "real" binary is built for $host, then this
8983 + # wrapper might as well be built for $host, too.
8984 + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
8988 + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
8992 @@ -2797,19 +5250,19 @@ static const void *lt_preloaded_setup()
8994 # Sed substitution that helps us do robust quoting. It backslashifies
8995 # metacharacters that are still active within double-quoted strings.
8996 -Xsed='sed -e 1s/^X//'
8997 +Xsed='${SED} -e 1s/^X//'
8998 sed_quote_subst='$sed_quote_subst'
9000 # The HP-UX ksh and POSIX shell print the target directory to stdout
9002 -if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
9003 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9005 relink_command=\"$relink_command\"
9007 # This environment variable determines our operation mode.
9008 if test \"\$libtool_install_magic\" = \"$magic\"; then
9009 # install mode needs the following variable:
9010 - link_against_libtool_libs='$link_against_libtool_libs'
9011 + notinst_deplibs='$notinst_deplibs'
9013 # When we are sourced in execute mode, \$file and \$echo are already set.
9014 if test \"\$libtool_execute_magic\" != \"$magic\"; then
9015 @@ -2835,20 +5288,20 @@ else
9016 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
9018 # Follow symbolic links until we get to the real thisdir.
9019 - file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
9020 + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
9021 while test -n \"\$file\"; do
9022 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
9024 # If there was a directory component, then change thisdir.
9025 if test \"x\$destdir\" != \"x\$file\"; then
9026 case \"\$destdir\" in
9027 - [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
9028 + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
9029 *) thisdir=\"\$thisdir/\$destdir\" ;;
9033 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
9034 - file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
9035 + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
9038 # Try to get the absolute directory name.
9039 @@ -2857,12 +5310,12 @@ else
9042 if test "$fast_install" = yes; then
9043 - echo >> $output "\
9044 - program=lt-'$outputname'
9045 + $echo >> $output "\
9046 + program=lt-'$outputname'$exeext
9047 progdir=\"\$thisdir/$objdir\"
9050 if test ! -f \"\$progdir/\$program\" || \\
9051 - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
9052 + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
9053 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
9055 file=\"\$\$-\$program\"
9056 @@ -2873,14 +5326,15 @@ else
9057 $rm \"\$progdir/\$file\"
9060 - echo >> $output "\
9061 + $echo >> $output "\
9063 # relink executable if necessary
9064 if test -n \"\$relink_command\"; then
9065 - if (cd \"\$thisdir\" && eval \$relink_command); then :
9066 + if relink_command_output=\`eval \$relink_command 2>&1\`; then :
9068 + $echo \"\$relink_command_output\" >&2
9069 $rm \"\$progdir/\$file\"
9071 + exit $EXIT_FAILURE
9075 @@ -2890,13 +5344,13 @@ else
9076 $rm \"\$progdir/\$file\"
9079 - echo >> $output "\
9080 + $echo >> $output "\
9081 program='$outputname'
9082 progdir=\"\$thisdir/$objdir\"
9086 - echo >> $output "\
9087 + $echo >> $output "\
9089 if test -f \"\$progdir/\$program\"; then"
9091 @@ -2927,39 +5381,35 @@ else
9092 # Run the actual program with our arguments.
9095 - *-*-cygwin* | *-*-mingw | *-*-os2*)
9096 - # win32 systems need to use the prog path for dll
9098 + # Backslashes separate directories on plain windows
9099 + *-*-mingw | *-*-os2*)
9101 - exec \$progdir\\\\\$program \${1+\"\$@\"}
9102 + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
9108 - # Export the path to the program.
9109 - PATH=\"\$progdir:\$PATH\"
9112 - exec \$program \${1+\"\$@\"}
9113 + exec \"\$progdir/\$program\" \${1+\"\$@\"}
9118 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
9120 + exit $EXIT_FAILURE
9123 # The program doesn't exist.
9124 - \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
9125 + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
9126 \$echo \"This script is just a wrapper for \$program.\" 1>&2
9127 - echo \"See the $PACKAGE documentation for more information.\" 1>&2
9129 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2
9130 + exit $EXIT_FAILURE
9137 + exit $EXIT_SUCCESS
9141 @@ -2975,74 +5425,130 @@ fi\
9142 oldobjs="$libobjs_save"
9143 build_libtool_libs=no
9145 - oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
9146 + oldobjs="$old_deplibs $non_pic_objects"
9148 addlibs="$old_convenience"
9151 if test -n "$addlibs"; then
9152 gentop="$output_objdir/${outputname}x"
9153 - $show "${rm}r $gentop"
9154 - $run ${rm}r "$gentop"
9155 - $show "mkdir $gentop"
9156 - $run mkdir "$gentop"
9158 - if test $status -ne 0 && test ! -d "$gentop"; then
9161 generated="$generated $gentop"
9163 - # Add in members from convenience archives.
9164 - for xlib in $addlibs; do
9165 - # Extract the objects.
9167 - [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
9168 - *) xabs=`pwd`"/$xlib" ;;
9170 - xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
9171 - xdir="$gentop/$xlib"
9173 - $show "${rm}r $xdir"
9174 - $run ${rm}r "$xdir"
9175 - $show "mkdir $xdir"
9176 - $run mkdir "$xdir"
9178 - if test $status -ne 0 && test ! -d "$xdir"; then
9181 - $show "(cd $xdir && $AR x $xabs)"
9182 - $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
9184 - oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
9186 + func_extract_archives $gentop $addlibs
9187 + oldobjs="$oldobjs $func_extract_archives_result"
9190 # Do each command in the archive commands.
9191 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
9192 - eval cmds=\"$old_archive_from_new_cmds\"
9193 + cmds=$old_archive_from_new_cmds
9195 - # Ensure that we have .o objects in place in case we decided
9196 - # not to build a shared library, and have fallen back to building
9197 - # static libs even though --disable-static was passed!
9198 - for oldobj in $oldobjs; do
9199 - if test ! -f $oldobj; then
9200 - xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
9201 - if test "X$xdir" = "X$oldobj"; then
9206 - baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
9207 - obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
9208 - $show "(cd $xdir && ${LN_S} $obj $baseobj)"
9209 - $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
9210 + # POSIX demands no paths to be encoded in archives. We have
9211 + # to avoid creating archives with duplicate basenames if we
9212 + # might have to extract them afterwards, e.g., when creating a
9213 + # static archive out of a convenience library, or when linking
9214 + # the entirety of a libtool archive into another (currently
9215 + # not supported by libtool).
9216 + if (for obj in $oldobjs
9218 + $echo "X$obj" | $Xsed -e 's%^.*/%%'
9219 + done | sort | sort -uc >/dev/null 2>&1); then
9222 + $echo "copying selected object files to avoid basename conflicts..."
9224 + if test -z "$gentop"; then
9225 + gentop="$output_objdir/${outputname}x"
9226 + generated="$generated $gentop"
9228 + $show "${rm}r $gentop"
9229 + $run ${rm}r "$gentop"
9230 + $show "$mkdir $gentop"
9231 + $run $mkdir "$gentop"
9233 + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
9239 + save_oldobjs=$oldobjs
9242 + for obj in $save_oldobjs
9244 + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
9245 + case " $oldobjs " in
9246 + " ") oldobjs=$obj ;;
9247 + *[\ /]"$objbase "*)
9249 + # Make sure we don't pick an alternate name that also
9251 + newobj=lt$counter-$objbase
9252 + counter=`expr $counter + 1`
9253 + case " $oldobjs " in
9254 + *[\ /]"$newobj "*) ;;
9255 + *) if test ! -f "$gentop/$newobj"; then break; fi ;;
9258 + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
9259 + $run ln "$obj" "$gentop/$newobj" ||
9260 + $run cp "$obj" "$gentop/$newobj"
9261 + oldobjs="$oldobjs $gentop/$newobj"
9263 + *) oldobjs="$oldobjs $obj" ;;
9268 eval cmds=\"$old_archive_cmds\"
9270 + if len=`expr "X$cmds" : ".*"` &&
9271 + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9272 + cmds=$old_archive_cmds
9274 + # the command line is too long to link in one step, link in parts
9275 + $echo "using piecewise archive linking..."
9276 + save_RANLIB=$RANLIB
9280 + save_oldobjs=$oldobjs
9282 + # Is there a better way of finding the last object in the list?
9283 + for obj in $save_oldobjs
9287 + for obj in $save_oldobjs
9289 + oldobjs="$objlist $obj"
9290 + objlist="$objlist $obj"
9291 + eval test_cmds=\"$old_archive_cmds\"
9292 + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
9293 + test "$len" -le "$max_cmd_len"; then
9296 + # the above command should be used before it gets too long
9298 + if test "$obj" = "$last_oldobj" ; then
9299 + RANLIB=$save_RANLIB
9301 + test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9302 + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
9306 + RANLIB=$save_RANLIB
9308 + if test "X$oldobjs" = "X" ; then
9309 + eval cmds=\"\$concat_cmds\"
9311 + eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
9315 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
9316 + save_ifs="$IFS"; IFS='~'
9317 for cmd in $cmds; do
9321 $run eval "$cmd" || exit $?
9322 @@ -3056,20 +5562,31 @@ fi\
9325 # Now create the libtool archive.
9330 test "$build_old_libs" = yes && old_library="$libname.$libext"
9331 $show "creating $output"
9333 - if test -n "$xrpath"; then
9335 - for libdir in $xrpath; do
9336 - temp_xrpath="$temp_xrpath -R$libdir"
9338 - dependency_libs="$temp_xrpath $dependency_libs"
9339 + # Preserve any variables that may affect compiler behavior
9340 + for var in $variables_saved_for_relink; do
9341 + if eval test -z \"\${$var+set}\"; then
9342 + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
9343 + elif eval var_value=\$$var; test -z "$var_value"; then
9344 + relink_command="$var=; export $var; $relink_command"
9346 + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
9347 + relink_command="$var=\"$var_value\"; export $var; $relink_command"
9350 + # Quote the link command for shipping.
9351 + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
9352 + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9353 + if test "$hardcode_automatic" = yes ; then
9358 # Only create the output if not a dry run.
9359 if test -z "$run"; then
9360 for installed in no yes; do
9361 @@ -3078,8 +5595,71 @@ fi\
9364 output="$output_objdir/$outputname"i
9365 + # Replace all uninstalled libtool libraries with the installed ones
9366 + newdependency_libs=
9367 + for deplib in $dependency_libs; do
9370 + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
9371 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9372 + if test -z "$libdir"; then
9373 + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
9374 + exit $EXIT_FAILURE
9376 + newdependency_libs="$newdependency_libs $libdir/$name"
9378 + *) newdependency_libs="$newdependency_libs $deplib" ;;
9381 + dependency_libs="$newdependency_libs"
9383 + for lib in $dlfiles; do
9384 + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
9385 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9386 + if test -z "$libdir"; then
9387 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9388 + exit $EXIT_FAILURE
9390 + newdlfiles="$newdlfiles $libdir/$name"
9392 + dlfiles="$newdlfiles"
9394 + for lib in $dlprefiles; do
9395 + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
9396 + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
9397 + if test -z "$libdir"; then
9398 + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
9399 + exit $EXIT_FAILURE
9401 + newdlprefiles="$newdlprefiles $libdir/$name"
9403 + dlprefiles="$newdlprefiles"
9406 + for lib in $dlfiles; do
9408 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9409 + *) abs=`pwd`"/$lib" ;;
9411 + newdlfiles="$newdlfiles $abs"
9413 + dlfiles="$newdlfiles"
9415 + for lib in $dlprefiles; do
9417 + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
9418 + *) abs=`pwd`"/$lib" ;;
9420 + newdlprefiles="$newdlprefiles $abs"
9422 + dlprefiles="$newdlprefiles"
9425 + # place dlname in correct position for cygwin
9427 + case $host,$output,$installed,$module,$dlname in
9428 + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
9431 # $outputname - a libtool library file
9432 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
9433 @@ -3088,7 +5668,7 @@ fi\
9434 # It is necessary for linking the library.
9436 # The name that we can dlopen(3).
9440 # Names of this library.
9441 library_names='$library_names'
9442 @@ -3107,19 +5687,29 @@ revision=$revision
9443 # Is this an already installed library?
9444 installed=$installed
9446 +# Should we warn about portability when linking against -modules?
9447 +shouldnotlink=$module
9449 +# Files to dlopen/dlpreopen
9451 +dlpreopen='$dlprefiles'
9453 # Directory that this library needs to be installed in:
9454 -libdir='$install_libdir'\
9456 +libdir='$install_libdir'"
9457 + if test "$installed" = no && test "$need_relink" = yes; then
9458 + $echo >> $output "\
9459 +relink_command=\"$relink_command\""
9464 # Do a symbolic link so that the libtool archive can be found in
9465 # LD_LIBRARY_PATH before the program is installed.
9466 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
9467 - $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
9468 + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
9472 + exit $EXIT_SUCCESS
9475 # libtool install mode
9476 @@ -3128,11 +5718,13 @@ libdir='$install_libdir'\
9478 # There may be an optional sh(1) argument at the beginning of
9479 # install_prog (especially on Windows NT).
9480 - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
9481 + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
9482 + # Allow the use of GNU shtool's install command.
9483 + $echo "X$nonopt" | grep shtool > /dev/null; then
9484 # Aesthetically quote it.
9485 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
9487 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9489 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9493 @@ -3141,14 +5733,14 @@ libdir='$install_libdir'\
9501 # The real first argument should be the name of the installation program.
9502 # Aesthetically quote it.
9503 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9505 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9507 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9511 @@ -3166,28 +5758,31 @@ libdir='$install_libdir'\
9513 if test -n "$dest"; then
9514 files="$files $dest"
9528 + case " $install_prog " in
9533 + -g | -m | -o) prev=$arg ;;
9543 # If the previous option needed an argument, then skip it.
9544 if test -n "$prev"; then
9552 @@ -3195,8 +5790,8 @@ libdir='$install_libdir'\
9554 # Aesthetically quote the argument.
9555 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
9557 - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
9559 + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
9563 @@ -3206,13 +5801,13 @@ libdir='$install_libdir'\
9564 if test -z "$install_prog"; then
9565 $echo "$modename: you must specify an install program" 1>&2
9568 + exit $EXIT_FAILURE
9571 if test -n "$prev"; then
9572 $echo "$modename: the \`$prev' option requires an argument" 1>&2
9575 + exit $EXIT_FAILURE
9578 if test -z "$files"; then
9579 @@ -3222,7 +5817,7 @@ libdir='$install_libdir'\
9580 $echo "$modename: you must specify a destination" 1>&2
9584 + exit $EXIT_FAILURE
9587 # Strip any trailing slash from the destination.
9588 @@ -3240,22 +5835,22 @@ libdir='$install_libdir'\
9590 # Not a directory, so check to see that there is only one file specified.
9592 - if test $# -gt 2; then
9593 + if test "$#" -gt 2; then
9594 $echo "$modename: \`$dest' is not a directory" 1>&2
9597 + exit $EXIT_FAILURE
9600 - case "$destdir" in
9602 [\\/]* | [A-Za-z]:[\\/]*) ;;
9604 for file in $files; do
9609 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
9612 + exit $EXIT_FAILURE
9616 @@ -3272,25 +5867,26 @@ libdir='$install_libdir'\
9617 for file in $files; do
9619 # Do each installation.
9624 # Do the static libraries later.
9625 staticlibs="$staticlibs $file"
9629 # Check to see that this really is a libtool archive.
9630 - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
9631 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
9633 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
9636 + exit $EXIT_FAILURE
9642 # If there is no directory component, then add one.
9645 */* | *\\*) . $file ;;
9648 @@ -3309,10 +5905,41 @@ libdir='$install_libdir'\
9652 - dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
9653 + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
9654 test "X$dir" = "X$file/" && dir=
9657 + if test -n "$relink_command"; then
9658 + # Determine the prefix the user has applied to our future dir.
9659 + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
9661 + # Don't allow the user to place us outside of our expected
9662 + # location b/c this prevents finding dependent libraries that
9663 + # are installed to the same prefix.
9664 + # At present, this check doesn't affect windows .dll's that
9665 + # are installed into $libdir/../bin (currently, that works fine)
9666 + # but it's something to keep an eye on.
9667 + if test "$inst_prefix_dir" = "$destdir"; then
9668 + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
9669 + exit $EXIT_FAILURE
9672 + if test -n "$inst_prefix_dir"; then
9673 + # Stick the inst_prefix_dir data into the link command.
9674 + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
9676 + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
9679 + $echo "$modename: warning: relinking \`$file'" 1>&2
9680 + $show "$relink_command"
9681 + if $run eval "$relink_command"; then :
9683 + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
9684 + exit $EXIT_FAILURE
9688 # See the names of the shared library.
9689 set dummy $library_names
9690 if test -n "$2"; then
9691 @@ -3320,29 +5947,49 @@ libdir='$install_libdir'\
9695 + srcname="$realname"
9696 + test -n "$relink_command" && srcname="$realname"T
9698 # Install the shared library and build the symlinks.
9699 - $show "$install_prog $dir/$realname $destdir/$realname"
9700 - $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
9701 + $show "$install_prog $dir/$srcname $destdir/$realname"
9702 + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
9703 + if test -n "$stripme" && test -n "$striplib"; then
9704 + $show "$striplib $destdir/$realname"
9705 + $run eval "$striplib $destdir/$realname" || exit $?
9708 - if test $# -gt 0; then
9709 + if test "$#" -gt 0; then
9710 # Delete the old symlinks, and create new ones.
9711 + # Try `ln -sf' first, because the `ln' binary might depend on
9712 + # the symlink we replace! Solaris /bin/ln does not understand -f,
9713 + # so we also need to try rm && ln -s.
9716 if test "$linkname" != "$realname"; then
9717 - $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
9718 - $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
9719 + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
9720 + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
9725 # Do each command in the postinstall commands.
9726 lib="$destdir/$realname"
9727 - eval cmds=\"$postinstall_cmds\"
9728 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
9729 + cmds=$postinstall_cmds
9730 + save_ifs="$IFS"; IFS='~'
9731 for cmd in $cmds; do
9735 - $run eval "$cmd" || exit $?
9736 + $run eval "$cmd" || {
9739 + # Restore the uninstalled library and exit
9740 + if test "$mode" = relink; then
9741 + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
9749 @@ -3369,18 +6016,18 @@ libdir='$install_libdir'\
9752 # Deduce the name of the destination old-style object file.
9753 - case "$destfile" in
9756 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
9760 staticdest="$destfile"
9764 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
9767 + exit $EXIT_FAILURE
9771 @@ -3398,7 +6045,7 @@ libdir='$install_libdir'\
9772 $show "$install_prog $staticobj $staticdest"
9773 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
9776 + exit $EXIT_SUCCESS
9780 @@ -3410,52 +6057,84 @@ libdir='$install_libdir'\
9781 destfile="$destdir/$destfile"
9784 + # If the file is missing, and there is a .exe on the end, strip it
9785 + # because it is most likely a libtool script we actually want to
9790 + if test ! -f "$file"; then
9791 + file=`$echo $file|${SED} 's,.exe$,,'`
9792 + stripped_ext=".exe"
9797 # Do a test to see if this is really a libtool program.
9798 - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
9799 - link_against_libtool_libs=
9802 + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
9808 + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
9812 + # Note that it is not necessary on cygwin/mingw to append a dot to
9813 + # foo even if both foo and FILE.exe exist: automatic-append-.exe
9814 + # behavior happens only for exec(3), not for open(2)! Also, sourcing
9815 + # `FILE.' does not work on cygwin managed mounts.
9817 # If there is no directory component, then add one.
9819 - */* | *\\*) . $file ;;
9822 + */* | *\\*) . ${wrapper} ;;
9823 + *) . ./${wrapper} ;;
9826 # Check the variables that should have been set.
9827 - if test -z "$link_against_libtool_libs"; then
9828 - $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
9830 + if test -z "$notinst_deplibs"; then
9831 + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
9832 + exit $EXIT_FAILURE
9836 - for lib in $link_against_libtool_libs; do
9837 + for lib in $notinst_deplibs; do
9838 # Check to see that each library is installed.
9840 if test -f "$lib"; then
9841 # If there is no directory component, then add one.
9844 */* | *\\*) . $lib ;;
9848 - libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
9849 + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
9850 if test -n "$libdir" && test ! -f "$libfile"; then
9851 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
9857 + # Note that it is not necessary on cygwin/mingw to append a dot to
9858 + # foo even if both foo and FILE.exe exist: automatic-append-.exe
9859 + # behavior happens only for exec(3), not for open(2)! Also, sourcing
9860 + # `FILE.' does not work on cygwin managed mounts.
9862 + # If there is no directory component, then add one.
9864 + */* | *\\*) . ${wrapper} ;;
9865 + *) . ./${wrapper} ;;
9869 if test "$fast_install" = no && test -n "$relink_command"; then
9870 if test "$finalize" = yes && test -z "$run"; then
9872 - test -n "$TMPDIR" && tmpdir="$TMPDIR"
9873 - tmpdir="$tmpdir/libtool-$$"
9874 - if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
9876 - $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
9879 + tmpdir=`func_mktempdir`
9880 + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
9881 outputname="$tmpdir/$file"
9882 # Replace the output file specification.
9883 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
9884 @@ -3473,10 +6152,27 @@ libdir='$install_libdir'\
9887 # Install the binary that we compiled earlier.
9888 - file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
9889 + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
9893 + # remove .exe since cygwin /usr/bin/install will append another
9895 + case $install_prog,$host in
9896 + */usr/bin/install*,*cygwin*)
9897 + case $file:$destfile in
9902 + destfile=$destfile.exe
9905 + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
9910 $show "$install_prog$stripme $file $destfile"
9911 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
9912 test -n "$outputname" && ${rm}r "$tmpdir"
9913 @@ -3493,11 +6189,17 @@ libdir='$install_libdir'\
9914 $show "$install_prog $file $oldlib"
9915 $run eval "$install_prog \$file \$oldlib" || exit $?
9917 + if test -n "$stripme" && test -n "$old_striplib"; then
9918 + $show "$old_striplib $oldlib"
9919 + $run eval "$old_striplib $oldlib" || exit $?
9922 # Do each command in the postinstall commands.
9923 - eval cmds=\"$old_postinstall_cmds\"
9924 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
9925 + cmds=$old_postinstall_cmds
9926 + save_ifs="$IFS"; IFS='~'
9927 for cmd in $cmds; do
9931 $run eval "$cmd" || exit $?
9933 @@ -3511,11 +6213,10 @@ libdir='$install_libdir'\
9934 if test -n "$current_libdirs"; then
9935 # Maybe just do a dry run.
9936 test -n "$run" && current_libdirs=" -n$current_libdirs"
9937 - exec $SHELL $0 --finish$current_libdirs
9939 + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
9941 + exit $EXIT_SUCCESS
9947 # libtool finish mode
9948 @@ -3533,10 +6234,11 @@ libdir='$install_libdir'\
9949 for libdir in $libdirs; do
9950 if test -n "$finish_cmds"; then
9951 # Do each command in the finish commands.
9952 - eval cmds=\"$finish_cmds\"
9953 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
9955 + save_ifs="$IFS"; IFS='~'
9956 for cmd in $cmds; do
9960 $run eval "$cmd" || admincmds="$admincmds
9962 @@ -3553,43 +6255,43 @@ libdir='$install_libdir'\
9965 # Exit here if they wanted silent mode.
9966 - test "$show" = : && exit 0
9967 + test "$show" = : && exit $EXIT_SUCCESS
9969 - echo "----------------------------------------------------------------------"
9970 - echo "Libraries have been installed in:"
9971 + $echo "X----------------------------------------------------------------------" | $Xsed
9972 + $echo "Libraries have been installed in:"
9973 for libdir in $libdirs; do
9978 - echo "If you ever happen to want to link against installed libraries"
9979 - echo "in a given directory, LIBDIR, you must either use libtool, and"
9980 - echo "specify the full pathname of the library, or use \`-LLIBDIR'"
9981 - echo "flag during linking and do at least one of the following:"
9983 + $echo "If you ever happen to want to link against installed libraries"
9984 + $echo "in a given directory, LIBDIR, you must either use libtool, and"
9985 + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
9986 + $echo "flag during linking and do at least one of the following:"
9987 if test -n "$shlibpath_var"; then
9988 - echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
9989 - echo " during execution"
9990 + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
9991 + $echo " during execution"
9993 if test -n "$runpath_var"; then
9994 - echo " - add LIBDIR to the \`$runpath_var' environment variable"
9995 - echo " during linking"
9996 + $echo " - add LIBDIR to the \`$runpath_var' environment variable"
9997 + $echo " during linking"
9999 if test -n "$hardcode_libdir_flag_spec"; then
10001 eval flag=\"$hardcode_libdir_flag_spec\"
10003 - echo " - use the \`$flag' linker flag"
10004 + $echo " - use the \`$flag' linker flag"
10006 if test -n "$admincmds"; then
10007 - echo " - have your system administrator run these commands:$admincmds"
10008 + $echo " - have your system administrator run these commands:$admincmds"
10010 if test -f /etc/ld.so.conf; then
10011 - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
10012 + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
10015 - echo "See any operating system documentation about shared libraries for"
10016 - echo "more information, such as the ld(1) and ld.so(8) manual pages."
10017 - echo "----------------------------------------------------------------------"
10020 + $echo "See any operating system documentation about shared libraries for"
10021 + $echo "more information, such as the ld(1) and ld.so(8) manual pages."
10022 + $echo "X----------------------------------------------------------------------" | $Xsed
10023 + exit $EXIT_SUCCESS
10026 # libtool execute mode
10027 @@ -3601,7 +6303,7 @@ libdir='$install_libdir'\
10028 if test -z "$cmd"; then
10029 $echo "$modename: you must specify a COMMAND" 1>&2
10032 + exit $EXIT_FAILURE
10035 # Handle -dlopen flags immediately.
10036 @@ -3609,18 +6311,18 @@ libdir='$install_libdir'\
10037 if test ! -f "$file"; then
10038 $echo "$modename: \`$file' is not a file" 1>&2
10041 + exit $EXIT_FAILURE
10048 # Check to see that this really is a libtool archive.
10049 - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
10050 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
10052 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
10055 + exit $EXIT_FAILURE
10058 # Read the libtool library.
10059 @@ -3628,7 +6330,7 @@ libdir='$install_libdir'\
10062 # If there is no directory component, then add one.
10065 */* | *\\*) . $file ;;
10068 @@ -3647,7 +6349,7 @@ libdir='$install_libdir'\
10071 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
10073 + exit $EXIT_FAILURE
10077 @@ -3683,13 +6385,13 @@ libdir='$install_libdir'\
10085 # Do a test to see if this is really a libtool program.
10086 - if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10087 + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10088 # If there is no directory component, then add one.
10091 */* | *\\*) . $file ;;
10094 @@ -3706,11 +6408,11 @@ libdir='$install_libdir'\
10096 if test -z "$run"; then
10097 if test -n "$shlibpath_var"; then
10098 - # Export the shlibpath_var.
10099 - eval "export $shlibpath_var"
10100 + # Export the shlibpath_var.
10101 + eval "export $shlibpath_var"
10104 - # Restore saved enviroment variables
10105 + # Restore saved environment variables
10106 if test "${save_LC_ALL+set}" = set; then
10107 LC_ALL="$save_LC_ALL"; export LC_ALL
10109 @@ -3718,31 +6420,35 @@ libdir='$install_libdir'\
10110 LANG="$save_LANG"; export LANG
10113 - # Now actually exec the command.
10114 - eval "exec \$cmd$args"
10116 - $echo "$modename: cannot exec \$cmd$args"
10118 + # Now prepare to actually exec the command.
10119 + exec_cmd="\$cmd$args"
10121 # Display what would be done.
10122 if test -n "$shlibpath_var"; then
10123 - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
10124 - $echo "export $shlibpath_var"
10125 + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
10126 + $echo "export $shlibpath_var"
10130 + exit $EXIT_SUCCESS
10134 - # libtool uninstall mode
10136 - modename="$modename: uninstall"
10137 + # libtool clean and uninstall mode
10138 + clean | uninstall)
10139 + modename="$modename: $mode"
10145 + # This variable tells wrapper scripts just to set variables rather
10146 + # than running their programs.
10147 + libtool_install_magic="$magic"
10153 + -f) rm="$rm $arg"; rmforce=yes ;;
10154 -*) rm="$rm $arg" ;;
10155 *) files="$files $arg" ;;
10157 @@ -3751,91 +6457,192 @@ libdir='$install_libdir'\
10158 if test -z "$rm"; then
10159 $echo "$modename: you must specify an RM program" 1>&2
10162 + exit $EXIT_FAILURE
10167 + origobjdir="$objdir"
10168 for file in $files; do
10169 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
10170 - test "X$dir" = "X$file" && dir=.
10171 + if test "X$dir" = "X$file"; then
10173 + objdir="$origobjdir"
10175 + objdir="$dir/$origobjdir"
10177 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
10178 + test "$mode" = uninstall && objdir="$dir"
10180 + # Remember objdir for removal later, being careful to avoid duplicates
10181 + if test "$mode" = clean; then
10182 + case " $rmdirs " in
10183 + *" $objdir "*) ;;
10184 + *) rmdirs="$rmdirs $objdir" ;;
10188 + # Don't error if the file doesn't exist and rm -f was used.
10189 + if (test -L "$file") >/dev/null 2>&1 \
10190 + || (test -h "$file") >/dev/null 2>&1 \
10191 + || test -f "$file"; then
10193 + elif test -d "$file"; then
10196 + elif test "$rmforce" = yes; then
10205 # Possibly a libtool archive, so verify it.
10206 - if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10207 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10210 # Delete the libtool libraries and symlinks.
10211 for n in $library_names; do
10212 - rmfiles="$rmfiles $dir/$n"
10213 + rmfiles="$rmfiles $objdir/$n"
10215 - test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
10216 + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
10218 - $show "$rm $rmfiles"
10219 - $run $rm $rmfiles
10221 - if test -n "$library_names"; then
10222 - # Do each command in the postuninstall commands.
10223 - eval cmds=\"$postuninstall_cmds\"
10224 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
10225 - for cmd in $cmds; do
10228 + case " $library_names " in
10229 + # " " in the beginning catches empty $dlname
10230 + *" $dlname "*) ;;
10231 + *) rmfiles="$rmfiles $objdir/$dlname" ;;
10233 + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
10236 + if test -n "$library_names"; then
10237 + # Do each command in the postuninstall commands.
10238 + cmds=$postuninstall_cmds
10239 + save_ifs="$IFS"; IFS='~'
10240 + for cmd in $cmds; do
10242 + eval cmd=\"$cmd\"
10245 + if test "$?" -ne 0 && test "$rmforce" != yes; then
10257 - if test -n "$old_library"; then
10258 - # Do each command in the old_postuninstall commands.
10259 - eval cmds=\"$old_postuninstall_cmds\"
10260 - IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
10261 - for cmd in $cmds; do
10262 + if test -n "$old_library"; then
10263 + # Do each command in the old_postuninstall commands.
10264 + cmds=$old_postuninstall_cmds
10265 + save_ifs="$IFS"; IFS='~'
10266 + for cmd in $cmds; do
10268 + eval cmd=\"$cmd\"
10271 + if test "$?" -ne 0 && test "$rmforce" != yes; then
10282 - # FIXME: should reinstall the best remaining shared library.
10284 + # FIXME: should reinstall the best remaining shared library.
10291 - if test "$build_old_libs" = yes; then
10292 - oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
10293 - rmfiles="$rmfiles $dir/$oldobj"
10294 + # Possibly a libtool object, so verify it.
10295 + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10297 + # Read the .lo file
10300 + # Add PIC object to the list of files to remove.
10301 + if test -n "$pic_object" \
10302 + && test "$pic_object" != none; then
10303 + rmfiles="$rmfiles $dir/$pic_object"
10306 + # Add non-PIC object to the list of files to remove.
10307 + if test -n "$non_pic_object" \
10308 + && test "$non_pic_object" != none; then
10309 + rmfiles="$rmfiles $dir/$non_pic_object"
10312 - $show "$rm $rmfiles"
10313 - $run $rm $rmfiles
10317 - $show "$rm $rmfiles"
10318 - $run $rm $rmfiles
10319 + if test "$mode" = clean ; then
10323 + file=`$echo $file|${SED} 's,.exe$,,'`
10324 + noexename=`$echo $name|${SED} 's,.exe$,,'`
10325 + # $file with .exe has already been added to rmfiles,
10326 + # add $file without .exe
10327 + rmfiles="$rmfiles $file"
10330 + # Do a test to see if this is a libtool program.
10331 + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
10333 + . $dir/$noexename
10335 + # note $name still contains .exe if it was in $file originally
10336 + # as does the version of $file that was added into $rmfiles
10337 + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
10338 + if test "$fast_install" = yes && test -n "$relink_command"; then
10339 + rmfiles="$rmfiles $objdir/lt-$name"
10341 + if test "X$noexename" != "X$name" ; then
10342 + rmfiles="$rmfiles $objdir/lt-${noexename}.c"
10348 + $show "$rm $rmfiles"
10349 + $run $rm $rmfiles || exit_status=1
10352 + objdir="$origobjdir"
10354 + # Try to remove the ${objdir}s in the directories where we deleted files
10355 + for dir in $rmdirs; do
10356 + if test -d "$dir"; then
10357 + $show "rmdir $dir"
10358 + $run rmdir $dir >/dev/null 2>&1
10362 + exit $exit_status
10366 $echo "$modename: you must specify a MODE" 1>&2
10367 $echo "$generic_help" 1>&2
10369 + exit $EXIT_FAILURE
10373 - $echo "$modename: invalid operation mode \`$mode'" 1>&2
10374 - $echo "$generic_help" 1>&2
10376 + if test -z "$exec_cmd"; then
10377 + $echo "$modename: invalid operation mode \`$mode'" 1>&2
10378 + $echo "$generic_help" 1>&2
10379 + exit $EXIT_FAILURE
10381 fi # test -z "$show_help"
10383 +if test -n "$exec_cmd"; then
10384 + eval exec $exec_cmd
10385 + exit $EXIT_FAILURE
10388 # We need to display help for each of the modes.
10392 "Usage: $modename [OPTION]... [MODE-ARG]...
10394 @@ -3850,10 +6657,12 @@ Provide generalized library-building sup
10395 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
10396 --quiet same as \`--silent'
10397 --silent don't print informational messages
10398 + --tag=TAG use configuration variables from tag TAG
10399 --version print version information
10401 MODE must be one of the following:
10403 + clean remove files from the build directory
10404 compile compile a source file into a libtool object
10405 execute automatically set library path, then run a program
10406 finish complete the installation of libtool libraries
10407 @@ -3862,8 +6671,24 @@ MODE must be one of the following:
10408 uninstall remove libraries from an installed directory
10410 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
10411 -a more detailed description of MODE."
10413 +a more detailed description of MODE.
10415 +Report bugs to <bug-libtool@gnu.org>."
10416 + exit $EXIT_SUCCESS
10421 +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
10423 +Remove files from the build directory.
10425 +RM is the name of the program to use to delete files associated with each FILE
10426 +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
10429 +If FILE is a libtool library, object or program, all the files associated
10430 +with it are deleted. Otherwise, only FILE itself is deleted using RM."
10434 @@ -3875,6 +6700,8 @@ Compile a source file into a libtool lib
10435 This mode accepts the following additional options:
10437 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
10438 + -prefer-pic try to building PIC objects only
10439 + -prefer-non-pic try to building non-PIC objects only
10440 -static always build a \`.o' file suitable for static linking
10442 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
10443 @@ -3954,8 +6781,13 @@ The following components of LINK-COMMAND
10444 -LLIBDIR search LIBDIR for required installed libraries
10445 -lNAME OUTPUT-FILE requires the installed library libNAME
10446 -module build a library that can dlopened
10447 + -no-fast-install disable the fast-install mode
10448 + -no-install link a not-installable executable
10449 -no-undefined declare that a library does not refer to external symbols
10450 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
10451 + -objectlist FILE Use a list of object files found in FILE to specify objects
10452 + -precious-files-regex REGEX
10453 + don't remove output files matching REGEX
10454 -release RELEASE specify package release information
10455 -rpath LIBDIR the created library will eventually be installed in LIBDIR
10456 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
10457 @@ -3997,14 +6829,33 @@ Otherwise, only FILE itself is deleted u
10459 $echo "$modename: invalid operation mode \`$mode'" 1>&2
10462 + exit $EXIT_FAILURE
10468 $echo "Try \`$modename --help' for more information about other modes."
10473 +# The TAGs below are defined such that we never get into a situation
10474 +# in which we disable both kinds of libraries. Given conflicting
10475 +# choices, we go for a static library, that is the most portable,
10476 +# since we can't tell whether shared libraries were disabled because
10477 +# the user asked for that or because the platform doesn't support
10478 +# them. This is particularly important on AIX, because we don't
10479 +# support having both static and shared libraries enabled at the same
10480 +# time on that platform, so we default to a shared-only configuration.
10481 +# If a disable-shared tag is given, we'll fallback to a static-only
10482 +# configuration. But we'll never go from static-only to shared-only.
10484 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
10485 +disable_libs=shared
10486 +# ### END LIBTOOL TAG CONFIG: disable-shared
10488 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static
10489 +disable_libs=static
10490 +# ### END LIBTOOL TAG CONFIG: disable-static
10493 # mode:shell-script