1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3 ## Free Software Foundation, Inc.
4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 ## This file is free software; the Free Software Foundation gives
7 ## unlimited permission to copy and/or distribute it, with or without
8 ## modifications, as long as this notice is preserved.
10 # serial 47 AC_PROG_LIBTOOL
12 ifdef([AC_ACVERSION],[
13 # autoconf 2.13 compatibility
14 # Set PATH_SEPARATOR variable
15 # ---------------------------------
16 # Find the correct PATH separator. Usually this is :', but
17 # DJGPP uses ;' like DOS.
18 if test "X${PATH_SEPARATOR+set}" != Xset; then
19 UNAME=${UNAME-`uname 2>/dev/null`}
21 *-DOS) lt_cv_sys_path_separator=';' ;;
22 *) lt_cv_sys_path_separator=':' ;;
24 PATH_SEPARATOR=$lt_cv_sys_path_separator
28 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
29 # -----------------------------------------------------------
30 # If this macro is not defined by Autoconf, define it here.
31 ifdef([AC_PROVIDE_IFELSE],
33 [define([AC_PROVIDE_IFELSE],
34 [ifdef([AC_PROVIDE_$1],
39 AC_DEFUN([AC_PROG_LIBTOOL],
40 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43 AC_PROVIDE_IFELSE([AC_PROG_CXX],
45 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
48 dnl dnl And a similar setup for Fortran 77 support
49 dnl AC_PROVIDE_IFELSE([AC_PROG_F77],
51 dnl [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
54 dnl dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
55 dnl dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
56 dnl dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
57 dnl AC_PROVIDE_IFELSE([AC_PROG_GCJ],
59 dnl [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
61 dnl [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
63 dnl [ifdef([AC_PROG_GCJ],
64 dnl [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
65 dnl ifdef([A][M_PROG_GCJ],
66 dnl [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
67 dnl ifdef([LT_AC_PROG_GCJ],
68 dnl [define([LT_AC_PROG_GCJ],
69 dnl defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
76 AC_DEFUN([_AC_PROG_LIBTOOL],
77 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
78 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
79 dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
80 dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
82 # This can be used to rebuild libtool when needed
83 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
85 # Always use our own libtool.
86 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
89 # Prevent multiple expansion
90 define([AC_PROG_LIBTOOL], [])
96 AC_DEFUN([AC_LIBTOOL_SETUP],
98 AC_REQUIRE([AC_ENABLE_SHARED])dnl
99 AC_REQUIRE([AC_ENABLE_STATIC])dnl
100 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
101 AC_REQUIRE([AC_CANONICAL_HOST])dnl
102 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
103 AC_REQUIRE([AC_PROG_CC])dnl
104 AC_REQUIRE([AC_PROG_LD])dnl
105 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
106 AC_REQUIRE([AC_PROG_NM])dnl
108 AC_REQUIRE([AC_PROG_LN_S])dnl
109 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
110 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
111 AC_REQUIRE([AC_OBJEXT])dnl
112 AC_REQUIRE([AC_EXEEXT])dnl
115 AC_LIBTOOL_SYS_MAX_CMD_LEN
116 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
119 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
120 _LT_AC_PROG_ECHO_BACKSLASH
124 # AIX sometimes has problems with the GCC collect2 program. For some
125 # reason, if we set the COLLECT_NAMES environment variable, the problems
126 # vanish in a puff of smoke.
127 if test "X${COLLECT_NAMES+set}" != Xset; then
134 # Sed substitution that helps us do robust quoting. It backslashifies
135 # metacharacters that are still active within double-quoted strings.
136 Xsed='sed -e 1s/^X//'
137 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
139 # Same as above, but do not quote variable references.
140 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
142 # Sed substitution to delay expansion of an escaped shell variable in a
143 # double_quote_subst'ed string.
144 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
146 # Sed substitution to avoid accidental globbing in evaled expressions
147 no_glob_subst='s/\*/\\\*/g'
153 default_ofile=libtool
156 # All known linkers require a `.a' archive for static linking (except MSVC,
157 # which needs '.lib').
159 ltmain="$ac_aux_dir/ltmain.sh"
160 ofile="$default_ofile"
161 with_gnu_ld="$lt_cv_prog_gnu_ld"
163 AC_CHECK_TOOL(AR, ar, false)
164 AC_CHECK_TOOL(RANLIB, ranlib, :)
165 AC_CHECK_TOOL(STRIP, strip, :)
170 # Set sane defaults for various variables
171 test -z "$AR" && AR=ar
172 test -z "$AR_FLAGS" && AR_FLAGS=cru
173 test -z "$AS" && AS=as
174 test -z "$CC" && CC=cc
175 test -z "$LTCC" && LTCC=$CC
176 test -z "$DLLTOOL" && DLLTOOL=dlltool
177 test -z "$LD" && LD=ld
178 test -z "$LN_S" && LN_S="ln -s"
179 test -z "$MAGIC_CMD" && MAGIC_CMD=file
180 test -z "$NM" && NM=nm
181 test -z "$SED" && SED=sed
182 test -z "$OBJDUMP" && OBJDUMP=objdump
183 test -z "$RANLIB" && RANLIB=:
184 test -z "$STRIP" && STRIP=:
185 test -z "$ac_objext" && ac_objext=o
187 # Determine commands to create old-style static archives.
188 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
189 old_postinstall_cmds='chmod 644 $oldlib'
190 old_postuninstall_cmds=
192 if test -n "$RANLIB"; then
195 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
198 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
201 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
204 _LT_CC_BASENAME([$compiler])
206 # Only perform the check for file, if the check method requires it
207 case $deplibs_check_method in
209 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
215 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
216 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
217 enable_win32_dll=yes, enable_win32_dll=no)
219 AC_ARG_ENABLE([libtool-lock],
220 [ --disable-libtool-lock avoid locking (might break parallel builds)])
221 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
224 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
225 [pic_mode="$withval"],
227 test -z "$pic_mode" && pic_mode=default
229 # Use C for the default configuration in the libtool script
231 AC_LIBTOOL_LANG_C_CONFIG
236 # _LT_AC_SYS_COMPILER
237 # -------------------
238 AC_DEFUN([_LT_AC_SYS_COMPILER],
239 [AC_REQUIRE([AC_PROG_CC])dnl
241 # If no C compiler was specified, use CC.
244 # Allow CC to be a program name with arguments.
246 ])# _LT_AC_SYS_COMPILER
249 # _LT_CC_BASENAME(CC)
250 # -------------------
251 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
252 AC_DEFUN([_LT_CC_BASENAME],
253 [for cc_temp in $1""; do
255 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
256 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
261 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
265 # _LT_COMPILER_BOILERPLATE
266 # ------------------------
267 # Check for compiler boilerplate output or warnings with
268 # the simple compiler test code.
269 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
270 [ac_outfile=conftest.$ac_objext
271 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
272 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
273 _lt_compiler_boilerplate=`cat conftest.err`
275 ])# _LT_COMPILER_BOILERPLATE
278 # _LT_LINKER_BOILERPLATE
279 # ----------------------
280 # Check for linker boilerplate output or warnings with
281 # the simple link test code.
282 AC_DEFUN([_LT_LINKER_BOILERPLATE],
283 [ac_outfile=conftest.$ac_objext
284 printf "$lt_simple_link_test_code" >conftest.$ac_ext
285 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
286 _lt_linker_boilerplate=`cat conftest.err`
288 ])# _LT_LINKER_BOILERPLATE
291 dnl autoconf 2.13 compatibility
292 dnl _LT_AC_TRY_LINK()
293 AC_DEFUN(_LT_AC_TRY_LINK, [
294 cat > conftest.$ac_ext <<EOF
295 dnl This sometimes fails to find confdefs.h, for some reason.
296 dnl [#]line __oline__ "[$]0"
297 [#]line __oline__ "configure"
298 #include "confdefs.h"
302 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
303 ifelse([$1], , :, [$1
306 echo "configure: failed program was:" >&5
307 cat conftest.$ac_ext >&6
315 # _LT_AC_SYS_LIBPATH_AIX
316 # ----------------------
317 # Links a minimal program and checks the executable
318 # for the system default hardcoded library path. In most cases,
319 # this is /usr/lib:/lib, but when the MPI compilers are used
320 # the location of the communication and MPI libs are included too.
321 # If we don't find anything, use the default library path according
322 # to the aix ld manual.
323 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
325 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
327 # Check for a 64-bit object if we didn't find anything.
328 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
330 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
331 ])# _LT_AC_SYS_LIBPATH_AIX
334 # _LT_AC_SHELL_INIT(ARG)
335 # ----------------------
336 AC_DEFUN([_LT_AC_SHELL_INIT],
337 [ifdef([AC_DIVERSION_NOTICE],
338 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
339 [AC_DIVERT_PUSH(NOTICE)])
342 ])# _LT_AC_SHELL_INIT
345 # _LT_AC_PROG_ECHO_BACKSLASH
346 # --------------------------
347 # Add some code to the start of the generated configure script which
348 # will find an echo command which doesn't interpret backslashes.
349 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
351 # Check that we are running under the correct shell.
352 SHELL=${CONFIG_SHELL-/bin/sh}
356 # Remove one level of quotation (which was required for Make).
357 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
362 if test "X[$]1" = X--no-reexec; then
363 # Discard the --no-reexec flag, and continue.
365 elif test "X[$]1" = X--fallback-echo; then
366 # Avoid inline document here, it may be left over
368 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
369 # Yippee, $echo works!
372 # Restart under the correct shell.
373 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
376 if test "X[$]1" = X--fallback-echo; then
377 # used as fallback echo
385 # The HP-UX ksh and POSIX shell print the target directory to stdout
387 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
389 if test -z "$ECHO"; then
390 if test "X${echo_test_string+set}" != Xset; then
391 # find a string as large as possible, as long as the shell can cope with it
392 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
393 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
394 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
395 echo_test_string=`eval $cmd` &&
396 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
403 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
404 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
405 test "X$echo_testing_string" = "X$echo_test_string"; then
408 # The Solaris, AIX, and Digital Unix default echo programs unquote
409 # backslashes. This makes it impossible to quote backslashes using
410 # echo "$something" | sed 's/\\/\\\\/g'
412 # So, first we look for a working echo in the user's PATH.
414 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
415 for dir in $PATH /usr/ucb; do
417 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
418 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
419 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
420 test "X$echo_testing_string" = "X$echo_test_string"; then
427 if test "X$echo" = Xecho; then
428 # We didn't find a better echo, so look for alternatives.
429 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
430 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
431 test "X$echo_testing_string" = "X$echo_test_string"; then
432 # This shell has a builtin print -r that does the trick.
434 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
435 test "X$CONFIG_SHELL" != X/bin/ksh; then
436 # If we have ksh, try running configure again with it.
437 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
438 export ORIGINAL_CONFIG_SHELL
439 CONFIG_SHELL=/bin/ksh
441 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
445 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
446 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
447 test "X$echo_testing_string" = "X$echo_test_string"; then
450 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
451 test "X$echo_testing_string" = 'X\t' &&
452 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
453 test "X$echo_testing_string" = "X$echo_test_string"; then
454 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
456 SHELL="$CONFIG_SHELL"
458 echo="$CONFIG_SHELL [$]0 --fallback-echo"
459 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
460 test "X$echo_testing_string" = 'X\t' &&
461 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
462 test "X$echo_testing_string" = "X$echo_test_string"; then
463 echo="$CONFIG_SHELL [$]0 --fallback-echo"
465 # maybe with a smaller string...
468 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
469 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
476 if test "$prev" != 'sed 50q "[$]0"'; then
477 echo_test_string=`eval $prev`
478 export echo_test_string
479 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
481 # Oops. We lost completely, so just stick with echo.
490 # Copy echo and quote the copy suitably for passing to libtool from
491 # the Makefile, instead of quoting the original, which is used later.
493 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
494 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
498 ])])# _LT_AC_PROG_ECHO_BACKSLASH
503 AC_DEFUN([_LT_AC_LOCK],
505 #AC_ARG_ENABLE([libtool-lock],
506 #[ --disable-libtool-lock avoid locking (might break parallel builds)])
507 #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
509 # Some flags need to be propagated to the compiler or linker for good
513 # Find out which ABI we are using.
514 echo 'int i;' > conftest.$ac_ext
515 if AC_TRY_EVAL(ac_compile); then
516 case `/usr/bin/file conftest.$ac_objext` in
528 # Find out which ABI we are using.
529 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
530 if AC_TRY_EVAL(ac_compile); then
531 if test "$lt_cv_prog_gnu_ld" = yes; then
532 case `/usr/bin/file conftest.$ac_objext` in
534 LD="${LD-ld} -melf32bsmip"
537 LD="${LD-ld} -melf32bmipn32"
540 LD="${LD-ld} -melf64bmip"
544 case `/usr/bin/file conftest.$ac_objext` in
560 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
561 # Find out which ABI we are using.
562 echo 'int i;' > conftest.$ac_ext
563 if AC_TRY_EVAL(ac_compile); then
564 case `/usr/bin/file conftest.o` in
568 LD="${LD-ld} -m elf_i386"
570 ppc64-*linux*|powerpc64-*linux*)
571 LD="${LD-ld} -m elf32ppclinux"
574 LD="${LD-ld} -m elf_s390"
577 LD="${LD-ld} -m elf32_sparc"
584 LD="${LD-ld} -m elf_x86_64"
586 ppc*-*linux*|powerpc*-*linux*)
587 LD="${LD-ld} -m elf64ppc"
590 LD="${LD-ld} -m elf64_s390"
593 LD="${LD-ld} -m elf64_sparc"
603 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
604 SAVE_CFLAGS="$CFLAGS"
605 CFLAGS="$CFLAGS -belf"
606 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
609 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
611 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
612 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
613 CFLAGS="$SAVE_CFLAGS"
616 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
617 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
618 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
619 AC_CHECK_TOOL(AS, as, false)
620 AC_CHECK_TOOL(OBJDUMP, objdump, false)
625 need_locks="$enable_libtool_lock"
630 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
631 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
632 # ----------------------------------------------------------------
633 # Check whether the given compiler option works
634 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
635 [AC_REQUIRE([LT_AC_PROG_SED])
636 AC_CACHE_CHECK([$1], [$2],
638 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
639 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
640 lt_compiler_flag="$3"
641 # Insert the option either (1) after the last *FLAGS variable, or
642 # (2) before a word containing "conftest.", or (3) at the end.
643 # Note that $ac_compile itself does not contain backslashes and begins
644 # with a dollar sign (not a hyphen), so the echo should work correctly.
645 # The option is referenced via a variable to avoid confusing sed.
646 lt_compile=`echo "$ac_compile" | $SED \
647 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
648 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
649 -e 's:$: $lt_compiler_flag:'`
650 (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
651 (eval "$lt_compile" 2>conftest.err)
654 echo "configure:__oline__: \$? = $ac_status" >&5
655 if (exit $ac_status) && test -s "$ac_outfile"; then
656 # The compiler can only warn and ignore the option if not recognized
657 # So say no if there are warnings other than the usual output.
658 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
659 $SED '/^$/d' conftest.err >conftest.er2
660 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
667 if test x"[$]$2" = xyes; then
668 ifelse([$5], , :, [$5])
670 ifelse([$6], , :, [$6])
672 ])# AC_LIBTOOL_COMPILER_OPTION
675 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
676 # [ACTION-SUCCESS], [ACTION-FAILURE])
677 # ------------------------------------------------------------
678 # Check whether the given compiler option works
679 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
680 [AC_CACHE_CHECK([$1], [$2],
682 save_LDFLAGS="$LDFLAGS"
683 LDFLAGS="$LDFLAGS $3"
684 printf "$lt_simple_link_test_code" > conftest.$ac_ext
685 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
686 # The linker can only warn and ignore the option if not recognized
687 # So say no if there are warnings
688 if test -s conftest.err; then
689 # Append any errors to the config.log.
690 cat conftest.err 1>&5
691 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
692 $SED '/^$/d' conftest.err >conftest.er2
693 if diff conftest.exp conftest.er2 >/dev/null; then
701 LDFLAGS="$save_LDFLAGS"
704 if test x"[$]$2" = xyes; then
705 ifelse([$4], , :, [$4])
707 ifelse([$5], , :, [$5])
709 ])# AC_LIBTOOL_LINKER_OPTION
712 # AC_LIBTOOL_SYS_MAX_CMD_LEN
713 # --------------------------
714 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
715 [# find the maximum length of command line arguments
716 AC_MSG_CHECKING([the maximum length of command line arguments])
717 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
723 # On DJGPP, this test can blow up pretty badly due to problems in libc
724 # (any single argument exceeding 2000 bytes causes a buffer overrun
725 # during glob expansion). Even if it were fixed, the result of this
726 # check would be larger than it should be.
727 lt_cv_sys_max_cmd_len=12288; # 12K is about right
731 # Under GNU Hurd, this test is not required because there is
732 # no limit to the length of command line arguments.
733 # Libtool will interpret -1 as no limit whatsoever
734 lt_cv_sys_max_cmd_len=-1;
738 # On Win9x/ME, this test blows up -- it succeeds, but takes
739 # about 5 minutes as the teststring grows exponentially.
740 # Worse, since 9x/ME are not pre-emptively multitasking,
741 # you end up with a "frozen" computer, even though with patience
742 # the test eventually succeeds (with a max line length of 256k).
743 # Instead, let's just punt: use the minimum linelength reported by
744 # all of the supported platforms: 8192 (on NT/2K/XP).
745 lt_cv_sys_max_cmd_len=8192;
749 # On AmigaOS with pdksh, this test takes hours, literally.
750 # So we just punt and use a minimum line length of 8192.
751 lt_cv_sys_max_cmd_len=8192;
754 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
755 # This has been around since 386BSD, at least. Likely further.
756 if test -x /sbin/sysctl; then
757 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
758 elif test -x /usr/sbin/sysctl; then
759 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
761 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
763 # And add a safety zone
764 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
765 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
768 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
769 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
770 # nice to cause kernel panics so lets avoid the loop below.
771 # First set a reasonable default.
772 lt_cv_sys_max_cmd_len=16384
774 if test -x /sbin/sysconfig; then
775 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
776 *1*) lt_cv_sys_max_cmd_len=-1 ;;
781 # If test is not a shell built-in, we'll probably end up computing a
782 # maximum length that is only half of the actual maximum length, but
784 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
785 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
786 = "XX$teststring") >/dev/null 2>&1 &&
787 new_result=`expr "X$teststring" : ".*" 2>&1` &&
788 lt_cv_sys_max_cmd_len=$new_result &&
789 test $i != 17 # 1/2 MB should be enough
792 teststring=$teststring$teststring
795 # Add a significant safety factor because C++ compilers can tack on massive
796 # amounts of additional arguments before passing them to the linker.
797 # It appears as though 1/2 is a usable value.
798 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
802 if test -n $lt_cv_sys_max_cmd_len ; then
803 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
807 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
811 # --------------------
812 AC_DEFUN([_LT_AC_CHECK_DLFCN],
813 [AC_CHECK_HEADERS(dlfcn.h)dnl
814 ])# _LT_AC_CHECK_DLFCN
817 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
818 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
819 # ------------------------------------------------------------------
820 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
821 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
822 if test "$cross_compiling" = yes; then :
825 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
826 lt_status=$lt_dlunknown
827 cat > conftest.$ac_ext <<EOF
828 [#line __oline__ "configure"
829 #include "confdefs.h"
838 # define LT_DLGLOBAL RTLD_GLOBAL
841 # define LT_DLGLOBAL DL_GLOBAL
843 # define LT_DLGLOBAL 0
847 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
848 find out it does not work in some platform. */
849 #ifndef LT_DLLAZY_OR_NOW
851 # define LT_DLLAZY_OR_NOW RTLD_LAZY
854 # define LT_DLLAZY_OR_NOW DL_LAZY
857 # define LT_DLLAZY_OR_NOW RTLD_NOW
860 # define LT_DLLAZY_OR_NOW DL_NOW
862 # define LT_DLLAZY_OR_NOW 0
870 extern "C" void exit (int);
873 void fnord() { int i=42;}
876 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
877 int status = $lt_dlunknown;
881 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
882 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
883 /* dlclose (self); */
889 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
890 (./conftest; exit; ) >&5 2>/dev/null
893 x$lt_dlno_uscore) $1 ;;
894 x$lt_dlneed_uscore) $2 ;;
895 x$lt_unknown|x*) $3 ;;
903 ])# _LT_AC_TRY_DLOPEN_SELF
906 # AC_LIBTOOL_DLOPEN_SELF
907 # -------------------
908 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
909 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
910 if test "x$enable_dlopen" != xyes; then
911 enable_dlopen=unknown
912 enable_dlopen_self=unknown
913 enable_dlopen_self_static=unknown
920 lt_cv_dlopen="load_add_on"
922 lt_cv_dlopen_self=yes
926 lt_cv_dlopen="LoadLibrary"
931 lt_cv_dlopen="dlopen"
936 # if libdl is installed we need to link against it
937 AC_CHECK_LIB([dl], [dlopen],
938 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
941 lt_cv_dlopen_self=yes
946 AC_CHECK_FUNC([shl_load],
947 [lt_cv_dlopen="shl_load"],
948 [AC_CHECK_LIB([dld], [shl_load],
949 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
950 [AC_CHECK_FUNC([dlopen],
951 [lt_cv_dlopen="dlopen"],
952 [AC_CHECK_LIB([dl], [dlopen],
953 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
954 [AC_CHECK_LIB([svld], [dlopen],
955 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
956 [AC_CHECK_LIB([dld], [dld_link],
957 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
966 if test "x$lt_cv_dlopen" != xno; then
972 case $lt_cv_dlopen in
974 save_CPPFLAGS="$CPPFLAGS"
975 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
977 save_LDFLAGS="$LDFLAGS"
978 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
981 LIBS="$lt_cv_dlopen_libs $LIBS"
983 AC_CACHE_CHECK([whether a program can dlopen itself],
984 lt_cv_dlopen_self, [dnl
985 _LT_AC_TRY_DLOPEN_SELF(
986 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
987 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
990 if test "x$lt_cv_dlopen_self" = xyes; then
991 LDFLAGS="$LDFLAGS $link_static_flag"
992 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
993 lt_cv_dlopen_self_static, [dnl
994 _LT_AC_TRY_DLOPEN_SELF(
995 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
996 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1000 CPPFLAGS="$save_CPPFLAGS"
1001 LDFLAGS="$save_LDFLAGS"
1006 case $lt_cv_dlopen_self in
1007 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1008 *) enable_dlopen_self=unknown ;;
1011 case $lt_cv_dlopen_self_static in
1012 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1013 *) enable_dlopen_self_static=unknown ;;
1016 ])# AC_LIBTOOL_DLOPEN_SELF
1019 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1020 # ---------------------------------
1021 # Check to see if options -c and -o are simultaneously supported by compiler
1022 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1023 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1024 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1025 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1026 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1027 $rm -r conftest 2>/dev/null
1031 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1033 lt_compiler_flag="-o out/conftest2.$ac_objext"
1034 # Insert the option either (1) after the last *FLAGS variable, or
1035 # (2) before a word containing "conftest.", or (3) at the end.
1036 # Note that $ac_compile itself does not contain backslashes and begins
1037 # with a dollar sign (not a hyphen), so the echo should work correctly.
1038 lt_compile=`echo "$ac_compile" | $SED \
1039 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1040 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1041 -e 's:$: $lt_compiler_flag:'`
1042 (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
1043 (eval "$lt_compile" 2>out/conftest.err)
1045 cat out/conftest.err >&5
1046 echo "configure:__oline__: \$? = $ac_status" >&5
1047 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1049 # The compiler can only warn and ignore the option if not recognized
1050 # So say no if there are warnings
1051 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1052 $SED '/^$/d' out/conftest.err >out/conftest.er2
1053 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1054 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1059 # SGI C++ compiler will create directory out/ii_files/ for
1060 # template instantiation
1061 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1062 $rm out/* && rmdir out
1067 ])# AC_LIBTOOL_PROG_CC_C_O
1070 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1071 # -----------------------------------------
1072 # Check to see if we can do hard links to lock some files if needed
1073 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1074 [AC_REQUIRE([_LT_AC_LOCK])dnl
1076 hard_links="nottested"
1077 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1078 # do not overwrite the value of need_locks provided by the user
1079 AC_MSG_CHECKING([if we can lock with hard links])
1082 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1084 ln conftest.a conftest.b 2>&5 || hard_links=no
1085 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1086 AC_MSG_RESULT([$hard_links])
1087 if test "$hard_links" = no; then
1088 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1094 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1099 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1100 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1101 [rm -f .libs 2>/dev/null
1102 mkdir .libs 2>/dev/null
1103 if test -d .libs; then
1106 # MS-DOS does not allow filenames that begin with a dot.
1109 rmdir .libs 2>/dev/null])
1110 objdir=$lt_cv_objdir
1111 ])# AC_LIBTOOL_OBJDIR
1114 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1115 # ----------------------------------------------
1116 # Check hardcoding attributes.
1117 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1118 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1119 _LT_AC_TAGVAR(hardcode_action, $1)=
1120 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1121 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1122 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1124 # We can hardcode non-existant directories.
1125 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1126 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1127 # have to relink, otherwise we might link with an installed library
1128 # when we should be linking with a yet-to-be-installed one
1129 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1130 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1131 # Linking always hardcodes the temporary library directory.
1132 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1134 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1135 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1138 # We cannot hardcode anything, or else we can only hardcode existing
1140 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1142 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1144 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1145 # Fast installation is not supported
1146 enable_fast_install=no
1147 elif test "$shlibpath_overrides_runpath" = yes ||
1148 test "$enable_shared" = no; then
1149 # Fast installation is not necessary
1150 enable_fast_install=needless
1152 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1155 # AC_LIBTOOL_SYS_LIB_STRIP
1156 # ------------------------
1157 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1160 AC_MSG_CHECKING([whether stripping libraries is possible])
1161 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1162 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1163 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1164 AC_MSG_RESULT([yes])
1166 # FIXME - insert some real tests, host_os isn't really good enough
1169 if test -n "$STRIP" ; then
1170 striplib="$STRIP -x"
1171 AC_MSG_RESULT([yes])
1181 ])# AC_LIBTOOL_SYS_LIB_STRIP
1184 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1185 # -----------------------------
1186 # PORTME Fill in your ld.so characteristics
1187 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1188 [AC_MSG_CHECKING([dynamic linker characteristics])
1190 libname_spec='lib$name'
1198 shlibpath_overrides_runpath=unknown
1200 dynamic_linker="$host_os ld.so"
1201 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1202 if test "$GCC" = yes; then
1203 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1204 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1205 # if the path contains ";" then we assume it to be the separator
1206 # otherwise default to the standard path separator (i.e. ":") - it is
1207 # assumed that no part of a normal pathname contains ";" but that should
1208 # okay in the real world where ";" in dirpaths is itself problematic.
1209 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1211 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1214 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1216 need_lib_prefix=unknown
1217 hardcode_into_libs=no
1219 # when you set need_version to no, make sure it does not cause -set_version
1220 # flags to be left without arguments
1221 need_version=unknown
1226 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1227 shlibpath_var=LIBPATH
1229 # AIX 3 has no versioning support, so we append a major version to the name.
1230 soname_spec='${libname}${release}${shared_ext}$major'
1237 hardcode_into_libs=yes
1238 if test "$host_cpu" = ia64; then
1239 # AIX 5 supports IA64
1240 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1241 shlibpath_var=LD_LIBRARY_PATH
1243 # With GCC up to 2.95.x, collect2 would create an import file
1244 # for dependence libraries. The import file would start with
1245 # the line `#! .'. This would cause the generated library to
1246 # depend on `.', always an invalid library. This was fixed in
1247 # development snapshots of GCC prior to 3.0.
1249 aix4 | aix4.[[01]] | aix4.[[01]].*)
1250 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1252 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1259 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1260 # soname into executable. Probably we can add versioning support to
1261 # collect2, so additional links can be useful in future.
1262 if test "$aix_use_runtimelinking" = yes; then
1263 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1264 # instead of lib<name>.a to let people know that these are not
1265 # typical AIX shared libraries.
1266 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1268 # We preserve .a as extension for shared libraries through AIX4.2
1269 # and later when we are not doing run time linking.
1270 library_names_spec='${libname}${release}.a $libname.a'
1271 soname_spec='${libname}${release}${shared_ext}$major'
1273 shlibpath_var=LIBPATH
1278 library_names_spec='$libname.ixlibrary $libname.a'
1279 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1280 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'
1284 library_names_spec='${libname}${shared_ext}'
1285 dynamic_linker="$host_os ld.so"
1286 shlibpath_var=LIBRARY_PATH
1292 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1293 soname_spec='${libname}${release}${shared_ext}$major'
1294 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1295 shlibpath_var=LD_LIBRARY_PATH
1296 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1297 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1298 # the default ld.so.conf also contains /usr/contrib/lib and
1299 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1300 # libtool to hard-code these into programs
1303 cygwin* | mingw* | pw32*)
1304 version_type=windows
1309 case $GCC,$host_os in
1310 yes,cygwin* | yes,mingw* | yes,pw32*)
1311 library_names_spec='$libname.dll.a'
1312 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1313 postinstall_cmds='base_file=`basename \${file}`~
1314 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1315 dldir=$destdir/`dirname \$dlpath`~
1316 test -d \$dldir || mkdir -p \$dldir~
1317 $install_prog $dir/$dlname \$dldir/$dlname~
1318 chmod a+x \$dldir/$dlname'
1319 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1320 dlpath=$dir/\$dldll~
1322 shlibpath_overrides_runpath=yes
1326 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1327 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1328 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1331 # MinGW DLLs use traditional 'lib' prefix
1332 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1333 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1334 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1335 # It is most probably a Windows format PATH printed by
1336 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1337 # path with ; separators, and with drive letters. We can handle the
1338 # drive letters (cygwin fileutils understands them), so leave them,
1339 # especially as we might pass files found there to a mingw objdump,
1340 # which wouldn't understand a cygwinified path. Ahh.
1341 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1343 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1347 # pw32 DLLs use 'pw' prefix rather than 'lib'
1348 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1354 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1357 dynamic_linker='Win32 ld.exe'
1358 # FIXME: first we should search . and the directory the executable is in
1362 darwin* | rhapsody*)
1363 dynamic_linker="$host_os dyld"
1367 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1368 soname_spec='${libname}${release}${major}$shared_ext'
1369 shlibpath_overrides_runpath=yes
1370 shlibpath_var=DYLD_LIBRARY_PATH
1371 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1372 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1373 if test "$GCC" = yes; then
1374 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"`
1376 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1378 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1386 soname_spec='${libname}${release}${shared_ext}$major'
1387 shlibpath_var=LD_LIBRARY_PATH
1398 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1399 soname_spec='${libname}${release}${shared_ext}$major'
1400 shlibpath_var=LD_LIBRARY_PATH
1401 shlibpath_overrides_runpath=no
1402 hardcode_into_libs=yes
1403 dynamic_linker='GNU ld.so'
1406 freebsd* | dragonfly*)
1407 # DragonFly does not have aout. When/if they implement a new
1408 # versioning mechanism, adjust this.
1409 if test -x /usr/bin/objformat; then
1410 objformat=`/usr/bin/objformat`
1413 freebsd[[123]]*) objformat=aout ;;
1417 version_type=freebsd-$objformat
1418 case $version_type in
1420 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1425 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1429 shlibpath_var=LD_LIBRARY_PATH
1432 shlibpath_overrides_runpath=yes
1434 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1435 shlibpath_overrides_runpath=yes
1436 hardcode_into_libs=yes
1439 shlibpath_overrides_runpath=no
1440 hardcode_into_libs=yes
1449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1450 soname_spec='${libname}${release}${shared_ext}$major'
1451 shlibpath_var=LD_LIBRARY_PATH
1452 hardcode_into_libs=yes
1455 hpux9* | hpux10* | hpux11*)
1456 # Give a soname corresponding to the major version so that dld.sl refuses to
1457 # link against other versions.
1464 hardcode_into_libs=yes
1465 dynamic_linker="$host_os dld.so"
1466 shlibpath_var=LD_LIBRARY_PATH
1467 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1469 soname_spec='${libname}${release}${shared_ext}$major'
1470 if test "X$HPUX_IA64_MODE" = X32; then
1471 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1473 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1475 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1479 hardcode_into_libs=yes
1480 dynamic_linker="$host_os dld.sl"
1481 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1482 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1484 soname_spec='${libname}${release}${shared_ext}$major'
1485 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1486 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1490 dynamic_linker="$host_os dld.sl"
1491 shlibpath_var=SHLIB_PATH
1492 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1494 soname_spec='${libname}${release}${shared_ext}$major'
1497 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1498 postinstall_cmds='chmod 555 $lib'
1501 irix5* | irix6* | nonstopux*)
1503 nonstopux*) version_type=nonstopux ;;
1505 if test "$lt_cv_prog_gnu_ld" = yes; then
1513 soname_spec='${libname}${release}${shared_ext}$major'
1514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1516 irix5* | nonstopux*)
1520 case $LD in # libtool.m4 will add one of these switches to LD
1521 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1522 libsuff= shlibsuff= libmagic=32-bit;;
1523 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1524 libsuff=32 shlibsuff=N32 libmagic=N32;;
1525 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1526 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1527 *) libsuff= shlibsuff= libmagic=never-match;;
1531 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1532 shlibpath_overrides_runpath=no
1533 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1534 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1535 hardcode_into_libs=yes
1538 # No shared lib support for Linux oldld, aout, or coff.
1539 linux*oldld* | linux*aout* | linux*coff*)
1543 # This must be Linux ELF.
1548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1549 soname_spec='${libname}${release}${shared_ext}$major'
1550 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1551 shlibpath_var=LD_LIBRARY_PATH
1552 shlibpath_overrides_runpath=no
1553 # This implies no fast_install, which is unacceptable.
1554 # Some rework will be needed to allow for fast_install
1555 # before this can be enabled.
1556 hardcode_into_libs=yes
1558 # find out which ABI we are using
1561 x86_64*|s390x*|powerpc64*)
1562 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1563 if AC_TRY_EVAL(ac_compile); then
1564 case `/usr/bin/file conftest.$ac_objext` in
1567 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1575 # Append ld.so.conf contents to the search path
1576 if test -f /etc/ld.so.conf; then
1577 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1578 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1581 # We used to test for /lib/ld.so.1 and disable shared libraries on
1582 # powerpc, because MkLinux only supported shared libraries with the
1583 # GNU dynamic linker. Since this was broken with cross compilers,
1584 # most powerpc-linux boxes support dynamic linking these days and
1585 # people can always --disable-shared, the test was removed, and we
1586 # assume the GNU/Linux dynamic linker is in use.
1587 dynamic_linker='GNU/Linux ld.so'
1594 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1595 soname_spec='${libname}${release}${shared_ext}$major'
1596 shlibpath_var=LD_LIBRARY_PATH
1597 shlibpath_overrides_runpath=no
1598 hardcode_into_libs=yes
1599 dynamic_linker='GNU ld.so'
1606 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1608 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1609 dynamic_linker='NetBSD (a.out) ld.so'
1611 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1612 soname_spec='${libname}${release}${shared_ext}$major'
1613 dynamic_linker='NetBSD ld.elf_so'
1615 shlibpath_var=LD_LIBRARY_PATH
1616 shlibpath_overrides_runpath=yes
1617 hardcode_into_libs=yes
1622 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1623 shlibpath_var=LD_LIBRARY_PATH
1624 shlibpath_overrides_runpath=yes
1631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1632 soname_spec='${libname}${release}${shared_ext}$major'
1633 shlibpath_var=LD_LIBRARY_PATH
1634 shlibpath_overrides_runpath=yes
1640 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1642 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1643 *) need_version=no ;;
1645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1646 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1647 shlibpath_var=LD_LIBRARY_PATH
1648 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1650 openbsd2.[[89]] | openbsd2.[[89]].*)
1651 shlibpath_overrides_runpath=no
1654 shlibpath_overrides_runpath=yes
1658 shlibpath_overrides_runpath=yes
1663 libname_spec='$name'
1666 library_names_spec='$libname${shared_ext} $libname.a'
1667 dynamic_linker='OS/2 ld.exe'
1668 shlibpath_var=LIBPATH
1671 osf3* | osf4* | osf5*)
1675 soname_spec='${libname}${release}${shared_ext}$major'
1676 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1677 shlibpath_var=LD_LIBRARY_PATH
1678 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1679 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1684 soname_spec='${libname}${release}${shared_ext}$major'
1685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1686 shlibpath_var=LD_LIBRARY_PATH
1693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1694 soname_spec='${libname}${release}${shared_ext}$major'
1695 shlibpath_var=LD_LIBRARY_PATH
1696 shlibpath_overrides_runpath=yes
1697 hardcode_into_libs=yes
1698 # ldd complains unless libraries are executable
1699 postinstall_cmds='chmod +x $lib'
1704 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1705 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1706 shlibpath_var=LD_LIBRARY_PATH
1707 shlibpath_overrides_runpath=yes
1708 if test "$with_gnu_ld" = yes; then
1714 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1717 soname_spec='${libname}${release}${shared_ext}$major'
1718 shlibpath_var=LD_LIBRARY_PATH
1719 case $host_vendor in
1721 shlibpath_overrides_runpath=no
1723 export_dynamic_flag_spec='${wl}-Blargedynsym'
1724 runpath_var=LD_RUN_PATH
1732 shlibpath_overrides_runpath=no
1733 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1739 if test -d /usr/nec ;then
1741 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1742 soname_spec='$libname${shared_ext}.$major'
1743 shlibpath_var=LD_LIBRARY_PATH
1749 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1750 soname_spec='${libname}${release}${shared_ext}$major'
1751 shlibpath_var=LD_LIBRARY_PATH
1758 AC_MSG_RESULT([$dynamic_linker])
1759 test "$dynamic_linker" = no && can_build_shared=no
1760 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1765 AC_DEFUN([_LT_AC_TAGCONFIG],
1766 [AC_ARG_WITH([tags],
1767 [ --with-tags[=TAGS] include additional configurations [automatic]
1769 [tagnames="$withval"])
1771 if test -f "$ltmain" && test -n "$tagnames"; then
1772 if test ! -f "${ofile}"; then
1773 AC_MSG_WARN([output file \`$ofile' does not exist])
1776 if test -z "$LTCC"; then
1777 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1778 if test -z "$LTCC"; then
1779 AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
1781 AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
1785 # Extract list of available tagged configurations in $ofile.
1786 # Note that this assumes the entire list is on one line.
1787 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1789 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1790 for tagname in $tagnames; do
1792 # Check whether tagname contains only valid characters
1793 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1795 *) AC_MSG_ERROR([invalid tag name: $tagname])
1799 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1801 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1804 # Update the list of available tags.
1805 if test -n "$tagname"; then
1806 echo appending configuration tag \"$tagname\" to $ofile
1810 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1811 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1812 (test "X$CXX" != "Xg++"))) ; then
1813 AC_LIBTOOL_LANG_CXX_CONFIG
1820 # if test -n "$F77" && test "X$F77" != "Xno"; then
1821 # AC_LIBTOOL_LANG_F77_CONFIG
1828 # if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1829 # AC_LIBTOOL_LANG_GCJ_CONFIG
1836 # AC_LIBTOOL_LANG_RC_CONFIG
1840 AC_MSG_ERROR([Unsupported tag name: $tagname])
1844 # Append the new tag name to the list of available tags.
1845 if test -n "$tagname" ; then
1846 available_tags="$available_tags $tagname"
1852 # Now substitute the updated list of available tags.
1853 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1854 mv "${ofile}T" "$ofile"
1858 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1861 ])# _LT_AC_TAGCONFIG
1866 # enable checks for dlopen support
1867 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1868 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1869 ])# AC_LIBTOOL_DLOPEN
1872 # AC_LIBTOOL_WIN32_DLL
1873 # --------------------
1874 # declare package support for building win32 DLLs
1875 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1876 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1877 ])# AC_LIBTOOL_WIN32_DLL
1880 # AC_ENABLE_SHARED([DEFAULT])
1881 # ---------------------------
1882 # implement the --enable-shared flag
1883 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1884 AC_DEFUN([AC_ENABLE_SHARED],
1885 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1886 AC_ARG_ENABLE([shared],
1887 changequote(<<, >>)dnl
1888 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
1889 changequote([, ])dnl
1890 [p=${PACKAGE-default}
1892 yes) enable_shared=yes ;;
1893 no) enable_shared=no ;;
1896 # Look at the argument we got. We use all the common list separators.
1897 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1898 for pkg in $enableval; do
1900 if test "X$pkg" = "X$p"; then
1907 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1908 ])# AC_ENABLE_SHARED
1913 #- set the default shared flag to --disable-shared
1914 AC_DEFUN([AC_DISABLE_SHARED],
1915 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1916 AC_ENABLE_SHARED(no)
1917 ])# AC_DISABLE_SHARED
1920 # AC_ENABLE_STATIC([DEFAULT])
1921 # ---------------------------
1922 # implement the --enable-static flag
1923 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1924 AC_DEFUN([AC_ENABLE_STATIC],
1925 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1926 AC_ARG_ENABLE([static],
1927 changequote(<<, >>)dnl
1928 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
1929 changequote([, ])dnl
1930 [p=${PACKAGE-default}
1932 yes) enable_static=yes ;;
1933 no) enable_static=no ;;
1936 # Look at the argument we got. We use all the common list separators.
1937 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1938 for pkg in $enableval; do
1940 if test "X$pkg" = "X$p"; then
1947 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1948 ])# AC_ENABLE_STATIC
1953 # set the default static flag to --disable-static
1954 AC_DEFUN([AC_DISABLE_STATIC],
1955 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1956 AC_ENABLE_STATIC(no)
1957 ])# AC_DISABLE_STATIC
1960 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1961 # ---------------------------------
1962 # implement the --enable-fast-install flag
1963 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1964 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1965 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1966 AC_ARG_ENABLE([fast-install],
1967 changequote(<<, >>)dnl
1968 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
1969 changequote([, ])dnl
1970 [p=${PACKAGE-default}
1972 yes) enable_fast_install=yes ;;
1973 no) enable_fast_install=no ;;
1975 enable_fast_install=no
1976 # Look at the argument we got. We use all the common list separators.
1977 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1978 for pkg in $enableval; do
1980 if test "X$pkg" = "X$p"; then
1981 enable_fast_install=yes
1987 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1988 ])# AC_ENABLE_FAST_INSTALL
1991 # AC_DISABLE_FAST_INSTALL
1992 # -----------------------
1993 # set the default to --disable-fast-install
1994 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1995 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1996 AC_ENABLE_FAST_INSTALL(no)
1997 ])# AC_DISABLE_FAST_INSTALL
2000 # AC_LIBTOOL_PICMODE([MODE])
2001 # --------------------------
2002 # implement the --with-pic flag
2003 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2004 AC_DEFUN([AC_LIBTOOL_PICMODE],
2005 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2006 pic_mode=ifelse($#,1,$1,default)
2007 ])# AC_LIBTOOL_PICMODE
2012 # This is predefined starting with Autoconf 2.54, so this conditional
2013 # definition can be removed once we require Autoconf 2.54 or later.
2014 ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
2015 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2016 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2017 then ac_cv_prog_egrep='grep -E'
2018 else ac_cv_prog_egrep='egrep'
2020 EGREP=$ac_cv_prog_egrep
2025 # AC_PATH_TOOL_PREFIX
2026 # -------------------
2027 # find a file program which can recognise shared library
2028 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2029 [AC_REQUIRE([AC_PROG_EGREP])dnl
2030 AC_MSG_CHECKING([for $1])
2031 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2033 [[\\/*] | ?:[\\/]*])
2034 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2037 lt_save_MAGIC_CMD="$MAGIC_CMD"
2038 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2039 dnl $ac_dummy forces splitting on constant user-supplied paths.
2040 dnl POSIX.2 word splitting is done only on the output of word expansions,
2041 dnl not every word. This closes a longstanding sh security hole.
2042 ac_dummy="ifelse([$2], , $PATH, [$2])"
2043 for ac_dir in $ac_dummy; do
2045 test -z "$ac_dir" && ac_dir=.
2046 if test -f $ac_dir/$1; then
2047 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2048 if test -n "$file_magic_test_file"; then
2049 case $deplibs_check_method in
2051 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2052 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2053 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2054 $EGREP "$file_magic_regex" > /dev/null; then
2059 *** Warning: the command libtool uses to detect shared libraries,
2060 *** $file_magic_cmd, produces output that libtool cannot recognize.
2061 *** The result is that libtool may fail to recognize shared libraries
2062 *** as such. This will affect the creation of libtool libraries that
2063 *** depend on shared libraries, but programs linked with such libtool
2064 *** libraries will work regardless of this problem. Nevertheless, you
2065 *** may want to report the problem to your system manager and/or to
2066 *** bug-libtool@gnu.org
2076 MAGIC_CMD="$lt_save_MAGIC_CMD"
2079 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2080 if test -n "$MAGIC_CMD"; then
2081 AC_MSG_RESULT($MAGIC_CMD)
2085 ])# AC_PATH_TOOL_PREFIX
2090 # find a file program which can recognise a shared library
2091 AC_DEFUN([AC_PATH_MAGIC],
2092 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2093 if test -z "$lt_cv_path_MAGIC_CMD"; then
2094 if test -n "$ac_tool_prefix"; then
2095 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2105 # find the pathname to the GNU or non-GNU linker
2106 AC_DEFUN([AC_PROG_LD],
2107 [AC_ARG_WITH([gnu-ld],
2108 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2109 [test "$withval" = no || with_gnu_ld=yes],
2111 AC_REQUIRE([LT_AC_PROG_SED])dnl
2112 AC_REQUIRE([AC_PROG_CC])dnl
2113 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2114 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2116 if test "$GCC" = yes; then
2117 # Check if gcc -print-prog-name=ld gives a path.
2118 AC_MSG_CHECKING([for ld used by $CC])
2121 # gcc leaves a trailing carriage return which upsets mingw
2122 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2124 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2127 # Accept absolute paths.
2128 [[\\/]]* | ?:[[\\/]]*)
2129 re_direlt='/[[^/]][[^/]]*/\.\./'
2130 # Canonicalize the pathname of ld
2131 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2132 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2133 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2135 test -z "$LD" && LD="$ac_prog"
2138 # If it fails, then pretend we aren't using GCC.
2142 # If it is relative, then search for the first ld in PATH.
2146 elif test "$with_gnu_ld" = yes; then
2147 AC_MSG_CHECKING([for GNU ld])
2149 AC_MSG_CHECKING([for non-GNU ld])
2151 AC_CACHE_VAL(lt_cv_path_LD,
2152 [if test -z "$LD"; then
2153 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2154 for ac_dir in $PATH; do
2156 test -z "$ac_dir" && ac_dir=.
2157 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2158 lt_cv_path_LD="$ac_dir/$ac_prog"
2159 # Check to see if the program is GNU ld. I'd rather use --version,
2160 # but apparently some variants of GNU ld only accept -v.
2161 # Break only if it was the GNU/non-GNU ld that we prefer.
2162 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2163 *GNU* | *'with BFD'*)
2164 test "$with_gnu_ld" != no && break
2167 test "$with_gnu_ld" != yes && break
2174 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2177 if test -n "$LD"; then
2182 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2189 AC_DEFUN([AC_PROG_LD_GNU],
2190 [AC_REQUIRE([AC_PROG_EGREP])dnl
2191 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2192 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2193 case `$LD -v 2>&1 </dev/null` in
2194 *GNU* | *'with BFD'*)
2195 lt_cv_prog_gnu_ld=yes
2198 lt_cv_prog_gnu_ld=no
2201 with_gnu_ld=$lt_cv_prog_gnu_ld
2205 # AC_PROG_LD_RELOAD_FLAG
2206 # ----------------------
2207 # find reload flag for linker
2208 # -- PORTME Some linkers may need a different reload flag.
2209 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2210 [AC_CACHE_CHECK([for $LD option to reload object files],
2211 lt_cv_ld_reload_flag,
2212 [lt_cv_ld_reload_flag='-r'])
2213 reload_flag=$lt_cv_ld_reload_flag
2214 case $reload_flag in
2216 *) reload_flag=" $reload_flag" ;;
2218 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2221 if test "$GCC" = yes; then
2222 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2224 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2228 ])# AC_PROG_LD_RELOAD_FLAG
2231 # AC_DEPLIBS_CHECK_METHOD
2232 # -----------------------
2233 # how to check for library dependencies
2234 # -- PORTME fill in with the dynamic library characteristics
2235 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2236 [AC_CACHE_CHECK([how to recognise dependent libraries],
2237 lt_cv_deplibs_check_method,
2238 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2239 lt_cv_file_magic_test_file=
2240 lt_cv_deplibs_check_method='unknown'
2241 # Need to set the preceding variable on all platforms that support
2242 # interlibrary dependencies.
2243 # 'none' -- dependencies not supported.
2244 # `unknown' -- same as none, but documents that we really don't know.
2245 # 'pass_all' -- all dependencies passed with no checks.
2246 # 'test_compile' -- check by making test program.
2247 # 'file_magic [[regex]]' -- check by looking for files in library path
2248 # which responds to the $file_magic_cmd with a given extended regex.
2249 # If you have `file' or equivalent on your system and you're not sure
2250 # whether `pass_all' will *always* work, you probably want this one.
2254 lt_cv_deplibs_check_method=pass_all
2258 lt_cv_deplibs_check_method=pass_all
2262 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2263 lt_cv_file_magic_cmd='/usr/bin/file -L'
2264 lt_cv_file_magic_test_file=/shlib/libc.so
2268 # func_win32_libid is a shell function defined in ltmain.sh
2269 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2270 lt_cv_file_magic_cmd='func_win32_libid'
2274 # Base MSYS/MinGW do not provide the 'file' command needed by
2275 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2276 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2277 lt_cv_file_magic_cmd='$OBJDUMP -f'
2280 darwin* | rhapsody*)
2281 lt_cv_deplibs_check_method=pass_all
2284 freebsd* | kfreebsd*-gnu | dragonfly*)
2285 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2288 # Not sure whether the presence of OpenBSD here was a mistake.
2289 # Let's accept both of them until this is cleared up.
2290 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2291 lt_cv_file_magic_cmd=/usr/bin/file
2292 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2296 lt_cv_deplibs_check_method=pass_all
2301 lt_cv_deplibs_check_method=pass_all
2304 hpux10.20* | hpux11*)
2305 lt_cv_file_magic_cmd=/usr/bin/file
2308 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2309 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2312 [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]']
2313 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2316 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2317 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2322 irix5* | irix6* | nonstopux*)
2324 *-32|*"-32 ") libmagic=32-bit;;
2325 *-n32|*"-n32 ") libmagic=N32;;
2326 *-64|*"-64 ") libmagic=64-bit;;
2327 *) libmagic=never-match;;
2329 lt_cv_deplibs_check_method=pass_all
2332 # This must be Linux ELF.
2334 lt_cv_deplibs_check_method=pass_all
2338 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2339 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2341 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2346 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2347 lt_cv_file_magic_cmd=/usr/bin/file
2348 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2352 lt_cv_deplibs_check_method=unknown
2356 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2357 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2359 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2363 osf3* | osf4* | osf5*)
2364 lt_cv_deplibs_check_method=pass_all
2368 lt_cv_deplibs_check_method=pass_all
2372 lt_cv_deplibs_check_method=pass_all
2375 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2376 case $host_vendor in
2378 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]]'
2379 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2382 lt_cv_deplibs_check_method=pass_all
2385 lt_cv_file_magic_cmd='/bin/file'
2386 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2389 lt_cv_file_magic_cmd='/bin/file'
2390 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2391 lt_cv_file_magic_test_file=/lib/libc.so
2394 lt_cv_deplibs_check_method=pass_all
2399 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2400 lt_cv_deplibs_check_method=pass_all
2404 file_magic_cmd=$lt_cv_file_magic_cmd
2405 deplibs_check_method=$lt_cv_deplibs_check_method
2406 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2407 ])# AC_DEPLIBS_CHECK_METHOD
2412 # find the pathname to a BSD-compatible name lister
2413 AC_DEFUN([AC_PROG_NM],
2414 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2415 [if test -n "$NM"; then
2416 # Let the user override the test.
2419 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2420 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2422 test -z "$ac_dir" && ac_dir=.
2423 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2424 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2425 # Check to see if the nm accepts a BSD-compat flag.
2426 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2427 # nm: unknown option "B" ignored
2428 # Tru64's nm complains that /dev/null is an invalid object file
2429 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2430 */dev/null* | *'Invalid file or object type'*)
2431 lt_cv_path_NM="$tmp_nm -B"
2435 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2437 lt_cv_path_NM="$tmp_nm -p"
2441 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2442 continue # so that we can try to find one that supports BSD flags
2449 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2457 # check for math library
2458 AC_DEFUN([AC_CHECK_LIBM],
2459 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2462 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2463 # These system don't have libm, or don't need it
2466 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2467 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2470 AC_CHECK_LIB(m, cos, LIBM="-lm")
2476 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2477 # -----------------------------------
2478 # sets LIBLTDL to the link flags for the libltdl convenience library and
2479 # LTDLINCL to the include flags for the libltdl header and adds
2480 # --enable-ltdl-convenience to the configure arguments. Note that
2481 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2482 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2483 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2484 # (note the single quotes!). If your package is not flat and you're not
2485 # using automake, define top_builddir and top_srcdir appropriately in
2487 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2488 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2489 case $enable_ltdl_convenience in
2490 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2491 "") enable_ltdl_convenience=yes
2492 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2494 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2495 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2496 # For backwards non-gettext consistent compatibility...
2498 ])# AC_LIBLTDL_CONVENIENCE
2501 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2502 # -----------------------------------
2503 # sets LIBLTDL to the link flags for the libltdl installable library and
2504 # LTDLINCL to the include flags for the libltdl header and adds
2505 # --enable-ltdl-install to the configure arguments. Note that
2506 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2507 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2508 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2509 # '${top_srcdir}/' (note the single quotes!). If your package is not
2510 # flat and you're not using automake, define top_builddir and top_srcdir
2511 # appropriately in the Makefiles.
2512 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2513 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2514 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2515 AC_CHECK_LIB(ltdl, lt_dlinit,
2516 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2517 [if test x"$enable_ltdl_install" = xno; then
2518 AC_MSG_WARN([libltdl not installed, but installation disabled])
2520 enable_ltdl_install=yes
2523 if test x"$enable_ltdl_install" = x"yes"; then
2524 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2525 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2526 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2528 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2532 # For backwards non-gettext consistent compatibility...
2534 ])# AC_LIBLTDL_INSTALLABLE
2539 # enable support for C++ libraries
2540 AC_DEFUN([AC_LIBTOOL_CXX],
2541 [AC_REQUIRE([_LT_AC_LANG_CXX])
2547 AC_DEFUN([_LT_AC_LANG_CXX],
2548 [AC_REQUIRE([AC_PROG_CXX])
2549 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2550 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2553 # _LT_AC_PROG_CXXCPP
2555 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2557 AC_REQUIRE([AC_PROG_CXX])
2558 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2559 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2560 (test "X$CXX" != "Xg++"))) ; then
2563 ])# _LT_AC_PROG_CXXCPP
2567 # enable support for Fortran 77 libraries
2568 #AC_DEFUN([AC_LIBTOOL_F77],
2569 #[AC_REQUIRE([_LT_AC_LANG_F77])
2575 #AC_DEFUN([_LT_AC_LANG_F77],
2576 #[AC_REQUIRE([AC_PROG_F77])
2577 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2578 #])# _LT_AC_LANG_F77
2583 # enable support for GCJ libraries
2584 #AC_DEFUN([AC_LIBTOOL_GCJ],
2585 #[AC_REQUIRE([_LT_AC_LANG_GCJ])
2591 #AC_DEFUN([_LT_AC_LANG_GCJ],
2592 #[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2593 # [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2594 # [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2595 # [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2596 # [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2597 # [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2598 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2599 #])# _LT_AC_LANG_GCJ
2604 # enable support for Windows resource files
2605 #AC_DEFUN([AC_LIBTOOL_RC],
2606 #[AC_REQUIRE([LT_AC_PROG_RC])
2607 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2611 # AC_LIBTOOL_LANG_C_CONFIG
2612 # ------------------------
2613 # Ensure that the configuration vars for the C compiler are
2614 # suitably defined. Those variables are subsequently used by
2615 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2616 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2617 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2622 # Source file extension for C test sources.
2625 # Object file extension for compiled C test sources.
2627 _LT_AC_TAGVAR(objext, $1)=$objext
2629 # Code to be used in simple compile tests
2630 lt_simple_compile_test_code="int some_variable = 0;\n"
2632 # Code to be used in simple link tests
2633 lt_simple_link_test_code='int main(){return(0);}\n'
2637 # save warnings/boilerplate of simple test code
2638 _LT_COMPILER_BOILERPLATE
2639 _LT_LINKER_BOILERPLATE
2642 # Check for any special shared library compilation flags.
2644 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2645 if test "$GCC" = no; then
2648 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2652 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2653 AC_MSG_WARN([\`$CC' requires \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2654 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2656 AC_MSG_WARN([add \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2657 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2663 # Check to make sure the static flag actually works.
2665 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2666 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2667 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2669 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2673 ## There is no encapsulation within the following macros, do not change
2674 ## the running order or otherwise move them around unless you know exactly
2675 ## what you are doing...
2676 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2677 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2678 AC_LIBTOOL_PROG_CC_C_O($1)
2679 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2680 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2681 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2682 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2683 AC_LIBTOOL_SYS_LIB_STRIP
2684 AC_LIBTOOL_DLOPEN_SELF($1)
2686 # Report which librarie types wil actually be built
2687 AC_MSG_CHECKING([if libtool supports shared libraries])
2688 AC_MSG_RESULT([$can_build_shared])
2690 AC_MSG_CHECKING([whether to build shared libraries])
2691 test "$can_build_shared" = "no" && enable_shared=no
2693 # On AIX, shared libraries and static libraries use the same namespace, and
2694 # are all built from PIC.
2697 test "$enable_shared" = yes && enable_static=no
2698 if test -n "$RANLIB"; then
2699 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2700 postinstall_cmds='$RANLIB $lib'
2705 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2706 test "$enable_shared" = yes && enable_static=no
2710 AC_MSG_RESULT([$enable_shared])
2712 AC_MSG_CHECKING([whether to build static libraries])
2713 # Make sure either enable_shared or enable_static is yes.
2714 test "$enable_shared" = yes || enable_static=yes
2715 AC_MSG_RESULT([$enable_static])
2717 AC_LIBTOOL_CONFIG($1)
2721 ])# AC_LIBTOOL_LANG_C_CONFIG
2724 # AC_LIBTOOL_LANG_CXX_CONFIG
2725 # --------------------------
2726 # Ensure that the configuration vars for the C compiler are
2727 # suitably defined. Those variables are subsequently used by
2728 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2729 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2730 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2733 AC_REQUIRE([AC_PROG_CXX])
2734 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2736 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2737 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2738 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2739 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2740 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2741 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2742 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2743 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2744 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2745 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2746 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2747 _LT_AC_TAGVAR(module_cmds, $1)=
2748 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2749 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2750 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2751 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2752 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2753 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2755 # Dependencies to place before and after the object being linked:
2756 _LT_AC_TAGVAR(predep_objects, $1)=
2757 _LT_AC_TAGVAR(postdep_objects, $1)=
2758 _LT_AC_TAGVAR(predeps, $1)=
2759 _LT_AC_TAGVAR(postdeps, $1)=
2760 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2762 # Source file extension for C++ test sources.
2765 # Object file extension for compiled C++ test sources.
2767 _LT_AC_TAGVAR(objext, $1)=$objext
2769 # Code to be used in simple compile tests
2770 lt_simple_compile_test_code="int some_variable = 0;\n"
2772 # Code to be used in simple link tests
2773 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2775 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2778 # save warnings/boilerplate of simple test code
2779 _LT_COMPILER_BOILERPLATE
2780 _LT_LINKER_BOILERPLATE
2782 # Allow CC to be a program name with arguments.
2787 lt_save_with_gnu_ld=$with_gnu_ld
2788 lt_save_path_LD=$lt_cv_path_LD
2789 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2790 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2792 unset lt_cv_prog_gnu_ld
2794 if test -n "${lt_cv_path_LDCXX+set}"; then
2795 lt_cv_path_LD=$lt_cv_path_LDCXX
2799 test -z "${LDCXX+set}" || LD=$LDCXX
2802 _LT_AC_TAGVAR(compiler, $1)=$CC
2803 _LT_CC_BASENAME([$compiler])
2805 # We don't want -fno-exception wen compiling C++ code, so set the
2806 # no_builtin_flag separately
2807 if test "$GXX" = yes; then
2808 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2810 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2813 if test "$GXX" = yes; then
2814 # Set up default GNU C++ configuration
2818 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2819 # archiving commands below assume that GNU ld is being used.
2820 if test "$with_gnu_ld" = yes; then
2821 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2822 _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'
2824 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2825 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2827 # If archive_cmds runs LD, not CC, wlarc should be empty
2828 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2829 # investigate it a little bit more. (MM)
2832 # ancient GNU ld didn't support --whole-archive et. al.
2833 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2834 grep 'no-whole-archive' > /dev/null; then
2835 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2837 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2843 # A generic and very simple default shared library creation
2844 # command for GNU C++ for the case where it uses the native
2845 # linker, instead of GNU ld. If possible, this setting should
2846 # overridden to take advantage of the native linker features on
2847 # the platform it is being used on.
2848 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2851 # Commands to make compiler produce verbose output that lists
2852 # what "hidden" libraries, object files and flags are used when
2853 # linking a shared library.
2854 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2862 # PORTME: fill in a description of your system's C++ link characteristics
2863 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2864 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2867 # FIXME: insert proper C++ library support
2868 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2871 if test "$host_cpu" = ia64; then
2872 # On IA64, the linker does run time linking by default, so we don't
2873 # have to do anything special.
2874 aix_use_runtimelinking=no
2875 exp_sym_flag='-Bexport'
2878 aix_use_runtimelinking=no
2880 # Test if we are trying to use run time linking or normal
2881 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2882 # need to do runtime linking.
2883 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2884 for ld_flag in $LDFLAGS; do
2887 aix_use_runtimelinking=yes
2894 exp_sym_flag='-bexport'
2895 no_entry_flag='-bnoentry'
2898 # When large executables or shared objects are built, AIX ld can
2899 # have problems creating the table of contents. If linking a library
2900 # or program results in "error TOC overflow" add -mminimal-toc to
2901 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2902 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2904 _LT_AC_TAGVAR(archive_cmds, $1)=''
2905 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2906 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2907 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2909 if test "$GXX" = yes; then
2910 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2911 # We only want to do this on AIX 4.2 and lower, the check
2912 # below for broken collect2 doesn't work under 4.3+
2913 collect2name=`${CC} -print-prog-name=collect2`
2914 if test -f "$collect2name" && \
2915 strings "$collect2name" | grep resolve_lib_name >/dev/null
2917 # We have reworked collect2
2918 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2920 # We have old collect2
2921 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2922 # It fails to find uninstalled libraries when the uninstalled
2923 # path is not listed in the libpath. Setting hardcode_minus_L
2924 # to unsupported forces relinking
2925 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2927 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2930 shared_flag='-shared'
2931 if test "$aix_use_runtimelinking" = yes; then
2932 shared_flag="$shared_flag "'${wl}-G'
2936 if test "$host_cpu" = ia64; then
2937 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2938 # chokes on -Wl,-G. The following line is correct:
2941 if test "$aix_use_runtimelinking" = yes; then
2942 shared_flag='${wl}-G'
2944 shared_flag='${wl}-bM:SRE'
2949 # It seems that -bexpall does not export symbols beginning with
2950 # underscore (_), so it is better to generate a list of symbols to export.
2951 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2952 if test "$aix_use_runtimelinking" = yes; then
2953 # Warning - without using the other runtime loading flags (-brtl),
2954 # -berok will link without error, but may produce a broken library.
2955 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2956 # Determine the default libpath from the value encoded in an empty executable.
2957 _LT_AC_SYS_LIBPATH_AIX
2958 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2960 _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"
2962 if test "$host_cpu" = ia64; then
2963 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2964 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2965 _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"
2967 # Determine the default libpath from the value encoded in an empty executable.
2968 _LT_AC_SYS_LIBPATH_AIX
2969 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2970 # Warning - without using the other run time loading flags,
2971 # -berok will link without error, but may produce a broken library.
2972 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2973 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2974 # -bexpall does not export symbols beginning with underscore (_)
2975 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2976 # Exported symbols can be pulled into shared objects from archives
2977 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2978 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2979 # This is similar to how AIX traditionally builds its shared libraries.
2980 _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'
2985 case $cc_basename in
2987 # FIXME: insert proper C++ library support
2988 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2994 cygwin* | mingw* | pw32*)
2995 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2996 # as there is no search path for DLLs.
2997 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2998 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2999 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3000 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3002 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3003 _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'
3004 # If the export-symbols file already is a .def file (1st line
3005 # is EXPORTS), use it as is; otherwise, prepend...
3006 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3007 cp $export_symbols $output_objdir/$soname.def;
3009 echo EXPORTS > $output_objdir/$soname.def;
3010 cat $export_symbols >> $output_objdir/$soname.def;
3012 $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'
3014 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3017 darwin* | rhapsody*)
3019 rhapsody* | darwin1.[[012]])
3020 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3023 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3024 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3026 case ${MACOSX_DEPLOYMENT_TARGET} in
3028 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3031 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3037 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3038 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3039 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3040 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3041 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3042 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3044 if test "$GXX" = yes ; then
3045 lt_int_apple_cc_single_mod=no
3046 output_verbose_link_cmd='echo'
3047 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3048 lt_int_apple_cc_single_mod=yes
3050 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3051 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3053 _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'
3055 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3056 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3057 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3058 _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}'
3060 _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}'
3062 _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}'
3064 case $cc_basename in
3066 output_verbose_link_cmd='echo'
3067 _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'
3068 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3069 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3070 _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}'
3071 _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}'
3074 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3081 case $cc_basename in
3083 # FIXME: insert proper C++ library support
3084 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3087 # Green Hills C++ Compiler
3088 # FIXME: insert proper C++ library support
3089 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3092 # FIXME: insert proper C++ library support
3093 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3098 # C++ shared libraries reported to be fairly broken before switch to ELF
3099 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3102 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3104 freebsd* | kfreebsd*-gnu | dragonfly*)
3105 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3107 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3112 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3113 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3114 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3115 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3116 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3117 # but as the default
3118 # location of the library.
3120 case $cc_basename in
3122 # FIXME: insert proper C++ library support
3123 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3126 _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'
3127 # Commands to make compiler produce verbose output that lists
3128 # what "hidden" libraries, object files and flags are used when
3129 # linking a shared library.
3131 # There doesn't appear to be a way to prevent this compiler from
3132 # explicitly linking system object files so we need to strip them
3133 # from the output so that they don't get included in the library
3135 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'
3138 if test "$GXX" = yes; then
3139 _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'
3141 # FIXME: insert proper C++ library support
3142 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3148 if test $with_gnu_ld = no; then
3151 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3152 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3153 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3156 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3159 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3160 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3161 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3167 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3168 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3171 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3172 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3173 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3174 # but as the default
3175 # location of the library.
3178 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3179 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3180 # but as the default
3181 # location of the library.
3185 case $cc_basename in
3187 # FIXME: insert proper C++ library support
3188 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3193 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3196 _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'
3199 # Commands to make compiler produce verbose output that lists
3200 # what "hidden" libraries, object files and flags are used when
3201 # linking a shared library.
3203 # There doesn't appear to be a way to prevent this compiler from
3204 # explicitly linking system object files so we need to strip them
3205 # from the output so that they don't get included in the library
3207 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'
3210 if test "$GXX" = yes; then
3211 if test $with_gnu_ld = no; then
3214 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3217 _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'
3222 # FIXME: insert proper C++ library support
3223 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3229 case $cc_basename in
3232 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3234 # Archives containing C++ object files must be created using
3235 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3236 # necessary to make sure instantiated templates are included
3238 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3241 if test "$GXX" = yes; then
3242 if test "$with_gnu_ld" = no; then
3243 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3245 _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'
3248 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3252 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3255 case $cc_basename in
3257 # Kuck and Associates, Inc. (KAI) C++ Compiler
3259 # KCC will only create a shared library if the output file
3260 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3261 # to its proper name (with version) after linking.
3262 _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'
3263 _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'
3264 # Commands to make compiler produce verbose output that lists
3265 # what "hidden" libraries, object files and flags are used when
3266 # linking a shared library.
3268 # There doesn't appear to be a way to prevent this compiler from
3269 # explicitly linking system object files so we need to strip them
3270 # from the output so that they don't get included in the library
3272 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'
3274 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3275 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3277 # Archives containing C++ object files must be created using
3278 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3279 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3284 # version 8.0 and above of icpc choke on multiply defined symbols
3285 # if we add $predep_objects and $postdep_objects, however 7.1 and
3286 # earlier do not add the objects themselves.
3287 case `$CC -V 2>&1` in
3289 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3290 _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'
3292 *) # Version 8.0 or newer
3295 ia64*) tmp_idyn=' -i_dynamic';;
3297 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3298 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3301 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3302 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3303 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3304 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3307 # Portland Group C++ compiler
3308 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3309 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3311 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3312 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3313 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3317 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3318 _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'
3320 runpath_var=LD_RUN_PATH
3321 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3322 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3324 # Commands to make compiler produce verbose output that lists
3325 # what "hidden" libraries, object files and flags are used when
3326 # linking a shared library.
3328 # There doesn't appear to be a way to prevent this compiler from
3329 # explicitly linking system object files so we need to strip them
3330 # from the output so that they don't get included in the library
3332 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'
3337 # FIXME: insert proper C++ library support
3338 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3341 # FIXME: insert proper C++ library support
3342 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3345 case $cc_basename in
3347 # FIXME: insert proper C++ library support
3348 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3351 # FIXME: insert proper C++ library support
3352 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3357 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3358 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3360 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3361 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3362 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3364 # Workaround some broken pre-1.5 toolchains
3365 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3368 # C++ shared libraries are fairly broken
3369 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3372 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3373 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3374 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3375 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3376 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3377 _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'
3378 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3379 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3381 output_verbose_link_cmd='echo'
3384 case $cc_basename in
3386 # Kuck and Associates, Inc. (KAI) C++ Compiler
3388 # KCC will only create a shared library if the output file
3389 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3390 # to its proper name (with version) after linking.
3391 _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'
3393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3394 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3396 # Archives containing C++ object files must be created using
3397 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3398 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3402 # Rational C++ 2.4.1
3403 # FIXME: insert proper C++ library support
3404 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3407 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3408 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3410 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3411 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3413 # Commands to make compiler produce verbose output that lists
3414 # what "hidden" libraries, object files and flags are used when
3415 # linking a shared library.
3417 # There doesn't appear to be a way to prevent this compiler from
3418 # explicitly linking system object files so we need to strip them
3419 # from the output so that they don't get included in the library
3421 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'
3424 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3425 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3428 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3429 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3431 # Commands to make compiler produce verbose output that lists
3432 # what "hidden" libraries, object files and flags are used when
3433 # linking a shared library.
3434 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3437 # FIXME: insert proper C++ library support
3438 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3444 case $cc_basename in
3446 # Kuck and Associates, Inc. (KAI) C++ Compiler
3448 # KCC will only create a shared library if the output file
3449 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3450 # to its proper name (with version) after linking.
3451 _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'
3453 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3454 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3456 # Archives containing C++ object files must be created using
3457 # the KAI C++ compiler.
3458 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3461 # Rational C++ 2.4.1
3462 # FIXME: insert proper C++ library support
3463 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3466 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3467 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3468 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3469 echo "-hidden">> $lib.exp~
3470 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3473 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3474 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
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.
3480 # There doesn't appear to be a way to prevent this compiler from
3481 # explicitly linking system object files so we need to strip them
3482 # from the output so that they don't get included in the library
3484 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'
3487 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3488 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3489 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3492 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3494 # Commands to make compiler produce verbose output that lists
3495 # what "hidden" libraries, object files and flags are used when
3496 # linking a shared library.
3497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3500 # FIXME: insert proper C++ library support
3501 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3507 # FIXME: insert proper C++ library support
3508 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3511 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3512 case $cc_basename in
3514 # FIXME: insert proper C++ library support
3515 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3518 # FIXME: insert proper C++ library support
3519 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3524 case $cc_basename in
3527 # FIXME: insert proper C++ library support
3528 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3532 # FIXME: insert proper C++ library support
3533 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3536 # FIXME: insert proper C++ library support
3537 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3542 case $cc_basename in
3544 # Sun C++ 4.2, 5.x and Centerline C++
3545 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3546 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3547 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3548 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3549 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3551 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3552 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3554 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3556 # The C++ compiler is used as linker so we must use $wl
3557 # flag to pass the commands to the underlying system
3558 # linker. We must also pass each convience library through
3559 # to the system linker between allextract/defaultextract.
3560 # The C++ compiler will combine linker options so we
3561 # cannot just pass the convience library names through
3563 # Supported since Solaris 2.6 (maybe 2.5.1?)
3564 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3567 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3569 output_verbose_link_cmd='echo'
3571 # Archives containing C++ object files must be created using
3572 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3573 # necessary to make sure instantiated templates are included
3575 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3578 # Green Hills C++ Compiler
3579 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3581 # The C++ compiler must be used to create the archive.
3582 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3585 # GNU C++ compiler with Solaris linker
3586 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3587 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3588 if $CC --version | grep -v '^2\.7' > /dev/null; then
3589 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3590 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3591 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3593 # Commands to make compiler produce verbose output that lists
3594 # what "hidden" libraries, object files and flags are used when
3595 # linking a shared library.
3596 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3598 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3600 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3601 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3602 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3604 # Commands to make compiler produce verbose output that lists
3605 # what "hidden" libraries, object files and flags are used when
3606 # linking a shared library.
3607 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3610 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3615 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3616 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3619 case $cc_basename in
3621 # NonStop-UX NCC 3.20
3622 # FIXME: insert proper C++ library support
3623 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3626 # FIXME: insert proper C++ library support
3627 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3632 # FIXME: insert proper C++ library support
3633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3636 # FIXME: insert proper C++ library support
3637 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3640 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3641 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3643 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3644 _LT_AC_TAGVAR(LD, $1)="$LD"
3647 ## There is no encapsulation within the following macros, do not change
3648 ## the running order or otherwise move them around unless you know exactly
3649 ## what you are doing...
3650 AC_LIBTOOL_POSTDEP_PREDEP($1)
3651 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3652 AC_LIBTOOL_PROG_CC_C_O($1)
3653 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3654 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3655 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3656 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3657 AC_LIBTOOL_SYS_LIB_STRIP
3658 AC_LIBTOOL_DLOPEN_SELF($1)
3660 AC_LIBTOOL_CONFIG($1)
3667 with_gnu_ldcxx=$with_gnu_ld
3668 with_gnu_ld=$lt_save_with_gnu_ld
3669 lt_cv_path_LDCXX=$lt_cv_path_LD
3670 lt_cv_path_LD=$lt_save_path_LD
3671 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3672 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3673 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3675 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3676 # ------------------------
3677 # Figure out "hidden" library dependencies from verbose
3678 # compiler output when linking a shared library.
3679 # Parse the compiler output and extract the necessary
3680 # objects, libraries and library flags.
3681 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3682 dnl we can't use the lt_simple_compile_test_code here,
3683 dnl because it contains code intended for an executable,
3684 dnl not a library. It's possible we should let each
3685 dnl tag define a new lt_????_link_test_code variable,
3686 dnl but it's only used here...
3687 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3689 void foo (void) { a = 0; }
3691 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3695 Foo (void) { a = 0; }
3700 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3708 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3711 public void bar (void) {
3717 dnl Parse the compiler output and extract the necessary
3718 dnl objects, libraries and library flags.
3719 if AC_TRY_EVAL(ac_compile); then
3720 # Parse the compiler output and extract the necessary
3721 # objects, libraries and library flags.
3723 # Sentinel used to keep track of whether or not we are before
3724 # the conftest object file.
3725 pre_test_object_deps_done=no
3727 # The `*' in the case matches for architectures that use `case' in
3728 # $output_verbose_cmd can trigger glob expansion during the loop
3729 # eval without this substitution.
3730 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3732 for p in `eval $output_verbose_link_cmd`; do
3736 # Some compilers place space between "-{L,R}" and the path.
3739 || test $p = "-R"; then
3746 if test "$pre_test_object_deps_done" = no; then
3749 # Internal compiler library paths should come after those
3750 # provided the user. The postdeps already come after the
3751 # user supplied libs so there is no need to process them.
3752 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3753 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3755 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3758 # The "-l" case would never come before the object being
3759 # linked, so don't bother handling this case.
3762 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3763 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3765 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3771 # This assumes that the test object file only shows up
3772 # once in the compiler output.
3773 if test "$p" = "conftest.$objext"; then
3774 pre_test_object_deps_done=yes
3778 if test "$pre_test_object_deps_done" = no; then
3779 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3780 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3782 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3785 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3786 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3788 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3793 *) ;; # Ignore the rest.
3801 echo "libtool.m4: error: problem compiling $1 test program"
3804 $rm -f confest.$objext
3806 # PORTME: override above test on systems where it is broken
3810 case $cc_basename in
3812 # Adding this requires a known-good setup of shared libraries for
3813 # Sun compiler versions before 5.6, else PIC objects from an old
3814 # archive will be linked into the output, leading to subtle bugs.
3815 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3821 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3822 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3824 ])# AC_LIBTOOL_POSTDEP_PREDEP
3826 # AC_LIBTOOL_LANG_F77_CONFIG
3827 # ------------------------
3828 # Ensure that the configuration vars for the C compiler are
3829 # suitably defined. Those variables are subsequently used by
3830 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3831 #AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3832 #AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3833 #[AC_REQUIRE([AC_PROG_F77])
3837 #_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3838 #_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3839 #_LT_AC_TAGVAR(always_export_symbols, $1)=no
3840 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3841 #_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3842 #_LT_AC_TAGVAR(hardcode_direct, $1)=no
3843 #_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3844 #_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3845 #_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3846 #_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3847 #_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3848 #_LT_AC_TAGVAR(module_cmds, $1)=
3849 #_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3850 #_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3851 #_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3852 #_LT_AC_TAGVAR(no_undefined_flag, $1)=
3853 #_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3854 #_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3856 ## Source file extension for f77 test sources.
3859 ## Object file extension for compiled f77 test sources.
3861 #_LT_AC_TAGVAR(objext, $1)=$objext
3863 ## Code to be used in simple compile tests
3864 #lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3866 ## Code to be used in simple link tests
3867 #lt_simple_link_test_code=" program t\n end\n"
3869 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
3870 #_LT_AC_SYS_COMPILER
3872 ## save warnings/boilerplate of simple test code
3873 #_LT_COMPILER_BOILERPLATE
3874 #_LT_LINKER_BOILERPLATE
3876 ## Allow CC to be a program name with arguments.
3880 #_LT_AC_TAGVAR(compiler, $1)=$CC
3881 #_LT_CC_BASENAME([$compiler])
3883 #AC_MSG_CHECKING([if libtool supports shared libraries])
3884 #AC_MSG_RESULT([$can_build_shared])
3886 #AC_MSG_CHECKING([whether to build shared libraries])
3887 #test "$can_build_shared" = "no" && enable_shared=no
3889 ## On AIX, shared libraries and static libraries use the same namespace, and
3890 ## are all built from PIC.
3893 # test "$enable_shared" = yes && enable_static=no
3894 # if test -n "$RANLIB"; then
3895 # archive_cmds="$archive_cmds~\$RANLIB \$lib"
3896 # postinstall_cmds='$RANLIB $lib'
3900 # if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3901 # test "$enable_shared" = yes && enable_static=no
3905 #AC_MSG_RESULT([$enable_shared])
3907 #AC_MSG_CHECKING([whether to build static libraries])
3908 ## Make sure either enable_shared or enable_static is yes.
3909 #test "$enable_shared" = yes || enable_static=yes
3910 #AC_MSG_RESULT([$enable_static])
3912 #test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3914 #_LT_AC_TAGVAR(GCC, $1)="$G77"
3915 #_LT_AC_TAGVAR(LD, $1)="$LD"
3917 #AC_LIBTOOL_PROG_COMPILER_PIC($1)
3918 #AC_LIBTOOL_PROG_CC_C_O($1)
3919 #AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3920 #AC_LIBTOOL_PROG_LD_SHLIBS($1)
3921 #AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3922 #AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3923 #AC_LIBTOOL_SYS_LIB_STRIP
3926 #AC_LIBTOOL_CONFIG($1)
3930 #])# AC_LIBTOOL_LANG_F77_CONFIG
3933 # AC_LIBTOOL_LANG_GCJ_CONFIG
3934 # --------------------------
3935 # Ensure that the configuration vars for the C compiler are
3936 # suitably defined. Those variables are subsequently used by
3937 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3938 #AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3939 #AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3942 ## Source file extension for Java test sources.
3945 ## Object file extension for compiled Java test sources.
3947 #_LT_AC_TAGVAR(objext, $1)=$objext
3949 ## Code to be used in simple compile tests
3950 #lt_simple_compile_test_code="class foo {}\n"
3952 ## Code to be used in simple link tests
3953 #lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3955 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
3956 #_LT_AC_SYS_COMPILER
3958 ## save warnings/boilerplate of simple test code
3959 #_LT_COMPILER_BOILERPLATE
3960 #_LT_LINKER_BOILERPLATE
3962 ## Allow CC to be a program name with arguments.
3966 #_LT_AC_TAGVAR(compiler, $1)=$CC
3967 #_LT_CC_BASENAME([$compiler])
3969 ## GCJ did not exist at the time GCC didn't implicitly link libc in.
3970 #_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3972 #_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3975 ### There is no encapsulation within the following macros, do not change
3976 ### the running order or otherwise move them around unless you know exactly
3977 ### what you are doing...
3978 #AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3979 #AC_LIBTOOL_PROG_COMPILER_PIC($1)
3980 #AC_LIBTOOL_PROG_CC_C_O($1)
3981 #AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3982 #AC_LIBTOOL_PROG_LD_SHLIBS($1)
3983 #AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3984 #AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3985 #AC_LIBTOOL_SYS_LIB_STRIP
3986 #AC_LIBTOOL_DLOPEN_SELF($1)
3988 #AC_LIBTOOL_CONFIG($1)
3992 #])# AC_LIBTOOL_LANG_GCJ_CONFIG
3995 # AC_LIBTOOL_LANG_RC_CONFIG
3996 # --------------------------
3997 # Ensure that the configuration vars for the Windows resource compiler are
3998 # suitably defined. Those variables are subsequently used by
3999 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4000 #AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4001 #AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4004 ## Source file extension for RC test sources.
4007 ## Object file extension for compiled RC test sources.
4009 #_LT_AC_TAGVAR(objext, $1)=$objext
4011 ## Code to be used in simple compile tests
4012 #lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4014 ## Code to be used in simple link tests
4015 #lt_simple_link_test_code="$lt_simple_compile_test_code"
4017 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
4018 #_LT_AC_SYS_COMPILER
4020 ## save warnings/boilerplate of simple test code
4021 #_LT_COMPILER_BOILERPLATE
4022 #_LT_LINKER_BOILERPLATE
4024 ## Allow CC to be a program name with arguments.
4028 #_LT_AC_TAGVAR(compiler, $1)=$CC
4029 #_LT_CC_BASENAME([$compiler])
4030 #_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4032 #AC_LIBTOOL_CONFIG($1)
4036 #])# AC_LIBTOOL_LANG_RC_CONFIG
4039 # AC_LIBTOOL_CONFIG([TAGNAME])
4040 # ----------------------------
4041 # If TAGNAME is not passed, then create an initial libtool script
4042 # with a default configuration from the untagged config vars. Otherwise
4043 # add code to config.status for appending the configuration named by
4044 # TAGNAME from the matching tagged config vars.
4045 AC_DEFUN([AC_LIBTOOL_CONFIG],
4046 [# The else clause should only fire when bootstrapping the
4047 # libtool distribution, otherwise you forgot to ship ltmain.sh
4048 # with your package, and you will get complaints that there are
4049 # no rules to generate ltmain.sh.
4050 if test -f "$ltmain"; then
4051 # See if we are running on zsh, and set the options which allow our commands through
4052 # without removal of \ escapes.
4053 if test -n "${ZSH_VERSION+set}" ; then
4054 setopt NO_GLOB_SUBST
4056 # Now quote all the things that may contain metacharacters while being
4057 # careful not to overquote the AC_SUBSTed values. We take copies of the
4058 # variables and quote the copies for generation of the libtool script.
4059 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4061 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4062 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4063 deplibs_check_method reload_flag reload_cmds need_locks \
4064 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4065 lt_cv_sys_global_symbol_to_c_name_address \
4066 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4067 old_postinstall_cmds old_postuninstall_cmds \
4068 _LT_AC_TAGVAR(compiler, $1) \
4069 _LT_AC_TAGVAR(CC, $1) \
4070 _LT_AC_TAGVAR(LD, $1) \
4071 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4072 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4073 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4074 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4075 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4076 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4077 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4078 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4079 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4080 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4081 _LT_AC_TAGVAR(predep_objects, $1) \
4082 _LT_AC_TAGVAR(postdep_objects, $1) \
4083 _LT_AC_TAGVAR(predeps, $1) \
4084 _LT_AC_TAGVAR(postdeps, $1) \
4085 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4086 _LT_AC_TAGVAR(archive_cmds, $1) \
4087 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4088 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4089 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4090 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4091 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4092 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4093 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4094 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4096 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4097 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4098 _LT_AC_TAGVAR(module_cmds, $1) \
4099 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4100 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4101 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4102 _LT_AC_TAGVAR(include_expsyms, $1); do
4105 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4106 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4107 _LT_AC_TAGVAR(archive_cmds, $1) | \
4108 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4109 _LT_AC_TAGVAR(module_cmds, $1) | \
4110 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4111 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4112 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4113 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4114 postinstall_cmds | postuninstall_cmds | \
4115 old_postinstall_cmds | old_postuninstall_cmds | \
4116 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4117 # Double-quote double-evaled strings.
4118 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4121 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4127 *'\[$]0 --fallback-echo"')
4128 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4133 [cfgfile="${ofile}T"
4134 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4140 cat <<__EOF__ >> "$cfgfile"
4144 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4145 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4146 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4148 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4149 # Free Software Foundation, Inc.
4151 # This file is part of GNU Libtool:
4152 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4154 # This program is free software; you can redistribute it and/or modify
4155 # it under the terms of the GNU General Public License as published by
4156 # the Free Software Foundation; either version 2 of the License, or
4157 # (at your option) any later version.
4159 # This program is distributed in the hope that it will be useful, but
4160 # WITHOUT ANY WARRANTY; without even the implied warranty of
4161 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4162 # General Public License for more details.
4164 # You should have received a copy of the GNU General Public License
4165 # along with this program; if not, write to the Free Software
4166 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4168 # As a special exception to the GNU General Public License, if you
4169 # distribute this file as part of a program that contains a
4170 # configuration script generated by Autoconf, you may include it under
4171 # the same distribution terms that you use for the rest of that program.
4173 # A sed program that does not truncate output.
4176 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4177 Xsed="$SED -e 1s/^X//"
4179 # The HP-UX ksh and POSIX shell print the target directory to stdout
4181 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4183 # The names of the tagged configurations supported by this script.
4186 # ### BEGIN LIBTOOL CONFIG],
4187 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4189 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4191 # Shell to use when invoking shell scripts.
4194 # Whether or not to build shared libraries.
4195 build_libtool_libs=$enable_shared
4197 # Whether or not to build static libraries.
4198 build_old_libs=$enable_static
4200 # Whether or not to add -lc for building shared libraries.
4201 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4203 # Whether or not to disallow shared libs when runtime libs are static
4204 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4206 # Whether or not to optimize for fast installation.
4207 fast_install=$enable_fast_install
4210 host_alias=$host_alias
4215 build_alias=$build_alias
4219 # An echo program that does not interpret backslashes.
4224 AR_FLAGS=$lt_AR_FLAGS
4229 # A language-specific compiler.
4230 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4232 # Is the compiler the GNU C compiler?
4233 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4238 # The linker used to build libraries.
4239 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4241 # Whether we need hard or soft links.
4244 # A BSD-compatible nm program.
4247 # A symbol stripping program
4250 # Used to examine libraries when file_magic_cmd begins "file"
4251 MAGIC_CMD=$MAGIC_CMD
4253 # Used on cygwin: DLL creation program.
4256 # Used on cygwin: object dumper.
4259 # Used on cygwin: assembler.
4262 # The name of the directory that contains temporary libtool files.
4265 # How to create reloadable object files.
4266 reload_flag=$lt_reload_flag
4267 reload_cmds=$lt_reload_cmds
4269 # How to pass a linker flag through the compiler.
4270 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4272 # Object file suffix (normally "o").
4275 # Old archive suffix (normally "a").
4278 # Shared library suffix (normally ".so").
4279 shrext_cmds='$shrext_cmds'
4281 # Executable file suffix (normally "").
4284 # Additional compiler flags for building library objects.
4285 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4288 # What is the maximum length of a command?
4289 max_cmd_len=$lt_cv_sys_max_cmd_len
4291 # Does compiler simultaneously support -c and -o options?
4292 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4294 # Must we lock files when doing compilation?
4295 need_locks=$lt_need_locks
4297 # Do we need the lib prefix for modules?
4298 need_lib_prefix=$need_lib_prefix
4300 # Do we need a version for libraries?
4301 need_version=$need_version
4303 # Whether dlopen is supported.
4304 dlopen_support=$enable_dlopen
4306 # Whether dlopen of programs is supported.
4307 dlopen_self=$enable_dlopen_self
4309 # Whether dlopen of statically linked programs is supported.
4310 dlopen_self_static=$enable_dlopen_self_static
4312 # Compiler flag to prevent dynamic linking.
4313 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4315 # Compiler flag to turn off builtin functions.
4316 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4318 # Compiler flag to allow reflexive dlopens.
4319 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4321 # Compiler flag to generate shared objects directly from archives.
4322 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4324 # Compiler flag to generate thread-safe objects.
4325 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4327 # Library versioning type.
4328 version_type=$version_type
4330 # Format of library name prefix.
4331 libname_spec=$lt_libname_spec
4333 # List of archive names. First name is the real one, the rest are links.
4334 # The last name is the one that the linker finds with -lNAME.
4335 library_names_spec=$lt_library_names_spec
4337 # The coded name of the library, if different from the real name.
4338 soname_spec=$lt_soname_spec
4340 # Commands used to build and install an old-style archive.
4342 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4343 old_postinstall_cmds=$lt_old_postinstall_cmds
4344 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4346 # Create an old-style archive from a shared archive.
4347 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4349 # Create a temporary old-style archive to link instead of a shared archive.
4350 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4352 # Commands used to build and install a shared archive.
4353 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4354 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4355 postinstall_cmds=$lt_postinstall_cmds
4356 postuninstall_cmds=$lt_postuninstall_cmds
4358 # Commands used to build a loadable module (assumed same as above if empty)
4359 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4360 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4362 # Commands to strip libraries.
4363 old_striplib=$lt_old_striplib
4364 striplib=$lt_striplib
4366 # Dependencies to place before the objects being linked to create a
4368 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4370 # Dependencies to place after the objects being linked to create a
4372 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4374 # Dependencies to place before the objects being linked to create a
4376 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4378 # Dependencies to place after the objects being linked to create a
4380 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4382 # The library search path used internally by the compiler when linking
4384 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4386 # Method to check whether dependent libraries are shared objects.
4387 deplibs_check_method=$lt_deplibs_check_method
4389 # Command to use when deplibs_check_method == file_magic.
4390 file_magic_cmd=$lt_file_magic_cmd
4392 # Flag that allows shared libraries with undefined symbols to be built.
4393 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4395 # Flag that forces no undefined symbols.
4396 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4398 # Commands used to finish a libtool library installation in a directory.
4399 finish_cmds=$lt_finish_cmds
4401 # Same as above, but a single script fragment to be evaled but not shown.
4402 finish_eval=$lt_finish_eval
4404 # Take the output of nm and produce a listing of raw symbols and C names.
4405 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4407 # Transform the output of nm in a proper C declaration
4408 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4410 # Transform the output of nm in a C name address pair
4411 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4413 # This is the shared library runtime path variable.
4414 runpath_var=$runpath_var
4416 # This is the shared library path variable.
4417 shlibpath_var=$shlibpath_var
4419 # Is shlibpath searched before the hard-coded library search path?
4420 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4422 # How to hardcode a shared library path into an executable.
4423 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4425 # Whether we should hardcode library paths into libraries.
4426 hardcode_into_libs=$hardcode_into_libs
4428 # Flag to hardcode \$libdir into a binary during linking.
4429 # This must work even if \$libdir does not exist.
4430 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4432 # If ld is used when linking, flag to hardcode \$libdir into
4433 # a binary during linking. This must work even if \$libdir does
4435 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4437 # Whether we need a single -rpath flag with a separated argument.
4438 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4440 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4442 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4444 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4446 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4448 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4449 # the resulting binary.
4450 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4452 # Set to yes if building a shared library automatically hardcodes DIR into the library
4453 # and all subsequent libraries and executables linked against it.
4454 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4456 # Variables whose values should be saved in libtool wrapper scripts and
4457 # restored at relink time.
4458 variables_saved_for_relink="$variables_saved_for_relink"
4460 # Whether libtool must link a program against all its dependency libraries.
4461 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4463 # Compile-time system search path for libraries
4464 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4466 # Run-time system search path for libraries
4467 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4469 # Fix the shell variable \$srcfile for the compiler.
4470 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4472 # Set to yes if exported symbols are required.
4473 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4475 # The commands to list exported symbols.
4476 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4478 # The commands to extract the exported symbol list from a shared archive.
4479 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4481 # Symbols that should not be listed in the preloaded symbols.
4482 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4484 # Symbols that must always be exported.
4485 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4488 [# ### END LIBTOOL CONFIG],
4489 [# ### END LIBTOOL TAG CONFIG: $tagname])
4496 cat <<\EOF >> "$cfgfile"
4498 # AIX sometimes has problems with the GCC collect2 program. For some
4499 # reason, if we set the COLLECT_NAMES environment variable, the problems
4500 # vanish in a puff of smoke.
4501 if test "X${COLLECT_NAMES+set}" != Xset; then
4503 export COLLECT_NAMES
4509 # We use sed instead of cat because bash on DJGPP gets confused if
4510 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4511 # text mode, it properly converts lines to CR/LF. This bash problem
4512 # is reportedly fixed, but why not run on old versions too?
4513 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4515 mv -f "$cfgfile" "$ofile" || \
4516 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4520 # If there is no Makefile yet, we rely on a make rule to execute
4521 # `config.status --recheck' to rerun these tests and create the
4522 # libtool script then.
4523 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4524 if test -f "$ltmain_in"; then
4525 test -f Makefile && make "$ltmain"
4528 ])# AC_LIBTOOL_CONFIG
4531 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4532 # -------------------------------------------
4533 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4534 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4536 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4538 if test "$GCC" = yes; then
4539 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4541 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4542 lt_cv_prog_compiler_rtti_exceptions,
4543 [-fno-rtti -fno-exceptions], [],
4544 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4546 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4549 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4550 # ---------------------------------
4551 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4552 [AC_REQUIRE([AC_CANONICAL_HOST])
4553 AC_REQUIRE([AC_PROG_NM])
4554 AC_REQUIRE([AC_OBJEXT])
4555 # Check for command to grab the raw symbol name followed by C symbol from nm.
4556 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4557 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4559 # These are sane defaults that work on at least a few old systems.
4560 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4562 # Character class describing NM global symbol codes.
4563 symcode='[[BCDEGRST]]'
4565 # Regexp to match symbols that can be accessed directly from C.
4566 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4568 # Transform an extracted symbol line into a proper C declaration
4569 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4571 # Transform an extracted symbol line into symbol name and symbol address
4572 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'"
4574 # Define system-specific variables.
4579 cygwin* | mingw* | pw32*)
4580 symcode='[[ABCDGISTW]]'
4582 hpux*) # Its linker distinguishes data from code symbols
4583 if test "$host_cpu" = ia64; then
4584 symcode='[[ABCDEGRST]]'
4586 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4587 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'"
4590 if test "$host_cpu" = ia64; then
4591 symcode='[[ABCDGIRSTW]]'
4592 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4593 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'"
4597 symcode='[[BCDEGRST]]'
4600 symcode='[[BCDEGQRST]]'
4606 symcode='[[DFNSTU]]'
4610 # Handle CRLF in mingw tool chain
4614 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4618 # If we're using GNU nm, then use its standard symbol codes.
4619 case `$NM -V 2>&1` in
4620 *GNU* | *'with BFD'*)
4621 symcode='[[ABCDGIRSTW]]' ;;
4624 # Try without a prefix undercore, then with it.
4625 for ac_symprfx in "" "_"; do
4627 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4628 symxfrm="\\1 $ac_symprfx\\2 \\2"
4630 # Write the raw and C identifiers.
4631 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4633 # Check to see that the pipe works correctly.
4637 cat > conftest.$ac_ext <<EOF
4642 void nm_test_func(){}
4646 int main(){nm_test_var='a';nm_test_func();return(0);}
4649 if AC_TRY_EVAL(ac_compile); then
4650 # Now try to grab the symbols.
4652 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4653 # Try sorting and uniquifying the output.
4654 if sort "$nlist" | uniq > "$nlist"T; then
4655 mv -f "$nlist"T "$nlist"
4660 # Make sure that we snagged all the symbols we need.
4661 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4662 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4663 cat <<EOF > conftest.$ac_ext
4669 # Now generate the symbol file.
4670 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4672 cat <<EOF >> conftest.$ac_ext
4673 #if defined (__STDC__) && __STDC__
4674 # define lt_ptr_t void *
4676 # define lt_ptr_t char *
4680 /* The mapping between symbol names and symbols. */
4685 lt_preloaded_symbols[[]] =
4688 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4689 cat <<\EOF >> conftest.$ac_ext
4697 # Now try linking the two files.
4698 mv conftest.$ac_objext conftstm.$ac_objext
4699 lt_save_LIBS="$LIBS"
4700 lt_save_CFLAGS="$CFLAGS"
4701 LIBS="conftstm.$ac_objext"
4702 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4703 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4706 LIBS="$lt_save_LIBS"
4707 CFLAGS="$lt_save_CFLAGS"
4709 echo "cannot find nm_test_func in $nlist" >&5
4712 echo "cannot find nm_test_var in $nlist" >&5
4715 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4718 echo "$progname: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4721 rm -f conftest* conftst*
4723 # Do not use the global_symbol_pipe unless it works.
4724 if test "$pipe_works" = yes; then
4727 lt_cv_sys_global_symbol_pipe=
4731 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4732 lt_cv_sys_global_symbol_to_cdecl=
4734 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4735 AC_MSG_RESULT(failed)
4739 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4742 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4743 # ---------------------------------------
4744 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4745 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4746 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4747 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4749 AC_MSG_CHECKING([for $compiler option to produce PIC])
4751 # C++ specific cases for pic, static, wl, etc.
4752 if test "$GXX" = yes; then
4753 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4754 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4758 # All AIX code is PIC.
4759 if test "$host_cpu" = ia64; then
4760 # AIX 5 now supports IA64 processor
4761 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4765 # FIXME: we need at least 68020 code to build shared libraries, but
4766 # adding the `-m68020' flag to GCC prevents building anything better,
4768 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4770 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4771 # PIC is the default for these OSes.
4773 mingw* | os2* | pw32*)
4774 # This hack is so that the source file can tell whether it is being
4775 # built for inclusion in a dll (and should export symbols for example).
4776 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4778 darwin* | rhapsody*)
4779 # PIC is the default on this platform
4780 # Common symbols not allowed in MH_DYLIB files
4781 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4784 # DJGPP does not support shared libraries at all
4785 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4788 if test -d /usr/nec; then
4789 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4793 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4799 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4804 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4810 # All AIX code is PIC.
4811 if test "$host_cpu" = ia64; then
4812 # AIX 5 now supports IA64 processor
4813 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4815 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4819 case $cc_basename in
4821 # Green Hills C++ Compiler
4822 # _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"
4827 # PIC is the default on this platform
4828 # Common symbols not allowed in MH_DYLIB files
4829 case $cc_basename in
4831 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4832 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4837 case $cc_basename in
4839 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4842 # Green Hills C++ Compiler
4843 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4849 freebsd* | kfreebsd*-gnu | dragonfly*)
4850 # FreeBSD uses GNU C++
4852 hpux9* | hpux10* | hpux11*)
4853 case $cc_basename in
4855 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4856 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4857 if test "$host_cpu" != ia64; then
4858 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4862 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4863 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4869 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4877 irix5* | irix6* | nonstopux*)
4878 case $cc_basename in
4880 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4881 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4882 # CC pic flag -KPIC is the default.
4889 case $cc_basename in
4892 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4893 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4897 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4898 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4899 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4902 # Portland Group C++ compiler.
4903 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4904 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4905 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4909 # Make sure the PIC flag is empty. It appears that all Alpha
4910 # Linux and Compaq Tru64 Unix objects are PIC.
4911 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4912 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4923 case $cc_basename in
4925 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4933 osf3* | osf4* | osf5*)
4934 case $cc_basename in
4936 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4939 # Rational C++ 2.4.1
4940 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4943 # Digital/Compaq C++
4944 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4945 # Make sure the PIC flag is empty. It appears that all Alpha
4946 # Linux and Compaq Tru64 Unix objects are PIC.
4947 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4948 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4957 case $cc_basename in
4959 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4966 case $cc_basename in
4968 # Sun C++ 4.2, 5.x and Centerline C++
4969 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4970 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4971 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4974 # Green Hills C++ Compiler
4975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4982 case $cc_basename in
4985 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4986 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4990 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4997 case $cc_basename in
4999 # NonStop-UX NCC 3.20
5000 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5011 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5017 if test "$GCC" = yes; then
5018 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5019 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5023 # All AIX code is PIC.
5024 if test "$host_cpu" = ia64; then
5025 # AIX 5 now supports IA64 processor
5026 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5031 # FIXME: we need at least 68020 code to build shared libraries, but
5032 # adding the `-m68020' flag to GCC prevents building anything better,
5034 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5037 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5038 # PIC is the default for these OSes.
5041 mingw* | pw32* | os2*)
5042 # This hack is so that the source file can tell whether it is being
5043 # built for inclusion in a dll (and should export symbols for example).
5044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5047 darwin* | rhapsody*)
5048 # PIC is the default on this platform
5049 # Common symbols not allowed in MH_DYLIB files
5050 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5054 # Just because we use GCC doesn't mean we suddenly get shared libraries
5055 # on systems that don't support them.
5056 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5061 if test -d /usr/nec; then
5062 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5067 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5074 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5080 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5084 # PORTME Check for flag to pass linker flags through the system compiler.
5087 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5088 if test "$host_cpu" = ia64; then
5089 # AIX 5 now supports IA64 processor
5090 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5092 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5096 # PIC is the default on this platform
5097 # Common symbols not allowed in MH_DYLIB files
5098 case $cc_basename in
5100 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5101 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5106 mingw* | pw32* | os2*)
5107 # This hack is so that the source file can tell whether it is being
5108 # built for inclusion in a dll (and should export symbols for example).
5109 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5112 hpux9* | hpux10* | hpux11*)
5113 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5114 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5121 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5124 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5125 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5128 irix5* | irix6* | nonstopux*)
5129 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5130 # PIC (with -KPIC) is the default.
5131 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5135 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5136 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5140 case $cc_basename in
5142 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5144 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5146 pgcc* | pgf77* | pgf90* | pgf95*)
5147 # Portland Group compilers (*not* the Pentium gcc compiler,
5148 # which looks to be a dead project)
5149 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5150 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5151 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5154 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5155 # All Alpha code is PIC.
5156 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5161 osf3* | osf4* | osf5*)
5162 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5163 # All OSF/1 code is PIC.
5164 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5168 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5169 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5173 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5174 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5175 case $cc_basename in
5177 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5179 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5184 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5185 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5186 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5189 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5190 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5191 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5192 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5196 if test -d /usr/nec ;then
5197 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5198 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5203 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5204 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5208 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5209 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5213 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5218 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5221 # Check to make sure the PIC flag actually works.
5223 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5224 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5225 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5226 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5227 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5229 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5231 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5232 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5235 # For platforms which do not support PIC, -DPIC is meaningless:
5237 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5240 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5246 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5247 # ------------------------------------
5248 # See if the linker supports building shared libraries.
5249 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5250 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5252 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5255 # If we're using GNU nm, then we don't want the "-C" option.
5256 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5257 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5258 _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'
5260 _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'
5264 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5267 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5270 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5275 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5276 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5277 _LT_AC_TAGVAR(archive_cmds, $1)=
5278 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5279 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5280 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5281 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5282 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5283 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5284 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5285 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5286 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5287 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5288 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5289 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5290 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5291 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5292 _LT_AC_TAGVAR(module_cmds, $1)=
5293 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5294 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5295 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5296 # include_expsyms should be a list of space-separated symbols to be *always*
5297 # included in the symbol list
5298 _LT_AC_TAGVAR(include_expsyms, $1)=
5299 # exclude_expsyms can be an extended regexp of symbols to exclude
5300 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5301 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5302 # as well as any symbol that contains `d'.
5303 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5304 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5305 # platforms (ab)use it in PIC code, but their linkers get confused if
5306 # the symbol is explicitly referenced. Since portable code cannot
5307 # rely on this symbol name, it's probably fine to never include it in
5308 # preloaded symbol tables.
5309 extract_expsyms_cmds=
5310 # Just being paranoid about ensuring that cc_basename is set.
5311 _LT_CC_BASENAME([$compiler])
5313 cygwin* | mingw* | pw32*)
5314 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5315 # When not using gcc, we currently assume that we are using
5316 # Microsoft Visual C++.
5317 if test "$GCC" != yes; then
5326 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5327 if test "$with_gnu_ld" = yes; then
5328 # If archive_cmds runs LD, not CC, wlarc should be empty
5331 # Set some defaults for GNU ld with shared library support. These
5332 # are reset later if shared libraries are not supported. Putting them
5333 # here allows them to be overridden if necessary.
5334 runpath_var=LD_RUN_PATH
5335 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5336 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5337 # ancient GNU ld didn't support --whole-archive et. al.
5338 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5339 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5341 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5343 supports_anon_versioning=no
5344 case `$LD -v 2>/dev/null` in
5345 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5346 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5347 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5348 *\ 2.11.*) ;; # other 2.11 versions
5349 *) supports_anon_versioning=yes ;;
5352 # See if GNU ld supports shared libraries.
5354 aix3* | aix4* | aix5*)
5355 # On AIX/PPC, the GNU linker is very broken
5356 if test "$host_cpu" != ia64; then
5357 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5360 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5361 *** to be unable to reliably create shared libraries on AIX.
5362 *** Therefore, libtool is disabling shared libraries support. If you
5363 *** really care for shared libraries, you may want to modify your PATH
5364 *** so that a non-GNU linker is found, and then restart.
5371 _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)'
5372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5373 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5375 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5376 # that the semantics of dynamic libraries on AmigaOS, at least up
5377 # to version 4, is to share data among multiple programs linked
5378 # with the same dynamic library. Since this doesn't match the
5379 # behavior of shared libraries on other platforms, we can't use
5381 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5385 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5386 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5387 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5388 # support --undefined. This deserves some investigation. FIXME
5389 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5391 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5395 cygwin* | mingw* | pw32*)
5396 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5397 # as there is no search path for DLLs.
5398 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5399 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5400 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5401 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5402 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5404 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5405 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5406 # If the export-symbols file already is a .def file (1st line
5407 # is EXPORTS), use it as is; otherwise, prepend...
5408 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5409 cp $export_symbols $output_objdir/$soname.def;
5411 echo EXPORTS > $output_objdir/$soname.def;
5412 cat $export_symbols >> $output_objdir/$soname.def;
5414 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5421 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5423 case $cc_basename,$host_cpu in
5424 pgcc*) # Portland Group C compiler
5425 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5426 tmp_addflag=' $pic_flag'
5428 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5429 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5430 tmp_addflag=' $pic_flag -Mnomain' ;;
5431 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5432 tmp_addflag=' -i_dynamic' ;;
5433 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5434 tmp_addflag=' -i_dynamic -nofor_main' ;;
5435 ifc* | ifort*) # Intel Fortran compiler
5436 tmp_addflag=' -nofor_main' ;;
5438 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5440 if test $supports_anon_versioning = yes; then
5441 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5442 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5443 $echo "local: *; };" >> $output_objdir/$libname.ver~
5444 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5447 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5452 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5453 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5456 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5457 _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'
5462 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5463 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5466 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5467 *** create shared libraries on Solaris systems. Therefore, libtool
5468 *** is disabling shared libraries support. We urge you to upgrade GNU
5469 *** binutils to release 2.9.1 or newer. Another option is to modify
5470 *** your PATH or compiler configuration so that the native linker is
5471 *** used, and then restart.
5474 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5475 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5476 _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'
5478 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5483 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5485 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5486 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5490 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5491 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5492 _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'
5494 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5499 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5501 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5502 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5503 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5506 # PORTME fill in a description of your system's linker (not GNU ld)
5509 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5510 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5511 _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'
5512 # Note: this linker hardcodes the directories in LIBPATH if there
5513 # are no directories specified by -L.
5514 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5515 if test "$GCC" = yes && test -z "$link_static_flag"; then
5516 # Neither direct hardcoding nor static linking is supported with a
5518 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5523 if test "$host_cpu" = ia64; then
5524 # On IA64, the linker does run time linking by default, so we don't
5525 # have to do anything special.
5526 aix_use_runtimelinking=no
5527 exp_sym_flag='-Bexport'
5530 # If we're using GNU nm, then we don't want the "-C" option.
5531 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5532 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5533 _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'
5535 _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'
5537 aix_use_runtimelinking=no
5539 # Test if we are trying to use run time linking or normal
5540 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5541 # need to do runtime linking.
5542 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5543 for ld_flag in $LDFLAGS; do
5544 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5545 aix_use_runtimelinking=yes
5551 exp_sym_flag='-bexport'
5552 no_entry_flag='-bnoentry'
5555 # When large executables or shared objects are built, AIX ld can
5556 # have problems creating the table of contents. If linking a library
5557 # or program results in "error TOC overflow" add -mminimal-toc to
5558 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5559 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5561 _LT_AC_TAGVAR(archive_cmds, $1)=''
5562 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5563 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5564 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5566 if test "$GCC" = yes; then
5567 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5568 # We only want to do this on AIX 4.2 and lower, the check
5569 # below for broken collect2 doesn't work under 4.3+
5570 collect2name=`${CC} -print-prog-name=collect2`
5571 if test -f "$collect2name" && \
5572 strings "$collect2name" | grep resolve_lib_name >/dev/null
5574 # We have reworked collect2
5575 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5577 # We have old collect2
5578 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5579 # It fails to find uninstalled libraries when the uninstalled
5580 # path is not listed in the libpath. Setting hardcode_minus_L
5581 # to unsupported forces relinking
5582 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5584 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5587 shared_flag='-shared'
5588 if test "$aix_use_runtimelinking" = yes; then
5589 shared_flag="$shared_flag "'${wl}-G'
5593 if test "$host_cpu" = ia64; then
5594 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5595 # chokes on -Wl,-G. The following line is correct:
5598 if test "$aix_use_runtimelinking" = yes; then
5599 shared_flag='${wl}-G'
5601 shared_flag='${wl}-bM:SRE'
5606 # It seems that -bexpall does not export symbols beginning with
5607 # underscore (_), so it is better to generate a list of symbols to export.
5608 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5609 if test "$aix_use_runtimelinking" = yes; then
5610 # Warning - without using the other runtime loading flags (-brtl),
5611 # -berok will link without error, but may produce a broken library.
5612 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5613 # Determine the default libpath from the value encoded in an empty executable.
5614 _LT_AC_SYS_LIBPATH_AIX
5615 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5616 _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"
5618 if test "$host_cpu" = ia64; then
5619 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5620 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5621 _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"
5623 # Determine the default libpath from the value encoded in an empty executable.
5624 _LT_AC_SYS_LIBPATH_AIX
5625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5626 # Warning - without using the other run time loading flags,
5627 # -berok will link without error, but may produce a broken library.
5628 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5629 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5630 # -bexpall does not export symbols beginning with underscore (_)
5631 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5632 # Exported symbols can be pulled into shared objects from archives
5633 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5634 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5635 # This is similar to how AIX traditionally builds its shared libraries.
5636 _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'
5642 _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)'
5643 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5644 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5645 # see comment about different semantics on the GNU ld section
5646 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5650 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5653 cygwin* | mingw* | pw32*)
5654 # When not using gcc, we currently assume that we are using
5655 # Microsoft Visual C++.
5656 # hardcode_libdir_flag_spec is actually meaningless, as there is
5657 # no search path for DLLs.
5658 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5659 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5660 # Tell ltmain to make .lib files, not .a files.
5662 # Tell ltmain to make .dll files, not .so files.
5664 # FIXME: Setting linknames here is a bad hack.
5665 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5666 # The linker will automatically build a .lib file if we build a DLL.
5667 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5668 # FIXME: Should let the user specify the lib program.
5669 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5670 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5671 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5674 darwin* | rhapsody*)
5676 rhapsody* | darwin1.[[012]])
5677 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5680 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5681 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5683 case ${MACOSX_DEPLOYMENT_TARGET} in
5685 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5688 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5694 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5695 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5696 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5697 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5698 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5699 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5700 if test "$GCC" = yes ; then
5701 output_verbose_link_cmd='echo'
5702 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5703 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5704 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5705 _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}'
5706 _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}'
5708 case $cc_basename in
5710 output_verbose_link_cmd='echo'
5711 _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'
5712 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5713 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5714 _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}'
5715 _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}'
5718 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5725 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5726 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5727 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5731 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5734 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5735 # support. Future versions do this automatically, but an explicit c++rt0.o
5736 # does not break anything, and helps significantly (at the cost of a little
5739 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5740 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5741 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5742 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5745 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5747 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5748 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5749 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5750 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5753 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5754 freebsd* | kfreebsd*-gnu | dragonfly*)
5755 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5756 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5757 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5758 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5762 if test "$GCC" = yes; then
5763 _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'
5765 _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'
5767 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5768 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5769 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5771 # hardcode_minus_L: Not really in the search PATH,
5772 # but as the default location of the library.
5773 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5774 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5778 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5781 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5784 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5790 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5793 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5797 if test "$with_gnu_ld" = no; then
5800 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5801 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5802 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5803 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5804 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5807 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5808 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5809 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5811 # hardcode_minus_L: Not really in the search PATH,
5812 # but as the default location of the library.
5813 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5816 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5817 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5818 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5819 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821 # hardcode_minus_L: Not really in the search PATH,
5822 # but as the default location of the library.
5823 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5829 irix5* | irix6* | nonstopux*)
5830 if test "$GCC" = yes; then
5831 _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'
5833 _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'
5834 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5836 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5837 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5838 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5842 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5843 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5845 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5847 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5848 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5849 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5853 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5854 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5855 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5856 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5857 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5861 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5862 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5863 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5864 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5865 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5867 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5870 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5871 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5872 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5875 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5876 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5883 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5884 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5885 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5886 _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'
5887 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5891 if test "$GCC" = yes; then
5892 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5893 _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'
5895 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5896 _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'
5898 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5899 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5902 osf4* | osf5*) # as osf3* with the addition of -msym flag
5903 if test "$GCC" = yes; then
5904 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5905 _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'
5906 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5908 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5909 _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'
5910 _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~
5911 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
5913 # Both c and cxx compiler support -rpath directly
5914 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5916 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5920 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5921 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5922 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5923 runpath_var=LD_RUN_PATH
5924 hardcode_runpath_var=yes
5928 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5929 if test "$GCC" = yes; then
5931 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5932 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5933 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5936 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5937 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5938 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5940 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5941 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5943 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5945 # The compiler driver will combine linker options so we
5946 # cannot just pass the convience library names through
5947 # without $wl, iff we do not link with $LD.
5948 # Luckily, gcc supports the same syntax we need for Sun Studio.
5949 # Supported since Solaris 2.6 (maybe 2.5.1?)
5952 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5954 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
5957 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5961 if test "x$host_vendor" = xsequent; then
5962 # Use $CC to link under sequent, because it throws in some extra .o
5963 # files that make .init and .fini sections work.
5964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5966 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5968 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5969 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5970 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5971 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5975 case $host_vendor in
5977 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5981 ## LD is ld it makes a PLAMLIB
5982 ## CC just makes a GrossModule.
5983 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5984 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5985 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5988 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5989 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5992 runpath_var='LD_RUN_PATH'
5993 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5997 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5998 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5999 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6003 if test -d /usr/nec; then
6004 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6005 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6006 runpath_var=LD_RUN_PATH
6007 hardcode_runpath_var=yes
6008 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6013 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6014 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6015 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6016 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6017 hardcode_runpath_var=yes
6018 runpath_var=LD_RUN_PATH
6021 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6022 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6023 if test "$GCC" = yes; then
6024 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6026 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6028 runpath_var='LD_RUN_PATH'
6029 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6033 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6034 # $CC -shared without GNU ld will not create a library from C++
6035 # object files and a static libstdc++, better avoid it by now
6036 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6037 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6038 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6039 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6040 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6041 runpath_var='LD_RUN_PATH'
6045 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6047 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6051 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6056 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6057 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6059 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6060 if test "$GCC" = yes; then
6061 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6065 # Do we need to explicitly link libc?
6067 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6069 # Assume -lc should be added
6070 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6072 if test "$enable_shared" = yes && test "$GCC" = yes; then
6073 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6075 # FIXME: we may have to deal with multi-command sequences.
6078 # Test whether the compiler implicitly links with -lc since on some
6079 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6080 # to ld, don't add -lc before -lgcc.
6081 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6083 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6085 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6088 libobjs=conftest.$ac_objext
6090 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6096 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6097 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6098 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6100 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6102 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6104 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6106 cat conftest.err 1>&5
6109 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6115 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6118 # _LT_AC_FILE_LTDLL_C
6119 # -------------------
6120 # Be careful that the start marker always follows a newline.
6121 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6122 # /* ltdll.c starts here */
6123 # #define WIN32_LEAN_AND_MEAN
6124 # #include <windows.h>
6125 # #undef WIN32_LEAN_AND_MEAN
6126 # #include <stdio.h>
6128 # #ifndef __CYGWIN__
6129 # # ifdef __CYGWIN32__
6130 # # define __CYGWIN__ __CYGWIN32__
6134 # #ifdef __cplusplus
6137 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6138 # #ifdef __cplusplus
6143 # #include <cygwin/cygwin_dll.h>
6144 # DECLARE_CYGWIN_DLL( DllMain );
6146 # HINSTANCE __hDllInstance_base;
6149 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6151 # __hDllInstance_base = hInst;
6154 # /* ltdll.c ends here */
6155 ])# _LT_AC_FILE_LTDLL_C
6158 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6159 # ---------------------------------
6160 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6164 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6165 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6166 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6167 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6168 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6169 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6170 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6172 # This is just to silence aclocal about the macro not being used
6173 ifelse([AC_DISABLE_FAST_INSTALL])
6175 #AC_DEFUN([LT_AC_PROG_GCJ],
6176 #[AC_CHECK_TOOL(GCJ, gcj, no)
6177 # test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6178 # AC_SUBST(GCJFLAGS)
6181 #AC_DEFUN([LT_AC_PROG_RC],
6182 #[AC_CHECK_TOOL(RC, windres, no)
6185 ############################################################
6186 # NOTE: This macro has been submitted for inclusion into #
6187 # GNU Autoconf as AC_PROG_SED. When it is available in #
6188 # a released version of Autoconf we should remove this #
6189 # macro and use it instead. #
6190 ############################################################
6193 # Check for a fully-functional sed program, that truncates
6194 # as few characters as possible. Prefer GNU sed if found.
6195 AC_DEFUN([LT_AC_PROG_SED],
6196 [AC_MSG_CHECKING([for a sed that does not truncate output])
6197 AC_CACHE_VAL(lt_cv_path_SED,
6198 [# Loop through the user's path and test for sed and gsed.
6199 # Then use that list of sed's as ones to test for truncation.
6200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204 test -z "$as_dir" && as_dir=.
6205 for lt_ac_prog in sed gsed; do
6206 for ac_exec_ext in '' $ac_executable_extensions; do
6207 if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6208 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6215 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6216 # along with /bin/sed that truncates output.
6217 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6218 test ! -f $lt_ac_sed && continue
6219 cat /dev/null > conftest.in
6221 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6222 # Check for GNU sed and select it if it is found.
6223 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6224 lt_cv_path_SED=$lt_ac_sed
6228 cat conftest.in conftest.in >conftest.tmp
6229 mv conftest.tmp conftest.in
6230 cp conftest.in conftest.nl
6232 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6233 cmp -s conftest.out conftest.nl || break
6234 # 10000 chars as input seems more than enough
6235 test $lt_ac_count -gt 10 && break
6236 lt_ac_count=`expr $lt_ac_count + 1`
6237 if test $lt_ac_count -gt $lt_ac_max; then
6238 lt_ac_max=$lt_ac_count
6239 lt_cv_path_SED=$lt_ac_sed
6245 AC_MSG_RESULT([$SED])