1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
3
## Free Software Foundation, Inc.
4
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6
## This program is free software; you can redistribute it and/or modify
7
## it under the terms of the GNU General Public License as published by
8
## the Free Software Foundation; either version 2 of the License, or
9
## (at your option) any later version.
11
## This program is distributed in the hope that it will be useful, but
12
## WITHOUT ANY WARRANTY; without even the implied warranty of
13
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
## General Public License for more details.
16
## You should have received a copy of the GNU General Public License
17
## along with this program; if not, write to the Free Software
18
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
## As a special exception to the GNU General Public License, if you
21
## distribute this file as part of a program that contains a
22
## configuration script generated by Autoconf, you may include it under
23
## the same distribution terms that you use for the rest of that program.
25
# serial 47 AC_PROG_LIBTOOL
29
AC_DEFUN([AC_PROG_LIBTOOL],
30
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
31
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
32
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
33
AC_PROVIDE_IFELSE([AC_PROG_CXX],
35
[define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
39
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
40
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
41
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
43
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
45
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
48
[define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
49
ifdef([A][M_PROG_GCJ],
50
[define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
51
ifdef([LT_AC_PROG_GCJ],
52
[define([LT_AC_PROG_GCJ],
53
defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
59
AC_DEFUN([_AC_PROG_LIBTOOL],
60
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
61
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
62
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
64
# This can be used to rebuild libtool when needed
65
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
67
# Always use our own libtool.
68
LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
71
# Prevent multiple expansion
72
define([AC_PROG_LIBTOOL], [])
78
AC_DEFUN([AC_LIBTOOL_SETUP],
80
AC_REQUIRE([AC_ENABLE_SHARED])dnl
81
AC_REQUIRE([AC_ENABLE_STATIC])dnl
82
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
83
AC_REQUIRE([AC_CANONICAL_HOST])dnl
84
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
85
AC_REQUIRE([AC_PROG_CC])dnl
86
AC_REQUIRE([AC_PROG_LD])dnl
87
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
88
AC_REQUIRE([AC_PROG_NM])dnl
89
AC_REQUIRE([LT_AC_PROG_SED])dnl
91
AC_REQUIRE([AC_PROG_LN_S])dnl
92
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
93
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
94
AC_REQUIRE([AC_OBJEXT])dnl
95
AC_REQUIRE([AC_EXEEXT])dnl
98
AC_LIBTOOL_SYS_MAX_CMD_LEN
99
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
102
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
103
_LT_AC_PROG_ECHO_BACKSLASH
107
# AIX sometimes has problems with the GCC collect2 program. For some
108
# reason, if we set the COLLECT_NAMES environment variable, the problems
109
# vanish in a puff of smoke.
110
if test "X${COLLECT_NAMES+set}" != Xset; then
117
# Sed substitution that helps us do robust quoting. It backslashifies
118
# metacharacters that are still active within double-quoted strings.
120
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
122
# Same as above, but do not quote variable references.
123
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
125
# Sed substitution to delay expansion of an escaped shell variable in a
126
# double_quote_subst'ed string.
127
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
129
# Sed substitution to avoid accidental globbing in evaled expressions
130
no_glob_subst='s/\*/\\\*/g'
136
default_ofile=libtool
139
# All known linkers require a `.a' archive for static linking (except M$VC,
140
# which needs '.lib').
142
ltmain="$ac_aux_dir/ltmain.sh"
143
ofile="$default_ofile"
144
with_gnu_ld="$lt_cv_prog_gnu_ld"
146
AC_CHECK_TOOL(RANLIB, ranlib, :)
147
AC_CHECK_TOOL(STRIP, strip, :)
152
# Set sane defaults for various variables
153
test -z "$AR" && AR=ar
154
test -z "$AR_FLAGS" && AR_FLAGS=cru
155
test -z "$AS" && AS=as
156
test -z "$CC" && CC=cc
157
test -z "$LTCC" && LTCC=$CC
158
test -z "$DLLTOOL" && DLLTOOL=dlltool
159
test -z "$LD" && LD=ld
160
test -z "$LN_S" && LN_S="ln -s"
161
test -z "$MAGIC_CMD" && MAGIC_CMD=file
162
test -z "$NM" && NM=nm
163
test -z "$SED" && SED=sed
164
test -z "$OBJDUMP" && OBJDUMP=objdump
165
test -z "$RANLIB" && RANLIB=:
166
test -z "$STRIP" && STRIP=:
167
test -z "$ac_objext" && ac_objext=o
169
# Determine commands to create old-style static archives.
170
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
171
old_postinstall_cmds='chmod 644 $oldlib'
172
old_postuninstall_cmds=
174
if test -n "$RANLIB"; then
177
old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
180
old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
183
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
186
# Only perform the check for file, if the check method requires it
187
case $deplibs_check_method in
189
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
195
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
196
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
197
enable_win32_dll=yes, enable_win32_dll=no)
199
AC_ARG_ENABLE([libtool-lock],
200
[AC_HELP_STRING([--disable-libtool-lock],
201
[avoid locking (might break parallel builds)])])
202
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
205
[AC_HELP_STRING([--with-pic],
206
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
207
[pic_mode="$withval"],
209
test -z "$pic_mode" && pic_mode=default
211
# Use C for the default configuration in the libtool script
213
AC_LIBTOOL_LANG_C_CONFIG
218
# _LT_AC_SYS_COMPILER
219
# -------------------
220
AC_DEFUN([_LT_AC_SYS_COMPILER],
221
[AC_REQUIRE([AC_PROG_CC])dnl
223
# If no C compiler was specified, use CC.
226
# Allow CC to be a program name with arguments.
229
])# _LT_AC_SYS_COMPILER
232
# _LT_AC_SYS_LIBPATH_AIX
233
# ----------------------
234
# Links a minimal program and checks the executable
235
# for the system default hardcoded library path. In most cases,
236
# this is /usr/lib:/lib, but when the MPI compilers are used
237
# the location of the communication and MPI libs are included too.
238
# If we don't find anything, use the default library path according
239
# to the aix ld manual.
240
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
241
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
242
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
244
# Check for a 64-bit object if we didn't find anything.
245
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; }
247
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
248
])# _LT_AC_SYS_LIBPATH_AIX
251
# _LT_AC_PROG_ECHO_BACKSLASH
252
# --------------------------
253
# Add some code to the start of the generated configure script which
254
# will find an echo command which doesn't interpret backslashes.
255
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
256
[ifdef([AC_DIVERSION_NOTICE],
257
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
258
[AC_DIVERT_PUSH(NOTICE)])
260
# Check that we are running under the correct shell.
261
SHELL=${CONFIG_SHELL-/bin/sh}
265
# Remove one level of quotation (which was required for Make).
266
ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
271
if test "X[$]1" = X--no-reexec; then
272
# Discard the --no-reexec flag, and continue.
274
elif test "X[$]1" = X--fallback-echo; then
275
# Avoid inline document here, it may be left over
277
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
278
# Yippee, $echo works!
281
# Restart under the correct shell.
282
exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
285
if test "X[$]1" = X--fallback-echo; then
286
# used as fallback echo
294
# The HP-UX ksh and POSIX shell print the target directory to stdout
296
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
298
if test -z "$ECHO"; then
299
if test "X${echo_test_string+set}" != Xset; then
300
# find a string as large as possible, as long as the shell can cope with it
301
for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
302
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
303
if (echo_test_string="`eval $cmd`") 2>/dev/null &&
304
echo_test_string="`eval $cmd`" &&
305
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
312
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
313
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
314
test "X$echo_testing_string" = "X$echo_test_string"; then
317
# The Solaris, AIX, and Digital Unix default echo programs unquote
318
# backslashes. This makes it impossible to quote backslashes using
319
# echo "$something" | sed 's/\\/\\\\/g'
321
# So, first we look for a working echo in the user's PATH.
323
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
324
for dir in $PATH /usr/ucb; do
326
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
327
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
328
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
329
test "X$echo_testing_string" = "X$echo_test_string"; then
336
if test "X$echo" = Xecho; then
337
# We didn't find a better echo, so look for alternatives.
338
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
339
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
340
test "X$echo_testing_string" = "X$echo_test_string"; then
341
# This shell has a builtin print -r that does the trick.
343
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
344
test "X$CONFIG_SHELL" != X/bin/ksh; then
345
# If we have ksh, try running configure again with it.
346
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
347
export ORIGINAL_CONFIG_SHELL
348
CONFIG_SHELL=/bin/ksh
350
exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
354
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
355
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
356
test "X$echo_testing_string" = "X$echo_test_string"; then
359
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
360
test "X$echo_testing_string" = 'X\t' &&
361
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
362
test "X$echo_testing_string" = "X$echo_test_string"; then
363
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
365
SHELL="$CONFIG_SHELL"
367
echo="$CONFIG_SHELL [$]0 --fallback-echo"
368
elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
369
test "X$echo_testing_string" = 'X\t' &&
370
echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
371
test "X$echo_testing_string" = "X$echo_test_string"; then
372
echo="$CONFIG_SHELL [$]0 --fallback-echo"
374
# maybe with a smaller string...
377
for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
378
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
385
if test "$prev" != 'sed 50q "[$]0"'; then
386
echo_test_string=`eval $prev`
387
export echo_test_string
388
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
390
# Oops. We lost completely, so just stick with echo.
399
# Copy echo and quote the copy suitably for passing to libtool from
400
# the Makefile, instead of quoting the original, which is used later.
402
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
403
ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
408
])# _LT_AC_PROG_ECHO_BACKSLASH
413
AC_DEFUN([_LT_AC_LOCK],
414
[AC_ARG_ENABLE([libtool-lock],
415
[AC_HELP_STRING([--disable-libtool-lock],
416
[avoid locking (might break parallel builds)])])
417
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
419
# Some flags need to be propagated to the compiler or linker for good
423
# Find out which ABI we are using.
424
echo 'int i;' > conftest.$ac_ext
425
if AC_TRY_EVAL(ac_compile); then
426
case `/usr/bin/file conftest.$ac_objext` in
438
# Find out which ABI we are using.
439
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
440
if AC_TRY_EVAL(ac_compile); then
441
case `/usr/bin/file conftest.$ac_objext` in
457
# Test if the compiler is 64bit
458
echo 'int i;' > conftest.$ac_ext
459
if AC_TRY_EVAL(ac_compile); then
460
case `/usr/bin/file conftest.$ac_objext` in
473
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
474
SAVE_CFLAGS="$CFLAGS"
475
CFLAGS="$CFLAGS -belf"
476
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
478
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
480
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
481
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
482
CFLAGS="$SAVE_CFLAGS"
485
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
486
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
487
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
488
AC_CHECK_TOOL(AS, as, false)
489
AC_CHECK_TOOL(OBJDUMP, objdump, false)
491
# recent cygwin and mingw systems supply a stub DllMain which the user
492
# can override, but on older systems we have to supply one
493
AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
495
[extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
497
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
500
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
501
# old mingw systems require "-dll" to link a DLL, while more recent ones
503
SAVE_CFLAGS="$CFLAGS"
504
CFLAGS="$CFLAGS -mdll"
505
AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
506
[AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
507
CFLAGS="$SAVE_CFLAGS" ;;
508
*-*-cygwin* | *-*-pw32*)
509
# cygwin systems need to pass --dll to the linker, and not link
510
# crt.o which will require a WinMain@16 definition.
511
lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
517
need_locks="$enable_libtool_lock"
522
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
523
# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
524
# ----------------------------------------------------------------
525
# Check whether the given compiler option works
526
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
527
[AC_CACHE_CHECK([$1], [$2],
529
ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
530
save_CFLAGS="$CFLAGS"
532
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
533
if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
534
# The compiler can only warn and ignore the option if not recognized
535
# So say no if there are warnings
536
if test -s conftest.err; then
537
# Append any errors to the config.log.
538
cat conftest.err 1>&AS_MESSAGE_LOG_FD
544
CFLAGS="$save_CFLAGS"
547
if test x"[$]$2" = xyes; then
548
ifelse([$5], , :, [$5])
550
ifelse([$6], , :, [$6])
552
])# AC_LIBTOOL_COMPILER_OPTION
555
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
556
# [ACTION-SUCCESS], [ACTION-FAILURE])
557
# ------------------------------------------------------------
558
# Check whether the given compiler option works
559
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
560
[AC_CACHE_CHECK([$1], [$2],
562
save_LDFLAGS="$LDFLAGS"
563
LDFLAGS="$LDFLAGS $3"
564
echo "$lt_simple_link_test_code" > conftest.$ac_ext
565
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
566
# The compiler can only warn and ignore the option if not recognized
567
# So say no if there are warnings
568
if test -s conftest.err; then
569
# Append any errors to the config.log.
570
cat conftest.err 1>&AS_MESSAGE_LOG_FD
576
LDFLAGS="$save_LDFLAGS"
579
if test x"[$]$2" = xyes; then
580
ifelse([$4], , :, [$4])
582
ifelse([$5], , :, [$5])
584
])# AC_LIBTOOL_LINKER_OPTION
587
# AC_LIBTOOL_SYS_MAX_CMD_LEN
588
# --------------------------
589
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
590
[# find the maximum length of command line arguments
591
AC_MSG_CHECKING([the maximum length of command line arguments])
592
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
598
# On DJGPP, this test can blow up pretty badly due to problems in libc
599
# (any single argument exceeding 2000 bytes causes a buffer overrun
600
# during glob expansion). Even if it were fixed, the result of this
601
# check would be larger than it should be.
602
lt_cv_sys_max_cmd_len=12288; # 12K is about right
606
# Under GNU Hurd, this test is not required because there is
607
# no limit to the length of command line arguments.
608
# Libtool will interpret -1 as no limit whatsoever
609
lt_cv_sys_max_cmd_len=-1;
613
# If test is not a shell built-in, we'll probably end up computing a
614
# maximum length that is only half of the actual maximum length, but
616
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
617
= "XX$testring") >/dev/null 2>&1 &&
618
new_result=`expr "X$testring" : ".*" 2>&1` &&
619
lt_cv_sys_max_cmd_len=$new_result &&
620
test $i != 17 # 1/2 MB should be enough
623
testring=$testring$testring
626
# Add a significant safety factor because C++ compilers can tack on massive
627
# amounts of additional arguments before passing them to the linker.
628
# It appears as though 1/2 is a usable value.
629
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
633
if test -n $lt_cv_sys_max_cmd_len ; then
634
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
638
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
642
# --------------------
643
AC_DEFUN([_LT_AC_CHECK_DLFCN],
644
[AC_CHECK_HEADERS(dlfcn.h)dnl
645
])# _LT_AC_CHECK_DLFCN
648
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
649
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
650
# ------------------------------------------------------------------
651
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
652
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
653
if test "$cross_compiling" = yes; then :
656
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
657
lt_status=$lt_dlunknown
658
cat > conftest.$ac_ext <<EOF
659
[#line __oline__ "configure"
660
#include "confdefs.h"
669
# define LT_DLGLOBAL RTLD_GLOBAL
672
# define LT_DLGLOBAL DL_GLOBAL
674
# define LT_DLGLOBAL 0
678
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
679
find out it does not work in some platform. */
680
#ifndef LT_DLLAZY_OR_NOW
682
# define LT_DLLAZY_OR_NOW RTLD_LAZY
685
# define LT_DLLAZY_OR_NOW DL_LAZY
688
# define LT_DLLAZY_OR_NOW RTLD_NOW
691
# define LT_DLLAZY_OR_NOW DL_NOW
693
# define LT_DLLAZY_OR_NOW 0
701
extern "C" void exit (int);
704
void fnord() { int i=42;}
707
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
708
int status = $lt_dlunknown;
712
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
713
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
714
/* dlclose (self); */
720
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
721
(./conftest; exit; ) 2>/dev/null
724
x$lt_dlno_uscore) $1 ;;
725
x$lt_dlneed_uscore) $2 ;;
726
x$lt_unknown|x*) $3 ;;
734
])# _LT_AC_TRY_DLOPEN_SELF
737
# AC_LIBTOOL_DLOPEN_SELF
738
# -------------------
739
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
740
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
741
if test "x$enable_dlopen" != xyes; then
742
enable_dlopen=unknown
743
enable_dlopen_self=unknown
744
enable_dlopen_self_static=unknown
751
lt_cv_dlopen="load_add_on"
753
lt_cv_dlopen_self=yes
756
cygwin* | mingw* | pw32*)
757
lt_cv_dlopen="LoadLibrary"
762
AC_CHECK_FUNC([shl_load],
763
[lt_cv_dlopen="shl_load"],
764
[AC_CHECK_LIB([dld], [shl_load],
765
[lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
766
[AC_CHECK_FUNC([dlopen],
767
[lt_cv_dlopen="dlopen"],
768
[AC_CHECK_LIB([dl], [dlopen],
769
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
770
[AC_CHECK_LIB([svld], [dlopen],
771
[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
772
[AC_CHECK_LIB([dld], [dld_link],
773
[lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
782
if test "x$lt_cv_dlopen" != xno; then
788
case $lt_cv_dlopen in
790
save_CPPFLAGS="$CPPFLAGS"
791
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
793
save_LDFLAGS="$LDFLAGS"
794
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
797
LIBS="$lt_cv_dlopen_libs $LIBS"
799
AC_CACHE_CHECK([whether a program can dlopen itself],
800
lt_cv_dlopen_self, [dnl
801
_LT_AC_TRY_DLOPEN_SELF(
802
lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
803
lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
806
if test "x$lt_cv_dlopen_self" = xyes; then
807
LDFLAGS="$LDFLAGS $link_static_flag"
808
AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
809
lt_cv_dlopen_self_static, [dnl
810
_LT_AC_TRY_DLOPEN_SELF(
811
lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
812
lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
816
CPPFLAGS="$save_CPPFLAGS"
817
LDFLAGS="$save_LDFLAGS"
822
case $lt_cv_dlopen_self in
823
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
824
*) enable_dlopen_self=unknown ;;
827
case $lt_cv_dlopen_self_static in
828
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
829
*) enable_dlopen_self_static=unknown ;;
832
])# AC_LIBTOOL_DLOPEN_SELF
835
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
836
# ---------------------------------
837
# Check to see if options -c and -o are simultaneously supported by compiler
838
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
839
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
840
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
841
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
842
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
843
$rm -r conftest 2>/dev/null
847
ifelse([$1],[],[save_CFLAGS="$CFLAGS"
848
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
849
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
850
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
851
[$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
852
GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
853
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
855
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
856
# that will create temporary files in the current directory regardless of
857
# the output directory. Thus, making CWD read-only will cause this test
858
# to fail, enabling locking or at least warning the user not to do parallel
862
if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
864
# The compiler can only warn and ignore the option if not recognized
865
# So say no if there are warnings
866
if test -s out/conftest.err; then
867
# Append any errors to the config.log.
868
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
870
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
873
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
874
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
875
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
883
])# AC_LIBTOOL_PROG_CC_C_O
886
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
887
# -----------------------------------------
888
# Check to see if we can do hard links to lock some files if needed
889
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
890
[AC_REQUIRE([_LT_AC_LOCK])dnl
892
hard_links="nottested"
893
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
894
# do not overwrite the value of need_locks provided by the user
895
AC_MSG_CHECKING([if we can lock with hard links])
898
ln conftest.a conftest.b 2>/dev/null && hard_links=no
900
ln conftest.a conftest.b 2>&5 || hard_links=no
901
ln conftest.a conftest.b 2>/dev/null && hard_links=no
902
AC_MSG_RESULT([$hard_links])
903
if test "$hard_links" = no; then
904
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
910
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
915
AC_DEFUN([AC_LIBTOOL_OBJDIR],
916
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
917
[rm -f .libs 2>/dev/null
918
mkdir .libs 2>/dev/null
919
if test -d .libs; then
922
# MS-DOS does not allow filenames that begin with a dot.
925
rmdir .libs 2>/dev/null])
927
])# AC_LIBTOOL_OBJDIR
930
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
931
# ----------------------------------------------
932
# Check hardcoding attributes.
933
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
934
[AC_MSG_CHECKING([how to hardcode library paths into programs])
935
_LT_AC_TAGVAR(hardcode_action, $1)=
936
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
937
test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
939
# We can hardcode non-existant directories.
940
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
941
# If the only mechanism to avoid hardcoding is shlibpath_var, we
942
# have to relink, otherwise we might link with an installed library
943
# when we should be linking with a yet-to-be-installed one
944
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
945
test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
946
# Linking always hardcodes the temporary library directory.
947
_LT_AC_TAGVAR(hardcode_action, $1)=relink
949
# We can link without hardcoding, and we can hardcode nonexisting dirs.
950
_LT_AC_TAGVAR(hardcode_action, $1)=immediate
953
# We cannot hardcode anything, or else we can only hardcode existing
955
_LT_AC_TAGVAR(hardcode_action, $1)=unsupported
957
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
959
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
960
# Fast installation is not supported
961
enable_fast_install=no
962
elif test "$shlibpath_overrides_runpath" = yes ||
963
test "$enable_shared" = no; then
964
# Fast installation is not necessary
965
enable_fast_install=needless
967
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
970
# AC_LIBTOOL_SYS_LIB_STRIP
971
# ------------------------
972
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
975
AC_MSG_CHECKING([whether stripping libraries is possible])
976
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
977
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
978
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
983
])# AC_LIBTOOL_SYS_LIB_STRIP
986
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
987
# -----------------------------
988
# PORTME Fill in your ld.so characteristics
989
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
990
[AC_MSG_CHECKING([dynamic linker characteristics])
992
libname_spec='lib$name'
999
shlibpath_overrides_runpath=unknown
1001
dynamic_linker="$host_os ld.so"
1002
sys_lib_dlsearch_path_spec="/lib /usr/lib"
1003
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1004
need_lib_prefix=unknown
1005
hardcode_into_libs=no
1007
# when you set need_version to no, make sure it does not cause -set_version
1008
# flags to be left without arguments
1009
need_version=unknown
1014
library_names_spec='${libname}${release}.so$versuffix $libname.a'
1015
shlibpath_var=LIBPATH
1017
# AIX 3 has no versioning support, so we append a major version to the name.
1018
soname_spec='${libname}${release}.so$major'
1023
if test "$host_cpu" = ia64; then
1024
# AIX 5 supports IA64
1025
library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1026
shlibpath_var=LD_LIBRARY_PATH
1028
# With GCC up to 2.95.x, collect2 would create an import file
1029
# for dependence libraries. The import file would start with
1030
# the line `#! .'. This would cause the generated library to
1031
# depend on `.', always an invalid library. This was fixed in
1032
# development snapshots of GCC prior to 3.0.
1034
aix4 | aix4.[[01]] | aix4.[[01]].*)
1035
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1037
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1044
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1045
# soname into executable. Probably we can add versioning support to
1046
# collect2, so additional links can be useful in future.
1047
if test "$aix_use_runtimelinking" = yes; then
1048
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
1049
# instead of lib<name>.a to let people know that these are not
1050
# typical AIX shared libraries.
1051
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1053
# We preserve .a as extension for shared libraries through AIX4.2
1054
# and later when we are not doing run time linking.
1055
library_names_spec='${libname}${release}.a $libname.a'
1056
soname_spec='${libname}${release}.so$major'
1058
shlibpath_var=LIBPATH
1063
library_names_spec='$libname.ixlibrary $libname.a'
1064
# Create ${libname}_ixlibrary.a entries in /sys/libs.
1065
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'
1069
library_names_spec='${libname}.so'
1070
dynamic_linker="$host_os ld.so"
1071
shlibpath_var=LIBRARY_PATH
1077
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1078
soname_spec='${libname}${release}.so$major'
1079
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1080
shlibpath_var=LD_LIBRARY_PATH
1081
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1082
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1083
# the default ld.so.conf also contains /usr/contrib/lib and
1084
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1085
# libtool to hard-code these into programs
1088
cygwin* | mingw* | pw32*)
1089
version_type=windows
1092
case $GCC,$host_os in
1094
library_names_spec='$libname.dll.a'
1095
sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1096
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1097
postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1098
dldir=$destdir/`dirname \$dlpath`~
1099
test -d \$dldir || mkdir -p \$dldir~
1100
$install_prog .libs/$dlname \$dldir/$dlname'
1101
postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1102
dlpath=$dir/\$dldll~
1106
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1107
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
1108
if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
1109
# It is most probably a Windows format PATH printed by
1110
# mingw gcc, but we are running on Cygwin. Gcc prints its search
1111
# path with ; separators, and with drive letters. We can handle the
1112
# drive letters (cygwin fileutils understands them), so leave them,
1113
# especially as we might pass files found there to a mingw objdump,
1114
# which wouldn't understand a cygwinified path. Ahh.
1115
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1117
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1121
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1124
library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
1127
dynamic_linker='Win32 ld.exe'
1128
# FIXME: first we should search . and the directory the executable is in
1132
darwin* | rhapsody*)
1133
dynamic_linker="$host_os dyld"
1137
# FIXME: Relying on posixy $() will cause problems for
1138
# cross-compilation, but unfortunately the echo tests do not
1139
# yet detect zsh echo's removal of \ escapes.
1140
library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1141
soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1142
shlibpath_overrides_runpath=yes
1143
shlibpath_var=DYLD_LIBRARY_PATH
1150
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1151
soname_spec='${libname}${release}.so$major'
1152
shlibpath_var=LD_LIBRARY_PATH
1160
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1161
version_type=freebsd-$objformat
1162
case $version_type in
1164
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1169
library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1173
shlibpath_var=LD_LIBRARY_PATH
1176
shlibpath_overrides_runpath=yes
1178
freebsd3.[01]* | freebsdelf3.[01]*)
1179
shlibpath_overrides_runpath=yes
1180
hardcode_into_libs=yes
1183
shlibpath_overrides_runpath=no
1184
hardcode_into_libs=yes
1193
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1194
soname_spec='${libname}${release}.so$major'
1195
shlibpath_var=LD_LIBRARY_PATH
1196
hardcode_into_libs=yes
1199
hpux9* | hpux10* | hpux11*)
1200
# Give a soname corresponding to the major version so that dld.sl refuses to
1201
# link against other versions.
1205
if test "$host_cpu" = ia64; then
1206
hardcode_into_libs=yes
1207
dynamic_linker="$host_os dld.so"
1208
shlibpath_var=LD_LIBRARY_PATH
1209
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1210
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1211
soname_spec='${libname}${release}.so$major'
1212
if test "X$HPUX_IA64_MODE" = X32; then
1213
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1215
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1217
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1219
dynamic_linker="$host_os dld.sl"
1220
shlibpath_var=SHLIB_PATH
1221
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1222
library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1223
soname_spec='${libname}${release}.sl$major'
1225
# HP-UX runs *really* slowly unless shared libraries are mode 555.
1226
postinstall_cmds='chmod 555 $lib'
1229
irix5* | irix6* | nonstopux*)
1231
nonstopux*) version_type=nonstopux ;;
1232
*) version_type=irix ;;
1236
soname_spec='${libname}${release}.so$major'
1237
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1239
irix5* | nonstopux*)
1243
case $LD in # libtool.m4 will add one of these switches to LD
1244
*-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1245
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1246
*-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1247
*) libsuff= shlibsuff= libmagic=never-match;;
1251
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1252
shlibpath_overrides_runpath=no
1253
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1254
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1257
# No shared lib support for Linux oldld, aout, or coff.
1258
linux*oldld* | linux*aout* | linux*coff*)
1262
# This must be Linux ELF.
1267
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1268
soname_spec='${libname}${release}.so$major'
1269
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1271
if test "x$LINUX_64_MODE" = x64; then
1272
# Some platforms are per default 64-bit, so there's no /lib64
1273
if test -d /lib64; then
1277
shlibpath_var=LD_LIBRARY_PATH
1278
shlibpath_overrides_runpath=no
1279
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
1280
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1281
# This implies no fast_install, which is unacceptable.
1282
# Some rework will be needed to allow for fast_install
1283
# before this can be enabled.
1284
hardcode_into_libs=yes
1286
# We used to test for /lib/ld.so.1 and disable shared libraries on
1287
# powerpc, because MkLinux only supported shared libraries with the
1288
# GNU dynamic linker. Since this was broken with cross compilers,
1289
# most powerpc-linux boxes support dynamic linking these days and
1290
# people can always --disable-shared, the test was removed, and we
1291
# assume the GNU/Linux dynamic linker is in use.
1292
dynamic_linker='GNU/Linux ld.so'
1299
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1300
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1301
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1302
dynamic_linker='NetBSD (a.out) ld.so'
1304
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1305
soname_spec='${libname}${release}.so$major'
1306
dynamic_linker='NetBSD ld.elf_so'
1308
shlibpath_var=LD_LIBRARY_PATH
1309
shlibpath_overrides_runpath=yes
1310
hardcode_into_libs=yes
1315
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1316
shlibpath_var=LD_LIBRARY_PATH
1317
shlibpath_overrides_runpath=yes
1324
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1325
soname_spec='${libname}${release}.so$major'
1326
shlibpath_var=LD_LIBRARY_PATH
1327
shlibpath_overrides_runpath=yes
1334
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1335
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1336
shlibpath_var=LD_LIBRARY_PATH
1337
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1339
openbsd2.[[89]] | openbsd2.[[89]].*)
1340
shlibpath_overrides_runpath=no
1343
shlibpath_overrides_runpath=yes
1347
shlibpath_overrides_runpath=yes
1352
libname_spec='$name'
1354
library_names_spec='$libname.dll $libname.a'
1355
dynamic_linker='OS/2 ld.exe'
1356
shlibpath_var=LIBPATH
1359
osf3* | osf4* | osf5*)
1363
soname_spec='${libname}${release}.so'
1364
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1365
shlibpath_var=LD_LIBRARY_PATH
1366
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1367
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1372
soname_spec='${libname}${release}.so$major'
1373
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1374
shlibpath_var=LD_LIBRARY_PATH
1381
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1382
soname_spec='${libname}${release}.so$major'
1383
shlibpath_var=LD_LIBRARY_PATH
1384
shlibpath_overrides_runpath=yes
1385
hardcode_into_libs=yes
1386
# ldd complains unless libraries are executable
1387
postinstall_cmds='chmod +x $lib'
1392
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1393
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1394
shlibpath_var=LD_LIBRARY_PATH
1395
shlibpath_overrides_runpath=yes
1396
if test "$with_gnu_ld" = yes; then
1402
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1404
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1405
soname_spec='${libname}${release}.so$major'
1406
shlibpath_var=LD_LIBRARY_PATH
1407
case $host_vendor in
1409
shlibpath_overrides_runpath=no
1414
shlibpath_overrides_runpath=no
1415
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1421
if test -d /usr/nec ;then
1423
library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1424
soname_spec='$libname.so.$major'
1425
shlibpath_var=LD_LIBRARY_PATH
1431
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1432
soname_spec='${libname}${release}.so$major'
1433
shlibpath_var=LD_LIBRARY_PATH
1440
AC_MSG_RESULT([$dynamic_linker])
1441
test "$dynamic_linker" = no && can_build_shared=no
1442
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1447
AC_DEFUN([_LT_AC_TAGCONFIG],
1448
[AC_ARG_WITH([tags],
1449
[AC_HELP_STRING([--with-tags=TAGS],
1450
[include additional configurations @<:@CXX,GCJ@:>@])],
1451
[tagnames="$withval"],
1454
mingw*|cygwin*) tagnames="$tagnames,RC" ;;
1457
if test -f "$ltmain" && test -n "$tagnames"; then
1458
if test ! -f "${ofile}"; then
1459
AC_MSG_WARN([output file `$ofile' does not exist])
1462
if test -z "$LTCC"; then
1463
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1464
if test -z "$LTCC"; then
1465
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1467
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1471
# Extract list of available tagged configurations in $ofile.
1472
# Note that this assumes the entire list is on one line.
1473
available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1475
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1476
for tagname in $tagnames; do
1478
# Check whether tagname contains only valid characters
1479
case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1481
*) AC_MSG_ERROR([invalid tag name: $tagname])
1485
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1487
AC_MSG_ERROR([tag name \"$tagname\" already exists])
1490
# Update the list of available tags.
1491
if test -n "$tagname"; then
1492
echo appending configuration tag \"$tagname\" to $ofile
1496
AC_LIBTOOL_LANG_CXX_CONFIG
1500
AC_LIBTOOL_LANG_GCJ_CONFIG
1504
AC_LIBTOOL_LANG_RC_CONFIG
1508
AC_MSG_ERROR([Unsupported tag name: $tagname])
1512
# Append the new tag name to the list of available tags.
1513
available_tags="$available_tags $tagname"
1518
# Now substitute the updated list of available tags.
1519
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1520
mv "${ofile}T" "$ofile"
1524
AC_MSG_ERROR([unable to update list of available tagged configurations.])
1527
])# _LT_AC_TAGCONFIG
1532
# enable checks for dlopen support
1533
AC_DEFUN([AC_LIBTOOL_DLOPEN],
1534
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1535
])# AC_LIBTOOL_DLOPEN
1538
# AC_LIBTOOL_WIN32_DLL
1539
# --------------------
1540
# declare package support for building win32 dll's
1541
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1542
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1543
])# AC_LIBTOOL_WIN32_DLL
1546
# AC_ENABLE_SHARED([DEFAULT])
1547
# ---------------------------
1548
# implement the --enable-shared flag
1549
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1550
AC_DEFUN([AC_ENABLE_SHARED],
1551
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1552
AC_ARG_ENABLE([shared],
1553
[AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1554
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1555
[p=${PACKAGE-default}
1557
yes) enable_shared=yes ;;
1558
no) enable_shared=no ;;
1561
# Look at the argument we got. We use all the common list separators.
1562
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1563
for pkg in $enableval; do
1565
if test "X$pkg" = "X$p"; then
1572
[enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1573
])# AC_ENABLE_SHARED
1578
#- set the default shared flag to --disable-shared
1579
AC_DEFUN([AC_DISABLE_SHARED],
1580
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1581
AC_ENABLE_SHARED(no)
1582
])# AC_DISABLE_SHARED
1585
# AC_ENABLE_STATIC([DEFAULT])
1586
# ---------------------------
1587
# implement the --enable-static flag
1588
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1589
AC_DEFUN([AC_ENABLE_STATIC],
1590
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1591
AC_ARG_ENABLE([static],
1592
[AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1593
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1594
[p=${PACKAGE-default}
1596
yes) enable_static=yes ;;
1597
no) enable_static=no ;;
1600
# Look at the argument we got. We use all the common list separators.
1601
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1602
for pkg in $enableval; do
1604
if test "X$pkg" = "X$p"; then
1611
[enable_static=]AC_ENABLE_STATIC_DEFAULT)
1612
])# AC_ENABLE_STATIC
1617
# set the default static flag to --disable-static
1618
AC_DEFUN([AC_DISABLE_STATIC],
1619
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1620
AC_ENABLE_STATIC(no)
1621
])# AC_DISABLE_STATIC
1624
# AC_ENABLE_FAST_INSTALL([DEFAULT])
1625
# ---------------------------------
1626
# implement the --enable-fast-install flag
1627
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1628
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1629
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1630
AC_ARG_ENABLE([fast-install],
1631
[AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1632
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1633
[p=${PACKAGE-default}
1635
yes) enable_fast_install=yes ;;
1636
no) enable_fast_install=no ;;
1638
enable_fast_install=no
1639
# Look at the argument we got. We use all the common list separators.
1640
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1641
for pkg in $enableval; do
1643
if test "X$pkg" = "X$p"; then
1644
enable_fast_install=yes
1650
[enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1651
])# AC_ENABLE_FAST_INSTALL
1654
# AC_DISABLE_FAST_INSTALL
1655
# -----------------------
1656
# set the default to --disable-fast-install
1657
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1658
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1659
AC_ENABLE_FAST_INSTALL(no)
1660
])# AC_DISABLE_FAST_INSTALL
1663
# AC_LIBTOOL_PICMODE([MODE])
1664
# --------------------------
1665
# implement the --with-pic flag
1666
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1667
AC_DEFUN([AC_LIBTOOL_PICMODE],
1668
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1669
pic_mode=ifelse($#,1,$1,default)
1670
])# AC_LIBTOOL_PICMODE
1673
# AC_PATH_TOOL_PREFIX
1674
# -------------------
1675
# find a file program which can recognise shared library
1676
AC_DEFUN([AC_PATH_TOOL_PREFIX],
1677
[AC_MSG_CHECKING([for $1])
1678
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1680
[[\\/*] | ?:[\\/]*])
1681
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1684
lt_save_MAGIC_CMD="$MAGIC_CMD"
1685
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1686
dnl $ac_dummy forces splitting on constant user-supplied paths.
1687
dnl POSIX.2 word splitting is done only on the output of word expansions,
1688
dnl not every word. This closes a longstanding sh security hole.
1689
ac_dummy="ifelse([$2], , $PATH, [$2])"
1690
for ac_dir in $ac_dummy; do
1692
test -z "$ac_dir" && ac_dir=.
1693
if test -f $ac_dir/$1; then
1694
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1695
if test -n "$file_magic_test_file"; then
1696
case $deplibs_check_method in
1698
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1699
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1700
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1701
egrep "$file_magic_regex" > /dev/null; then
1706
*** Warning: the command libtool uses to detect shared libraries,
1707
*** $file_magic_cmd, produces output that libtool cannot recognize.
1708
*** The result is that libtool may fail to recognize shared libraries
1709
*** as such. This will affect the creation of libtool libraries that
1710
*** depend on shared libraries, but programs linked with such libtool
1711
*** libraries will work regardless of this problem. Nevertheless, you
1712
*** may want to report the problem to your system manager and/or to
1713
*** bug-libtool@gnu.org
1723
MAGIC_CMD="$lt_save_MAGIC_CMD"
1726
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1727
if test -n "$MAGIC_CMD"; then
1728
AC_MSG_RESULT($MAGIC_CMD)
1732
])# AC_PATH_TOOL_PREFIX
1737
# find a file program which can recognise a shared library
1738
AC_DEFUN([AC_PATH_MAGIC],
1739
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1740
if test -z "$lt_cv_path_MAGIC_CMD"; then
1741
if test -n "$ac_tool_prefix"; then
1742
AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1752
# find the path to the GNU or non-GNU linker
1753
AC_DEFUN([AC_PROG_LD],
1754
[AC_ARG_WITH([gnu-ld],
1755
[AC_HELP_STRING([--with-gnu-ld],
1756
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
1757
[test "$withval" = no || with_gnu_ld=yes],
1759
AC_REQUIRE([AC_PROG_CC])dnl
1760
AC_REQUIRE([AC_CANONICAL_HOST])dnl
1761
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1763
if test "$GCC" = yes; then
1764
# Check if gcc -print-prog-name=ld gives a path.
1765
AC_MSG_CHECKING([for ld used by GCC])
1768
# gcc leaves a trailing carriage return which upsets mingw
1769
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1771
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1774
# Accept absolute paths.
1775
[[\\/]]* | ?:[[\\/]]*)
1776
re_direlt='/[[^/]][[^/]]*/\.\./'
1777
# Canonicalize the path of ld
1778
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1779
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1780
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1782
test -z "$LD" && LD="$ac_prog"
1785
# If it fails, then pretend we aren't using GCC.
1789
# If it is relative, then search for the first ld in PATH.
1793
elif test "$with_gnu_ld" = yes; then
1794
AC_MSG_CHECKING([for GNU ld])
1796
AC_MSG_CHECKING([for non-GNU ld])
1798
AC_CACHE_VAL(lt_cv_path_LD,
1799
[if test -z "$LD"; then
1800
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1801
for ac_dir in $PATH; do
1803
test -z "$ac_dir" && ac_dir=.
1804
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1805
lt_cv_path_LD="$ac_dir/$ac_prog"
1806
# Check to see if the program is GNU ld. I'd rather use --version,
1807
# but apparently some GNU ld's only accept -v.
1808
# Break only if it was the GNU/non-GNU ld that we prefer.
1809
if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1810
test "$with_gnu_ld" != no && break
1812
test "$with_gnu_ld" != yes && break
1818
lt_cv_path_LD="$LD" # Let the user override the test with a path.
1821
if test -n "$LD"; then
1826
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1833
AC_DEFUN([AC_PROG_LD_GNU],
1834
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1835
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1836
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1837
lt_cv_prog_gnu_ld=yes
1839
lt_cv_prog_gnu_ld=no
1841
with_gnu_ld=$lt_cv_prog_gnu_ld
1845
# AC_PROG_LD_RELOAD_FLAG
1846
# ----------------------
1847
# find reload flag for linker
1848
# -- PORTME Some linkers may need a different reload flag.
1849
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
1850
[AC_CACHE_CHECK([for $LD option to reload object files],
1851
lt_cv_ld_reload_flag,
1852
[lt_cv_ld_reload_flag='-r'])
1853
reload_flag=$lt_cv_ld_reload_flag
1854
case $reload_flag in
1856
*) reload_flag=" $reload_flag" ;;
1858
reload_cmds='$LD$reload_flag -o $output$reload_objs'
1859
])# AC_PROG_LD_RELOAD_FLAG
1862
# AC_DEPLIBS_CHECK_METHOD
1863
# -----------------------
1864
# how to check for library dependencies
1865
# -- PORTME fill in with the dynamic library characteristics
1866
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1867
[AC_CACHE_CHECK([how to recognise dependant libraries],
1868
lt_cv_deplibs_check_method,
1869
[lt_cv_file_magic_cmd='$MAGIC_CMD'
1870
lt_cv_file_magic_test_file=
1871
lt_cv_deplibs_check_method='unknown'
1872
# Need to set the preceding variable on all platforms that support
1873
# interlibrary dependencies.
1874
# 'none' -- dependencies not supported.
1875
# `unknown' -- same as none, but documents that we really don't know.
1876
# 'pass_all' -- all dependencies passed with no checks.
1877
# 'test_compile' -- check by making test program.
1878
# 'file_magic [[regex]]' -- check by looking for files in library path
1879
# which responds to the $file_magic_cmd with a given egrep regex.
1880
# If you have `file' or equivalent on your system and you're not sure
1881
# whether `pass_all' will *always* work, you probably want this one.
1885
lt_cv_deplibs_check_method=pass_all
1889
lt_cv_deplibs_check_method=pass_all
1893
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
1894
lt_cv_file_magic_cmd='/usr/bin/file -L'
1895
lt_cv_file_magic_test_file=/shlib/libc.so
1898
cygwin* | mingw* | pw32*)
1899
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1900
lt_cv_file_magic_cmd='$OBJDUMP -f'
1903
darwin* | rhapsody*)
1904
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1905
lt_cv_file_magic_cmd='/usr/bin/file -L'
1907
rhapsody* | darwin1.[[012]])
1908
lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
1911
lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1917
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1920
# Not sure whether the presence of OpenBSD here was a mistake.
1921
# Let's accept both of them until this is cleared up.
1922
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
1923
lt_cv_file_magic_cmd=/usr/bin/file
1924
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1928
lt_cv_deplibs_check_method=pass_all
1933
lt_cv_deplibs_check_method=pass_all
1936
hpux10.20* | hpux11*)
1937
lt_cv_file_magic_cmd=/usr/bin/file
1938
if test "$host_cpu" = ia64; then
1939
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
1940
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1942
lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
1943
lt_cv_file_magic_test_file=/usr/lib/libc.sl
1947
irix5* | irix6* | nonstopux*)
1949
irix5* | nonstopux*)
1950
# this will be overridden with pass_all, but let us keep it just in case
1951
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1955
*-32|*"-32 ") libmagic=32-bit;;
1956
*-n32|*"-n32 ") libmagic=N32;;
1957
*-64|*"-64 ") libmagic=64-bit;;
1958
*) libmagic=never-match;;
1960
# this will be overridden with pass_all, but let us keep it just in case
1961
lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
1964
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1965
lt_cv_deplibs_check_method=pass_all
1968
# This must be Linux ELF.
1971
alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
1972
lt_cv_deplibs_check_method=pass_all ;;
1974
# glibc up to 2.1.1 does not perform some relocations on ARM
1975
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
1977
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1981
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1982
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
1984
lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
1989
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
1990
lt_cv_file_magic_cmd=/usr/bin/file
1991
lt_cv_file_magic_test_file=/usr/lib/libnls.so
1995
lt_cv_deplibs_check_method=unknown
1999
lt_cv_file_magic_cmd=/usr/bin/file
2000
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2001
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2002
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2004
lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2008
osf3* | osf4* | osf5*)
2009
# this will be overridden with pass_all, but let us keep it just in case
2010
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2011
lt_cv_file_magic_test_file=/shlib/libc.so
2012
lt_cv_deplibs_check_method=pass_all
2016
lt_cv_deplibs_check_method=pass_all
2020
lt_cv_deplibs_check_method=pass_all
2021
lt_cv_file_magic_test_file=/lib/libc.so
2024
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2025
case $host_vendor in
2027
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]]'
2028
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2031
lt_cv_deplibs_check_method=pass_all
2034
lt_cv_file_magic_cmd='/bin/file'
2035
lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2038
lt_cv_file_magic_cmd='/bin/file'
2039
lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2040
lt_cv_file_magic_test_file=/lib/libc.so
2045
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2046
lt_cv_deplibs_check_method=pass_all
2050
file_magic_cmd=$lt_cv_file_magic_cmd
2051
deplibs_check_method=$lt_cv_deplibs_check_method
2052
test -z "$deplibs_check_method" && deplibs_check_method=unknown
2053
])# AC_DEPLIBS_CHECK_METHOD
2058
# find the path to a BSD-compatible name lister
2059
AC_DEFUN([AC_PROG_NM],
2060
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2061
[if test -n "$NM"; then
2062
# Let the user override the test.
2065
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2066
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2068
test -z "$ac_dir" && ac_dir=.
2069
tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2070
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2071
# Check to see if the nm accepts a BSD-compat flag.
2072
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2073
# nm: unknown option "B" ignored
2074
# Tru64's nm complains that /dev/null is an invalid object file
2075
if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2076
lt_cv_path_NM="$tmp_nm -B"
2078
elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2079
lt_cv_path_NM="$tmp_nm -p"
2082
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2083
continue # so that we can try to find one that supports BSD flags
2088
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2096
# check for math library
2097
AC_DEFUN([AC_CHECK_LIBM],
2098
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2101
*-*-beos* | *-*-cygwin* | *-*-pw32*)
2102
# These system don't have libm
2105
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2106
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2109
AC_CHECK_LIB(m, main, LIBM="-lm")
2115
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2116
# -----------------------------------
2117
# sets LIBLTDL to the link flags for the libltdl convenience library and
2118
# LTDLINCL to the include flags for the libltdl header and adds
2119
# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2120
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2121
# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2122
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2123
# '${top_srcdir}/' (note the single quotes!). If your package is not
2124
# flat and you're not using automake, define top_builddir and
2125
# top_srcdir appropriately in the Makefiles.
2126
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2127
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2128
case $enable_ltdl_convenience in
2129
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2130
"") enable_ltdl_convenience=yes
2131
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2133
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2134
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2135
# For backwards non-gettext consistent compatibility...
2137
])# AC_LIBLTDL_CONVENIENCE
2140
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2141
# -----------------------------------
2142
# sets LIBLTDL to the link flags for the libltdl installable library and
2143
# LTDLINCL to the include flags for the libltdl header and adds
2144
# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2145
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2146
# DIRECTORY is not provided and an installed libltdl is not found, it is
2147
# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2148
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2149
# quotes!). If your package is not flat and you're not using automake,
2150
# define top_builddir and top_srcdir appropriately in the Makefiles.
2151
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2152
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2153
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2154
AC_CHECK_LIB(ltdl, main,
2155
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2156
[if test x"$enable_ltdl_install" = xno; then
2157
AC_MSG_WARN([libltdl not installed, but installation disabled])
2159
enable_ltdl_install=yes
2162
if test x"$enable_ltdl_install" = x"yes"; then
2163
ac_configure_args="$ac_configure_args --enable-ltdl-install"
2164
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2165
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2167
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2171
# For backwards non-gettext consistent compatibility...
2173
])# AC_LIBLTDL_INSTALLABLE
2176
# If this macro is not defined by Autoconf, define it here.
2177
ifdef([AC_PROVIDE_IFELSE],
2179
[define([AC_PROVIDE_IFELSE],
2180
[ifdef([AC_PROVIDE_$1],
2186
# enable support for C++ libraries
2187
AC_DEFUN([AC_LIBTOOL_CXX],
2188
[AC_REQUIRE([_LT_AC_LANG_CXX])
2194
AC_DEFUN([_LT_AC_LANG_CXX],
2195
[AC_REQUIRE([AC_PROG_CXX])
2196
AC_REQUIRE([AC_PROG_CXXCPP])
2202
# enable support for GCJ libraries
2203
AC_DEFUN([AC_LIBTOOL_GCJ],
2204
[AC_REQUIRE([_LT_AC_LANG_GCJ])
2210
AC_DEFUN([_LT_AC_LANG_GCJ],
2211
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2212
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2213
[AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2214
[ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2215
[ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2216
[AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2222
# enable support for Windows resource files
2223
AC_DEFUN([AC_LIBTOOL_RC],
2224
[AC_REQUIRE([AC_PROG_RC])
2228
# AC_LIBTOOL_LANG_C_CONFIG
2229
# ------------------------
2230
# Ensure that the configuration vars for the C compiler are
2231
# suitably defined. Those variables are subsequently used by
2232
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2233
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2234
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2238
# Source file extension for C test sources.
2241
# Object file extension for compiled C test sources.
2243
_LT_AC_TAGVAR(objext, $1)=$objext
2245
# Code to be used in simple compile tests
2246
lt_simple_compile_test_code="int some_variable = 0;"
2248
# Code to be used in simple link tests
2249
lt_simple_link_test_code='main(){return(0);}'
2254
# Check for any special shared library compilation flags.
2256
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2257
if test "$GCC" = no; then
2260
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2264
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2265
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2266
if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2268
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2269
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2275
# Check to make sure the static flag actually works.
2277
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2278
_LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2279
$_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2281
[_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2285
## There is no encapsulation within the following macros, do not change
2286
## the running order or otherwise move them around unless you know exactly
2287
## what you are doing...
2288
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2289
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2290
AC_LIBTOOL_PROG_CC_C_O($1)
2291
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2292
AC_LIBTOOL_PROG_LD_SHLIBS($1)
2293
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2294
AC_LIBTOOL_SYS_LIB_STRIP
2295
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2296
AC_LIBTOOL_DLOPEN_SELF($1)
2298
# Report which librarie types wil actually be built
2299
AC_MSG_CHECKING([if libtool supports shared libraries])
2300
AC_MSG_RESULT([$can_build_shared])
2302
AC_MSG_CHECKING([whether to build shared libraries])
2303
test "$can_build_shared" = "no" && enable_shared=no
2305
# On AIX, shared libraries and static libraries use the same namespace, and
2306
# are all built from PIC.
2309
test "$enable_shared" = yes && enable_static=no
2310
if test -n "$RANLIB"; then
2311
archive_cmds="$archive_cmds~\$RANLIB \$lib"
2312
postinstall_cmds='$RANLIB $lib'
2317
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2318
test "$enable_shared" = yes && enable_static=no
2322
AC_MSG_RESULT([$enable_shared])
2324
AC_MSG_CHECKING([whether to build static libraries])
2325
# Make sure either enable_shared or enable_static is yes.
2326
test "$enable_shared" = yes || enable_static=yes
2327
AC_MSG_RESULT([$enable_static])
2329
AC_LIBTOOL_CONFIG($1)
2333
])# AC_LIBTOOL_LANG_C_CONFIG
2336
# AC_LIBTOOL_LANG_CXX_CONFIG
2337
# --------------------------
2338
# Ensure that the configuration vars for the C compiler are
2339
# suitably defined. Those variables are subsequently used by
2340
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2341
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2342
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2344
AC_REQUIRE([AC_PROG_CXX])
2345
AC_REQUIRE([AC_PROG_CXXCPP])
2347
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2348
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2349
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2350
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2351
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2352
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2353
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2354
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2355
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2356
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2357
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2358
_LT_AC_TAGVAR(no_undefined_flag, $1)=
2359
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2361
# Dependencies to place before and after the object being linked:
2362
_LT_AC_TAGVAR(predep_objects, $1)=
2363
_LT_AC_TAGVAR(postdep_objects, $1)=
2364
_LT_AC_TAGVAR(predeps, $1)=
2365
_LT_AC_TAGVAR(postdeps, $1)=
2366
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2368
# Source file extension for C test sources.
2371
# Object file extension for compiled C test sources.
2373
_LT_AC_TAGVAR(objext, $1)=$objext
2375
# Code to be used in simple compile tests
2376
lt_simple_compile_test_code="int some_variable = 0;"
2378
# Code to be used in simple link tests
2379
lt_simple_link_test_code='int main(int char *[]) { return(0); }'
2381
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2384
# Allow CC to be a program name with arguments.
2389
_LT_AC_TAGVAR(compiler, $1)=$CC
2390
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2392
# We don't want -fno-exception wen compiling C++ code, so set the
2393
# no_builtin_flag separately
2394
if test "$GXX" = yes; then
2395
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2397
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2400
if test "$GXX" = yes; then
2401
# Set up default GNU C++ configuration
2403
# Check if GNU C++ uses GNU ld as the underlying linker, since the
2404
# archiving commands below assume that GNU ld is being used.
2405
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2406
egrep 'GNU ld' > /dev/null; then
2409
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2410
_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'
2412
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2413
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2415
# If archive_cmds runs LD, not CC, wlarc should be empty
2416
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2417
# investigate it a little bit more. (MM)
2420
# ancient GNU ld didn't support --whole-archive et. al.
2421
if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2422
egrep 'no-whole-archive' > /dev/null; then
2423
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2425
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2431
# A generic and very simple default shared library creation
2432
# command for GNU C++ for the case where it uses the native
2433
# linker, instead of GNU ld. If possible, this setting should
2434
# overridden to take advantage of the native linker features on
2435
# the platform it is being used on.
2436
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2439
# Commands to make compiler produce verbose output that lists
2440
# what "hidden" libraries, object files and flags are used when
2441
# linking a shared library.
2442
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2450
# PORTME: fill in a description of your system's C++ link characteristics
2451
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2452
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2455
# FIXME: insert proper C++ library support
2456
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2459
if test "$host_cpu" = ia64; then
2460
# On IA64, the linker does run time linking by default, so we don't
2461
# have to do anything special.
2462
aix_use_runtimelinking=no
2463
exp_sym_flag='-Bexport'
2466
# KDE requires run time linking. Make it the default.
2467
aix_use_runtimelinking=yes
2468
exp_sym_flag='-bexport'
2469
no_entry_flag='-bnoentry'
2472
# When large executables or shared objects are built, AIX ld can
2473
# have problems creating the table of contents. If linking a library
2474
# or program results in "error TOC overflow" add -mminimal-toc to
2475
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2476
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2478
_LT_AC_TAGVAR(archive_cmds, $1)=''
2479
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2480
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2481
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2483
if test "$GXX" = yes; then
2484
case $host_os in aix4.[012]|aix4.[012].*)
2485
# We only want to do this on AIX 4.2 and lower, the check
2486
# below for broken collect2 doesn't work under 4.3+
2487
collect2name=`${CC} -print-prog-name=collect2`
2488
if test -f "$collect2name" && \
2489
strings "$collect2name" | grep resolve_lib_name >/dev/null
2491
# We have reworked collect2
2492
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2494
# We have old collect2
2495
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2496
# It fails to find uninstalled libraries when the uninstalled
2497
# path is not listed in the libpath. Setting hardcode_minus_L
2498
# to unsupported forces relinking
2499
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2500
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2501
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2504
shared_flag='-shared'
2507
if test "$host_cpu" = ia64; then
2508
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2509
# chokes on -Wl,-G. The following line is correct:
2512
if test "$aix_use_runtimelinking" = yes; then
2513
shared_flag='-qmkshrobj ${wl}-G'
2515
shared_flag='-qmkshrobj'
2520
# Let the compiler handle the export list.
2521
_LT_AC_TAGVAR(always_export_symbols, $1)=no
2522
if test "$aix_use_runtimelinking" = yes; then
2523
# Warning - without using the other runtime loading flags (-brtl),
2524
# -berok will link without error, but may produce a broken library.
2525
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2526
# Determine the default libpath from the value encoded in an empty executable.
2527
_LT_AC_SYS_LIBPATH_AIX
2528
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2530
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
2531
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $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"
2533
if test "$host_cpu" = ia64; then
2534
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2535
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2536
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2538
# Determine the default libpath from the value encoded in an empty executable.
2539
_LT_AC_SYS_LIBPATH_AIX
2540
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2541
# Warning - without using the other run time loading flags,
2542
# -berok will link without error, but may produce a broken library.
2543
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2544
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2545
# -bexpall does not export symbols beginning with underscore (_)
2546
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
2547
# Exported symbols can be pulled into shared objects from archives
2548
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2549
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2550
# This is similar to how AIX traditionally builds it's shared libraries.
2551
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2556
case $cc_basename in
2558
# FIXME: insert proper C++ library support
2559
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2564
case $cc_basename in
2566
# FIXME: insert proper C++ library support
2567
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2570
# Green Hills C++ Compiler
2571
# FIXME: insert proper C++ library support
2572
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2575
# FIXME: insert proper C++ library support
2576
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2581
# C++ shared libraries reported to be fairly broken before switch to ELF
2582
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2585
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2588
# FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2590
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2595
if test $with_gnu_ld = no; then
2596
if test "$host_cpu" = ia64; then
2597
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2599
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2600
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2601
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2604
if test "$host_cpu" = ia64; then
2605
_LT_AC_TAGVAR(hardcode_direct, $1)=no
2606
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2608
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
2610
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2611
# but as the default
2612
# location of the library.
2614
case $cc_basename in
2616
# FIXME: insert proper C++ library support
2617
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2622
_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'
2625
if test "$host_cpu" = ia64; then
2626
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2628
_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'
2632
# Commands to make compiler produce verbose output that lists
2633
# what "hidden" libraries, object files and flags are used when
2634
# linking a shared library.
2636
# There doesn't appear to be a way to prevent this compiler from
2637
# explicitly linking system object files so we need to strip them
2638
# from the output so that they don't get included in the library
2640
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'
2643
if test "$GXX" = yes; then
2644
if test $with_gnu_ld = no; then
2647
_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'
2650
if test "$host_cpu" = ia64; then
2651
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2653
_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'
2659
# FIXME: insert proper C++ library support
2660
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2666
case $cc_basename in
2669
_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 ${objdir}/so_locations -o $lib'
2671
# Archives containing C++ object files must be created using
2672
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
2673
# necessary to make sure instantiated templates are included
2675
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
2678
if test "$GXX" = yes; then
2679
if test "$with_gnu_ld" = no; then
2680
_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}${objdir}/so_locations -o $lib'
2682
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
2685
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2688
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2689
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2692
case $cc_basename in
2694
# Kuck and Associates, Inc. (KAI) C++ Compiler
2696
# KCC will only create a shared library if the output file
2697
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2698
# to its proper name (with version) after linking.
2699
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2700
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2702
# Commands to make compiler produce verbose output that lists
2703
# what "hidden" libraries, object files and flags are used when
2704
# linking a shared library.
2706
# There doesn't appear to be a way to prevent this compiler from
2707
# explicitly linking system object files so we need to strip them
2708
# from the output so that they don't get included in the library
2710
output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2712
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2713
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2715
# Archives containing C++ object files must be created using
2716
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2717
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2721
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2722
_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'
2724
runpath_var=LD_RUN_PATH
2725
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2726
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2728
# Commands to make compiler produce verbose output that lists
2729
# what "hidden" libraries, object files and flags are used when
2730
# linking a shared library.
2732
# There doesn't appear to be a way to prevent this compiler from
2733
# explicitly linking system object files so we need to strip them
2734
# from the output so that they don't get included in the library
2736
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'
2741
# FIXME: insert proper C++ library support
2742
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2745
# FIXME: insert proper C++ library support
2746
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2749
case $cc_basename in
2751
# FIXME: insert proper C++ library support
2752
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2755
# FIXME: insert proper C++ library support
2756
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2761
# NetBSD uses g++ - do we need to do anything?
2764
case $cc_basename in
2766
# Kuck and Associates, Inc. (KAI) C++ Compiler
2768
# KCC will only create a shared library if the output file
2769
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2770
# to its proper name (with version) after linking.
2771
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2773
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2774
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2776
# Archives containing C++ object files must be created using
2777
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
2778
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2782
# Rational C++ 2.4.1
2783
# FIXME: insert proper C++ library support
2784
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2787
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2788
_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 ${objdir}/so_locations -o $lib'
2790
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2791
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2793
# Commands to make compiler produce verbose output that lists
2794
# what "hidden" libraries, object files and flags are used when
2795
# linking a shared library.
2797
# There doesn't appear to be a way to prevent this compiler from
2798
# explicitly linking system object files so we need to strip them
2799
# from the output so that they don't get included in the library
2801
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "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'
2804
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2805
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2806
_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}${objdir}/so_locations -o $lib'
2808
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2809
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2811
# Commands to make compiler produce verbose output that lists
2812
# what "hidden" libraries, object files and flags are used when
2813
# linking a shared library.
2814
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2817
# FIXME: insert proper C++ library support
2818
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2824
case $cc_basename in
2826
# Kuck and Associates, Inc. (KAI) C++ Compiler
2828
# KCC will only create a shared library if the output file
2829
# ends with ".so" (or ".sl" for HP-UX), so rename the library
2830
# to its proper name (with version) after linking.
2831
_LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2833
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2834
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2836
# Archives containing C++ object files must be created using
2837
# the KAI C++ compiler.
2838
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
2841
# Rational C++ 2.4.1
2842
# FIXME: insert proper C++ library support
2843
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2846
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2847
_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 ${objdir}/so_locations -o $lib'
2848
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
2849
echo "-hidden">> $lib.exp~
2850
$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 $objdir/so_locations -o $lib~
2853
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2854
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2856
# Commands to make compiler produce verbose output that lists
2857
# what "hidden" libraries, object files and flags are used when
2858
# linking a shared library.
2860
# There doesn't appear to be a way to prevent this compiler from
2861
# explicitly linking system object files so we need to strip them
2862
# from the output so that they don't get included in the library
2864
output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "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'
2867
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2868
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2869
_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}${objdir}/so_locations -o $lib'
2871
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2872
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2874
# Commands to make compiler produce verbose output that lists
2875
# what "hidden" libraries, object files and flags are used when
2876
# linking a shared library.
2877
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2880
# FIXME: insert proper C++ library support
2881
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2887
# FIXME: insert proper C++ library support
2888
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2891
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2892
case $cc_basename in
2894
# FIXME: insert proper C++ library support
2895
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2898
# FIXME: insert proper C++ library support
2899
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2904
case $cc_basename in
2907
# FIXME: insert proper C++ library support
2908
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2912
# FIXME: insert proper C++ library support
2913
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2916
# FIXME: insert proper C++ library support
2917
_LT_AC_TAGVAR(ld_shlibs, $1)=no
2922
case $cc_basename in
2924
# Sun C++ 4.2, 5.x and Centerline C++
2925
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2926
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2927
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2928
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
2930
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2931
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2933
solaris2.[0-5] | solaris2.[0-5].*) ;;
2935
# The C++ compiler is used as linker so we must use $wl
2936
# flag to pass the commands to the underlying system
2938
# Supported since Solaris 2.6 (maybe 2.5.1?)
2939
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
2942
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2944
# Commands to make compiler produce verbose output that lists
2945
# what "hidden" libraries, object files and flags are used when
2946
# linking a shared library.
2948
# There doesn't appear to be a way to prevent this compiler from
2949
# explicitly linking system object files so we need to strip them
2950
# from the output so that they don't get included in the library
2952
output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2954
# Archives containing C++ object files must be created using
2955
# "CC -xar", where "CC" is the Sun C++ compiler. This is
2956
# necessary to make sure instantiated templates are included
2958
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
2961
# Green Hills C++ Compiler
2962
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
2964
# The C++ compiler must be used to create the archive.
2965
_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
2968
# GNU C++ compiler with Solaris linker
2969
if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2970
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
2971
if $CC --version | egrep -v '^2\.7' > /dev/null; then
2972
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2973
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2974
$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
2976
# Commands to make compiler produce verbose output that lists
2977
# what "hidden" libraries, object files and flags are used when
2978
# linking a shared library.
2979
output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
2981
# g++ 2.7 appears to require `-G' NOT `-shared' on this
2983
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2984
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2985
$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
2987
# Commands to make compiler produce verbose output that lists
2988
# what "hidden" libraries, object files and flags are used when
2989
# linking a shared library.
2990
output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
2993
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
2998
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
2999
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3002
case $cc_basename in
3004
# NonStop-UX NCC 3.20
3005
# FIXME: insert proper C++ library support
3006
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3009
# FIXME: insert proper C++ library support
3010
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3015
# FIXME: insert proper C++ library support
3016
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3019
# FIXME: insert proper C++ library support
3020
_LT_AC_TAGVAR(ld_shlibs, $1)=no
3023
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3024
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3026
# Figure out "hidden" C++ library dependencies from verbose
3027
# compiler output whening linking a shared library.
3028
cat > conftest.$ac_ext <<EOF
3032
Foo (void) { a = 0; }
3039
if AC_TRY_EVAL(ac_compile); then
3040
# Parse the compiler output and extract the necessary
3041
# objects, libraries and library flags.
3043
# Sentinel used to keep track of whether or not we are before
3044
# the conftest object file.
3045
pre_test_object_deps_done=no
3047
# The `*' in the case matches for architectures that use `case' in
3048
# $output_verbose_cmd can trigger glob expansion during the loop
3049
# eval without this substitution.
3050
output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3052
for p in `eval $output_verbose_link_cmd`; do
3056
# Some compilers place space between "-{L,R}" and the path.
3059
|| test $p = "-R"; then
3066
if test "$pre_test_object_deps_done" = no; then
3069
# Internal compiler library paths should come after those
3070
# provided the user. The postdeps already come after the
3071
# user supplied libs so there is no need to process them.
3072
if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3073
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3075
_LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3078
# The "-l" case would never come before the object being
3079
# linked, so don't bother handling this case.
3082
if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3083
_LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3085
_LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3090
*.$objext|*.$libext)
3091
# This assumes that the test object file only shows up
3092
# once in the compiler output.
3093
if test "$p" = "conftest.$objext"; then
3094
pre_test_object_deps_done=yes
3098
if test "$pre_test_object_deps_done" = no; then
3099
if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3100
_LT_AC_TAGVAR(predep_objects, $1)="$p"
3102
_LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3105
if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3106
_LT_AC_TAGVAR(postdep_objects, $1)="$p"
3108
_LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3113
*) ;; # Ignore the rest.
3121
echo "libtool.m4: error: problem compiling C++ test program"
3124
$rm -f confest.$objext
3126
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3127
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3128
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3131
_LT_AC_TAGVAR(GCC, $1)="$GXX"
3132
_LT_AC_TAGVAR(LD, $1)="$LD"
3135
## There is no encapsulation within the following macros, do not change
3136
## the running order or otherwise move them around unless you know exactly
3137
## what you are doing...
3138
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3139
AC_LIBTOOL_PROG_CC_C_O($1)
3140
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3141
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3142
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3143
AC_LIBTOOL_SYS_LIB_STRIP
3144
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3145
AC_LIBTOOL_DLOPEN_SELF($1)
3147
AC_LIBTOOL_CONFIG($1)
3151
])# AC_LIBTOOL_LANG_CXX_CONFIG
3154
# AC_LIBTOOL_LANG_GCJ_CONFIG
3155
# --------------------------
3156
# Ensure that the configuration vars for the C compiler are
3157
# suitably defined. Those variables are subsequently used by
3158
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3159
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3160
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3163
# Source file extension for C test sources.
3166
# Object file extension for compiled C test sources.
3168
_LT_AC_TAGVAR(objext, $1)=$objext
3170
# Code to be used in simple compile tests
3171
lt_simple_compile_test_code="class foo {}"
3173
# Code to be used in simple link tests
3174
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
3176
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3179
# Allow CC to be a program name with arguments.
3184
_LT_AC_TAGVAR(compiler, $1)=$CC
3186
# GCJ did not exist at the time GCC didn't implicitly link libc in.
3187
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3190
## There is no encapsulation within the following macros, do not change
3191
## the running order or otherwise move them around unless you know exactly
3192
## what you are doing...
3193
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3194
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3195
AC_LIBTOOL_PROG_CC_C_O($1)
3196
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3197
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3198
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3199
AC_LIBTOOL_SYS_LIB_STRIP
3200
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3201
AC_LIBTOOL_DLOPEN_SELF($1)
3203
AC_LIBTOOL_CONFIG($1)
3207
])# AC_LIBTOOL_LANG_GCJ_CONFIG
3210
# AC_LIBTOOL_LANG_RC_CONFIG
3211
# --------------------------
3212
# Ensure that the configuration vars for the Windows resource compiler are
3213
# suitably defined. Those variables are subsequently used by
3214
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3215
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3216
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3219
# Source file extension for RC test sources.
3222
# Object file extension for compiled RC test sources.
3224
_LT_AC_TAGVAR(objext, $1)=$objext
3226
# Code to be used in simple compile tests
3227
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
3229
# Code to be used in simple link tests
3230
lt_simple_link_test_code="$lt_simple_compile_test_code"
3232
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3235
# Allow CC to be a program name with arguments.
3240
_LT_AC_TAGVAR(compiler, $1)=$CC
3241
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3243
AC_LIBTOOL_CONFIG($1)
3247
])# AC_LIBTOOL_LANG_RC_CONFIG
3250
# AC_LIBTOOL_CONFIG([TAGNAME])
3251
# ----------------------------
3252
# If TAGNAME is not passed, then create an initial libtool script
3253
# with a default configuration from the untagged config vars. Otherwise
3254
# add code to config.status for appending the configuration named by
3255
# TAGNAME from the matching tagged config vars.
3256
AC_DEFUN([AC_LIBTOOL_CONFIG],
3257
[# The else clause should only fire when bootstrapping the
3258
# libtool distribution, otherwise you forgot to ship ltmain.sh
3259
# with your package, and you will get complaints that there are
3260
# no rules to generate ltmain.sh.
3261
if test -f "$ltmain"; then
3262
# Now quote all the things that may contain metacharacters while being
3263
# careful not to overquote the AC_SUBSTed values. We take copies of the
3264
# variables and quote the copies for generation of the libtool script.
3265
for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
3266
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3267
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3268
deplibs_check_method reload_flag reload_cmds need_locks \
3269
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3270
lt_cv_sys_global_symbol_to_c_name_address \
3271
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3272
old_postinstall_cmds old_postuninstall_cmds \
3273
_LT_AC_TAGVAR(compiler, $1) \
3274
_LT_AC_TAGVAR(CC, $1) \
3275
_LT_AC_TAGVAR(LD, $1) \
3276
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3277
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3278
_LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3279
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3280
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3281
_LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3282
_LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3283
_LT_AC_TAGVAR(old_archive_cmds, $1) \
3284
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3285
_LT_AC_TAGVAR(predep_objects, $1) \
3286
_LT_AC_TAGVAR(postdep_objects, $1) \
3287
_LT_AC_TAGVAR(predeps, $1) \
3288
_LT_AC_TAGVAR(postdeps, $1) \
3289
_LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3290
_LT_AC_TAGVAR(archive_cmds, $1) \
3291
_LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3292
_LT_AC_TAGVAR(postinstall_cmds, $1) \
3293
_LT_AC_TAGVAR(postuninstall_cmds, $1) \
3294
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3295
_LT_AC_TAGVAR(allow_undefined_flag, $1) \
3296
_LT_AC_TAGVAR(no_undefined_flag, $1) \
3297
_LT_AC_TAGVAR(export_symbols_cmds, $1) \
3298
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3299
_LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3300
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3301
_LT_AC_TAGVAR(exclude_expsyms, $1) \
3302
_LT_AC_TAGVAR(include_expsyms, $1); do
3305
_LT_AC_TAGVAR(old_archive_cmds, $1) | \
3306
_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3307
_LT_AC_TAGVAR(archive_cmds, $1) | \
3308
_LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3309
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3310
_LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3311
extract_expsyms_cmds | reload_cmds | finish_cmds | \
3312
postinstall_cmds | postuninstall_cmds | \
3313
old_postinstall_cmds | old_postuninstall_cmds | \
3314
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3315
# Double-quote double-evaled strings.
3316
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3319
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3325
*'\[$]0 --fallback-echo"')
3326
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3331
[cfgfile="${ofile}T"
3332
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3334
AC_MSG_NOTICE([creating $ofile])],
3337
cat <<__EOF__ >> "$cfgfile"
3341
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3342
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3343
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3345
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3346
# Free Software Foundation, Inc.
3348
# This file is part of GNU Libtool:
3349
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3351
# This program is free software; you can redistribute it and/or modify
3352
# it under the terms of the GNU General Public License as published by
3353
# the Free Software Foundation; either version 2 of the License, or
3354
# (at your option) any later version.
3356
# This program is distributed in the hope that it will be useful, but
3357
# WITHOUT ANY WARRANTY; without even the implied warranty of
3358
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3359
# General Public License for more details.
3361
# You should have received a copy of the GNU General Public License
3362
# along with this program; if not, write to the Free Software
3363
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3365
# As a special exception to the GNU General Public License, if you
3366
# distribute this file as part of a program that contains a
3367
# configuration script generated by Autoconf, you may include it under
3368
# the same distribution terms that you use for the rest of that program.
3370
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3371
Xsed="sed -e s/^X//"
3373
# The HP-UX ksh and POSIX shell print the target directory to stdout
3375
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3377
# The names of the tagged configurations supported by this script.
3380
# ### BEGIN LIBTOOL CONFIG],
3381
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3383
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3385
# Shell to use when invoking shell scripts.
3388
# Whether or not to build shared libraries.
3389
build_libtool_libs=$enable_shared
3391
# Whether or not to build static libraries.
3392
build_old_libs=$enable_static
3394
# Whether or not to add -lc for building shared libraries.
3395
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3397
# Whether or not to optimize for fast installation.
3398
fast_install=$enable_fast_install
3401
host_alias=$host_alias
3404
# An echo program that does not interpret backslashes.
3409
AR_FLAGS=$lt_AR_FLAGS
3414
# A language-specific compiler.
3415
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3417
# Is the compiler the GNU C compiler?
3418
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3420
# The linker used to build libraries.
3421
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3423
# Whether we need hard or soft links.
3426
# A BSD-compatible nm program.
3429
# A sed program that does not truncate output.
3432
# A symbol stripping program
3435
# Used to examine libraries when file_magic_cmd begins "file"
3436
MAGIC_CMD=$MAGIC_CMD
3438
# Used on cygwin: DLL creation program.
3441
# Used on cygwin: object dumper.
3444
# Used on cygwin: assembler.
3447
# The name of the directory that contains temporary libtool files.
3450
# How to create reloadable object files.
3451
reload_flag=$lt_reload_flag
3452
reload_cmds=$lt_reload_cmds
3454
# How to pass a linker flag through the compiler.
3455
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3457
# Object file suffix (normally "o").
3460
# Old archive suffix (normally "a").
3463
# Executable file suffix (normally "").
3466
# Additional compiler flags for building library objects.
3467
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3470
# What is the maximum length of a command?
3471
max_cmd_len=$lt_cv_sys_max_cmd_len
3473
# Does compiler simultaneously support -c and -o options?
3474
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3476
# Must we lock files when doing compilation ?
3477
need_locks=$lt_need_locks
3479
# Do we need the lib prefix for modules?
3480
need_lib_prefix=$need_lib_prefix
3482
# Do we need a version for libraries?
3483
need_version=$need_version
3485
# Whether dlopen is supported.
3486
dlopen_support=$enable_dlopen
3488
# Whether dlopen of programs is supported.
3489
dlopen_self=$enable_dlopen_self
3491
# Whether dlopen of statically linked programs is supported.
3492
dlopen_self_static=$enable_dlopen_self_static
3494
# Compiler flag to prevent dynamic linking.
3495
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3497
# Compiler flag to turn off builtin functions.
3498
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3500
# Compiler flag to allow reflexive dlopens.
3501
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3503
# Compiler flag to generate shared objects directly from archives.
3504
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3506
# Compiler flag to generate thread-safe objects.
3507
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3509
# Library versioning type.
3510
version_type=$version_type
3512
# Format of library name prefix.
3513
libname_spec=$lt_libname_spec
3515
# List of archive names. First name is the real one, the rest are links.
3516
# The last name is the one that the linker finds with -lNAME.
3517
library_names_spec=$lt_library_names_spec
3519
# The coded name of the library, if different from the real name.
3520
soname_spec=$lt_soname_spec
3522
# Commands used to build and install an old-style archive.
3524
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3525
old_postinstall_cmds=$lt_old_postinstall_cmds
3526
old_postuninstall_cmds=$lt_old_postuninstall_cmds
3528
# Create an old-style archive from a shared archive.
3529
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3531
# Create a temporary old-style archive to link instead of a shared archive.
3532
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3534
# Commands used to build and install a shared archive.
3535
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3536
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3537
postinstall_cmds=$lt_postinstall_cmds
3538
postuninstall_cmds=$lt_postuninstall_cmds
3540
# Commands to strip libraries.
3541
old_striplib=$lt_old_striplib
3542
striplib=$lt_striplib
3544
# Dependencies to place before the objects being linked to create a
3546
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3548
# Dependencies to place after the objects being linked to create a
3550
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3552
# Dependencies to place before the objects being linked to create a
3554
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3556
# Dependencies to place after the objects being linked to create a
3558
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3560
# The library search path used internally by the compiler when linking
3562
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3564
# Method to check whether dependent libraries are shared objects.
3565
deplibs_check_method=$lt_deplibs_check_method
3567
# Command to use when deplibs_check_method == file_magic.
3568
file_magic_cmd=$lt_file_magic_cmd
3570
# Flag that allows shared libraries with undefined symbols to be built.
3571
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3573
# Flag that forces no undefined symbols.
3574
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3576
# Commands used to finish a libtool library installation in a directory.
3577
finish_cmds=$lt_finish_cmds
3579
# Same as above, but a single script fragment to be evaled but not shown.
3580
finish_eval=$lt_finish_eval
3582
# Take the output of nm and produce a listing of raw symbols and C names.
3583
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3585
# Transform the output of nm in a proper C declaration
3586
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3588
# Transform the output of nm in a C name address pair
3589
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3591
# This is the shared library runtime path variable.
3592
runpath_var=$runpath_var
3594
# This is the shared library path variable.
3595
shlibpath_var=$shlibpath_var
3597
# Is shlibpath searched before the hard-coded library search path?
3598
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3600
# How to hardcode a shared library path into an executable.
3601
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3603
# Whether we should hardcode library paths into libraries.
3604
hardcode_into_libs=$hardcode_into_libs
3606
# Flag to hardcode \$libdir into a binary during linking.
3607
# This must work even if \$libdir does not exist.
3608
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3610
# Whether we need a single -rpath flag with a separated argument.
3611
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3613
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3615
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3617
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3619
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3621
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3622
# the resulting binary.
3623
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3625
# Variables whose values should be saved in libtool wrapper scripts and
3626
# restored at relink time.
3627
variables_saved_for_relink="$variables_saved_for_relink"
3629
# Whether libtool must link a program against all its dependency libraries.
3630
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3632
# Compile-time system search path for libraries
3633
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3635
# Run-time system search path for libraries
3636
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3638
# Fix the shell variable \$srcfile for the compiler.
3639
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3641
# Set to yes if exported symbols are required.
3642
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3644
# The commands to list exported symbols.
3645
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3647
# The commands to extract the exported symbol list from a shared archive.
3648
extract_expsyms_cmds=$lt_extract_expsyms_cmds
3650
# Symbols that should not be listed in the preloaded symbols.
3651
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3653
# Symbols that must always be exported.
3654
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3657
[# ### END LIBTOOL CONFIG],
3658
[# ### END LIBTOOL TAG CONFIG: $tagname])
3665
cat <<\EOF >> "$cfgfile"
3667
# AIX sometimes has problems with the GCC collect2 program. For some
3668
# reason, if we set the COLLECT_NAMES environment variable, the problems
3669
# vanish in a puff of smoke.
3670
if test "X${COLLECT_NAMES+set}" != Xset; then
3672
export COLLECT_NAMES
3677
cygwin* | mingw* | pw32* | os2*)
3678
cat <<'EOF' >> "$cfgfile"
3679
# This is a source program that is used to create dlls on Windows
3680
# Don't remove nor modify the starting and closing comments
3682
# This is a source program that is used to create import libraries
3683
# on Windows for dlls which lack them. Don't remove nor modify the
3684
# starting and closing comments
3685
_LT_AC_FILE_IMPGEN_C
3690
# We use sed instead of cat because bash on DJGPP gets confused if
3691
# if finds mixed CR/LF and LF-only lines. Since sed operates in
3692
# text mode, it properly converts lines to CR/LF. This bash problem
3693
# is reportedly fixed, but why not run on old versions too?
3694
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3696
mv -f "$cfgfile" "$ofile" || \
3697
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3701
# If there is no Makefile yet, we rely on a make rule to execute
3702
# `config.status --recheck' to rerun these tests and create the
3703
# libtool script then.
3704
test -f Makefile && make "$ltmain"
3706
])# AC_LIBTOOL_CONFIG
3709
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3710
# -------------------------------------------
3711
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3712
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3714
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3716
if test "$GCC" = yes; then
3717
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3719
AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3720
lt_cv_prog_compiler_rtti_exceptions,
3721
[-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
3722
[_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3724
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3727
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3728
# ---------------------------------
3729
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3730
[AC_REQUIRE([AC_CANONICAL_HOST])
3731
AC_REQUIRE([AC_PROG_NM])
3732
AC_REQUIRE([AC_OBJEXT])
3733
# Check for command to grab the raw symbol name followed by C symbol from nm.
3734
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3735
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3737
# These are sane defaults that work on at least a few old systems.
3738
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
3740
# Character class describing NM global symbol codes.
3741
symcode='[[BCDEGRST]]'
3743
# Regexp to match symbols that can be accessed directly from C.
3744
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3746
# Transform the above into a raw symbol and a C symbol.
3747
symxfrm='\1 \2\3 \3'
3749
# Transform an extracted symbol line into a proper C declaration
3750
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3752
# Transform an extracted symbol line into symbol name and symbol address
3753
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'"
3755
# Define system-specific variables.
3760
cygwin* | mingw* | pw32*)
3761
symcode='[[ABCDGISTW]]'
3763
hpux*) # Its linker distinguishes data from code symbols
3764
if test "$host_cpu" = ia64; then
3765
symcode='[[ABCDEGRST]]'
3767
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3768
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'"
3771
symcode='[[BCDEGRST]]'
3777
symcode='[[DFNSTU]]'
3781
# Handle CRLF in mingw tool chain
3785
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3789
# If we're using GNU nm, then use its standard symbol codes.
3790
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3791
symcode='[[ABCDGISTW]]'
3794
# Try without a prefix undercore, then with it.
3795
for ac_symprfx in "" "_"; do
3797
# Write the raw and C identifiers.
3798
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3800
# Check to see that the pipe works correctly.
3804
cat > conftest.$ac_ext <<EOF
3809
void nm_test_func(){}
3813
int main(){nm_test_var='a';nm_test_func();return(0);}
3816
if AC_TRY_EVAL(ac_compile); then
3817
# Now try to grab the symbols.
3819
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3820
# Try sorting and uniquifying the output.
3821
if sort "$nlist" | uniq > "$nlist"T; then
3822
mv -f "$nlist"T "$nlist"
3827
# Make sure that we snagged all the symbols we need.
3828
if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3829
if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3830
cat <<EOF > conftest.$ac_ext
3836
# Now generate the symbol file.
3837
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
3839
cat <<EOF >> conftest.$ac_ext
3840
#if defined (__STDC__) && __STDC__
3841
# define lt_ptr_t void *
3843
# define lt_ptr_t char *
3847
/* The mapping between symbol names and symbols. */
3852
lt_preloaded_symbols[[]] =
3855
sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
3856
cat <<\EOF >> conftest.$ac_ext
3864
# Now try linking the two files.
3865
mv conftest.$ac_objext conftstm.$ac_objext
3866
lt_save_LIBS="$LIBS"
3867
lt_save_CFLAGS="$CFLAGS"
3868
LIBS="conftstm.$ac_objext"
3869
CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3870
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3873
LIBS="$lt_save_LIBS"
3874
CFLAGS="$lt_save_CFLAGS"
3876
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3879
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3882
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3885
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3886
cat conftest.$ac_ext >&5
3888
rm -f conftest* conftst*
3890
# Do not use the global_symbol_pipe unless it works.
3891
if test "$pipe_works" = yes; then
3894
lt_cv_sys_global_symbol_pipe=
3898
if test -z "$lt_cv_sys_global_symbol_pipe"; then
3899
lt_cv_sys_global_symbol_to_cdecl=
3901
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3902
AC_MSG_RESULT(failed)
3906
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3909
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3910
# ---------------------------------------
3911
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3912
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3913
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3914
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3916
AC_MSG_CHECKING([for $compiler option to produce PIC])
3918
# C++ specific cases for pic, static, wl, etc.
3919
if test "$GXX" = yes; then
3920
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3921
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3925
# All AIX code is PIC.
3926
if test "$host_cpu" = ia64; then
3927
# AIX 5 now supports IA64 processor
3928
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3932
# FIXME: we need at least 68020 code to build shared libraries, but
3933
# adding the `-m68020' flag to GCC prevents building anything better,
3935
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3937
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3938
# PIC is the default for these OSes.
3940
cygwin* | mingw* | os2*)
3941
# This hack is so that the source file can tell whether it is being
3942
# built for inclusion in a dll (and should export symbols for example).
3943
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3945
darwin* | rhapsody*)
3946
# PIC is the default on this platform
3947
# Common symbols not allowed in MH_DYLIB files
3948
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3951
# DJGPP does not support shared libraries at all
3952
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3955
if test -d /usr/nec; then
3956
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3960
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
3961
if test "$host_cpu" != ia64; then
3962
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3966
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3972
# All AIX code is PIC.
3973
if test "$host_cpu" = ia64; then
3974
# AIX 5 now supports IA64 processor
3975
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3977
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3981
case $cc_basename in
3983
# Green Hills C++ Compiler
3984
# _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"
3989
case $cc_basename in
3991
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3994
# Green Hills C++ Compiler
3995
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4002
# FreeBSD uses GNU C++
4004
hpux9* | hpux10* | hpux11*)
4005
case $cc_basename in
4007
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4008
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4009
if test "$host_cpu" != ia64; then
4010
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4014
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4015
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4016
if test "$host_cpu" != ia64; then
4017
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4024
irix5* | irix6* | nonstopux*)
4025
case $cc_basename in
4027
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4029
# CC pic flag -KPIC is the default.
4036
case $cc_basename in
4039
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4040
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4044
# Make sure the PIC flag is empty. It appears that all Alpha
4045
# Linux and Compaq Tru64 Unix objects are PIC.
4046
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4047
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4058
case $cc_basename in
4060
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4068
osf3* | osf4* | osf5*)
4069
case $cc_basename in
4071
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4074
# Rational C++ 2.4.1
4075
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4078
# Digital/Compaq C++
4079
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4080
# Make sure the PIC flag is empty. It appears that all Alpha
4081
# Linux and Compaq Tru64 Unix objects are PIC.
4082
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4083
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4092
case $cc_basename in
4094
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4101
case $cc_basename in
4103
# Sun C++ 4.2, 5.x and Centerline C++
4104
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4105
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4106
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4109
# Green Hills C++ Compiler
4110
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4117
case $cc_basename in
4120
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4121
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4125
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4132
case $cc_basename in
4134
# NonStop-UX NCC 3.20
4135
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4146
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4152
if test "$GCC" = yes; then
4153
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4154
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4158
# All AIX code is PIC.
4159
if test "$host_cpu" = ia64; then
4160
# AIX 5 now supports IA64 processor
4161
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4166
# FIXME: we need at least 68020 code to build shared libraries, but
4167
# adding the `-m68020' flag to GCC prevents building anything better,
4169
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4172
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4173
# PIC is the default for these OSes.
4176
cygwin* | mingw* | pw32* | os2*)
4177
# This hack is so that the source file can tell whether it is being
4178
# built for inclusion in a dll (and should export symbols for example).
4179
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4182
darwin* | rhapsody*)
4183
# PIC is the default on this platform
4184
# Common symbols not allowed in MH_DYLIB files
4185
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4189
# Just because we use GCC doesn't mean we suddenly get shared libraries
4190
# on systems that don't support them.
4191
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4196
if test -d /usr/nec; then
4197
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4202
# PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4203
if test "$host_cpu" != ia64; then
4204
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4209
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4213
# PORTME Check for flag to pass linker flags through the system compiler.
4216
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4217
if test "$host_cpu" = ia64; then
4218
# AIX 5 now supports IA64 processor
4219
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4221
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4225
cygwin* | mingw* | pw32* | os2*)
4226
# This hack is so that the source file can tell whether it is being
4227
# built for inclusion in a dll (and should export symbols for example).
4228
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4231
hpux9* | hpux10* | hpux11*)
4232
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4233
if test "$host_cpu" != ia64; then
4234
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4236
# Is there a better lt_prog_compiler_static that works with the bundled CC?
4237
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4240
irix5* | irix6* | nonstopux*)
4241
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4242
# PIC (with -KPIC) is the default.
4243
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4247
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4248
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4251
osf3* | osf4* | osf5*)
4252
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4253
# All OSF/1 code is PIC.
4254
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4258
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4259
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4263
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4264
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4265
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4269
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4270
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4271
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4274
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4275
if test "x$host_vendor" = xsni; then
4276
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4278
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4280
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4281
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4285
if test -d /usr/nec ;then
4286
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4287
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4292
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4293
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4297
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4302
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4305
# Check to make sure the PIC flag actually works.
4307
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4308
AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4309
_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4310
[$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4311
[case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4313
*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4315
[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4316
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4319
# For platforms which do not support PIC, -DPIC is meaningless:
4321
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4324
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
4330
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4331
# ------------------------------------
4332
# See if the linker supports building shared libraries.
4333
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4334
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4336
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4339
# If we're using GNU nm, then we don't want the "-C" option.
4340
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4341
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4342
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
4344
_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'
4347
cygwin* | mingw* | pw32*)
4348
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4351
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4356
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4358
_LT_AC_TAGVAR(archive_cmds, $1)=
4359
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4360
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4361
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4362
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4363
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4364
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4365
_LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4366
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4367
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4368
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4369
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4370
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4371
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4372
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4373
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4374
# include_expsyms should be a list of space-separated symbols to be *always*
4375
# included in the symbol list
4376
_LT_AC_TAGVAR(include_expsyms, $1)=
4377
# exclude_expsyms can be an egrep regular expression of symbols to exclude
4378
# it will be wrapped by ` (' and `)$', so one must not match beginning or
4379
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4380
# as well as any symbol that contains `d'.
4381
_LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4382
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4383
# platforms (ab)use it in PIC code, but their linkers get confused if
4384
# the symbol is explicitly referenced. Since portable code cannot
4385
# rely on this symbol name, it's probably fine to never include it in
4386
# preloaded symbol tables.
4387
extract_expsyms_cmds=
4390
cygwin* | mingw* | pw32*)
4391
# FIXME: the MSVC++ port hasn't been tested in a loooong time
4392
# When not using gcc, we currently assume that we are using
4393
# Microsoft Visual C++.
4394
if test "$GCC" != yes; then
4403
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4404
if test "$with_gnu_ld" = yes; then
4405
# If archive_cmds runs LD, not CC, wlarc should be empty
4408
# See if GNU ld supports shared libraries.
4410
aix3* | aix4* | aix5*)
4411
# On AIX/PPC, the GNU linker is very broken
4412
if test "$host_cpu" != ia64; then
4413
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4416
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4417
*** to be unable to reliably create shared libraries on AIX.
4418
*** Therefore, libtool is disabling shared libraries support. If you
4419
*** really care for shared libraries, you may want to modify your PATH
4420
*** so that a non-GNU linker is found, and then restart.
4427
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4428
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4429
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4431
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4432
# that the semantics of dynamic libraries on AmigaOS, at least up
4433
# to version 4, is to share data among multiple programs linked
4434
# with the same dynamic library. Since this doesn't match the
4435
# behavior of shared libraries on other platforms, we can't use
4437
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4441
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4442
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4443
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4444
# support --undefined. This deserves some investigation. FIXME
4445
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4447
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4451
cygwin* | mingw* | pw32*)
4452
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4453
# no search path for DLLs.
4454
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4455
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4456
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4458
extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4459
sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4460
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4461
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4462
else $CC -o impgen impgen.c ; fi)~
4463
$output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4465
_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4467
# cygwin and mingw dlls have different entry points and sets of symbols
4469
# FIXME: what about values for MSVC?
4470
dll_entry=__cygwin_dll_entry@12
4471
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4475
dll_entry=_DllMainCRTStartup@12
4476
dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4480
# mingw and cygwin differ, and it's simplest to just exclude the union
4481
# of the two symbol sets.
4482
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4484
# recent cygwin and mingw systems supply a stub DllMain which the user
4485
# can override, but on older systems we have to supply one (in ltdll.c)
4486
if test "x$lt_cv_need_dllmain" = "xyes"; then
4487
ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4488
ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
4489
test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4495
# Extract the symbol export list from an `--export-all' def file,
4496
# then regenerate the def file from the symbol export list, so that
4497
# the compiled dll only exports the symbol export list.
4498
# Be careful not to strip the DATA tag left by newer dlltools.
4499
_LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4500
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4501
sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4503
# If the export-symbols file already is a .def file (1st line
4504
# is EXPORTS), use it as is.
4505
# If DATA tags from a recent dlltool are present, honour them!
4506
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4507
cp $export_symbols $output_objdir/$soname-def;
4509
echo EXPORTS > $output_objdir/$soname-def;
4511
cat $export_symbols | while read symbol; do
4514
2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4515
*) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4517
_lt_hint=`expr 1 + \$_lt_hint`;
4521
$CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4522
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
4523
$CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4524
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
4525
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
4529
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4530
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4533
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4534
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4539
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
4540
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4543
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4544
*** create shared libraries on Solaris systems. Therefore, libtool
4545
*** is disabling shared libraries support. We urge you to upgrade GNU
4546
*** binutils to release 2.9.1 or newer. Another option is to modify
4547
*** your PATH or compiler configuration so that the native linker is
4548
*** used, and then restart.
4551
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4552
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4553
_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'
4555
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4560
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4562
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4563
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4567
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4568
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4569
_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'
4571
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4576
if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
4577
runpath_var=LD_RUN_PATH
4578
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4579
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4581
cygwin* | mingw* | pw32*)
4582
# dlltool doesn't understand --whole-archive et. al.
4583
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4586
# ancient GNU ld didn't support --whole-archive et. al.
4587
if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4588
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4590
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4596
# PORTME fill in a description of your system's linker (not GNU ld)
4599
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4600
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4601
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
4602
# Note: this linker hardcodes the directories in LIBPATH if there
4603
# are no directories specified by -L.
4604
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4605
if test "$GCC" = yes && test -z "$link_static_flag"; then
4606
# Neither direct hardcoding nor static linking is supported with a
4608
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4613
if test "$host_cpu" = ia64; then
4614
# On IA64, the linker does run time linking by default, so we don't
4615
# have to do anything special.
4616
aix_use_runtimelinking=no
4617
exp_sym_flag='-Bexport'
4620
# If we're using GNU nm, then we don't want the "-C" option.
4621
# -C means demangle to AIX nm, but means don't demangle with GNU nm
4622
if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4623
_LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
4625
_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'
4628
# KDE requires run time linking. Make it the default.
4629
aix_use_runtimelinking=yes
4630
exp_sym_flag='-bexport'
4631
no_entry_flag='-bnoentry'
4634
# When large executables or shared objects are built, AIX ld can
4635
# have problems creating the table of contents. If linking a library
4636
# or program results in "error TOC overflow" add -mminimal-toc to
4637
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4638
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4640
_LT_AC_TAGVAR(archive_cmds, $1)=''
4641
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4642
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4643
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4645
if test "$GCC" = yes; then
4646
case $host_os in aix4.[012]|aix4.[012].*)
4647
# We only want to do this on AIX 4.2 and lower, the check
4648
# below for broken collect2 doesn't work under 4.3+
4649
collect2name=`${CC} -print-prog-name=collect2`
4650
if test -f "$collect2name" && \
4651
strings "$collect2name" | grep resolve_lib_name >/dev/null
4653
# We have reworked collect2
4654
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4656
# We have old collect2
4657
_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4658
# It fails to find uninstalled libraries when the uninstalled
4659
# path is not listed in the libpath. Setting hardcode_minus_L
4660
# to unsupported forces relinking
4661
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4662
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4663
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4666
shared_flag='-shared'
4669
if test "$host_cpu" = ia64; then
4670
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4671
# chokes on -Wl,-G. The following line is correct:
4674
if test "$aix_use_runtimelinking" = yes; then
4675
shared_flag='-qmkshrobj ${wl}-G'
4677
shared_flag='-qmkshrobj'
4682
# Let the compiler handle the export list.
4683
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4684
if test "$aix_use_runtimelinking" = yes; then
4685
# Warning - without using the other runtime loading flags (-brtl),
4686
# -berok will link without error, but may produce a broken library.
4687
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4688
# Determine the default libpath from the value encoded in an empty executable.
4689
_LT_AC_SYS_LIBPATH_AIX
4690
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4691
_LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
4692
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $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"
4694
if test "$host_cpu" = ia64; then
4695
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4696
_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4697
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4699
# Determine the default libpath from the value encoded in an empty executable.
4700
_LT_AC_SYS_LIBPATH_AIX
4701
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4702
# Warning - without using the other run time loading flags,
4703
# -berok will link without error, but may produce a broken library.
4704
_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4705
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4706
# -bexpall does not export symbols beginning with underscore (_)
4707
_LT_AC_TAGVAR(always_export_symbols, $1)=yes
4708
# Exported symbols can be pulled into shared objects from archives
4709
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4710
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4711
# This is similar to how AIX traditionally builds it's shared libraries.
4712
_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4718
_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4719
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4720
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4721
# see comment about different semantics on the GNU ld section
4722
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4726
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4729
cygwin* | mingw* | pw32*)
4730
# When not using gcc, we currently assume that we are using
4731
# Microsoft Visual C++.
4732
# hardcode_libdir_flag_spec is actually meaningless, as there is
4733
# no search path for DLLs.
4734
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4735
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4736
# Tell ltmain to make .lib files, not .a files.
4738
# FIXME: Setting linknames here is a bad hack.
4739
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4740
# The linker will automatically build a .lib file if we build a DLL.
4741
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4742
# FIXME: Should let the user specify the lib program.
4743
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4744
fix_srcfile_path='`cygpath -w "$srcfile"`'
4747
darwin* | rhapsody*)
4749
rhapsody* | darwin1.[[012]])
4750
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4753
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4757
# FIXME: Relying on posixy $() will cause problems for
4758
# cross-compilation, but unfortunately the echo tests do not
4759
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
4760
# `"' quotes if we put them in here... so don't!
4761
_LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
4762
# We need to add '_' to the symbols in $export_symbols first
4763
#_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4764
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4765
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4766
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4770
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4771
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4772
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4776
_LT_AC_TAGVAR(ld_shlibs, $1)=no
4779
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4780
# support. Future versions do this automatically, but an explicit c++rt0.o
4781
# does not break anything, and helps significantly (at the cost of a little
4784
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4785
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4786
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4787
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4790
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
4792
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4793
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4794
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4795
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4798
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4800
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4801
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4802
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4803
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4806
hpux9* | hpux10* | hpux11*)
4807
if test "$GCC" = yes; then
4810
_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'
4813
if test "$host_cpu" = ia64; then
4814
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4816
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4823
_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'
4826
if test "$host_cpu" = ia64; then
4827
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4829
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4834
if test "$host_cpu" = ia64; then
4835
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4836
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4837
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4839
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4840
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4841
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4843
# hardcode_minus_L: Not really in the search PATH,
4844
# but as the default location of the library.
4845
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4846
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4849
irix5* | irix6* | nonstopux*)
4850
if test "$GCC" = yes; then
4851
_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'
4853
_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'
4855
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4856
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4857
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4861
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4862
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4864
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4866
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4867
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4868
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4872
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4873
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4874
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4875
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4876
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4880
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4881
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4883
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4884
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4885
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4886
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4889
openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4890
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4891
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4894
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4895
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4902
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4903
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4904
_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4905
_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'
4906
_LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4910
if test "$GCC" = yes; then
4911
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4912
_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'
4914
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4915
_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'
4917
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4918
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4921
osf4* | osf5*) # as osf3* with the addition of -msym flag
4922
if test "$GCC" = yes; then
4923
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4924
_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'
4925
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4927
_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4928
_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'
4929
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4930
$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'
4932
# Both c and cxx compiler support -rpath directly
4933
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4935
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4939
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4940
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4941
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4942
runpath_var=LD_RUN_PATH
4943
hardcode_runpath_var=yes
4947
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4948
if test "$GCC" = yes; then
4949
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4950
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4951
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4953
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4954
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4955
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4957
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4958
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4960
solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4961
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
4962
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4964
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4968
if test "x$host_vendor" = xsequent; then
4969
# Use $CC to link under sequent, because it throws in some extra .o
4970
# files that make .init and .fini sections work.
4971
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4973
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4975
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4976
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
4977
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4978
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4982
if test "x$host_vendor" = xsni; then
4983
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
4984
_LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4986
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4987
_LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4989
runpath_var='LD_RUN_PATH'
4990
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4994
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4995
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4996
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5000
if test -d /usr/nec; then
5001
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5002
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5003
runpath_var=LD_RUN_PATH
5004
hardcode_runpath_var=yes
5005
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
5010
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5011
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5012
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5013
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5014
hardcode_runpath_var=yes
5015
runpath_var=LD_RUN_PATH
5018
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5019
_LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5020
if test "$GCC" = yes; then
5021
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5023
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5025
runpath_var='LD_RUN_PATH'
5026
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5030
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5031
# $CC -shared without GNU ld will not create a library from C++
5032
# object files and a static libstdc++, better avoid it by now
5033
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5034
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5035
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5036
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5037
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5038
runpath_var='LD_RUN_PATH'
5042
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5043
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5044
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5048
_LT_AC_TAGVAR(ld_shlibs, $1)=no
5053
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5054
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5056
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5057
if test "$GCC" = yes; then
5058
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5062
# Do we need to explicitly link libc?
5064
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5065
if test "$enable_shared" = yes && test "$GCC" = yes; then
5066
case $_LT_AC_TAGVAR(archive_cmds, $1) in
5068
# FIXME: we may have to deal with multi-command sequences.
5071
# Test whether the compiler implicitly links with -lc since on some
5072
# systems, -lgcc has to come before -lc. If gcc already passes -lc
5073
# to ld, don't add -lc before -lgcc.
5074
AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5076
echo 'static int dummy;' > conftest.$ac_ext
5078
if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5081
libobjs=conftest.$ac_objext
5083
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5089
lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5090
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5091
if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5093
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5095
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5097
_LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5099
cat conftest.err 1>&5
5102
AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5106
])# AC_LIBTOOL_PROG_LD_SHLIBS
5109
# _LT_AC_FILE_LTDLL_C
5110
# -------------------
5111
# Be careful that the start marker always follows a newline.
5112
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5113
# /* ltdll.c starts here */
5114
# #define WIN32_LEAN_AND_MEAN
5115
# #include <windows.h>
5116
# #undef WIN32_LEAN_AND_MEAN
5117
# #include <stdio.h>
5119
# #ifndef __CYGWIN__
5120
# # ifdef __CYGWIN32__
5121
# # define __CYGWIN__ __CYGWIN32__
5125
# #ifdef __cplusplus
5128
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5129
# #ifdef __cplusplus
5134
# #include <cygwin/cygwin_dll.h>
5135
# DECLARE_CYGWIN_DLL( DllMain );
5137
# HINSTANCE __hDllInstance_base;
5140
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5142
# __hDllInstance_base = hInst;
5145
# /* ltdll.c ends here */
5146
])# _LT_AC_FILE_LTDLL_C
5149
# _LT_AC_FILE_IMPGEN_C
5150
# --------------------
5151
# Be careful that the start marker always follows a newline.
5152
AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
5153
# /* impgen.c starts here */
5154
# /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5156
# This file is part of GNU libtool.
5158
# This program is free software; you can redistribute it and/or modify
5159
# it under the terms of the GNU General Public License as published by
5160
# the Free Software Foundation; either version 2 of the License, or
5161
# (at your option) any later version.
5163
# This program is distributed in the hope that it will be useful,
5164
# but WITHOUT ANY WARRANTY; without even the implied warranty of
5165
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5166
# GNU General Public License for more details.
5168
# You should have received a copy of the GNU General Public License
5169
# along with this program; if not, write to the Free Software
5170
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5173
# #include <stdio.h> /* for printf() */
5174
# #include <unistd.h> /* for open(), lseek(), read() */
5175
# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5176
# #include <string.h> /* for strdup() */
5178
# /* O_BINARY isn't required (or even defined sometimes) under Unix */
5180
# #define O_BINARY 0
5183
# static unsigned int
5184
# pe_get16 (fd, offset)
5188
# unsigned char b[2];
5189
# lseek (fd, offset, SEEK_SET);
5191
# return b[0] + (b[1]<<8);
5194
# static unsigned int
5195
# pe_get32 (fd, offset)
5199
# unsigned char b[4];
5200
# lseek (fd, offset, SEEK_SET);
5202
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5205
# static unsigned int
5209
# unsigned char *b = ptr;
5210
# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5219
# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5220
# unsigned long export_rva, export_size, nsections, secptr, expptr;
5221
# unsigned long name_rvas, nexp;
5222
# unsigned char *expdata, *erva;
5223
# char *filename, *dll_name;
5225
# filename = argv[1];
5227
# dll = open(filename, O_RDONLY|O_BINARY);
5231
# dll_name = filename;
5233
# for (i=0; filename[i]; i++)
5234
# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5235
# dll_name = filename + i +1;
5237
# pe_header_offset = pe_get32 (dll, 0x3c);
5238
# opthdr_ofs = pe_header_offset + 4 + 20;
5239
# num_entries = pe_get32 (dll, opthdr_ofs + 92);
5241
# if (num_entries < 1) /* no exports */
5244
# export_rva = pe_get32 (dll, opthdr_ofs + 96);
5245
# export_size = pe_get32 (dll, opthdr_ofs + 100);
5246
# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5247
# secptr = (pe_header_offset + 4 + 20 +
5248
# pe_get16 (dll, pe_header_offset + 4 + 16));
5251
# for (i = 0; i < nsections; i++)
5254
# unsigned long secptr1 = secptr + 40 * i;
5255
# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5256
# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5257
# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5258
# lseek(dll, secptr1, SEEK_SET);
5259
# read(dll, sname, 8);
5260
# if (vaddr <= export_rva && vaddr+vsize > export_rva)
5262
# expptr = fptr + (export_rva - vaddr);
5263
# if (export_rva + export_size > vaddr + vsize)
5264
# export_size = vsize - (export_rva - vaddr);
5269
# expdata = (unsigned char*)malloc(export_size);
5270
# lseek (dll, expptr, SEEK_SET);
5271
# read (dll, expdata, export_size);
5272
# erva = expdata - export_rva;
5274
# nexp = pe_as32 (expdata+24);
5275
# name_rvas = pe_as32 (expdata+32);
5277
# printf ("EXPORTS\n");
5278
# for (i = 0; i<nexp; i++)
5280
# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5281
# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5286
# /* impgen.c ends here */
5287
])# _LT_AC_FILE_IMPGEN_C
5289
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5290
# ---------------------------------
5291
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5295
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5296
AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5297
AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5298
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5299
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5300
AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5301
AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5303
# This is just to silence aclocal about the macro not being used
5304
ifelse([AC_DISABLE_FAST_INSTALL])
5306
AC_DEFUN([LT_AC_PROG_GCJ],
5307
[AC_CHECK_TOOL(GCJ, gcj, no)
5308
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5312
AC_DEFUN([LT_AC_PROG_RC],
5313
[AC_CHECK_TOOL(RC, windres, no)
5316
############################################################
5317
# NOTE: This macro has been submitted for inclusion into #
5318
# GNU Autoconf as AC_PROG_SED. When it is available in #
5319
# a released version of Autoconf we should remove this #
5320
# macro and use it instead. #
5321
############################################################
5324
# Check for a fully-functional sed program, that truncates
5325
# as few characters as possible. Prefer GNU sed if found.
5326
AC_DEFUN([LT_AC_PROG_SED],
5327
[AC_MSG_CHECKING([for a sed that does not truncate output])
5328
AC_CACHE_VAL(lt_cv_path_SED,
5329
[# Loop through the user's path and test for sed and gsed.
5330
# Then use that list of sed's as ones to test for truncation.
5331
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5335
test -z "$as_dir" && as_dir=.
5336
for ac_prog in sed gsed; do
5337
for ac_exec_ext in '' $ac_executable_extensions; do
5338
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
5339
_sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
5345
# Create a temporary directory, and hook for its removal unless debugging.
5348
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5349
trap '{ (exit 1); exit 1; }' 1 2 13 15
5352
# Create a (secure) tmp directory for tmp files.
5355
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
5356
test -n "$tmp" && test -d "$tmp"
5359
tmp=$TMPDIR/sed$$-$RANDOM
5360
(umask 077 && mkdir $tmp)
5363
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5364
{ (exit 1); exit 1; }
5368
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5369
# along with /bin/sed that truncates output.
5370
for _sed in $_sed_list /usr/xpg4/bin/sed; do
5371
test ! -f ${_sed} && break
5372
cat /dev/null > "$tmp/sed.in"
5374
echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
5375
# Check for GNU sed and select it if it is found.
5376
if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
5377
lt_cv_path_SED=${_sed}
5381
cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
5382
mv "$tmp/sed.tmp" "$tmp/sed.in"
5383
cp "$tmp/sed.in" "$tmp/sed.nl"
5384
echo >>"$tmp/sed.nl"
5385
${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
5386
cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
5387
# 10000 chars as input seems more than enough
5388
test $_count -gt 10 && break
5389
_count=`expr $_count + 1`
5390
if test $_count -gt $_max; then
5392
lt_cv_path_SED=$_sed
5398
AC_MSG_RESULT([$SED])