blob: 140b3456009dc0c5ea48038be61159a0a347fd7e [file] [log] [blame]
Reid Spencered8624d2004-09-19 21:47:47 +00001###############################################################################
2###############################################################################
3############ READ THIS:
4############ The only difference between this version of libtool.m4 and the one
5############ provided with libtool 1.5.10 is this warning header and changing
6############ the name of libtool to mklib. AutoRegen.sh checks for version
7############ 1.5.10 of libtool so attempts to use another version with this
8############ AC_PROG_LIBTOOL definition should fail. You've been warned.
9###############################################################################
10###############################################################################
11# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
12## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
13## Free Software Foundation, Inc.
14## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
15##
16## This program is free software; you can redistribute it and/or modify
17## it under the terms of the GNU General Public License as published by
18## the Free Software Foundation; either version 2 of the License, or
19## (at your option) any later version.
20##
21## This program is distributed in the hope that it will be useful, but
22## WITHOUT ANY WARRANTY; without even the implied warranty of
23## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24## General Public License for more details.
25##
26## You should have received a copy of the GNU General Public License
27## along with this program; if not, write to the Free Software
28## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29##
30## As a special exception to the GNU General Public License, if you
31## distribute this file as part of a program that contains a
32## configuration script generated by Autoconf, you may include it under
33## the same distribution terms that you use for the rest of that program.
34
35# serial 47 AC_PROG_LIBTOOL
36
37
38# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
39# -----------------------------------------------------------
40# If this macro is not defined by Autoconf, define it here.
41m4_ifdef([AC_PROVIDE_IFELSE],
42 [],
43 [m4_define([AC_PROVIDE_IFELSE],
44 [m4_ifdef([AC_PROVIDE_$1],
45 [$2], [$3])])])
46
47
48# AC_PROG_LIBTOOL
49# ---------------
50AC_DEFUN([AC_PROG_LIBTOOL],
51[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
52dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
53dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
54 AC_PROVIDE_IFELSE([AC_PROG_CXX],
55 [AC_LIBTOOL_CXX],
56 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
57 ])])
58dnl And a similar setup for Fortran 77 support
59 AC_PROVIDE_IFELSE([AC_PROG_F77],
60 [AC_LIBTOOL_F77],
61 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
62])])
63
64dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
65dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
66dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
67 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
68 [AC_LIBTOOL_GCJ],
69 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
70 [AC_LIBTOOL_GCJ],
71 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
72 [AC_LIBTOOL_GCJ],
73 [ifdef([AC_PROG_GCJ],
74 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
75 ifdef([A][M_PROG_GCJ],
76 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
77 ifdef([LT_AC_PROG_GCJ],
78 [define([LT_AC_PROG_GCJ],
79 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
80])])# AC_PROG_LIBTOOL
81
82
83# _AC_PROG_LIBTOOL
84# ----------------
85AC_DEFUN([_AC_PROG_LIBTOOL],
86[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
87AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
88AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
89AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
90
91# This can be used to rebuild libtool when needed
92LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
93
94# Always use our own libtool.
95LIBTOOL='$(SHELL) $(top_builddir)/mklib'
96AC_SUBST(LIBTOOL)dnl
97
98# Prevent multiple expansion
99define([AC_PROG_LIBTOOL], [])
100])# _AC_PROG_LIBTOOL
101
102
103# AC_LIBTOOL_SETUP
104# ----------------
105AC_DEFUN([AC_LIBTOOL_SETUP],
106[AC_PREREQ(2.50)dnl
107AC_REQUIRE([AC_ENABLE_SHARED])dnl
108AC_REQUIRE([AC_ENABLE_STATIC])dnl
109AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
110AC_REQUIRE([AC_CANONICAL_HOST])dnl
111AC_REQUIRE([AC_CANONICAL_BUILD])dnl
112AC_REQUIRE([AC_PROG_CC])dnl
113AC_REQUIRE([AC_PROG_LD])dnl
114AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
115AC_REQUIRE([AC_PROG_NM])dnl
116
117AC_REQUIRE([AC_PROG_LN_S])dnl
118AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
119# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
120AC_REQUIRE([AC_OBJEXT])dnl
121AC_REQUIRE([AC_EXEEXT])dnl
122dnl
123
124AC_LIBTOOL_SYS_MAX_CMD_LEN
125AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
126AC_LIBTOOL_OBJDIR
127
128AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
129_LT_AC_PROG_ECHO_BACKSLASH
130
131case $host_os in
132aix3*)
133 # AIX sometimes has problems with the GCC collect2 program. For some
134 # reason, if we set the COLLECT_NAMES environment variable, the problems
135 # vanish in a puff of smoke.
136 if test "X${COLLECT_NAMES+set}" != Xset; then
137 COLLECT_NAMES=
138 export COLLECT_NAMES
139 fi
140 ;;
141esac
142
143# Sed substitution that helps us do robust quoting. It backslashifies
144# metacharacters that are still active within double-quoted strings.
145Xsed='sed -e s/^X//'
146[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
147
148# Same as above, but do not quote variable references.
149[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
150
151# Sed substitution to delay expansion of an escaped shell variable in a
152# double_quote_subst'ed string.
153delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
154
155# Sed substitution to avoid accidental globbing in evaled expressions
156no_glob_subst='s/\*/\\\*/g'
157
158# Constants:
159rm="rm -f"
160
161# Global variables:
162default_ofile=libtool
163can_build_shared=yes
164
165# All known linkers require a `.a' archive for static linking (except M$VC,
166# which needs '.lib').
167libext=a
168ltmain="$ac_aux_dir/ltmain.sh"
169ofile="$default_ofile"
170with_gnu_ld="$lt_cv_prog_gnu_ld"
171
172AC_CHECK_TOOL(AR, ar, false)
173AC_CHECK_TOOL(RANLIB, ranlib, :)
174AC_CHECK_TOOL(STRIP, strip, :)
175
176old_CC="$CC"
177old_CFLAGS="$CFLAGS"
178
179# Set sane defaults for various variables
180test -z "$AR" && AR=ar
181test -z "$AR_FLAGS" && AR_FLAGS=cru
182test -z "$AS" && AS=as
183test -z "$CC" && CC=cc
184test -z "$LTCC" && LTCC=$CC
185test -z "$DLLTOOL" && DLLTOOL=dlltool
186test -z "$LD" && LD=ld
187test -z "$LN_S" && LN_S="ln -s"
188test -z "$MAGIC_CMD" && MAGIC_CMD=file
189test -z "$NM" && NM=nm
190test -z "$SED" && SED=sed
191test -z "$OBJDUMP" && OBJDUMP=objdump
192test -z "$RANLIB" && RANLIB=:
193test -z "$STRIP" && STRIP=:
194test -z "$ac_objext" && ac_objext=o
195
196# Determine commands to create old-style static archives.
197old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
198old_postinstall_cmds='chmod 644 $oldlib'
199old_postuninstall_cmds=
200
201if test -n "$RANLIB"; then
202 case $host_os in
203 openbsd*)
204 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
205 ;;
206 *)
207 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
208 ;;
209 esac
210 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
211fi
212
213cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
214
215# Only perform the check for file, if the check method requires it
216case $deplibs_check_method in
217file_magic*)
218 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
219 AC_PATH_MAGIC
220 fi
221 ;;
222esac
223
224AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
225AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
226enable_win32_dll=yes, enable_win32_dll=no)
227
228AC_ARG_ENABLE([libtool-lock],
229 [AC_HELP_STRING([--disable-libtool-lock],
230 [avoid locking (might break parallel builds)])])
231test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
232
233AC_ARG_WITH([pic],
234 [AC_HELP_STRING([--with-pic],
235 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
236 [pic_mode="$withval"],
237 [pic_mode=default])
238test -z "$pic_mode" && pic_mode=default
239
240# Use C for the default configuration in the libtool script
241tagname=
242AC_LIBTOOL_LANG_C_CONFIG
243_LT_AC_TAGCONFIG
244])# AC_LIBTOOL_SETUP
245
246
247# _LT_AC_SYS_COMPILER
248# -------------------
249AC_DEFUN([_LT_AC_SYS_COMPILER],
250[AC_REQUIRE([AC_PROG_CC])dnl
251
252# If no C compiler was specified, use CC.
253LTCC=${LTCC-"$CC"}
254
255# Allow CC to be a program name with arguments.
256compiler=$CC
257])# _LT_AC_SYS_COMPILER
258
259
260# _LT_AC_SYS_LIBPATH_AIX
261# ----------------------
262# Links a minimal program and checks the executable
263# for the system default hardcoded library path. In most cases,
264# this is /usr/lib:/lib, but when the MPI compilers are used
265# the location of the communication and MPI libs are included too.
266# If we don't find anything, use the default library path according
267# to the aix ld manual.
268AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
269[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
270aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
271}'`
272# Check for a 64-bit object if we didn't find anything.
273if 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; }
274}'`; fi],[])
275if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
276])# _LT_AC_SYS_LIBPATH_AIX
277
278
279# _LT_AC_SHELL_INIT(ARG)
280# ----------------------
281AC_DEFUN([_LT_AC_SHELL_INIT],
282[ifdef([AC_DIVERSION_NOTICE],
283 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
284 [AC_DIVERT_PUSH(NOTICE)])
285$1
286AC_DIVERT_POP
287])# _LT_AC_SHELL_INIT
288
289
290# _LT_AC_PROG_ECHO_BACKSLASH
291# --------------------------
292# Add some code to the start of the generated configure script which
293# will find an echo command which doesn't interpret backslashes.
294AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
295[_LT_AC_SHELL_INIT([
296# Check that we are running under the correct shell.
297SHELL=${CONFIG_SHELL-/bin/sh}
298
299case X$ECHO in
300X*--fallback-echo)
301 # Remove one level of quotation (which was required for Make).
302 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
303 ;;
304esac
305
306echo=${ECHO-echo}
307if test "X[$]1" = X--no-reexec; then
308 # Discard the --no-reexec flag, and continue.
309 shift
310elif test "X[$]1" = X--fallback-echo; then
311 # Avoid inline document here, it may be left over
312 :
313elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
314 # Yippee, $echo works!
315 :
316else
317 # Restart under the correct shell.
318 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
319fi
320
321if test "X[$]1" = X--fallback-echo; then
322 # used as fallback echo
323 shift
324 cat <<EOF
325[$]*
326EOF
327 exit 0
328fi
329
330# The HP-UX ksh and POSIX shell print the target directory to stdout
331# if CDPATH is set.
332(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
333
334if test -z "$ECHO"; then
335if test "X${echo_test_string+set}" != Xset; then
336# find a string as large as possible, as long as the shell can cope with it
337 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
338 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
339 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
340 echo_test_string="`eval $cmd`" &&
341 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
342 then
343 break
344 fi
345 done
346fi
347
348if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
349 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
350 test "X$echo_testing_string" = "X$echo_test_string"; then
351 :
352else
353 # The Solaris, AIX, and Digital Unix default echo programs unquote
354 # backslashes. This makes it impossible to quote backslashes using
355 # echo "$something" | sed 's/\\/\\\\/g'
356 #
357 # So, first we look for a working echo in the user's PATH.
358
359 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
360 for dir in $PATH /usr/ucb; do
361 IFS="$lt_save_ifs"
362 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
363 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
364 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
365 test "X$echo_testing_string" = "X$echo_test_string"; then
366 echo="$dir/echo"
367 break
368 fi
369 done
370 IFS="$lt_save_ifs"
371
372 if test "X$echo" = Xecho; then
373 # We didn't find a better echo, so look for alternatives.
374 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
375 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
376 test "X$echo_testing_string" = "X$echo_test_string"; then
377 # This shell has a builtin print -r that does the trick.
378 echo='print -r'
379 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
380 test "X$CONFIG_SHELL" != X/bin/ksh; then
381 # If we have ksh, try running configure again with it.
382 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
383 export ORIGINAL_CONFIG_SHELL
384 CONFIG_SHELL=/bin/ksh
385 export CONFIG_SHELL
386 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
387 else
388 # Try using printf.
389 echo='printf %s\n'
390 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
391 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
392 test "X$echo_testing_string" = "X$echo_test_string"; then
393 # Cool, printf works
394 :
395 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
396 test "X$echo_testing_string" = 'X\t' &&
397 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
398 test "X$echo_testing_string" = "X$echo_test_string"; then
399 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
400 export CONFIG_SHELL
401 SHELL="$CONFIG_SHELL"
402 export SHELL
403 echo="$CONFIG_SHELL [$]0 --fallback-echo"
404 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
405 test "X$echo_testing_string" = 'X\t' &&
406 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
407 test "X$echo_testing_string" = "X$echo_test_string"; then
408 echo="$CONFIG_SHELL [$]0 --fallback-echo"
409 else
410 # maybe with a smaller string...
411 prev=:
412
413 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
414 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
415 then
416 break
417 fi
418 prev="$cmd"
419 done
420
421 if test "$prev" != 'sed 50q "[$]0"'; then
422 echo_test_string=`eval $prev`
423 export echo_test_string
424 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
425 else
426 # Oops. We lost completely, so just stick with echo.
427 echo=echo
428 fi
429 fi
430 fi
431 fi
432fi
433fi
434
435# Copy echo and quote the copy suitably for passing to libtool from
436# the Makefile, instead of quoting the original, which is used later.
437ECHO=$echo
438if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
439 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
440fi
441
442AC_SUBST(ECHO)
443])])# _LT_AC_PROG_ECHO_BACKSLASH
444
445
446# _LT_AC_LOCK
447# -----------
448AC_DEFUN([_LT_AC_LOCK],
449[AC_ARG_ENABLE([libtool-lock],
450 [AC_HELP_STRING([--disable-libtool-lock],
451 [avoid locking (might break parallel builds)])])
452test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
453
454# Some flags need to be propagated to the compiler or linker for good
455# libtool support.
456case $host in
457ia64-*-hpux*)
458 # Find out which ABI we are using.
459 echo 'int i;' > conftest.$ac_ext
460 if AC_TRY_EVAL(ac_compile); then
461 case `/usr/bin/file conftest.$ac_objext` in
462 *ELF-32*)
463 HPUX_IA64_MODE="32"
464 ;;
465 *ELF-64*)
466 HPUX_IA64_MODE="64"
467 ;;
468 esac
469 fi
470 rm -rf conftest*
471 ;;
472*-*-irix6*)
473 # Find out which ABI we are using.
474 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
475 if AC_TRY_EVAL(ac_compile); then
476 if test "$lt_cv_prog_gnu_ld" = yes; then
477 case `/usr/bin/file conftest.$ac_objext` in
478 *32-bit*)
479 LD="${LD-ld} -melf32bsmip"
480 ;;
481 *N32*)
482 LD="${LD-ld} -melf32bmipn32"
483 ;;
484 *64-bit*)
485 LD="${LD-ld} -melf64bmip"
486 ;;
487 esac
488 else
489 case `/usr/bin/file conftest.$ac_objext` in
490 *32-bit*)
491 LD="${LD-ld} -32"
492 ;;
493 *N32*)
494 LD="${LD-ld} -n32"
495 ;;
496 *64-bit*)
497 LD="${LD-ld} -64"
498 ;;
499 esac
500 fi
501 fi
502 rm -rf conftest*
503 ;;
504
505x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
506 # Find out which ABI we are using.
507 echo 'int i;' > conftest.$ac_ext
508 if AC_TRY_EVAL(ac_compile); then
509 case "`/usr/bin/file conftest.o`" in
510 *32-bit*)
511 case $host in
512 x86_64-*linux*)
513 LD="${LD-ld} -m elf_i386"
514 ;;
515 ppc64-*linux*|powerpc64-*linux*)
516 LD="${LD-ld} -m elf32ppclinux"
517 ;;
518 s390x-*linux*)
519 LD="${LD-ld} -m elf_s390"
520 ;;
521 sparc64-*linux*)
522 LD="${LD-ld} -m elf32_sparc"
523 ;;
524 esac
525 ;;
526 *64-bit*)
527 case $host in
528 x86_64-*linux*)
529 LD="${LD-ld} -m elf_x86_64"
530 ;;
531 ppc*-*linux*|powerpc*-*linux*)
532 LD="${LD-ld} -m elf64ppc"
533 ;;
534 s390*-*linux*)
535 LD="${LD-ld} -m elf64_s390"
536 ;;
537 sparc*-*linux*)
538 LD="${LD-ld} -m elf64_sparc"
539 ;;
540 esac
541 ;;
542 esac
543 fi
544 rm -rf conftest*
545 ;;
546
547*-*-sco3.2v5*)
548 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
549 SAVE_CFLAGS="$CFLAGS"
550 CFLAGS="$CFLAGS -belf"
551 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
552 [AC_LANG_PUSH(C)
553 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
554 AC_LANG_POP])
555 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
556 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
557 CFLAGS="$SAVE_CFLAGS"
558 fi
559 ;;
560AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
561[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
562 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
563 AC_CHECK_TOOL(AS, as, false)
564 AC_CHECK_TOOL(OBJDUMP, objdump, false)
565 ;;
566 ])
567esac
568
569need_locks="$enable_libtool_lock"
570
571])# _LT_AC_LOCK
572
573
574# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
575# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
576# ----------------------------------------------------------------
577# Check whether the given compiler option works
578AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
579[AC_REQUIRE([LT_AC_PROG_SED])
580AC_CACHE_CHECK([$1], [$2],
581 [$2=no
582 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
583 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
584 lt_compiler_flag="$3"
585 # Insert the option either (1) after the last *FLAGS variable, or
586 # (2) before a word containing "conftest.", or (3) at the end.
587 # Note that $ac_compile itself does not contain backslashes and begins
588 # with a dollar sign (not a hyphen), so the echo should work correctly.
589 # The option is referenced via a variable to avoid confusing sed.
590 lt_compile=`echo "$ac_compile" | $SED \
591 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
593 -e 's:$: $lt_compiler_flag:'`
594 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
595 (eval "$lt_compile" 2>conftest.err)
596 ac_status=$?
597 cat conftest.err >&AS_MESSAGE_LOG_FD
598 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
599 if (exit $ac_status) && test -s "$ac_outfile"; then
600 # The compiler can only warn and ignore the option if not recognized
601 # So say no if there are warnings
602 if test ! -s conftest.err; then
603 $2=yes
604 fi
605 fi
606 $rm conftest*
607])
608
609if test x"[$]$2" = xyes; then
610 ifelse([$5], , :, [$5])
611else
612 ifelse([$6], , :, [$6])
613fi
614])# AC_LIBTOOL_COMPILER_OPTION
615
616
617# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618# [ACTION-SUCCESS], [ACTION-FAILURE])
619# ------------------------------------------------------------
620# Check whether the given compiler option works
621AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
622[AC_CACHE_CHECK([$1], [$2],
623 [$2=no
624 save_LDFLAGS="$LDFLAGS"
625 LDFLAGS="$LDFLAGS $3"
626 printf "$lt_simple_link_test_code" > conftest.$ac_ext
627 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
628 # The compiler can only warn and ignore the option if not recognized
629 # So say no if there are warnings
630 if test -s conftest.err; then
631 # Append any errors to the config.log.
632 cat conftest.err 1>&AS_MESSAGE_LOG_FD
633 else
634 $2=yes
635 fi
636 fi
637 $rm conftest*
638 LDFLAGS="$save_LDFLAGS"
639])
640
641if test x"[$]$2" = xyes; then
642 ifelse([$4], , :, [$4])
643else
644 ifelse([$5], , :, [$5])
645fi
646])# AC_LIBTOOL_LINKER_OPTION
647
648
649# AC_LIBTOOL_SYS_MAX_CMD_LEN
650# --------------------------
651AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
652[# find the maximum length of command line arguments
653AC_MSG_CHECKING([the maximum length of command line arguments])
654AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
655 i=0
656 teststring="ABCD"
657
658 case $build_os in
659 msdosdjgpp*)
660 # On DJGPP, this test can blow up pretty badly due to problems in libc
661 # (any single argument exceeding 2000 bytes causes a buffer overrun
662 # during glob expansion). Even if it were fixed, the result of this
663 # check would be larger than it should be.
664 lt_cv_sys_max_cmd_len=12288; # 12K is about right
665 ;;
666
667 gnu*)
668 # Under GNU Hurd, this test is not required because there is
669 # no limit to the length of command line arguments.
670 # Libtool will interpret -1 as no limit whatsoever
671 lt_cv_sys_max_cmd_len=-1;
672 ;;
673
674 cygwin* | mingw*)
675 # On Win9x/ME, this test blows up -- it succeeds, but takes
676 # about 5 minutes as the teststring grows exponentially.
677 # Worse, since 9x/ME are not pre-emptively multitasking,
678 # you end up with a "frozen" computer, even though with patience
679 # the test eventually succeeds (with a max line length of 256k).
680 # Instead, let's just punt: use the minimum linelength reported by
681 # all of the supported platforms: 8192 (on NT/2K/XP).
682 lt_cv_sys_max_cmd_len=8192;
683 ;;
684
685 amigaos*)
686 # On AmigaOS with pdksh, this test takes hours, literally.
687 # So we just punt and use a minimum line length of 8192.
688 lt_cv_sys_max_cmd_len=8192;
689 ;;
690
691 netbsd* | freebsd* | openbsd* | darwin* )
692 # This has been around since 386BSD, at least. Likely further.
693 if test -x /sbin/sysctl; then
694 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
695 elif test -x /usr/sbin/sysctl; then
696 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
697 else
698 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
699 fi
700 # And add a safety zone
701 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
702 ;;
703
704 *)
705 # If test is not a shell built-in, we'll probably end up computing a
706 # maximum length that is only half of the actual maximum length, but
707 # we can't tell.
708 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
709 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
710 = "XX$teststring") >/dev/null 2>&1 &&
711 new_result=`expr "X$teststring" : ".*" 2>&1` &&
712 lt_cv_sys_max_cmd_len=$new_result &&
713 test $i != 17 # 1/2 MB should be enough
714 do
715 i=`expr $i + 1`
716 teststring=$teststring$teststring
717 done
718 teststring=
719 # Add a significant safety factor because C++ compilers can tack on massive
720 # amounts of additional arguments before passing them to the linker.
721 # It appears as though 1/2 is a usable value.
722 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
723 ;;
724 esac
725])
726if test -n $lt_cv_sys_max_cmd_len ; then
727 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
728else
729 AC_MSG_RESULT(none)
730fi
731])# AC_LIBTOOL_SYS_MAX_CMD_LEN
732
733
734# _LT_AC_CHECK_DLFCN
735# --------------------
736AC_DEFUN([_LT_AC_CHECK_DLFCN],
737[AC_CHECK_HEADERS(dlfcn.h)dnl
738])# _LT_AC_CHECK_DLFCN
739
740
741# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
742# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
743# ------------------------------------------------------------------
744AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
745[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
746if test "$cross_compiling" = yes; then :
747 [$4]
748else
749 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
750 lt_status=$lt_dlunknown
751 cat > conftest.$ac_ext <<EOF
752[#line __oline__ "configure"
753#include "confdefs.h"
754
755#if HAVE_DLFCN_H
756#include <dlfcn.h>
757#endif
758
759#include <stdio.h>
760
761#ifdef RTLD_GLOBAL
762# define LT_DLGLOBAL RTLD_GLOBAL
763#else
764# ifdef DL_GLOBAL
765# define LT_DLGLOBAL DL_GLOBAL
766# else
767# define LT_DLGLOBAL 0
768# endif
769#endif
770
771/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
772 find out it does not work in some platform. */
773#ifndef LT_DLLAZY_OR_NOW
774# ifdef RTLD_LAZY
775# define LT_DLLAZY_OR_NOW RTLD_LAZY
776# else
777# ifdef DL_LAZY
778# define LT_DLLAZY_OR_NOW DL_LAZY
779# else
780# ifdef RTLD_NOW
781# define LT_DLLAZY_OR_NOW RTLD_NOW
782# else
783# ifdef DL_NOW
784# define LT_DLLAZY_OR_NOW DL_NOW
785# else
786# define LT_DLLAZY_OR_NOW 0
787# endif
788# endif
789# endif
790# endif
791#endif
792
793#ifdef __cplusplus
794extern "C" void exit (int);
795#endif
796
797void fnord() { int i=42;}
798int main ()
799{
800 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
801 int status = $lt_dlunknown;
802
803 if (self)
804 {
805 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
806 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
807 /* dlclose (self); */
808 }
809
810 exit (status);
811}]
812EOF
813 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
814 (./conftest; exit; ) 2>/dev/null
815 lt_status=$?
816 case x$lt_status in
817 x$lt_dlno_uscore) $1 ;;
818 x$lt_dlneed_uscore) $2 ;;
819 x$lt_unknown|x*) $3 ;;
820 esac
821 else :
822 # compilation failed
823 $3
824 fi
825fi
826rm -fr conftest*
827])# _LT_AC_TRY_DLOPEN_SELF
828
829
830# AC_LIBTOOL_DLOPEN_SELF
831# -------------------
832AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
833[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
834if test "x$enable_dlopen" != xyes; then
835 enable_dlopen=unknown
836 enable_dlopen_self=unknown
837 enable_dlopen_self_static=unknown
838else
839 lt_cv_dlopen=no
840 lt_cv_dlopen_libs=
841
842 case $host_os in
843 beos*)
844 lt_cv_dlopen="load_add_on"
845 lt_cv_dlopen_libs=
846 lt_cv_dlopen_self=yes
847 ;;
848
849 mingw* | pw32*)
850 lt_cv_dlopen="LoadLibrary"
851 lt_cv_dlopen_libs=
852 ;;
853
854 cygwin*)
855 lt_cv_dlopen="dlopen"
856 lt_cv_dlopen_libs=
857 ;;
858
859 darwin*)
860 # if libdl is installed we need to link against it
861 AC_CHECK_LIB([dl], [dlopen],
862 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
863 lt_cv_dlopen="dyld"
864 lt_cv_dlopen_libs=
865 lt_cv_dlopen_self=yes
866 ])
867 ;;
868
869 *)
870 AC_CHECK_FUNC([shl_load],
871 [lt_cv_dlopen="shl_load"],
872 [AC_CHECK_LIB([dld], [shl_load],
873 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
874 [AC_CHECK_FUNC([dlopen],
875 [lt_cv_dlopen="dlopen"],
876 [AC_CHECK_LIB([dl], [dlopen],
877 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
878 [AC_CHECK_LIB([svld], [dlopen],
879 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
880 [AC_CHECK_LIB([dld], [dld_link],
881 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
882 ])
883 ])
884 ])
885 ])
886 ])
887 ;;
888 esac
889
890 if test "x$lt_cv_dlopen" != xno; then
891 enable_dlopen=yes
892 else
893 enable_dlopen=no
894 fi
895
896 case $lt_cv_dlopen in
897 dlopen)
898 save_CPPFLAGS="$CPPFLAGS"
899 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
900
901 save_LDFLAGS="$LDFLAGS"
902 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
903
904 save_LIBS="$LIBS"
905 LIBS="$lt_cv_dlopen_libs $LIBS"
906
907 AC_CACHE_CHECK([whether a program can dlopen itself],
908 lt_cv_dlopen_self, [dnl
909 _LT_AC_TRY_DLOPEN_SELF(
910 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
911 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
912 ])
913
914 if test "x$lt_cv_dlopen_self" = xyes; then
915 LDFLAGS="$LDFLAGS $link_static_flag"
916 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
917 lt_cv_dlopen_self_static, [dnl
918 _LT_AC_TRY_DLOPEN_SELF(
919 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
920 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
921 ])
922 fi
923
924 CPPFLAGS="$save_CPPFLAGS"
925 LDFLAGS="$save_LDFLAGS"
926 LIBS="$save_LIBS"
927 ;;
928 esac
929
930 case $lt_cv_dlopen_self in
931 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
932 *) enable_dlopen_self=unknown ;;
933 esac
934
935 case $lt_cv_dlopen_self_static in
936 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
937 *) enable_dlopen_self_static=unknown ;;
938 esac
939fi
940])# AC_LIBTOOL_DLOPEN_SELF
941
942
943# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
944# ---------------------------------
945# Check to see if options -c and -o are simultaneously supported by compiler
946AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
947[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
948AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
949 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
950 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
951 $rm -r conftest 2>/dev/null
952 mkdir conftest
953 cd conftest
954 mkdir out
955 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
956
957 lt_compiler_flag="-o out/conftest2.$ac_objext"
958 # Insert the option either (1) after the last *FLAGS variable, or
959 # (2) before a word containing "conftest.", or (3) at the end.
960 # Note that $ac_compile itself does not contain backslashes and begins
961 # with a dollar sign (not a hyphen), so the echo should work correctly.
962 lt_compile=`echo "$ac_compile" | $SED \
963 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
964 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
965 -e 's:$: $lt_compiler_flag:'`
966 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
967 (eval "$lt_compile" 2>out/conftest.err)
968 ac_status=$?
969 cat out/conftest.err >&AS_MESSAGE_LOG_FD
970 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
971 if (exit $ac_status) && test -s out/conftest2.$ac_objext
972 then
973 # The compiler can only warn and ignore the option if not recognized
974 # So say no if there are warnings
975 if test ! -s out/conftest.err; then
976 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
977 fi
978 fi
979 chmod u+w .
980 $rm conftest*
981 # SGI C++ compiler will create directory out/ii_files/ for
982 # template instantiation
983 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
984 $rm out/* && rmdir out
985 cd ..
986 rmdir conftest
987 $rm conftest*
988])
989])# AC_LIBTOOL_PROG_CC_C_O
990
991
992# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
993# -----------------------------------------
994# Check to see if we can do hard links to lock some files if needed
995AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
996[AC_REQUIRE([_LT_AC_LOCK])dnl
997
998hard_links="nottested"
999if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1000 # do not overwrite the value of need_locks provided by the user
1001 AC_MSG_CHECKING([if we can lock with hard links])
1002 hard_links=yes
1003 $rm conftest*
1004 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1005 touch conftest.a
1006 ln conftest.a conftest.b 2>&5 || hard_links=no
1007 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1008 AC_MSG_RESULT([$hard_links])
1009 if test "$hard_links" = no; then
1010 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1011 need_locks=warn
1012 fi
1013else
1014 need_locks=no
1015fi
1016])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1017
1018
1019# AC_LIBTOOL_OBJDIR
1020# -----------------
1021AC_DEFUN([AC_LIBTOOL_OBJDIR],
1022[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1023[rm -f .libs 2>/dev/null
1024mkdir .libs 2>/dev/null
1025if test -d .libs; then
1026 lt_cv_objdir=.libs
1027else
1028 # MS-DOS does not allow filenames that begin with a dot.
1029 lt_cv_objdir=_libs
1030fi
1031rmdir .libs 2>/dev/null])
1032objdir=$lt_cv_objdir
1033])# AC_LIBTOOL_OBJDIR
1034
1035
1036# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1037# ----------------------------------------------
1038# Check hardcoding attributes.
1039AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1040[AC_MSG_CHECKING([how to hardcode library paths into programs])
1041_LT_AC_TAGVAR(hardcode_action, $1)=
1042if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1043 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1044 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1045
1046 # We can hardcode non-existant directories.
1047 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1048 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1049 # have to relink, otherwise we might link with an installed library
1050 # when we should be linking with a yet-to-be-installed one
1051 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1052 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1053 # Linking always hardcodes the temporary library directory.
1054 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1055 else
1056 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1057 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1058 fi
1059else
1060 # We cannot hardcode anything, or else we can only hardcode existing
1061 # directories.
1062 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1063fi
1064AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1065
1066if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1067 # Fast installation is not supported
1068 enable_fast_install=no
1069elif test "$shlibpath_overrides_runpath" = yes ||
1070 test "$enable_shared" = no; then
1071 # Fast installation is not necessary
1072 enable_fast_install=needless
1073fi
1074])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1075
1076
1077# AC_LIBTOOL_SYS_LIB_STRIP
1078# ------------------------
1079AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1080[striplib=
1081old_striplib=
1082AC_MSG_CHECKING([whether stripping libraries is possible])
1083if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1084 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1085 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1086 AC_MSG_RESULT([yes])
1087else
1088# FIXME - insert some real tests, host_os isn't really good enough
1089 case $host_os in
1090 darwin*)
1091 if test -n "$STRIP" ; then
1092 striplib="$STRIP -x"
1093 AC_MSG_RESULT([yes])
1094 else
1095 AC_MSG_RESULT([no])
1096fi
1097 ;;
1098 *)
1099 AC_MSG_RESULT([no])
1100 ;;
1101 esac
1102fi
1103])# AC_LIBTOOL_SYS_LIB_STRIP
1104
1105
1106# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1107# -----------------------------
1108# PORTME Fill in your ld.so characteristics
1109AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1110[AC_MSG_CHECKING([dynamic linker characteristics])
1111library_names_spec=
1112libname_spec='lib$name'
1113soname_spec=
1114shrext_cmds=".so"
1115postinstall_cmds=
1116postuninstall_cmds=
1117finish_cmds=
1118finish_eval=
1119shlibpath_var=
1120shlibpath_overrides_runpath=unknown
1121version_type=none
1122dynamic_linker="$host_os ld.so"
1123sys_lib_dlsearch_path_spec="/lib /usr/lib"
1124if test "$GCC" = yes; then
1125 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1126 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1127 # if the path contains ";" then we assume it to be the separator
1128 # otherwise default to the standard path separator (i.e. ":") - it is
1129 # assumed that no part of a normal pathname contains ";" but that should
1130 # okay in the real world where ";" in dirpaths is itself problematic.
1131 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1132 else
1133 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1134 fi
1135else
1136 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1137fi
1138need_lib_prefix=unknown
1139hardcode_into_libs=no
1140
1141# when you set need_version to no, make sure it does not cause -set_version
1142# flags to be left without arguments
1143need_version=unknown
1144
1145case $host_os in
1146aix3*)
1147 version_type=linux
1148 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1149 shlibpath_var=LIBPATH
1150
1151 # AIX 3 has no versioning support, so we append a major version to the name.
1152 soname_spec='${libname}${release}${shared_ext}$major'
1153 ;;
1154
1155aix4* | aix5*)
1156 version_type=linux
1157 need_lib_prefix=no
1158 need_version=no
1159 hardcode_into_libs=yes
1160 if test "$host_cpu" = ia64; then
1161 # AIX 5 supports IA64
1162 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1163 shlibpath_var=LD_LIBRARY_PATH
1164 else
1165 # With GCC up to 2.95.x, collect2 would create an import file
1166 # for dependence libraries. The import file would start with
1167 # the line `#! .'. This would cause the generated library to
1168 # depend on `.', always an invalid library. This was fixed in
1169 # development snapshots of GCC prior to 3.0.
1170 case $host_os in
1171 aix4 | aix4.[[01]] | aix4.[[01]].*)
1172 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1173 echo ' yes '
1174 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1175 :
1176 else
1177 can_build_shared=no
1178 fi
1179 ;;
1180 esac
1181 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1182 # soname into executable. Probably we can add versioning support to
1183 # collect2, so additional links can be useful in future.
1184 if test "$aix_use_runtimelinking" = yes; then
1185 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1186 # instead of lib<name>.a to let people know that these are not
1187 # typical AIX shared libraries.
1188 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1189 else
1190 # We preserve .a as extension for shared libraries through AIX4.2
1191 # and later when we are not doing run time linking.
1192 library_names_spec='${libname}${release}.a $libname.a'
1193 soname_spec='${libname}${release}${shared_ext}$major'
1194 fi
1195 shlibpath_var=LIBPATH
1196 fi
1197 ;;
1198
1199amigaos*)
1200 library_names_spec='$libname.ixlibrary $libname.a'
1201 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1202 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'
1203 ;;
1204
1205beos*)
1206 library_names_spec='${libname}${shared_ext}'
1207 dynamic_linker="$host_os ld.so"
1208 shlibpath_var=LIBRARY_PATH
1209 ;;
1210
1211bsdi[[45]]*)
1212 version_type=linux
1213 need_version=no
1214 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1215 soname_spec='${libname}${release}${shared_ext}$major'
1216 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1217 shlibpath_var=LD_LIBRARY_PATH
1218 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1219 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1220 # the default ld.so.conf also contains /usr/contrib/lib and
1221 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1222 # libtool to hard-code these into programs
1223 ;;
1224
1225cygwin* | mingw* | pw32*)
1226 version_type=windows
1227 shrext_cmds=".dll"
1228 need_version=no
1229 need_lib_prefix=no
1230
1231 case $GCC,$host_os in
1232 yes,cygwin* | yes,mingw* | yes,pw32*)
1233 library_names_spec='$libname.dll.a'
1234 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1235 postinstall_cmds='base_file=`basename \${file}`~
1236 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1237 dldir=$destdir/`dirname \$dlpath`~
1238 test -d \$dldir || mkdir -p \$dldir~
1239 $install_prog $dir/$dlname \$dldir/$dlname'
1240 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1241 dlpath=$dir/\$dldll~
1242 $rm \$dlpath'
1243 shlibpath_overrides_runpath=yes
1244
1245 case $host_os in
1246 cygwin*)
1247 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1248 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1249 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1250 ;;
1251 mingw*)
1252 # MinGW DLLs use traditional 'lib' prefix
1253 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1254 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1255 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1256 # It is most probably a Windows format PATH printed by
1257 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1258 # path with ; separators, and with drive letters. We can handle the
1259 # drive letters (cygwin fileutils understands them), so leave them,
1260 # especially as we might pass files found there to a mingw objdump,
1261 # which wouldn't understand a cygwinified path. Ahh.
1262 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1263 else
1264 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1265 fi
1266 ;;
1267 pw32*)
1268 # pw32 DLLs use 'pw' prefix rather than 'lib'
1269 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1270 ;;
1271 esac
1272 ;;
1273
1274 *)
1275 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1276 ;;
1277 esac
1278 dynamic_linker='Win32 ld.exe'
1279 # FIXME: first we should search . and the directory the executable is in
1280 shlibpath_var=PATH
1281 ;;
1282
1283darwin* | rhapsody*)
1284 dynamic_linker="$host_os dyld"
1285 version_type=darwin
1286 need_lib_prefix=no
1287 need_version=no
1288 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1289 soname_spec='${libname}${release}${major}$shared_ext'
1290 shlibpath_overrides_runpath=yes
1291 shlibpath_var=DYLD_LIBRARY_PATH
1292 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1293 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1294 if test "$GCC" = yes; then
1295 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1296 else
1297 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1298 fi
1299 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1300 ;;
1301
1302dgux*)
1303 version_type=linux
1304 need_lib_prefix=no
1305 need_version=no
1306 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1307 soname_spec='${libname}${release}${shared_ext}$major'
1308 shlibpath_var=LD_LIBRARY_PATH
1309 ;;
1310
1311freebsd1*)
1312 dynamic_linker=no
1313 ;;
1314
1315kfreebsd*-gnu)
1316 version_type=linux
1317 need_lib_prefix=no
1318 need_version=no
1319 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1320 soname_spec='${libname}${release}${shared_ext}$major'
1321 shlibpath_var=LD_LIBRARY_PATH
1322 shlibpath_overrides_runpath=no
1323 hardcode_into_libs=yes
1324 dynamic_linker='GNU ld.so'
1325 ;;
1326
1327freebsd*)
1328 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1329 version_type=freebsd-$objformat
1330 case $version_type in
1331 freebsd-elf*)
1332 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1333 need_version=no
1334 need_lib_prefix=no
1335 ;;
1336 freebsd-*)
1337 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1338 need_version=yes
1339 ;;
1340 esac
1341 shlibpath_var=LD_LIBRARY_PATH
1342 case $host_os in
1343 freebsd2*)
1344 shlibpath_overrides_runpath=yes
1345 ;;
1346 freebsd3.[01]* | freebsdelf3.[01]*)
1347 shlibpath_overrides_runpath=yes
1348 hardcode_into_libs=yes
1349 ;;
1350 *) # from 3.2 on
1351 shlibpath_overrides_runpath=no
1352 hardcode_into_libs=yes
1353 ;;
1354 esac
1355 ;;
1356
1357gnu*)
1358 version_type=linux
1359 need_lib_prefix=no
1360 need_version=no
1361 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1362 soname_spec='${libname}${release}${shared_ext}$major'
1363 shlibpath_var=LD_LIBRARY_PATH
1364 hardcode_into_libs=yes
1365 ;;
1366
1367hpux9* | hpux10* | hpux11*)
1368 # Give a soname corresponding to the major version so that dld.sl refuses to
1369 # link against other versions.
1370 version_type=sunos
1371 need_lib_prefix=no
1372 need_version=no
1373 case "$host_cpu" in
1374 ia64*)
1375 shrext_cmds='.so'
1376 hardcode_into_libs=yes
1377 dynamic_linker="$host_os dld.so"
1378 shlibpath_var=LD_LIBRARY_PATH
1379 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1380 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1381 soname_spec='${libname}${release}${shared_ext}$major'
1382 if test "X$HPUX_IA64_MODE" = X32; then
1383 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1384 else
1385 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1386 fi
1387 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1388 ;;
1389 hppa*64*)
1390 shrext_cmds='.sl'
1391 hardcode_into_libs=yes
1392 dynamic_linker="$host_os dld.sl"
1393 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1394 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1395 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1396 soname_spec='${libname}${release}${shared_ext}$major'
1397 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1398 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1399 ;;
1400 *)
1401 shrext_cmds='.sl'
1402 dynamic_linker="$host_os dld.sl"
1403 shlibpath_var=SHLIB_PATH
1404 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1405 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1406 soname_spec='${libname}${release}${shared_ext}$major'
1407 ;;
1408 esac
1409 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1410 postinstall_cmds='chmod 555 $lib'
1411 ;;
1412
1413irix5* | irix6* | nonstopux*)
1414 case $host_os in
1415 nonstopux*) version_type=nonstopux ;;
1416 *)
1417 if test "$lt_cv_prog_gnu_ld" = yes; then
1418 version_type=linux
1419 else
1420 version_type=irix
1421 fi ;;
1422 esac
1423 need_lib_prefix=no
1424 need_version=no
1425 soname_spec='${libname}${release}${shared_ext}$major'
1426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1427 case $host_os in
1428 irix5* | nonstopux*)
1429 libsuff= shlibsuff=
1430 ;;
1431 *)
1432 case $LD in # libtool.m4 will add one of these switches to LD
1433 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1434 libsuff= shlibsuff= libmagic=32-bit;;
1435 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1436 libsuff=32 shlibsuff=N32 libmagic=N32;;
1437 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1438 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1439 *) libsuff= shlibsuff= libmagic=never-match;;
1440 esac
1441 ;;
1442 esac
1443 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1444 shlibpath_overrides_runpath=no
1445 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1446 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1447 hardcode_into_libs=yes
1448 ;;
1449
1450# No shared lib support for Linux oldld, aout, or coff.
1451linux*oldld* | linux*aout* | linux*coff*)
1452 dynamic_linker=no
1453 ;;
1454
1455# This must be Linux ELF.
1456linux*)
1457 version_type=linux
1458 need_lib_prefix=no
1459 need_version=no
1460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1461 soname_spec='${libname}${release}${shared_ext}$major'
1462 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1463 shlibpath_var=LD_LIBRARY_PATH
1464 shlibpath_overrides_runpath=no
1465 # This implies no fast_install, which is unacceptable.
1466 # Some rework will be needed to allow for fast_install
1467 # before this can be enabled.
1468 hardcode_into_libs=yes
1469
1470 # Append ld.so.conf contents to the search path
1471 if test -f /etc/ld.so.conf; then
1472 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1473 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1474 fi
1475
1476 # We used to test for /lib/ld.so.1 and disable shared libraries on
1477 # powerpc, because MkLinux only supported shared libraries with the
1478 # GNU dynamic linker. Since this was broken with cross compilers,
1479 # most powerpc-linux boxes support dynamic linking these days and
1480 # people can always --disable-shared, the test was removed, and we
1481 # assume the GNU/Linux dynamic linker is in use.
1482 dynamic_linker='GNU/Linux ld.so'
1483 ;;
1484
1485knetbsd*-gnu)
1486 version_type=linux
1487 need_lib_prefix=no
1488 need_version=no
1489 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1490 soname_spec='${libname}${release}${shared_ext}$major'
1491 shlibpath_var=LD_LIBRARY_PATH
1492 shlibpath_overrides_runpath=no
1493 hardcode_into_libs=yes
1494 dynamic_linker='GNU ld.so'
1495 ;;
1496
1497netbsd*)
1498 version_type=sunos
1499 need_lib_prefix=no
1500 need_version=no
1501 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1502 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1503 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1504 dynamic_linker='NetBSD (a.out) ld.so'
1505 else
1506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1507 soname_spec='${libname}${release}${shared_ext}$major'
1508 dynamic_linker='NetBSD ld.elf_so'
1509 fi
1510 shlibpath_var=LD_LIBRARY_PATH
1511 shlibpath_overrides_runpath=yes
1512 hardcode_into_libs=yes
1513 ;;
1514
1515newsos6)
1516 version_type=linux
1517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1518 shlibpath_var=LD_LIBRARY_PATH
1519 shlibpath_overrides_runpath=yes
1520 ;;
1521
1522nto-qnx*)
1523 version_type=linux
1524 need_lib_prefix=no
1525 need_version=no
1526 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1527 soname_spec='${libname}${release}${shared_ext}$major'
1528 shlibpath_var=LD_LIBRARY_PATH
1529 shlibpath_overrides_runpath=yes
1530 ;;
1531
1532openbsd*)
1533 version_type=sunos
1534 need_lib_prefix=no
1535 need_version=no
1536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1537 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1538 shlibpath_var=LD_LIBRARY_PATH
1539 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1540 case $host_os in
1541 openbsd2.[[89]] | openbsd2.[[89]].*)
1542 shlibpath_overrides_runpath=no
1543 ;;
1544 *)
1545 shlibpath_overrides_runpath=yes
1546 ;;
1547 esac
1548 else
1549 shlibpath_overrides_runpath=yes
1550 fi
1551 ;;
1552
1553os2*)
1554 libname_spec='$name'
1555 shrext_cmds=".dll"
1556 need_lib_prefix=no
1557 library_names_spec='$libname${shared_ext} $libname.a'
1558 dynamic_linker='OS/2 ld.exe'
1559 shlibpath_var=LIBPATH
1560 ;;
1561
1562osf3* | osf4* | osf5*)
1563 version_type=osf
1564 need_lib_prefix=no
1565 need_version=no
1566 soname_spec='${libname}${release}${shared_ext}$major'
1567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1568 shlibpath_var=LD_LIBRARY_PATH
1569 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1570 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1571 ;;
1572
1573sco3.2v5*)
1574 version_type=osf
1575 soname_spec='${libname}${release}${shared_ext}$major'
1576 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1577 shlibpath_var=LD_LIBRARY_PATH
1578 ;;
1579
1580solaris*)
1581 version_type=linux
1582 need_lib_prefix=no
1583 need_version=no
1584 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1585 soname_spec='${libname}${release}${shared_ext}$major'
1586 shlibpath_var=LD_LIBRARY_PATH
1587 shlibpath_overrides_runpath=yes
1588 hardcode_into_libs=yes
1589 # ldd complains unless libraries are executable
1590 postinstall_cmds='chmod +x $lib'
1591 ;;
1592
1593sunos4*)
1594 version_type=sunos
1595 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1596 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1597 shlibpath_var=LD_LIBRARY_PATH
1598 shlibpath_overrides_runpath=yes
1599 if test "$with_gnu_ld" = yes; then
1600 need_lib_prefix=no
1601 fi
1602 need_version=yes
1603 ;;
1604
1605sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1606 version_type=linux
1607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1608 soname_spec='${libname}${release}${shared_ext}$major'
1609 shlibpath_var=LD_LIBRARY_PATH
1610 case $host_vendor in
1611 sni)
1612 shlibpath_overrides_runpath=no
1613 need_lib_prefix=no
1614 export_dynamic_flag_spec='${wl}-Blargedynsym'
1615 runpath_var=LD_RUN_PATH
1616 ;;
1617 siemens)
1618 need_lib_prefix=no
1619 ;;
1620 motorola)
1621 need_lib_prefix=no
1622 need_version=no
1623 shlibpath_overrides_runpath=no
1624 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1625 ;;
1626 esac
1627 ;;
1628
1629sysv4*MP*)
1630 if test -d /usr/nec ;then
1631 version_type=linux
1632 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1633 soname_spec='$libname${shared_ext}.$major'
1634 shlibpath_var=LD_LIBRARY_PATH
1635 fi
1636 ;;
1637
1638uts4*)
1639 version_type=linux
1640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1641 soname_spec='${libname}${release}${shared_ext}$major'
1642 shlibpath_var=LD_LIBRARY_PATH
1643 ;;
1644
1645*)
1646 dynamic_linker=no
1647 ;;
1648esac
1649AC_MSG_RESULT([$dynamic_linker])
1650test "$dynamic_linker" = no && can_build_shared=no
1651])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1652
1653
1654# _LT_AC_TAGCONFIG
1655# ----------------
1656AC_DEFUN([_LT_AC_TAGCONFIG],
1657[AC_ARG_WITH([tags],
1658 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1659 [include additional configurations @<:@automatic@:>@])],
1660 [tagnames="$withval"])
1661
1662if test -f "$ltmain" && test -n "$tagnames"; then
1663 if test ! -f "${ofile}"; then
1664 AC_MSG_WARN([output file `$ofile' does not exist])
1665 fi
1666
1667 if test -z "$LTCC"; then
1668 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1669 if test -z "$LTCC"; then
1670 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1671 else
1672 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1673 fi
1674 fi
1675
1676 # Extract list of available tagged configurations in $ofile.
1677 # Note that this assumes the entire list is on one line.
1678 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1679
1680 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1681 for tagname in $tagnames; do
1682 IFS="$lt_save_ifs"
1683 # Check whether tagname contains only valid characters
1684 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1685 "") ;;
1686 *) AC_MSG_ERROR([invalid tag name: $tagname])
1687 ;;
1688 esac
1689
1690 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1691 then
1692 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1693 fi
1694
1695 # Update the list of available tags.
1696 if test -n "$tagname"; then
1697 echo appending configuration tag \"$tagname\" to $ofile
1698
1699 case $tagname in
1700 CXX)
1701 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1702 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1703 (test "X$CXX" != "Xg++"))) ; then
1704 AC_LIBTOOL_LANG_CXX_CONFIG
1705 else
1706 tagname=""
1707 fi
1708 ;;
1709
1710 F77)
1711 if test -n "$F77" && test "X$F77" != "Xno"; then
1712 AC_LIBTOOL_LANG_F77_CONFIG
1713 else
1714 tagname=""
1715 fi
1716 ;;
1717
1718 GCJ)
1719 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1720 AC_LIBTOOL_LANG_GCJ_CONFIG
1721 else
1722 tagname=""
1723 fi
1724 ;;
1725
1726 RC)
1727 AC_LIBTOOL_LANG_RC_CONFIG
1728 ;;
1729
1730 *)
1731 AC_MSG_ERROR([Unsupported tag name: $tagname])
1732 ;;
1733 esac
1734
1735 # Append the new tag name to the list of available tags.
1736 if test -n "$tagname" ; then
1737 available_tags="$available_tags $tagname"
1738 fi
1739 fi
1740 done
1741 IFS="$lt_save_ifs"
1742
1743 # Now substitute the updated list of available tags.
1744 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1745 mv "${ofile}T" "$ofile"
1746 chmod +x "$ofile"
1747 else
1748 rm -f "${ofile}T"
1749 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1750 fi
1751fi
1752])# _LT_AC_TAGCONFIG
1753
1754
1755# AC_LIBTOOL_DLOPEN
1756# -----------------
1757# enable checks for dlopen support
1758AC_DEFUN([AC_LIBTOOL_DLOPEN],
1759 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1760])# AC_LIBTOOL_DLOPEN
1761
1762
1763# AC_LIBTOOL_WIN32_DLL
1764# --------------------
1765# declare package support for building win32 dll's
1766AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1767[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1768])# AC_LIBTOOL_WIN32_DLL
1769
1770
1771# AC_ENABLE_SHARED([DEFAULT])
1772# ---------------------------
1773# implement the --enable-shared flag
1774# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1775AC_DEFUN([AC_ENABLE_SHARED],
1776[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1777AC_ARG_ENABLE([shared],
1778 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1779 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1780 [p=${PACKAGE-default}
1781 case $enableval in
1782 yes) enable_shared=yes ;;
1783 no) enable_shared=no ;;
1784 *)
1785 enable_shared=no
1786 # Look at the argument we got. We use all the common list separators.
1787 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1788 for pkg in $enableval; do
1789 IFS="$lt_save_ifs"
1790 if test "X$pkg" = "X$p"; then
1791 enable_shared=yes
1792 fi
1793 done
1794 IFS="$lt_save_ifs"
1795 ;;
1796 esac],
1797 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1798])# AC_ENABLE_SHARED
1799
1800
1801# AC_DISABLE_SHARED
1802# -----------------
1803#- set the default shared flag to --disable-shared
1804AC_DEFUN([AC_DISABLE_SHARED],
1805[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1806AC_ENABLE_SHARED(no)
1807])# AC_DISABLE_SHARED
1808
1809
1810# AC_ENABLE_STATIC([DEFAULT])
1811# ---------------------------
1812# implement the --enable-static flag
1813# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1814AC_DEFUN([AC_ENABLE_STATIC],
1815[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1816AC_ARG_ENABLE([static],
1817 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1818 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1819 [p=${PACKAGE-default}
1820 case $enableval in
1821 yes) enable_static=yes ;;
1822 no) enable_static=no ;;
1823 *)
1824 enable_static=no
1825 # Look at the argument we got. We use all the common list separators.
1826 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1827 for pkg in $enableval; do
1828 IFS="$lt_save_ifs"
1829 if test "X$pkg" = "X$p"; then
1830 enable_static=yes
1831 fi
1832 done
1833 IFS="$lt_save_ifs"
1834 ;;
1835 esac],
1836 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1837])# AC_ENABLE_STATIC
1838
1839
1840# AC_DISABLE_STATIC
1841# -----------------
1842# set the default static flag to --disable-static
1843AC_DEFUN([AC_DISABLE_STATIC],
1844[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1845AC_ENABLE_STATIC(no)
1846])# AC_DISABLE_STATIC
1847
1848
1849# AC_ENABLE_FAST_INSTALL([DEFAULT])
1850# ---------------------------------
1851# implement the --enable-fast-install flag
1852# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1853AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1854[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1855AC_ARG_ENABLE([fast-install],
1856 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1857 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1858 [p=${PACKAGE-default}
1859 case $enableval in
1860 yes) enable_fast_install=yes ;;
1861 no) enable_fast_install=no ;;
1862 *)
1863 enable_fast_install=no
1864 # Look at the argument we got. We use all the common list separators.
1865 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1866 for pkg in $enableval; do
1867 IFS="$lt_save_ifs"
1868 if test "X$pkg" = "X$p"; then
1869 enable_fast_install=yes
1870 fi
1871 done
1872 IFS="$lt_save_ifs"
1873 ;;
1874 esac],
1875 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1876])# AC_ENABLE_FAST_INSTALL
1877
1878
1879# AC_DISABLE_FAST_INSTALL
1880# -----------------------
1881# set the default to --disable-fast-install
1882AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1883[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1884AC_ENABLE_FAST_INSTALL(no)
1885])# AC_DISABLE_FAST_INSTALL
1886
1887
1888# AC_LIBTOOL_PICMODE([MODE])
1889# --------------------------
1890# implement the --with-pic flag
1891# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1892AC_DEFUN([AC_LIBTOOL_PICMODE],
1893[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1894pic_mode=ifelse($#,1,$1,default)
1895])# AC_LIBTOOL_PICMODE
1896
1897
1898# AC_PROG_EGREP
1899# -------------
1900# This is predefined starting with Autoconf 2.54, so this conditional
1901# definition can be removed once we require Autoconf 2.54 or later.
1902m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1903[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1904 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1905 then ac_cv_prog_egrep='grep -E'
1906 else ac_cv_prog_egrep='egrep'
1907 fi])
1908 EGREP=$ac_cv_prog_egrep
1909 AC_SUBST([EGREP])
1910])])
1911
1912
1913# AC_PATH_TOOL_PREFIX
1914# -------------------
1915# find a file program which can recognise shared library
1916AC_DEFUN([AC_PATH_TOOL_PREFIX],
1917[AC_REQUIRE([AC_PROG_EGREP])dnl
1918AC_MSG_CHECKING([for $1])
1919AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1920[case $MAGIC_CMD in
1921[[\\/*] | ?:[\\/]*])
1922 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1923 ;;
1924*)
1925 lt_save_MAGIC_CMD="$MAGIC_CMD"
1926 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1927dnl $ac_dummy forces splitting on constant user-supplied paths.
1928dnl POSIX.2 word splitting is done only on the output of word expansions,
1929dnl not every word. This closes a longstanding sh security hole.
1930 ac_dummy="ifelse([$2], , $PATH, [$2])"
1931 for ac_dir in $ac_dummy; do
1932 IFS="$lt_save_ifs"
1933 test -z "$ac_dir" && ac_dir=.
1934 if test -f $ac_dir/$1; then
1935 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1936 if test -n "$file_magic_test_file"; then
1937 case $deplibs_check_method in
1938 "file_magic "*)
1939 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1940 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1941 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1942 $EGREP "$file_magic_regex" > /dev/null; then
1943 :
1944 else
1945 cat <<EOF 1>&2
1946
1947*** Warning: the command libtool uses to detect shared libraries,
1948*** $file_magic_cmd, produces output that libtool cannot recognize.
1949*** The result is that libtool may fail to recognize shared libraries
1950*** as such. This will affect the creation of libtool libraries that
1951*** depend on shared libraries, but programs linked with such libtool
1952*** libraries will work regardless of this problem. Nevertheless, you
1953*** may want to report the problem to your system manager and/or to
1954*** bug-libtool@gnu.org
1955
1956EOF
1957 fi ;;
1958 esac
1959 fi
1960 break
1961 fi
1962 done
1963 IFS="$lt_save_ifs"
1964 MAGIC_CMD="$lt_save_MAGIC_CMD"
1965 ;;
1966esac])
1967MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1968if test -n "$MAGIC_CMD"; then
1969 AC_MSG_RESULT($MAGIC_CMD)
1970else
1971 AC_MSG_RESULT(no)
1972fi
1973])# AC_PATH_TOOL_PREFIX
1974
1975
1976# AC_PATH_MAGIC
1977# -------------
1978# find a file program which can recognise a shared library
1979AC_DEFUN([AC_PATH_MAGIC],
1980[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1981if test -z "$lt_cv_path_MAGIC_CMD"; then
1982 if test -n "$ac_tool_prefix"; then
1983 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1984 else
1985 MAGIC_CMD=:
1986 fi
1987fi
1988])# AC_PATH_MAGIC
1989
1990
1991# AC_PROG_LD
1992# ----------
1993# find the pathname to the GNU or non-GNU linker
1994AC_DEFUN([AC_PROG_LD],
1995[AC_ARG_WITH([gnu-ld],
1996 [AC_HELP_STRING([--with-gnu-ld],
1997 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1998 [test "$withval" = no || with_gnu_ld=yes],
1999 [with_gnu_ld=no])
2000AC_REQUIRE([LT_AC_PROG_SED])dnl
2001AC_REQUIRE([AC_PROG_CC])dnl
2002AC_REQUIRE([AC_CANONICAL_HOST])dnl
2003AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2004ac_prog=ld
2005if test "$GCC" = yes; then
2006 # Check if gcc -print-prog-name=ld gives a path.
2007 AC_MSG_CHECKING([for ld used by $CC])
2008 case $host in
2009 *-*-mingw*)
2010 # gcc leaves a trailing carriage return which upsets mingw
2011 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2012 *)
2013 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2014 esac
2015 case $ac_prog in
2016 # Accept absolute paths.
2017 [[\\/]]* | ?:[[\\/]]*)
2018 re_direlt='/[[^/]][[^/]]*/\.\./'
2019 # Canonicalize the pathname of ld
2020 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2021 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2022 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2023 done
2024 test -z "$LD" && LD="$ac_prog"
2025 ;;
2026 "")
2027 # If it fails, then pretend we aren't using GCC.
2028 ac_prog=ld
2029 ;;
2030 *)
2031 # If it is relative, then search for the first ld in PATH.
2032 with_gnu_ld=unknown
2033 ;;
2034 esac
2035elif test "$with_gnu_ld" = yes; then
2036 AC_MSG_CHECKING([for GNU ld])
2037else
2038 AC_MSG_CHECKING([for non-GNU ld])
2039fi
2040AC_CACHE_VAL(lt_cv_path_LD,
2041[if test -z "$LD"; then
2042 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2043 for ac_dir in $PATH; do
2044 IFS="$lt_save_ifs"
2045 test -z "$ac_dir" && ac_dir=.
2046 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2047 lt_cv_path_LD="$ac_dir/$ac_prog"
2048 # Check to see if the program is GNU ld. I'd rather use --version,
2049 # but apparently some GNU ld's only accept -v.
2050 # Break only if it was the GNU/non-GNU ld that we prefer.
2051 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2052 *GNU* | *'with BFD'*)
2053 test "$with_gnu_ld" != no && break
2054 ;;
2055 *)
2056 test "$with_gnu_ld" != yes && break
2057 ;;
2058 esac
2059 fi
2060 done
2061 IFS="$lt_save_ifs"
2062else
2063 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2064fi])
2065LD="$lt_cv_path_LD"
2066if test -n "$LD"; then
2067 AC_MSG_RESULT($LD)
2068else
2069 AC_MSG_RESULT(no)
2070fi
2071test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2072AC_PROG_LD_GNU
2073])# AC_PROG_LD
2074
2075
2076# AC_PROG_LD_GNU
2077# --------------
2078AC_DEFUN([AC_PROG_LD_GNU],
2079[AC_REQUIRE([AC_PROG_EGREP])dnl
2080AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2081[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2082case `$LD -v 2>&1 </dev/null` in
2083*GNU* | *'with BFD'*)
2084 lt_cv_prog_gnu_ld=yes
2085 ;;
2086*)
2087 lt_cv_prog_gnu_ld=no
2088 ;;
2089esac])
2090with_gnu_ld=$lt_cv_prog_gnu_ld
2091])# AC_PROG_LD_GNU
2092
2093
2094# AC_PROG_LD_RELOAD_FLAG
2095# ----------------------
2096# find reload flag for linker
2097# -- PORTME Some linkers may need a different reload flag.
2098AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2099[AC_CACHE_CHECK([for $LD option to reload object files],
2100 lt_cv_ld_reload_flag,
2101 [lt_cv_ld_reload_flag='-r'])
2102reload_flag=$lt_cv_ld_reload_flag
2103case $reload_flag in
2104"" | " "*) ;;
2105*) reload_flag=" $reload_flag" ;;
2106esac
2107reload_cmds='$LD$reload_flag -o $output$reload_objs'
2108case $host_os in
2109 darwin*)
2110 if test "$GCC" = yes; then
2111 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2112 else
2113 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2114 fi
2115 ;;
2116esac
2117])# AC_PROG_LD_RELOAD_FLAG
2118
2119
2120# AC_DEPLIBS_CHECK_METHOD
2121# -----------------------
2122# how to check for library dependencies
2123# -- PORTME fill in with the dynamic library characteristics
2124AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2125[AC_CACHE_CHECK([how to recognise dependent libraries],
2126lt_cv_deplibs_check_method,
2127[lt_cv_file_magic_cmd='$MAGIC_CMD'
2128lt_cv_file_magic_test_file=
2129lt_cv_deplibs_check_method='unknown'
2130# Need to set the preceding variable on all platforms that support
2131# interlibrary dependencies.
2132# 'none' -- dependencies not supported.
2133# `unknown' -- same as none, but documents that we really don't know.
2134# 'pass_all' -- all dependencies passed with no checks.
2135# 'test_compile' -- check by making test program.
2136# 'file_magic [[regex]]' -- check by looking for files in library path
2137# which responds to the $file_magic_cmd with a given extended regex.
2138# If you have `file' or equivalent on your system and you're not sure
2139# whether `pass_all' will *always* work, you probably want this one.
2140
2141case $host_os in
2142aix4* | aix5*)
2143 lt_cv_deplibs_check_method=pass_all
2144 ;;
2145
2146beos*)
2147 lt_cv_deplibs_check_method=pass_all
2148 ;;
2149
2150bsdi[[45]]*)
2151 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2152 lt_cv_file_magic_cmd='/usr/bin/file -L'
2153 lt_cv_file_magic_test_file=/shlib/libc.so
2154 ;;
2155
2156cygwin*)
2157 # func_win32_libid is a shell function defined in ltmain.sh
2158 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2159 lt_cv_file_magic_cmd='func_win32_libid'
2160 ;;
2161
2162mingw* | pw32*)
2163 # Base MSYS/MinGW do not provide the 'file' command needed by
2164 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2165 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2166 lt_cv_file_magic_cmd='$OBJDUMP -f'
2167 ;;
2168
2169darwin* | rhapsody*)
2170 lt_cv_deplibs_check_method=pass_all
2171 ;;
2172
2173freebsd* | kfreebsd*-gnu)
2174 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2175 case $host_cpu in
2176 i*86 )
2177 # Not sure whether the presence of OpenBSD here was a mistake.
2178 # Let's accept both of them until this is cleared up.
2179 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2180 lt_cv_file_magic_cmd=/usr/bin/file
2181 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2182 ;;
2183 esac
2184 else
2185 lt_cv_deplibs_check_method=pass_all
2186 fi
2187 ;;
2188
2189gnu*)
2190 lt_cv_deplibs_check_method=pass_all
2191 ;;
2192
2193hpux10.20* | hpux11*)
2194 lt_cv_file_magic_cmd=/usr/bin/file
2195 case "$host_cpu" in
2196 ia64*)
2197 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2198 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2199 ;;
2200 hppa*64*)
2201 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2202 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2203 ;;
2204 *)
2205 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2206 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2207 ;;
2208 esac
2209 ;;
2210
2211irix5* | irix6* | nonstopux*)
2212 case $LD in
2213 *-32|*"-32 ") libmagic=32-bit;;
2214 *-n32|*"-n32 ") libmagic=N32;;
2215 *-64|*"-64 ") libmagic=64-bit;;
2216 *) libmagic=never-match;;
2217 esac
2218 lt_cv_deplibs_check_method=pass_all
2219 ;;
2220
2221# This must be Linux ELF.
2222linux*)
2223 lt_cv_deplibs_check_method=pass_all
2224 ;;
2225
2226netbsd*)
2227 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2228 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2229 else
2230 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2231 fi
2232 ;;
2233
2234newos6*)
2235 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2236 lt_cv_file_magic_cmd=/usr/bin/file
2237 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2238 ;;
2239
2240nto-qnx*)
2241 lt_cv_deplibs_check_method=unknown
2242 ;;
2243
2244openbsd*)
2245 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2246 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2247 else
2248 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2249 fi
2250 ;;
2251
2252osf3* | osf4* | osf5*)
2253 lt_cv_deplibs_check_method=pass_all
2254 ;;
2255
2256sco3.2v5*)
2257 lt_cv_deplibs_check_method=pass_all
2258 ;;
2259
2260solaris*)
2261 lt_cv_deplibs_check_method=pass_all
2262 ;;
2263
2264sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2265 case $host_vendor in
2266 motorola)
2267 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]]'
2268 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2269 ;;
2270 ncr)
2271 lt_cv_deplibs_check_method=pass_all
2272 ;;
2273 sequent)
2274 lt_cv_file_magic_cmd='/bin/file'
2275 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2276 ;;
2277 sni)
2278 lt_cv_file_magic_cmd='/bin/file'
2279 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2280 lt_cv_file_magic_test_file=/lib/libc.so
2281 ;;
2282 siemens)
2283 lt_cv_deplibs_check_method=pass_all
2284 ;;
2285 esac
2286 ;;
2287
2288sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2289 lt_cv_deplibs_check_method=pass_all
2290 ;;
2291esac
2292])
2293file_magic_cmd=$lt_cv_file_magic_cmd
2294deplibs_check_method=$lt_cv_deplibs_check_method
2295test -z "$deplibs_check_method" && deplibs_check_method=unknown
2296])# AC_DEPLIBS_CHECK_METHOD
2297
2298
2299# AC_PROG_NM
2300# ----------
2301# find the pathname to a BSD-compatible name lister
2302AC_DEFUN([AC_PROG_NM],
2303[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2304[if test -n "$NM"; then
2305 # Let the user override the test.
2306 lt_cv_path_NM="$NM"
2307else
2308 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2309 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2310 IFS="$lt_save_ifs"
2311 test -z "$ac_dir" && ac_dir=.
2312 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2313 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2314 # Check to see if the nm accepts a BSD-compat flag.
2315 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2316 # nm: unknown option "B" ignored
2317 # Tru64's nm complains that /dev/null is an invalid object file
2318 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2319 */dev/null* | *'Invalid file or object type'*)
2320 lt_cv_path_NM="$tmp_nm -B"
2321 break
2322 ;;
2323 *)
2324 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2325 */dev/null*)
2326 lt_cv_path_NM="$tmp_nm -p"
2327 break
2328 ;;
2329 *)
2330 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2331 continue # so that we can try to find one that supports BSD flags
2332 ;;
2333 esac
2334 esac
2335 fi
2336 done
2337 IFS="$lt_save_ifs"
2338 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2339fi])
2340NM="$lt_cv_path_NM"
2341])# AC_PROG_NM
2342
2343
2344# AC_CHECK_LIBM
2345# -------------
2346# check for math library
2347AC_DEFUN([AC_CHECK_LIBM],
2348[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2349LIBM=
2350case $host in
2351*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2352 # These system don't have libm, or don't need it
2353 ;;
2354*-ncr-sysv4.3*)
2355 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2356 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2357 ;;
2358*)
2359 AC_CHECK_LIB(m, cos, LIBM="-lm")
2360 ;;
2361esac
2362])# AC_CHECK_LIBM
2363
2364
2365# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2366# -----------------------------------
2367# sets LIBLTDL to the link flags for the libltdl convenience library and
2368# LTDLINCL to the include flags for the libltdl header and adds
2369# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2370# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2371# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2372# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2373# '${top_srcdir}/' (note the single quotes!). If your package is not
2374# flat and you're not using automake, define top_builddir and
2375# top_srcdir appropriately in the Makefiles.
2376AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2377[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2378 case $enable_ltdl_convenience in
2379 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2380 "") enable_ltdl_convenience=yes
2381 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2382 esac
2383 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2384 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2385 # For backwards non-gettext consistent compatibility...
2386 INCLTDL="$LTDLINCL"
2387])# AC_LIBLTDL_CONVENIENCE
2388
2389
2390# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2391# -----------------------------------
2392# sets LIBLTDL to the link flags for the libltdl installable library and
2393# LTDLINCL to the include flags for the libltdl header and adds
2394# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2395# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2396# DIRECTORY is not provided and an installed libltdl is not found, it is
2397# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2398# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2399# quotes!). If your package is not flat and you're not using automake,
2400# define top_builddir and top_srcdir appropriately in the Makefiles.
2401# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2402AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2403[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2404 AC_CHECK_LIB(ltdl, lt_dlinit,
2405 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2406 [if test x"$enable_ltdl_install" = xno; then
2407 AC_MSG_WARN([libltdl not installed, but installation disabled])
2408 else
2409 enable_ltdl_install=yes
2410 fi
2411 ])
2412 if test x"$enable_ltdl_install" = x"yes"; then
2413 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2414 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2415 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2416 else
2417 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2418 LIBLTDL="-lltdl"
2419 LTDLINCL=
2420 fi
2421 # For backwards non-gettext consistent compatibility...
2422 INCLTDL="$LTDLINCL"
2423])# AC_LIBLTDL_INSTALLABLE
2424
2425
2426# AC_LIBTOOL_CXX
2427# --------------
2428# enable support for C++ libraries
2429AC_DEFUN([AC_LIBTOOL_CXX],
2430[AC_REQUIRE([_LT_AC_LANG_CXX])
2431])# AC_LIBTOOL_CXX
2432
2433
2434# _LT_AC_LANG_CXX
2435# ---------------
2436AC_DEFUN([_LT_AC_LANG_CXX],
2437[AC_REQUIRE([AC_PROG_CXX])
2438AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2439_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2440])# _LT_AC_LANG_CXX
2441
2442# _LT_AC_PROG_CXXCPP
2443# ---------------
2444AC_DEFUN([_LT_AC_PROG_CXXCPP],
2445[
2446AC_REQUIRE([AC_PROG_CXX])
2447if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2448 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2449 (test "X$CXX" != "Xg++"))) ; then
2450 AC_PROG_CXXCPP
2451fi
2452])# _LT_AC_PROG_CXXCPP
2453
2454# AC_LIBTOOL_F77
2455# --------------
2456# enable support for Fortran 77 libraries
2457AC_DEFUN([AC_LIBTOOL_F77],
2458[AC_REQUIRE([_LT_AC_LANG_F77])
2459])# AC_LIBTOOL_F77
2460
2461
2462# _LT_AC_LANG_F77
2463# ---------------
2464AC_DEFUN([_LT_AC_LANG_F77],
2465[AC_REQUIRE([AC_PROG_F77])
2466_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2467])# _LT_AC_LANG_F77
2468
2469
2470# AC_LIBTOOL_GCJ
2471# --------------
2472# enable support for GCJ libraries
2473AC_DEFUN([AC_LIBTOOL_GCJ],
2474[AC_REQUIRE([_LT_AC_LANG_GCJ])
2475])# AC_LIBTOOL_GCJ
2476
2477
2478# _LT_AC_LANG_GCJ
2479# ---------------
2480AC_DEFUN([_LT_AC_LANG_GCJ],
2481[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2482 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2483 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2484 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2485 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2486 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2487_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2488])# _LT_AC_LANG_GCJ
2489
2490
2491# AC_LIBTOOL_RC
2492# --------------
2493# enable support for Windows resource files
2494AC_DEFUN([AC_LIBTOOL_RC],
2495[AC_REQUIRE([LT_AC_PROG_RC])
2496_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2497])# AC_LIBTOOL_RC
2498
2499
2500# AC_LIBTOOL_LANG_C_CONFIG
2501# ------------------------
2502# Ensure that the configuration vars for the C compiler are
2503# suitably defined. Those variables are subsequently used by
2504# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2505AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2506AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2507[lt_save_CC="$CC"
2508AC_LANG_PUSH(C)
2509
2510# Source file extension for C test sources.
2511ac_ext=c
2512
2513# Object file extension for compiled C test sources.
2514objext=o
2515_LT_AC_TAGVAR(objext, $1)=$objext
2516
2517# Code to be used in simple compile tests
2518lt_simple_compile_test_code="int some_variable = 0;\n"
2519
2520# Code to be used in simple link tests
2521lt_simple_link_test_code='int main(){return(0);}\n'
2522
2523_LT_AC_SYS_COMPILER
2524
2525#
2526# Check for any special shared library compilation flags.
2527#
2528_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2529if test "$GCC" = no; then
2530 case $host_os in
2531 sco3.2v5*)
2532 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2533 ;;
2534 esac
2535fi
2536if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2537 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2538 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2539 else
2540 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2541 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2542 fi
2543fi
2544
2545
2546#
2547# Check to make sure the static flag actually works.
2548#
2549AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2550 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2551 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2552 [],
2553 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2554
2555
2556## CAVEAT EMPTOR:
2557## There is no encapsulation within the following macros, do not change
2558## the running order or otherwise move them around unless you know exactly
2559## what you are doing...
2560AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2561AC_LIBTOOL_PROG_COMPILER_PIC($1)
2562AC_LIBTOOL_PROG_CC_C_O($1)
2563AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2564AC_LIBTOOL_PROG_LD_SHLIBS($1)
2565AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2566AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2567AC_LIBTOOL_SYS_LIB_STRIP
2568AC_LIBTOOL_DLOPEN_SELF($1)
2569
2570# Report which librarie types wil actually be built
2571AC_MSG_CHECKING([if libtool supports shared libraries])
2572AC_MSG_RESULT([$can_build_shared])
2573
2574AC_MSG_CHECKING([whether to build shared libraries])
2575test "$can_build_shared" = "no" && enable_shared=no
2576
2577# On AIX, shared libraries and static libraries use the same namespace, and
2578# are all built from PIC.
2579case "$host_os" in
2580aix3*)
2581 test "$enable_shared" = yes && enable_static=no
2582 if test -n "$RANLIB"; then
2583 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2584 postinstall_cmds='$RANLIB $lib'
2585 fi
2586 ;;
2587
2588aix4* | aix5*)
2589 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2590 test "$enable_shared" = yes && enable_static=no
2591 fi
2592 ;;
2593esac
2594AC_MSG_RESULT([$enable_shared])
2595
2596AC_MSG_CHECKING([whether to build static libraries])
2597# Make sure either enable_shared or enable_static is yes.
2598test "$enable_shared" = yes || enable_static=yes
2599AC_MSG_RESULT([$enable_static])
2600
2601AC_LIBTOOL_CONFIG($1)
2602
2603AC_LANG_POP
2604CC="$lt_save_CC"
2605])# AC_LIBTOOL_LANG_C_CONFIG
2606
2607
2608# AC_LIBTOOL_LANG_CXX_CONFIG
2609# --------------------------
2610# Ensure that the configuration vars for the C compiler are
2611# suitably defined. Those variables are subsequently used by
2612# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2613AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2614AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2615[AC_LANG_PUSH(C++)
2616AC_REQUIRE([AC_PROG_CXX])
2617AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2618
2619_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2620_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2621_LT_AC_TAGVAR(always_export_symbols, $1)=no
2622_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2623_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2624_LT_AC_TAGVAR(hardcode_direct, $1)=no
2625_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2626_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2627_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2628_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2629_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2630_LT_AC_TAGVAR(module_cmds, $1)=
2631_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2632_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2633_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2634_LT_AC_TAGVAR(no_undefined_flag, $1)=
2635_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2636_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2637
2638# Dependencies to place before and after the object being linked:
2639_LT_AC_TAGVAR(predep_objects, $1)=
2640_LT_AC_TAGVAR(postdep_objects, $1)=
2641_LT_AC_TAGVAR(predeps, $1)=
2642_LT_AC_TAGVAR(postdeps, $1)=
2643_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2644
2645# Source file extension for C++ test sources.
2646ac_ext=cc
2647
2648# Object file extension for compiled C++ test sources.
2649objext=o
2650_LT_AC_TAGVAR(objext, $1)=$objext
2651
2652# Code to be used in simple compile tests
2653lt_simple_compile_test_code="int some_variable = 0;\n"
2654
2655# Code to be used in simple link tests
2656lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2657
2658# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2659_LT_AC_SYS_COMPILER
2660
2661# Allow CC to be a program name with arguments.
2662lt_save_CC=$CC
2663lt_save_LD=$LD
2664lt_save_GCC=$GCC
2665GCC=$GXX
2666lt_save_with_gnu_ld=$with_gnu_ld
2667lt_save_path_LD=$lt_cv_path_LD
2668if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2669 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2670else
2671 unset lt_cv_prog_gnu_ld
2672fi
2673if test -n "${lt_cv_path_LDCXX+set}"; then
2674 lt_cv_path_LD=$lt_cv_path_LDCXX
2675else
2676 unset lt_cv_path_LD
2677fi
2678test -z "${LDCXX+set}" || LD=$LDCXX
2679CC=${CXX-"c++"}
2680compiler=$CC
2681_LT_AC_TAGVAR(compiler, $1)=$CC
2682cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2683
2684# We don't want -fno-exception wen compiling C++ code, so set the
2685# no_builtin_flag separately
2686if test "$GXX" = yes; then
2687 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2688else
2689 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2690fi
2691
2692if test "$GXX" = yes; then
2693 # Set up default GNU C++ configuration
2694
2695 AC_PROG_LD
2696
2697 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2698 # archiving commands below assume that GNU ld is being used.
2699 if test "$with_gnu_ld" = yes; then
2700 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2701 _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'
2702
2703 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2704 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2705
2706 # If archive_cmds runs LD, not CC, wlarc should be empty
2707 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2708 # investigate it a little bit more. (MM)
2709 wlarc='${wl}'
2710
2711 # ancient GNU ld didn't support --whole-archive et. al.
2712 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2713 grep 'no-whole-archive' > /dev/null; then
2714 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2715 else
2716 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2717 fi
2718 else
2719 with_gnu_ld=no
2720 wlarc=
2721
2722 # A generic and very simple default shared library creation
2723 # command for GNU C++ for the case where it uses the native
2724 # linker, instead of GNU ld. If possible, this setting should
2725 # overridden to take advantage of the native linker features on
2726 # the platform it is being used on.
2727 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2728 fi
2729
2730 # Commands to make compiler produce verbose output that lists
2731 # what "hidden" libraries, object files and flags are used when
2732 # linking a shared library.
2733 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2734
2735else
2736 GXX=no
2737 with_gnu_ld=no
2738 wlarc=
2739fi
2740
2741# PORTME: fill in a description of your system's C++ link characteristics
2742AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2743_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2744case $host_os in
2745 aix3*)
2746 # FIXME: insert proper C++ library support
2747 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2748 ;;
2749 aix4* | aix5*)
2750 if test "$host_cpu" = ia64; then
2751 # On IA64, the linker does run time linking by default, so we don't
2752 # have to do anything special.
2753 aix_use_runtimelinking=no
2754 exp_sym_flag='-Bexport'
2755 no_entry_flag=""
2756 else
2757 aix_use_runtimelinking=no
2758
2759 # Test if we are trying to use run time linking or normal
2760 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2761 # need to do runtime linking.
2762 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2763 for ld_flag in $LDFLAGS; do
2764 case $ld_flag in
2765 *-brtl*)
2766 aix_use_runtimelinking=yes
2767 break
2768 ;;
2769 esac
2770 done
2771 esac
2772
2773 exp_sym_flag='-bexport'
2774 no_entry_flag='-bnoentry'
2775 fi
2776
2777 # When large executables or shared objects are built, AIX ld can
2778 # have problems creating the table of contents. If linking a library
2779 # or program results in "error TOC overflow" add -mminimal-toc to
2780 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2781 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2782
2783 _LT_AC_TAGVAR(archive_cmds, $1)=''
2784 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2785 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2786 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2787
2788 if test "$GXX" = yes; then
2789 case $host_os in aix4.[012]|aix4.[012].*)
2790 # We only want to do this on AIX 4.2 and lower, the check
2791 # below for broken collect2 doesn't work under 4.3+
2792 collect2name=`${CC} -print-prog-name=collect2`
2793 if test -f "$collect2name" && \
2794 strings "$collect2name" | grep resolve_lib_name >/dev/null
2795 then
2796 # We have reworked collect2
2797 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2798 else
2799 # We have old collect2
2800 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2801 # It fails to find uninstalled libraries when the uninstalled
2802 # path is not listed in the libpath. Setting hardcode_minus_L
2803 # to unsupported forces relinking
2804 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2806 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2807 fi
2808 esac
2809 shared_flag='-shared'
2810 else
2811 # not using gcc
2812 if test "$host_cpu" = ia64; then
2813 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2814 # chokes on -Wl,-G. The following line is correct:
2815 shared_flag='-G'
2816 else
2817 if test "$aix_use_runtimelinking" = yes; then
2818 shared_flag='${wl}-G'
2819 else
2820 shared_flag='${wl}-bM:SRE'
2821 fi
2822 fi
2823 fi
2824
2825 # It seems that -bexpall does not export symbols beginning with
2826 # underscore (_), so it is better to generate a list of symbols to export.
2827 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2828 if test "$aix_use_runtimelinking" = yes; then
2829 # Warning - without using the other runtime loading flags (-brtl),
2830 # -berok will link without error, but may produce a broken library.
2831 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2832 # Determine the default libpath from the value encoded in an empty executable.
2833 _LT_AC_SYS_LIBPATH_AIX
2834 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2835
2836 _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2837 else
2838 if test "$host_cpu" = ia64; then
2839 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2840 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2841 _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"
2842 else
2843 # Determine the default libpath from the value encoded in an empty executable.
2844 _LT_AC_SYS_LIBPATH_AIX
2845 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2846 # Warning - without using the other run time loading flags,
2847 # -berok will link without error, but may produce a broken library.
2848 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2849 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2850 # -bexpall does not export symbols beginning with underscore (_)
2851 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2852 # Exported symbols can be pulled into shared objects from archives
2853 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2854 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2855 # This is similar to how AIX traditionally builds it's shared libraries.
2856 _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'
2857 fi
2858 fi
2859 ;;
2860 chorus*)
2861 case $cc_basename in
2862 *)
2863 # FIXME: insert proper C++ library support
2864 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2865 ;;
2866 esac
2867 ;;
2868
2869
2870 cygwin* | mingw* | pw32*)
2871 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2872 # as there is no search path for DLLs.
2873 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2874 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2875 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2876 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2877
2878 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2879 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2880 # If the export-symbols file already is a .def file (1st line
2881 # is EXPORTS), use it as is; otherwise, prepend...
2882 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2883 cp $export_symbols $output_objdir/$soname.def;
2884 else
2885 echo EXPORTS > $output_objdir/$soname.def;
2886 cat $export_symbols >> $output_objdir/$soname.def;
2887 fi~
2888 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2889 else
2890 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2891 fi
2892 ;;
2893 darwin* | rhapsody*)
2894 case "$host_os" in
2895 rhapsody* | darwin1.[[012]])
2896 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2897 ;;
2898 *) # Darwin 1.3 on
2899 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2900 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2901 else
2902 case ${MACOSX_DEPLOYMENT_TARGET} in
2903 10.[[012]])
2904 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2905 ;;
2906 10.*)
2907 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
2908 ;;
2909 esac
2910 fi
2911 ;;
2912 esac
2913 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2914 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2915 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2916 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2917 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
2918 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2919
2920 if test "$GXX" = yes ; then
2921 lt_int_apple_cc_single_mod=no
2922 output_verbose_link_cmd='echo'
2923 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
2924 lt_int_apple_cc_single_mod=yes
2925 fi
2926 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2927 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2928 else
2929 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2930 fi
2931 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2932 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2933 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2934 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2935 else
2936 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2937 fi
2938 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2939 else
2940 case "$cc_basename" in
2941 xlc*)
2942 output_verbose_link_cmd='echo'
2943 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
2944 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2945 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2946 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2947 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2948 ;;
2949 *)
2950 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2951 ;;
2952 esac
2953 fi
2954 ;;
2955
2956 dgux*)
2957 case $cc_basename in
2958 ec++)
2959 # FIXME: insert proper C++ library support
2960 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2961 ;;
2962 ghcx)
2963 # Green Hills C++ Compiler
2964 # FIXME: insert proper C++ library support
2965 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2966 ;;
2967 *)
2968 # FIXME: insert proper C++ library support
2969 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2970 ;;
2971 esac
2972 ;;
2973 freebsd[12]*)
2974 # C++ shared libraries reported to be fairly broken before switch to ELF
2975 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2976 ;;
2977 freebsd-elf*)
2978 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2979 ;;
2980 freebsd* | kfreebsd*-gnu)
2981 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2982 # conventions
2983 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2984 ;;
2985 gnu*)
2986 ;;
2987 hpux9*)
2988 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2989 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2990 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2991 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2992 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2993 # but as the default
2994 # location of the library.
2995
2996 case $cc_basename in
2997 CC)
2998 # FIXME: insert proper C++ library support
2999 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3000 ;;
3001 aCC)
3002 _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'
3003 # Commands to make compiler produce verbose output that lists
3004 # what "hidden" libraries, object files and flags are used when
3005 # linking a shared library.
3006 #
3007 # There doesn't appear to be a way to prevent this compiler from
3008 # explicitly linking system object files so we need to strip them
3009 # from the output so that they don't get included in the library
3010 # dependencies.
3011 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3012 ;;
3013 *)
3014 if test "$GXX" = yes; then
3015 _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'
3016 else
3017 # FIXME: insert proper C++ library support
3018 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3019 fi
3020 ;;
3021 esac
3022 ;;
3023 hpux10*|hpux11*)
3024 if test $with_gnu_ld = no; then
3025 case "$host_cpu" in
3026 hppa*64*)
3027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3030 ;;
3031 ia64*)
3032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3033 ;;
3034 *)
3035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3036 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3037 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3038 ;;
3039 esac
3040 fi
3041 case "$host_cpu" in
3042 hppa*64*)
3043 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3044 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3045 ;;
3046 ia64*)
3047 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3048 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3049 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3050 # but as the default
3051 # location of the library.
3052 ;;
3053 *)
3054 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3055 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3056 # but as the default
3057 # location of the library.
3058 ;;
3059 esac
3060
3061 case $cc_basename in
3062 CC)
3063 # FIXME: insert proper C++ library support
3064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3065 ;;
3066 aCC)
3067 case "$host_cpu" in
3068 hppa*64*|ia64*)
3069 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3070 ;;
3071 *)
3072 _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'
3073 ;;
3074 esac
3075 # Commands to make compiler produce verbose output that lists
3076 # what "hidden" libraries, object files and flags are used when
3077 # linking a shared library.
3078 #
3079 # There doesn't appear to be a way to prevent this compiler from
3080 # explicitly linking system object files so we need to strip them
3081 # from the output so that they don't get included in the library
3082 # dependencies.
3083 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3084 ;;
3085 *)
3086 if test "$GXX" = yes; then
3087 if test $with_gnu_ld = no; then
3088 case "$host_cpu" in
3089 ia64*|hppa*64*)
3090 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3091 ;;
3092 *)
3093 _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'
3094 ;;
3095 esac
3096 fi
3097 else
3098 # FIXME: insert proper C++ library support
3099 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3100 fi
3101 ;;
3102 esac
3103 ;;
3104 irix5* | irix6*)
3105 case $cc_basename in
3106 CC)
3107 # SGI C++
3108 _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'
3109
3110 # Archives containing C++ object files must be created using
3111 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3112 # necessary to make sure instantiated templates are included
3113 # in the archive.
3114 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3115 ;;
3116 *)
3117 if test "$GXX" = yes; then
3118 if test "$with_gnu_ld" = no; then
3119 _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'
3120 else
3121 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3122 fi
3123 fi
3124 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3125 ;;
3126 esac
3127 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3128 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3129 ;;
3130 linux*)
3131 case $cc_basename in
3132 KCC)
3133 # Kuck and Associates, Inc. (KAI) C++ Compiler
3134
3135 # KCC will only create a shared library if the output file
3136 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3137 # to its proper name (with version) after linking.
3138 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3139 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3140 # Commands to make compiler produce verbose output that lists
3141 # what "hidden" libraries, object files and flags are used when
3142 # linking a shared library.
3143 #
3144 # There doesn't appear to be a way to prevent this compiler from
3145 # explicitly linking system object files so we need to strip them
3146 # from the output so that they don't get included in the library
3147 # dependencies.
3148 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3149
3150 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3151 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3152
3153 # Archives containing C++ object files must be created using
3154 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3155 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3156 ;;
3157 icpc)
3158 # Intel C++
3159 with_gnu_ld=yes
3160 # version 8.0 and above of icpc choke on multiply defined symbols
3161 # if we add $predep_objects and $postdep_objects, however 7.1 and
3162 # earlier do not add the objects themselves.
3163 case `$CC -V 2>&1` in
3164 *"Version 7."*)
3165 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3166 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3167 ;;
3168 *) # Version 8.0 or newer
3169 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3170 _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'
3171 ;;
3172 esac
3173 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3174 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3175 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3176 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3177 ;;
3178 cxx)
3179 # Compaq C++
3180 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3181 _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'
3182
3183 runpath_var=LD_RUN_PATH
3184 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3185 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3186
3187 # Commands to make compiler produce verbose output that lists
3188 # what "hidden" libraries, object files and flags are used when
3189 # linking a shared library.
3190 #
3191 # There doesn't appear to be a way to prevent this compiler from
3192 # explicitly linking system object files so we need to strip them
3193 # from the output so that they don't get included in the library
3194 # dependencies.
3195 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'
3196 ;;
3197 esac
3198 ;;
3199 lynxos*)
3200 # FIXME: insert proper C++ library support
3201 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3202 ;;
3203 m88k*)
3204 # FIXME: insert proper C++ library support
3205 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3206 ;;
3207 mvs*)
3208 case $cc_basename in
3209 cxx)
3210 # FIXME: insert proper C++ library support
3211 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3212 ;;
3213 *)
3214 # FIXME: insert proper C++ library support
3215 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3216 ;;
3217 esac
3218 ;;
3219 netbsd*)
3220 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3221 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3222 wlarc=
3223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3224 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3225 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3226 fi
3227 # Workaround some broken pre-1.5 toolchains
3228 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3229 ;;
3230 openbsd2*)
3231 # C++ shared libraries are fairly broken
3232 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3233 ;;
3234 openbsd*)
3235 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3236 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3237 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3238 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3239 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3240 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3241 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3242 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3243 fi
3244 output_verbose_link_cmd='echo'
3245 ;;
3246 osf3*)
3247 case $cc_basename in
3248 KCC)
3249 # Kuck and Associates, Inc. (KAI) C++ Compiler
3250
3251 # KCC will only create a shared library if the output file
3252 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3253 # to its proper name (with version) after linking.
3254 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3255
3256 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3257 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3258
3259 # Archives containing C++ object files must be created using
3260 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3261 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3262
3263 ;;
3264 RCC)
3265 # Rational C++ 2.4.1
3266 # FIXME: insert proper C++ library support
3267 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3268 ;;
3269 cxx)
3270 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3271 _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'
3272
3273 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3274 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3275
3276 # Commands to make compiler produce verbose output that lists
3277 # what "hidden" libraries, object files and flags are used when
3278 # linking a shared library.
3279 #
3280 # There doesn't appear to be a way to prevent this compiler from
3281 # explicitly linking system object files so we need to strip them
3282 # from the output so that they don't get included in the library
3283 # dependencies.
3284 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'
3285 ;;
3286 *)
3287 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3288 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3289 _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'
3290
3291 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3292 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3293
3294 # Commands to make compiler produce verbose output that lists
3295 # what "hidden" libraries, object files and flags are used when
3296 # linking a shared library.
3297 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3298
3299 else
3300 # FIXME: insert proper C++ library support
3301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3302 fi
3303 ;;
3304 esac
3305 ;;
3306 osf4* | osf5*)
3307 case $cc_basename in
3308 KCC)
3309 # Kuck and Associates, Inc. (KAI) C++ Compiler
3310
3311 # KCC will only create a shared library if the output file
3312 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3313 # to its proper name (with version) after linking.
3314 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3315
3316 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3317 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3318
3319 # Archives containing C++ object files must be created using
3320 # the KAI C++ compiler.
3321 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3322 ;;
3323 RCC)
3324 # Rational C++ 2.4.1
3325 # FIXME: insert proper C++ library support
3326 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3327 ;;
3328 cxx)
3329 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3330 _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'
3331 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3332 echo "-hidden">> $lib.exp~
3333 $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~
3334 $rm $lib.exp'
3335
3336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3337 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3338
3339 # Commands to make compiler produce verbose output that lists
3340 # what "hidden" libraries, object files and flags are used when
3341 # linking a shared library.
3342 #
3343 # There doesn't appear to be a way to prevent this compiler from
3344 # explicitly linking system object files so we need to strip them
3345 # from the output so that they don't get included in the library
3346 # dependencies.
3347 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'
3348 ;;
3349 *)
3350 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3351 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3352 _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'
3353
3354 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3355 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3356
3357 # Commands to make compiler produce verbose output that lists
3358 # what "hidden" libraries, object files and flags are used when
3359 # linking a shared library.
3360 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3361
3362 else
3363 # FIXME: insert proper C++ library support
3364 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3365 fi
3366 ;;
3367 esac
3368 ;;
3369 psos*)
3370 # FIXME: insert proper C++ library support
3371 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3372 ;;
3373 sco*)
3374 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3375 case $cc_basename in
3376 CC)
3377 # FIXME: insert proper C++ library support
3378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3379 ;;
3380 *)
3381 # FIXME: insert proper C++ library support
3382 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3383 ;;
3384 esac
3385 ;;
3386 sunos4*)
3387 case $cc_basename in
3388 CC)
3389 # Sun C++ 4.x
3390 # FIXME: insert proper C++ library support
3391 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3392 ;;
3393 lcc)
3394 # Lucid
3395 # FIXME: insert proper C++ library support
3396 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3397 ;;
3398 *)
3399 # FIXME: insert proper C++ library support
3400 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3401 ;;
3402 esac
3403 ;;
3404 solaris*)
3405 case $cc_basename in
3406 CC)
3407 # Sun C++ 4.2, 5.x and Centerline C++
3408 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3409 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3410 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3411 $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'
3412
3413 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3414 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415 case $host_os in
3416 solaris2.[0-5] | solaris2.[0-5].*) ;;
3417 *)
3418 # The C++ compiler is used as linker so we must use $wl
3419 # flag to pass the commands to the underlying system
3420 # linker.
3421 # Supported since Solaris 2.6 (maybe 2.5.1?)
3422 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3423 ;;
3424 esac
3425 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3426
3427 # Commands to make compiler produce verbose output that lists
3428 # what "hidden" libraries, object files and flags are used when
3429 # linking a shared library.
3430 #
3431 # There doesn't appear to be a way to prevent this compiler from
3432 # explicitly linking system object files so we need to strip them
3433 # from the output so that they don't get included in the library
3434 # dependencies.
3435 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3436
3437 # Archives containing C++ object files must be created using
3438 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3439 # necessary to make sure instantiated templates are included
3440 # in the archive.
3441 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3442 ;;
3443 gcx)
3444 # Green Hills C++ Compiler
3445 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3446
3447 # The C++ compiler must be used to create the archive.
3448 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3449 ;;
3450 *)
3451 # GNU C++ compiler with Solaris linker
3452 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3453 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3454 if $CC --version | grep -v '^2\.7' > /dev/null; then
3455 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3456 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3457 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3458
3459 # Commands to make compiler produce verbose output that lists
3460 # what "hidden" libraries, object files and flags are used when
3461 # linking a shared library.
3462 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3463 else
3464 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3465 # platform.
3466 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3467 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3468 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3469
3470 # Commands to make compiler produce verbose output that lists
3471 # what "hidden" libraries, object files and flags are used when
3472 # linking a shared library.
3473 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3474 fi
3475
3476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3477 fi
3478 ;;
3479 esac
3480 ;;
3481 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3482 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3483 ;;
3484 tandem*)
3485 case $cc_basename in
3486 NCC)
3487 # NonStop-UX NCC 3.20
3488 # FIXME: insert proper C++ library support
3489 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3490 ;;
3491 *)
3492 # FIXME: insert proper C++ library support
3493 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3494 ;;
3495 esac
3496 ;;
3497 vxworks*)
3498 # FIXME: insert proper C++ library support
3499 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3500 ;;
3501 *)
3502 # FIXME: insert proper C++ library support
3503 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3504 ;;
3505esac
3506AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3507test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3508
3509_LT_AC_TAGVAR(GCC, $1)="$GXX"
3510_LT_AC_TAGVAR(LD, $1)="$LD"
3511
3512## CAVEAT EMPTOR:
3513## There is no encapsulation within the following macros, do not change
3514## the running order or otherwise move them around unless you know exactly
3515## what you are doing...
3516AC_LIBTOOL_POSTDEP_PREDEP($1)
3517AC_LIBTOOL_PROG_COMPILER_PIC($1)
3518AC_LIBTOOL_PROG_CC_C_O($1)
3519AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3520AC_LIBTOOL_PROG_LD_SHLIBS($1)
3521AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3522AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3523AC_LIBTOOL_SYS_LIB_STRIP
3524AC_LIBTOOL_DLOPEN_SELF($1)
3525
3526AC_LIBTOOL_CONFIG($1)
3527
3528AC_LANG_POP
3529CC=$lt_save_CC
3530LDCXX=$LD
3531LD=$lt_save_LD
3532GCC=$lt_save_GCC
3533with_gnu_ldcxx=$with_gnu_ld
3534with_gnu_ld=$lt_save_with_gnu_ld
3535lt_cv_path_LDCXX=$lt_cv_path_LD
3536lt_cv_path_LD=$lt_save_path_LD
3537lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3538lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3539])# AC_LIBTOOL_LANG_CXX_CONFIG
3540
3541# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3542# ------------------------
3543# Figure out "hidden" library dependencies from verbose
3544# compiler output when linking a shared library.
3545# Parse the compiler output and extract the necessary
3546# objects, libraries and library flags.
3547AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3548dnl we can't use the lt_simple_compile_test_code here,
3549dnl because it contains code intended for an executable,
3550dnl not a library. It's possible we should let each
3551dnl tag define a new lt_????_link_test_code variable,
3552dnl but it's only used here...
3553ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3554int a;
3555void foo (void) { a = 0; }
3556EOF
3557],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3558class Foo
3559{
3560public:
3561 Foo (void) { a = 0; }
3562private:
3563 int a;
3564};
3565EOF
3566],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3567 subroutine foo
3568 implicit none
3569 integer*4 a
3570 a=0
3571 return
3572 end
3573EOF
3574],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3575public class foo {
3576 private int a;
3577 public void bar (void) {
3578 a = 0;
3579 }
3580};
3581EOF
3582])
3583dnl Parse the compiler output and extract the necessary
3584dnl objects, libraries and library flags.
3585if AC_TRY_EVAL(ac_compile); then
3586 # Parse the compiler output and extract the necessary
3587 # objects, libraries and library flags.
3588
3589 # Sentinel used to keep track of whether or not we are before
3590 # the conftest object file.
3591 pre_test_object_deps_done=no
3592
3593 # The `*' in the case matches for architectures that use `case' in
3594 # $output_verbose_cmd can trigger glob expansion during the loop
3595 # eval without this substitution.
3596 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3597
3598 for p in `eval $output_verbose_link_cmd`; do
3599 case $p in
3600
3601 -L* | -R* | -l*)
3602 # Some compilers place space between "-{L,R}" and the path.
3603 # Remove the space.
3604 if test $p = "-L" \
3605 || test $p = "-R"; then
3606 prev=$p
3607 continue
3608 else
3609 prev=
3610 fi
3611
3612 if test "$pre_test_object_deps_done" = no; then
3613 case $p in
3614 -L* | -R*)
3615 # Internal compiler library paths should come after those
3616 # provided the user. The postdeps already come after the
3617 # user supplied libs so there is no need to process them.
3618 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3619 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3620 else
3621 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3622 fi
3623 ;;
3624 # The "-l" case would never come before the object being
3625 # linked, so don't bother handling this case.
3626 esac
3627 else
3628 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3629 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3630 else
3631 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3632 fi
3633 fi
3634 ;;
3635
3636 *.$objext)
3637 # This assumes that the test object file only shows up
3638 # once in the compiler output.
3639 if test "$p" = "conftest.$objext"; then
3640 pre_test_object_deps_done=yes
3641 continue
3642 fi
3643
3644 if test "$pre_test_object_deps_done" = no; then
3645 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3646 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3647 else
3648 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3649 fi
3650 else
3651 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3652 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3653 else
3654 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3655 fi
3656 fi
3657 ;;
3658
3659 *) ;; # Ignore the rest.
3660
3661 esac
3662 done
3663
3664 # Clean up.
3665 rm -f a.out a.exe
3666else
3667 echo "libtool.m4: error: problem compiling $1 test program"
3668fi
3669
3670$rm -f confest.$objext
3671
3672case " $_LT_AC_TAGVAR(postdeps, $1) " in
3673*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3674esac
3675])# AC_LIBTOOL_POSTDEP_PREDEP
3676
3677# AC_LIBTOOL_LANG_F77_CONFIG
3678# ------------------------
3679# Ensure that the configuration vars for the C compiler are
3680# suitably defined. Those variables are subsequently used by
3681# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3682AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3683AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3684[AC_REQUIRE([AC_PROG_F77])
3685AC_LANG_PUSH(Fortran 77)
3686
3687_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3688_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3689_LT_AC_TAGVAR(always_export_symbols, $1)=no
3690_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3691_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3692_LT_AC_TAGVAR(hardcode_direct, $1)=no
3693_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3694_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3695_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3696_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3697_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3698_LT_AC_TAGVAR(module_cmds, $1)=
3699_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3700_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3701_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3702_LT_AC_TAGVAR(no_undefined_flag, $1)=
3703_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3704_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3705
3706# Source file extension for f77 test sources.
3707ac_ext=f
3708
3709# Object file extension for compiled f77 test sources.
3710objext=o
3711_LT_AC_TAGVAR(objext, $1)=$objext
3712
3713# Code to be used in simple compile tests
3714lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3715
3716# Code to be used in simple link tests
3717lt_simple_link_test_code=" program t\n end\n"
3718
3719# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3720_LT_AC_SYS_COMPILER
3721
3722# Allow CC to be a program name with arguments.
3723lt_save_CC="$CC"
3724CC=${F77-"f77"}
3725compiler=$CC
3726_LT_AC_TAGVAR(compiler, $1)=$CC
3727cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3728
3729AC_MSG_CHECKING([if libtool supports shared libraries])
3730AC_MSG_RESULT([$can_build_shared])
3731
3732AC_MSG_CHECKING([whether to build shared libraries])
3733test "$can_build_shared" = "no" && enable_shared=no
3734
3735# On AIX, shared libraries and static libraries use the same namespace, and
3736# are all built from PIC.
3737case "$host_os" in
3738aix3*)
3739 test "$enable_shared" = yes && enable_static=no
3740 if test -n "$RANLIB"; then
3741 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3742 postinstall_cmds='$RANLIB $lib'
3743 fi
3744 ;;
3745aix4* | aix5*)
3746 test "$enable_shared" = yes && enable_static=no
3747 ;;
3748esac
3749AC_MSG_RESULT([$enable_shared])
3750
3751AC_MSG_CHECKING([whether to build static libraries])
3752# Make sure either enable_shared or enable_static is yes.
3753test "$enable_shared" = yes || enable_static=yes
3754AC_MSG_RESULT([$enable_static])
3755
3756test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3757
3758_LT_AC_TAGVAR(GCC, $1)="$G77"
3759_LT_AC_TAGVAR(LD, $1)="$LD"
3760
3761AC_LIBTOOL_PROG_COMPILER_PIC($1)
3762AC_LIBTOOL_PROG_CC_C_O($1)
3763AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3764AC_LIBTOOL_PROG_LD_SHLIBS($1)
3765AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3766AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3767AC_LIBTOOL_SYS_LIB_STRIP
3768
3769
3770AC_LIBTOOL_CONFIG($1)
3771
3772AC_LANG_POP
3773CC="$lt_save_CC"
3774])# AC_LIBTOOL_LANG_F77_CONFIG
3775
3776
3777# AC_LIBTOOL_LANG_GCJ_CONFIG
3778# --------------------------
3779# Ensure that the configuration vars for the C compiler are
3780# suitably defined. Those variables are subsequently used by
3781# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3782AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3783AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3784[AC_LANG_SAVE
3785
3786# Source file extension for Java test sources.
3787ac_ext=java
3788
3789# Object file extension for compiled Java test sources.
3790objext=o
3791_LT_AC_TAGVAR(objext, $1)=$objext
3792
3793# Code to be used in simple compile tests
3794lt_simple_compile_test_code="class foo {}\n"
3795
3796# Code to be used in simple link tests
3797lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3798
3799# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3800_LT_AC_SYS_COMPILER
3801
3802# Allow CC to be a program name with arguments.
3803lt_save_CC="$CC"
3804CC=${GCJ-"gcj"}
3805compiler=$CC
3806_LT_AC_TAGVAR(compiler, $1)=$CC
3807
3808# GCJ did not exist at the time GCC didn't implicitly link libc in.
3809_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3810
3811## CAVEAT EMPTOR:
3812## There is no encapsulation within the following macros, do not change
3813## the running order or otherwise move them around unless you know exactly
3814## what you are doing...
3815AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3816AC_LIBTOOL_PROG_COMPILER_PIC($1)
3817AC_LIBTOOL_PROG_CC_C_O($1)
3818AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3819AC_LIBTOOL_PROG_LD_SHLIBS($1)
3820AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3821AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3822AC_LIBTOOL_SYS_LIB_STRIP
3823AC_LIBTOOL_DLOPEN_SELF($1)
3824
3825AC_LIBTOOL_CONFIG($1)
3826
3827AC_LANG_RESTORE
3828CC="$lt_save_CC"
3829])# AC_LIBTOOL_LANG_GCJ_CONFIG
3830
3831
3832# AC_LIBTOOL_LANG_RC_CONFIG
3833# --------------------------
3834# Ensure that the configuration vars for the Windows resource compiler are
3835# suitably defined. Those variables are subsequently used by
3836# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3837AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3838AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3839[AC_LANG_SAVE
3840
3841# Source file extension for RC test sources.
3842ac_ext=rc
3843
3844# Object file extension for compiled RC test sources.
3845objext=o
3846_LT_AC_TAGVAR(objext, $1)=$objext
3847
3848# Code to be used in simple compile tests
3849lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3850
3851# Code to be used in simple link tests
3852lt_simple_link_test_code="$lt_simple_compile_test_code"
3853
3854# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3855_LT_AC_SYS_COMPILER
3856
3857# Allow CC to be a program name with arguments.
3858lt_save_CC="$CC"
3859CC=${RC-"windres"}
3860compiler=$CC
3861_LT_AC_TAGVAR(compiler, $1)=$CC
3862_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3863
3864AC_LIBTOOL_CONFIG($1)
3865
3866AC_LANG_RESTORE
3867CC="$lt_save_CC"
3868])# AC_LIBTOOL_LANG_RC_CONFIG
3869
3870
3871# AC_LIBTOOL_CONFIG([TAGNAME])
3872# ----------------------------
3873# If TAGNAME is not passed, then create an initial libtool script
3874# with a default configuration from the untagged config vars. Otherwise
3875# add code to config.status for appending the configuration named by
3876# TAGNAME from the matching tagged config vars.
3877AC_DEFUN([AC_LIBTOOL_CONFIG],
3878[# The else clause should only fire when bootstrapping the
3879# libtool distribution, otherwise you forgot to ship ltmain.sh
3880# with your package, and you will get complaints that there are
3881# no rules to generate ltmain.sh.
3882if test -f "$ltmain"; then
3883 # See if we are running on zsh, and set the options which allow our commands through
3884 # without removal of \ escapes.
3885 if test -n "${ZSH_VERSION+set}" ; then
3886 setopt NO_GLOB_SUBST
3887 fi
3888 # Now quote all the things that may contain metacharacters while being
3889 # careful not to overquote the AC_SUBSTed values. We take copies of the
3890 # variables and quote the copies for generation of the libtool script.
3891 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
3892 SED SHELL STRIP \
3893 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3894 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3895 deplibs_check_method reload_flag reload_cmds need_locks \
3896 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3897 lt_cv_sys_global_symbol_to_c_name_address \
3898 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3899 old_postinstall_cmds old_postuninstall_cmds \
3900 _LT_AC_TAGVAR(compiler, $1) \
3901 _LT_AC_TAGVAR(CC, $1) \
3902 _LT_AC_TAGVAR(LD, $1) \
3903 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3904 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3905 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3906 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3907 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3908 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3909 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3910 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
3911 _LT_AC_TAGVAR(old_archive_cmds, $1) \
3912 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3913 _LT_AC_TAGVAR(predep_objects, $1) \
3914 _LT_AC_TAGVAR(postdep_objects, $1) \
3915 _LT_AC_TAGVAR(predeps, $1) \
3916 _LT_AC_TAGVAR(postdeps, $1) \
3917 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3918 _LT_AC_TAGVAR(archive_cmds, $1) \
3919 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3920 _LT_AC_TAGVAR(postinstall_cmds, $1) \
3921 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
3922 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3923 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
3924 _LT_AC_TAGVAR(no_undefined_flag, $1) \
3925 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3927 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
3928 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3929 _LT_AC_TAGVAR(hardcode_automatic, $1) \
3930 _LT_AC_TAGVAR(module_cmds, $1) \
3931 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
3932 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3933 _LT_AC_TAGVAR(exclude_expsyms, $1) \
3934 _LT_AC_TAGVAR(include_expsyms, $1); do
3935
3936 case $var in
3937 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
3938 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3939 _LT_AC_TAGVAR(archive_cmds, $1) | \
3940 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3941 _LT_AC_TAGVAR(module_cmds, $1) | \
3942 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
3943 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3944 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3945 extract_expsyms_cmds | reload_cmds | finish_cmds | \
3946 postinstall_cmds | postuninstall_cmds | \
3947 old_postinstall_cmds | old_postuninstall_cmds | \
3948 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3949 # Double-quote double-evaled strings.
3950 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3951 ;;
3952 *)
3953 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3954 ;;
3955 esac
3956 done
3957
3958 case $lt_echo in
3959 *'\[$]0 --fallback-echo"')
3960 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3961 ;;
3962 esac
3963
3964ifelse([$1], [],
3965 [cfgfile="${ofile}T"
3966 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3967 $rm -f "$cfgfile"
3968 AC_MSG_NOTICE([creating $ofile])],
3969 [cfgfile="$ofile"])
3970
3971 cat <<__EOF__ >> "$cfgfile"
3972ifelse([$1], [],
3973[#! $SHELL
3974
3975# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3976# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3977# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3978#
3979# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3980# Free Software Foundation, Inc.
3981#
3982# This file is part of GNU Libtool:
3983# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3984#
3985# This program is free software; you can redistribute it and/or modify
3986# it under the terms of the GNU General Public License as published by
3987# the Free Software Foundation; either version 2 of the License, or
3988# (at your option) any later version.
3989#
3990# This program is distributed in the hope that it will be useful, but
3991# WITHOUT ANY WARRANTY; without even the implied warranty of
3992# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3993# General Public License for more details.
3994#
3995# You should have received a copy of the GNU General Public License
3996# along with this program; if not, write to the Free Software
3997# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3998#
3999# As a special exception to the GNU General Public License, if you
4000# distribute this file as part of a program that contains a
4001# configuration script generated by Autoconf, you may include it under
4002# the same distribution terms that you use for the rest of that program.
4003
4004# A sed program that does not truncate output.
4005SED=$lt_SED
4006
4007# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4008Xsed="$SED -e s/^X//"
4009
4010# The HP-UX ksh and POSIX shell print the target directory to stdout
4011# if CDPATH is set.
4012(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4013
4014# The names of the tagged configurations supported by this script.
4015available_tags=
4016
4017# ### BEGIN LIBTOOL CONFIG],
4018[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4019
4020# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4021
4022# Shell to use when invoking shell scripts.
4023SHELL=$lt_SHELL
4024
4025# Whether or not to build shared libraries.
4026build_libtool_libs=$enable_shared
4027
4028# Whether or not to build static libraries.
4029build_old_libs=$enable_static
4030
4031# Whether or not to add -lc for building shared libraries.
4032build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4033
4034# Whether or not to disallow shared libs when runtime libs are static
4035allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4036
4037# Whether or not to optimize for fast installation.
4038fast_install=$enable_fast_install
4039
4040# The host system.
4041host_alias=$host_alias
4042host=$host
4043
4044# An echo program that does not interpret backslashes.
4045echo=$lt_echo
4046
4047# The archiver.
4048AR=$lt_AR
4049AR_FLAGS=$lt_AR_FLAGS
4050
4051# A C compiler.
4052LTCC=$lt_LTCC
4053
4054# A language-specific compiler.
4055CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4056
4057# Is the compiler the GNU C compiler?
4058with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4059
4060# An ERE matcher.
4061EGREP=$lt_EGREP
4062
4063# The linker used to build libraries.
4064LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4065
4066# Whether we need hard or soft links.
4067LN_S=$lt_LN_S
4068
4069# A BSD-compatible nm program.
4070NM=$lt_NM
4071
4072# A symbol stripping program
4073STRIP=$lt_STRIP
4074
4075# Used to examine libraries when file_magic_cmd begins "file"
4076MAGIC_CMD=$MAGIC_CMD
4077
4078# Used on cygwin: DLL creation program.
4079DLLTOOL="$DLLTOOL"
4080
4081# Used on cygwin: object dumper.
4082OBJDUMP="$OBJDUMP"
4083
4084# Used on cygwin: assembler.
4085AS="$AS"
4086
4087# The name of the directory that contains temporary libtool files.
4088objdir=$objdir
4089
4090# How to create reloadable object files.
4091reload_flag=$lt_reload_flag
4092reload_cmds=$lt_reload_cmds
4093
4094# How to pass a linker flag through the compiler.
4095wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4096
4097# Object file suffix (normally "o").
4098objext="$ac_objext"
4099
4100# Old archive suffix (normally "a").
4101libext="$libext"
4102
4103# Shared library suffix (normally ".so").
4104shrext_cmds='$shrext_cmds'
4105
4106# Executable file suffix (normally "").
4107exeext="$exeext"
4108
4109# Additional compiler flags for building library objects.
4110pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4111pic_mode=$pic_mode
4112
4113# What is the maximum length of a command?
4114max_cmd_len=$lt_cv_sys_max_cmd_len
4115
4116# Does compiler simultaneously support -c and -o options?
4117compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4118
4119# Must we lock files when doing compilation ?
4120need_locks=$lt_need_locks
4121
4122# Do we need the lib prefix for modules?
4123need_lib_prefix=$need_lib_prefix
4124
4125# Do we need a version for libraries?
4126need_version=$need_version
4127
4128# Whether dlopen is supported.
4129dlopen_support=$enable_dlopen
4130
4131# Whether dlopen of programs is supported.
4132dlopen_self=$enable_dlopen_self
4133
4134# Whether dlopen of statically linked programs is supported.
4135dlopen_self_static=$enable_dlopen_self_static
4136
4137# Compiler flag to prevent dynamic linking.
4138link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4139
4140# Compiler flag to turn off builtin functions.
4141no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4142
4143# Compiler flag to allow reflexive dlopens.
4144export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4145
4146# Compiler flag to generate shared objects directly from archives.
4147whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4148
4149# Compiler flag to generate thread-safe objects.
4150thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4151
4152# Library versioning type.
4153version_type=$version_type
4154
4155# Format of library name prefix.
4156libname_spec=$lt_libname_spec
4157
4158# List of archive names. First name is the real one, the rest are links.
4159# The last name is the one that the linker finds with -lNAME.
4160library_names_spec=$lt_library_names_spec
4161
4162# The coded name of the library, if different from the real name.
4163soname_spec=$lt_soname_spec
4164
4165# Commands used to build and install an old-style archive.
4166RANLIB=$lt_RANLIB
4167old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4168old_postinstall_cmds=$lt_old_postinstall_cmds
4169old_postuninstall_cmds=$lt_old_postuninstall_cmds
4170
4171# Create an old-style archive from a shared archive.
4172old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4173
4174# Create a temporary old-style archive to link instead of a shared archive.
4175old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4176
4177# Commands used to build and install a shared archive.
4178archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4179archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4180postinstall_cmds=$lt_postinstall_cmds
4181postuninstall_cmds=$lt_postuninstall_cmds
4182
4183# Commands used to build a loadable module (assumed same as above if empty)
4184module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4185module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4186
4187# Commands to strip libraries.
4188old_striplib=$lt_old_striplib
4189striplib=$lt_striplib
4190
4191# Dependencies to place before the objects being linked to create a
4192# shared library.
4193predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4194
4195# Dependencies to place after the objects being linked to create a
4196# shared library.
4197postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4198
4199# Dependencies to place before the objects being linked to create a
4200# shared library.
4201predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4202
4203# Dependencies to place after the objects being linked to create a
4204# shared library.
4205postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4206
4207# The library search path used internally by the compiler when linking
4208# a shared library.
4209compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4210
4211# Method to check whether dependent libraries are shared objects.
4212deplibs_check_method=$lt_deplibs_check_method
4213
4214# Command to use when deplibs_check_method == file_magic.
4215file_magic_cmd=$lt_file_magic_cmd
4216
4217# Flag that allows shared libraries with undefined symbols to be built.
4218allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4219
4220# Flag that forces no undefined symbols.
4221no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4222
4223# Commands used to finish a libtool library installation in a directory.
4224finish_cmds=$lt_finish_cmds
4225
4226# Same as above, but a single script fragment to be evaled but not shown.
4227finish_eval=$lt_finish_eval
4228
4229# Take the output of nm and produce a listing of raw symbols and C names.
4230global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4231
4232# Transform the output of nm in a proper C declaration
4233global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4234
4235# Transform the output of nm in a C name address pair
4236global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4237
4238# This is the shared library runtime path variable.
4239runpath_var=$runpath_var
4240
4241# This is the shared library path variable.
4242shlibpath_var=$shlibpath_var
4243
4244# Is shlibpath searched before the hard-coded library search path?
4245shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4246
4247# How to hardcode a shared library path into an executable.
4248hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4249
4250# Whether we should hardcode library paths into libraries.
4251hardcode_into_libs=$hardcode_into_libs
4252
4253# Flag to hardcode \$libdir into a binary during linking.
4254# This must work even if \$libdir does not exist.
4255hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4256
4257# If ld is used when linking, flag to hardcode \$libdir into
4258# a binary during linking. This must work even if \$libdir does
4259# not exist.
4260hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4261
4262# Whether we need a single -rpath flag with a separated argument.
4263hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4264
4265# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4266# resulting binary.
4267hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4268
4269# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4270# resulting binary.
4271hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4272
4273# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4274# the resulting binary.
4275hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4276
4277# Set to yes if building a shared library automatically hardcodes DIR into the library
4278# and all subsequent libraries and executables linked against it.
4279hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4280
4281# Variables whose values should be saved in libtool wrapper scripts and
4282# restored at relink time.
4283variables_saved_for_relink="$variables_saved_for_relink"
4284
4285# Whether libtool must link a program against all its dependency libraries.
4286link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4287
4288# Compile-time system search path for libraries
4289sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4290
4291# Run-time system search path for libraries
4292sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4293
4294# Fix the shell variable \$srcfile for the compiler.
4295fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4296
4297# Set to yes if exported symbols are required.
4298always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4299
4300# The commands to list exported symbols.
4301export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4302
4303# The commands to extract the exported symbol list from a shared archive.
4304extract_expsyms_cmds=$lt_extract_expsyms_cmds
4305
4306# Symbols that should not be listed in the preloaded symbols.
4307exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4308
4309# Symbols that must always be exported.
4310include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4311
4312ifelse([$1],[],
4313[# ### END LIBTOOL CONFIG],
4314[# ### END LIBTOOL TAG CONFIG: $tagname])
4315
4316__EOF__
4317
4318ifelse([$1],[], [
4319 case $host_os in
4320 aix3*)
4321 cat <<\EOF >> "$cfgfile"
4322
4323# AIX sometimes has problems with the GCC collect2 program. For some
4324# reason, if we set the COLLECT_NAMES environment variable, the problems
4325# vanish in a puff of smoke.
4326if test "X${COLLECT_NAMES+set}" != Xset; then
4327 COLLECT_NAMES=
4328 export COLLECT_NAMES
4329fi
4330EOF
4331 ;;
4332 esac
4333
4334 # We use sed instead of cat because bash on DJGPP gets confused if
4335 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4336 # text mode, it properly converts lines to CR/LF. This bash problem
4337 # is reportedly fixed, but why not run on old versions too?
4338 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4339
4340 mv -f "$cfgfile" "$ofile" || \
4341 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4342 chmod +x "$ofile"
4343])
4344else
4345 # If there is no Makefile yet, we rely on a make rule to execute
4346 # `config.status --recheck' to rerun these tests and create the
4347 # libtool script then.
4348 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4349 if test -f "$ltmain_in"; then
4350 test -f Makefile && make "$ltmain"
4351 fi
4352fi
4353])# AC_LIBTOOL_CONFIG
4354
4355
4356# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4357# -------------------------------------------
4358AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4359[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4360
4361_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4362
4363if test "$GCC" = yes; then
4364 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4365
4366 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4367 lt_cv_prog_compiler_rtti_exceptions,
4368 [-fno-rtti -fno-exceptions], [],
4369 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4370fi
4371])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4372
4373
4374# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4375# ---------------------------------
4376AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4377[AC_REQUIRE([AC_CANONICAL_HOST])
4378AC_REQUIRE([AC_PROG_NM])
4379AC_REQUIRE([AC_OBJEXT])
4380# Check for command to grab the raw symbol name followed by C symbol from nm.
4381AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4382AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4383[
4384# These are sane defaults that work on at least a few old systems.
4385# [They come from Ultrix. What could be older than Ultrix?!! ;)]
4386
4387# Character class describing NM global symbol codes.
4388symcode='[[BCDEGRST]]'
4389
4390# Regexp to match symbols that can be accessed directly from C.
4391sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4392
4393# Transform the above into a raw symbol and a C symbol.
4394symxfrm='\1 \2\3 \3'
4395
4396# Transform an extracted symbol line into a proper C declaration
4397lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4398
4399# Transform an extracted symbol line into symbol name and symbol address
4400lt_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'"
4401
4402# Define system-specific variables.
4403case $host_os in
4404aix*)
4405 symcode='[[BCDT]]'
4406 ;;
4407cygwin* | mingw* | pw32*)
4408 symcode='[[ABCDGISTW]]'
4409 ;;
4410hpux*) # Its linker distinguishes data from code symbols
4411 if test "$host_cpu" = ia64; then
4412 symcode='[[ABCDEGRST]]'
4413 fi
4414 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4415 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'"
4416 ;;
4417linux*)
4418 if test "$host_cpu" = ia64; then
4419 symcode='[[ABCDGIRSTW]]'
4420 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4421 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'"
4422 fi
4423 ;;
4424irix* | nonstopux*)
4425 symcode='[[BCDEGRST]]'
4426 ;;
4427osf*)
4428 symcode='[[BCDEGQRST]]'
4429 ;;
4430solaris* | sysv5*)
4431 symcode='[[BDRT]]'
4432 ;;
4433sysv4)
4434 symcode='[[DFNSTU]]'
4435 ;;
4436esac
4437
4438# Handle CRLF in mingw tool chain
4439opt_cr=
4440case $build_os in
4441mingw*)
4442 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4443 ;;
4444esac
4445
4446# If we're using GNU nm, then use its standard symbol codes.
4447case `$NM -V 2>&1` in
4448*GNU* | *'with BFD'*)
4449 symcode='[[ABCDGIRSTW]]' ;;
4450esac
4451
4452# Try without a prefix undercore, then with it.
4453for ac_symprfx in "" "_"; do
4454
4455 # Write the raw and C identifiers.
4456 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4457
4458 # Check to see that the pipe works correctly.
4459 pipe_works=no
4460
4461 rm -f conftest*
4462 cat > conftest.$ac_ext <<EOF
4463#ifdef __cplusplus
4464extern "C" {
4465#endif
4466char nm_test_var;
4467void nm_test_func(){}
4468#ifdef __cplusplus
4469}
4470#endif
4471int main(){nm_test_var='a';nm_test_func();return(0);}
4472EOF
4473
4474 if AC_TRY_EVAL(ac_compile); then
4475 # Now try to grab the symbols.
4476 nlist=conftest.nm
4477 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4478 # Try sorting and uniquifying the output.
4479 if sort "$nlist" | uniq > "$nlist"T; then
4480 mv -f "$nlist"T "$nlist"
4481 else
4482 rm -f "$nlist"T
4483 fi
4484
4485 # Make sure that we snagged all the symbols we need.
4486 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4487 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4488 cat <<EOF > conftest.$ac_ext
4489#ifdef __cplusplus
4490extern "C" {
4491#endif
4492
4493EOF
4494 # Now generate the symbol file.
4495 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4496
4497 cat <<EOF >> conftest.$ac_ext
4498#if defined (__STDC__) && __STDC__
4499# define lt_ptr_t void *
4500#else
4501# define lt_ptr_t char *
4502# define const
4503#endif
4504
4505/* The mapping between symbol names and symbols. */
4506const struct {
4507 const char *name;
4508 lt_ptr_t address;
4509}
4510lt_preloaded_symbols[[]] =
4511{
4512EOF
4513 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4514 cat <<\EOF >> conftest.$ac_ext
4515 {0, (lt_ptr_t) 0}
4516};
4517
4518#ifdef __cplusplus
4519}
4520#endif
4521EOF
4522 # Now try linking the two files.
4523 mv conftest.$ac_objext conftstm.$ac_objext
4524 lt_save_LIBS="$LIBS"
4525 lt_save_CFLAGS="$CFLAGS"
4526 LIBS="conftstm.$ac_objext"
4527 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4528 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4529 pipe_works=yes
4530 fi
4531 LIBS="$lt_save_LIBS"
4532 CFLAGS="$lt_save_CFLAGS"
4533 else
4534 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4535 fi
4536 else
4537 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4538 fi
4539 else
4540 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4541 fi
4542 else
4543 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4544 cat conftest.$ac_ext >&5
4545 fi
4546 rm -f conftest* conftst*
4547
4548 # Do not use the global_symbol_pipe unless it works.
4549 if test "$pipe_works" = yes; then
4550 break
4551 else
4552 lt_cv_sys_global_symbol_pipe=
4553 fi
4554done
4555])
4556if test -z "$lt_cv_sys_global_symbol_pipe"; then
4557 lt_cv_sys_global_symbol_to_cdecl=
4558fi
4559if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4560 AC_MSG_RESULT(failed)
4561else
4562 AC_MSG_RESULT(ok)
4563fi
4564]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4565
4566
4567# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4568# ---------------------------------------
4569AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4570[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4571_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4572_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4573
4574AC_MSG_CHECKING([for $compiler option to produce PIC])
4575 ifelse([$1],[CXX],[
4576 # C++ specific cases for pic, static, wl, etc.
4577 if test "$GXX" = yes; then
4578 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4579 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4580
4581 case $host_os in
4582 aix*)
4583 # All AIX code is PIC.
4584 if test "$host_cpu" = ia64; then
4585 # AIX 5 now supports IA64 processor
4586 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4587 fi
4588 ;;
4589 amigaos*)
4590 # FIXME: we need at least 68020 code to build shared libraries, but
4591 # adding the `-m68020' flag to GCC prevents building anything better,
4592 # like `-m68040'.
4593 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4594 ;;
4595 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4596 # PIC is the default for these OSes.
4597 ;;
4598 mingw* | os2* | pw32*)
4599 # This hack is so that the source file can tell whether it is being
4600 # built for inclusion in a dll (and should export symbols for example).
4601 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4602 ;;
4603 darwin* | rhapsody*)
4604 # PIC is the default on this platform
4605 # Common symbols not allowed in MH_DYLIB files
4606 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4607 ;;
4608 *djgpp*)
4609 # DJGPP does not support shared libraries at all
4610 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4611 ;;
4612 sysv4*MP*)
4613 if test -d /usr/nec; then
4614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4615 fi
4616 ;;
4617 hpux*)
4618 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4619 # not for PA HP-UX.
4620 case "$host_cpu" in
4621 hppa*64*|ia64*)
4622 ;;
4623 *)
4624 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4625 ;;
4626 esac
4627 ;;
4628 *)
4629 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4630 ;;
4631 esac
4632 else
4633 case $host_os in
4634 aix4* | aix5*)
4635 # All AIX code is PIC.
4636 if test "$host_cpu" = ia64; then
4637 # AIX 5 now supports IA64 processor
4638 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4639 else
4640 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4641 fi
4642 ;;
4643 chorus*)
4644 case $cc_basename in
4645 cxch68)
4646 # Green Hills C++ Compiler
4647 # _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"
4648 ;;
4649 esac
4650 ;;
4651 darwin*)
4652 # PIC is the default on this platform
4653 # Common symbols not allowed in MH_DYLIB files
4654 case "$cc_basename" in
4655 xlc*)
4656 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4657 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4658 ;;
4659 esac
4660 ;;
4661 dgux*)
4662 case $cc_basename in
4663 ec++)
4664 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4665 ;;
4666 ghcx)
4667 # Green Hills C++ Compiler
4668 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4669 ;;
4670 *)
4671 ;;
4672 esac
4673 ;;
4674 freebsd* | kfreebsd*-gnu)
4675 # FreeBSD uses GNU C++
4676 ;;
4677 hpux9* | hpux10* | hpux11*)
4678 case $cc_basename in
4679 CC)
4680 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4681 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4682 if test "$host_cpu" != ia64; then
4683 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4684 fi
4685 ;;
4686 aCC)
4687 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4688 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4689 case "$host_cpu" in
4690 hppa*64*|ia64*)
4691 # +Z the default
4692 ;;
4693 *)
4694 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4695 ;;
4696 esac
4697 ;;
4698 *)
4699 ;;
4700 esac
4701 ;;
4702 irix5* | irix6* | nonstopux*)
4703 case $cc_basename in
4704 CC)
4705 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4706 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4707 # CC pic flag -KPIC is the default.
4708 ;;
4709 *)
4710 ;;
4711 esac
4712 ;;
4713 linux*)
4714 case $cc_basename in
4715 KCC)
4716 # KAI C++ Compiler
4717 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4718 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4719 ;;
4720 icpc)
4721 # Intel C++
4722 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4723 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4724 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4725 ;;
4726 cxx)
4727 # Compaq C++
4728 # Make sure the PIC flag is empty. It appears that all Alpha
4729 # Linux and Compaq Tru64 Unix objects are PIC.
4730 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4731 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4732 ;;
4733 *)
4734 ;;
4735 esac
4736 ;;
4737 lynxos*)
4738 ;;
4739 m88k*)
4740 ;;
4741 mvs*)
4742 case $cc_basename in
4743 cxx)
4744 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4745 ;;
4746 *)
4747 ;;
4748 esac
4749 ;;
4750 netbsd*)
4751 ;;
4752 osf3* | osf4* | osf5*)
4753 case $cc_basename in
4754 KCC)
4755 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4756 ;;
4757 RCC)
4758 # Rational C++ 2.4.1
4759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4760 ;;
4761 cxx)
4762 # Digital/Compaq C++
4763 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4764 # Make sure the PIC flag is empty. It appears that all Alpha
4765 # Linux and Compaq Tru64 Unix objects are PIC.
4766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4767 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4768 ;;
4769 *)
4770 ;;
4771 esac
4772 ;;
4773 psos*)
4774 ;;
4775 sco*)
4776 case $cc_basename in
4777 CC)
4778 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4779 ;;
4780 *)
4781 ;;
4782 esac
4783 ;;
4784 solaris*)
4785 case $cc_basename in
4786 CC)
4787 # Sun C++ 4.2, 5.x and Centerline C++
4788 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4789 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4790 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4791 ;;
4792 gcx)
4793 # Green Hills C++ Compiler
4794 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4795 ;;
4796 *)
4797 ;;
4798 esac
4799 ;;
4800 sunos4*)
4801 case $cc_basename in
4802 CC)
4803 # Sun C++ 4.x
4804 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4805 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4806 ;;
4807 lcc)
4808 # Lucid
4809 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4810 ;;
4811 *)
4812 ;;
4813 esac
4814 ;;
4815 tandem*)
4816 case $cc_basename in
4817 NCC)
4818 # NonStop-UX NCC 3.20
4819 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4820 ;;
4821 *)
4822 ;;
4823 esac
4824 ;;
4825 unixware*)
4826 ;;
4827 vxworks*)
4828 ;;
4829 *)
4830 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4831 ;;
4832 esac
4833 fi
4834],
4835[
4836 if test "$GCC" = yes; then
4837 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4838 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4839
4840 case $host_os in
4841 aix*)
4842 # All AIX code is PIC.
4843 if test "$host_cpu" = ia64; then
4844 # AIX 5 now supports IA64 processor
4845 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4846 fi
4847 ;;
4848
4849 amigaos*)
4850 # FIXME: we need at least 68020 code to build shared libraries, but
4851 # adding the `-m68020' flag to GCC prevents building anything better,
4852 # like `-m68040'.
4853 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4854 ;;
4855
4856 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4857 # PIC is the default for these OSes.
4858 ;;
4859
4860 mingw* | pw32* | os2*)
4861 # This hack is so that the source file can tell whether it is being
4862 # built for inclusion in a dll (and should export symbols for example).
4863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4864 ;;
4865
4866 darwin* | rhapsody*)
4867 # PIC is the default on this platform
4868 # Common symbols not allowed in MH_DYLIB files
4869 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4870 ;;
4871
4872 msdosdjgpp*)
4873 # Just because we use GCC doesn't mean we suddenly get shared libraries
4874 # on systems that don't support them.
4875 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4876 enable_shared=no
4877 ;;
4878
4879 sysv4*MP*)
4880 if test -d /usr/nec; then
4881 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4882 fi
4883 ;;
4884
4885 hpux*)
4886 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4887 # not for PA HP-UX.
4888 case "$host_cpu" in
4889 hppa*64*|ia64*)
4890 # +Z the default
4891 ;;
4892 *)
4893 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4894 ;;
4895 esac
4896 ;;
4897
4898 *)
4899 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4900 ;;
4901 esac
4902 else
4903 # PORTME Check for flag to pass linker flags through the system compiler.
4904 case $host_os in
4905 aix*)
4906 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4907 if test "$host_cpu" = ia64; then
4908 # AIX 5 now supports IA64 processor
4909 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4910 else
4911 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4912 fi
4913 ;;
4914 darwin*)
4915 # PIC is the default on this platform
4916 # Common symbols not allowed in MH_DYLIB files
4917 case "$cc_basename" in
4918 xlc*)
4919 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4920 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4921 ;;
4922 esac
4923 ;;
4924
4925 mingw* | pw32* | os2*)
4926 # This hack is so that the source file can tell whether it is being
4927 # built for inclusion in a dll (and should export symbols for example).
4928 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4929 ;;
4930
4931 hpux9* | hpux10* | hpux11*)
4932 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4933 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4934 # not for PA HP-UX.
4935 case "$host_cpu" in
4936 hppa*64*|ia64*)
4937 # +Z the default
4938 ;;
4939 *)
4940 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4941 ;;
4942 esac
4943 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4944 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4945 ;;
4946
4947 irix5* | irix6* | nonstopux*)
4948 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4949 # PIC (with -KPIC) is the default.
4950 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4951 ;;
4952
4953 newsos6)
4954 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4955 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4956 ;;
4957
4958 linux*)
4959 case $CC in
4960 icc* | ecc*)
4961 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4962 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4963 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4964 ;;
4965 ccc*)
4966 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4967 # All Alpha code is PIC.
4968 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4969 ;;
4970 esac
4971 ;;
4972
4973 osf3* | osf4* | osf5*)
4974 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4975 # All OSF/1 code is PIC.
4976 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4977 ;;
4978
4979 sco3.2v5*)
4980 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4981 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4982 ;;
4983
4984 solaris*)
4985 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4986 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4987 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4988 ;;
4989
4990 sunos4*)
4991 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4992 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4993 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4994 ;;
4995
4996 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4997 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4998 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4999 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5000 ;;
5001
5002 sysv4*MP*)
5003 if test -d /usr/nec ;then
5004 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5005 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5006 fi
5007 ;;
5008
5009 uts4*)
5010 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5011 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5012 ;;
5013
5014 *)
5015 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5016 ;;
5017 esac
5018 fi
5019])
5020AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5021
5022#
5023# Check to make sure the PIC flag actually works.
5024#
5025if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5026 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5027 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5028 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5029 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5030 "" | " "*) ;;
5031 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5032 esac],
5033 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5034 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5035fi
5036case "$host_os" in
5037 # For platforms which do not support PIC, -DPIC is meaningless:
5038 *djgpp*)
5039 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5040 ;;
5041 *)
5042 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5043 ;;
5044esac
5045])
5046
5047
5048# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5049# ------------------------------------
5050# See if the linker supports building shared libraries.
5051AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5052[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5053ifelse([$1],[CXX],[
5054 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5055 case $host_os in
5056 aix4* | aix5*)
5057 # If we're using GNU nm, then we don't want the "-C" option.
5058 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5059 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5060 _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'
5061 else
5062 _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'
5063 fi
5064 ;;
5065 pw32*)
5066 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5067 ;;
5068 cygwin* | mingw*)
5069 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5070 ;;
5071 *)
5072 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5073 ;;
5074 esac
5075],[
5076 runpath_var=
5077 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5078 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5079 _LT_AC_TAGVAR(archive_cmds, $1)=
5080 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5081 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5082 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5083 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5084 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5085 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5087 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5088 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5089 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5090 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5091 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5092 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5093 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5094 _LT_AC_TAGVAR(module_cmds, $1)=
5095 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5096 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5097 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5098 # include_expsyms should be a list of space-separated symbols to be *always*
5099 # included in the symbol list
5100 _LT_AC_TAGVAR(include_expsyms, $1)=
5101 # exclude_expsyms can be an extended regexp of symbols to exclude
5102 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5103 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5104 # as well as any symbol that contains `d'.
5105 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5106 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5107 # platforms (ab)use it in PIC code, but their linkers get confused if
5108 # the symbol is explicitly referenced. Since portable code cannot
5109 # rely on this symbol name, it's probably fine to never include it in
5110 # preloaded symbol tables.
5111 extract_expsyms_cmds=
5112
5113 case $host_os in
5114 cygwin* | mingw* | pw32*)
5115 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5116 # When not using gcc, we currently assume that we are using
5117 # Microsoft Visual C++.
5118 if test "$GCC" != yes; then
5119 with_gnu_ld=no
5120 fi
5121 ;;
5122 openbsd*)
5123 with_gnu_ld=no
5124 ;;
5125 esac
5126
5127 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5128 if test "$with_gnu_ld" = yes; then
5129 # If archive_cmds runs LD, not CC, wlarc should be empty
5130 wlarc='${wl}'
5131
5132 # See if GNU ld supports shared libraries.
5133 case $host_os in
5134 aix3* | aix4* | aix5*)
5135 # On AIX/PPC, the GNU linker is very broken
5136 if test "$host_cpu" != ia64; then
5137 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5138 cat <<EOF 1>&2
5139
5140*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5141*** to be unable to reliably create shared libraries on AIX.
5142*** Therefore, libtool is disabling shared libraries support. If you
5143*** really care for shared libraries, you may want to modify your PATH
5144*** so that a non-GNU linker is found, and then restart.
5145
5146EOF
5147 fi
5148 ;;
5149
5150 amigaos*)
5151 _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)'
5152 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5153 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5154
5155 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5156 # that the semantics of dynamic libraries on AmigaOS, at least up
5157 # to version 4, is to share data among multiple programs linked
5158 # with the same dynamic library. Since this doesn't match the
5159 # behavior of shared libraries on other platforms, we can't use
5160 # them.
5161 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5162 ;;
5163
5164 beos*)
5165 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5166 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5167 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5168 # support --undefined. This deserves some investigation. FIXME
5169 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5170 else
5171 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5172 fi
5173 ;;
5174
5175 cygwin* | mingw* | pw32*)
5176 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5177 # as there is no search path for DLLs.
5178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5179 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5180 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5181 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5182 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5183
5184 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5185 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5186 # If the export-symbols file already is a .def file (1st line
5187 # is EXPORTS), use it as is; otherwise, prepend...
5188 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5189 cp $export_symbols $output_objdir/$soname.def;
5190 else
5191 echo EXPORTS > $output_objdir/$soname.def;
5192 cat $export_symbols >> $output_objdir/$soname.def;
5193 fi~
5194 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5195 else
5196 ld_shlibs=no
5197 fi
5198 ;;
5199
5200 netbsd*)
5201 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5202 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5203 wlarc=
5204 else
5205 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5206 _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'
5207 fi
5208 ;;
5209
5210 solaris* | sysv5*)
5211 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5212 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5213 cat <<EOF 1>&2
5214
5215*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5216*** create shared libraries on Solaris systems. Therefore, libtool
5217*** is disabling shared libraries support. We urge you to upgrade GNU
5218*** binutils to release 2.9.1 or newer. Another option is to modify
5219*** your PATH or compiler configuration so that the native linker is
5220*** used, and then restart.
5221
5222EOF
5223 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5224 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5225 _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'
5226 else
5227 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5228 fi
5229 ;;
5230
5231 sunos4*)
5232 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5233 wlarc=
5234 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5235 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5236 ;;
5237
5238 linux*)
5239 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5240 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5241 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5242 supports_anon_versioning=no
5243 case `$LD -v 2>/dev/null` in
5244 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5245 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5246 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5247 *\ 2.11.*) ;; # other 2.11 versions
5248 *) supports_anon_versioning=yes ;;
5249 esac
5250 if test $supports_anon_versioning = yes; then
5251 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5252cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5253$echo "local: *; };" >> $output_objdir/$libname.ver~
5254 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5255 else
5256 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5257 fi
5258 else
5259 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5260 fi
5261 ;;
5262
5263 *)
5264 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5265 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5266 _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'
5267 else
5268 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5269 fi
5270 ;;
5271 esac
5272
5273 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5274 runpath_var=LD_RUN_PATH
5275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5276 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5277 # ancient GNU ld didn't support --whole-archive et. al.
5278 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5279 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5280 else
5281 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5282 fi
5283 fi
5284 else
5285 # PORTME fill in a description of your system's linker (not GNU ld)
5286 case $host_os in
5287 aix3*)
5288 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5289 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5290 _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'
5291 # Note: this linker hardcodes the directories in LIBPATH if there
5292 # are no directories specified by -L.
5293 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5294 if test "$GCC" = yes && test -z "$link_static_flag"; then
5295 # Neither direct hardcoding nor static linking is supported with a
5296 # broken collect2.
5297 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5298 fi
5299 ;;
5300
5301 aix4* | aix5*)
5302 if test "$host_cpu" = ia64; then
5303 # On IA64, the linker does run time linking by default, so we don't
5304 # have to do anything special.
5305 aix_use_runtimelinking=no
5306 exp_sym_flag='-Bexport'
5307 no_entry_flag=""
5308 else
5309 # If we're using GNU nm, then we don't want the "-C" option.
5310 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5311 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5312 _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'
5313 else
5314 _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'
5315 fi
5316 aix_use_runtimelinking=no
5317
5318 # Test if we are trying to use run time linking or normal
5319 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5320 # need to do runtime linking.
5321 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5322 for ld_flag in $LDFLAGS; do
5323 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5324 aix_use_runtimelinking=yes
5325 break
5326 fi
5327 done
5328 esac
5329
5330 exp_sym_flag='-bexport'
5331 no_entry_flag='-bnoentry'
5332 fi
5333
5334 # When large executables or shared objects are built, AIX ld can
5335 # have problems creating the table of contents. If linking a library
5336 # or program results in "error TOC overflow" add -mminimal-toc to
5337 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5338 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5339
5340 _LT_AC_TAGVAR(archive_cmds, $1)=''
5341 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5342 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5343 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5344
5345 if test "$GCC" = yes; then
5346 case $host_os in aix4.[012]|aix4.[012].*)
5347 # We only want to do this on AIX 4.2 and lower, the check
5348 # below for broken collect2 doesn't work under 4.3+
5349 collect2name=`${CC} -print-prog-name=collect2`
5350 if test -f "$collect2name" && \
5351 strings "$collect2name" | grep resolve_lib_name >/dev/null
5352 then
5353 # We have reworked collect2
5354 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5355 else
5356 # We have old collect2
5357 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5358 # It fails to find uninstalled libraries when the uninstalled
5359 # path is not listed in the libpath. Setting hardcode_minus_L
5360 # to unsupported forces relinking
5361 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5362 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5363 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5364 fi
5365 esac
5366 shared_flag='-shared'
5367 else
5368 # not using gcc
5369 if test "$host_cpu" = ia64; then
5370 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5371 # chokes on -Wl,-G. The following line is correct:
5372 shared_flag='-G'
5373 else
5374 if test "$aix_use_runtimelinking" = yes; then
5375 shared_flag='${wl}-G'
5376 else
5377 shared_flag='${wl}-bM:SRE'
5378 fi
5379 fi
5380 fi
5381
5382 # It seems that -bexpall does not export symbols beginning with
5383 # underscore (_), so it is better to generate a list of symbols to export.
5384 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5385 if test "$aix_use_runtimelinking" = yes; then
5386 # Warning - without using the other runtime loading flags (-brtl),
5387 # -berok will link without error, but may produce a broken library.
5388 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5389 # Determine the default libpath from the value encoded in an empty executable.
5390 _LT_AC_SYS_LIBPATH_AIX
5391 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5392 _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}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5393 else
5394 if test "$host_cpu" = ia64; then
5395 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5396 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5397 _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"
5398 else
5399 # Determine the default libpath from the value encoded in an empty executable.
5400 _LT_AC_SYS_LIBPATH_AIX
5401 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5402 # Warning - without using the other run time loading flags,
5403 # -berok will link without error, but may produce a broken library.
5404 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5405 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5406 # -bexpall does not export symbols beginning with underscore (_)
5407 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5408 # Exported symbols can be pulled into shared objects from archives
5409 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5410 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5411 # This is similar to how AIX traditionally builds it's shared libraries.
5412 _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'
5413 fi
5414 fi
5415 ;;
5416
5417 amigaos*)
5418 _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)'
5419 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5420 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5421 # see comment about different semantics on the GNU ld section
5422 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5423 ;;
5424
5425 bsdi[[45]]*)
5426 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5427 ;;
5428
5429 cygwin* | mingw* | pw32*)
5430 # When not using gcc, we currently assume that we are using
5431 # Microsoft Visual C++.
5432 # hardcode_libdir_flag_spec is actually meaningless, as there is
5433 # no search path for DLLs.
5434 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5435 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5436 # Tell ltmain to make .lib files, not .a files.
5437 libext=lib
5438 # Tell ltmain to make .dll files, not .so files.
5439 shrext_cmds=".dll"
5440 # FIXME: Setting linknames here is a bad hack.
5441 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5442 # The linker will automatically build a .lib file if we build a DLL.
5443 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5444 # FIXME: Should let the user specify the lib program.
5445 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5446 fix_srcfile_path='`cygpath -w "$srcfile"`'
5447 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5448 ;;
5449
5450 darwin* | rhapsody*)
5451 case "$host_os" in
5452 rhapsody* | darwin1.[[012]])
5453 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5454 ;;
5455 *) # Darwin 1.3 on
5456 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5457 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5458 else
5459 case ${MACOSX_DEPLOYMENT_TARGET} in
5460 10.[[012]])
5461 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5462 ;;
5463 10.*)
5464 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5465 ;;
5466 esac
5467 fi
5468 ;;
5469 esac
5470 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5471 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5472 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5473 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5474 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5475 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5476 if test "$GCC" = yes ; then
5477 output_verbose_link_cmd='echo'
5478 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5479 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5480 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5481 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5482 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5483 else
5484 case "$cc_basename" in
5485 xlc*)
5486 output_verbose_link_cmd='echo'
5487 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5488 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5489 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5490 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5491 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5492 ;;
5493 *)
5494 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5495 ;;
5496 esac
5497 fi
5498 ;;
5499
5500 dgux*)
5501 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5503 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5504 ;;
5505
5506 freebsd1*)
5507 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5508 ;;
5509
5510 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5511 # support. Future versions do this automatically, but an explicit c++rt0.o
5512 # does not break anything, and helps significantly (at the cost of a little
5513 # extra space).
5514 freebsd2.2*)
5515 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5516 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5517 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5518 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5519 ;;
5520
5521 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5522 freebsd2*)
5523 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5524 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5525 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5526 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5527 ;;
5528
5529 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5530 freebsd* | kfreebsd*-gnu)
5531 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5532 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5533 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5534 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5535 ;;
5536
5537 hpux9*)
5538 if test "$GCC" = yes; then
5539 _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'
5540 else
5541 _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'
5542 fi
5543 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5544 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5545 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5546
5547 # hardcode_minus_L: Not really in the search PATH,
5548 # but as the default location of the library.
5549 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5550 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5551 ;;
5552
5553 hpux10* | hpux11*)
5554 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5555 case "$host_cpu" in
5556 hppa*64*|ia64*)
5557 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5558 ;;
5559 *)
5560 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5561 ;;
5562 esac
5563 else
5564 case "$host_cpu" in
5565 hppa*64*|ia64*)
5566 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5567 ;;
5568 *)
5569 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5570 ;;
5571 esac
5572 fi
5573 if test "$with_gnu_ld" = no; then
5574 case "$host_cpu" in
5575 hppa*64*)
5576 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5577 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5578 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5579 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5580 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5581 ;;
5582 ia64*)
5583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5584 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5585 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5586
5587 # hardcode_minus_L: Not really in the search PATH,
5588 # but as the default location of the library.
5589 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5590 ;;
5591 *)
5592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5593 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5594 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5595 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5596
5597 # hardcode_minus_L: Not really in the search PATH,
5598 # but as the default location of the library.
5599 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5600 ;;
5601 esac
5602 fi
5603 ;;
5604
5605 irix5* | irix6* | nonstopux*)
5606 if test "$GCC" = yes; then
5607 _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'
5608 else
5609 _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'
5610 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5611 fi
5612 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5613 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5614 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5615 ;;
5616
5617 netbsd*)
5618 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5619 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5620 else
5621 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5622 fi
5623 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5624 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5625 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5626 ;;
5627
5628 newsos6)
5629 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5630 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5631 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5632 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5633 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5634 ;;
5635
5636 openbsd*)
5637 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5638 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5639 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5640 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5641 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5642 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5643 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5644 else
5645 case $host_os in
5646 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5647 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5649 ;;
5650 *)
5651 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5652 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5653 ;;
5654 esac
5655 fi
5656 ;;
5657
5658 os2*)
5659 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5660 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5661 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5662 _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'
5663 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5664 ;;
5665
5666 osf3*)
5667 if test "$GCC" = yes; then
5668 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5669 _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'
5670 else
5671 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5672 _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'
5673 fi
5674 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5675 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5676 ;;
5677
5678 osf4* | osf5*) # as osf3* with the addition of -msym flag
5679 if test "$GCC" = yes; then
5680 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5681 _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'
5682 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5683 else
5684 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5685 _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'
5686 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5687 $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'
5688
5689 # Both c and cxx compiler support -rpath directly
5690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5691 fi
5692 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5693 ;;
5694
5695 sco3.2v5*)
5696 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5697 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5698 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5699 runpath_var=LD_RUN_PATH
5700 hardcode_runpath_var=yes
5701 ;;
5702
5703 solaris*)
5704 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5705 if test "$GCC" = yes; then
5706 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5707 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5708 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5709 else
5710 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5711 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5712 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5713 fi
5714 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5715 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5716 case $host_os in
5717 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5718 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5719 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5720 esac
5721 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5722 ;;
5723
5724 sunos4*)
5725 if test "x$host_vendor" = xsequent; then
5726 # Use $CC to link under sequent, because it throws in some extra .o
5727 # files that make .init and .fini sections work.
5728 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5729 else
5730 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5731 fi
5732 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5733 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5734 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5735 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5736 ;;
5737
5738 sysv4)
5739 case $host_vendor in
5740 sni)
5741 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5742 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5743 ;;
5744 siemens)
5745 ## LD is ld it makes a PLAMLIB
5746 ## CC just makes a GrossModule.
5747 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5748 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5749 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5750 ;;
5751 motorola)
5752 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5753 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5754 ;;
5755 esac
5756 runpath_var='LD_RUN_PATH'
5757 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5758 ;;
5759
5760 sysv4.3*)
5761 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5762 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5763 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5764 ;;
5765
5766 sysv4*MP*)
5767 if test -d /usr/nec; then
5768 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5769 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5770 runpath_var=LD_RUN_PATH
5771 hardcode_runpath_var=yes
5772 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5773 fi
5774 ;;
5775
5776 sysv4.2uw2*)
5777 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5778 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5779 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5780 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5781 hardcode_runpath_var=yes
5782 runpath_var=LD_RUN_PATH
5783 ;;
5784
5785 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5786 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5787 if test "$GCC" = yes; then
5788 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5789 else
5790 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5791 fi
5792 runpath_var='LD_RUN_PATH'
5793 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5794 ;;
5795
5796 sysv5*)
5797 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5798 # $CC -shared without GNU ld will not create a library from C++
5799 # object files and a static libstdc++, better avoid it by now
5800 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5801 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5802 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5803 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5804 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5805 runpath_var='LD_RUN_PATH'
5806 ;;
5807
5808 uts4*)
5809 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5811 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5812 ;;
5813
5814 *)
5815 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5816 ;;
5817 esac
5818 fi
5819])
5820AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5821test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5822
5823variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5824if test "$GCC" = yes; then
5825 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5826fi
5827
5828#
5829# Do we need to explicitly link libc?
5830#
5831case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
5832x|xyes)
5833 # Assume -lc should be added
5834 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5835
5836 if test "$enable_shared" = yes && test "$GCC" = yes; then
5837 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5838 *'~'*)
5839 # FIXME: we may have to deal with multi-command sequences.
5840 ;;
5841 '$CC '*)
5842 # Test whether the compiler implicitly links with -lc since on some
5843 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5844 # to ld, don't add -lc before -lgcc.
5845 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5846 $rm conftest*
5847 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5848
5849 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5850 soname=conftest
5851 lib=conftest
5852 libobjs=conftest.$ac_objext
5853 deplibs=
5854 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5855 compiler_flags=-v
5856 linker_flags=-v
5857 verstring=
5858 output_objdir=.
5859 libname=conftest
5860 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5861 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5862 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5863 then
5864 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5865 else
5866 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5867 fi
5868 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5869 else
5870 cat conftest.err 1>&5
5871 fi
5872 $rm conftest*
5873 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5874 ;;
5875 esac
5876 fi
5877 ;;
5878esac
5879])# AC_LIBTOOL_PROG_LD_SHLIBS
5880
5881
5882# _LT_AC_FILE_LTDLL_C
5883# -------------------
5884# Be careful that the start marker always follows a newline.
5885AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5886# /* ltdll.c starts here */
5887# #define WIN32_LEAN_AND_MEAN
5888# #include <windows.h>
5889# #undef WIN32_LEAN_AND_MEAN
5890# #include <stdio.h>
5891#
5892# #ifndef __CYGWIN__
5893# # ifdef __CYGWIN32__
5894# # define __CYGWIN__ __CYGWIN32__
5895# # endif
5896# #endif
5897#
5898# #ifdef __cplusplus
5899# extern "C" {
5900# #endif
5901# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5902# #ifdef __cplusplus
5903# }
5904# #endif
5905#
5906# #ifdef __CYGWIN__
5907# #include <cygwin/cygwin_dll.h>
5908# DECLARE_CYGWIN_DLL( DllMain );
5909# #endif
5910# HINSTANCE __hDllInstance_base;
5911#
5912# BOOL APIENTRY
5913# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5914# {
5915# __hDllInstance_base = hInst;
5916# return TRUE;
5917# }
5918# /* ltdll.c ends here */
5919])# _LT_AC_FILE_LTDLL_C
5920
5921
5922# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5923# ---------------------------------
5924AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5925
5926
5927# old names
5928AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5929AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5930AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5931AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5932AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5933AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5934AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5935
5936# This is just to silence aclocal about the macro not being used
5937ifelse([AC_DISABLE_FAST_INSTALL])
5938
5939AC_DEFUN([LT_AC_PROG_GCJ],
5940[AC_CHECK_TOOL(GCJ, gcj, no)
5941 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5942 AC_SUBST(GCJFLAGS)
5943])
5944
5945AC_DEFUN([LT_AC_PROG_RC],
5946[AC_CHECK_TOOL(RC, windres, no)
5947])
5948
5949############################################################
5950# NOTE: This macro has been submitted for inclusion into #
5951# GNU Autoconf as AC_PROG_SED. When it is available in #
5952# a released version of Autoconf we should remove this #
5953# macro and use it instead. #
5954############################################################
5955# LT_AC_PROG_SED
5956# --------------
5957# Check for a fully-functional sed program, that truncates
5958# as few characters as possible. Prefer GNU sed if found.
5959AC_DEFUN([LT_AC_PROG_SED],
5960[AC_MSG_CHECKING([for a sed that does not truncate output])
5961AC_CACHE_VAL(lt_cv_path_SED,
5962[# Loop through the user's path and test for sed and gsed.
5963# Then use that list of sed's as ones to test for truncation.
5964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5965for as_dir in $PATH
5966do
5967 IFS=$as_save_IFS
5968 test -z "$as_dir" && as_dir=.
5969 for lt_ac_prog in sed gsed; do
5970 for ac_exec_ext in '' $ac_executable_extensions; do
5971 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5972 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5973 fi
5974 done
5975 done
5976done
5977lt_ac_max=0
5978lt_ac_count=0
5979# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5980# along with /bin/sed that truncates output.
5981for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5982 test ! -f $lt_ac_sed && break
5983 cat /dev/null > conftest.in
5984 lt_ac_count=0
5985 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5986 # Check for GNU sed and select it if it is found.
5987 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5988 lt_cv_path_SED=$lt_ac_sed
5989 break
5990 fi
5991 while true; do
5992 cat conftest.in conftest.in >conftest.tmp
5993 mv conftest.tmp conftest.in
5994 cp conftest.in conftest.nl
5995 echo >>conftest.nl
5996 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5997 cmp -s conftest.out conftest.nl || break
5998 # 10000 chars as input seems more than enough
5999 test $lt_ac_count -gt 10 && break
6000 lt_ac_count=`expr $lt_ac_count + 1`
6001 if test $lt_ac_count -gt $lt_ac_max; then
6002 lt_ac_max=$lt_ac_count
6003 lt_cv_path_SED=$lt_ac_sed
6004 fi
6005 done
6006done
6007])
6008SED=$lt_cv_path_SED
6009AC_MSG_RESULT([$SED])
6010])