1 # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(AC_AUTOCONF_VERSION, [2.61],,
17 [m4_warning([this file was generated for autoconf 2.61.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24 # serial 51 AC_PROG_LIBTOOL
27 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28 # -----------------------------------------------------------
29 # If this macro is not defined by Autoconf, define it here.
30 m4_ifdef([AC_PROVIDE_IFELSE],
32 [m4_define([AC_PROVIDE_IFELSE],
33 [m4_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
47 dnl And a similar setup for Fortran 77 support
48 AC_PROVIDE_IFELSE([AC_PROG_F77],
50 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
53 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
58 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
60 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
63 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64 ifdef([A][M_PROG_GCJ],
65 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66 ifdef([LT_AC_PROG_GCJ],
67 [define([LT_AC_PROG_GCJ],
68 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
74 AC_DEFUN([_AC_PROG_LIBTOOL],
75 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
80 # This can be used to rebuild libtool when needed
81 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
83 # Always use our own libtool.
84 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
87 # Prevent multiple expansion
88 define([AC_PROG_LIBTOOL], [])
94 AC_DEFUN([AC_LIBTOOL_SETUP],
96 AC_REQUIRE([AC_ENABLE_SHARED])dnl
97 AC_REQUIRE([AC_ENABLE_STATIC])dnl
98 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99 AC_REQUIRE([AC_CANONICAL_HOST])dnl
100 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
101 AC_REQUIRE([AC_PROG_CC])dnl
102 AC_REQUIRE([AC_PROG_LD])dnl
103 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104 AC_REQUIRE([AC_PROG_NM])dnl
106 AC_REQUIRE([AC_PROG_LN_S])dnl
107 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109 AC_REQUIRE([AC_OBJEXT])dnl
110 AC_REQUIRE([AC_EXEEXT])dnl
113 AC_LIBTOOL_SYS_MAX_CMD_LEN
114 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
117 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
118 _LT_AC_PROG_ECHO_BACKSLASH
122 # AIX sometimes has problems with the GCC collect2 program. For some
123 # reason, if we set the COLLECT_NAMES environment variable, the problems
124 # vanish in a puff of smoke.
125 if test "X${COLLECT_NAMES+set}" != Xset; then
132 # Sed substitution that helps us do robust quoting. It backslashifies
133 # metacharacters that are still active within double-quoted strings.
134 Xsed='sed -e 1s/^X//'
135 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
137 # Same as above, but do not quote variable references.
138 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
140 # Sed substitution to delay expansion of an escaped shell variable in a
141 # double_quote_subst'ed string.
142 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
144 # Sed substitution to avoid accidental globbing in evaled expressions
145 no_glob_subst='s/\*/\\\*/g'
151 default_ofile=libtool
154 # All known linkers require a `.a' archive for static linking (except MSVC,
155 # which needs '.lib').
157 ltmain="$ac_aux_dir/ltmain.sh"
158 ofile="$default_ofile"
159 with_gnu_ld="$lt_cv_prog_gnu_ld"
161 AC_CHECK_TOOL(AR, ar, false)
162 AC_CHECK_TOOL(RANLIB, ranlib, :)
163 AC_CHECK_TOOL(STRIP, strip, :)
168 # Set sane defaults for various variables
169 test -z "$AR" && AR=ar
170 test -z "$AR_FLAGS" && AR_FLAGS=cru
171 test -z "$AS" && AS=as
172 test -z "$CC" && CC=cc
173 test -z "$LTCC" && LTCC=$CC
174 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
175 test -z "$DLLTOOL" && DLLTOOL=dlltool
176 test -z "$LD" && LD=ld
177 test -z "$LN_S" && LN_S="ln -s"
178 test -z "$MAGIC_CMD" && MAGIC_CMD=file
179 test -z "$NM" && NM=nm
180 test -z "$SED" && SED=sed
181 test -z "$OBJDUMP" && OBJDUMP=objdump
182 test -z "$RANLIB" && RANLIB=:
183 test -z "$STRIP" && STRIP=:
184 test -z "$ac_objext" && ac_objext=o
186 # Determine commands to create old-style static archives.
187 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
188 old_postinstall_cmds='chmod 644 $oldlib'
189 old_postuninstall_cmds=
191 if test -n "$RANLIB"; then
194 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
197 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
200 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
203 _LT_CC_BASENAME([$compiler])
205 # Only perform the check for file, if the check method requires it
206 case $deplibs_check_method in
208 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
214 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
215 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
216 enable_win32_dll=yes, enable_win32_dll=no)
218 AC_ARG_ENABLE([libtool-lock],
219 [AC_HELP_STRING([--disable-libtool-lock],
220 [avoid locking (might break parallel builds)])])
221 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
224 [AC_HELP_STRING([--with-pic],
225 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
226 [pic_mode="$withval"],
228 test -z "$pic_mode" && pic_mode=default
230 # Use C for the default configuration in the libtool script
232 AC_LIBTOOL_LANG_C_CONFIG
237 # _LT_AC_SYS_COMPILER
238 # -------------------
239 AC_DEFUN([_LT_AC_SYS_COMPILER],
240 [AC_REQUIRE([AC_PROG_CC])dnl
242 # If no C compiler was specified, use CC.
245 # If no C compiler flags were specified, use CFLAGS.
246 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
248 # Allow CC to be a program name with arguments.
250 ])# _LT_AC_SYS_COMPILER
253 # _LT_CC_BASENAME(CC)
254 # -------------------
255 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
256 AC_DEFUN([_LT_CC_BASENAME],
257 [for cc_temp in $1""; do
259 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
260 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
265 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
269 # _LT_COMPILER_BOILERPLATE
270 # ------------------------
271 # Check for compiler boilerplate output or warnings with
272 # the simple compiler test code.
273 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
274 [AC_REQUIRE([LT_AC_PROG_SED])dnl
275 ac_outfile=conftest.$ac_objext
276 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
277 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278 _lt_compiler_boilerplate=`cat conftest.err`
280 ])# _LT_COMPILER_BOILERPLATE
283 # _LT_LINKER_BOILERPLATE
284 # ----------------------
285 # Check for linker boilerplate output or warnings with
286 # the simple link test code.
287 AC_DEFUN([_LT_LINKER_BOILERPLATE],
288 [AC_REQUIRE([LT_AC_PROG_SED])dnl
289 ac_outfile=conftest.$ac_objext
290 echo "$lt_simple_link_test_code" >conftest.$ac_ext
291 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
292 _lt_linker_boilerplate=`cat conftest.err`
294 ])# _LT_LINKER_BOILERPLATE
297 # _LT_AC_SYS_LIBPATH_AIX
298 # ----------------------
299 # Links a minimal program and checks the executable
300 # for the system default hardcoded library path. In most cases,
301 # this is /usr/lib:/lib, but when the MPI compilers are used
302 # the location of the communication and MPI libs are included too.
303 # If we don't find anything, use the default library path according
304 # to the aix ld manual.
305 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
306 [AC_REQUIRE([LT_AC_PROG_SED])dnl
307 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
309 /Import File Strings/,/^$/ {
315 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
316 # Check for a 64-bit object if we didn't find anything.
317 if test -z "$aix_libpath"; then
318 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
320 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
321 ])# _LT_AC_SYS_LIBPATH_AIX
324 # _LT_AC_SHELL_INIT(ARG)
325 # ----------------------
326 AC_DEFUN([_LT_AC_SHELL_INIT],
327 [ifdef([AC_DIVERSION_NOTICE],
328 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
329 [AC_DIVERT_PUSH(NOTICE)])
332 ])# _LT_AC_SHELL_INIT
335 # _LT_AC_PROG_ECHO_BACKSLASH
336 # --------------------------
337 # Add some code to the start of the generated configure script which
338 # will find an echo command which doesn't interpret backslashes.
339 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
341 # Check that we are running under the correct shell.
342 SHELL=${CONFIG_SHELL-/bin/sh}
346 # Remove one level of quotation (which was required for Make).
347 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
352 if test "X[$]1" = X--no-reexec; then
353 # Discard the --no-reexec flag, and continue.
355 elif test "X[$]1" = X--fallback-echo; then
356 # Avoid inline document here, it may be left over
358 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
359 # Yippee, $echo works!
362 # Restart under the correct shell.
363 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
366 if test "X[$]1" = X--fallback-echo; then
367 # used as fallback echo
375 # The HP-UX ksh and POSIX shell print the target directory to stdout
377 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
379 if test -z "$ECHO"; then
380 if test "X${echo_test_string+set}" != Xset; then
381 # find a string as large as possible, as long as the shell can cope with it
382 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
383 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
384 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
385 echo_test_string=`eval $cmd` &&
386 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
393 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
394 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
395 test "X$echo_testing_string" = "X$echo_test_string"; then
398 # The Solaris, AIX, and Digital Unix default echo programs unquote
399 # backslashes. This makes it impossible to quote backslashes using
400 # echo "$something" | sed 's/\\/\\\\/g'
402 # So, first we look for a working echo in the user's PATH.
404 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
405 for dir in $PATH /usr/ucb; do
407 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
408 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
409 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
410 test "X$echo_testing_string" = "X$echo_test_string"; then
417 if test "X$echo" = Xecho; then
418 # We didn't find a better echo, so look for alternatives.
419 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
420 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
421 test "X$echo_testing_string" = "X$echo_test_string"; then
422 # This shell has a builtin print -r that does the trick.
424 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
425 test "X$CONFIG_SHELL" != X/bin/ksh; then
426 # If we have ksh, try running configure again with it.
427 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
428 export ORIGINAL_CONFIG_SHELL
429 CONFIG_SHELL=/bin/ksh
431 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
435 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
436 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
437 test "X$echo_testing_string" = "X$echo_test_string"; then
440 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
441 test "X$echo_testing_string" = 'X\t' &&
442 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
443 test "X$echo_testing_string" = "X$echo_test_string"; then
444 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
446 SHELL="$CONFIG_SHELL"
448 echo="$CONFIG_SHELL [$]0 --fallback-echo"
449 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
450 test "X$echo_testing_string" = 'X\t' &&
451 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
452 test "X$echo_testing_string" = "X$echo_test_string"; then
453 echo="$CONFIG_SHELL [$]0 --fallback-echo"
455 # maybe with a smaller string...
458 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
459 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
466 if test "$prev" != 'sed 50q "[$]0"'; then
467 echo_test_string=`eval $prev`
468 export echo_test_string
469 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
471 # Oops. We lost completely, so just stick with echo.
480 # Copy echo and quote the copy suitably for passing to libtool from
481 # the Makefile, instead of quoting the original, which is used later.
483 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
484 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
488 ])])# _LT_AC_PROG_ECHO_BACKSLASH
493 AC_DEFUN([_LT_AC_LOCK],
494 [AC_ARG_ENABLE([libtool-lock],
495 [AC_HELP_STRING([--disable-libtool-lock],
496 [avoid locking (might break parallel builds)])])
497 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
499 # Some flags need to be propagated to the compiler or linker for good
503 # Find out which ABI we are using.
504 echo 'int i;' > conftest.$ac_ext
505 if AC_TRY_EVAL(ac_compile); then
506 case `/usr/bin/file conftest.$ac_objext` in
518 # Find out which ABI we are using.
519 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
520 if AC_TRY_EVAL(ac_compile); then
521 if test "$lt_cv_prog_gnu_ld" = yes; then
522 case `/usr/bin/file conftest.$ac_objext` in
524 LD="${LD-ld} -melf32bsmip"
527 LD="${LD-ld} -melf32bmipn32"
530 LD="${LD-ld} -melf64bmip"
534 case `/usr/bin/file conftest.$ac_objext` in
550 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
551 s390*-*linux*|sparc*-*linux*)
552 # Find out which ABI we are using.
553 echo 'int i;' > conftest.$ac_ext
554 if AC_TRY_EVAL(ac_compile); then
555 case `/usr/bin/file conftest.o` in
558 x86_64-*kfreebsd*-gnu)
559 LD="${LD-ld} -m elf_i386_fbsd"
562 LD="${LD-ld} -m elf_i386"
564 ppc64-*linux*|powerpc64-*linux*)
565 LD="${LD-ld} -m elf32ppclinux"
568 LD="${LD-ld} -m elf_s390"
571 LD="${LD-ld} -m elf32_sparc"
578 x86_64-*kfreebsd*-gnu)
579 LD="${LD-ld} -m elf_x86_64_fbsd"
582 LD="${LD-ld} -m elf_x86_64"
584 ppc*-*linux*|powerpc*-*linux*)
585 LD="${LD-ld} -m elf64ppc"
588 LD="${LD-ld} -m elf64_s390"
591 LD="${LD-ld} -m elf64_sparc"
601 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
602 SAVE_CFLAGS="$CFLAGS"
603 CFLAGS="$CFLAGS -belf"
604 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
606 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
608 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
609 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
610 CFLAGS="$SAVE_CFLAGS"
614 # Find out which ABI we are using.
615 echo 'int i;' > conftest.$ac_ext
616 if AC_TRY_EVAL(ac_compile); then
617 case `/usr/bin/file conftest.o` in
619 case $lt_cv_prog_gnu_ld in
620 yes*) LD="${LD-ld} -m elf64_sparc" ;;
621 *) LD="${LD-ld} -64" ;;
629 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
630 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
631 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
632 AC_CHECK_TOOL(AS, as, false)
633 AC_CHECK_TOOL(OBJDUMP, objdump, false)
638 need_locks="$enable_libtool_lock"
643 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
644 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
645 # ----------------------------------------------------------------
646 # Check whether the given compiler option works
647 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
648 [AC_REQUIRE([LT_AC_PROG_SED])
649 AC_CACHE_CHECK([$1], [$2],
651 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
652 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
653 lt_compiler_flag="$3"
654 # Insert the option either (1) after the last *FLAGS variable, or
655 # (2) before a word containing "conftest.", or (3) at the end.
656 # Note that $ac_compile itself does not contain backslashes and begins
657 # with a dollar sign (not a hyphen), so the echo should work correctly.
658 # The option is referenced via a variable to avoid confusing sed.
659 lt_compile=`echo "$ac_compile" | $SED \
660 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
661 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
662 -e 's:$: $lt_compiler_flag:'`
663 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
664 (eval "$lt_compile" 2>conftest.err)
666 cat conftest.err >&AS_MESSAGE_LOG_FD
667 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
668 if (exit $ac_status) && test -s "$ac_outfile"; then
669 # The compiler can only warn and ignore the option if not recognized
670 # So say no if there are warnings other than the usual output.
671 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
672 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
673 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
680 if test x"[$]$2" = xyes; then
681 ifelse([$5], , :, [$5])
683 ifelse([$6], , :, [$6])
685 ])# AC_LIBTOOL_COMPILER_OPTION
688 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
689 # [ACTION-SUCCESS], [ACTION-FAILURE])
690 # ------------------------------------------------------------
691 # Check whether the given compiler option works
692 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
693 [AC_REQUIRE([LT_AC_PROG_SED])dnl
694 AC_CACHE_CHECK([$1], [$2],
696 save_LDFLAGS="$LDFLAGS"
697 LDFLAGS="$LDFLAGS $3"
698 echo "$lt_simple_link_test_code" > conftest.$ac_ext
699 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
700 # The linker can only warn and ignore the option if not recognized
701 # So say no if there are warnings
702 if test -s conftest.err; then
703 # Append any errors to the config.log.
704 cat conftest.err 1>&AS_MESSAGE_LOG_FD
705 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
706 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
707 if diff conftest.exp conftest.er2 >/dev/null; then
715 LDFLAGS="$save_LDFLAGS"
718 if test x"[$]$2" = xyes; then
719 ifelse([$4], , :, [$4])
721 ifelse([$5], , :, [$5])
723 ])# AC_LIBTOOL_LINKER_OPTION
726 # AC_LIBTOOL_SYS_MAX_CMD_LEN
727 # --------------------------
728 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
729 [# find the maximum length of command line arguments
730 AC_MSG_CHECKING([the maximum length of command line arguments])
731 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
737 # On DJGPP, this test can blow up pretty badly due to problems in libc
738 # (any single argument exceeding 2000 bytes causes a buffer overrun
739 # during glob expansion). Even if it were fixed, the result of this
740 # check would be larger than it should be.
741 lt_cv_sys_max_cmd_len=12288; # 12K is about right
745 # Under GNU Hurd, this test is not required because there is
746 # no limit to the length of command line arguments.
747 # Libtool will interpret -1 as no limit whatsoever
748 lt_cv_sys_max_cmd_len=-1;
752 # On Win9x/ME, this test blows up -- it succeeds, but takes
753 # about 5 minutes as the teststring grows exponentially.
754 # Worse, since 9x/ME are not pre-emptively multitasking,
755 # you end up with a "frozen" computer, even though with patience
756 # the test eventually succeeds (with a max line length of 256k).
757 # Instead, let's just punt: use the minimum linelength reported by
758 # all of the supported platforms: 8192 (on NT/2K/XP).
759 lt_cv_sys_max_cmd_len=8192;
763 # On AmigaOS with pdksh, this test takes hours, literally.
764 # So we just punt and use a minimum line length of 8192.
765 lt_cv_sys_max_cmd_len=8192;
768 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
769 # This has been around since 386BSD, at least. Likely further.
770 if test -x /sbin/sysctl; then
771 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
772 elif test -x /usr/sbin/sysctl; then
773 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
775 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
777 # And add a safety zone
778 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
779 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
783 # We know the value 262144 and hardcode it with a safety zone (like BSD)
784 lt_cv_sys_max_cmd_len=196608
788 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
789 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
790 # nice to cause kernel panics so lets avoid the loop below.
791 # First set a reasonable default.
792 lt_cv_sys_max_cmd_len=16384
794 if test -x /sbin/sysconfig; then
795 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
796 *1*) lt_cv_sys_max_cmd_len=-1 ;;
801 lt_cv_sys_max_cmd_len=102400
803 sysv5* | sco5v6* | sysv4.2uw2*)
804 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
805 if test -n "$kargmax"; then
806 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
808 lt_cv_sys_max_cmd_len=32768
812 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
813 if test -n "$lt_cv_sys_max_cmd_len"; then
814 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
815 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
817 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
818 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
819 = "XX$teststring") >/dev/null 2>&1 &&
820 new_result=`expr "X$teststring" : ".*" 2>&1` &&
821 lt_cv_sys_max_cmd_len=$new_result &&
822 test $i != 17 # 1/2 MB should be enough
825 teststring=$teststring$teststring
828 # Add a significant safety factor because C++ compilers can tack on massive
829 # amounts of additional arguments before passing them to the linker.
830 # It appears as though 1/2 is a usable value.
831 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
836 if test -n $lt_cv_sys_max_cmd_len ; then
837 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
841 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
846 AC_DEFUN([_LT_AC_CHECK_DLFCN],
847 [AC_CHECK_HEADERS(dlfcn.h)dnl
848 ])# _LT_AC_CHECK_DLFCN
851 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
852 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
853 # ---------------------------------------------------------------------
854 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
855 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
856 if test "$cross_compiling" = yes; then :
859 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
860 lt_status=$lt_dlunknown
861 cat > conftest.$ac_ext <<EOF
862 [#line __oline__ "configure"
863 #include "confdefs.h"
872 # define LT_DLGLOBAL RTLD_GLOBAL
875 # define LT_DLGLOBAL DL_GLOBAL
877 # define LT_DLGLOBAL 0
881 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
882 find out it does not work in some platform. */
883 #ifndef LT_DLLAZY_OR_NOW
885 # define LT_DLLAZY_OR_NOW RTLD_LAZY
888 # define LT_DLLAZY_OR_NOW DL_LAZY
891 # define LT_DLLAZY_OR_NOW RTLD_NOW
894 # define LT_DLLAZY_OR_NOW DL_NOW
896 # define LT_DLLAZY_OR_NOW 0
904 extern "C" void exit (int);
907 void fnord() { int i=42;}
910 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
911 int status = $lt_dlunknown;
915 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
916 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
917 /* dlclose (self); */
925 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
926 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
929 x$lt_dlno_uscore) $1 ;;
930 x$lt_dlneed_uscore) $2 ;;
931 x$lt_dlunknown|x*) $3 ;;
939 ])# _LT_AC_TRY_DLOPEN_SELF
942 # AC_LIBTOOL_DLOPEN_SELF
943 # ----------------------
944 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
945 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
946 if test "x$enable_dlopen" != xyes; then
947 enable_dlopen=unknown
948 enable_dlopen_self=unknown
949 enable_dlopen_self_static=unknown
956 lt_cv_dlopen="load_add_on"
958 lt_cv_dlopen_self=yes
962 lt_cv_dlopen="LoadLibrary"
967 lt_cv_dlopen="dlopen"
972 # if libdl is installed we need to link against it
973 AC_CHECK_LIB([dl], [dlopen],
974 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
977 lt_cv_dlopen_self=yes
982 AC_CHECK_FUNC([shl_load],
983 [lt_cv_dlopen="shl_load"],
984 [AC_CHECK_LIB([dld], [shl_load],
985 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
986 [AC_CHECK_FUNC([dlopen],
987 [lt_cv_dlopen="dlopen"],
988 [AC_CHECK_LIB([dl], [dlopen],
989 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
990 [AC_CHECK_LIB([svld], [dlopen],
991 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
992 [AC_CHECK_LIB([dld], [dld_link],
993 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1002 if test "x$lt_cv_dlopen" != xno; then
1008 case $lt_cv_dlopen in
1010 save_CPPFLAGS="$CPPFLAGS"
1011 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1013 save_LDFLAGS="$LDFLAGS"
1014 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1017 LIBS="$lt_cv_dlopen_libs $LIBS"
1019 AC_CACHE_CHECK([whether a program can dlopen itself],
1020 lt_cv_dlopen_self, [dnl
1021 _LT_AC_TRY_DLOPEN_SELF(
1022 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1023 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1026 if test "x$lt_cv_dlopen_self" = xyes; then
1027 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1028 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1029 lt_cv_dlopen_self_static, [dnl
1030 _LT_AC_TRY_DLOPEN_SELF(
1031 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1032 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1036 CPPFLAGS="$save_CPPFLAGS"
1037 LDFLAGS="$save_LDFLAGS"
1042 case $lt_cv_dlopen_self in
1043 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1044 *) enable_dlopen_self=unknown ;;
1047 case $lt_cv_dlopen_self_static in
1048 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1049 *) enable_dlopen_self_static=unknown ;;
1052 ])# AC_LIBTOOL_DLOPEN_SELF
1055 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1056 # ---------------------------------
1057 # Check to see if options -c and -o are simultaneously supported by compiler
1058 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1059 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1060 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1061 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1062 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1063 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1064 $rm -r conftest 2>/dev/null
1068 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1070 lt_compiler_flag="-o out/conftest2.$ac_objext"
1071 # Insert the option either (1) after the last *FLAGS variable, or
1072 # (2) before a word containing "conftest.", or (3) at the end.
1073 # Note that $ac_compile itself does not contain backslashes and begins
1074 # with a dollar sign (not a hyphen), so the echo should work correctly.
1075 lt_compile=`echo "$ac_compile" | $SED \
1076 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1077 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1078 -e 's:$: $lt_compiler_flag:'`
1079 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1080 (eval "$lt_compile" 2>out/conftest.err)
1082 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1083 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1084 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1086 # The compiler can only warn and ignore the option if not recognized
1087 # So say no if there are warnings
1088 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1089 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1090 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1091 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1094 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1096 # SGI C++ compiler will create directory out/ii_files/ for
1097 # template instantiation
1098 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1099 $rm out/* && rmdir out
1104 ])# AC_LIBTOOL_PROG_CC_C_O
1107 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1108 # -----------------------------------------
1109 # Check to see if we can do hard links to lock some files if needed
1110 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1111 [AC_REQUIRE([_LT_AC_LOCK])dnl
1113 hard_links="nottested"
1114 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1115 # do not overwrite the value of need_locks provided by the user
1116 AC_MSG_CHECKING([if we can lock with hard links])
1119 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1121 ln conftest.a conftest.b 2>&5 || hard_links=no
1122 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1123 AC_MSG_RESULT([$hard_links])
1124 if test "$hard_links" = no; then
1125 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1131 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1136 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1137 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1138 [rm -f .libs 2>/dev/null
1139 mkdir .libs 2>/dev/null
1140 if test -d .libs; then
1143 # MS-DOS does not allow filenames that begin with a dot.
1146 rmdir .libs 2>/dev/null])
1147 objdir=$lt_cv_objdir
1148 ])# AC_LIBTOOL_OBJDIR
1151 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1152 # ----------------------------------------------
1153 # Check hardcoding attributes.
1154 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1155 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1156 _LT_AC_TAGVAR(hardcode_action, $1)=
1157 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1158 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1159 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1161 # We can hardcode non-existant directories.
1162 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1163 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1164 # have to relink, otherwise we might link with an installed library
1165 # when we should be linking with a yet-to-be-installed one
1166 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1167 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1168 # Linking always hardcodes the temporary library directory.
1169 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1171 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1172 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1175 # We cannot hardcode anything, or else we can only hardcode existing
1177 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1179 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1181 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1182 # Fast installation is not supported
1183 enable_fast_install=no
1184 elif test "$shlibpath_overrides_runpath" = yes ||
1185 test "$enable_shared" = no; then
1186 # Fast installation is not necessary
1187 enable_fast_install=needless
1189 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1192 # AC_LIBTOOL_SYS_LIB_STRIP
1193 # ------------------------
1194 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1197 AC_MSG_CHECKING([whether stripping libraries is possible])
1198 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1199 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1200 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1201 AC_MSG_RESULT([yes])
1203 # FIXME - insert some real tests, host_os isn't really good enough
1206 if test -n "$STRIP" ; then
1207 striplib="$STRIP -x"
1208 old_striplib="$STRIP -S"
1209 AC_MSG_RESULT([yes])
1219 ])# AC_LIBTOOL_SYS_LIB_STRIP
1222 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1223 # -----------------------------
1224 # PORTME Fill in your ld.so characteristics
1225 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1226 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1227 AC_MSG_CHECKING([dynamic linker characteristics])
1229 libname_spec='lib$name'
1237 shlibpath_overrides_runpath=unknown
1239 dynamic_linker="$host_os ld.so"
1240 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1242 if test "$GCC" = yes; then
1244 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1245 *) lt_awk_arg="/^libraries:/" ;;
1247 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1248 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1249 # if the path contains ";" then we assume it to be the separator
1250 # otherwise default to the standard path separator (i.e. ":") - it is
1251 # assumed that no part of a normal pathname contains ";" but that should
1252 # okay in the real world where ";" in dirpaths is itself problematic.
1253 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1255 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1257 # Ok, now we have the path, separated by spaces, we can step through it
1258 # and add multilib dir if necessary.
1259 lt_tmp_lt_search_path_spec=
1260 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1261 for lt_sys_path in $lt_search_path_spec; do
1262 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1263 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1265 test -d "$lt_sys_path" && \
1266 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1269 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1270 BEGIN {RS=" "; FS="/|\n";} {
1273 for (lt_i = NF; lt_i > 0; lt_i--) {
1274 if ($lt_i != "" && $lt_i != ".") {
1275 if ($lt_i == "..") {
1278 if (lt_count == 0) {
1279 lt_foo="/" $lt_i lt_foo;
1286 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1287 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1289 sys_lib_search_path_spec=`echo $lt_search_path_spec`
1291 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1293 need_lib_prefix=unknown
1294 hardcode_into_libs=no
1296 # when you set need_version to no, make sure it does not cause -set_version
1297 # flags to be left without arguments
1298 need_version=unknown
1303 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1304 shlibpath_var=LIBPATH
1306 # AIX 3 has no versioning support, so we append a major version to the name.
1307 soname_spec='${libname}${release}${shared_ext}$major'
1314 hardcode_into_libs=yes
1315 if test "$host_cpu" = ia64; then
1316 # AIX 5 supports IA64
1317 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1318 shlibpath_var=LD_LIBRARY_PATH
1320 # With GCC up to 2.95.x, collect2 would create an import file
1321 # for dependence libraries. The import file would start with
1322 # the line `#! .'. This would cause the generated library to
1323 # depend on `.', always an invalid library. This was fixed in
1324 # development snapshots of GCC prior to 3.0.
1326 aix4 | aix4.[[01]] | aix4.[[01]].*)
1327 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1329 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1336 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1337 # soname into executable. Probably we can add versioning support to
1338 # collect2, so additional links can be useful in future.
1339 if test "$aix_use_runtimelinking" = yes; then
1340 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1341 # instead of lib<name>.a to let people know that these are not
1342 # typical AIX shared libraries.
1343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1345 # We preserve .a as extension for shared libraries through AIX4.2
1346 # and later when we are not doing run time linking.
1347 library_names_spec='${libname}${release}.a $libname.a'
1348 soname_spec='${libname}${release}${shared_ext}$major'
1350 shlibpath_var=LIBPATH
1355 library_names_spec='$libname.ixlibrary $libname.a'
1356 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1357 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'
1361 library_names_spec='${libname}${shared_ext}'
1362 dynamic_linker="$host_os ld.so"
1363 shlibpath_var=LIBRARY_PATH
1369 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1370 soname_spec='${libname}${release}${shared_ext}$major'
1371 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1372 shlibpath_var=LD_LIBRARY_PATH
1373 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1374 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1375 # the default ld.so.conf also contains /usr/contrib/lib and
1376 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1377 # libtool to hard-code these into programs
1380 cygwin* | mingw* | pw32*)
1381 version_type=windows
1386 case $GCC,$host_os in
1387 yes,cygwin* | yes,mingw* | yes,pw32*)
1388 library_names_spec='$libname.dll.a'
1389 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1390 postinstall_cmds='base_file=`basename \${file}`~
1391 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1392 dldir=$destdir/`dirname \$dlpath`~
1393 test -d \$dldir || mkdir -p \$dldir~
1394 $install_prog $dir/$dlname \$dldir/$dlname~
1395 chmod a+x \$dldir/$dlname'
1396 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1397 dlpath=$dir/\$dldll~
1399 shlibpath_overrides_runpath=yes
1403 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1404 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1405 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1408 # MinGW DLLs use traditional 'lib' prefix
1409 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1410 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1411 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1412 # It is most probably a Windows format PATH printed by
1413 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1414 # path with ; separators, and with drive letters. We can handle the
1415 # drive letters (cygwin fileutils understands them), so leave them,
1416 # especially as we might pass files found there to a mingw objdump,
1417 # which wouldn't understand a cygwinified path. Ahh.
1418 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1420 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1424 # pw32 DLLs use 'pw' prefix rather than 'lib'
1425 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1431 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1434 dynamic_linker='Win32 ld.exe'
1435 # FIXME: first we should search . and the directory the executable is in
1439 darwin* | rhapsody*)
1440 dynamic_linker="$host_os dyld"
1444 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1445 soname_spec='${libname}${release}${major}$shared_ext'
1446 shlibpath_overrides_runpath=yes
1447 shlibpath_var=DYLD_LIBRARY_PATH
1448 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1450 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1451 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1459 soname_spec='${libname}${release}${shared_ext}$major'
1460 shlibpath_var=LD_LIBRARY_PATH
1467 freebsd* | dragonfly*)
1468 # DragonFly does not have aout. When/if they implement a new
1469 # versioning mechanism, adjust this.
1470 if test -x /usr/bin/objformat; then
1471 objformat=`/usr/bin/objformat`
1474 freebsd[[123]]*) objformat=aout ;;
1478 version_type=freebsd-$objformat
1479 case $version_type in
1481 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1486 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1490 shlibpath_var=LD_LIBRARY_PATH
1493 shlibpath_overrides_runpath=yes
1495 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1496 shlibpath_overrides_runpath=yes
1497 hardcode_into_libs=yes
1499 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1500 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1501 shlibpath_overrides_runpath=no
1502 hardcode_into_libs=yes
1504 *) # from 4.6 on, and DragonFly
1505 shlibpath_overrides_runpath=yes
1506 hardcode_into_libs=yes
1515 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1516 soname_spec='${libname}${release}${shared_ext}$major'
1517 shlibpath_var=LD_LIBRARY_PATH
1518 hardcode_into_libs=yes
1521 hpux9* | hpux10* | hpux11*)
1522 # Give a soname corresponding to the major version so that dld.sl refuses to
1523 # link against other versions.
1530 hardcode_into_libs=yes
1531 dynamic_linker="$host_os dld.so"
1532 shlibpath_var=LD_LIBRARY_PATH
1533 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1535 soname_spec='${libname}${release}${shared_ext}$major'
1536 if test "X$HPUX_IA64_MODE" = X32; then
1537 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1539 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1541 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1545 hardcode_into_libs=yes
1546 dynamic_linker="$host_os dld.sl"
1547 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1548 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1550 soname_spec='${libname}${release}${shared_ext}$major'
1551 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1552 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1556 dynamic_linker="$host_os dld.sl"
1557 shlibpath_var=SHLIB_PATH
1558 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1559 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1560 soname_spec='${libname}${release}${shared_ext}$major'
1563 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1564 postinstall_cmds='chmod 555 $lib'
1571 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1572 soname_spec='${libname}${release}${shared_ext}$major'
1573 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1574 shlibpath_var=LD_LIBRARY_PATH
1575 shlibpath_overrides_runpath=no
1576 hardcode_into_libs=yes
1579 irix5* | irix6* | nonstopux*)
1581 nonstopux*) version_type=nonstopux ;;
1583 if test "$lt_cv_prog_gnu_ld" = yes; then
1591 soname_spec='${libname}${release}${shared_ext}$major'
1592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1594 irix5* | nonstopux*)
1598 case $LD in # libtool.m4 will add one of these switches to LD
1599 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1600 libsuff= shlibsuff= libmagic=32-bit;;
1601 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1602 libsuff=32 shlibsuff=N32 libmagic=N32;;
1603 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1604 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1605 *) libsuff= shlibsuff= libmagic=never-match;;
1609 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1610 shlibpath_overrides_runpath=no
1611 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1612 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1613 hardcode_into_libs=yes
1616 # No shared lib support for Linux oldld, aout, or coff.
1617 linux*oldld* | linux*aout* | linux*coff*)
1621 # This must be Linux ELF.
1622 linux* | k*bsd*-gnu)
1626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1627 soname_spec='${libname}${release}${shared_ext}$major'
1628 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1629 shlibpath_var=LD_LIBRARY_PATH
1630 shlibpath_overrides_runpath=no
1631 # This implies no fast_install, which is unacceptable.
1632 # Some rework will be needed to allow for fast_install
1633 # before this can be enabled.
1634 hardcode_into_libs=yes
1635 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1636 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1638 # Append ld.so.conf contents to the search path
1639 if test -f /etc/ld.so.conf; then
1640 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1641 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1644 # We used to test for /lib/ld.so.1 and disable shared libraries on
1645 # powerpc, because MkLinux only supported shared libraries with the
1646 # GNU dynamic linker. Since this was broken with cross compilers,
1647 # most powerpc-linux boxes support dynamic linking these days and
1648 # people can always --disable-shared, the test was removed, and we
1649 # assume the GNU/Linux dynamic linker is in use.
1650 dynamic_linker='GNU/Linux ld.so'
1657 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1658 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1659 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1660 dynamic_linker='NetBSD (a.out) ld.so'
1662 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1663 soname_spec='${libname}${release}${shared_ext}$major'
1664 dynamic_linker='NetBSD ld.elf_so'
1666 shlibpath_var=LD_LIBRARY_PATH
1667 shlibpath_overrides_runpath=yes
1668 hardcode_into_libs=yes
1673 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1674 shlibpath_var=LD_LIBRARY_PATH
1675 shlibpath_overrides_runpath=yes
1682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1683 soname_spec='${libname}${release}${shared_ext}$major'
1684 shlibpath_var=LD_LIBRARY_PATH
1685 shlibpath_overrides_runpath=yes
1690 sys_lib_dlsearch_path_spec="/usr/lib"
1692 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1694 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1695 *) need_version=no ;;
1697 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1698 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1699 shlibpath_var=LD_LIBRARY_PATH
1700 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1702 openbsd2.[[89]] | openbsd2.[[89]].*)
1703 shlibpath_overrides_runpath=no
1706 shlibpath_overrides_runpath=yes
1710 shlibpath_overrides_runpath=yes
1715 libname_spec='$name'
1718 library_names_spec='$libname${shared_ext} $libname.a'
1719 dynamic_linker='OS/2 ld.exe'
1720 shlibpath_var=LIBPATH
1723 osf3* | osf4* | osf5*)
1727 soname_spec='${libname}${release}${shared_ext}$major'
1728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1729 shlibpath_var=LD_LIBRARY_PATH
1730 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1731 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1743 soname_spec='${libname}${release}${shared_ext}$major'
1744 shlibpath_var=LD_LIBRARY_PATH
1745 shlibpath_overrides_runpath=yes
1746 hardcode_into_libs=yes
1747 # ldd complains unless libraries are executable
1748 postinstall_cmds='chmod +x $lib'
1753 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1754 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1755 shlibpath_var=LD_LIBRARY_PATH
1756 shlibpath_overrides_runpath=yes
1757 if test "$with_gnu_ld" = yes; then
1765 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1766 soname_spec='${libname}${release}${shared_ext}$major'
1767 shlibpath_var=LD_LIBRARY_PATH
1768 case $host_vendor in
1770 shlibpath_overrides_runpath=no
1772 export_dynamic_flag_spec='${wl}-Blargedynsym'
1773 runpath_var=LD_RUN_PATH
1781 shlibpath_overrides_runpath=no
1782 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1788 if test -d /usr/nec ;then
1790 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1791 soname_spec='$libname${shared_ext}.$major'
1792 shlibpath_var=LD_LIBRARY_PATH
1796 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1797 version_type=freebsd-elf
1800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1801 soname_spec='${libname}${release}${shared_ext}$major'
1802 shlibpath_var=LD_LIBRARY_PATH
1803 hardcode_into_libs=yes
1804 if test "$with_gnu_ld" = yes; then
1805 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1806 shlibpath_overrides_runpath=no
1808 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1809 shlibpath_overrides_runpath=yes
1812 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1816 sys_lib_dlsearch_path_spec='/usr/lib'
1821 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1822 soname_spec='${libname}${release}${shared_ext}$major'
1823 shlibpath_var=LD_LIBRARY_PATH
1830 AC_MSG_RESULT([$dynamic_linker])
1831 test "$dynamic_linker" = no && can_build_shared=no
1833 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1834 if test "$GCC" = yes; then
1835 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1837 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1842 AC_DEFUN([_LT_AC_TAGCONFIG],
1843 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1845 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1846 [include additional configurations @<:@automatic@:>@])],
1847 [tagnames="$withval"])
1849 if test -f "$ltmain" && test -n "$tagnames"; then
1850 if test ! -f "${ofile}"; then
1851 AC_MSG_WARN([output file `$ofile' does not exist])
1854 if test -z "$LTCC"; then
1855 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1856 if test -z "$LTCC"; then
1857 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1859 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1862 if test -z "$LTCFLAGS"; then
1863 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1866 # Extract list of available tagged configurations in $ofile.
1867 # Note that this assumes the entire list is on one line.
1868 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1870 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1871 for tagname in $tagnames; do
1873 # Check whether tagname contains only valid characters
1874 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1876 *) AC_MSG_ERROR([invalid tag name: $tagname])
1880 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1882 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1885 # Update the list of available tags.
1886 if test -n "$tagname"; then
1887 echo appending configuration tag \"$tagname\" to $ofile
1891 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1892 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1893 (test "X$CXX" != "Xg++"))) ; then
1894 AC_LIBTOOL_LANG_CXX_CONFIG
1901 if test -n "$F77" && test "X$F77" != "Xno"; then
1902 AC_LIBTOOL_LANG_F77_CONFIG
1909 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1910 AC_LIBTOOL_LANG_GCJ_CONFIG
1917 AC_LIBTOOL_LANG_RC_CONFIG
1921 AC_MSG_ERROR([Unsupported tag name: $tagname])
1925 # Append the new tag name to the list of available tags.
1926 if test -n "$tagname" ; then
1927 available_tags="$available_tags $tagname"
1933 # Now substitute the updated list of available tags.
1934 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1935 mv "${ofile}T" "$ofile"
1939 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1942 ])# _LT_AC_TAGCONFIG
1947 # enable checks for dlopen support
1948 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1949 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1950 ])# AC_LIBTOOL_DLOPEN
1953 # AC_LIBTOOL_WIN32_DLL
1954 # --------------------
1955 # declare package support for building win32 DLLs
1956 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1957 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1958 ])# AC_LIBTOOL_WIN32_DLL
1961 # AC_ENABLE_SHARED([DEFAULT])
1962 # ---------------------------
1963 # implement the --enable-shared flag
1964 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1965 AC_DEFUN([AC_ENABLE_SHARED],
1966 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1967 AC_ARG_ENABLE([shared],
1968 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1969 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1970 [p=${PACKAGE-default}
1972 yes) enable_shared=yes ;;
1973 no) enable_shared=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
1987 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1988 ])# AC_ENABLE_SHARED
1993 # set the default shared flag to --disable-shared
1994 AC_DEFUN([AC_DISABLE_SHARED],
1995 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1996 AC_ENABLE_SHARED(no)
1997 ])# AC_DISABLE_SHARED
2000 # AC_ENABLE_STATIC([DEFAULT])
2001 # ---------------------------
2002 # implement the --enable-static flag
2003 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2004 AC_DEFUN([AC_ENABLE_STATIC],
2005 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2006 AC_ARG_ENABLE([static],
2007 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2008 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2009 [p=${PACKAGE-default}
2011 yes) enable_static=yes ;;
2012 no) enable_static=no ;;
2015 # Look at the argument we got. We use all the common list separators.
2016 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2017 for pkg in $enableval; do
2019 if test "X$pkg" = "X$p"; then
2026 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2027 ])# AC_ENABLE_STATIC
2032 # set the default static flag to --disable-static
2033 AC_DEFUN([AC_DISABLE_STATIC],
2034 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2035 AC_ENABLE_STATIC(no)
2036 ])# AC_DISABLE_STATIC
2039 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2040 # ---------------------------------
2041 # implement the --enable-fast-install flag
2042 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2043 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2044 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2045 AC_ARG_ENABLE([fast-install],
2046 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2047 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2048 [p=${PACKAGE-default}
2050 yes) enable_fast_install=yes ;;
2051 no) enable_fast_install=no ;;
2053 enable_fast_install=no
2054 # Look at the argument we got. We use all the common list separators.
2055 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2056 for pkg in $enableval; do
2058 if test "X$pkg" = "X$p"; then
2059 enable_fast_install=yes
2065 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2066 ])# AC_ENABLE_FAST_INSTALL
2069 # AC_DISABLE_FAST_INSTALL
2070 # -----------------------
2071 # set the default to --disable-fast-install
2072 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2073 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2074 AC_ENABLE_FAST_INSTALL(no)
2075 ])# AC_DISABLE_FAST_INSTALL
2078 # AC_LIBTOOL_PICMODE([MODE])
2079 # --------------------------
2080 # implement the --with-pic flag
2081 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2082 AC_DEFUN([AC_LIBTOOL_PICMODE],
2083 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2084 pic_mode=ifelse($#,1,$1,default)
2085 ])# AC_LIBTOOL_PICMODE
2090 # This is predefined starting with Autoconf 2.54, so this conditional
2091 # definition can be removed once we require Autoconf 2.54 or later.
2092 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2093 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2094 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2095 then ac_cv_prog_egrep='grep -E'
2096 else ac_cv_prog_egrep='egrep'
2098 EGREP=$ac_cv_prog_egrep
2103 # AC_PATH_TOOL_PREFIX
2104 # -------------------
2105 # find a file program which can recognize shared library
2106 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2107 [AC_REQUIRE([AC_PROG_EGREP])dnl
2108 AC_MSG_CHECKING([for $1])
2109 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2111 [[\\/*] | ?:[\\/]*])
2112 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2115 lt_save_MAGIC_CMD="$MAGIC_CMD"
2116 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2117 dnl $ac_dummy forces splitting on constant user-supplied paths.
2118 dnl POSIX.2 word splitting is done only on the output of word expansions,
2119 dnl not every word. This closes a longstanding sh security hole.
2120 ac_dummy="ifelse([$2], , $PATH, [$2])"
2121 for ac_dir in $ac_dummy; do
2123 test -z "$ac_dir" && ac_dir=.
2124 if test -f $ac_dir/$1; then
2125 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2126 if test -n "$file_magic_test_file"; then
2127 case $deplibs_check_method in
2129 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2130 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2131 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2132 $EGREP "$file_magic_regex" > /dev/null; then
2137 *** Warning: the command libtool uses to detect shared libraries,
2138 *** $file_magic_cmd, produces output that libtool cannot recognize.
2139 *** The result is that libtool may fail to recognize shared libraries
2140 *** as such. This will affect the creation of libtool libraries that
2141 *** depend on shared libraries, but programs linked with such libtool
2142 *** libraries will work regardless of this problem. Nevertheless, you
2143 *** may want to report the problem to your system manager and/or to
2144 *** bug-libtool@gnu.org
2154 MAGIC_CMD="$lt_save_MAGIC_CMD"
2157 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2158 if test -n "$MAGIC_CMD"; then
2159 AC_MSG_RESULT($MAGIC_CMD)
2163 ])# AC_PATH_TOOL_PREFIX
2168 # find a file program which can recognize a shared library
2169 AC_DEFUN([AC_PATH_MAGIC],
2170 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2171 if test -z "$lt_cv_path_MAGIC_CMD"; then
2172 if test -n "$ac_tool_prefix"; then
2173 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2183 # find the pathname to the GNU or non-GNU linker
2184 AC_DEFUN([AC_PROG_LD],
2185 [AC_ARG_WITH([gnu-ld],
2186 [AC_HELP_STRING([--with-gnu-ld],
2187 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2188 [test "$withval" = no || with_gnu_ld=yes],
2190 AC_REQUIRE([LT_AC_PROG_SED])dnl
2191 AC_REQUIRE([AC_PROG_CC])dnl
2192 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2193 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2195 if test "$GCC" = yes; then
2196 # Check if gcc -print-prog-name=ld gives a path.
2197 AC_MSG_CHECKING([for ld used by $CC])
2200 # gcc leaves a trailing carriage return which upsets mingw
2201 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2203 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2206 # Accept absolute paths.
2207 [[\\/]]* | ?:[[\\/]]*)
2208 re_direlt='/[[^/]][[^/]]*/\.\./'
2209 # Canonicalize the pathname of ld
2210 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2211 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2212 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2214 test -z "$LD" && LD="$ac_prog"
2217 # If it fails, then pretend we aren't using GCC.
2221 # If it is relative, then search for the first ld in PATH.
2225 elif test "$with_gnu_ld" = yes; then
2226 AC_MSG_CHECKING([for GNU ld])
2228 AC_MSG_CHECKING([for non-GNU ld])
2230 AC_CACHE_VAL(lt_cv_path_LD,
2231 [if test -z "$LD"; then
2232 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2233 for ac_dir in $PATH; do
2235 test -z "$ac_dir" && ac_dir=.
2236 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2237 lt_cv_path_LD="$ac_dir/$ac_prog"
2238 # Check to see if the program is GNU ld. I'd rather use --version,
2239 # but apparently some variants of GNU ld only accept -v.
2240 # Break only if it was the GNU/non-GNU ld that we prefer.
2241 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2242 *GNU* | *'with BFD'*)
2243 test "$with_gnu_ld" != no && break
2246 test "$with_gnu_ld" != yes && break
2253 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2256 if test -n "$LD"; then
2261 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2268 AC_DEFUN([AC_PROG_LD_GNU],
2269 [AC_REQUIRE([AC_PROG_EGREP])dnl
2270 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2271 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2272 case `$LD -v 2>&1 </dev/null` in
2273 *GNU* | *'with BFD'*)
2274 lt_cv_prog_gnu_ld=yes
2277 lt_cv_prog_gnu_ld=no
2280 with_gnu_ld=$lt_cv_prog_gnu_ld
2284 # AC_PROG_LD_RELOAD_FLAG
2285 # ----------------------
2286 # find reload flag for linker
2287 # -- PORTME Some linkers may need a different reload flag.
2288 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2289 [AC_CACHE_CHECK([for $LD option to reload object files],
2290 lt_cv_ld_reload_flag,
2291 [lt_cv_ld_reload_flag='-r'])
2292 reload_flag=$lt_cv_ld_reload_flag
2293 case $reload_flag in
2295 *) reload_flag=" $reload_flag" ;;
2297 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2300 if test "$GCC" = yes; then
2301 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2303 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2307 ])# AC_PROG_LD_RELOAD_FLAG
2310 # AC_DEPLIBS_CHECK_METHOD
2311 # -----------------------
2312 # how to check for library dependencies
2313 # -- PORTME fill in with the dynamic library characteristics
2314 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2315 [AC_CACHE_CHECK([how to recognize dependent libraries],
2316 lt_cv_deplibs_check_method,
2317 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2318 lt_cv_file_magic_test_file=
2319 lt_cv_deplibs_check_method='unknown'
2320 # Need to set the preceding variable on all platforms that support
2321 # interlibrary dependencies.
2322 # 'none' -- dependencies not supported.
2323 # `unknown' -- same as none, but documents that we really don't know.
2324 # 'pass_all' -- all dependencies passed with no checks.
2325 # 'test_compile' -- check by making test program.
2326 # 'file_magic [[regex]]' -- check by looking for files in library path
2327 # which responds to the $file_magic_cmd with a given extended regex.
2328 # If you have `file' or equivalent on your system and you're not sure
2329 # whether `pass_all' will *always* work, you probably want this one.
2333 lt_cv_deplibs_check_method=pass_all
2337 lt_cv_deplibs_check_method=pass_all
2341 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2342 lt_cv_file_magic_cmd='/usr/bin/file -L'
2343 lt_cv_file_magic_test_file=/shlib/libc.so
2347 # func_win32_libid is a shell function defined in ltmain.sh
2348 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2349 lt_cv_file_magic_cmd='func_win32_libid'
2353 # Base MSYS/MinGW do not provide the 'file' command needed by
2354 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2355 # unless we find 'file', for example because we are cross-compiling.
2356 if ( file / ) >/dev/null 2>&1; then
2357 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2358 lt_cv_file_magic_cmd='func_win32_libid'
2360 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2361 lt_cv_file_magic_cmd='$OBJDUMP -f'
2365 darwin* | rhapsody*)
2366 lt_cv_deplibs_check_method=pass_all
2369 freebsd* | dragonfly*)
2370 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2373 # Not sure whether the presence of OpenBSD here was a mistake.
2374 # Let's accept both of them until this is cleared up.
2375 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2376 lt_cv_file_magic_cmd=/usr/bin/file
2377 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2381 lt_cv_deplibs_check_method=pass_all
2386 lt_cv_deplibs_check_method=pass_all
2389 hpux10.20* | hpux11*)
2390 lt_cv_file_magic_cmd=/usr/bin/file
2393 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2394 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2397 [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]']
2398 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2401 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2402 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2408 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2409 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2412 irix5* | irix6* | nonstopux*)
2414 *-32|*"-32 ") libmagic=32-bit;;
2415 *-n32|*"-n32 ") libmagic=N32;;
2416 *-64|*"-64 ") libmagic=64-bit;;
2417 *) libmagic=never-match;;
2419 lt_cv_deplibs_check_method=pass_all
2422 # This must be Linux ELF.
2423 linux* | k*bsd*-gnu)
2424 lt_cv_deplibs_check_method=pass_all
2428 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2429 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2431 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2436 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2437 lt_cv_file_magic_cmd=/usr/bin/file
2438 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2442 lt_cv_deplibs_check_method=unknown
2446 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2447 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2449 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2453 osf3* | osf4* | osf5*)
2454 lt_cv_deplibs_check_method=pass_all
2458 lt_cv_deplibs_check_method=pass_all
2462 lt_cv_deplibs_check_method=pass_all
2466 case $host_vendor in
2468 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]]'
2469 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2472 lt_cv_deplibs_check_method=pass_all
2475 lt_cv_file_magic_cmd='/bin/file'
2476 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2479 lt_cv_file_magic_cmd='/bin/file'
2480 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2481 lt_cv_file_magic_test_file=/lib/libc.so
2484 lt_cv_deplibs_check_method=pass_all
2487 lt_cv_deplibs_check_method=pass_all
2492 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2493 lt_cv_deplibs_check_method=pass_all
2497 file_magic_cmd=$lt_cv_file_magic_cmd
2498 deplibs_check_method=$lt_cv_deplibs_check_method
2499 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2500 ])# AC_DEPLIBS_CHECK_METHOD
2505 # find the pathname to a BSD-compatible name lister
2506 AC_DEFUN([AC_PROG_NM],
2507 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2508 [if test -n "$NM"; then
2509 # Let the user override the test.
2512 lt_nm_to_check="${ac_tool_prefix}nm"
2513 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2514 lt_nm_to_check="$lt_nm_to_check nm"
2516 for lt_tmp_nm in $lt_nm_to_check; do
2517 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2518 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2520 test -z "$ac_dir" && ac_dir=.
2521 tmp_nm="$ac_dir/$lt_tmp_nm"
2522 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2523 # Check to see if the nm accepts a BSD-compat flag.
2524 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2525 # nm: unknown option "B" ignored
2526 # Tru64's nm complains that /dev/null is an invalid object file
2527 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2528 */dev/null* | *'Invalid file or object type'*)
2529 lt_cv_path_NM="$tmp_nm -B"
2533 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2535 lt_cv_path_NM="$tmp_nm -p"
2539 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2540 continue # so that we can try to find one that supports BSD flags
2549 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2557 # check for math library
2558 AC_DEFUN([AC_CHECK_LIBM],
2559 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2562 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2563 # These system don't have libm, or don't need it
2566 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2567 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2570 AC_CHECK_LIB(m, cos, LIBM="-lm")
2576 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2577 # -----------------------------------
2578 # sets LIBLTDL to the link flags for the libltdl convenience library and
2579 # LTDLINCL to the include flags for the libltdl header and adds
2580 # --enable-ltdl-convenience to the configure arguments. Note that
2581 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2582 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2583 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2584 # (note the single quotes!). If your package is not flat and you're not
2585 # using automake, define top_builddir and top_srcdir appropriately in
2587 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2588 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2589 case $enable_ltdl_convenience in
2590 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2591 "") enable_ltdl_convenience=yes
2592 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2594 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2595 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2596 # For backwards non-gettext consistent compatibility...
2598 ])# AC_LIBLTDL_CONVENIENCE
2601 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2602 # -----------------------------------
2603 # sets LIBLTDL to the link flags for the libltdl installable library and
2604 # LTDLINCL to the include flags for the libltdl header and adds
2605 # --enable-ltdl-install to the configure arguments. Note that
2606 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2607 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2608 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2609 # '${top_srcdir}/' (note the single quotes!). If your package is not
2610 # flat and you're not using automake, define top_builddir and top_srcdir
2611 # appropriately in the Makefiles.
2612 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2613 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2614 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2615 AC_CHECK_LIB(ltdl, lt_dlinit,
2616 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2617 [if test x"$enable_ltdl_install" = xno; then
2618 AC_MSG_WARN([libltdl not installed, but installation disabled])
2620 enable_ltdl_install=yes
2623 if test x"$enable_ltdl_install" = x"yes"; then
2624 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2625 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2626 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2628 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2632 # For backwards non-gettext consistent compatibility...
2634 ])# AC_LIBLTDL_INSTALLABLE
2639 # enable support for C++ libraries
2640 AC_DEFUN([AC_LIBTOOL_CXX],
2641 [AC_REQUIRE([_LT_AC_LANG_CXX])
2647 AC_DEFUN([_LT_AC_LANG_CXX],
2648 [AC_REQUIRE([AC_PROG_CXX])
2649 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2650 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2653 # _LT_AC_PROG_CXXCPP
2654 # ------------------
2655 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2657 AC_REQUIRE([AC_PROG_CXX])
2658 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2659 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2660 (test "X$CXX" != "Xg++"))) ; then
2663 ])# _LT_AC_PROG_CXXCPP
2667 # enable support for Fortran 77 libraries
2668 AC_DEFUN([AC_LIBTOOL_F77],
2669 [AC_REQUIRE([_LT_AC_LANG_F77])
2675 AC_DEFUN([_LT_AC_LANG_F77],
2676 [AC_REQUIRE([AC_PROG_F77])
2677 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2683 # enable support for GCJ libraries
2684 AC_DEFUN([AC_LIBTOOL_GCJ],
2685 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2691 AC_DEFUN([_LT_AC_LANG_GCJ],
2692 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2693 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2694 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2695 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2696 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2697 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2698 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2704 # enable support for Windows resource files
2705 AC_DEFUN([AC_LIBTOOL_RC],
2706 [AC_REQUIRE([LT_AC_PROG_RC])
2707 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2711 # AC_LIBTOOL_LANG_C_CONFIG
2712 # ------------------------
2713 # Ensure that the configuration vars for the C compiler are
2714 # suitably defined. Those variables are subsequently used by
2715 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2716 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2717 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2721 # Source file extension for C test sources.
2724 # Object file extension for compiled C test sources.
2726 _LT_AC_TAGVAR(objext, $1)=$objext
2728 # Code to be used in simple compile tests
2729 lt_simple_compile_test_code="int some_variable = 0;"
2731 # Code to be used in simple link tests
2732 lt_simple_link_test_code='int main(){return(0);}'
2736 # save warnings/boilerplate of simple test code
2737 _LT_COMPILER_BOILERPLATE
2738 _LT_LINKER_BOILERPLATE
2740 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2741 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2742 AC_LIBTOOL_PROG_CC_C_O($1)
2743 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2744 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2745 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2746 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2747 AC_LIBTOOL_SYS_LIB_STRIP
2748 AC_LIBTOOL_DLOPEN_SELF
2750 # Report which library types will actually be built
2751 AC_MSG_CHECKING([if libtool supports shared libraries])
2752 AC_MSG_RESULT([$can_build_shared])
2754 AC_MSG_CHECKING([whether to build shared libraries])
2755 test "$can_build_shared" = "no" && enable_shared=no
2757 # On AIX, shared libraries and static libraries use the same namespace, and
2758 # are all built from PIC.
2761 test "$enable_shared" = yes && enable_static=no
2762 if test -n "$RANLIB"; then
2763 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2764 postinstall_cmds='$RANLIB $lib'
2769 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2770 test "$enable_shared" = yes && enable_static=no
2774 AC_MSG_RESULT([$enable_shared])
2776 AC_MSG_CHECKING([whether to build static libraries])
2777 # Make sure either enable_shared or enable_static is yes.
2778 test "$enable_shared" = yes || enable_static=yes
2779 AC_MSG_RESULT([$enable_static])
2781 AC_LIBTOOL_CONFIG($1)
2785 ])# AC_LIBTOOL_LANG_C_CONFIG
2788 # AC_LIBTOOL_LANG_CXX_CONFIG
2789 # --------------------------
2790 # Ensure that the configuration vars for the C compiler are
2791 # suitably defined. Those variables are subsequently used by
2792 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2793 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2794 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2796 AC_REQUIRE([AC_PROG_CXX])
2797 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2799 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2800 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2801 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2802 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2803 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2804 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2806 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2807 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2808 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2809 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2810 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2811 _LT_AC_TAGVAR(module_cmds, $1)=
2812 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2813 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2814 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2815 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2816 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2817 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2819 # Dependencies to place before and after the object being linked:
2820 _LT_AC_TAGVAR(predep_objects, $1)=
2821 _LT_AC_TAGVAR(postdep_objects, $1)=
2822 _LT_AC_TAGVAR(predeps, $1)=
2823 _LT_AC_TAGVAR(postdeps, $1)=
2824 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2826 # Source file extension for C++ test sources.
2829 # Object file extension for compiled C++ test sources.
2831 _LT_AC_TAGVAR(objext, $1)=$objext
2833 # Code to be used in simple compile tests
2834 lt_simple_compile_test_code="int some_variable = 0;"
2836 # Code to be used in simple link tests
2837 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2839 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2842 # save warnings/boilerplate of simple test code
2843 _LT_COMPILER_BOILERPLATE
2844 _LT_LINKER_BOILERPLATE
2846 # Allow CC to be a program name with arguments.
2851 lt_save_with_gnu_ld=$with_gnu_ld
2852 lt_save_path_LD=$lt_cv_path_LD
2853 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2854 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2856 $as_unset lt_cv_prog_gnu_ld
2858 if test -n "${lt_cv_path_LDCXX+set}"; then
2859 lt_cv_path_LD=$lt_cv_path_LDCXX
2861 $as_unset lt_cv_path_LD
2863 test -z "${LDCXX+set}" || LD=$LDCXX
2866 _LT_AC_TAGVAR(compiler, $1)=$CC
2867 _LT_CC_BASENAME([$compiler])
2869 # We don't want -fno-exception wen compiling C++ code, so set the
2870 # no_builtin_flag separately
2871 if test "$GXX" = yes; then
2872 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2874 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2877 if test "$GXX" = yes; then
2878 # Set up default GNU C++ configuration
2882 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2883 # archiving commands below assume that GNU ld is being used.
2884 if test "$with_gnu_ld" = yes; then
2885 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2886 _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'
2888 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2889 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2891 # If archive_cmds runs LD, not CC, wlarc should be empty
2892 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2893 # investigate it a little bit more. (MM)
2896 # ancient GNU ld didn't support --whole-archive et. al.
2897 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2898 grep 'no-whole-archive' > /dev/null; then
2899 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2901 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2907 # A generic and very simple default shared library creation
2908 # command for GNU C++ for the case where it uses the native
2909 # linker, instead of GNU ld. If possible, this setting should
2910 # overridden to take advantage of the native linker features on
2911 # the platform it is being used on.
2912 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2915 # Commands to make compiler produce verbose output that lists
2916 # what "hidden" libraries, object files and flags are used when
2917 # linking a shared library.
2918 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2926 # PORTME: fill in a description of your system's C++ link characteristics
2927 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2928 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2931 # FIXME: insert proper C++ library support
2932 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2935 if test "$host_cpu" = ia64; then
2936 # On IA64, the linker does run time linking by default, so we don't
2937 # have to do anything special.
2938 aix_use_runtimelinking=no
2939 exp_sym_flag='-Bexport'
2942 aix_use_runtimelinking=no
2944 # Test if we are trying to use run time linking or normal
2945 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2946 # need to do runtime linking.
2947 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2948 for ld_flag in $LDFLAGS; do
2951 aix_use_runtimelinking=yes
2959 exp_sym_flag='-bexport'
2960 no_entry_flag='-bnoentry'
2963 # When large executables or shared objects are built, AIX ld can
2964 # have problems creating the table of contents. If linking a library
2965 # or program results in "error TOC overflow" add -mminimal-toc to
2966 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2967 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2969 _LT_AC_TAGVAR(archive_cmds, $1)=''
2970 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2972 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2974 if test "$GXX" = yes; then
2975 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2976 # We only want to do this on AIX 4.2 and lower, the check
2977 # below for broken collect2 doesn't work under 4.3+
2978 collect2name=`${CC} -print-prog-name=collect2`
2979 if test -f "$collect2name" && \
2980 strings "$collect2name" | grep resolve_lib_name >/dev/null
2982 # We have reworked collect2
2985 # We have old collect2
2986 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2987 # It fails to find uninstalled libraries when the uninstalled
2988 # path is not listed in the libpath. Setting hardcode_minus_L
2989 # to unsupported forces relinking
2990 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2991 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2992 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2996 shared_flag='-shared'
2997 if test "$aix_use_runtimelinking" = yes; then
2998 shared_flag="$shared_flag "'${wl}-G'
3002 if test "$host_cpu" = ia64; then
3003 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3004 # chokes on -Wl,-G. The following line is correct:
3007 if test "$aix_use_runtimelinking" = yes; then
3008 shared_flag='${wl}-G'
3010 shared_flag='${wl}-bM:SRE'
3015 # It seems that -bexpall does not export symbols beginning with
3016 # underscore (_), so it is better to generate a list of symbols to export.
3017 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3018 if test "$aix_use_runtimelinking" = yes; then
3019 # Warning - without using the other runtime loading flags (-brtl),
3020 # -berok will link without error, but may produce a broken library.
3021 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3022 # Determine the default libpath from the value encoded in an empty executable.
3023 _LT_AC_SYS_LIBPATH_AIX
3024 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3026 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3028 if test "$host_cpu" = ia64; then
3029 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3030 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3031 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3033 # Determine the default libpath from the value encoded in an empty executable.
3034 _LT_AC_SYS_LIBPATH_AIX
3035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3036 # Warning - without using the other run time loading flags,
3037 # -berok will link without error, but may produce a broken library.
3038 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3039 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3040 # Exported symbols can be pulled into shared objects from archives
3041 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3042 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3043 # This is similar to how AIX traditionally builds its shared libraries.
3044 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3050 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3051 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3052 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3053 # support --undefined. This deserves some investigation. FIXME
3054 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3056 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3061 case $cc_basename in
3063 # FIXME: insert proper C++ library support
3064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3069 cygwin* | mingw* | pw32*)
3070 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3071 # as there is no search path for DLLs.
3072 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3073 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3074 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3075 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3077 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3079 # If the export-symbols file already is a .def file (1st line
3080 # is EXPORTS), use it as is; otherwise, prepend...
3081 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3082 cp $export_symbols $output_objdir/$soname.def;
3084 echo EXPORTS > $output_objdir/$soname.def;
3085 cat $export_symbols >> $output_objdir/$soname.def;
3087 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3089 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3092 darwin* | rhapsody*)
3094 rhapsody* | darwin1.[[012]])
3095 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3098 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3099 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3101 case ${MACOSX_DEPLOYMENT_TARGET} in
3103 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3106 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3112 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3113 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3114 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3115 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3116 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3117 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3119 if test "$GXX" = yes ; then
3120 lt_int_apple_cc_single_mod=no
3121 output_verbose_link_cmd='echo'
3122 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3123 lt_int_apple_cc_single_mod=yes
3125 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3126 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3128 _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'
3130 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3131 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3132 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3133 _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}'
3135 _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}'
3137 _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}'
3139 case $cc_basename in
3141 output_verbose_link_cmd='echo'
3142 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3143 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3144 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3145 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3146 _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}'
3149 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3156 case $cc_basename in
3158 # FIXME: insert proper C++ library support
3159 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3162 # Green Hills C++ Compiler
3163 # FIXME: insert proper C++ library support
3164 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3167 # FIXME: insert proper C++ library support
3168 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3173 # C++ shared libraries reported to be fairly broken before switch to ELF
3174 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3177 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3179 freebsd* | dragonfly*)
3180 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3182 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3187 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3188 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3189 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3191 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3192 # but as the default
3193 # location of the library.
3195 case $cc_basename in
3197 # FIXME: insert proper C++ library support
3198 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3201 _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'
3202 # Commands to make compiler produce verbose output that lists
3203 # what "hidden" libraries, object files and flags are used when
3204 # linking a shared library.
3206 # There doesn't appear to be a way to prevent this compiler from
3207 # explicitly linking system object files so we need to strip them
3208 # from the output so that they don't get included in the library
3210 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'
3213 if test "$GXX" = yes; then
3214 _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'
3216 # FIXME: insert proper C++ library support
3217 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3223 if test $with_gnu_ld = no; then
3224 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3225 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3230 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3236 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3237 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3240 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3241 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3242 # but as the default
3243 # location of the library.
3247 case $cc_basename in
3249 # FIXME: insert proper C++ library support
3250 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3255 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3258 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3261 _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'
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 -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'
3275 if test "$GXX" = yes; then
3276 if test $with_gnu_ld = no; then
3279 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3282 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3285 _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'
3290 # FIXME: insert proper C++ library support
3291 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3297 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3298 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3299 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3300 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3301 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3302 # Instead, shared libraries are loaded at an image base (0x10000000 by
3303 # default) and relocated if they conflict, which is a slow very memory
3304 # consuming and fragmenting process. To avoid this, we pick a random,
3305 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3306 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3307 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3308 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3311 case $cc_basename in
3314 _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'
3316 # Archives containing C++ object files must be created using
3317 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3318 # necessary to make sure instantiated templates are included
3320 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3323 if test "$GXX" = yes; then
3324 if test "$with_gnu_ld" = no; then
3325 _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'
3327 _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'
3330 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3334 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3336 linux* | k*bsd*-gnu)
3337 case $cc_basename in
3339 # Kuck and Associates, Inc. (KAI) C++ Compiler
3341 # KCC will only create a shared library if the output file
3342 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3343 # to its proper name (with version) after linking.
3344 _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'
3345 _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'
3346 # Commands to make compiler produce verbose output that lists
3347 # what "hidden" libraries, object files and flags are used when
3348 # linking a shared library.
3350 # There doesn't appear to be a way to prevent this compiler from
3351 # explicitly linking system object files so we need to strip them
3352 # from the output so that they don't get included in the library
3354 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'
3356 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3357 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3359 # Archives containing C++ object files must be created using
3360 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3361 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3366 # version 8.0 and above of icpc choke on multiply defined symbols
3367 # if we add $predep_objects and $postdep_objects, however 7.1 and
3368 # earlier do not add the objects themselves.
3369 case `$CC -V 2>&1` in
3371 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3372 _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'
3374 *) # Version 8.0 or newer
3377 ia64*) tmp_idyn=' -i_dynamic';;
3379 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3380 _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'
3383 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3384 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3385 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3386 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3389 # Portland Group C++ compiler
3390 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3391 _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'
3393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3394 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3395 _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'
3399 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3400 _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'
3402 runpath_var=LD_RUN_PATH
3403 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3404 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3406 # Commands to make compiler produce verbose output that lists
3407 # what "hidden" libraries, object files and flags are used when
3408 # linking a shared library.
3410 # There doesn't appear to be a way to prevent this compiler from
3411 # explicitly linking system object files so we need to strip them
3412 # from the output so that they don't get included in the library
3414 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'
3417 case `$CC -V 2>&1 | sed 5q` in
3420 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3421 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3422 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3423 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3424 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3426 # Not sure whether something based on
3427 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3429 output_verbose_link_cmd='echo'
3431 # Archives containing C++ object files must be created using
3432 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3433 # necessary to make sure instantiated templates are included
3435 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3442 # FIXME: insert proper C++ library support
3443 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3446 # FIXME: insert proper C++ library support
3447 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3450 case $cc_basename in
3452 # FIXME: insert proper C++ library support
3453 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3456 # FIXME: insert proper C++ library support
3457 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3462 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3463 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3465 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3466 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3467 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3469 # Workaround some broken pre-1.5 toolchains
3470 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3473 # C++ shared libraries are fairly broken
3474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3477 if test -f /usr/libexec/ld.so; then
3478 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3479 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3480 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3481 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3482 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3483 _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'
3484 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3485 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3487 output_verbose_link_cmd='echo'
3489 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3493 case $cc_basename in
3495 # Kuck and Associates, Inc. (KAI) C++ Compiler
3497 # KCC will only create a shared library if the output file
3498 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3499 # to its proper name (with version) after linking.
3500 _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'
3502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3503 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3505 # Archives containing C++ object files must be created using
3506 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3507 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3511 # Rational C++ 2.4.1
3512 # FIXME: insert proper C++ library support
3513 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3516 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3517 _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'
3519 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3520 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3522 # Commands to make compiler produce verbose output that lists
3523 # what "hidden" libraries, object files and flags are used when
3524 # linking a shared library.
3526 # There doesn't appear to be a way to prevent this compiler from
3527 # explicitly linking system object files so we need to strip them
3528 # from the output so that they don't get included in the library
3530 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'
3533 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3534 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3535 _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'
3537 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3538 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3540 # Commands to make compiler produce verbose output that lists
3541 # what "hidden" libraries, object files and flags are used when
3542 # linking a shared library.
3543 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3546 # FIXME: insert proper C++ library support
3547 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3553 case $cc_basename in
3555 # Kuck and Associates, Inc. (KAI) C++ Compiler
3557 # KCC will only create a shared library if the output file
3558 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3559 # to its proper name (with version) after linking.
3560 _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'
3562 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3563 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3565 # Archives containing C++ object files must be created using
3566 # the KAI C++ compiler.
3567 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3570 # Rational C++ 2.4.1
3571 # FIXME: insert proper C++ library support
3572 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3575 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3576 _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'
3577 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3578 echo "-hidden">> $lib.exp~
3579 $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~
3582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3583 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3585 # Commands to make compiler produce verbose output that lists
3586 # what "hidden" libraries, object files and flags are used when
3587 # linking a shared library.
3589 # There doesn't appear to be a way to prevent this compiler from
3590 # explicitly linking system object files so we need to strip them
3591 # from the output so that they don't get included in the library
3593 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'
3596 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3597 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3598 _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'
3600 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3601 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3603 # Commands to make compiler produce verbose output that lists
3604 # what "hidden" libraries, object files and flags are used when
3605 # linking a shared library.
3606 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3609 # FIXME: insert proper C++ library support
3610 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3616 # FIXME: insert proper C++ library support
3617 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3620 case $cc_basename in
3623 # FIXME: insert proper C++ library support
3624 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3628 # FIXME: insert proper C++ library support
3629 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3632 # FIXME: insert proper C++ library support
3633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3638 case $cc_basename in
3640 # Sun C++ 4.2, 5.x and Centerline C++
3641 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3642 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3643 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3644 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3645 $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'
3647 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3648 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3650 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3652 # The compiler driver will combine and reorder linker options,
3653 # but understands `-z linker_flag'.
3654 # Supported since Solaris 2.6 (maybe 2.5.1?)
3655 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3658 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3660 output_verbose_link_cmd='echo'
3662 # Archives containing C++ object files must be created using
3663 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3664 # necessary to make sure instantiated templates are included
3666 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3669 # Green Hills C++ Compiler
3670 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3672 # The C++ compiler must be used to create the archive.
3673 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3676 # GNU C++ compiler with Solaris linker
3677 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3678 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3679 if $CC --version | grep -v '^2\.7' > /dev/null; then
3680 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3681 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3682 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3684 # Commands to make compiler produce verbose output that lists
3685 # what "hidden" libraries, object files and flags are used when
3686 # linking a shared library.
3687 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3689 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3691 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3692 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3693 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3695 # Commands to make compiler produce verbose output that lists
3696 # what "hidden" libraries, object files and flags are used when
3697 # linking a shared library.
3698 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3703 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3705 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3712 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3713 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3714 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3715 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3716 runpath_var='LD_RUN_PATH'
3718 case $cc_basename in
3720 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3721 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3724 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3725 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3729 sysv5* | sco3.2v5* | sco5v6*)
3730 # Note: We can NOT use -z defs as we might desire, because we do not
3731 # link with -lc, and that would cause any symbols used from libc to
3732 # always be unresolved, which means just about no library would
3733 # ever link correctly. If we're not using GNU ld we use -z text
3734 # though, which does catch some bad symbols but isn't as heavy-handed
3736 # For security reasons, it is highly recommended that you always
3737 # use absolute paths for naming shared libraries, and exclude the
3738 # DT_RUNPATH tag from executables and libraries. But doing so
3739 # requires that you compile everything twice, which is a pain.
3740 # So that behaviour is only enabled if SCOABSPATH is set to a
3741 # non-empty value in the environment. Most likely only useful for
3742 # creating official distributions of packages.
3743 # This is a hack until libtool officially supports absolute path
3744 # names for shared libraries.
3745 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3746 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3747 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3748 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3749 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3750 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3751 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3752 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3753 runpath_var='LD_RUN_PATH'
3755 case $cc_basename in
3757 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3758 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3761 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3762 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3767 case $cc_basename in
3769 # NonStop-UX NCC 3.20
3770 # FIXME: insert proper C++ library support
3771 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3774 # FIXME: insert proper C++ library support
3775 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3780 # FIXME: insert proper C++ library support
3781 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3784 # FIXME: insert proper C++ library support
3785 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3788 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3789 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3791 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3792 _LT_AC_TAGVAR(LD, $1)="$LD"
3794 AC_LIBTOOL_POSTDEP_PREDEP($1)
3795 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3796 AC_LIBTOOL_PROG_CC_C_O($1)
3797 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3798 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3799 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3800 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3802 AC_LIBTOOL_CONFIG($1)
3809 with_gnu_ldcxx=$with_gnu_ld
3810 with_gnu_ld=$lt_save_with_gnu_ld
3811 lt_cv_path_LDCXX=$lt_cv_path_LD
3812 lt_cv_path_LD=$lt_save_path_LD
3813 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3814 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3815 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3817 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3818 # ------------------------------------
3819 # Figure out "hidden" library dependencies from verbose
3820 # compiler output when linking a shared library.
3821 # Parse the compiler output and extract the necessary
3822 # objects, libraries and library flags.
3823 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3824 dnl we can't use the lt_simple_compile_test_code here,
3825 dnl because it contains code intended for an executable,
3826 dnl not a library. It's possible we should let each
3827 dnl tag define a new lt_????_link_test_code variable,
3828 dnl but it's only used here...
3829 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3831 void foo (void) { a = 0; }
3833 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3837 Foo (void) { a = 0; }
3842 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3850 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3853 public void bar (void) {
3859 dnl Parse the compiler output and extract the necessary
3860 dnl objects, libraries and library flags.
3861 if AC_TRY_EVAL(ac_compile); then
3862 # Parse the compiler output and extract the necessary
3863 # objects, libraries and library flags.
3865 # Sentinel used to keep track of whether or not we are before
3866 # the conftest object file.
3867 pre_test_object_deps_done=no
3869 # The `*' in the case matches for architectures that use `case' in
3870 # $output_verbose_cmd can trigger glob expansion during the loop
3871 # eval without this substitution.
3872 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3874 for p in `eval $output_verbose_link_cmd`; do
3878 # Some compilers place space between "-{L,R}" and the path.
3881 || test $p = "-R"; then
3888 if test "$pre_test_object_deps_done" = no; then
3891 # Internal compiler library paths should come after those
3892 # provided the user. The postdeps already come after the
3893 # user supplied libs so there is no need to process them.
3894 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3895 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3897 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3900 # The "-l" case would never come before the object being
3901 # linked, so don't bother handling this case.
3904 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3905 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3907 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3913 # This assumes that the test object file only shows up
3914 # once in the compiler output.
3915 if test "$p" = "conftest.$objext"; then
3916 pre_test_object_deps_done=yes
3920 if test "$pre_test_object_deps_done" = no; then
3921 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3922 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3924 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3927 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3928 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3930 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3935 *) ;; # Ignore the rest.
3943 echo "libtool.m4: error: problem compiling $1 test program"
3946 $rm -f confest.$objext
3948 # PORTME: override above test on systems where it is broken
3952 # Interix 3.5 installs completely hosed .la files for C++, so rather than
3953 # hack all around it, let's just trust "g++" to DTRT.
3954 _LT_AC_TAGVAR(predep_objects,$1)=
3955 _LT_AC_TAGVAR(postdep_objects,$1)=
3956 _LT_AC_TAGVAR(postdeps,$1)=
3960 case `$CC -V 2>&1 | sed 5q` in
3964 # The more standards-conforming stlport4 library is
3965 # incompatible with the Cstd library. Avoid specifying
3966 # it if it's in CXXFLAGS. Ignore libCrun as
3967 # -library=stlport4 depends on it.
3968 case " $CXX $CXXFLAGS " in
3969 *" -library=stlport4 "*)
3970 solaris_use_stlport4=yes
3973 if test "$solaris_use_stlport4" != yes; then
3974 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3981 case $cc_basename in
3983 # The more standards-conforming stlport4 library is
3984 # incompatible with the Cstd library. Avoid specifying
3985 # it if it's in CXXFLAGS. Ignore libCrun as
3986 # -library=stlport4 depends on it.
3987 case " $CXX $CXXFLAGS " in
3988 *" -library=stlport4 "*)
3989 solaris_use_stlport4=yes
3993 # Adding this requires a known-good setup of shared libraries for
3994 # Sun compiler versions before 5.6, else PIC objects from an old
3995 # archive will be linked into the output, leading to subtle bugs.
3996 if test "$solaris_use_stlport4" != yes; then
3997 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4005 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4006 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4008 ])# AC_LIBTOOL_POSTDEP_PREDEP
4010 # AC_LIBTOOL_LANG_F77_CONFIG
4011 # --------------------------
4012 # Ensure that the configuration vars for the C compiler are
4013 # suitably defined. Those variables are subsequently used by
4014 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4015 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4016 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4017 [AC_REQUIRE([AC_PROG_F77])
4018 AC_LANG_PUSH(Fortran 77)
4020 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4021 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4022 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4023 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4024 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4025 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4026 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4028 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4029 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4030 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4031 _LT_AC_TAGVAR(module_cmds, $1)=
4032 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4033 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4034 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4035 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4036 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4037 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4039 # Source file extension for f77 test sources.
4042 # Object file extension for compiled f77 test sources.
4044 _LT_AC_TAGVAR(objext, $1)=$objext
4046 # Code to be used in simple compile tests
4047 lt_simple_compile_test_code="\
4053 # Code to be used in simple link tests
4054 lt_simple_link_test_code="\
4059 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4062 # save warnings/boilerplate of simple test code
4063 _LT_COMPILER_BOILERPLATE
4064 _LT_LINKER_BOILERPLATE
4066 # Allow CC to be a program name with arguments.
4070 _LT_AC_TAGVAR(compiler, $1)=$CC
4071 _LT_CC_BASENAME([$compiler])
4073 AC_MSG_CHECKING([if libtool supports shared libraries])
4074 AC_MSG_RESULT([$can_build_shared])
4076 AC_MSG_CHECKING([whether to build shared libraries])
4077 test "$can_build_shared" = "no" && enable_shared=no
4079 # On AIX, shared libraries and static libraries use the same namespace, and
4080 # are all built from PIC.
4083 test "$enable_shared" = yes && enable_static=no
4084 if test -n "$RANLIB"; then
4085 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4086 postinstall_cmds='$RANLIB $lib'
4090 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4091 test "$enable_shared" = yes && enable_static=no
4095 AC_MSG_RESULT([$enable_shared])
4097 AC_MSG_CHECKING([whether to build static libraries])
4098 # Make sure either enable_shared or enable_static is yes.
4099 test "$enable_shared" = yes || enable_static=yes
4100 AC_MSG_RESULT([$enable_static])
4102 _LT_AC_TAGVAR(GCC, $1)="$G77"
4103 _LT_AC_TAGVAR(LD, $1)="$LD"
4105 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4106 AC_LIBTOOL_PROG_CC_C_O($1)
4107 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4108 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4109 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4110 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4112 AC_LIBTOOL_CONFIG($1)
4116 ])# AC_LIBTOOL_LANG_F77_CONFIG
4119 # AC_LIBTOOL_LANG_GCJ_CONFIG
4120 # --------------------------
4121 # Ensure that the configuration vars for the C compiler are
4122 # suitably defined. Those variables are subsequently used by
4123 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4124 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4125 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4128 # Source file extension for Java test sources.
4131 # Object file extension for compiled Java test sources.
4133 _LT_AC_TAGVAR(objext, $1)=$objext
4135 # Code to be used in simple compile tests
4136 lt_simple_compile_test_code="class foo {}"
4138 # Code to be used in simple link tests
4139 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4141 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4144 # save warnings/boilerplate of simple test code
4145 _LT_COMPILER_BOILERPLATE
4146 _LT_LINKER_BOILERPLATE
4148 # Allow CC to be a program name with arguments.
4152 _LT_AC_TAGVAR(compiler, $1)=$CC
4153 _LT_CC_BASENAME([$compiler])
4155 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4156 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4158 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4160 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4161 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4162 AC_LIBTOOL_PROG_CC_C_O($1)
4163 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4164 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4165 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4166 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4168 AC_LIBTOOL_CONFIG($1)
4172 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4175 # AC_LIBTOOL_LANG_RC_CONFIG
4176 # -------------------------
4177 # Ensure that the configuration vars for the Windows resource compiler are
4178 # suitably defined. Those variables are subsequently used by
4179 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4180 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4181 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4184 # Source file extension for RC test sources.
4187 # Object file extension for compiled RC test sources.
4189 _LT_AC_TAGVAR(objext, $1)=$objext
4191 # Code to be used in simple compile tests
4192 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4194 # Code to be used in simple link tests
4195 lt_simple_link_test_code="$lt_simple_compile_test_code"
4197 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4200 # save warnings/boilerplate of simple test code
4201 _LT_COMPILER_BOILERPLATE
4202 _LT_LINKER_BOILERPLATE
4204 # Allow CC to be a program name with arguments.
4208 _LT_AC_TAGVAR(compiler, $1)=$CC
4209 _LT_CC_BASENAME([$compiler])
4210 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4212 AC_LIBTOOL_CONFIG($1)
4216 ])# AC_LIBTOOL_LANG_RC_CONFIG
4219 # AC_LIBTOOL_CONFIG([TAGNAME])
4220 # ----------------------------
4221 # If TAGNAME is not passed, then create an initial libtool script
4222 # with a default configuration from the untagged config vars. Otherwise
4223 # add code to config.status for appending the configuration named by
4224 # TAGNAME from the matching tagged config vars.
4225 AC_DEFUN([AC_LIBTOOL_CONFIG],
4226 [# The else clause should only fire when bootstrapping the
4227 # libtool distribution, otherwise you forgot to ship ltmain.sh
4228 # with your package, and you will get complaints that there are
4229 # no rules to generate ltmain.sh.
4230 if test -f "$ltmain"; then
4231 # See if we are running on zsh, and set the options which allow our commands through
4232 # without removal of \ escapes.
4233 if test -n "${ZSH_VERSION+set}" ; then
4234 setopt NO_GLOB_SUBST
4236 # Now quote all the things that may contain metacharacters while being
4237 # careful not to overquote the AC_SUBSTed values. We take copies of the
4238 # variables and quote the copies for generation of the libtool script.
4239 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4241 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4242 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4243 deplibs_check_method reload_flag reload_cmds need_locks \
4244 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4245 lt_cv_sys_global_symbol_to_c_name_address \
4246 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4247 old_postinstall_cmds old_postuninstall_cmds \
4248 _LT_AC_TAGVAR(compiler, $1) \
4249 _LT_AC_TAGVAR(CC, $1) \
4250 _LT_AC_TAGVAR(LD, $1) \
4251 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4252 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4253 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4254 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4255 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4256 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4257 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4258 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4259 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4260 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4261 _LT_AC_TAGVAR(predep_objects, $1) \
4262 _LT_AC_TAGVAR(postdep_objects, $1) \
4263 _LT_AC_TAGVAR(predeps, $1) \
4264 _LT_AC_TAGVAR(postdeps, $1) \
4265 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4266 _LT_AC_TAGVAR(archive_cmds, $1) \
4267 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4268 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4269 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4270 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4271 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4272 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4273 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4274 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4276 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4277 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4278 _LT_AC_TAGVAR(module_cmds, $1) \
4279 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4280 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4281 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4282 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4283 _LT_AC_TAGVAR(include_expsyms, $1); do
4286 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4287 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4288 _LT_AC_TAGVAR(archive_cmds, $1) | \
4289 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4290 _LT_AC_TAGVAR(module_cmds, $1) | \
4291 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4292 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4293 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4294 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4295 postinstall_cmds | postuninstall_cmds | \
4296 old_postinstall_cmds | old_postuninstall_cmds | \
4297 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4298 # Double-quote double-evaled strings.
4299 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4302 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4308 *'\[$]0 --fallback-echo"')
4309 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4314 [cfgfile="${ofile}T"
4315 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4317 AC_MSG_NOTICE([creating $ofile])],
4320 cat <<__EOF__ >> "$cfgfile"
4324 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4325 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4326 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4328 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4329 # Free Software Foundation, Inc.
4331 # This file is part of GNU Libtool:
4332 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4334 # This program is free software; you can redistribute it and/or modify
4335 # it under the terms of the GNU General Public License as published by
4336 # the Free Software Foundation; either version 2 of the License, or
4337 # (at your option) any later version.
4339 # This program is distributed in the hope that it will be useful, but
4340 # WITHOUT ANY WARRANTY; without even the implied warranty of
4341 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4342 # General Public License for more details.
4344 # You should have received a copy of the GNU General Public License
4345 # along with this program; if not, write to the Free Software
4346 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4348 # As a special exception to the GNU General Public License, if you
4349 # distribute this file as part of a program that contains a
4350 # configuration script generated by Autoconf, you may include it under
4351 # the same distribution terms that you use for the rest of that program.
4353 # A sed program that does not truncate output.
4356 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4357 Xsed="$SED -e 1s/^X//"
4359 # The HP-UX ksh and POSIX shell print the target directory to stdout
4361 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4363 # The names of the tagged configurations supported by this script.
4366 # ### BEGIN LIBTOOL CONFIG],
4367 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4369 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4371 # Shell to use when invoking shell scripts.
4374 # Whether or not to build shared libraries.
4375 build_libtool_libs=$enable_shared
4377 # Whether or not to build static libraries.
4378 build_old_libs=$enable_static
4380 # Whether or not to add -lc for building shared libraries.
4381 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4383 # Whether or not to disallow shared libs when runtime libs are static
4384 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4386 # Whether or not to optimize for fast installation.
4387 fast_install=$enable_fast_install
4390 host_alias=$host_alias
4395 build_alias=$build_alias
4399 # An echo program that does not interpret backslashes.
4404 AR_FLAGS=$lt_AR_FLAGS
4409 # LTCC compiler flags.
4410 LTCFLAGS=$lt_LTCFLAGS
4412 # A language-specific compiler.
4413 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4415 # Is the compiler the GNU C compiler?
4416 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4421 # The linker used to build libraries.
4422 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4424 # Whether we need hard or soft links.
4427 # A BSD-compatible nm program.
4430 # A symbol stripping program
4433 # Used to examine libraries when file_magic_cmd begins "file"
4434 MAGIC_CMD=$MAGIC_CMD
4436 # Used on cygwin: DLL creation program.
4439 # Used on cygwin: object dumper.
4442 # Used on cygwin: assembler.
4445 # The name of the directory that contains temporary libtool files.
4448 # How to create reloadable object files.
4449 reload_flag=$lt_reload_flag
4450 reload_cmds=$lt_reload_cmds
4452 # How to pass a linker flag through the compiler.
4453 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4455 # Object file suffix (normally "o").
4458 # Old archive suffix (normally "a").
4461 # Shared library suffix (normally ".so").
4462 shrext_cmds='$shrext_cmds'
4464 # Executable file suffix (normally "").
4467 # Additional compiler flags for building library objects.
4468 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4471 # What is the maximum length of a command?
4472 max_cmd_len=$lt_cv_sys_max_cmd_len
4474 # Does compiler simultaneously support -c and -o options?
4475 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4477 # Must we lock files when doing compilation?
4478 need_locks=$lt_need_locks
4480 # Do we need the lib prefix for modules?
4481 need_lib_prefix=$need_lib_prefix
4483 # Do we need a version for libraries?
4484 need_version=$need_version
4486 # Whether dlopen is supported.
4487 dlopen_support=$enable_dlopen
4489 # Whether dlopen of programs is supported.
4490 dlopen_self=$enable_dlopen_self
4492 # Whether dlopen of statically linked programs is supported.
4493 dlopen_self_static=$enable_dlopen_self_static
4495 # Compiler flag to prevent dynamic linking.
4496 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4498 # Compiler flag to turn off builtin functions.
4499 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4501 # Compiler flag to allow reflexive dlopens.
4502 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4504 # Compiler flag to generate shared objects directly from archives.
4505 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4507 # Compiler flag to generate thread-safe objects.
4508 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4510 # Library versioning type.
4511 version_type=$version_type
4513 # Format of library name prefix.
4514 libname_spec=$lt_libname_spec
4516 # List of archive names. First name is the real one, the rest are links.
4517 # The last name is the one that the linker finds with -lNAME.
4518 library_names_spec=$lt_library_names_spec
4520 # The coded name of the library, if different from the real name.
4521 soname_spec=$lt_soname_spec
4523 # Commands used to build and install an old-style archive.
4525 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4526 old_postinstall_cmds=$lt_old_postinstall_cmds
4527 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4529 # Create an old-style archive from a shared archive.
4530 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4532 # Create a temporary old-style archive to link instead of a shared archive.
4533 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4535 # Commands used to build and install a shared archive.
4536 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4537 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4538 postinstall_cmds=$lt_postinstall_cmds
4539 postuninstall_cmds=$lt_postuninstall_cmds
4541 # Commands used to build a loadable module (assumed same as above if empty)
4542 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4543 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4545 # Commands to strip libraries.
4546 old_striplib=$lt_old_striplib
4547 striplib=$lt_striplib
4549 # Dependencies to place before the objects being linked to create a
4551 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4553 # Dependencies to place after the objects being linked to create a
4555 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4557 # Dependencies to place before the objects being linked to create a
4559 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4561 # Dependencies to place after the objects being linked to create a
4563 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4565 # The library search path used internally by the compiler when linking
4567 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4569 # Method to check whether dependent libraries are shared objects.
4570 deplibs_check_method=$lt_deplibs_check_method
4572 # Command to use when deplibs_check_method == file_magic.
4573 file_magic_cmd=$lt_file_magic_cmd
4575 # Flag that allows shared libraries with undefined symbols to be built.
4576 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4578 # Flag that forces no undefined symbols.
4579 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4581 # Commands used to finish a libtool library installation in a directory.
4582 finish_cmds=$lt_finish_cmds
4584 # Same as above, but a single script fragment to be evaled but not shown.
4585 finish_eval=$lt_finish_eval
4587 # Take the output of nm and produce a listing of raw symbols and C names.
4588 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4590 # Transform the output of nm in a proper C declaration
4591 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4593 # Transform the output of nm in a C name address pair
4594 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4596 # This is the shared library runtime path variable.
4597 runpath_var=$runpath_var
4599 # This is the shared library path variable.
4600 shlibpath_var=$shlibpath_var
4602 # Is shlibpath searched before the hard-coded library search path?
4603 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4605 # How to hardcode a shared library path into an executable.
4606 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4608 # Whether we should hardcode library paths into libraries.
4609 hardcode_into_libs=$hardcode_into_libs
4611 # Flag to hardcode \$libdir into a binary during linking.
4612 # This must work even if \$libdir does not exist.
4613 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4615 # If ld is used when linking, flag to hardcode \$libdir into
4616 # a binary during linking. This must work even if \$libdir does
4618 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4620 # Whether we need a single -rpath flag with a separated argument.
4621 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4623 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4625 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4627 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4629 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4631 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4632 # the resulting binary.
4633 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4635 # Set to yes if building a shared library automatically hardcodes DIR into the library
4636 # and all subsequent libraries and executables linked against it.
4637 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4639 # Variables whose values should be saved in libtool wrapper scripts and
4640 # restored at relink time.
4641 variables_saved_for_relink="$variables_saved_for_relink"
4643 # Whether libtool must link a program against all its dependency libraries.
4644 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4646 # Compile-time system search path for libraries
4647 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4649 # Run-time system search path for libraries
4650 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4652 # Fix the shell variable \$srcfile for the compiler.
4653 fix_srcfile_path=$lt_fix_srcfile_path
4655 # Set to yes if exported symbols are required.
4656 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4658 # The commands to list exported symbols.
4659 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4661 # The commands to extract the exported symbol list from a shared archive.
4662 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4664 # Symbols that should not be listed in the preloaded symbols.
4665 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4667 # Symbols that must always be exported.
4668 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4671 [# ### END LIBTOOL CONFIG],
4672 [# ### END LIBTOOL TAG CONFIG: $tagname])
4679 cat <<\EOF >> "$cfgfile"
4681 # AIX sometimes has problems with the GCC collect2 program. For some
4682 # reason, if we set the COLLECT_NAMES environment variable, the problems
4683 # vanish in a puff of smoke.
4684 if test "X${COLLECT_NAMES+set}" != Xset; then
4686 export COLLECT_NAMES
4692 # We use sed instead of cat because bash on DJGPP gets confused if
4693 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4694 # text mode, it properly converts lines to CR/LF. This bash problem
4695 # is reportedly fixed, but why not run on old versions too?
4696 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4698 mv -f "$cfgfile" "$ofile" || \
4699 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4703 # If there is no Makefile yet, we rely on a make rule to execute
4704 # `config.status --recheck' to rerun these tests and create the
4705 # libtool script then.
4706 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4707 if test -f "$ltmain_in"; then
4708 test -f Makefile && make "$ltmain"
4711 ])# AC_LIBTOOL_CONFIG
4714 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4715 # -------------------------------------------
4716 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4717 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4719 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4721 if test "$GCC" = yes; then
4722 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4724 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4725 lt_cv_prog_compiler_rtti_exceptions,
4726 [-fno-rtti -fno-exceptions], [],
4727 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4729 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4732 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4733 # ---------------------------------
4734 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4735 [AC_REQUIRE([AC_CANONICAL_HOST])
4736 AC_REQUIRE([LT_AC_PROG_SED])
4737 AC_REQUIRE([AC_PROG_NM])
4738 AC_REQUIRE([AC_OBJEXT])
4739 # Check for command to grab the raw symbol name followed by C symbol from nm.
4740 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4741 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4743 # These are sane defaults that work on at least a few old systems.
4744 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4746 # Character class describing NM global symbol codes.
4747 symcode='[[BCDEGRST]]'
4749 # Regexp to match symbols that can be accessed directly from C.
4750 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4752 # Transform an extracted symbol line into a proper C declaration
4753 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4755 # Transform an extracted symbol line into symbol name and symbol address
4756 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'"
4758 # Define system-specific variables.
4763 cygwin* | mingw* | pw32*)
4764 symcode='[[ABCDGISTW]]'
4766 hpux*) # Its linker distinguishes data from code symbols
4767 if test "$host_cpu" = ia64; then
4768 symcode='[[ABCDEGRST]]'
4770 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4771 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'"
4773 linux* | k*bsd*-gnu)
4774 if test "$host_cpu" = ia64; then
4775 symcode='[[ABCDGIRSTW]]'
4776 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4777 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'"
4781 symcode='[[BCDEGRST]]'
4784 symcode='[[BCDEGQRST]]'
4795 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4799 symcode='[[DFNSTU]]'
4803 # Handle CRLF in mingw tool chain
4807 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4811 # If we're using GNU nm, then use its standard symbol codes.
4812 case `$NM -V 2>&1` in
4813 *GNU* | *'with BFD'*)
4814 symcode='[[ABCDGIRSTW]]' ;;
4817 # Try without a prefix undercore, then with it.
4818 for ac_symprfx in "" "_"; do
4820 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4821 symxfrm="\\1 $ac_symprfx\\2 \\2"
4823 # Write the raw and C identifiers.
4824 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4826 # Check to see that the pipe works correctly.
4830 cat > conftest.$ac_ext <<EOF
4835 void nm_test_func(){}
4839 int main(){nm_test_var='a';nm_test_func();return(0);}
4842 if AC_TRY_EVAL(ac_compile); then
4843 # Now try to grab the symbols.
4845 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4846 # Try sorting and uniquifying the output.
4847 if sort "$nlist" | uniq > "$nlist"T; then
4848 mv -f "$nlist"T "$nlist"
4853 # Make sure that we snagged all the symbols we need.
4854 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4855 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4856 cat <<EOF > conftest.$ac_ext
4862 # Now generate the symbol file.
4863 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4865 cat <<EOF >> conftest.$ac_ext
4866 #if defined (__STDC__) && __STDC__
4867 # define lt_ptr_t void *
4869 # define lt_ptr_t char *
4873 /* The mapping between symbol names and symbols. */
4878 lt_preloaded_symbols[[]] =
4881 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4882 cat <<\EOF >> conftest.$ac_ext
4890 # Now try linking the two files.
4891 mv conftest.$ac_objext conftstm.$ac_objext
4892 lt_save_LIBS="$LIBS"
4893 lt_save_CFLAGS="$CFLAGS"
4894 LIBS="conftstm.$ac_objext"
4895 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4896 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4899 LIBS="$lt_save_LIBS"
4900 CFLAGS="$lt_save_CFLAGS"
4902 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4905 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4908 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4911 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4912 cat conftest.$ac_ext >&5
4914 rm -f conftest* conftst*
4916 # Do not use the global_symbol_pipe unless it works.
4917 if test "$pipe_works" = yes; then
4920 lt_cv_sys_global_symbol_pipe=