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