1
diff -Nrua a/admin/libtool.m4.in b/admin/libtool.m4.in
2
--- a/admin/libtool.m4.in 2007-10-08 13:34:50.000000000 +0200
3
+++ b/admin/libtool.m4.in 2008-01-21 23:31:58.000000000 +0100
5
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
6
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
7
+## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
8
## Free Software Foundation, Inc.
9
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11
-## This program is free software; you can redistribute it and/or modify
12
-## it under the terms of the GNU General Public License as published by
13
-## the Free Software Foundation; either version 2 of the License, or
14
-## (at your option) any later version.
16
-## This program is distributed in the hope that it will be useful, but
17
-## WITHOUT ANY WARRANTY; without even the implied warranty of
18
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
-## General Public License for more details.
21
-## You should have received a copy of the GNU General Public License
22
-## along with this program; if not, write to the Free Software
23
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
-## As a special exception to the GNU General Public License, if you
26
-## distribute this file as part of a program that contains a
27
-## configuration script generated by Autoconf, you may include it under
28
-## the same distribution terms that you use for the rest of that program.
29
+## This file is free software; the Free Software Foundation gives
30
+## unlimited permission to copy and/or distribute it, with or without
31
+## modifications, as long as this notice is preserved.
33
-# serial 47 AC_PROG_LIBTOOL
34
+# serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
37
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
39
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
41
# Always use our own libtool.
42
-LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
43
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
46
# Prevent multiple expansion
49
# Sed substitution that helps us do robust quoting. It backslashifies
50
# metacharacters that are still active within double-quoted strings.
52
+Xsed='sed -e 1s/^X//'
53
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
55
# Same as above, but do not quote variable references.
60
-# All known linkers require a `.a' archive for static linking (except M$VC,
61
+# All known linkers require a `.a' archive for static linking (except MSVC,
62
# which needs '.lib').
64
ltmain="$ac_aux_dir/ltmain.sh"
66
test -z "$AS" && AS=as
67
test -z "$CC" && CC=cc
68
test -z "$LTCC" && LTCC=$CC
69
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
70
test -z "$DLLTOOL" && DLLTOOL=dlltool
71
test -z "$LD" && LD=ld
72
test -z "$LN_S" && LN_S="ln -s"
74
test -z "$ac_objext" && ac_objext=o
76
# Determine commands to create old-style static archives.
77
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
78
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
79
old_postinstall_cmds='chmod 644 $oldlib'
80
old_postuninstall_cmds=
82
if test -n "$RANLIB"; then
85
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
86
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
89
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
90
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
93
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
96
+_LT_CC_BASENAME([$compiler])
98
# Only perform the check for file, if the check method requires it
99
case $deplibs_check_method in
101
@@ -240,11 +228,58 @@
102
# If no C compiler was specified, use CC.
105
+# If no C compiler flags were specified, use CFLAGS.
106
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
108
# Allow CC to be a program name with arguments.
110
])# _LT_AC_SYS_COMPILER
113
+# _LT_CC_BASENAME(CC)
114
+# -------------------
115
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
116
+AC_DEFUN([_LT_CC_BASENAME],
117
+[for cc_temp in $1""; do
119
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
125
+cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
129
+# _LT_COMPILER_BOILERPLATE
130
+# ------------------------
131
+# Check for compiler boilerplate output or warnings with
132
+# the simple compiler test code.
133
+AC_DEFUN([_LT_COMPILER_BOILERPLATE],
134
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
135
+ac_outfile=conftest.$ac_objext
136
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
137
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
138
+_lt_compiler_boilerplate=`cat conftest.err`
140
+])# _LT_COMPILER_BOILERPLATE
143
+# _LT_LINKER_BOILERPLATE
144
+# ----------------------
145
+# Check for linker boilerplate output or warnings with
146
+# the simple link test code.
147
+AC_DEFUN([_LT_LINKER_BOILERPLATE],
148
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
149
+ac_outfile=conftest.$ac_objext
150
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
151
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
152
+_lt_linker_boilerplate=`cat conftest.err`
154
+])# _LT_LINKER_BOILERPLATE
157
# _LT_AC_SYS_LIBPATH_AIX
158
# ----------------------
159
# Links a minimal program and checks the executable
160
@@ -254,12 +289,20 @@
161
# If we don't find anything, use the default library path according
162
# to the aix ld manual.
163
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
164
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
165
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
167
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
168
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
169
+lt_aix_libpath_sed='
170
+ /Import File Strings/,/^$/ {
176
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
177
# Check for a 64-bit object if we didn't find anything.
178
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
180
+if test -z "$aix_libpath"; then
181
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
183
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
184
])# _LT_AC_SYS_LIBPATH_AIX
186
@@ -317,15 +360,15 @@
188
# The HP-UX ksh and POSIX shell print the target directory to stdout
190
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
191
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
193
if test -z "$ECHO"; then
194
if test "X${echo_test_string+set}" != Xset; then
195
# find a string as large as possible, as long as the shell can cope with it
196
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
197
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
198
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
199
- echo_test_string="`eval $cmd`" &&
200
+ if (echo_test_string=`eval $cmd`) 2>/dev/null &&
201
+ echo_test_string=`eval $cmd` &&
202
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
205
@@ -490,18 +533,21 @@
209
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
210
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
211
+s390*-*linux*|sparc*-*linux*)
212
# Find out which ABI we are using.
213
echo 'int i;' > conftest.$ac_ext
214
if AC_TRY_EVAL(ac_compile); then
215
- case "`/usr/bin/file conftest.o`" in
216
+ case `/usr/bin/file conftest.o` in
220
+ x86_64-*kfreebsd*-gnu)
221
+ LD="${LD-ld} -m elf_i386_fbsd"
224
LD="${LD-ld} -m elf_i386"
227
+ ppc64-*linux*|powerpc64-*linux*)
228
LD="${LD-ld} -m elf32ppclinux"
237
+ x86_64-*kfreebsd*-gnu)
238
+ LD="${LD-ld} -m elf_x86_64_fbsd"
241
LD="${LD-ld} -m elf_x86_64"
244
CFLAGS="$SAVE_CFLAGS"
248
+ # Find out which ABI we are using.
249
+ echo 'int i;' > conftest.$ac_ext
250
+ if AC_TRY_EVAL(ac_compile); then
251
+ case `/usr/bin/file conftest.o` in
253
+ case $lt_cv_prog_gnu_ld in
254
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
255
+ *) LD="${LD-ld} -64" ;;
263
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
264
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
265
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
267
AC_CACHE_CHECK([$1], [$2],
269
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
270
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
271
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
272
lt_compiler_flag="$3"
273
# Insert the option either (1) after the last *FLAGS variable, or
274
# (2) before a word containing "conftest.", or (3) at the end.
276
# with a dollar sign (not a hyphen), so the echo should work correctly.
277
# The option is referenced via a variable to avoid confusing sed.
278
lt_compile=`echo "$ac_compile" | $SED \
279
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
280
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
281
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
282
-e 's:$: $lt_compiler_flag:'`
283
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
285
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
286
if (exit $ac_status) && test -s "$ac_outfile"; then
287
# The compiler can only warn and ignore the option if not recognized
288
- # So say no if there are warnings
289
- if test ! -s conftest.err; then
290
+ # So say no if there are warnings other than the usual output.
291
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
292
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
293
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
297
@@ -609,17 +675,23 @@
298
# ------------------------------------------------------------
299
# Check whether the given compiler option works
300
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
301
-[AC_CACHE_CHECK([$1], [$2],
302
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
303
+AC_CACHE_CHECK([$1], [$2],
305
save_LDFLAGS="$LDFLAGS"
306
LDFLAGS="$LDFLAGS $3"
307
- printf "$lt_simple_link_test_code" > conftest.$ac_ext
308
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
309
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
310
- # The compiler can only warn and ignore the option if not recognized
311
+ # The linker can only warn and ignore the option if not recognized
312
# So say no if there are warnings
313
if test -s conftest.err; then
314
# Append any errors to the config.log.
315
cat conftest.err 1>&AS_MESSAGE_LOG_FD
316
+ $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
317
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
318
+ if diff conftest.exp conftest.er2 >/dev/null; then
325
AC_MSG_CHECKING([the maximum length of command line arguments])
326
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
333
@@ -672,24 +744,77 @@
334
lt_cv_sys_max_cmd_len=8192;
338
- # If test is not a shell built-in, we'll probably end up computing a
339
- # maximum length that is only half of the actual maximum length, but
341
- while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
342
- = "XX$testring") >/dev/null 2>&1 &&
343
- new_result=`expr "X$testring" : ".*" 2>&1` &&
344
- lt_cv_sys_max_cmd_len=$new_result &&
345
- test $i != 17 # 1/2 MB should be enough
348
- testring=$testring$testring
351
- # Add a significant safety factor because C++ compilers can tack on massive
352
- # amounts of additional arguments before passing them to the linker.
353
- # It appears as though 1/2 is a usable value.
354
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
356
+ # On AmigaOS with pdksh, this test takes hours, literally.
357
+ # So we just punt and use a minimum line length of 8192.
358
+ lt_cv_sys_max_cmd_len=8192;
361
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
362
+ # This has been around since 386BSD, at least. Likely further.
363
+ if test -x /sbin/sysctl; then
364
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
365
+ elif test -x /usr/sbin/sysctl; then
366
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
368
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
370
+ # And add a safety zone
371
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
372
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
376
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
377
+ lt_cv_sys_max_cmd_len=196608
381
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
382
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
383
+ # nice to cause kernel panics so lets avoid the loop below.
384
+ # First set a reasonable default.
385
+ lt_cv_sys_max_cmd_len=16384
387
+ if test -x /sbin/sysconfig; then
388
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
389
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
394
+ lt_cv_sys_max_cmd_len=102400
396
+ sysv5* | sco5v6* | sysv4.2uw2*)
397
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
398
+ if test -n "$kargmax"; then
399
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
401
+ lt_cv_sys_max_cmd_len=32768
405
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
406
+ if test -n "$lt_cv_sys_max_cmd_len"; then
407
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
408
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
410
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
411
+ while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
412
+ = "XX$teststring") >/dev/null 2>&1 &&
413
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
414
+ lt_cv_sys_max_cmd_len=$new_result &&
415
+ test $i != 17 # 1/2 MB should be enough
418
+ teststring=$teststring$teststring
421
+ # Add a significant safety factor because C++ compilers can tack on massive
422
+ # amounts of additional arguments before passing them to the linker.
423
+ # It appears as though 1/2 is a usable value.
424
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
433
-# --------------------
434
+# ------------------
435
AC_DEFUN([_LT_AC_CHECK_DLFCN],
436
[AC_CHECK_HEADERS(dlfcn.h)dnl
437
])# _LT_AC_CHECK_DLFCN
440
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
441
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
442
-# ------------------------------------------------------------------
443
+# ---------------------------------------------------------------------
444
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
445
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
446
if test "$cross_compiling" = yes; then :
447
@@ -776,17 +901,19 @@
448
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
449
/* dlclose (self); */
457
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
458
- (./conftest; exit; ) 2>/dev/null
459
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
462
x$lt_dlno_uscore) $1 ;;
463
x$lt_dlneed_uscore) $2 ;;
464
- x$lt_unknown|x*) $3 ;;
465
+ x$lt_dlunknown|x*) $3 ;;
472
# AC_LIBTOOL_DLOPEN_SELF
473
-# -------------------
474
+# ----------------------
475
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
476
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
477
if test "x$enable_dlopen" != xyes; then
479
lt_cv_dlopen_self=yes
485
AC_CHECK_FUNC([shl_load],
486
[lt_cv_dlopen="shl_load"],
488
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
490
save_LDFLAGS="$LDFLAGS"
491
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
492
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
495
LIBS="$lt_cv_dlopen_libs $LIBS"
499
if test "x$lt_cv_dlopen_self" = xyes; then
500
- LDFLAGS="$LDFLAGS $link_static_flag"
501
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
502
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
503
lt_cv_dlopen_self_static, [dnl
504
_LT_AC_TRY_DLOPEN_SELF(
506
# ---------------------------------
507
# Check to see if options -c and -o are simultaneously supported by compiler
508
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
509
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
510
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
511
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
512
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
513
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
514
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
515
@@ -922,14 +1050,7 @@
519
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
521
- # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
522
- # that will create temporary files in the current directory regardless of
523
- # the output directory. Thus, making CWD read-only will cause this test
524
- # to fail, enabling locking or at least warning the user not to do parallel
527
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
529
lt_compiler_flag="-o out/conftest2.$ac_objext"
530
# Insert the option either (1) after the last *FLAGS variable, or
532
# Note that $ac_compile itself does not contain backslashes and begins
533
# with a dollar sign (not a hyphen), so the echo should work correctly.
534
lt_compile=`echo "$ac_compile" | $SED \
535
- -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
536
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
537
-e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
538
-e 's:$: $lt_compiler_flag:'`
539
(eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
540
@@ -949,13 +1070,18 @@
542
# The compiler can only warn and ignore the option if not recognized
543
# So say no if there are warnings
544
- if test ! -s out/conftest.err; then
545
+ $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
546
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
547
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
548
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
552
- $rm conftest* out/*
554
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
556
+ # SGI C++ compiler will create directory out/ii_files/ for
557
+ # template instantiation
558
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
559
+ $rm out/* && rmdir out
563
@@ -1014,8 +1140,8 @@
564
[AC_MSG_CHECKING([how to hardcode library paths into programs])
565
_LT_AC_TAGVAR(hardcode_action, $1)=
566
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
567
- test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
568
- test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
569
+ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
570
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
572
# We can hardcode non-existant directories.
573
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
574
@@ -1064,6 +1190,7 @@
576
if test -n "$STRIP" ; then
578
+ old_striplib="$STRIP -S"
582
@@ -1072,7 +1199,7 @@
589
])# AC_LIBTOOL_SYS_LIB_STRIP
591
@@ -1081,11 +1208,12 @@
592
# -----------------------------
593
# PORTME Fill in your ld.so characteristics
594
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
595
-[AC_MSG_CHECKING([dynamic linker characteristics])
596
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
597
+AC_MSG_CHECKING([dynamic linker characteristics])
599
libname_spec='lib$name'
606
@@ -1095,7 +1223,58 @@
608
dynamic_linker="$host_os ld.so"
609
sys_lib_dlsearch_path_spec="/lib /usr/lib"
610
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
612
+if test "$GCC" = yes; then
614
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
615
+ *) lt_awk_arg="/^libraries:/" ;;
617
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
618
+ if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
619
+ # if the path contains ";" then we assume it to be the separator
620
+ # otherwise default to the standard path separator (i.e. ":") - it is
621
+ # assumed that no part of a normal pathname contains ";" but that should
622
+ # okay in the real world where ";" in dirpaths is itself problematic.
623
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
625
+ lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
627
+ # Ok, now we have the path, separated by spaces, we can step through it
628
+ # and add multilib dir if necessary.
629
+ lt_tmp_lt_search_path_spec=
630
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
631
+ for lt_sys_path in $lt_search_path_spec; do
632
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
633
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
635
+ test -d "$lt_sys_path" && \
636
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
639
+ lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
640
+BEGIN {RS=" "; FS="/|\n";} {
643
+ for (lt_i = NF; lt_i > 0; lt_i--) {
644
+ if ($lt_i != "" && $lt_i != ".") {
645
+ if ($lt_i == "..") {
648
+ if (lt_count == 0) {
649
+ lt_foo="/" $lt_i lt_foo;
656
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
657
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
659
+ sys_lib_search_path_spec=`echo $lt_search_path_spec`
661
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
663
need_lib_prefix=unknown
664
hardcode_into_libs=no
666
@@ -1160,7 +1339,7 @@
668
library_names_spec='$libname.ixlibrary $libname.a'
669
# Create ${libname}_ixlibrary.a entries in /sys/libs.
670
- 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'
671
+ 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'
675
@@ -1169,7 +1348,7 @@
676
shlibpath_var=LIBRARY_PATH
683
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
684
@@ -1185,7 +1364,7 @@
686
cygwin* | mingw* | pw32*)
693
@@ -1197,7 +1376,8 @@
694
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
695
dldir=$destdir/`dirname \$dlpath`~
696
test -d \$dldir || mkdir -p \$dldir~
697
- $install_prog $dir/$dlname \$dldir/$dlname'
698
+ $install_prog $dir/$dlname \$dldir/$dlname~
699
+ chmod a+x \$dldir/$dlname'
700
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
703
@@ -1227,7 +1407,7 @@
706
# pw32 DLLs use 'pw' prefix rather than 'lib'
707
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
708
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
712
@@ -1250,13 +1430,9 @@
713
soname_spec='${libname}${release}${major}$shared_ext'
714
shlibpath_overrides_runpath=yes
715
shlibpath_var=DYLD_LIBRARY_PATH
716
- shrext='$(test .$module = .yes && echo .so || echo .dylib)'
717
- # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
718
- if test "$GCC" = yes; then
719
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
721
- sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
723
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
725
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
726
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
729
@@ -1273,20 +1449,17 @@
737
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
738
- soname_spec='${libname}${release}${shared_ext}$major'
739
- shlibpath_var=LD_LIBRARY_PATH
740
- shlibpath_overrides_runpath=no
741
- hardcode_into_libs=yes
742
- dynamic_linker='GNU ld.so'
746
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
747
+freebsd* | dragonfly*)
748
+ # DragonFly does not have aout. When/if they implement a new
749
+ # versioning mechanism, adjust this.
750
+ if test -x /usr/bin/objformat; then
751
+ objformat=`/usr/bin/objformat`
754
+ freebsd[[123]]*) objformat=aout ;;
755
+ *) objformat=elf ;;
758
version_type=freebsd-$objformat
759
case $version_type in
761
@@ -1304,14 +1477,19 @@
763
shlibpath_overrides_runpath=yes
765
- freebsd3.[01]* | freebsdelf3.[01]*)
766
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
767
shlibpath_overrides_runpath=yes
768
hardcode_into_libs=yes
771
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
772
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
773
shlibpath_overrides_runpath=no
774
hardcode_into_libs=yes
776
+ *) # from 4.6 on, and DragonFly
777
+ shlibpath_overrides_runpath=yes
778
+ hardcode_into_libs=yes
783
@@ -1331,9 +1509,9 @@
787
- case "$host_cpu" in
792
hardcode_into_libs=yes
793
dynamic_linker="$host_os dld.so"
794
shlibpath_var=LD_LIBRARY_PATH
795
@@ -1348,7 +1526,7 @@
796
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
801
hardcode_into_libs=yes
802
dynamic_linker="$host_os dld.sl"
803
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
804
@@ -1359,7 +1537,7 @@
805
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
810
dynamic_linker="$host_os dld.sl"
811
shlibpath_var=SHLIB_PATH
812
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
813
@@ -1371,6 +1549,18 @@
814
postinstall_cmds='chmod 555 $lib'
821
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
822
+ soname_spec='${libname}${release}${shared_ext}$major'
823
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
824
+ shlibpath_var=LD_LIBRARY_PATH
825
+ shlibpath_overrides_runpath=no
826
+ hardcode_into_libs=yes
829
irix5* | irix6* | nonstopux*)
831
nonstopux*) version_type=nonstopux ;;
832
@@ -1414,29 +1604,26 @@
835
# This must be Linux ELF.
837
+linux* | k*bsd*-gnu)
841
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
842
soname_spec='${libname}${release}${shared_ext}$major'
843
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
845
- if test "x$LINUX_64_MODE" = x64; then
846
- # Some platforms are per default 64-bit, so there's no /lib64
847
- if test -d /lib64 -a ! -h /lib64; then
851
shlibpath_var=LD_LIBRARY_PATH
852
shlibpath_overrides_runpath=no
853
- sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
854
- sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
855
# This implies no fast_install, which is unacceptable.
856
# Some rework will be needed to allow for fast_install
857
# before this can be enabled.
858
hardcode_into_libs=yes
860
+ # Append ld.so.conf contents to the search path
861
+ if test -f /etc/ld.so.conf; then
862
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
863
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
866
# We used to test for /lib/ld.so.1 and disable shared libraries on
867
# powerpc, because MkLinux only supported shared libraries with the
868
# GNU dynamic linker. Since this was broken with cross compilers,
869
@@ -1446,6 +1633,18 @@
870
dynamic_linker='GNU/Linux ld.so'
877
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
878
+ soname_spec='${libname}${release}${shared_ext}$major'
879
+ shlibpath_var=LD_LIBRARY_PATH
880
+ shlibpath_overrides_runpath=no
881
+ hardcode_into_libs=yes
882
+ dynamic_linker='NetBSD ld.elf_so'
888
@@ -1455,7 +1654,7 @@
889
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
890
dynamic_linker='NetBSD (a.out) ld.so'
892
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
893
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
894
soname_spec='${libname}${release}${shared_ext}$major'
895
dynamic_linker='NetBSD ld.elf_so'
897
@@ -1483,8 +1682,13 @@
901
+ sys_lib_dlsearch_path_spec="/usr/lib"
904
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
906
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
907
+ *) need_version=no ;;
909
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
910
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
911
shlibpath_var=LD_LIBRARY_PATH
912
@@ -1504,7 +1708,7 @@
919
library_names_spec='$libname${shared_ext} $libname.a'
920
dynamic_linker='OS/2 ld.exe'
921
@@ -1522,11 +1726,8 @@
922
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
927
- soname_spec='${libname}${release}${shared_ext}$major'
928
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
929
- shlibpath_var=LD_LIBRARY_PATH
935
@@ -1554,7 +1755,7 @@
939
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
942
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
943
soname_spec='${libname}${release}${shared_ext}$major'
944
@@ -1587,6 +1788,29 @@
948
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
949
+ version_type=freebsd-elf
952
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
953
+ soname_spec='${libname}${release}${shared_ext}$major'
954
+ shlibpath_var=LD_LIBRARY_PATH
955
+ hardcode_into_libs=yes
956
+ if test "$with_gnu_ld" = yes; then
957
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
958
+ shlibpath_overrides_runpath=no
960
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
961
+ shlibpath_overrides_runpath=yes
964
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
968
+ sys_lib_dlsearch_path_spec='/usr/lib'
973
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
974
@@ -1600,13 +1824,19 @@
976
AC_MSG_RESULT([$dynamic_linker])
977
test "$dynamic_linker" = no && can_build_shared=no
979
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
980
+if test "$GCC" = yes; then
981
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
983
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
988
AC_DEFUN([_LT_AC_TAGCONFIG],
989
-[AC_ARG_WITH([tags],
990
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
992
[AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
993
[include additional configurations @<:@automatic@:>@])],
994
[tagnames="$withval"])
995
@@ -1624,6 +1854,9 @@
996
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
999
+ if test -z "$LTCFLAGS"; then
1000
+ eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1003
# Extract list of available tagged configurations in $ofile.
1004
# Note that this assumes the entire list is on one line.
1005
@@ -1650,7 +1883,9 @@
1009
- if test -n "$CXX" && test "X$CXX" != "Xno"; then
1010
+ if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1011
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1012
+ (test "X$CXX" != "Xg++"))) ; then
1013
AC_LIBTOOL_LANG_CXX_CONFIG
1016
@@ -1712,7 +1947,7 @@
1018
# AC_LIBTOOL_WIN32_DLL
1019
# --------------------
1020
-# declare package support for building win32 dll's
1021
+# declare package support for building win32 DLLs
1022
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1023
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1024
])# AC_LIBTOOL_WIN32_DLL
1025
@@ -1750,7 +1985,7 @@
1029
-#- set the default shared flag to --disable-shared
1030
+# set the default shared flag to --disable-shared
1031
AC_DEFUN([AC_DISABLE_SHARED],
1032
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1033
AC_ENABLE_SHARED(no)
1034
@@ -1862,7 +2097,7 @@
1036
# AC_PATH_TOOL_PREFIX
1037
# -------------------
1038
-# find a file program which can recognise shared library
1039
+# find a file program which can recognize shared library
1040
AC_DEFUN([AC_PATH_TOOL_PREFIX],
1041
[AC_REQUIRE([AC_PROG_EGREP])dnl
1042
AC_MSG_CHECKING([for $1])
1043
@@ -1886,7 +2121,7 @@
1044
if test -n "$file_magic_test_file"; then
1045
case $deplibs_check_method in
1047
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1048
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1049
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1050
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1051
$EGREP "$file_magic_regex" > /dev/null; then
1052
@@ -1925,7 +2160,7 @@
1056
-# find a file program which can recognise a shared library
1057
+# find a file program which can recognize a shared library
1058
AC_DEFUN([AC_PATH_MAGIC],
1059
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1060
if test -z "$lt_cv_path_MAGIC_CMD"; then
1061
@@ -1996,7 +2231,7 @@
1062
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1063
lt_cv_path_LD="$ac_dir/$ac_prog"
1064
# Check to see if the program is GNU ld. I'd rather use --version,
1065
- # but apparently some GNU ld's only accept -v.
1066
+ # but apparently some variants of GNU ld only accept -v.
1067
# Break only if it was the GNU/non-GNU ld that we prefer.
1068
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
1069
*GNU* | *'with BFD'*)
1070
@@ -2028,7 +2263,7 @@
1071
AC_DEFUN([AC_PROG_LD_GNU],
1072
[AC_REQUIRE([AC_PROG_EGREP])dnl
1073
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1074
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1075
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
1076
case `$LD -v 2>&1 </dev/null` in
1077
*GNU* | *'with BFD'*)
1078
lt_cv_prog_gnu_ld=yes
1079
@@ -2055,6 +2290,15 @@
1080
*) reload_flag=" $reload_flag" ;;
1082
reload_cmds='$LD$reload_flag -o $output$reload_objs'
1085
+ if test "$GCC" = yes; then
1086
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
1088
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
1092
])# AC_PROG_LD_RELOAD_FLAG
1095
@@ -2063,7 +2307,7 @@
1096
# how to check for library dependencies
1097
# -- PORTME fill in with the dynamic library characteristics
1098
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1099
-[AC_CACHE_CHECK([how to recognise dependent libraries],
1100
+[AC_CACHE_CHECK([how to recognize dependent libraries],
1101
lt_cv_deplibs_check_method,
1102
[lt_cv_file_magic_cmd='$MAGIC_CMD'
1103
lt_cv_file_magic_test_file=
1104
@@ -2088,44 +2332,42 @@
1105
lt_cv_deplibs_check_method=pass_all
1110
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
1111
lt_cv_file_magic_cmd='/usr/bin/file -L'
1112
lt_cv_file_magic_test_file=/shlib/libc.so
1116
- lt_cv_deplibs_check_method=pass_all
1117
+ # func_win32_libid is a shell function defined in ltmain.sh
1118
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1119
+ lt_cv_file_magic_cmd='func_win32_libid'
1124
- # win32_libid is a shell function defined in ltmain.sh
1125
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1126
- lt_cv_file_magic_cmd='win32_libid'
1127
+ # Base MSYS/MinGW do not provide the 'file' command needed by
1128
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
1129
+ # unless we find 'file', for example because we are cross-compiling.
1130
+ if ( file / ) >/dev/null 2>&1; then
1131
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
1132
+ lt_cv_file_magic_cmd='func_win32_libid'
1134
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1135
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
1139
darwin* | rhapsody*)
1140
- # this will be overwritten by pass_all, but leave it in just in case
1141
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1142
- lt_cv_file_magic_cmd='/usr/bin/file -L'
1143
- case "$host_os" in
1144
- rhapsody* | darwin1.[[012]])
1145
- lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
1147
- *) # Darwin 1.3 on
1148
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1151
lt_cv_deplibs_check_method=pass_all
1154
-freebsd* | kfreebsd*-gnu)
1155
+freebsd* | dragonfly*)
1156
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1159
# Not sure whether the presence of OpenBSD here was a mistake.
1160
# Let's accept both of them until this is cleared up.
1161
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
1162
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
1163
lt_cv_file_magic_cmd=/usr/bin/file
1164
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1166
@@ -2141,7 +2383,7 @@
1168
hpux10.20* | hpux11*)
1169
lt_cv_file_magic_cmd=/usr/bin/file
1170
- case "$host_cpu" in
1173
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
1174
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1175
@@ -2157,43 +2399,27 @@
1180
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
1181
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
1184
irix5* | irix6* | nonstopux*)
1186
- irix5* | nonstopux*)
1187
- # this will be overridden with pass_all, but let us keep it just in case
1188
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1192
- *-32|*"-32 ") libmagic=32-bit;;
1193
- *-n32|*"-n32 ") libmagic=N32;;
1194
- *-64|*"-64 ") libmagic=64-bit;;
1195
- *) libmagic=never-match;;
1197
- # this will be overridden with pass_all, but let us keep it just in case
1198
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
1201
+ *-32|*"-32 ") libmagic=32-bit;;
1202
+ *-n32|*"-n32 ") libmagic=N32;;
1203
+ *-64|*"-64 ") libmagic=64-bit;;
1204
+ *) libmagic=never-match;;
1206
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1207
lt_cv_deplibs_check_method=pass_all
1210
# This must be Linux ELF.
1213
- alpha* | hppa* | i*86 | ia64* | m68* | mips* | powerpc* | sparc* | s390* | sh* | x86_64* )
1214
- lt_cv_deplibs_check_method=pass_all ;;
1215
- # the debian people say, arm and glibc 2.3.1 works for them with pass_all
1217
- lt_cv_deplibs_check_method=pass_all ;;
1219
- # glibc up to 2.1.1 does not perform some relocations on ARM
1220
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
1222
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1223
+linux* | k*bsd*-gnu)
1224
+ lt_cv_deplibs_check_method=pass_all
1228
+netbsd* | netbsdelf*-gnu)
1229
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1230
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
1232
@@ -2212,32 +2438,26 @@
1236
- lt_cv_file_magic_cmd=/usr/bin/file
1237
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1238
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1239
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
1240
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
1242
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
1243
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
1247
osf3* | osf4* | osf5*)
1248
- # this will be overridden with pass_all, but let us keep it just in case
1249
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1250
- lt_cv_file_magic_test_file=/shlib/libc.so
1251
lt_cv_deplibs_check_method=pass_all
1256
lt_cv_deplibs_check_method=pass_all
1260
lt_cv_deplibs_check_method=pass_all
1261
- lt_cv_file_magic_test_file=/lib/libc.so
1264
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1266
case $host_vendor in
1268
lt_cv_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]]'
1269
@@ -2258,10 +2478,13 @@
1271
lt_cv_deplibs_check_method=pass_all
1274
+ lt_cv_deplibs_check_method=pass_all
1279
-sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
1280
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1281
lt_cv_deplibs_check_method=pass_all
1284
@@ -2281,36 +2504,43 @@
1285
# Let the user override the test.
1288
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1289
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1290
- IFS="$lt_save_ifs"
1291
- test -z "$ac_dir" && ac_dir=.
1292
- tmp_nm="$ac_dir/${ac_tool_prefix}nm"
1293
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
1294
- # Check to see if the nm accepts a BSD-compat flag.
1295
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1296
- # nm: unknown option "B" ignored
1297
- # Tru64's nm complains that /dev/null is an invalid object file
1298
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
1299
- */dev/null* | *'Invalid file or object type'*)
1300
- lt_cv_path_NM="$tmp_nm -B"
1304
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
1306
- lt_cv_path_NM="$tmp_nm -p"
1307
+ lt_nm_to_check="${ac_tool_prefix}nm"
1308
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
1309
+ lt_nm_to_check="$lt_nm_to_check nm"
1311
+ for lt_tmp_nm in $lt_nm_to_check; do
1312
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1313
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
1314
+ IFS="$lt_save_ifs"
1315
+ test -z "$ac_dir" && ac_dir=.
1316
+ tmp_nm="$ac_dir/$lt_tmp_nm"
1317
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
1318
+ # Check to see if the nm accepts a BSD-compat flag.
1319
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1320
+ # nm: unknown option "B" ignored
1321
+ # Tru64's nm complains that /dev/null is an invalid object file
1322
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
1323
+ */dev/null* | *'Invalid file or object type'*)
1324
+ lt_cv_path_NM="$tmp_nm -B"
1328
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1329
- continue # so that we can try to find one that supports BSD flags
1330
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
1332
+ lt_cv_path_NM="$tmp_nm -p"
1336
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1337
+ continue # so that we can try to find one that supports BSD flags
1346
+ IFS="$lt_save_ifs"
1348
- IFS="$lt_save_ifs"
1349
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1352
@@ -2342,13 +2572,13 @@
1353
# -----------------------------------
1354
# sets LIBLTDL to the link flags for the libltdl convenience library and
1355
# LTDLINCL to the include flags for the libltdl header and adds
1356
-# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
1357
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
1358
-# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
1359
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
1360
-# '${top_srcdir}/' (note the single quotes!). If your package is not
1361
-# flat and you're not using automake, define top_builddir and
1362
-# top_srcdir appropriately in the Makefiles.
1363
+# --enable-ltdl-convenience to the configure arguments. Note that
1364
+# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
1365
+# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
1366
+# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
1367
+# (note the single quotes!). If your package is not flat and you're not
1368
+# using automake, define top_builddir and top_srcdir appropriately in
1370
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
1371
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1372
case $enable_ltdl_convenience in
1373
@@ -2367,13 +2597,13 @@
1374
# -----------------------------------
1375
# sets LIBLTDL to the link flags for the libltdl installable library and
1376
# LTDLINCL to the include flags for the libltdl header and adds
1377
-# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
1378
-# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
1379
-# DIRECTORY is not provided and an installed libltdl is not found, it is
1380
-# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
1381
-# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
1382
-# quotes!). If your package is not flat and you're not using automake,
1383
-# define top_builddir and top_srcdir appropriately in the Makefiles.
1384
+# --enable-ltdl-install to the configure arguments. Note that
1385
+# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
1386
+# and an installed libltdl is not found, it is assumed to be `libltdl'.
1387
+# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
1388
+# '${top_srcdir}/' (note the single quotes!). If your package is not
1389
+# flat and you're not using automake, define top_builddir and top_srcdir
1390
+# appropriately in the Makefiles.
1391
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
1392
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
1393
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1394
@@ -2411,10 +2641,21 @@
1396
AC_DEFUN([_LT_AC_LANG_CXX],
1397
[AC_REQUIRE([AC_PROG_CXX])
1398
-AC_REQUIRE([AC_PROG_CXXCPP])
1399
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
1400
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
1403
+# _LT_AC_PROG_CXXCPP
1404
+# ------------------
1405
+AC_DEFUN([_LT_AC_PROG_CXXCPP],
1407
+AC_REQUIRE([AC_PROG_CXX])
1408
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1409
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1410
+ (test "X$CXX" != "Xg++"))) ; then
1413
+])# _LT_AC_PROG_CXXCPP
1417
@@ -2454,7 +2695,7 @@
1423
# enable support for Windows resource files
1424
AC_DEFUN([AC_LIBTOOL_RC],
1425
[AC_REQUIRE([LT_AC_PROG_RC])
1426
@@ -2480,43 +2721,16 @@
1427
_LT_AC_TAGVAR(objext, $1)=$objext
1429
# Code to be used in simple compile tests
1430
-lt_simple_compile_test_code="int some_variable = 0;\n"
1431
+lt_simple_compile_test_code="int some_variable = 0;"
1433
# Code to be used in simple link tests
1434
-lt_simple_link_test_code='int main(){return(0);}\n'
1435
+lt_simple_link_test_code='int main(){return(0);}'
1440
-# Check for any special shared library compilation flags.
1442
-_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
1443
-if test "$GCC" = no; then
1446
- _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
1450
-if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
1451
- AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
1452
- if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
1454
- AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
1455
- _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
1461
-# Check to make sure the static flag actually works.
1463
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
1464
- _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
1465
- $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
1467
- [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
1469
+# save warnings/boilerplate of simple test code
1470
+_LT_COMPILER_BOILERPLATE
1471
+_LT_LINKER_BOILERPLATE
1474
## There is no encapsulation within the following macros, do not change
1475
@@ -2530,9 +2744,9 @@
1476
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
1477
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
1478
AC_LIBTOOL_SYS_LIB_STRIP
1479
-AC_LIBTOOL_DLOPEN_SELF($1)
1480
+AC_LIBTOOL_DLOPEN_SELF
1482
-# Report which librarie types wil actually be built
1483
+# Report which library types will actually be built
1484
AC_MSG_CHECKING([if libtool supports shared libraries])
1485
AC_MSG_RESULT([$can_build_shared])
1487
@@ -2541,7 +2755,7 @@
1489
# On AIX, shared libraries and static libraries use the same namespace, and
1490
# are all built from PIC.
1494
test "$enable_shared" = yes && enable_static=no
1495
if test -n "$RANLIB"; then
1496
@@ -2550,48 +2764,11 @@
1502
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
1503
test "$enable_shared" = yes && enable_static=no
1506
- darwin* | rhapsody*)
1507
- if test "$GCC" = yes; then
1508
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
1509
- case "$host_os" in
1510
- rhapsody* | darwin1.[[012]])
1511
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
1513
- *) # Darwin 1.3 on
1514
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
1515
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
1517
- case ${MACOSX_DEPLOYMENT_TARGET} in
1519
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
1522
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
1528
- output_verbose_link_cmd='echo'
1529
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
1530
- _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
1531
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
1532
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1533
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1534
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
1535
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
1536
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1537
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
1538
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
1540
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
1545
AC_MSG_RESULT([$enable_shared])
1547
@@ -2616,7 +2793,7 @@
1548
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
1550
AC_REQUIRE([AC_PROG_CXX])
1551
-AC_REQUIRE([AC_PROG_CXXCPP])
1552
+AC_REQUIRE([_LT_AC_PROG_CXXCPP])
1554
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
1555
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
1556
@@ -2628,6 +2805,7 @@
1557
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
1558
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
1559
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
1560
+_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1561
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
1562
_LT_AC_TAGVAR(module_cmds, $1)=
1563
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
1564
@@ -2645,21 +2823,25 @@
1565
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
1567
# Source file extension for C++ test sources.
1571
# Object file extension for compiled C++ test sources.
1573
_LT_AC_TAGVAR(objext, $1)=$objext
1575
# Code to be used in simple compile tests
1576
-lt_simple_compile_test_code="int some_variable = 0;\n"
1577
+lt_simple_compile_test_code="int some_variable = 0;"
1579
# Code to be used in simple link tests
1580
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
1581
+lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
1583
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
1586
+# save warnings/boilerplate of simple test code
1587
+_LT_COMPILER_BOILERPLATE
1588
+_LT_LINKER_BOILERPLATE
1590
# Allow CC to be a program name with arguments.
1593
@@ -2670,18 +2852,18 @@
1594
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
1595
lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
1597
- unset lt_cv_prog_gnu_ld
1598
+ $as_unset lt_cv_prog_gnu_ld
1600
if test -n "${lt_cv_path_LDCXX+set}"; then
1601
lt_cv_path_LD=$lt_cv_path_LDCXX
1603
- unset lt_cv_path_LD
1604
+ $as_unset lt_cv_path_LD
1606
test -z "${LDCXX+set}" || LD=$LDCXX
1609
_LT_AC_TAGVAR(compiler, $1)=$CC
1610
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
1611
+_LT_CC_BASENAME([$compiler])
1613
# We don't want -fno-exception wen compiling C++ code, so set the
1614
# no_builtin_flag separately
1615
@@ -2699,8 +2881,8 @@
1616
# Check if GNU C++ uses GNU ld as the underlying linker, since the
1617
# archiving commands below assume that GNU ld is being used.
1618
if test "$with_gnu_ld" = yes; then
1619
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
1620
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1621
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
1622
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1624
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
1625
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
1626
@@ -2726,7 +2908,7 @@
1627
# linker, instead of GNU ld. If possible, this setting should
1628
# overridden to take advantage of the native linker features on
1629
# the platform it is being used on.
1630
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
1631
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
1634
# Commands to make compiler produce verbose output that lists
1635
@@ -2756,13 +2938,28 @@
1636
exp_sym_flag='-Bexport'
1639
- # KDE requires run time linking. Make it the default.
1640
- aix_use_runtimelinking=yes
1641
- exp_sym_flag='-bexport'
1642
- no_entry_flag='-bnoentry'
1644
+ aix_use_runtimelinking=no
1646
- # When large executables or shared objects are built, AIX ld can
1647
+ # Test if we are trying to use run time linking or normal
1648
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1649
+ # need to do runtime linking.
1650
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1651
+ for ld_flag in $LDFLAGS; do
1654
+ aix_use_runtimelinking=yes
1662
+ exp_sym_flag='-bexport'
1663
+ no_entry_flag='-bnoentry'
1666
+ # When large executables or shared objects are built, AIX ld can
1667
# have problems creating the table of contents. If linking a library
1668
# or program results in "error TOC overflow" add -mminimal-toc to
1669
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1670
@@ -2774,7 +2971,7 @@
1671
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
1673
if test "$GXX" = yes; then
1674
- case $host_os in aix4.[012]|aix4.[012].*)
1675
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
1676
# We only want to do this on AIX 4.2 and lower, the check
1677
# below for broken collect2 doesn't work under 4.3+
1678
collect2name=`${CC} -print-prog-name=collect2`
1679
@@ -2782,7 +2979,7 @@
1680
strings "$collect2name" | grep resolve_lib_name >/dev/null
1682
# We have reworked collect2
1683
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
1686
# We have old collect2
1687
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
1688
@@ -2793,8 +2990,12 @@
1689
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1690
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
1694
shared_flag='-shared'
1695
+ if test "$aix_use_runtimelinking" = yes; then
1696
+ shared_flag="$shared_flag "'${wl}-G'
1700
if test "$host_cpu" = ia64; then
1701
@@ -2803,15 +3004,16 @@
1704
if test "$aix_use_runtimelinking" = yes; then
1705
- shared_flag='-qmkshrobj ${wl}-G'
1706
+ shared_flag='${wl}-G'
1708
- shared_flag='-qmkshrobj'
1709
+ shared_flag='${wl}-bM:SRE'
1714
- # Let the compiler handle the export list.
1715
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
1716
+ # It seems that -bexpall does not export symbols beginning with
1717
+ # underscore (_), so it is better to generate a list of symbols to export.
1718
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
1719
if test "$aix_use_runtimelinking" = yes; then
1720
# Warning - without using the other runtime loading flags (-brtl),
1721
# -berok will link without error, but may produce a broken library.
1722
@@ -2820,13 +3022,12 @@
1723
_LT_AC_SYS_LIBPATH_AIX
1724
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
1726
- _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
1727
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1728
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1730
if test "$host_cpu" = ia64; then
1731
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
1732
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
1733
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1734
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
1736
# Determine the default libpath from the value encoded in an empty executable.
1737
_LT_AC_SYS_LIBPATH_AIX
1738
@@ -2835,16 +3036,26 @@
1739
# -berok will link without error, but may produce a broken library.
1740
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
1741
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
1742
- # -bexpall does not export symbols beginning with underscore (_)
1743
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
1744
# Exported symbols can be pulled into shared objects from archives
1745
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
1746
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
1747
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
1748
- # This is similar to how AIX traditionally builds it's shared libraries.
1749
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
1750
+ # This is similar to how AIX traditionally builds its shared libraries.
1751
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
1757
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1758
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
1759
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1760
+ # support --undefined. This deserves some investigation. FIXME
1761
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1763
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
1768
case $cc_basename in
1770
@@ -2858,12 +3069,12 @@
1771
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
1772
# as there is no search path for DLLs.
1773
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1774
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
1775
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
1776
_LT_AC_TAGVAR(always_export_symbols, $1)=no
1777
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1779
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
1780
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
1781
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1782
# If the export-symbols file already is a .def file (1st line
1783
# is EXPORTS), use it as is; otherwise, prepend...
1784
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
1785
@@ -2872,70 +3083,81 @@
1786
echo EXPORTS > $output_objdir/$soname.def;
1787
cat $export_symbols >> $output_objdir/$soname.def;
1789
- $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
1790
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1792
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1795
+ darwin* | rhapsody*)
1797
+ rhapsody* | darwin1.[[012]])
1798
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
1800
+ *) # Darwin 1.3 on
1801
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
1802
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
1804
+ case ${MACOSX_DEPLOYMENT_TARGET} in
1806
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
1809
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
1815
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
1816
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
1817
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
1818
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1819
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
1820
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
1822
- darwin* | rhapsody*)
1823
- if test "$GXX" = yes; then
1824
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
1825
- case "$host_os" in
1826
- rhapsody* | darwin1.[[012]])
1827
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
1829
- *) # Darwin 1.3 on
1830
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
1831
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
1832
+ if test "$GXX" = yes ; then
1833
+ lt_int_apple_cc_single_mod=no
1834
+ output_verbose_link_cmd='echo'
1835
+ if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
1836
+ lt_int_apple_cc_single_mod=yes
1838
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
1839
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
1841
- case ${MACOSX_DEPLOYMENT_TARGET} in
1843
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
1846
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
1849
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
1851
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
1852
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
1853
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
1854
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1856
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1858
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1860
+ case $cc_basename in
1862
+ output_verbose_link_cmd='echo'
1863
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
1864
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
1865
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
1866
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1867
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1870
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
1876
- lt_int_apple_cc_single_mod=no
1877
- output_verbose_link_cmd='echo'
1878
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
1879
- lt_int_apple_cc_single_mod=yes
1881
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
1882
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
1884
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
1886
- _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
1888
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
1889
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
1890
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1892
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1894
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
1895
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
1896
- _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
1897
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1898
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
1899
- _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
1901
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
1907
case $cc_basename in
1910
# FIXME: insert proper C++ library support
1911
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1915
# Green Hills C++ Compiler
1916
# FIXME: insert proper C++ library support
1917
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1918
@@ -2946,14 +3168,14 @@
1924
# C++ shared libraries reported to be fairly broken before switch to ELF
1925
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1928
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
1930
- freebsd* | kfreebsd*-gnu)
1931
+ freebsd* | dragonfly*)
1932
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
1934
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
1935
@@ -2970,12 +3192,12 @@
1936
# location of the library.
1938
case $cc_basename in
1941
# FIXME: insert proper C++ library support
1942
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1945
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1947
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1948
# Commands to make compiler produce verbose output that lists
1949
# what "hidden" libraries, object files and flags are used when
1950
# linking a shared library.
1951
@@ -2984,11 +3206,11 @@
1952
# explicitly linking system object files so we need to strip them
1953
# from the output so that they don't get included in the library
1955
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
1956
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
1959
if test "$GXX" = yes; then
1960
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1961
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
1963
# FIXME: insert proper C++ library support
1964
_LT_AC_TAGVAR(ld_shlibs, $1)=no
1965
@@ -2998,33 +3220,20 @@
1968
if test $with_gnu_ld = no; then
1969
- case "$host_cpu" in
1971
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
1972
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
1973
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
1976
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
1978
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
1979
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
1982
+ hppa*64*|ia64*) ;;
1984
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
1985
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
1986
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
1990
- case "$host_cpu" in
1992
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
1993
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
1998
_LT_AC_TAGVAR(hardcode_direct, $1)=no
1999
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2000
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2001
- # but as the default
2002
- # location of the library.
2005
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2006
@@ -3035,17 +3244,20 @@
2009
case $cc_basename in
2012
# FIXME: insert proper C++ library support
2013
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2016
- case "$host_cpu" in
2018
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2022
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2025
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2028
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2029
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2032
# Commands to make compiler produce verbose output that lists
2033
@@ -3061,12 +3273,15 @@
2035
if test "$GXX" = yes; then
2036
if test $with_gnu_ld = no; then
2037
- case "$host_cpu" in
2039
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2042
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2045
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2048
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2049
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2053
@@ -3077,11 +3292,25 @@
2058
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
2059
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2060
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2061
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2062
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
2063
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
2064
+ # default) and relocated if they conflict, which is a slow very memory
2065
+ # consuming and fragmenting process. To avoid this, we pick a random,
2066
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
2067
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
2068
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
2069
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
2072
case $cc_basename in
2076
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2077
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2079
# Archives containing C++ object files must be created using
2080
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
2081
@@ -3092,9 +3321,9 @@
2083
if test "$GXX" = yes; then
2084
if test "$with_gnu_ld" = no; then
2085
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2086
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2088
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
2089
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
2092
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2093
@@ -3103,16 +3332,16 @@
2094
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2095
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2098
+ linux* | k*bsd*-gnu)
2099
case $cc_basename in
2102
# Kuck and Associates, Inc. (KAI) C++ Compiler
2104
# KCC will only create a shared library if the output file
2105
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2106
# to its proper name (with version) after linking.
2107
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
2108
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2109
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2110
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2111
# Commands to make compiler produce verbose output that lists
2112
# what "hidden" libraries, object files and flags are used when
2113
# linking a shared library.
2114
@@ -3130,20 +3359,44 @@
2115
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2116
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2122
+ # version 8.0 and above of icpc choke on multiply defined symbols
2123
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
2124
+ # earlier do not add the objects themselves.
2125
+ case `$CC -V 2>&1` in
2127
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2128
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2130
+ *) # Version 8.0 or newer
2133
+ ia64*) tmp_idyn=' -i_dynamic';;
2135
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2136
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2139
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2140
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
2141
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2142
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2143
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2144
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
2148
+ # Portland Group C++ compiler
2149
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
2150
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
2152
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2153
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2154
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
2158
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
2159
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
2160
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2161
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
2163
runpath_var=LD_RUN_PATH
2164
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2165
@@ -3159,6 +3412,29 @@
2167
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2170
+ case `$CC -V 2>&1 | sed 5q` in
2173
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2174
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2175
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
2176
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2177
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
2179
+ # Not sure whether something based on
2180
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
2181
+ # would be better.
2182
+ output_verbose_link_cmd='echo'
2184
+ # Archives containing C++ object files must be created using
2185
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
2186
+ # necessary to make sure instantiated templates are included
2188
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
2195
@@ -3171,7 +3447,7 @@
2198
case $cc_basename in
2201
# FIXME: insert proper C++ library support
2202
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2204
@@ -3181,7 +3457,7 @@
2209
+ netbsd* | netbsdelf*-gnu)
2210
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2211
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
2213
@@ -3192,15 +3468,35 @@
2214
# Workaround some broken pre-1.5 toolchains
2215
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
2218
+ # C++ shared libraries are fairly broken
2219
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
2222
+ if test -f /usr/libexec/ld.so; then
2223
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2224
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2225
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2226
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2227
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2228
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
2229
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2230
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2232
+ output_verbose_link_cmd='echo'
2234
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
2238
case $cc_basename in
2241
# Kuck and Associates, Inc. (KAI) C++ Compiler
2243
# KCC will only create a shared library if the output file
2244
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2245
# to its proper name (with version) after linking.
2246
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
2247
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2249
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2250
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2251
@@ -3210,14 +3506,14 @@
2252
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2257
# Rational C++ 2.4.1
2258
# FIXME: insert proper C++ library support
2259
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2263
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2264
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2265
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2267
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2268
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2269
@@ -3235,7 +3531,7 @@
2271
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2272
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2273
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2274
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2276
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2277
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2278
@@ -3254,13 +3550,13 @@
2281
case $cc_basename in
2284
# Kuck and Associates, Inc. (KAI) C++ Compiler
2286
# KCC will only create a shared library if the output file
2287
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2288
# to its proper name (with version) after linking.
2289
- _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
2290
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2292
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2293
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2294
@@ -3269,17 +3565,17 @@
2295
# the KAI C++ compiler.
2296
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
2300
# Rational C++ 2.4.1
2301
# FIXME: insert proper C++ library support
2302
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2306
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2307
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
2308
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2309
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
2310
echo "-hidden">> $lib.exp~
2311
- $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
2312
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
2315
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2316
@@ -3298,7 +3594,7 @@
2318
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2319
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2320
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
2321
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2323
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2324
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2325
@@ -3319,27 +3615,14 @@
2326
# FIXME: insert proper C++ library support
2327
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2330
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2331
- case $cc_basename in
2333
- # FIXME: insert proper C++ library support
2334
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
2337
- # FIXME: insert proper C++ library support
2338
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
2343
case $cc_basename in
2347
# FIXME: insert proper C++ library support
2348
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2353
# FIXME: insert proper C++ library support
2354
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2355
@@ -3352,36 +3635,28 @@
2358
case $cc_basename in
2361
# Sun C++ 4.2, 5.x and Centerline C++
2362
+ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
2363
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2364
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
2365
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2366
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2367
- $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2368
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
2370
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2371
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2373
- solaris2.[0-5] | solaris2.[0-5].*) ;;
2374
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2376
- # The C++ compiler is used as linker so we must use $wl
2377
- # flag to pass the commands to the underlying system
2379
+ # The compiler driver will combine and reorder linker options,
2380
+ # but understands `-z linker_flag'.
2381
# Supported since Solaris 2.6 (maybe 2.5.1?)
2382
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
2383
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
2386
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2388
- # Commands to make compiler produce verbose output that lists
2389
- # what "hidden" libraries, object files and flags are used when
2390
- # linking a shared library.
2392
- # There doesn't appear to be a way to prevent this compiler from
2393
- # explicitly linking system object files so we need to strip them
2394
- # from the output so that they don't get included in the library
2396
- output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2397
+ output_verbose_link_cmd='echo'
2399
# Archives containing C++ object files must be created using
2400
# "CC -xar", where "CC" is the Sun C++ compiler. This is
2401
@@ -3389,9 +3664,9 @@
2403
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
2407
# Green Hills C++ Compiler
2408
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
2409
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
2411
# The C++ compiler must be used to create the archive.
2412
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
2413
@@ -3401,9 +3676,9 @@
2414
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2415
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
2416
if $CC --version | grep -v '^2\.7' > /dev/null; then
2417
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
2418
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
2419
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2420
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2421
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
2423
# Commands to make compiler produce verbose output that lists
2424
# what "hidden" libraries, object files and flags are used when
2425
@@ -3412,9 +3687,9 @@
2427
# g++ 2.7 appears to require `-G' NOT `-shared' on this
2429
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
2430
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
2431
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2432
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
2433
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
2435
# Commands to make compiler produce verbose output that lists
2436
# what "hidden" libraries, object files and flags are used when
2437
@@ -3423,16 +3698,73 @@
2440
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
2442
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2444
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
2451
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
2452
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
2453
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
2454
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2455
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2456
+ runpath_var='LD_RUN_PATH'
2458
+ case $cc_basename in
2460
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
2461
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
2464
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
2465
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
2469
+ sysv5* | sco3.2v5* | sco5v6*)
2470
+ # Note: We can NOT use -z defs as we might desire, because we do not
2471
+ # link with -lc, and that would cause any symbols used from libc to
2472
+ # always be unresolved, which means just about no library would
2473
+ # ever link correctly. If we're not using GNU ld we use -z text
2474
+ # though, which does catch some bad symbols but isn't as heavy-handed
2476
+ # For security reasons, it is highly recommended that you always
2477
+ # use absolute paths for naming shared libraries, and exclude the
2478
+ # DT_RUNPATH tag from executables and libraries. But doing so
2479
+ # requires that you compile everything twice, which is a pain.
2480
+ # So that behaviour is only enabled if SCOABSPATH is set to a
2481
+ # non-empty value in the environment. Most likely only useful for
2482
+ # creating official distributions of packages.
2483
+ # This is a hack until libtool officially supports absolute path
2484
+ # names for shared libraries.
2485
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
2486
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
2487
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2488
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2489
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
2490
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2491
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2492
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
2493
+ runpath_var='LD_RUN_PATH'
2495
+ case $cc_basename in
2497
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
2498
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
2501
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
2502
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
2507
case $cc_basename in
2510
# NonStop-UX NCC 3.20
2511
# FIXME: insert proper C++ library support
2512
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2513
@@ -3469,8 +3801,6 @@
2514
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2515
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2516
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2517
-AC_LIBTOOL_SYS_LIB_STRIP
2518
-AC_LIBTOOL_DLOPEN_SELF($1)
2520
AC_LIBTOOL_CONFIG($1)
2522
@@ -3488,7 +3818,7 @@
2523
])# AC_LIBTOOL_LANG_CXX_CONFIG
2525
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
2526
-# ------------------------
2527
+# ------------------------------------
2528
# Figure out "hidden" library dependencies from verbose
2529
# compiler output when linking a shared library.
2530
# Parse the compiler output and extract the necessary
2531
@@ -3542,7 +3872,7 @@
2532
# The `*' in the case matches for architectures that use `case' in
2533
# $output_verbose_cmd can trigger glob expansion during the loop
2534
# eval without this substitution.
2535
- output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
2536
+ output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
2538
for p in `eval $output_verbose_link_cmd`; do
2540
@@ -3582,7 +3912,7 @@
2544
- *.$objext|*.$libext)
2546
# This assumes that the test object file only shows up
2547
# once in the compiler output.
2548
if test "$p" = "conftest.$objext"; then
2549
@@ -3618,13 +3948,70 @@
2551
$rm -f confest.$objext
2553
+# PORTME: override above test on systems where it is broken
2557
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
2558
+ # hack all around it, let's just trust "g++" to DTRT.
2559
+ _LT_AC_TAGVAR(predep_objects,$1)=
2560
+ _LT_AC_TAGVAR(postdep_objects,$1)=
2561
+ _LT_AC_TAGVAR(postdeps,$1)=
2565
+ case `$CC -V 2>&1 | sed 5q` in
2569
+ # The more standards-conforming stlport4 library is
2570
+ # incompatible with the Cstd library. Avoid specifying
2571
+ # it if it's in CXXFLAGS. Ignore libCrun as
2572
+ # -library=stlport4 depends on it.
2573
+ case " $CXX $CXXFLAGS " in
2574
+ *" -library=stlport4 "*)
2575
+ solaris_use_stlport4=yes
2578
+ if test "$solaris_use_stlport4" != yes; then
2579
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
2586
+ case $cc_basename in
2588
+ # The more standards-conforming stlport4 library is
2589
+ # incompatible with the Cstd library. Avoid specifying
2590
+ # it if it's in CXXFLAGS. Ignore libCrun as
2591
+ # -library=stlport4 depends on it.
2592
+ case " $CXX $CXXFLAGS " in
2593
+ *" -library=stlport4 "*)
2594
+ solaris_use_stlport4=yes
2598
+ # Adding this requires a known-good setup of shared libraries for
2599
+ # Sun compiler versions before 5.6, else PIC objects from an old
2600
+ # archive will be linked into the output, leading to subtle bugs.
2601
+ if test "$solaris_use_stlport4" != yes; then
2602
+ _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
2610
case " $_LT_AC_TAGVAR(postdeps, $1) " in
2611
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
2613
])# AC_LIBTOOL_POSTDEP_PREDEP
2615
# AC_LIBTOOL_LANG_F77_CONFIG
2616
-# ------------------------
2617
+# --------------------------
2618
# Ensure that the configuration vars for the C compiler are
2619
# suitably defined. Those variables are subsequently used by
2620
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2621
@@ -3660,20 +4047,31 @@
2622
_LT_AC_TAGVAR(objext, $1)=$objext
2624
# Code to be used in simple compile tests
2625
-lt_simple_compile_test_code=" subroutine t\n return\n end\n"
2626
+lt_simple_compile_test_code="\
2632
# Code to be used in simple link tests
2633
-lt_simple_link_test_code=" program t\n end\n"
2634
+lt_simple_link_test_code="\
2639
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2642
+# save warnings/boilerplate of simple test code
2643
+_LT_COMPILER_BOILERPLATE
2644
+_LT_LINKER_BOILERPLATE
2646
# Allow CC to be a program name with arguments.
2650
_LT_AC_TAGVAR(compiler, $1)=$CC
2651
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2652
+_LT_CC_BASENAME([$compiler])
2654
AC_MSG_CHECKING([if libtool supports shared libraries])
2655
AC_MSG_RESULT([$can_build_shared])
2656
@@ -3683,7 +4081,7 @@
2658
# On AIX, shared libraries and static libraries use the same namespace, and
2659
# are all built from PIC.
2663
test "$enable_shared" = yes && enable_static=no
2664
if test -n "$RANLIB"; then
2665
@@ -3691,8 +4089,10 @@
2666
postinstall_cmds='$RANLIB $lib'
2670
- test "$enable_shared" = yes && enable_static=no
2672
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2673
+ test "$enable_shared" = yes && enable_static=no
2677
AC_MSG_RESULT([$enable_shared])
2678
@@ -3702,8 +4102,6 @@
2679
test "$enable_shared" = yes || enable_static=yes
2680
AC_MSG_RESULT([$enable_static])
2682
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
2684
_LT_AC_TAGVAR(GCC, $1)="$G77"
2685
_LT_AC_TAGVAR(LD, $1)="$LD"
2687
@@ -3713,8 +4111,6 @@
2688
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2689
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2690
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2691
-AC_LIBTOOL_SYS_LIB_STRIP
2694
AC_LIBTOOL_CONFIG($1)
2696
@@ -3740,23 +4136,30 @@
2697
_LT_AC_TAGVAR(objext, $1)=$objext
2699
# Code to be used in simple compile tests
2700
-lt_simple_compile_test_code="class foo {}\n"
2701
+lt_simple_compile_test_code="class foo {}"
2703
# Code to be used in simple link tests
2704
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
2705
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
2707
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2710
+# save warnings/boilerplate of simple test code
2711
+_LT_COMPILER_BOILERPLATE
2712
+_LT_LINKER_BOILERPLATE
2714
# Allow CC to be a program name with arguments.
2718
_LT_AC_TAGVAR(compiler, $1)=$CC
2719
+_LT_CC_BASENAME([$compiler])
2721
# GCJ did not exist at the time GCC didn't implicitly link libc in.
2722
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2724
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2727
## There is no encapsulation within the following macros, do not change
2728
## the running order or otherwise move them around unless you know exactly
2729
@@ -3768,8 +4171,6 @@
2730
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2731
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2732
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2733
-AC_LIBTOOL_SYS_LIB_STRIP
2734
-AC_LIBTOOL_DLOPEN_SELF($1)
2736
AC_LIBTOOL_CONFIG($1)
2738
@@ -3779,7 +4180,7 @@
2741
# AC_LIBTOOL_LANG_RC_CONFIG
2742
-# --------------------------
2743
+# -------------------------
2744
# Ensure that the configuration vars for the Windows resource compiler are
2745
# suitably defined. Those variables are subsequently used by
2746
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2747
@@ -3795,7 +4196,7 @@
2748
_LT_AC_TAGVAR(objext, $1)=$objext
2750
# Code to be used in simple compile tests
2751
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
2752
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
2754
# Code to be used in simple link tests
2755
lt_simple_link_test_code="$lt_simple_compile_test_code"
2756
@@ -3803,11 +4204,16 @@
2757
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2760
+# save warnings/boilerplate of simple test code
2761
+_LT_COMPILER_BOILERPLATE
2762
+_LT_LINKER_BOILERPLATE
2764
# Allow CC to be a program name with arguments.
2768
_LT_AC_TAGVAR(compiler, $1)=$CC
2769
+_LT_CC_BASENAME([$compiler])
2770
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2772
AC_LIBTOOL_CONFIG($1)
2773
@@ -3833,11 +4239,12 @@
2774
# without removal of \ escapes.
2775
if test -n "${ZSH_VERSION+set}" ; then
2776
setopt NO_GLOB_SUBST
2779
# Now quote all the things that may contain metacharacters while being
2780
# careful not to overquote the AC_SUBSTed values. We take copies of the
2781
# variables and quote the copies for generation of the libtool script.
2782
- for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
2783
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
2785
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
2786
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
2787
deplibs_check_method reload_flag reload_cmds need_locks \
2788
@@ -3878,6 +4285,7 @@
2789
_LT_AC_TAGVAR(module_cmds, $1) \
2790
_LT_AC_TAGVAR(module_expsym_cmds, $1) \
2791
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
2792
+ _LT_AC_TAGVAR(fix_srcfile_path, $1) \
2793
_LT_AC_TAGVAR(exclude_expsyms, $1) \
2794
_LT_AC_TAGVAR(include_expsyms, $1); do
2796
@@ -3887,7 +4295,7 @@
2797
_LT_AC_TAGVAR(archive_cmds, $1) | \
2798
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
2799
_LT_AC_TAGVAR(module_cmds, $1) | \
2800
- _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
2801
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
2802
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
2803
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
2804
extract_expsyms_cmds | reload_cmds | finish_cmds | \
2805
@@ -3924,7 +4332,7 @@
2806
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2807
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2809
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
2810
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
2811
# Free Software Foundation, Inc.
2813
# This file is part of GNU Libtool:
2814
@@ -3953,11 +4361,11 @@
2817
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
2818
-Xsed="$SED -e s/^X//"
2819
+Xsed="$SED -e 1s/^X//"
2821
# The HP-UX ksh and POSIX shell print the target directory to stdout
2823
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2824
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2826
# The names of the tagged configurations supported by this script.
2828
@@ -3988,6 +4396,12 @@
2830
host_alias=$host_alias
2834
+# The build system.
2835
+build_alias=$build_alias
2839
# An echo program that does not interpret backslashes.
2841
@@ -3999,6 +4413,9 @@
2845
+# LTCC compiler flags.
2846
+LTCFLAGS=$lt_LTCFLAGS
2848
# A language-specific compiler.
2849
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
2851
@@ -4018,7 +4435,7 @@
2854
# A symbol stripping program
2858
# Used to examine libraries when file_magic_cmd begins "file"
2859
MAGIC_CMD=$MAGIC_CMD
2860
@@ -4049,7 +4466,7 @@
2863
# Shared library suffix (normally ".so").
2865
+shrext_cmds='$shrext_cmds'
2867
# Executable file suffix (normally "").
2869
@@ -4064,7 +4481,7 @@
2870
# Does compiler simultaneously support -c and -o options?
2871
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
2873
-# Must we lock files when doing compilation ?
2874
+# Must we lock files when doing compilation?
2875
need_locks=$lt_need_locks
2877
# Do we need the lib prefix for modules?
2878
@@ -4240,7 +4657,7 @@
2879
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
2881
# Fix the shell variable \$srcfile for the compiler.
2882
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
2883
+fix_srcfile_path=$lt_fix_srcfile_path
2885
# Set to yes if exported symbols are required.
2886
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
2887
@@ -4293,7 +4710,10 @@
2888
# If there is no Makefile yet, we rely on a make rule to execute
2889
# `config.status --recheck' to rerun these tests and create the
2890
# libtool script then.
2891
- test -f Makefile && make "$ltmain"
2892
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
2893
+ if test -f "$ltmain_in"; then
2894
+ test -f Makefile && make "$ltmain"
2897
])# AC_LIBTOOL_CONFIG
2899
@@ -4320,6 +4740,7 @@
2900
# ---------------------------------
2901
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
2902
[AC_REQUIRE([AC_CANONICAL_HOST])
2903
+AC_REQUIRE([LT_AC_PROG_SED])
2904
AC_REQUIRE([AC_PROG_NM])
2905
AC_REQUIRE([AC_OBJEXT])
2906
# Check for command to grab the raw symbol name followed by C symbol from nm.
2907
@@ -4335,9 +4756,6 @@
2908
# Regexp to match symbols that can be accessed directly from C.
2909
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
2911
-# Transform the above into a raw symbol and a C symbol.
2912
-symxfrm='\1 \2\3 \3'
2914
# Transform an extracted symbol line into a proper C declaration
2915
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
2917
@@ -4359,14 +4777,30 @@
2918
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2919
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2921
+linux* | k*bsd*-gnu)
2922
+ if test "$host_cpu" = ia64; then
2923
+ symcode='[[ABCDGIRSTW]]'
2924
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2925
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2929
symcode='[[BCDEGRST]]'
2932
symcode='[[BCDEGQRST]]'
2937
+ symcode='[[BDRT]]'
2945
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
2946
+ symcode='[[ABDT]]'
2949
symcode='[[DFNSTU]]'
2950
@@ -4384,14 +4818,17 @@
2951
# If we're using GNU nm, then use its standard symbol codes.
2952
case `$NM -V 2>&1` in
2953
*GNU* | *'with BFD'*)
2954
- symcode='[[ABCDGISTW]]' ;;
2955
+ symcode='[[ABCDGIRSTW]]' ;;
2958
# Try without a prefix undercore, then with it.
2959
for ac_symprfx in "" "_"; do
2961
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
2962
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
2964
# Write the raw and C identifiers.
2965
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2966
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
2968
# Check to see that the pipe works correctly.
2970
@@ -4530,12 +4967,14 @@
2972
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
2974
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2975
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
2976
# PIC is the default for these OSes.
2978
- mingw* | os2* | pw32*)
2979
+ mingw* | cygwin* | os2* | pw32*)
2980
# This hack is so that the source file can tell whether it is being
2981
# built for inclusion in a dll (and should export symbols for example).
2982
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
2983
+ # (--disable-auto-import) libraries
2984
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
2986
darwin* | rhapsody*)
2987
@@ -4547,6 +4986,10 @@
2988
# DJGPP does not support shared libraries at all
2989
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
2992
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
2993
+ # Instead, we relocate shared libraries at runtime.
2996
if test -d /usr/nec; then
2997
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
2998
@@ -4555,7 +4998,7 @@
3000
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3002
- case "$host_cpu" in
3007
@@ -4580,18 +5023,28 @@
3010
case $cc_basename in
3013
# Green Hills C++ Compiler
3014
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
3019
+ # PIC is the default on this platform
3020
+ # Common symbols not allowed in MH_DYLIB files
3021
+ case $cc_basename in
3023
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3024
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3029
case $cc_basename in
3032
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3036
# Green Hills C++ Compiler
3037
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3039
@@ -4599,22 +5052,22 @@
3043
- freebsd* | kfreebsd*-gnu)
3044
+ freebsd* | dragonfly*)
3045
# FreeBSD uses GNU C++
3047
hpux9* | hpux10* | hpux11*)
3048
case $cc_basename in
3051
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3052
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
3053
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3054
if test "$host_cpu" != ia64; then
3055
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3060
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3061
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
3062
- case "$host_cpu" in
3063
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3068
@@ -4627,9 +5080,13 @@
3073
+ # This is c89, which is MS Visual C++ (no shared libs)
3074
+ # Anyone wants to do a port?
3076
irix5* | irix6* | nonstopux*)
3077
case $cc_basename in
3080
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3081
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3082
# CC pic flag -KPIC is the default.
3083
@@ -4638,20 +5095,26 @@
3088
+ linux* | k*bsd*-gnu)
3089
case $cc_basename in
3093
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3094
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3099
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3100
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3101
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3106
+ # Portland Group C++ compiler.
3107
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3108
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3109
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3113
# Make sure the PIC flag is empty. It appears that all Alpha
3114
# Linux and Compaq Tru64 Unix objects are PIC.
3115
@@ -4659,6 +5122,14 @@
3116
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3119
+ case `$CC -V 2>&1 | sed 5q` in
3122
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3123
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3124
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3130
@@ -4668,25 +5139,25 @@
3133
case $cc_basename in
3136
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3143
+ netbsd* | netbsdelf*-gnu)
3145
osf3* | osf4* | osf5*)
3146
case $cc_basename in
3149
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3153
# Rational C++ 2.4.1
3154
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3158
# Digital/Compaq C++
3159
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3160
# Make sure the PIC flag is empty. It appears that all Alpha
3161
@@ -4700,24 +5171,15 @@
3166
- case $cc_basename in
3168
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3175
case $cc_basename in
3178
# Sun C++ 4.2, 5.x and Centerline C++
3179
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3180
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3181
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3185
# Green Hills C++ Compiler
3186
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3188
@@ -4727,12 +5189,12 @@
3191
case $cc_basename in
3195
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3196
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3201
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3203
@@ -4742,7 +5204,7 @@
3206
case $cc_basename in
3209
# NonStop-UX NCC 3.20
3210
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3212
@@ -4750,7 +5212,14 @@
3217
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3218
+ case $cc_basename in
3220
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3221
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3222
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3228
@@ -4781,13 +5250,15 @@
3229
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3232
- beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3233
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3234
# PIC is the default for these OSes.
3237
- mingw* | pw32* | os2*)
3238
+ mingw* | cygwin* | pw32* | os2*)
3239
# This hack is so that the source file can tell whether it is being
3240
# built for inclusion in a dll (and should export symbols for example).
3241
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
3242
+ # (--disable-auto-import) libraries
3243
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3246
@@ -4797,6 +5268,11 @@
3247
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3251
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3252
+ # Instead, we relocate shared libraries at runtime.
3256
# Just because we use GCC doesn't mean we suddenly get shared libraries
3257
# on systems that don't support them.
3258
@@ -4813,7 +5289,7 @@
3260
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3262
- case "$host_cpu" in
3267
@@ -4839,8 +5315,18 @@
3268
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3272
+ # PIC is the default on this platform
3273
+ # Common symbols not allowed in MH_DYLIB files
3274
+ case $cc_basename in
3276
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3277
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3282
- mingw* | pw32* | os2*)
3283
+ mingw* | cygwin* | pw32* | os2*)
3284
# This hack is so that the source file can tell whether it is being
3285
# built for inclusion in a dll (and should export symbols for example).
3286
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3287
@@ -4850,7 +5336,7 @@
3288
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3289
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3291
- case "$host_cpu" in
3296
@@ -4873,18 +5359,41 @@
3297
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3302
+ linux* | k*bsd*-gnu)
3303
+ case $cc_basename in
3305
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3306
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3307
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3309
+ pgcc* | pgf77* | pgf90* | pgf95*)
3310
+ # Portland Group compilers (*not* the Pentium gcc compiler,
3311
+ # which looks to be a dead project)
3312
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3313
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3314
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3317
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3318
# All Alpha code is PIC.
3319
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3322
+ case `$CC -V 2>&1 | sed 5q` in
3325
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3326
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3327
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3330
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
3331
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3332
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3333
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
3340
@@ -4894,15 +5403,19 @@
3341
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3345
- _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
3346
- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
3348
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3352
- _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3353
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3354
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3355
+ case $cc_basename in
3356
+ f77* | f90* | f95*)
3357
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3359
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3364
@@ -4911,7 +5424,7 @@
3365
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3368
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3369
+ sysv4 | sysv4.2uw2* | sysv4.3*)
3370
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3371
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3372
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3373
@@ -4924,6 +5437,17 @@
3377
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3378
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3379
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3380
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3384
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3385
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3389
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3390
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3391
@@ -4951,7 +5475,7 @@
3392
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3393
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3397
# For platforms which do not support PIC, -DPIC is meaningless:
3399
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3400
@@ -4960,6 +5484,16 @@
3401
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
3406
+# Check to make sure the static flag actually works.
3408
+wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
3409
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3410
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3411
+ $lt_tmp_static_flag,
3413
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3417
@@ -4967,7 +5501,8 @@
3418
# ------------------------------------
3419
# See if the linker supports building shared libraries.
3420
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3421
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3422
+[AC_REQUIRE([LT_AC_PROG_SED])dnl
3423
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3425
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3427
@@ -4984,7 +5519,10 @@
3428
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3431
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3432
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
3434
+ linux* | k*bsd*-gnu)
3435
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
3438
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3439
@@ -5010,7 +5548,7 @@
3440
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3441
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3442
_LT_AC_TAGVAR(module_cmds, $1)=
3443
- _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3444
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3445
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3446
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3447
# include_expsyms should be a list of space-separated symbols to be *always*
3448
@@ -5027,7 +5565,8 @@
3449
# rely on this symbol name, it's probably fine to never include it in
3450
# preloaded symbol tables.
3451
extract_expsyms_cmds=
3453
+ # Just being paranoid about ensuring that cc_basename is set.
3454
+ _LT_CC_BASENAME([$compiler])
3456
cygwin* | mingw* | pw32*)
3457
# FIXME: the MSVC++ port hasn't been tested in a loooong time
3458
@@ -5037,6 +5576,10 @@
3463
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
3469
@@ -5047,6 +5590,27 @@
3470
# If archive_cmds runs LD, not CC, wlarc should be empty
3473
+ # Set some defaults for GNU ld with shared library support. These
3474
+ # are reset later if shared libraries are not supported. Putting them
3475
+ # here allows them to be overridden if necessary.
3476
+ runpath_var=LD_RUN_PATH
3477
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3478
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3479
+ # ancient GNU ld didn't support --whole-archive et. al.
3480
+ if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
3481
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3483
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3485
+ supports_anon_versioning=no
3486
+ case `$LD -v 2>/dev/null` in
3487
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3488
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3489
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3490
+ *\ 2.11.*) ;; # other 2.11 versions
3491
+ *) supports_anon_versioning=yes ;;
3494
# See if GNU ld supports shared libraries.
3496
aix3* | aix4* | aix5*)
3497
@@ -5084,7 +5648,7 @@
3498
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3499
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3500
# support --undefined. This deserves some investigation. FIXME
3501
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
3502
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3504
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3506
@@ -5094,13 +5658,13 @@
3507
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3508
# as there is no search path for DLLs.
3509
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3510
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
3511
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3512
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3513
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3514
- _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3515
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
3517
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3518
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3519
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3520
# If the export-symbols file already is a .def file (1st line
3521
# is EXPORTS), use it as is; otherwise, prepend...
3522
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3523
@@ -5109,23 +5673,79 @@
3524
echo EXPORTS > $output_objdir/$soname.def;
3525
cat $export_symbols >> $output_objdir/$soname.def;
3527
- $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3528
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3531
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
3537
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
3538
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3539
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3540
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3541
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3542
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
3543
+ # default) and relocated if they conflict, which is a slow very memory
3544
+ # consuming and fragmenting process. To avoid this, we pick a random,
3545
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3546
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3547
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3548
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3551
+ gnu* | linux* | k*bsd*-gnu)
3552
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3554
+ case $cc_basename,$host_cpu in
3555
+ pgcc*) # Portland Group C compiler
3556
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3557
+ tmp_addflag=' $pic_flag'
3559
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
3560
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3561
+ tmp_addflag=' $pic_flag -Mnomain' ;;
3562
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
3563
+ tmp_addflag=' -i_dynamic' ;;
3564
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
3565
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
3566
+ ifc* | ifort*) # Intel Fortran compiler
3567
+ tmp_addflag=' -nofor_main' ;;
3569
+ case `$CC -V 2>&1 | sed 5q` in
3570
+ *Sun\ C*) # Sun C 5.9
3571
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3572
+ tmp_sharedflag='-G' ;;
3573
+ *Sun\ F*) # Sun Fortran 8.3
3574
+ tmp_sharedflag='-G' ;;
3576
+ tmp_sharedflag='-shared' ;;
3578
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3580
+ if test $supports_anon_versioning = yes; then
3581
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
3582
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
3583
+ $echo "local: *; };" >> $output_objdir/$libname.ver~
3584
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
3586
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=no
3588
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
3592
+ netbsd* | netbsdelf*-gnu)
3593
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3594
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3597
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
3598
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3599
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3600
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3604
- solaris* | sysv5*)
3606
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
3607
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3609
@@ -5139,13 +5759,40 @@
3612
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3613
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
3614
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3615
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3616
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3618
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3622
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
3623
+ case `$LD -v 2>&1` in
3624
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
3625
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
3626
+ cat <<_LT_EOF 1>&2
3628
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
3629
+*** reliably create shared libraries on SCO systems. Therefore, libtool
3630
+*** is disabling shared libraries support. We urge you to upgrade GNU
3631
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
3632
+*** your PATH or compiler configuration so that the native linker is
3633
+*** used, and then restart.
3638
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3639
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
3640
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
3641
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
3643
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
3650
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3652
@@ -5155,24 +5802,19 @@
3655
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3656
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
3657
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3658
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3659
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3661
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3666
- if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
3667
- runpath_var=LD_RUN_PATH
3668
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3669
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3670
- # ancient GNU ld didn't support --whole-archive et. al.
3671
- if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
3672
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3674
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3676
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
3678
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3679
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3680
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3683
# PORTME fill in a description of your system's linker (not GNU ld)
3684
@@ -5184,7 +5826,7 @@
3685
# Note: this linker hardcodes the directories in LIBPATH if there
3686
# are no directories specified by -L.
3687
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3688
- if test "$GCC" = yes && test -z "$link_static_flag"; then
3689
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
3690
# Neither direct hardcoding nor static linking is supported with a
3692
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3693
@@ -5206,9 +5848,21 @@
3695
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
3697
+ aix_use_runtimelinking=no
3699
+ # Test if we are trying to use run time linking or normal
3700
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3701
+ # need to do runtime linking.
3702
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3703
+ for ld_flag in $LDFLAGS; do
3704
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3705
+ aix_use_runtimelinking=yes
3712
- # KDE requires run time linking. Make it the default.
3713
- aix_use_runtimelinking=yes
3714
exp_sym_flag='-bexport'
3715
no_entry_flag='-bnoentry'
3717
@@ -5225,7 +5879,7 @@
3718
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3720
if test "$GCC" = yes; then
3721
- case $host_os in aix4.[012]|aix4.[012].*)
3722
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
3723
# We only want to do this on AIX 4.2 and lower, the check
3724
# below for broken collect2 doesn't work under 4.3+
3725
collect2name=`${CC} -print-prog-name=collect2`
3726
@@ -5233,7 +5887,7 @@
3727
strings "$collect2name" | grep resolve_lib_name >/dev/null
3729
# We have reworked collect2
3730
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3733
# We have old collect2
3734
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3735
@@ -5244,8 +5898,12 @@
3736
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3737
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3741
shared_flag='-shared'
3742
+ if test "$aix_use_runtimelinking" = yes; then
3743
+ shared_flag="$shared_flag "'${wl}-G'
3747
if test "$host_cpu" = ia64; then
3748
@@ -5253,30 +5911,30 @@
3749
# chokes on -Wl,-G. The following line is correct:
3752
- if test "$aix_use_runtimelinking" = yes; then
3753
- shared_flag='-qmkshrobj ${wl}-G'
3754
+ if test "$aix_use_runtimelinking" = yes; then
3755
+ shared_flag='${wl}-G'
3757
- shared_flag='-qmkshrobj'
3759
+ shared_flag='${wl}-bM:SRE'
3764
- # Let the compiler handle the export list.
3765
- _LT_AC_TAGVAR(always_export_symbols, $1)=no
3766
+ # It seems that -bexpall does not export symbols beginning with
3767
+ # underscore (_), so it is better to generate a list of symbols to export.
3768
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3769
if test "$aix_use_runtimelinking" = yes; then
3770
# Warning - without using the other runtime loading flags (-brtl),
3771
# -berok will link without error, but may produce a broken library.
3772
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3773
# Determine the default libpath from the value encoded in an empty executable.
3774
- _LT_AC_SYS_LIBPATH_AIX
3775
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3776
- _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
3777
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3778
+ _LT_AC_SYS_LIBPATH_AIX
3779
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3780
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3782
if test "$host_cpu" = ia64; then
3783
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3784
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3785
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3786
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3788
# Determine the default libpath from the value encoded in an empty executable.
3789
_LT_AC_SYS_LIBPATH_AIX
3790
@@ -5285,13 +5943,11 @@
3791
# -berok will link without error, but may produce a broken library.
3792
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3793
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3794
- # -bexpall does not export symbols beginning with underscore (_)
3795
- _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3796
# Exported symbols can be pulled into shared objects from archives
3797
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3798
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3799
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3800
- # This is similar to how AIX traditionally builds it's shared libraries.
3801
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3802
+ # This is similar to how AIX traditionally builds its shared libraries.
3803
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3807
@@ -5304,7 +5960,7 @@
3808
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3813
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
3816
@@ -5314,69 +5970,69 @@
3817
# hardcode_libdir_flag_spec is actually meaningless, as there is
3818
# no search path for DLLs.
3819
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
3820
- _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
3821
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3822
# Tell ltmain to make .lib files, not .a files.
3824
# Tell ltmain to make .dll files, not .so files.
3826
+ shrext_cmds=".dll"
3827
# FIXME: Setting linknames here is a bad hack.
3828
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
3829
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
3830
# The linker will automatically build a .lib file if we build a DLL.
3831
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
3832
# FIXME: Should let the user specify the lib program.
3833
- _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
3834
- fix_srcfile_path='`cygpath -w "$srcfile"`'
3835
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
3836
+ _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
3837
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3840
darwin* | rhapsody*)
3841
- if test "$GXX" = yes ; then
3842
- _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3843
- case "$host_os" in
3844
- rhapsody* | darwin1.[[012]])
3845
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
3847
- *) # Darwin 1.3 on
3848
- if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3849
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
3851
- case ${MACOSX_DEPLOYMENT_TARGET} in
3853
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
3856
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
3862
+ rhapsody* | darwin1.[[012]])
3863
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3865
+ *) # Darwin 1.3 on
3866
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3867
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3869
+ case ${MACOSX_DEPLOYMENT_TARGET} in
3871
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3874
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3880
- lt_int_apple_cc_single_mod=no
3881
- output_verbose_link_cmd='echo'
3882
- if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3883
- lt_int_apple_cc_single_mod=yes
3885
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3886
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
3888
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
3890
- _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
3891
- # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3892
- if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3893
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3895
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3897
- _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3898
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3899
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3900
_LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3901
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3902
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3903
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3904
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3906
- _LT_AC_TAGVAR(ld_shlibs, $1)=no
3908
+ if test "$GCC" = yes ; then
3909
+ output_verbose_link_cmd='echo'
3910
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3911
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3912
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3913
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3914
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3916
+ case $cc_basename in
3918
+ output_verbose_link_cmd='echo'
3919
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3920
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3921
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3922
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3923
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3926
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
3933
@@ -5409,8 +6065,8 @@
3936
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
3937
- freebsd* | kfreebsd*-gnu)
3938
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
3939
+ freebsd* | dragonfly*)
3940
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
3941
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3942
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
3943
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3944
@@ -5418,7 +6074,7 @@
3947
if test "$GCC" = yes; then
3948
- _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3949
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3951
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3953
@@ -5432,47 +6088,62 @@
3954
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3957
- hpux10* | hpux11*)
3959
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
3960
- case "$host_cpu" in
3962
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
3963
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3965
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
3967
+ if test "$with_gnu_ld" = no; then
3968
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3969
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3971
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3972
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3974
+ # hardcode_minus_L: Not really in the search PATH,
3975
+ # but as the default location of the library.
3976
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3981
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
3984
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
3987
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
3990
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
3991
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
3995
- case "$host_cpu" in
3997
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4000
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4003
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4006
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4007
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4011
if test "$with_gnu_ld" = no; then
4012
- case "$host_cpu" in
4014
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4015
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4016
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4020
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4021
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4022
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4023
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4026
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4027
- _LT_AC_TAGVAR(hardcode_direct, $1)=no
4028
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4030
- # hardcode_minus_L: Not really in the search PATH,
4031
- # but as the default location of the library.
4032
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4035
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4036
- _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4037
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4038
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4040
@@ -5486,7 +6157,7 @@
4042
irix5* | irix6* | nonstopux*)
4043
if test "$GCC" = yes; then
4044
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4045
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4047
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4048
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4049
@@ -5496,7 +6167,7 @@
4050
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4054
+ netbsd* | netbsdelf*-gnu)
4055
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4056
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4058
@@ -5516,23 +6187,28 @@
4062
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4063
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4064
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4065
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
4066
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4067
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4068
+ if test -f /usr/libexec/ld.so; then
4069
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4070
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4071
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4072
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4073
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4074
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4075
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4078
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4079
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4080
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4083
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4084
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4090
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4091
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4092
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4095
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
4096
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4099
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
4103
@@ -5540,14 +6216,14 @@
4104
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4105
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4106
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4107
- _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
4108
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
4109
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4113
if test "$GCC" = yes; then
4114
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4115
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4116
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4118
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4119
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4120
@@ -5559,13 +6235,13 @@
4121
osf4* | osf5*) # as osf3* with the addition of -msym flag
4122
if test "$GCC" = yes; then
4123
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4124
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4125
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4126
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4128
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4129
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4130
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4131
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4132
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
4134
# Both c and cxx compiler support -rpath directly
4135
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4136
@@ -5573,21 +6249,15 @@
4137
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4141
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4142
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4143
- _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4144
- runpath_var=LD_RUN_PATH
4145
- hardcode_runpath_var=yes
4149
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4150
if test "$GCC" = yes; then
4151
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
4153
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4154
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4155
- $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
4156
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4159
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4160
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4161
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4162
@@ -5596,8 +6266,17 @@
4163
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4165
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4166
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
4167
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4169
+ # The compiler driver will combine and reorder linker options,
4170
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
4171
+ # but is careful enough not to reorder.
4172
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
4173
+ if test "$GCC" = yes; then
4174
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4176
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4180
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4182
@@ -5606,7 +6285,7 @@
4183
if test "x$host_vendor" = xsequent; then
4184
# Use $CC to link under sequent, because it throws in some extra .o
4185
# files that make .init and .fini sections work.
4186
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
4187
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4189
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4191
@@ -5654,36 +6333,45 @@
4196
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4197
- _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4198
- _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4199
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4200
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4201
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4202
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4203
- hardcode_runpath_var=yes
4204
- runpath_var=LD_RUN_PATH
4206
+ runpath_var='LD_RUN_PATH'
4208
- sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4209
- _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
4210
if test "$GCC" = yes; then
4211
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
4212
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4213
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4215
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
4216
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4217
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4219
- runpath_var='LD_RUN_PATH'
4220
- _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4224
- _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4225
- # $CC -shared without GNU ld will not create a library from C++
4226
- # object files and a static libstdc++, better avoid it by now
4227
- _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4228
- _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4229
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4230
- _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4231
+ sysv5* | sco3.2v5* | sco5v6*)
4232
+ # Note: We can NOT use -z defs as we might desire, because we do not
4233
+ # link with -lc, and that would cause any symbols used from libc to
4234
+ # always be unresolved, which means just about no library would
4235
+ # ever link correctly. If we're not using GNU ld we use -z text
4236
+ # though, which does catch some bad symbols but isn't as heavy-handed
4238
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4239
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4240
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4241
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4242
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4243
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4244
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4245
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4246
runpath_var='LD_RUN_PATH'
4248
+ if test "$GCC" = yes; then
4249
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4250
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4252
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4253
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4258
@@ -5701,11 +6389,6 @@
4259
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4260
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4262
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4263
-if test "$GCC" = yes; then
4264
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4268
# Do we need to explicitly link libc?
4270
@@ -5725,14 +6408,15 @@
4271
# to ld, don't add -lc before -lgcc.
4272
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4274
- printf "$lt_simple_compile_test_code" > conftest.$ac_ext
4276
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4278
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4281
libobjs=conftest.$ac_objext
4283
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4284
+ pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4288
@@ -5827,6 +6511,30 @@
4289
[AC_CHECK_TOOL(RC, windres, no)
4293
+# Cheap backport of AS_EXECUTABLE_P and required macros
4294
+# from Autoconf 2.59; we should not use $as_executable_p directly.
4298
+m4_ifndef([_AS_TEST_PREPARE],
4299
+[m4_defun([_AS_TEST_PREPARE],
4300
+[if test -x / >/dev/null 2>&1; then
4301
+ as_executable_p='test -x'
4303
+ as_executable_p='test -f'
4305
+])])# _AS_TEST_PREPARE
4309
+# Check whether a file is executable.
4310
+m4_ifndef([AS_EXECUTABLE_P],
4311
+[m4_defun([AS_EXECUTABLE_P],
4312
+[AS_REQUIRE([_AS_TEST_PREPARE])dnl
4313
+$as_executable_p $1[]dnl
4314
+])])# AS_EXECUTABLE_P
4316
############################################################
4317
# NOTE: This macro has been submitted for inclusion into #
4318
# GNU Autoconf as AC_PROG_SED. When it is available in #
4319
@@ -5849,18 +6557,19 @@
4320
test -z "$as_dir" && as_dir=.
4321
for lt_ac_prog in sed gsed; do
4322
for ac_exec_ext in '' $ac_executable_extensions; do
4323
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
4324
+ if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
4325
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4333
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
4334
# along with /bin/sed that truncates output.
4335
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
4336
- test ! -f $lt_ac_sed && break
4337
+ test ! -f $lt_ac_sed && continue
4338
cat /dev/null > conftest.in
4340
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
4341
@@ -5887,5 +6596,6 @@
4346
AC_MSG_RESULT([$SED])
4348
diff -Nrua a/admin/ltmain.sh b/admin/ltmain.sh
4349
--- a/admin/ltmain.sh 2007-10-08 13:34:50.000000000 +0200
4350
+++ b/admin/ltmain.sh 2008-01-21 23:31:58.000000000 +0100
4352
# ltmain.sh - Provide generalized library-building support services.
4353
# NOTE: Changing this file will not affect anything until you rerun configure.
4355
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
4356
-# Free Software Foundation, Inc.
4357
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
4358
+# 2007 Free Software Foundation, Inc.
4359
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4361
# This program is free software; you can redistribute it and/or modify
4363
# configuration script generated by Autoconf, you may include it under
4364
# the same distribution terms that you use for the rest of that program.
4366
+basename="s,^.*/,,g"
4368
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
4369
+# is ksh but when the shell is invoked as "sh" and the current value of
4370
+# the _XPG environment variable is not equal to 1 (one), the special
4371
+# positional parameter $0, within a function call, is the name of the
4375
+# The name of this program:
4376
+progname=`echo "$progpath" | $SED $basename`
4377
+modename="$progname"
4379
+# Global variables:
4385
+VERSION="1.5.24 Debian 1.5.24-2"
4386
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
4388
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
4389
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
4392
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
4393
+ # is contrary to our usage. Disable this feature.
4394
+ alias -g '${1+"$@"}'='"$@"'
4395
+ setopt NO_GLOB_SUBST
4397
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
4399
+BIN_SH=xpg4; export BIN_SH # for Tru64
4400
+DUALCASE=1; export DUALCASE # for MKS sh
4402
# Check that we have a working $echo.
4403
if test "X$1" = X--no-reexec; then
4404
# Discard the --no-reexec flag, and continue.
4408
# Restart under the correct shell, and then maybe $echo will work.
4409
- exec $SHELL "$0" --no-reexec ${1+"$@"}
4410
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
4413
if test "X$1" = X--fallback-echo; then
4419
+ exit $EXIT_SUCCESS
4422
-# The name of this program.
4423
-progname=`$echo "$0" | ${SED} 's%^.*/%%'`
4424
-modename="$progname"
4430
-TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"
4433
help="Try \`$progname --help' for more information."
4434
magic="%%%MAGIC variable%%%"
4436
Xsed="${SED}"' -e 1s/^X//'
4437
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
4438
# test EBCDIC or ASCII
4439
-case `echo A|tr A '\301'` in
4440
- A) # EBCDIC based system
4441
- SP2NL="tr '\100' '\n'"
4442
- NL2SP="tr '\r\n' '\100\100'"
4443
+case `echo X|tr X '\101'` in
4444
+ A) # ASCII based system
4445
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
4446
+ SP2NL='tr \040 \012'
4447
+ NL2SP='tr \015\012 \040\040'
4449
- *) # Assume ASCII based system
4450
- SP2NL="tr '\040' '\012'"
4451
- NL2SP="tr '\015\012' '\040\040'"
4452
+ *) # EBCDIC based system
4453
+ SP2NL='tr \100 \n'
4454
+ NL2SP='tr \r\n \100\100'
4458
@@ -86,20 +113,24 @@
4459
# These must not be set unconditionally because not all systems understand
4460
# e.g. LANG=C (notably SCO).
4461
# We save the old values to restore during execute mode.
4462
-if test "${LC_ALL+set}" = set; then
4463
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
4465
-if test "${LANG+set}" = set; then
4466
- save_LANG="$LANG"; LANG=C; export LANG
4468
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
4470
+ eval "if test \"\${$lt_var+set}\" = set; then
4471
+ save_$lt_var=\$$lt_var
4477
# Make sure IFS has a sensible default
4483
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
4484
$echo "$modename: not configured to build any kind of library" 1>&2
4485
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
4487
+ exit $EXIT_FAILURE
4491
@@ -111,17 +142,62 @@
4497
lo2o="s/\\.lo\$/.${objext}/"
4498
o2lo="s/\\.${objext}\$/.lo/"
4499
+extracted_archives=
4502
#####################################
4503
# Shell function definitions:
4504
# This seems to be the best place for them
4506
+# func_mktempdir [string]
4507
+# Make a temporary directory that won't clash with other running
4508
+# libtool processes, and avoids race conditions if possible. If
4509
+# given, STRING is the basename for that directory.
4512
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
4514
+ if test "$run" = ":"; then
4515
+ # Return a directory name, but don't create it in dry-run mode
4516
+ my_tmpdir="${my_template}-$$"
4519
+ # If mktemp works, use that first and foremost
4520
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
4522
+ if test ! -d "$my_tmpdir"; then
4523
+ # Failing that, at least try and use $RANDOM to avoid a race
4524
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
4526
+ save_mktempdir_umask=`umask`
4528
+ $mkdir "$my_tmpdir"
4529
+ umask $save_mktempdir_umask
4532
+ # If we're not in dry-run mode, bomb out on failure
4533
+ test -d "$my_tmpdir" || {
4534
+ $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
4535
+ exit $EXIT_FAILURE
4539
+ $echo "X$my_tmpdir" | $Xsed
4543
+# func_win32_libid arg
4544
+# return the library type of file 'arg'
4546
# Need a lot of goo to handle *both* DLLs and import libs
4547
# Has to be a shell function in order to 'eat' the argument
4548
# that is supplied when $file_magic_command is called.
4550
+func_win32_libid ()
4552
win32_libid_type="unknown"
4553
win32_fileres=`file -L $1 2>/dev/null`
4554
case $win32_fileres in
4555
@@ -130,17 +206,22 @@
4557
*ar\ archive*) # could be an import, or static
4558
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
4559
- grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
4560
+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
4561
win32_nmres=`eval $NM -f posix -A $1 | \
4562
- sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
4563
- if test "X$win32_nmres" = "Ximport" ; then
4564
- win32_libid_type="x86 archive import"
4566
- win32_libid_type="x86 archive static"
4568
+ $SED -n -e '1,100{
4575
+ case $win32_nmres in
4576
+ import*) win32_libid_type="x86 archive import";;
4577
+ *) win32_libid_type="x86 archive static";;
4583
win32_libid_type="x86 DLL"
4585
*executable*) # but shell scripts are "executable" too...
4586
@@ -154,9 +235,191 @@
4587
$echo $win32_libid_type
4591
+# func_infer_tag arg
4592
+# Infer tagged configuration to use if any are available and
4593
+# if one wasn't chosen via the "--tag" command line option.
4594
+# Only attempt this if the compiler in the base compile
4595
+# command doesn't match the default compiler.
4596
+# arg is usually of the form 'gcc ...'
4599
+ if test -n "$available_tags" && test -z "$tagname"; then
4601
+ for arg in $CC; do
4603
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
4607
+ CC_quoted="$CC_quoted $arg"
4610
+ # Blanks in the command may have been stripped by the calling shell,
4611
+ # but not from the CC environment variable when configure was run.
4612
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
4613
+ # Blanks at the start of $base_compile will cause this to fail
4614
+ # if we don't check for them as well.
4616
+ for z in $available_tags; do
4617
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
4618
+ # Evaluate the configuration.
4619
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
4621
+ for arg in $CC; do
4622
+ # Double-quote args containing other shell metacharacters.
4624
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
4628
+ CC_quoted="$CC_quoted $arg"
4631
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
4632
+ # The compiler in the base compile command matches
4633
+ # the one in the tagged configuration.
4634
+ # Assume this is the tagged configuration we want.
4641
+ # If $tagname still isn't set, then no tagged configuration
4642
+ # was found and let the user know that the "--tag" command
4643
+ # line option must be used.
4644
+ if test -z "$tagname"; then
4645
+ $echo "$modename: unable to infer tagged configuration"
4646
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
4647
+ exit $EXIT_FAILURE
4649
+# $echo "$modename: using $tagname tagged configuration"
4657
+# func_extract_an_archive dir oldlib
4658
+func_extract_an_archive ()
4660
+ f_ex_an_ar_dir="$1"; shift
4661
+ f_ex_an_ar_oldlib="$1"
4663
+ $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
4664
+ $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
4665
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
4668
+ $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
4669
+ exit $EXIT_FAILURE
4673
+# func_extract_archives gentop oldlib ...
4674
+func_extract_archives ()
4676
+ my_gentop="$1"; shift
4677
+ my_oldlibs=${1+"$@"}
4684
+ $show "${rm}r $my_gentop"
4685
+ $run ${rm}r "$my_gentop"
4686
+ $show "$mkdir $my_gentop"
4687
+ $run $mkdir "$my_gentop"
4689
+ if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
4693
+ for my_xlib in $my_oldlibs; do
4694
+ # Extract the objects.
4696
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
4697
+ *) my_xabs=`pwd`"/$my_xlib" ;;
4699
+ my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
4700
+ my_xlib_u=$my_xlib
4702
+ case " $extracted_archives " in
4704
+ extracted_serial=`expr $extracted_serial + 1`
4705
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
4709
+ extracted_archives="$extracted_archives $my_xlib_u"
4710
+ my_xdir="$my_gentop/$my_xlib_u"
4712
+ $show "${rm}r $my_xdir"
4713
+ $run ${rm}r "$my_xdir"
4714
+ $show "$mkdir $my_xdir"
4715
+ $run $mkdir "$my_xdir"
4717
+ if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
4722
+ $show "Extracting $my_xabs"
4723
+ # Do not bother doing anything if just a dry run
4724
+ if test -z "$run"; then
4725
+ darwin_orig_dir=`pwd`
4726
+ cd $my_xdir || exit $?
4727
+ darwin_archive=$my_xabs
4728
+ darwin_curdir=`pwd`
4729
+ darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
4730
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
4731
+ if test -n "$darwin_arches"; then
4732
+ darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
4734
+ $show "$darwin_base_archive has multiple architectures $darwin_arches"
4735
+ for darwin_arch in $darwin_arches ; do
4736
+ mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
4737
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
4738
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
4739
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
4740
+ cd "$darwin_curdir"
4741
+ $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
4742
+ done # $darwin_arches
4743
+ ## Okay now we have a bunch of thin objects, gotta fatten them up :)
4744
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
4747
+ for darwin_file in $darwin_filelist; do
4748
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
4749
+ lipo -create -output "$darwin_file" $darwin_files
4750
+ done # $darwin_filelist
4752
+ cd "$darwin_orig_dir"
4754
+ cd "$darwin_orig_dir"
4755
+ func_extract_an_archive "$my_xdir" "$my_xabs"
4756
+ fi # $darwin_arches
4760
+ func_extract_an_archive "$my_xdir" "$my_xabs"
4763
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4765
+ func_extract_archives_result="$my_oldobjs"
4767
# End of Shell function definitions
4768
#####################################
4771
+eval std_shrext=\"$shrext_cmds\"
4775
# Parse our command line options once, thoroughly.
4776
while test "$#" -gt 0
4778
@@ -176,12 +439,13 @@
4782
+ preserve_args="${preserve_args}=$arg"
4784
# Check whether tagname contains only valid characters
4787
$echo "$progname: invalid tag name: $tagname" 1>&2
4789
+ exit $EXIT_FAILURE
4793
@@ -191,10 +455,10 @@
4794
# not specially marked.
4797
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
4798
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
4799
taglist="$taglist $tagname"
4800
# Evaluate the configuration.
4801
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
4802
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
4804
$echo "$progname: ignoring unknown tag $tagname" 1>&2
4806
@@ -218,26 +482,28 @@
4810
- $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
4812
- $echo "Copyright (C) 2003 Free Software Foundation, Inc."
4813
- $echo "This is free software; see the source for copying conditions. There is NO"
4814
- $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
4817
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
4819
+Copyright (C) 2007 Free Software Foundation, Inc.
4820
+This is free software; see the source for copying conditions. There is NO
4821
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
4826
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
4827
+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
4828
# Now print the configurations for the tags.
4829
for tagname in $taglist; do
4830
- ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
4831
+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
4838
$echo "$progname: enabling shell trace mode"
4840
+ preserve_args="$preserve_args $arg"
4846
$echo "disable static libraries"
4852
--finish) mode="finish" ;;
4853
@@ -268,13 +534,19 @@
4857
+ preserve_args="$preserve_args $arg"
4860
- --tag) prevopt="--tag" prev=tag ;;
4864
+ preserve_args="$preserve_args --tag"
4867
set tag "$optarg" ${1+"$@"}
4870
+ preserve_args="$preserve_args --tag"
4876
$echo "$modename: unrecognized option \`$arg'" 1>&2
4879
+ exit $EXIT_FAILURE
4883
@@ -298,9 +570,21 @@
4884
if test -n "$prevopt"; then
4885
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
4888
+ exit $EXIT_FAILURE
4891
+case $disable_libs in
4895
+ build_libtool_libs=no
4896
+ build_old_libs=yes
4899
+ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
4903
# If this variable is set in any of the actions, the command in it
4904
# will be execed at the end. This prevents here-documents from being
4905
# left over by shells.
4907
# Infer the operation mode.
4908
if test -z "$mode"; then
4909
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
4910
- $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
4911
+ $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
4913
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
4916
if test -n "$execute_dlfiles" && test "$mode" != execute; then
4917
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
4920
+ exit $EXIT_FAILURE
4923
# Change the help message to a mode-specific one.
4924
@@ -369,13 +653,15 @@
4925
# Get the compilation command and the source file.
4927
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
4936
- case "$arg_mode" in
4939
# do not "continue". Instead, add this to base_compile
4941
@@ -394,24 +680,19 @@
4943
if test -n "$libobj" ; then
4944
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
4946
+ exit $EXIT_FAILURE
4953
- build_old_libs=yes
4954
+ -static | -prefer-pic | -prefer-non-pic)
4955
+ later="$later $arg"
4972
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
4974
save_ifs="$IFS"; IFS=','
4975
- for arg in $args; do
4976
+ for arg in $args; do
4979
# Double-quote args containing other shell metacharacters.
4980
@@ -462,7 +743,10 @@
4982
# Double-quote args containing other shell metacharacters.
4983
# Many Bourne shells cannot handle close brackets correctly
4984
- # in scan sets, so we specify it separately.
4985
+ # in scan sets, and some SunOS ksh mistreat backslash-escaping
4986
+ # in scan sets (worked around with variable expansion),
4987
+ # and furthermore cannot handle '|' '&' '(' ')' in scan sets
4988
+ # at all, so we specify them separately.
4989
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
4990
lastarg="\"$lastarg\""
4992
@@ -474,11 +758,11 @@
4995
$echo "$modename: you must specify an argument for -Xcompile"
4997
+ exit $EXIT_FAILURE
5000
$echo "$modename: you must specify a target with \`-o'" 1>&2
5002
+ exit $EXIT_FAILURE
5005
# Get the name of the library object.
5006
@@ -500,9 +784,10 @@
5007
*.class) xform=class ;;
5010
- *.f90) xform=f90 ;;
5011
+ *.[fF][09]?) xform=[fF][09]. ;;
5013
*.java) xform=java ;;
5014
+ *.obj) xform=obj ;;
5017
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
5018
@@ -511,51 +796,39 @@
5019
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
5021
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
5023
+ exit $EXIT_FAILURE
5027
- # Infer tagged configuration to use if any are available and
5028
- # if one wasn't chosen via the "--tag" command line option.
5029
- # Only attempt this if the compiler in the base compile
5030
- # command doesn't match the default compiler.
5031
- if test -n "$available_tags" && test -z "$tagname"; then
5032
- case $base_compile in
5033
- # Blanks in the command may have been stripped by the calling shell,
5034
- # but not from the CC environment variable when configure was run.
5035
- " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
5036
- # Blanks at the start of $base_compile will cause this to fail
5037
- # if we don't check for them as well.
5039
- for z in $available_tags; do
5040
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
5041
- # Evaluate the configuration.
5042
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
5043
- case "$base_compile " in
5044
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
5045
- # The compiler in the base compile command matches
5046
- # the one in the tagged configuration.
5047
- # Assume this is the tagged configuration we want.
5054
- # If $tagname still isn't set, then no tagged configuration
5055
- # was found and let the user know that the "--tag" command
5056
- # line option must be used.
5057
- if test -z "$tagname"; then
5058
- $echo "$modename: unable to infer tagged configuration"
5059
- $echo "$modename: specify a tag with \`--tag'" 1>&2
5062
-# $echo "$modename: using $tagname tagged configuration"
5064
+ func_infer_tag $base_compile
5066
+ for arg in $later; do
5069
+ build_old_libs=yes
5086
+ qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
5088
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5089
+ qlibobj="\"$qlibobj\"" ;;
5091
+ test "X$libobj" != "X$qlibobj" \
5092
+ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
5093
+ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
5094
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5095
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
5096
if test "X$xdir" = "X$obj"; then
5098
if test -z "$base_compile"; then
5099
$echo "$modename: you must specify a compilation command" 1>&2
5102
+ exit $EXIT_FAILURE
5105
# Delete any leftover library objects.
5109
$run $rm $removelist
5110
- trap "$run $rm $removelist; exit 1" 1 2 15
5111
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
5113
# On Cygwin there's no "real" PIC flag so we must build both object types
5116
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
5117
lockfile="$output_obj.lock"
5118
removelist="$removelist $output_obj $lockfile"
5119
- trap "$run $rm $removelist; exit 1" 1 2 15
5120
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
5125
# Lock this critical section if it is needed
5126
# We use this script file to make the link, it avoids creating a new file
5127
if test "$need_locks" = yes; then
5128
- until $run ln "$0" "$lockfile" 2>/dev/null; do
5129
+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do
5130
$show "Waiting for $lockfile to be removed"
5133
@@ -626,14 +899,19 @@
5136
$run $rm $removelist
5138
+ exit $EXIT_FAILURE
5140
- $echo $srcfile > "$lockfile"
5141
+ $echo "$srcfile" > "$lockfile"
5144
if test -n "$fix_srcfile_path"; then
5145
eval srcfile=\"$fix_srcfile_path\"
5147
+ qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
5149
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5150
+ qsrcfile="\"$qsrcfile\"" ;;
5153
$run $rm "$libobj" "${libobj}T"
5155
@@ -655,18 +933,18 @@
5156
fbsd_hideous_sh_bug=$base_compile
5158
if test "$pic_mode" != no; then
5159
- command="$base_compile $srcfile $pic_flag"
5160
+ command="$base_compile $qsrcfile $pic_flag"
5162
# Don't build PIC code
5163
- command="$base_compile $srcfile"
5164
+ command="$base_compile $qsrcfile"
5167
if test ! -d "${xdir}$objdir"; then
5168
$show "$mkdir ${xdir}$objdir"
5169
$run $mkdir ${xdir}$objdir
5171
- if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
5174
+ if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
5180
if $run eval "$command"; then :
5182
test -n "$output_obj" && $run $rm $removelist
5184
+ exit $EXIT_FAILURE
5187
if test "$need_locks" = warn &&
5191
$run $rm $removelist
5193
+ exit $EXIT_FAILURE
5196
# Just move the object if needed, then go on to compile the next one
5197
@@ -722,7 +1000,9 @@
5200
# Allow error messages only from the first compilation.
5201
- suppress_output=' >/dev/null 2>&1'
5202
+ if test "$suppress_opt" = yes; then
5203
+ suppress_output=' >/dev/null 2>&1'
5206
# No PIC object so indicate it doesn't exist in the libtool
5208
@@ -736,9 +1016,9 @@
5209
if test "$build_old_libs" = yes; then
5210
if test "$pic_mode" != yes; then
5211
# Don't build PIC code
5212
- command="$base_compile $srcfile"
5213
+ command="$base_compile $qsrcfile"
5215
- command="$base_compile $srcfile $pic_flag"
5216
+ command="$base_compile $qsrcfile $pic_flag"
5218
if test "$compiler_c_o" = yes; then
5219
command="$command -o $obj"
5220
@@ -751,7 +1031,7 @@
5221
if $run eval "$command"; then :
5223
$run $rm $removelist
5225
+ exit $EXIT_FAILURE
5228
if test "$need_locks" = warn &&
5229
@@ -771,7 +1051,7 @@
5232
$run $rm $removelist
5234
+ exit $EXIT_FAILURE
5237
# Just move the object if needed
5238
@@ -809,7 +1089,7 @@
5239
$run $rm "$lockfile"
5243
+ exit $EXIT_SUCCESS
5247
@@ -835,7 +1115,7 @@
5250
libtool_args="$nonopt"
5251
- base_compile="$nonopt"
5252
+ base_compile="$nonopt $@"
5253
compile_command="$nonopt"
5254
finalize_command="$nonopt"
5256
@@ -847,7 +1127,6 @@
5264
@@ -868,6 +1147,8 @@
5268
+ notinst_path= # paths that contain not-installed libtool libraries
5269
+ precious_files_regex=
5270
prefer_static_libs=no
5273
@@ -881,26 +1162,38 @@
5277
+ func_infer_tag $base_compile
5279
# We need to know -static, to get the right output filenames.
5283
- -all-static | -static)
5284
- if test "X$arg" = "X-all-static"; then
5285
+ -all-static | -static | -static-libtool-libs)
5288
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
5289
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
5291
if test -n "$link_static_flag"; then
5292
dlopen_self=$dlopen_self_static
5295
+ prefer_static_libs=yes
5298
if test -z "$pic_flag" && test -n "$link_static_flag"; then
5299
dlopen_self=$dlopen_self_static
5302
+ prefer_static_libs=built
5304
+ -static-libtool-libs)
5305
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
5306
+ dlopen_self=$dlopen_self_static
5308
+ prefer_static_libs=yes
5311
build_libtool_libs=no
5313
- prefer_static_libs=yes
5317
@@ -912,7 +1205,6 @@
5318
# Go through the arguments, transforming them on the way.
5319
while test "$#" -gt 0; do
5321
- base_compile="$base_compile $arg"
5324
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5325
@@ -976,7 +1268,7 @@
5326
export_symbols="$arg"
5327
if test ! -f "$arg"; then
5328
$echo "$modename: symbol file \`$arg' does not exist"
5330
+ exit $EXIT_FAILURE
5334
@@ -991,6 +1283,11 @@
5339
+ precious_files_regex="$arg"
5346
@@ -1023,7 +1320,7 @@
5347
test "$pic_object" = none && \
5348
test "$non_pic_object" = none; then
5349
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
5351
+ exit $EXIT_FAILURE
5354
# Extract subdirectory from the argument.
5355
@@ -1071,12 +1368,17 @@
5356
if test -z "$pic_object" || test "$pic_object" = none ; then
5357
arg="$non_pic_object"
5360
+ # If the PIC object exists, use it instead.
5361
+ # $xdir was prepended to $pic_object above.
5362
+ non_pic_object="$pic_object"
5363
+ non_pic_objects="$non_pic_objects $non_pic_object"
5366
# Only an error if not doing a dry-run.
5367
if test -z "$run"; then
5368
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
5370
+ exit $EXIT_FAILURE
5374
@@ -1097,7 +1399,7 @@
5377
$echo "$modename: link input file \`$save_arg' does not exist"
5379
+ exit $EXIT_FAILURE
5383
@@ -1109,7 +1411,7 @@
5384
[\\/]* | [A-Za-z]:[\\/]*) ;;
5386
$echo "$modename: only absolute run-paths are allowed" 1>&2
5388
+ exit $EXIT_FAILURE
5391
if test "$prev" = rpath; then
5392
@@ -1149,16 +1451,15 @@
5393
finalize_command="$finalize_command $qarg"
5399
- case "$deplibs " in
5400
- *" $qarg.ltframework "*) ;;
5401
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
5407
+ shrext_cmds="$arg"
5411
+ darwin_framework|darwin_framework_skip)
5412
+ test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
5413
+ compile_command="$compile_command $arg"
5414
+ finalize_command="$finalize_command $arg"
5418
@@ -1210,7 +1511,7 @@
5419
-export-symbols | -export-symbols-regex)
5420
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
5421
$echo "$modename: more than one -exported-symbols argument is not allowed"
5423
+ exit $EXIT_FAILURE
5425
if test "X$arg" = "X-export-symbols"; then
5427
@@ -1220,6 +1521,18 @@
5431
+ -framework|-arch|-isysroot)
5433
+ *" ${arg} ${1} "* | *" ${arg} ${1} "*)
5434
+ prev=darwin_framework_skip ;;
5435
+ *) compiler_flags="$compiler_flags $arg"
5436
+ prev=darwin_framework ;;
5438
+ compile_command="$compile_command $arg"
5439
+ finalize_command="$finalize_command $arg"
5446
@@ -1246,7 +1559,8 @@
5447
absdir=`cd "$dir" && pwd`
5448
if test -z "$absdir"; then
5449
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
5452
+ notinst_path="$notinst_path $dir"
5456
@@ -1260,10 +1574,15 @@
5459
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
5460
+ testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
5461
case :$dllsearchpath: in
5463
*) dllsearchpath="$dllsearchpath:$dir";;
5465
+ case :$dllsearchpath: in
5466
+ *":$testbindir:"*) ;;
5467
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
5472
@@ -1272,26 +1591,35 @@
5474
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
5476
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
5477
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
5478
# These systems don't actually have a C or math library (as such)
5481
- *-*-mingw* | *-*-os2*)
5483
# These systems don't actually have a C library (as such)
5484
test "X$arg" = "X-lc" && continue
5486
- *-*-openbsd* | *-*-freebsd*)
5487
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5488
# Do not include libc due to us having libc/libc_r.
5489
test "X$arg" = "X-lc" && continue
5491
*-*-rhapsody* | *-*-darwin1.[012])
5492
# Rhapsody C and math libraries are in the System framework
5493
- deplibs="$deplibs System.ltframework"
5494
+ deplibs="$deplibs -framework System"
5497
+ *-*-sco3.2v5* | *-*-sco5v6*)
5498
+ # Causes problems with __ctype
5499
+ test "X$arg" = "X-lc" && continue
5501
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
5502
+ # Compiler inserts libc in the correct place for threads to work
5503
+ test "X$arg" = "X-lc" && continue
5506
elif test "X$arg" = "X-lc_r"; then
5509
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
5510
# Do not include libc_r directly, use -pthread flag.
5513
@@ -1301,18 +1629,42 @@
5517
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
5518
+ # classes, name mangling, and exception handling.
5520
+ compile_command="$compile_command $arg"
5521
+ compiler_flags="$compiler_flags $arg"
5522
+ finalize_command="$finalize_command $arg"
5527
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5528
+ compiler_flags="$compiler_flags $arg"
5529
+ compile_command="$compile_command $arg"
5530
+ finalize_command="$finalize_command $arg"
5539
- # gcc -m* arguments should be passed to the linker via $compiler_flags
5540
- # in order to pass architecture information to the linker
5541
- # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
5542
- # but this is not reliable with gcc because gcc may use -mfoo to
5543
- # select a different linker, different libraries, etc, while
5544
- # -Wl,-mfoo simply passes -mfoo to the linker.
5546
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
5547
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
5548
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
5549
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
5550
+ # -q* pass through compiler args for the IBM compiler
5551
+ # -m* pass through architecture-specific compiler args for GCC
5552
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
5553
+ # compiler args for GCC
5554
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
5555
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
5556
+ # @file GCC response files
5557
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
5558
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
5560
# Unknown arguments in both finalize_command and compile_command need
5561
# to be aesthetically quoted because they are evaled later.
5562
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5563
@@ -1323,9 +1675,7 @@
5565
compile_command="$compile_command $arg"
5566
finalize_command="$finalize_command $arg"
5567
- if test "$with_gcc" = "yes" ; then
5568
- compiler_flags="$compiler_flags $arg"
5570
+ compiler_flags="$compiler_flags $arg"
5574
@@ -1341,9 +1691,9 @@
5578
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
5579
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
5580
# The PATH hackery in wrapper scripts is required on Windows
5581
- # in order for the loader to find any dlls it needs.
5582
+ # and Darwin in order for the loader to find any dlls it needs.
5583
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
5584
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
5586
@@ -1365,6 +1715,11 @@
5590
+ -precious-files-regex)
5591
+ prev=precious_regex
5598
@@ -1387,7 +1742,7 @@
5599
[\\/]* | [A-Za-z]:[\\/]*) ;;
5601
$echo "$modename: only absolute run-paths are allowed" 1>&2
5603
+ exit $EXIT_FAILURE
5607
@@ -1397,7 +1752,7 @@
5612
+ -static | -static-libtool-libs)
5613
# The effects of -static are defined in a previous loop.
5614
# We used to do the same as -all-static on platforms that
5615
# didn't have a PIC flag, but the assumption that the effects
5616
@@ -1473,11 +1828,6 @@
5625
# Some other compiler flag.
5627
# Unknown arguments in both finalize_command and compile_command need
5628
@@ -1488,7 +1838,6 @@
5632
- add_flags="$add_flags $arg"
5636
@@ -1516,7 +1865,7 @@
5637
test "$pic_object" = none && \
5638
test "$non_pic_object" = none; then
5639
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
5641
+ exit $EXIT_FAILURE
5644
# Extract subdirectory from the argument.
5645
@@ -1564,12 +1913,17 @@
5646
if test -z "$pic_object" || test "$pic_object" = none ; then
5647
arg="$non_pic_object"
5650
+ # If the PIC object exists, use it instead.
5651
+ # $xdir was prepended to $pic_object above.
5652
+ non_pic_object="$pic_object"
5653
+ non_pic_objects="$non_pic_objects $non_pic_object"
5656
# Only an error if not doing a dry-run.
5657
if test -z "$run"; then
5658
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
5660
+ exit $EXIT_FAILURE
5664
@@ -1623,7 +1977,6 @@
5668
- add_flags="$add_flags $arg"
5672
@@ -1637,48 +1990,7 @@
5673
if test -n "$prev"; then
5674
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
5679
- # Infer tagged configuration to use if any are available and
5680
- # if one wasn't chosen via the "--tag" command line option.
5681
- # Only attempt this if the compiler in the base link
5682
- # command doesn't match the default compiler.
5683
- if test -n "$available_tags" && test -z "$tagname"; then
5684
- case $base_compile in
5685
- # Blanks in the command may have been stripped by the calling shell,
5686
- # but not from the CC environment variable when configure was run.
5687
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
5688
- # Blanks at the start of $base_compile will cause this to fail
5689
- # if we don't check for them as well.
5691
- for z in $available_tags; do
5692
- if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
5693
- # Evaluate the configuration.
5694
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
5695
- case $base_compile in
5696
- "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
5697
- # The compiler in $compile_command matches
5698
- # the one in the tagged configuration.
5699
- # Assume this is the tagged configuration we want.
5706
- # If $tagname still isn't set, then no tagged configuration
5707
- # was found and let the user know that the "--tag" command
5708
- # line option must be used.
5709
- if test -z "$tagname"; then
5710
- $echo "$modename: unable to infer tagged configuration"
5711
- $echo "$modename: specify a tag with \`--tag'" 1>&2
5714
-# $echo "$modename: using $tagname tagged configuration"
5718
+ exit $EXIT_FAILURE
5721
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
5722
@@ -1711,9 +2023,9 @@
5723
if test ! -d "$output_objdir"; then
5724
$show "$mkdir $output_objdir"
5725
$run $mkdir $output_objdir
5727
- if test "$status" -ne 0 && test ! -d "$output_objdir"; then
5730
+ if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
5735
@@ -1722,7 +2034,7 @@
5737
$echo "$modename: you must specify an output file" 1>&2
5740
+ exit $EXIT_FAILURE
5742
*.$libext) linkmode=oldlib ;;
5743
*.lo | *.$objext) linkmode=obj ;;
5744
@@ -1732,7 +2044,7 @@
5747
*cygwin* | *mingw* | *pw32*)
5748
- # don't eliminate duplcations in $postdeps and $predeps
5749
+ # don't eliminate duplications in $postdeps and $predeps
5750
duplicate_compiler_generated_deps=yes
5753
@@ -1776,7 +2088,6 @@
5755
need_relink=no # whether we're linking any uninstalled libtool libraries
5756
notinst_deplibs= # not-installed libtool libraries
5757
- notinst_path= # paths that contain not-installed libtool libraries
5761
@@ -1785,7 +2096,7 @@
5764
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
5766
+ exit $EXIT_FAILURE
5770
@@ -1811,7 +2122,10 @@
5772
dlopen) libs="$dlfiles" ;;
5773
dlpreopen) libs="$dlprefiles" ;;
5774
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
5776
+ libs="$deplibs %DEPLIBS%"
5777
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
5781
if test "$pass" = dlopen; then
5782
@@ -1823,18 +2137,23 @@
5786
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
5787
+ if test "$linkmode,$pass" = "prog,link"; then
5788
+ compile_deplibs="$deplib $compile_deplibs"
5789
+ finalize_deplibs="$deplib $finalize_deplibs"
5791
+ compiler_flags="$compiler_flags $deplib"
5796
if test "$linkmode" != lib && test "$linkmode" != prog; then
5797
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
5800
- if test "$pass" = conv && test "$allow_undefined" = yes; then
5801
- deplibs="$deplib $deplibs"
5804
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
5805
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
5806
- for search_ext in .la $shrext .so .a; do
5807
+ for search_ext in .la $std_shrext .so .a; do
5808
# Search the libtool library
5809
lib="$searchdir/lib${name}${search_ext}"
5810
if test -f "$lib"; then
5811
@@ -1895,18 +2214,6 @@
5816
- if test "$linkmode,$pass" = "prog,link"; then
5817
- compile_deplibs="$deplib $compile_deplibs"
5818
- finalize_deplibs="$deplib $finalize_deplibs"
5820
- deplibs="$deplib $deplibs"
5821
- if test "$linkmode" = lib ; then
5822
- newdependency_libs="$deplib $newdependency_libs"
5830
@@ -1922,11 +2229,11 @@
5832
if test "$pass" = scan; then
5833
deplibs="$deplib $deplibs"
5834
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
5836
compile_deplibs="$deplib $compile_deplibs"
5837
finalize_deplibs="$deplib $finalize_deplibs"
5839
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
5842
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
5843
@@ -1954,7 +2261,22 @@
5847
- if test "$deplibs_check_method" != pass_all; then
5849
+ case $deplibs_check_method in
5851
+ set dummy $deplibs_check_method
5852
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
5853
+ if eval $echo \"$deplib\" 2>/dev/null \
5855
+ | $EGREP "$match_pattern_regex" > /dev/null; then
5863
+ if test "$valid_a_lib" != yes; then
5865
$echo "*** Warning: Trying to link with static lib archive $deplib."
5866
$echo "*** I have the capability to make that library automatically link in when"
5867
@@ -2004,15 +2326,15 @@
5869
if test "$found" = yes || test -f "$lib"; then :
5871
- $echo "$modename: cannot find the library \`$lib'" 1>&2
5873
+ $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
5874
+ exit $EXIT_FAILURE
5877
# Check to see that this really is a libtool archive.
5878
if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5880
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5882
+ exit $EXIT_FAILURE
5885
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
5886
@@ -2028,6 +2350,8 @@
5887
# it will not redefine variables installed, or shouldnotlink
5895
@@ -2035,13 +2359,6 @@
5901
- # Convert "-framework foo" to "foo.ltframework" in dependency_libs
5902
- test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
5906
if test "$linkmode,$pass" = "lib,link" ||
5907
test "$linkmode,$pass" = "prog,scan" ||
5908
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
5909
@@ -2052,33 +2369,32 @@
5910
if test "$pass" = conv; then
5911
# Only check for convenience libraries
5912
deplibs="$lib $deplibs"
5914
- for deplib in $dependency_libs; do
5915
- #echo "Adding $deplib to \$deplibs"
5916
- deplibs="$deplib $deplibs"
5917
- if test "X$duplicate_deps" = "Xyes" ; then
5918
- case "$tmp_libs " in
5919
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5922
- tmp_libs="$tmp_libs $deplib"
5924
if test -z "$libdir"; then
5925
if test -z "$old_library"; then
5926
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
5928
+ exit $EXIT_FAILURE
5930
# It is a libtool convenience library, so add in its objects.
5931
convenience="$convenience $ladir/$objdir/$old_library"
5932
old_convenience="$old_convenience $ladir/$objdir/$old_library"
5934
+ for deplib in $dependency_libs; do
5935
+ deplibs="$deplib $deplibs"
5936
+ if test "X$duplicate_deps" = "Xyes" ; then
5937
+ case "$tmp_libs " in
5938
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
5941
+ tmp_libs="$tmp_libs $deplib"
5943
elif test "$linkmode" != prog && test "$linkmode" != lib; then
5944
$echo "$modename: \`$lib' is not a convenience library" 1>&2
5946
+ exit $EXIT_FAILURE
5953
# Get the name of the library we link against.
5955
for l in $old_library $library_names; do
5956
@@ -2086,16 +2402,18 @@
5958
if test -z "$linklib"; then
5959
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
5961
+ exit $EXIT_FAILURE
5964
# This library was specified with -dlopen.
5965
if test "$pass" = dlopen; then
5966
if test -z "$libdir"; then
5967
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
5969
+ exit $EXIT_FAILURE
5971
- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
5972
+ if test -z "$dlname" ||
5973
+ test "$dlopen_support" != yes ||
5974
+ test "$build_libtool_libs" = no; then
5975
# If there is no dlname, no dlopen support or we're linking
5976
# statically, we need to preload. We also need to preload any
5977
# dependent libraries so libltdl's deplib preloader doesn't
5978
@@ -2132,11 +2450,19 @@
5982
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
5984
- dir="$ladir/$objdir"
5985
- absdir="$abs_ladir/$objdir"
5986
- # Remove this search path later
5987
- notinst_path="$notinst_path $abs_ladir"
5988
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
5990
+ absdir="$abs_ladir"
5991
+ # Remove this search path later
5992
+ notinst_path="$notinst_path $abs_ladir"
5994
+ dir="$ladir/$objdir"
5995
+ absdir="$abs_ladir/$objdir"
5996
+ # Remove this search path later
5997
+ notinst_path="$notinst_path $abs_ladir"
5999
fi # $installed = yes
6000
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
6002
@@ -2144,7 +2470,7 @@
6003
if test "$pass" = dlpreopen; then
6004
if test -z "$libdir"; then
6005
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
6007
+ exit $EXIT_FAILURE
6009
# Prefer using a static library (so that no silly _DYNAMIC symbols
6010
# are required to link).
6011
@@ -2171,7 +2497,7 @@
6017
if test "$linkmode" = prog && test "$pass" != link; then
6018
newlib_search_path="$newlib_search_path $ladir"
6019
deplibs="$lib $deplibs"
6020
@@ -2207,14 +2533,16 @@
6022
if test "$linkmode,$pass" = "prog,link"; then
6023
if test -n "$library_names" &&
6024
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
6025
+ { { test "$prefer_static_libs" = no ||
6026
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
6027
+ test -z "$old_library"; }; then
6028
# We need to hardcode the library path
6029
- if test -n "$shlibpath_var"; then
6030
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
6031
# Make sure the rpath contains only unique directories.
6032
case "$temp_rpath " in
6035
- *) temp_rpath="$temp_rpath $dir" ;;
6036
+ *) temp_rpath="$temp_rpath $absdir" ;;
6040
@@ -2251,24 +2579,29 @@
6043
link_static=no # Whether the deplib will be linked statically
6044
+ use_static_libs=$prefer_static_libs
6045
+ if test "$use_static_libs" = built && test "$installed" = yes ; then
6046
+ use_static_libs=no
6048
if test -n "$library_names" &&
6049
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
6050
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
6051
if test "$installed" = no; then
6052
notinst_deplibs="$notinst_deplibs $lib"
6055
# This is a shared library
6057
- # Warn about portability, can't link against -module's on some systems (darwin)
6058
- if test "$shouldnotlink" = yes && test "$pass" = link ; then
6060
+ # Warn about portability, can't link against -module's on
6061
+ # some systems (darwin)
6062
+ if test "$shouldnotlink" = yes && test "$pass" = link ; then
6064
if test "$linkmode" = prog; then
6065
$echo "*** Warning: Linking the executable $output against the loadable module"
6067
$echo "*** Warning: Linking the shared library $output against the loadable module"
6069
- $echo "*** $linklib is not portable!"
6071
+ $echo "*** $linklib is not portable!"
6073
if test "$linkmode" = lib &&
6074
test "$hardcode_into_libs" = yes; then
6075
# Hardcode the library path.
6076
@@ -2326,9 +2659,10 @@
6078
$show "extracting exported symbol list from \`$soname'"
6079
save_ifs="$IFS"; IFS='~'
6080
- eval cmds=\"$extract_expsyms_cmds\"
6081
+ cmds=$extract_expsyms_cmds
6082
for cmd in $cmds; do
6086
$run eval "$cmd" || exit $?
6088
@@ -2339,9 +2673,10 @@
6089
if test -f "$output_objdir/$newlib"; then :; else
6090
$show "generating import library for \`$soname'"
6091
save_ifs="$IFS"; IFS='~'
6092
- eval cmds=\"$old_archive_from_expsyms_cmds\"
6093
+ cmds=$old_archive_from_expsyms_cmds
6094
for cmd in $cmds; do
6098
$run eval "$cmd" || exit $?
6100
@@ -2362,11 +2697,15 @@
6101
if test "$hardcode_direct" = no; then
6104
- *-*-sco3.2v5* ) add_dir="-L$dir" ;;
6105
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6106
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
6107
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6108
+ *-*-unixware7*) add_dir="-L$dir" ;;
6110
- # if the lib is a module then we can not link against it, someone
6111
- # is ignoring the new warnings I added
6112
- if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
6113
+ # if the lib is a module then we can not link against
6114
+ # it, someone is ignoring the new warnings I added
6115
+ if /usr/bin/file -L $add 2> /dev/null |
6116
+ $EGREP ": [^:]* bundle" >/dev/null ; then
6117
$echo "** Warning, lib $linklib is a module, not a shared library"
6118
if test -z "$old_library" ; then
6120
@@ -2374,7 +2713,7 @@
6121
$echo "** The link will probably fail, sorry"
6123
add="$dir/$old_library"
6128
elif test "$hardcode_minus_L" = no; then
6129
@@ -2397,9 +2736,9 @@
6131
# Try looking first in the location we're being installed to.
6132
if test -n "$inst_prefix_dir"; then
6136
- add_dir="-L$inst_prefix_dir$libdir $add_dir"
6137
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
6141
@@ -2416,7 +2755,7 @@
6143
if test "$lib_linked" != yes; then
6144
$echo "$modename: configuration error: unsupported hardcode properties"
6146
+ exit $EXIT_FAILURE
6149
if test -n "$add_shlibpath"; then
6150
@@ -2459,7 +2798,8 @@
6153
elif test "$hardcode_automatic" = yes; then
6154
- if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
6155
+ if test -n "$inst_prefix_dir" &&
6156
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
6157
add="$inst_prefix_dir$libdir/$linklib"
6159
add="$libdir/$linklib"
6160
@@ -2469,9 +2809,9 @@
6162
# Try looking first in the location we're being installed to.
6163
if test -n "$inst_prefix_dir"; then
6167
- add_dir="-L$inst_prefix_dir$libdir $add_dir"
6168
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
6172
@@ -2530,17 +2870,16 @@
6176
- convenience="$convenience $dir/$old_library"
6177
- old_convenience="$old_convenience $dir/$old_library"
6178
deplibs="$dir/$old_library $deplibs"
6181
fi # link shared/static library?
6183
if test "$linkmode" = lib; then
6184
- #if test -n "$dependency_libs" &&
6185
- # { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
6186
- # test "$link_static" = yes; }; then
6187
+ if test -n "$dependency_libs" &&
6188
+ { test "$hardcode_into_libs" != yes ||
6189
+ test "$build_old_libs" = yes ||
6190
+ test "$link_static" = yes; }; then
6191
# Extract -R from dependency_libs
6193
for libdir in $dependency_libs; do
6194
@@ -2554,7 +2893,7 @@
6197
dependency_libs="$temp_deplibs"
6201
newlib_search_path="$newlib_search_path $absdir"
6202
# Link against this library
6203
@@ -2596,20 +2935,18 @@
6204
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6205
if test -z "$libdir"; then
6206
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6208
+ exit $EXIT_FAILURE
6210
if test "$absdir" != "$libdir"; then
6211
- # Sure, some shells/systems don't implement the -ef.
6212
- # Those will have to live with the warning.
6213
- test "$absdir" -ef "$libdir" > /dev/null 2>&1 ||
6214
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
6215
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
6222
- # we do not want to link against static libs, but need to link against shared
6223
+ # we do not want to link against static libs,
6224
+ # but need to link against shared
6225
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
6226
if test -n "$deplibrary_names" ; then
6227
for tmp in $deplibrary_names ; do
6228
@@ -2617,55 +2954,45 @@
6230
if test -f "$path/$depdepl" ; then
6231
depdepl="$path/$depdepl"
6234
# do not add paths which are already there
6235
case " $newlib_search_path " in
6237
*) newlib_search_path="$newlib_search_path $path";;
6256
- # Again, we only want to link against shared libraries
6257
- eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
6258
- for tmp in $newlib_search_path ; do
6259
- if test -f "$tmp/lib$tmp_libs.dylib" ; then
6260
- eval depdepl="$tmp/lib$tmp_libs.dylib"
6265
+ # Again, we only want to link against shared libraries
6266
+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
6267
+ for tmp in $newlib_search_path ; do
6268
+ if test -f "$tmp/lib$tmp_libs.dylib" ; then
6269
+ eval depdepl="$tmp/lib$tmp_libs.dylib"
6289
case " $deplibs " in
6290
- *" $depdepl "*) ;;
6291
- *) deplibs="$deplibs $depdepl" ;;
6293
- case " $deplibs " in
6295
- *) deplibs="$deplibs $path" ;;
6296
+ *) deplibs="$path $deplibs" ;;
6298
+ case " $deplibs " in
6299
+ *" $depdepl "*) ;;
6300
+ *) deplibs="$depdepl $deplibs" ;;
6303
fi # link_all_deplibs != no
6304
@@ -2752,7 +3079,8 @@
6305
eval $var=\"$tmp_libs\"
6308
- # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
6309
+ # Last step: remove runtime libs from dependency_libs
6310
+ # (they stay in deplibs)
6312
for i in $dependency_libs ; do
6313
case " $predeps $postdeps $compiler_lib_search_path " in
6314
@@ -2812,19 +3140,19 @@
6317
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
6318
- eval shared_ext=\"$shrext\"
6319
+ eval shared_ext=\"$shrext_cmds\"
6320
eval libname=\"$libname_spec\"
6323
if test "$module" = no; then
6324
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
6327
+ exit $EXIT_FAILURE
6329
if test "$need_lib_prefix" != no; then
6330
# Add the "lib" prefix for modules if required
6331
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
6332
- eval shared_ext=\"$shrext\"
6333
+ eval shared_ext=\"$shrext_cmds\"
6334
eval libname=\"$libname_spec\"
6336
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
6337
@@ -2835,7 +3163,7 @@
6338
if test -n "$objs"; then
6339
if test "$deplibs_check_method" != pass_all; then
6340
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
6342
+ exit $EXIT_FAILURE
6345
$echo "*** Warning: Linking the shared library $output against the non-libtool"
6346
@@ -2883,13 +3211,13 @@
6347
if test -n "$8"; then
6348
$echo "$modename: too many parameters to \`-version-info'" 1>&2
6351
+ exit $EXIT_FAILURE
6354
# convert absolute version numbers to libtool ages
6355
# this retains compatibility with .la files and attempts
6356
# to make the code below a bit more comprehensible
6359
case $vinfo_number in
6362
@@ -2903,7 +3231,7 @@
6363
# which has an extra 1 added just for fun
6365
case $version_type in
6366
- darwin|linux|osf|windows)
6367
+ darwin|linux|osf|windows|none)
6368
current=`expr $number_major + $number_minor`
6370
revision="$number_revision"
6371
@@ -2914,9 +3242,15 @@
6375
- current=`expr $number_major + $number_minor - 1`
6376
+ current=`expr $number_major + $number_minor`
6378
revision="$number_minor"
6379
+ lt_irix_increment=no
6382
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
6383
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
6384
+ exit $EXIT_FAILURE
6388
@@ -2929,36 +3263,36 @@
6390
# Check that each of the things are valid numbers.
6392
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
6393
+ 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]) ;;
6395
- $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
6396
+ $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
6397
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
6399
+ exit $EXIT_FAILURE
6404
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
6405
+ 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]) ;;
6407
- $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
6408
+ $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
6409
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
6411
+ exit $EXIT_FAILURE
6416
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
6417
+ 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]) ;;
6419
- $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
6420
+ $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
6421
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
6423
+ exit $EXIT_FAILURE
6427
if test "$age" -gt "$current"; then
6428
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
6429
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
6431
+ exit $EXIT_FAILURE
6434
# Calculate the version variables.
6435
@@ -2975,6 +3309,7 @@
6436
versuffix="$major.$age.$revision"
6437
# Darwin ld doesn't like 0 for these options...
6438
minor_current=`expr $current + 1`
6439
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
6440
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
6443
@@ -2989,8 +3324,11 @@
6447
- major=`expr $current - $age + 1`
6449
+ if test "X$lt_irix_increment" = "Xno"; then
6450
+ major=`expr $current - $age`
6452
+ major=`expr $current - $age + 1`
6454
case $version_type in
6455
nonstopux) verstring_prefix=nonstopux ;;
6456
*) verstring_prefix=sgi ;;
6457
@@ -3047,7 +3385,7 @@
6459
$echo "$modename: unknown library version type \`$version_type'" 1>&2
6460
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
6462
+ exit $EXIT_FAILURE
6466
@@ -3098,9 +3436,15 @@
6467
tempremovelist=`$echo "$output_objdir/*"`
6468
for p in $tempremovelist; do
6470
- *.$objext | *$exeext)
6473
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
6474
+ if test "X$precious_files_regex" != "X"; then
6475
+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
6480
removelist="$removelist $p"
6483
@@ -3121,11 +3465,11 @@
6486
# Eliminate all temporary directories.
6487
- for path in $notinst_path; do
6488
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
6489
- deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
6490
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
6492
+ #for path in $notinst_path; do
6493
+ # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
6494
+ # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
6495
+ # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
6498
if test -n "$xrpath"; then
6499
# If the user specified any rpath flags, then add them.
6500
@@ -3137,7 +3481,7 @@
6501
*) finalize_rpath="$finalize_rpath $libdir" ;;
6504
- if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
6505
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
6506
dependency_libs="$temp_xrpath $dependency_libs"
6509
@@ -3170,14 +3514,19 @@
6511
*-*-rhapsody* | *-*-darwin1.[012])
6512
# Rhapsody C library is in the System framework
6513
- deplibs="$deplibs System.ltframework"
6514
+ deplibs="$deplibs -framework System"
6517
# Don't link with libc until the a.out ld.so is fixed.
6519
- *-*-openbsd* | *-*-freebsd*)
6520
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
6521
# Do not include libc due to us having libc/libc_r.
6522
- test "X$arg" = "X-lc" && continue
6524
+ *-*-sco3.2v5* | *-*-sco5v6*)
6525
+ # Causes problems with __ctype
6527
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
6528
+ # Compiler inserts libc in the correct place for threads to work
6531
# Add libc to deplibs on all other systems if necessary.
6532
@@ -3221,13 +3570,12 @@
6533
int main() { return 0; }
6536
- $LTCC -o conftest conftest.c $deplibs
6537
- if test "$?" -eq 0 ; then
6538
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
6539
ldd_output=`ldd conftest`
6540
for i in $deplibs; do
6541
- name="`expr $i : '-l\(.*\)'`"
6542
+ name=`expr $i : '-l\(.*\)'`
6543
# If $name is empty we are operating on a -L argument.
6544
- if test "$name" != "" && test "$name" -ne "0"; then
6545
+ if test "$name" != "" && test "$name" != "0"; then
6546
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6547
case " $predeps $postdeps " in
6549
@@ -3262,13 +3610,11 @@
6550
# Error occurred in the first compile. Let's try to salvage
6551
# the situation: Compile a separate program for each library.
6552
for i in $deplibs; do
6553
- name="`expr $i : '-l\(.*\)'`"
6554
+ name=`expr $i : '-l\(.*\)'`
6555
# If $name is empty we are operating on a -L argument.
6556
if test "$name" != "" && test "$name" != "0"; then
6558
- $LTCC -o conftest conftest.c $i
6560
- if test "$?" -eq 0 ; then
6561
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
6562
ldd_output=`ldd conftest`
6563
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6564
case " $predeps $postdeps " in
6565
@@ -3300,7 +3646,7 @@
6568
$echo "*** Warning! Library $i is needed by this library but I was not able to"
6569
- $echo "*** make it link in! You will probably need to install it or some"
6570
+ $echo "*** make it link in! You will probably need to install it or some"
6571
$echo "*** library that it depends on before this library will be fully"
6572
$echo "*** functional. Installing it before continuing would be even better."
6574
@@ -3314,7 +3660,7 @@
6575
set dummy $deplibs_check_method
6576
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
6577
for a_deplib in $deplibs; do
6578
- name="`expr $a_deplib : '-l\(.*\)'`"
6579
+ name=`expr $a_deplib : '-l\(.*\)'`
6580
# If $name is empty we are operating on a -L argument.
6581
if test "$name" != "" && test "$name" != "0"; then
6582
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6583
@@ -3383,7 +3729,7 @@
6584
set dummy $deplibs_check_method
6585
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
6586
for a_deplib in $deplibs; do
6587
- name="`expr $a_deplib : '-l\(.*\)'`"
6588
+ name=`expr $a_deplib : '-l\(.*\)'`
6589
# If $name is empty we are operating on a -L argument.
6590
if test -n "$name" && test "$name" != "0"; then
6591
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
6592
@@ -3463,7 +3809,7 @@
6594
*-*-rhapsody* | *-*-darwin1.[012])
6595
# On Rhapsody replace the C library is the System framework
6596
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
6597
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
6601
@@ -3509,17 +3855,39 @@
6605
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
6608
- newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6609
- dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6612
# Done checking deplibs!
6617
+ # move library search paths that coincide with paths to not yet
6618
+ # installed libraries to the beginning of the library search list
6620
+ for path in $notinst_path; do
6621
+ case " $new_libs " in
6622
+ *" -L$path/$objdir "*) ;;
6624
+ case " $deplibs " in
6625
+ *" -L$path/$objdir "*)
6626
+ new_libs="$new_libs -L$path/$objdir" ;;
6631
+ for deplib in $deplibs; do
6634
+ case " $new_libs " in
6636
+ *) new_libs="$new_libs $deplib" ;;
6639
+ *) new_libs="$new_libs $deplib" ;;
6642
+ deplibs="$new_libs"
6645
# All the library-specific variables (install_libdir is set above).
6648
@@ -3532,7 +3900,7 @@
6651
rpath="$finalize_rpath"
6652
- test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
6653
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
6654
for libdir in $rpath; do
6655
if test -n "$hardcode_libdir_flag_spec"; then
6656
if test -n "$hardcode_libdir_separator"; then
6657
@@ -3564,7 +3932,10 @@
6658
test -n "$hardcode_libdirs"; then
6659
libdir="$hardcode_libdirs"
6660
if test -n "$hardcode_libdir_flag_spec_ld"; then
6661
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6662
+ case $archive_cmds in
6663
+ *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
6664
+ *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
6667
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6669
@@ -3587,7 +3958,7 @@
6672
# Get the real and link names of the library.
6673
- eval shared_ext=\"$shrext\"
6674
+ eval shared_ext=\"$shrext_cmds\"
6675
eval library_names=\"$library_names_spec\"
6676
set dummy $library_names
6678
@@ -3603,6 +3974,7 @@
6681
lib="$output_objdir/$realname"
6685
linknames="$linknames $link"
6686
@@ -3617,10 +3989,11 @@
6687
$show "generating symbol list for \`$libname.la'"
6688
export_symbols="$output_objdir/$libname.exp"
6689
$run $rm $export_symbols
6690
- eval cmds=\"$export_symbols_cmds\"
6691
+ cmds=$export_symbols_cmds
6692
save_ifs="$IFS"; IFS='~'
6693
for cmd in $cmds; do
6696
if len=`expr "X$cmd" : ".*"` &&
6697
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
6699
@@ -3630,6 +4003,9 @@
6700
# The command line is too long to execute in one step.
6701
$show "using reloadable object file for export list..."
6703
+ # Break out early, otherwise skipped_export may be
6704
+ # set to false by a later but shorter cmd.
6709
@@ -3650,12 +4026,12 @@
6710
for test_deplib in $deplibs; do
6711
case " $convenience " in
6712
*" $test_deplib "*) ;;
6715
tmp_deplibs="$tmp_deplibs $test_deplib"
6719
- deplibs="$tmp_deplibs"
6720
+ deplibs="$tmp_deplibs"
6722
if test -n "$convenience"; then
6723
if test -n "$whole_archive_flag_spec"; then
6724
@@ -3663,67 +4039,13 @@
6725
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
6727
gentop="$output_objdir/${outputname}x"
6728
- $show "${rm}r $gentop"
6729
- $run ${rm}r "$gentop"
6730
- $show "$mkdir $gentop"
6731
- $run $mkdir "$gentop"
6733
- if test "$status" -ne 0 && test ! -d "$gentop"; then
6736
generated="$generated $gentop"
6738
- for xlib in $convenience; do
6739
- # Extract the objects.
6741
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
6742
- *) xabs=`pwd`"/$xlib" ;;
6744
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
6745
- xdir="$gentop/$xlib"
6747
- $show "${rm}r $xdir"
6748
- $run ${rm}r "$xdir"
6749
- $show "$mkdir $xdir"
6750
- $run $mkdir "$xdir"
6752
- if test "$status" -ne 0 && test ! -d "$xdir"; then
6755
- # We will extract separately just the conflicting names and we will no
6756
- # longer touch any unique names. It is faster to leave these extract
6757
- # automatically by $AR in one run.
6758
- $show "(cd $xdir && $AR x $xabs)"
6759
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
6760
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
6763
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
6764
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
6765
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
6768
- while test "$i" -le "$count"
6770
- # Put our $i before any first dot (extension)
6771
- # Never overwrite any file
6773
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
6775
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
6777
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
6778
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
6784
- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
6786
+ func_extract_archives $gentop $convenience
6787
+ libobjs="$libobjs $func_extract_archives_result"
6792
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
6793
eval flag=\"$thread_safe_flag_spec\"
6794
linker_flags="$linker_flags $flag"
6795
@@ -3734,31 +4056,27 @@
6796
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
6799
- # Add all flags from the command line. We here create a library,
6800
- # but those flags were only added to compile_command and
6801
- # finalize_command, which are only used when creating executables.
6802
- # So do it by hand here.
6803
- compiler_flags="$compiler_flags $add_flags"
6804
- # Only add it to commands which use CC, instead of LD, i.e.
6805
- # only to $compiler_flags
6806
- #linker_flags="$linker_flags $add_flags"
6808
# Do each of the archive commands.
6809
if test "$module" = yes && test -n "$module_cmds" ; then
6810
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
6811
- eval cmds=\"$module_expsym_cmds\"
6812
+ eval test_cmds=\"$module_expsym_cmds\"
6813
+ cmds=$module_expsym_cmds
6815
- eval cmds=\"$module_cmds\"
6816
+ eval test_cmds=\"$module_cmds\"
6820
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
6821
- eval cmds=\"$archive_expsym_cmds\"
6822
+ eval test_cmds=\"$archive_expsym_cmds\"
6823
+ cmds=$archive_expsym_cmds
6825
- eval cmds=\"$archive_cmds\"
6826
+ eval test_cmds=\"$archive_cmds\"
6827
+ cmds=$archive_cmds
6831
- if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
6832
+ if test "X$skipped_export" != "X:" &&
6833
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
6834
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
6837
@@ -3777,6 +4095,7 @@
6838
save_libobjs=$libobjs
6841
+ output_la=`$echo "X$output" | $Xsed -e "$basename"`
6843
# Clear the reloadable object creation command queue and
6844
# initialize k to one.
6845
@@ -3786,13 +4105,13 @@
6849
- output=$output_objdir/$save_output-${k}.$objext
6850
+ output=$output_objdir/$output_la-${k}.$objext
6851
# Loop over the list of objects to be linked.
6852
for obj in $save_libobjs
6854
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
6855
if test "X$objlist" = X ||
6856
- { len=`expr "X$test_cmds" : ".*"` &&
6857
+ { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
6858
test "$len" -le "$max_cmd_len"; }; then
6859
objlist="$objlist $obj"
6861
@@ -3806,9 +4125,9 @@
6862
# the last one created.
6863
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
6865
- last_robj=$output_objdir/$save_output-${k}.$objext
6866
+ last_robj=$output_objdir/$output_la-${k}.$objext
6868
- output=$output_objdir/$save_output-${k}.$objext
6869
+ output=$output_objdir/$output_la-${k}.$objext
6873
@@ -3828,13 +4147,13 @@
6874
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
6877
- # Set up a command to remove the reloadale object files
6878
+ # Set up a command to remove the reloadable object files
6879
# after they are used.
6881
while test "$i" -lt "$k"
6884
- delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
6885
+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
6888
$echo "creating a temporary reloadable object file: $output"
6889
@@ -3859,28 +4178,54 @@
6890
# value of $libobjs for piecewise linking.
6892
# Do each of the archive commands.
6893
+ if test "$module" = yes && test -n "$module_cmds" ; then
6894
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
6895
+ cmds=$module_expsym_cmds
6900
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
6901
- eval cmds=\"$archive_expsym_cmds\"
6902
+ cmds=$archive_expsym_cmds
6904
- eval cmds=\"$archive_cmds\"
6905
+ cmds=$archive_cmds
6909
# Append the command to remove the reloadable object files
6910
# to the just-reset $cmds.
6911
- eval cmds=\"\$cmds~$rm $delfiles\"
6912
+ eval cmds=\"\$cmds~\$rm $delfiles\"
6914
save_ifs="$IFS"; IFS='~'
6915
for cmd in $cmds; do
6919
- $run eval "$cmd" || exit $?
6920
+ $run eval "$cmd" || {
6923
+ # Restore the uninstalled library and exit
6924
+ if test "$mode" = relink; then
6925
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6933
# Restore the uninstalled library and exit
6934
if test "$mode" = relink; then
6935
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
6938
+ if test -n "$convenience"; then
6939
+ if test -z "$whole_archive_flag_spec"; then
6940
+ $show "${rm}r $gentop"
6941
+ $run ${rm}r "$gentop"
6945
+ exit $EXIT_SUCCESS
6948
# Create links to the real library.
6949
@@ -3928,7 +4273,7 @@
6951
if test -n "$objs$old_deplibs"; then
6952
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
6954
+ exit $EXIT_FAILURE
6957
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
6958
@@ -3949,72 +4294,20 @@
6961
# reload_cmds runs $LD directly, so let us get rid of
6962
- # -Wl from whole_archive_flag_spec
6963
+ # -Wl from whole_archive_flag_spec and hope we can get by with
6964
+ # turning comma into space..
6967
if test -n "$convenience"; then
6968
if test -n "$whole_archive_flag_spec"; then
6969
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
6970
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
6971
+ reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
6973
gentop="$output_objdir/${obj}x"
6974
- $show "${rm}r $gentop"
6975
- $run ${rm}r "$gentop"
6976
- $show "$mkdir $gentop"
6977
- $run $mkdir "$gentop"
6979
- if test "$status" -ne 0 && test ! -d "$gentop"; then
6982
generated="$generated $gentop"
6984
- for xlib in $convenience; do
6985
- # Extract the objects.
6987
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
6988
- *) xabs=`pwd`"/$xlib" ;;
6990
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
6991
- xdir="$gentop/$xlib"
6993
- $show "${rm}r $xdir"
6994
- $run ${rm}r "$xdir"
6995
- $show "$mkdir $xdir"
6996
- $run $mkdir "$xdir"
6998
- if test "$status" -ne 0 && test ! -d "$xdir"; then
7001
- # We will extract separately just the conflicting names and we will no
7002
- # longer touch any unique names. It is faster to leave these extract
7003
- # automatically by $AR in one run.
7004
- $show "(cd $xdir && $AR x $xabs)"
7005
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
7006
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
7009
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
7010
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
7011
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
7014
- while test "$i" -le "$count"
7016
- # Put our $i before any first dot (extension)
7017
- # Never overwrite any file
7019
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
7021
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
7023
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
7024
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
7030
- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
7032
+ func_extract_archives $gentop $convenience
7033
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
7037
@@ -4022,10 +4315,11 @@
7038
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
7041
- eval cmds=\"$reload_cmds\"
7043
save_ifs="$IFS"; IFS='~'
7044
for cmd in $cmds; do
7048
$run eval "$cmd" || exit $?
7050
@@ -4038,7 +4332,7 @@
7055
+ exit $EXIT_SUCCESS
7058
if test "$build_libtool_libs" != yes; then
7059
@@ -4051,17 +4345,18 @@
7060
# accidentally link it into a program.
7061
# $show "echo timestamp > $libobj"
7062
# $run eval "echo timestamp > $libobj" || exit $?
7064
+ exit $EXIT_SUCCESS
7067
if test -n "$pic_flag" || test "$pic_mode" != default; then
7068
# Only do commands if we really have different PIC objects.
7069
reload_objs="$libobjs $reload_conv_objs"
7071
- eval cmds=\"$reload_cmds\"
7073
save_ifs="$IFS"; IFS='~'
7074
for cmd in $cmds; do
7078
$run eval "$cmd" || exit $?
7080
@@ -4073,7 +4368,7 @@
7085
+ exit $EXIT_SUCCESS
7089
@@ -4098,24 +4393,50 @@
7091
*-*-rhapsody* | *-*-darwin1.[012])
7092
# On Rhapsody replace the C library is the System framework
7093
- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7094
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7095
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
7096
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
7103
# Don't allow lazy linking, it breaks C++ global constructors
7104
if test "$tagname" = CXX ; then
7105
compile_command="$compile_command ${wl}-bind_at_load"
7106
finalize_command="$finalize_command ${wl}-bind_at_load"
7108
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7109
- compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7110
- finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7115
+ # move library search paths that coincide with paths to not yet
7116
+ # installed libraries to the beginning of the library search list
7118
+ for path in $notinst_path; do
7119
+ case " $new_libs " in
7120
+ *" -L$path/$objdir "*) ;;
7122
+ case " $compile_deplibs " in
7123
+ *" -L$path/$objdir "*)
7124
+ new_libs="$new_libs -L$path/$objdir" ;;
7129
+ for deplib in $compile_deplibs; do
7132
+ case " $new_libs " in
7134
+ *) new_libs="$new_libs $deplib" ;;
7137
+ *) new_libs="$new_libs $deplib" ;;
7140
+ compile_deplibs="$new_libs"
7143
compile_command="$compile_command $compile_deplibs"
7144
finalize_command="$finalize_command $finalize_deplibs"
7146
@@ -4160,10 +4481,15 @@
7149
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
7150
+ testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
7151
case :$dllsearchpath: in
7153
*) dllsearchpath="$dllsearchpath:$libdir";;
7155
+ case :$dllsearchpath: in
7156
+ *":$testbindir:"*) ;;
7157
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
7162
@@ -4277,13 +4603,25 @@
7164
# Prepare the list of exported symbols
7165
if test -z "$export_symbols"; then
7166
- export_symbols="$output_objdir/$output.exp"
7167
+ export_symbols="$output_objdir/$outputname.exp"
7168
$run $rm $export_symbols
7169
- $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
7170
+ $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
7172
+ *cygwin* | *mingw* )
7173
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
7174
+ $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
7178
- $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
7179
- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
7180
+ $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
7181
+ $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
7182
$run eval 'mv "$nlist"T "$nlist"'
7184
+ *cygwin* | *mingw* )
7185
+ $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
7186
+ $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
7192
@@ -4334,7 +4672,26 @@
7195
/* The mapping between symbol names and symbols. */
7199
+ *cygwin* | *mingw* )
7200
+ $echo >> "$output_objdir/$dlsyms" "\
7201
+/* DATA imports from DLLs on WIN32 can't be const, because
7202
+ runtime relocations are performed -- see ld's documentation
7203
+ on pseudo-relocs */
7208
+ $echo >> "$output_objdir/$dlsyms" "\
7215
+ $echo >> "$output_objdir/$dlsyms" "\
7219
@@ -4381,20 +4738,33 @@
7222
# Now compile the dynamic symbol file.
7223
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
7224
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
7225
+ $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
7226
+ $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
7228
# Clean up the generated files.
7229
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
7230
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
7232
# Transform the symbol file into the correct name.
7233
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
7234
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
7236
+ *cygwin* | *mingw* )
7237
+ if test -f "$output_objdir/${outputname}.def" ; then
7238
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
7239
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
7241
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
7242
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
7246
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
7247
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
7252
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
7254
+ exit $EXIT_FAILURE
7258
@@ -4403,30 +4773,19 @@
7259
# really was required.
7261
# Nullify the symbol file.
7262
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
7263
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
7264
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
7265
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
7268
- # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
7269
- # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
7270
- # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
7271
- # This does not apply on AIX for ia64, which uses a SysV linker.
7274
- *-*-aix4* | *-*-aix5*)
7275
- compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
7276
- finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
7279
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
7280
# Replace the output file specification.
7281
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
7282
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
7283
link_command="$compile_command$compile_rpath"
7285
# We have no uninstalled library dependencies, so finalize right now.
7286
$show "$link_command"
7287
$run eval "$link_command"
7291
# Delete the generated files.
7292
if test -n "$dlsyms"; then
7293
@@ -4434,7 +4793,7 @@
7294
$run $rm "$output_objdir/${outputname}S.${objext}"
7301
if test -n "$shlibpath_var"; then
7302
@@ -4493,7 +4852,7 @@
7303
# Link the executable and exit
7304
$show "$link_command"
7305
$run eval "$link_command" || exit $?
7307
+ exit $EXIT_SUCCESS
7310
if test "$hardcode_action" = relink; then
7311
@@ -4507,7 +4866,7 @@
7312
if test "$fast_install" != no; then
7313
link_command="$finalize_var$compile_command$finalize_rpath"
7314
if test "$fast_install" = yes; then
7315
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
7316
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
7318
# fast_install is set to needless
7320
@@ -4544,14 +4903,14 @@
7323
relink_command="(cd `pwd`; $relink_command)"
7324
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7325
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
7328
# Quote $echo for shipping.
7329
- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
7331
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
7332
- *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
7333
+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
7335
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7336
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7338
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
7340
@@ -4573,11 +4932,13 @@
7345
- cwrappersource=`$echo ${output_objdir}/lt-${outputname}.c`
7346
- cwrapper=`$echo ${output}.exe`
7347
- $rm $cwrappersource $cwrapper
7348
- trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
7349
+ *cygwin* | *mingw* )
7350
+ output_name=`basename $output`
7351
+ output_path=`dirname $output`
7352
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
7353
+ cwrapper="$output_path/$output_name.exe"
7354
+ $rm $cwrappersource $cwrapper
7355
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
7357
cat > $cwrappersource <<EOF
7359
@@ -4586,7 +4947,7 @@
7361
The $output program cannot be directly executed until all the libtool
7362
libraries that it depends on are installed.
7365
This wrapper executable should never be moved out of the build directory.
7366
If it is, it will not operate correctly.
7368
@@ -4602,6 +4963,9 @@
7372
+#include <string.h>
7374
+#include <sys/stat.h>
7376
#if defined(PATH_MAX)
7377
# define LT_PATHMAX PATH_MAX
7378
@@ -4612,15 +4976,19 @@
7381
#ifndef DIR_SEPARATOR
7382
-#define DIR_SEPARATOR '/'
7383
+# define DIR_SEPARATOR '/'
7384
+# define PATH_SEPARATOR ':'
7387
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
7389
-#define HAVE_DOS_BASED_FILE_SYSTEM
7390
-#ifndef DIR_SEPARATOR_2
7391
-#define DIR_SEPARATOR_2 '\\'
7393
+# define HAVE_DOS_BASED_FILE_SYSTEM
7394
+# ifndef DIR_SEPARATOR_2
7395
+# define DIR_SEPARATOR_2 '\\'
7397
+# ifndef PATH_SEPARATOR_2
7398
+# define PATH_SEPARATOR_2 ';'
7402
#ifndef DIR_SEPARATOR_2
7403
@@ -4630,17 +4998,32 @@
7404
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
7405
#endif /* DIR_SEPARATOR_2 */
7407
+#ifndef PATH_SEPARATOR_2
7408
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
7409
+#else /* PATH_SEPARATOR_2 */
7410
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
7411
+#endif /* PATH_SEPARATOR_2 */
7413
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
7414
#define XFREE(stale) do { \
7415
if (stale) { free ((void *) stale); stale = 0; } \
7418
+/* -DDEBUG is fairly common in CFLAGS. */
7420
+#if defined DEBUGWRAPPER
7421
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
7423
+# define DEBUG(format, ...)
7426
const char *program_name = NULL;
7428
void * xmalloc (size_t num);
7429
char * xstrdup (const char *string);
7430
-char * basename (const char *name);
7431
-char * fnqualify(const char *path);
7432
+const char * base_name (const char *name);
7433
+char * find_executable(const char *wrapper);
7434
+int check_executable(const char *path);
7435
char * strendzap(char *str, const char *pat);
7436
void lt_fatal (const char *message, ...);
7438
@@ -4649,30 +5032,52 @@
7443
- program_name = (char *) xstrdup ((char *) basename (argv[0]));
7445
+ program_name = (char *) xstrdup (base_name (argv[0]));
7446
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
7447
+ DEBUG("(main) program_name : %s\n",program_name);
7448
newargz = XMALLOC(char *, argc+2);
7451
- cat >> $cwrappersource <<EOF
7452
- newargz[0] = "$SHELL";
7453
+ cat >> $cwrappersource <<EOF
7454
+ newargz[0] = (char *) xstrdup("$SHELL");
7457
- cat >> $cwrappersource <<"EOF"
7458
- newargz[1] = fnqualify(argv[0]);
7459
+ cat >> $cwrappersource <<"EOF"
7460
+ newargz[1] = find_executable(argv[0]);
7461
+ if (newargz[1] == NULL)
7462
+ lt_fatal("Couldn't find %s", argv[0]);
7463
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
7464
/* we know the script has the same name, without the .exe */
7465
/* so make sure newargz[1] doesn't end in .exe */
7466
- strendzap(newargz[1],".exe");
7467
+ strendzap(newargz[1],".exe");
7468
for (i = 1; i < argc; i++)
7469
newargz[i+1] = xstrdup(argv[i]);
7470
newargz[argc+1] = NULL;
7472
+ for (i=0; i<argc+1; i++)
7474
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
7480
- cat >> $cwrappersource <<EOF
7483
+ cat >> $cwrappersource <<EOF
7484
+ execv("$SHELL",(char const **)newargz);
7488
+ cat >> $cwrappersource <<EOF
7489
execv("$SHELL",newargz);
7494
- cat >> $cwrappersource <<"EOF"
7495
+ cat >> $cwrappersource <<"EOF"
7500
@@ -4685,59 +5090,159 @@
7506
xstrdup (const char *string)
7508
return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
7513
-basename (const char *name)
7515
+base_name (const char *name)
7519
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
7520
/* Skip over the disk name in MSDOS pathnames. */
7521
- if (isalpha (name[0]) && name[1] == ':')
7522
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
7526
for (base = name; *name; name++)
7527
if (IS_DIR_SEPARATOR (*name))
7529
- return (char *) base;
7534
+check_executable(const char * path)
7538
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
7539
+ if ((!path) || (!*path))
7542
+ if ((stat (path, &st) >= 0) &&
7544
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
7545
+#if defined (S_IXOTH)
7546
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
7548
+#if defined (S_IXGRP)
7549
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
7551
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
7559
-fnqualify(const char *path)
7560
+/* Searches for the full path of the wrapper. Returns
7561
+ newly allocated full path name if found, NULL otherwise */
7563
+find_executable (const char* wrapper)
7567
+ int has_slash = 0;
7569
+ const char* p_next;
7570
+ /* static buffer for getcwd */
7571
char tmp[LT_PATHMAX + 1];
7573
+ char* concat_name;
7575
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
7577
- assert(path != NULL);
7578
+ if ((wrapper == NULL) || (*wrapper == '\0'))
7581
- /* Is it qualified already? */
7582
+ /* Absolute path? */
7583
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
7584
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
7586
+ concat_name = xstrdup (wrapper);
7587
+ if (check_executable(concat_name))
7588
+ return concat_name;
7589
+ XFREE(concat_name);
7594
+ if (IS_DIR_SEPARATOR (wrapper[0]))
7596
+ concat_name = xstrdup (wrapper);
7597
+ if (check_executable(concat_name))
7598
+ return concat_name;
7599
+ XFREE(concat_name);
7601
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
7602
- if (isalpha (path[0]) && path[1] == ':')
7603
- return xstrdup (path);
7606
- if (IS_DIR_SEPARATOR (path[0]))
7607
- return xstrdup (path);
7609
- /* prepend the current directory */
7610
- /* doesn't handle '~' */
7611
+ for (p = wrapper; *p; p++)
7619
+ /* no slashes; search PATH */
7620
+ const char* path = getenv ("PATH");
7623
+ for (p = path; *p; p = p_next)
7627
+ for (q = p; *q; q++)
7628
+ if (IS_PATH_SEPARATOR(*q))
7631
+ p_next = (*q == '\0' ? q : q + 1);
7634
+ /* empty path: current directory */
7635
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
7636
+ lt_fatal ("getcwd failed");
7637
+ tmp_len = strlen(tmp);
7638
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
7639
+ memcpy (concat_name, tmp, tmp_len);
7640
+ concat_name[tmp_len] = '/';
7641
+ strcpy (concat_name + tmp_len + 1, wrapper);
7645
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
7646
+ memcpy (concat_name, p, p_len);
7647
+ concat_name[p_len] = '/';
7648
+ strcpy (concat_name + p_len + 1, wrapper);
7650
+ if (check_executable(concat_name))
7651
+ return concat_name;
7652
+ XFREE(concat_name);
7655
+ /* not found in PATH; assume curdir */
7657
+ /* Relative path | not found in path: prepend cwd */
7658
if (getcwd (tmp, LT_PATHMAX) == NULL)
7659
lt_fatal ("getcwd failed");
7660
- size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
7661
- p = XMALLOC(char, size);
7662
- sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
7664
+ tmp_len = strlen(tmp);
7665
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
7666
+ memcpy (concat_name, tmp, tmp_len);
7667
+ concat_name[tmp_len] = '/';
7668
+ strcpy (concat_name + tmp_len + 1, wrapper);
7670
+ if (check_executable(concat_name))
7671
+ return concat_name;
7672
+ XFREE(concat_name);
7677
-strendzap(char *str, const char *pat)
7678
+strendzap(char *str, const char *pat)
7682
@@ -4757,7 +5262,7 @@
7686
-lt_error_core (int exit_status, const char * mode,
7687
+lt_error_core (int exit_status, const char * mode,
7688
const char * message, va_list ap)
7690
fprintf (stderr, "%s: %s: ", program_name, mode);
7691
@@ -4777,16 +5282,16 @@
7695
- # we should really use a build-platform specific compiler
7696
- # here, but OTOH, the wrappers (shell script and this C one)
7697
- # are only useful if you want to execute the "real" binary.
7698
- # Since the "real" binary is built for $host, then this
7699
- # wrapper might as well be built for $host, too.
7700
- $run $LTCC -s -o $cwrapper $cwrappersource
7704
- trap "$rm $output; exit 1" 1 2 15
7705
+ # we should really use a build-platform specific compiler
7706
+ # here, but OTOH, the wrappers (shell script and this C one)
7707
+ # are only useful if you want to execute the "real" binary.
7708
+ # Since the "real" binary is built for $host, then this
7709
+ # wrapper might as well be built for $host, too.
7710
+ $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
7714
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
7718
@@ -4805,9 +5310,23 @@
7719
Xsed='${SED} -e 1s/^X//'
7720
sed_quote_subst='$sed_quote_subst'
7722
+# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
7723
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
7726
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
7727
+ # is contrary to our usage. Disable this feature.
7728
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
7729
+ setopt NO_GLOB_SUBST
7731
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
7733
+BIN_SH=xpg4; export BIN_SH # for Tru64
7734
+DUALCASE=1; export DUALCASE # for MKS sh
7736
# The HP-UX ksh and POSIX shell print the target directory to stdout
7738
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
7739
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7741
relink_command=\"$relink_command\"
7743
@@ -4886,7 +5405,7 @@
7745
$echo \"\$relink_command_output\" >&2
7746
$rm \"\$progdir/\$file\"
7748
+ exit $EXIT_FAILURE
7752
@@ -4936,34 +5455,32 @@
7753
# Backslashes separate directories on plain windows
7754
*-*-mingw | *-*-os2*)
7756
- exec \$progdir\\\\\$program \${1+\"\$@\"}
7757
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
7762
- # Need to set LD_LIBRARY_PATH, to the value already
7763
- # computed within libtool.
7765
- LD_LIBRARY_PATH=\"$rpath\" exec \$progdir/\$program \${1+\"\$@\"}
7766
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
7771
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
7773
+ \$echo \"\$0: cannot exec \$program \$*\"
7774
+ exit $EXIT_FAILURE
7777
# The program doesn't exist.
7778
- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
7779
+ \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
7780
\$echo \"This script is just a wrapper for \$program.\" 1>&2
7781
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
7783
+ exit $EXIT_FAILURE
7790
+ exit $EXIT_SUCCESS
7794
@@ -4986,78 +5503,78 @@
7796
if test -n "$addlibs"; then
7797
gentop="$output_objdir/${outputname}x"
7798
- $show "${rm}r $gentop"
7799
- $run ${rm}r "$gentop"
7800
- $show "$mkdir $gentop"
7801
- $run $mkdir "$gentop"
7803
- if test "$status" -ne 0 && test ! -d "$gentop"; then
7806
generated="$generated $gentop"
7808
- # Add in members from convenience archives.
7809
- for xlib in $addlibs; do
7810
- # Extract the objects.
7812
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
7813
- *) xabs=`pwd`"/$xlib" ;;
7815
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
7816
- xdir="$gentop/$xlib"
7818
- $show "${rm}r $xdir"
7819
- $run ${rm}r "$xdir"
7820
- $show "$mkdir $xdir"
7821
- $run $mkdir "$xdir"
7823
- if test "$status" -ne 0 && test ! -d "$xdir"; then
7826
- # We will extract separately just the conflicting names and we will no
7827
- # longer touch any unique names. It is faster to leave these extract
7828
- # automatically by $AR in one run.
7829
- $show "(cd $xdir && $AR x $xabs)"
7830
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
7831
- if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
7834
- $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
7835
- $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
7836
- $AR t "$xabs" | sort | uniq -cd | while read -r count name
7839
- while test "$i" -le "$count"
7841
- # Put our $i before any first dot (extension)
7842
- # Never overwrite any file
7844
- while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
7846
- name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
7848
- $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
7849
- $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
7855
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
7857
+ func_extract_archives $gentop $addlibs
7858
+ oldobjs="$oldobjs $func_extract_archives_result"
7861
- compiler_flags="$compiler_flags $add_flags"
7863
# Do each command in the archive commands.
7864
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
7865
- eval cmds=\"$old_archive_from_new_cmds\"
7866
+ cmds=$old_archive_from_new_cmds
7868
+ # POSIX demands no paths to be encoded in archives. We have
7869
+ # to avoid creating archives with duplicate basenames if we
7870
+ # might have to extract them afterwards, e.g., when creating a
7871
+ # static archive out of a convenience library, or when linking
7872
+ # the entirety of a libtool archive into another (currently
7873
+ # not supported by libtool).
7874
+ if (for obj in $oldobjs
7876
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
7877
+ done | sort | sort -uc >/dev/null 2>&1); then
7880
+ $echo "copying selected object files to avoid basename conflicts..."
7882
+ if test -z "$gentop"; then
7883
+ gentop="$output_objdir/${outputname}x"
7884
+ generated="$generated $gentop"
7886
+ $show "${rm}r $gentop"
7887
+ $run ${rm}r "$gentop"
7888
+ $show "$mkdir $gentop"
7889
+ $run $mkdir "$gentop"
7891
+ if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
7896
+ save_oldobjs=$oldobjs
7899
+ for obj in $save_oldobjs
7901
+ objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
7902
+ case " $oldobjs " in
7903
+ " ") oldobjs=$obj ;;
7904
+ *[\ /]"$objbase "*)
7906
+ # Make sure we don't pick an alternate name that also
7908
+ newobj=lt$counter-$objbase
7909
+ counter=`expr $counter + 1`
7910
+ case " $oldobjs " in
7911
+ *[\ /]"$newobj "*) ;;
7912
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
7915
+ $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7916
+ $run ln "$obj" "$gentop/$newobj" ||
7917
+ $run cp "$obj" "$gentop/$newobj"
7918
+ oldobjs="$oldobjs $gentop/$newobj"
7920
+ *) oldobjs="$oldobjs $obj" ;;
7925
eval cmds=\"$old_archive_cmds\"
7927
if len=`expr "X$cmds" : ".*"` &&
7928
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
7930
+ cmds=$old_archive_cmds
7932
# the command line is too long to link in one step, link in parts
7933
$echo "using piecewise archive linking..."
7934
@@ -5066,31 +5583,18 @@
7937
save_oldobjs=$oldobjs
7938
- # GNU ar 2.10+ was changed to match POSIX; thus no paths are
7939
- # encoded into archives. This makes 'ar r' malfunction in
7940
- # this piecewise linking case whenever conflicting object
7941
- # names appear in distinct ar calls; check, warn and compensate.
7942
- if (for obj in $save_oldobjs
7944
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
7945
- done | sort | sort -uc >/dev/null 2>&1); then
7948
- $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
7949
- $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
7953
# Is there a better way of finding the last object in the list?
7954
for obj in $save_oldobjs
7959
for obj in $save_oldobjs
7961
oldobjs="$objlist $obj"
7962
objlist="$objlist $obj"
7963
eval test_cmds=\"$old_archive_cmds\"
7964
- if len=`expr "X$test_cmds" : ".*"` &&
7965
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
7966
test "$len" -le "$max_cmd_len"; then
7969
@@ -5098,7 +5602,7 @@
7971
if test "$obj" = "$last_oldobj" ; then
7975
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7976
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
7978
@@ -5109,12 +5613,13 @@
7979
if test "X$oldobjs" = "X" ; then
7980
eval cmds=\"\$concat_cmds\"
7982
- eval cmds=\"\$concat_cmds~$old_archive_cmds\"
7983
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
7987
save_ifs="$IFS"; IFS='~'
7988
for cmd in $cmds; do
7992
$run eval "$cmd" || exit $?
7993
@@ -5146,11 +5651,13 @@
7996
# Quote the link command for shipping.
7997
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
7998
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7999
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8000
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
8001
if test "$hardcode_automatic" = yes ; then
8008
# Only create the output if not a dry run.
8009
if test -z "$run"; then
8010
for installed in no yes; do
8011
@@ -5168,7 +5675,7 @@
8012
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8013
if test -z "$libdir"; then
8014
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
8016
+ exit $EXIT_FAILURE
8018
newdependency_libs="$newdependency_libs $libdir/$name"
8020
@@ -5182,7 +5689,7 @@
8021
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8022
if test -z "$libdir"; then
8023
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
8025
+ exit $EXIT_FAILURE
8027
newdlfiles="$newdlfiles $libdir/$name"
8029
@@ -5193,11 +5700,30 @@
8030
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
8031
if test -z "$libdir"; then
8032
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
8034
+ exit $EXIT_FAILURE
8036
newdlprefiles="$newdlprefiles $libdir/$name"
8038
dlprefiles="$newdlprefiles"
8041
+ for lib in $dlfiles; do
8043
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8044
+ *) abs=`pwd`"/$lib" ;;
8046
+ newdlfiles="$newdlfiles $abs"
8048
+ dlfiles="$newdlfiles"
8050
+ for lib in $dlprefiles; do
8052
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
8053
+ *) abs=`pwd`"/$lib" ;;
8055
+ newdlprefiles="$newdlprefiles $abs"
8057
+ dlprefiles="$newdlprefiles"
8060
# place dlname in correct position for cygwin
8061
@@ -5241,7 +5767,7 @@
8063
# Directory that this library needs to be installed in:
8064
libdir='$install_libdir'"
8065
- if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
8066
+ if test "$installed" = no && test "$need_relink" = yes; then
8068
relink_command=\"$relink_command\""
8070
@@ -5254,7 +5780,7 @@
8071
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
8075
+ exit $EXIT_SUCCESS
8078
# libtool install mode
8079
@@ -5265,11 +5791,11 @@
8080
# install_prog (especially on Windows NT).
8081
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
8082
# Allow the use of GNU shtool's install command.
8083
- $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
8084
+ $echo "X$nonopt" | grep shtool > /dev/null; then
8085
# Aesthetically quote it.
8086
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
8088
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
8089
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
8093
@@ -5278,14 +5804,14 @@
8101
# The real first argument should be the name of the installation program.
8102
# Aesthetically quote it.
8103
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
8105
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
8106
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
8110
@@ -5303,28 +5829,31 @@
8112
if test -n "$dest"; then
8113
files="$files $dest"
8126
+ case " $install_prog " in
8131
+ -g | -m | -o) prev=$arg ;;
8141
# If the previous option needed an argument, then skip it.
8142
if test -n "$prev"; then
8150
@@ -5333,7 +5862,7 @@
8151
# Aesthetically quote the argument.
8152
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
8154
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
8155
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
8159
@@ -5343,13 +5872,13 @@
8160
if test -z "$install_prog"; then
8161
$echo "$modename: you must specify an install program" 1>&2
8164
+ exit $EXIT_FAILURE
8167
if test -n "$prev"; then
8168
$echo "$modename: the \`$prev' option requires an argument" 1>&2
8171
+ exit $EXIT_FAILURE
8174
if test -z "$files"; then
8175
@@ -5359,7 +5888,7 @@
8176
$echo "$modename: you must specify a destination" 1>&2
8180
+ exit $EXIT_FAILURE
8183
# Strip any trailing slash from the destination.
8184
@@ -5380,7 +5909,7 @@
8185
if test "$#" -gt 2; then
8186
$echo "$modename: \`$dest' is not a directory" 1>&2
8189
+ exit $EXIT_FAILURE
8193
@@ -5392,7 +5921,7 @@
8195
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
8198
+ exit $EXIT_FAILURE
8202
@@ -5421,7 +5950,7 @@
8204
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
8207
+ exit $EXIT_FAILURE
8211
@@ -5463,14 +5992,14 @@
8212
# but it's something to keep an eye on.
8213
if test "$inst_prefix_dir" = "$destdir"; then
8214
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
8216
+ exit $EXIT_FAILURE
8219
if test -n "$inst_prefix_dir"; then
8220
# Stick the inst_prefix_dir data into the link command.
8221
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
8222
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
8224
- relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
8225
+ relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
8228
$echo "$modename: warning: relinking \`$file'" 1>&2
8229
@@ -5478,7 +6007,7 @@
8230
if $run eval "$relink_command"; then :
8232
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
8234
+ exit $EXIT_FAILURE
8238
@@ -5502,23 +6031,36 @@
8240
if test "$#" -gt 0; then
8241
# Delete the old symlinks, and create new ones.
8242
+ # Try `ln -sf' first, because the `ln' binary might depend on
8243
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
8244
+ # so we also need to try rm && ln -s.
8247
if test "$linkname" != "$realname"; then
8248
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
8249
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
8250
+ $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
8251
+ $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
8256
# Do each command in the postinstall commands.
8257
lib="$destdir/$realname"
8258
- eval cmds=\"$postinstall_cmds\"
8259
+ cmds=$postinstall_cmds
8260
save_ifs="$IFS"; IFS='~'
8261
for cmd in $cmds; do
8265
- $run eval "$cmd" || exit $?
8266
+ $run eval "$cmd" || {
8269
+ # Restore the uninstalled library and exit
8270
+ if test "$mode" = relink; then
8271
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
8279
@@ -5556,7 +6098,7 @@
8281
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
8284
+ exit $EXIT_FAILURE
8288
@@ -5574,7 +6116,7 @@
8289
$show "$install_prog $staticobj $staticdest"
8290
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
8293
+ exit $EXIT_SUCCESS
8297
@@ -5612,23 +6154,21 @@
8301
- # To insure that "foo" is sourced, and not "foo.exe",
8302
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
8303
- # which disallows the automatic-append-.exe behavior.
8305
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
8306
- *) wrapperdot=${wrapper} ;;
8308
+ # Note that it is not necessary on cygwin/mingw to append a dot to
8309
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
8310
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
8311
+ # `FILE.' does not work on cygwin managed mounts.
8313
# If there is no directory component, then add one.
8315
- */* | *\\*) . ${wrapperdot} ;;
8316
- *) . ./${wrapperdot} ;;
8318
+ */* | *\\*) . ${wrapper} ;;
8319
+ *) . ./${wrapper} ;;
8322
# Check the variables that should have been set.
8323
if test -z "$notinst_deplibs"; then
8324
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
8326
+ exit $EXIT_FAILURE
8330
@@ -5650,34 +6190,25 @@
8334
- # To insure that "foo" is sourced, and not "foo.exe",
8335
- # finese the cygwin/MSYS system by explicitly sourcing "foo."
8336
- # which disallows the automatic-append-.exe behavior.
8338
- *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
8339
- *) wrapperdot=${wrapper} ;;
8341
+ # Note that it is not necessary on cygwin/mingw to append a dot to
8342
+ # foo even if both foo and FILE.exe exist: automatic-append-.exe
8343
+ # behavior happens only for exec(3), not for open(2)! Also, sourcing
8344
+ # `FILE.' does not work on cygwin managed mounts.
8346
# If there is no directory component, then add one.
8348
- */* | *\\*) . ${wrapperdot} ;;
8349
- *) . ./${wrapperdot} ;;
8351
+ */* | *\\*) . ${wrapper} ;;
8352
+ *) . ./${wrapper} ;;
8356
if test "$fast_install" = no && test -n "$relink_command"; then
8357
if test "$finalize" = yes && test -z "$run"; then
8359
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
8360
- tmpdir="$tmpdir/libtool-$$"
8361
- if $mkdir "$tmpdir" && chmod 700 "$tmpdir"; then :
8363
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
8366
+ tmpdir=`func_mktempdir`
8367
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
8368
outputname="$tmpdir/$file"
8369
# Replace the output file specification.
8370
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
8371
+ relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
8373
$show "$relink_command"
8374
if $run eval "$relink_command"; then :
8375
@@ -5697,7 +6228,7 @@
8378
# remove .exe since cygwin /usr/bin/install will append another
8381
case $install_prog,$host in
8382
*/usr/bin/install*,*cygwin*)
8383
case $file:$destfile in
8384
@@ -5729,16 +6260,17 @@
8385
$show "$install_prog $file $oldlib"
8386
$run eval "$install_prog \$file \$oldlib" || exit $?
8388
- if test -n "$stripme" && test -n "$striplib"; then
8389
+ if test -n "$stripme" && test -n "$old_striplib"; then
8390
$show "$old_striplib $oldlib"
8391
$run eval "$old_striplib $oldlib" || exit $?
8394
# Do each command in the postinstall commands.
8395
- eval cmds=\"$old_postinstall_cmds\"
8396
+ cmds=$old_postinstall_cmds
8397
save_ifs="$IFS"; IFS='~'
8398
for cmd in $cmds; do
8402
$run eval "$cmd" || exit $?
8404
@@ -5752,9 +6284,9 @@
8405
if test -n "$current_libdirs"; then
8406
# Maybe just do a dry run.
8407
test -n "$run" && current_libdirs=" -n$current_libdirs"
8408
- exec_cmd='$SHELL $0 --finish$current_libdirs'
8409
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
8412
+ exit $EXIT_SUCCESS
8416
@@ -5773,10 +6305,11 @@
8417
for libdir in $libdirs; do
8418
if test -n "$finish_cmds"; then
8419
# Do each command in the finish commands.
8420
- eval cmds=\"$finish_cmds\"
8422
save_ifs="$IFS"; IFS='~'
8423
for cmd in $cmds; do
8427
$run eval "$cmd" || admincmds="$admincmds
8429
@@ -5793,9 +6326,9 @@
8432
# Exit here if they wanted silent mode.
8434
+ test "$show" = : && exit $EXIT_SUCCESS
8436
- $echo "----------------------------------------------------------------------"
8437
+ $echo "X----------------------------------------------------------------------" | $Xsed
8438
$echo "Libraries have been installed in:"
8439
for libdir in $libdirs; do
8441
@@ -5828,8 +6361,8 @@
8443
$echo "See any operating system documentation about shared libraries for"
8444
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
8445
- $echo "----------------------------------------------------------------------"
8447
+ $echo "X----------------------------------------------------------------------" | $Xsed
8448
+ exit $EXIT_SUCCESS
8451
# libtool execute mode
8452
@@ -5841,7 +6374,7 @@
8453
if test -z "$cmd"; then
8454
$echo "$modename: you must specify a COMMAND" 1>&2
8457
+ exit $EXIT_FAILURE
8460
# Handle -dlopen flags immediately.
8461
@@ -5849,7 +6382,7 @@
8462
if test ! -f "$file"; then
8463
$echo "$modename: \`$file' is not a file" 1>&2
8466
+ exit $EXIT_FAILURE
8470
@@ -5860,7 +6393,7 @@
8472
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
8475
+ exit $EXIT_FAILURE
8478
# Read the libtool library.
8479
@@ -5886,8 +6419,10 @@
8480
if test -f "$dir/$objdir/$dlname"; then
8483
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
8485
+ if test ! -f "$dir/$dlname"; then
8486
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
8487
+ exit $EXIT_FAILURE
8492
@@ -5951,12 +6486,12 @@
8495
# Restore saved environment variables
8496
- if test "${save_LC_ALL+set}" = set; then
8497
- LC_ALL="$save_LC_ALL"; export LC_ALL
8499
- if test "${save_LANG+set}" = set; then
8500
- LANG="$save_LANG"; export LANG
8502
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
8504
+ eval "if test \"\${save_$lt_var+set}\" = set; then
8505
+ $lt_var=\$save_$lt_var; export $lt_var
8509
# Now prepare to actually exec the command.
8510
exec_cmd="\$cmd$args"
8511
@@ -5967,7 +6502,7 @@
8512
$echo "export $shlibpath_var"
8516
+ exit $EXIT_SUCCESS
8520
@@ -5995,7 +6530,7 @@
8521
if test -z "$rm"; then
8522
$echo "$modename: you must specify an RM program" 1>&2
8525
+ exit $EXIT_FAILURE
8529
@@ -6045,15 +6580,24 @@
8530
rmfiles="$rmfiles $objdir/$n"
8532
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8533
- test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8535
- if test "$mode" = uninstall; then
8538
+ case " $library_names " in
8539
+ # " " in the beginning catches empty $dlname
8541
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
8543
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
8546
if test -n "$library_names"; then
8547
# Do each command in the postuninstall commands.
8548
- eval cmds=\"$postuninstall_cmds\"
8549
+ cmds=$postuninstall_cmds
8550
save_ifs="$IFS"; IFS='~'
8551
for cmd in $cmds; do
8556
if test "$?" -ne 0 && test "$rmforce" != yes; then
8557
@@ -6065,10 +6609,11 @@
8559
if test -n "$old_library"; then
8560
# Do each command in the old_postuninstall commands.
8561
- eval cmds=\"$old_postuninstall_cmds\"
8562
+ cmds=$old_postuninstall_cmds
8563
save_ifs="$IFS"; IFS='~'
8564
for cmd in $cmds; do
8569
if test "$?" -ne 0 && test "$rmforce" != yes; then
8570
@@ -6078,7 +6623,8 @@
8573
# FIXME: should reinstall the best remaining shared library.
8580
@@ -6107,7 +6653,7 @@
8581
if test "$mode" = clean ; then
8586
file=`$echo $file|${SED} 's,.exe$,,'`
8587
noexename=`$echo $name|${SED} 's,.exe$,,'`
8588
# $file with .exe has already been added to rmfiles,
8589
@@ -6152,20 +6698,20 @@
8591
$echo "$modename: you must specify a MODE" 1>&2
8592
$echo "$generic_help" 1>&2
8594
+ exit $EXIT_FAILURE
8598
if test -z "$exec_cmd"; then
8599
$echo "$modename: invalid operation mode \`$mode'" 1>&2
8600
$echo "$generic_help" 1>&2
8602
+ exit $EXIT_FAILURE
8604
fi # test -z "$show_help"
8606
if test -n "$exec_cmd"; then
8609
+ exit $EXIT_FAILURE
8612
# We need to display help for each of the modes.
8613
@@ -6201,7 +6747,7 @@
8614
a more detailed description of MODE.
8616
Report bugs to <bug-libtool@gnu.org>."
8618
+ exit $EXIT_SUCCESS
8622
@@ -6302,9 +6848,9 @@
8623
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
8624
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
8625
-export-symbols SYMFILE
8626
- try to export only the symbols listed in SYMFILE
8627
+ try to export only the symbols listed in SYMFILE
8628
-export-symbols-regex REGEX
8629
- try to export only the symbols matching REGEX
8630
+ try to export only the symbols matching REGEX
8631
-LLIBDIR search LIBDIR for required installed libraries
8632
-lNAME OUTPUT-FILE requires the installed library libNAME
8633
-module build a library that can dlopened
8634
@@ -6313,12 +6859,16 @@
8635
-no-undefined declare that a library does not refer to external symbols
8636
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
8637
-objectlist FILE Use a list of object files found in FILE to specify objects
8638
+ -precious-files-regex REGEX
8639
+ don't remove output files matching REGEX
8640
-release RELEASE specify package release information
8641
-rpath LIBDIR the created library will eventually be installed in LIBDIR
8642
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
8643
- -static do not do any dynamic linking of libtool libraries
8644
+ -static do not do any dynamic linking of uninstalled libtool libraries
8645
+ -static-libtool-libs
8646
+ do not do any dynamic linking of libtool libraries
8647
-version-info CURRENT[:REVISION[:AGE]]
8648
- specify library version info [each variable defaults to 0]
8649
+ specify library version info [each variable defaults to 0]
8651
All other options (arguments beginning with \`-') are ignored.
8653
@@ -6354,14 +6904,14 @@
8655
$echo "$modename: invalid operation mode \`$mode'" 1>&2
8658
+ exit $EXIT_FAILURE
8663
$echo "Try \`$modename --help' for more information about other modes."
8668
# The TAGs below are defined such that we never get into a situation
8669
# in which we disable both kinds of libraries. Given conflicting
8670
@@ -6375,12 +6925,11 @@
8671
# configuration. But we'll never go from static-only to shared-only.
8673
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
8674
-build_libtool_libs=no
8676
+disable_libs=shared
8677
# ### END LIBTOOL TAG CONFIG: disable-shared
8679
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
8680
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
8681
+disable_libs=static
8682
# ### END LIBTOOL TAG CONFIG: disable-static