1 # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # 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 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16 # serial 52 AC_PROG_LIBTOOL
19 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20 # -----------------------------------------------------------
21 # If this macro is not defined by Autoconf, define it here.
22 m4_ifdef([AC_PROVIDE_IFELSE],
24 [m4_define([AC_PROVIDE_IFELSE],
25 [m4_ifdef([AC_PROVIDE_$1],
31 AC_DEFUN([AC_PROG_LIBTOOL],
32 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35 AC_PROVIDE_IFELSE([AC_PROG_CXX],
37 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
39 dnl And a similar setup for Fortran 77 support
40 AC_PROVIDE_IFELSE([AC_PROG_F77],
42 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
45 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
50 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
52 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
55 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56 ifdef([A][M_PROG_GCJ],
57 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58 ifdef([LT_AC_PROG_GCJ],
59 [define([LT_AC_PROG_GCJ],
60 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
66 AC_DEFUN([_AC_PROG_LIBTOOL],
67 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
72 # This can be used to rebuild libtool when needed
73 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
75 # Always use our own libtool.
76 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
79 # Prevent multiple expansion
80 define([AC_PROG_LIBTOOL], [])
86 AC_DEFUN([AC_LIBTOOL_SETUP],
88 AC_REQUIRE([AC_ENABLE_SHARED])dnl
89 AC_REQUIRE([AC_ENABLE_STATIC])dnl
90 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91 AC_REQUIRE([AC_CANONICAL_HOST])dnl
92 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
93 AC_REQUIRE([AC_PROG_CC])dnl
94 AC_REQUIRE([AC_PROG_LD])dnl
95 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96 AC_REQUIRE([AC_PROG_NM])dnl
98 AC_REQUIRE([AC_PROG_LN_S])dnl
99 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101 AC_REQUIRE([AC_OBJEXT])dnl
102 AC_REQUIRE([AC_EXEEXT])dnl
104 AC_LIBTOOL_SYS_MAX_CMD_LEN
105 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
108 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
109 _LT_AC_PROG_ECHO_BACKSLASH
113 # AIX sometimes has problems with the GCC collect2 program. For some
114 # reason, if we set the COLLECT_NAMES environment variable, the problems
115 # vanish in a puff of smoke.
116 if test "X${COLLECT_NAMES+set}" != Xset; then
123 # Sed substitution that helps us do robust quoting. It backslashifies
124 # metacharacters that are still active within double-quoted strings.
125 Xsed='sed -e 1s/^X//'
126 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128 # Same as above, but do not quote variable references.
129 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131 # Sed substitution to delay expansion of an escaped shell variable in a
132 # double_quote_subst'ed string.
133 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135 # Sed substitution to avoid accidental globbing in evaled expressions
136 no_glob_subst='s/\*/\\\*/g'
142 default_ofile=libtool
145 # All known linkers require a `.a' archive for static linking (except MSVC,
146 # which needs '.lib').
148 ltmain="$ac_aux_dir/ltmain.sh"
149 ofile="$default_ofile"
150 with_gnu_ld="$lt_cv_prog_gnu_ld"
152 AC_CHECK_TOOL(AR, ar, false)
153 AC_CHECK_TOOL(RANLIB, ranlib, :)
154 AC_CHECK_TOOL(STRIP, strip, :)
159 # Set sane defaults for various variables
160 test -z "$AR" && AR=ar
161 test -z "$AR_FLAGS" && AR_FLAGS=cru
162 test -z "$AS" && AS=as
163 test -z "$CC" && CC=cc
164 test -z "$LTCC" && LTCC=$CC
165 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
166 test -z "$DLLTOOL" && DLLTOOL=dlltool
167 test -z "$LD" && LD=ld
168 test -z "$LN_S" && LN_S="ln -s"
169 test -z "$MAGIC_CMD" && MAGIC_CMD=file
170 test -z "$NM" && NM=nm
171 test -z "$SED" && SED=sed
172 test -z "$OBJDUMP" && OBJDUMP=objdump
173 test -z "$RANLIB" && RANLIB=:
174 test -z "$STRIP" && STRIP=:
175 test -z "$ac_objext" && ac_objext=o
177 # Determine commands to create old-style static archives.
178 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
179 old_postinstall_cmds='chmod 644 $oldlib'
180 old_postuninstall_cmds=
182 if test -n "$RANLIB"; then
185 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
188 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
191 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
194 _LT_CC_BASENAME([$compiler])
196 # Only perform the check for file, if the check method requires it
197 case $deplibs_check_method in
199 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
205 _LT_REQUIRED_DARWIN_CHECKS
207 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
208 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
209 enable_win32_dll=yes, enable_win32_dll=no)
211 AC_ARG_ENABLE([libtool-lock],
212 [AC_HELP_STRING([--disable-libtool-lock],
213 [avoid locking (might break parallel builds)])])
214 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
217 [AC_HELP_STRING([--with-pic],
218 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
219 [pic_mode="$withval"],
221 test -z "$pic_mode" && pic_mode=default
223 # Use C for the default configuration in the libtool script
225 AC_LIBTOOL_LANG_C_CONFIG
230 # _LT_AC_SYS_COMPILER
231 # -------------------
232 AC_DEFUN([_LT_AC_SYS_COMPILER],
233 [AC_REQUIRE([AC_PROG_CC])dnl
235 # If no C compiler was specified, use CC.
238 # If no C compiler flags were specified, use CFLAGS.
239 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
241 # Allow CC to be a program name with arguments.
243 ])# _LT_AC_SYS_COMPILER
246 # _LT_CC_BASENAME(CC)
247 # -------------------
248 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
249 AC_DEFUN([_LT_CC_BASENAME],
250 [for cc_temp in $1""; do
252 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
253 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
258 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
262 # _LT_COMPILER_BOILERPLATE
263 # ------------------------
264 # Check for compiler boilerplate output or warnings with
265 # the simple compiler test code.
266 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
267 [AC_REQUIRE([LT_AC_PROG_SED])dnl
268 ac_outfile=conftest.$ac_objext
269 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
270 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
271 _lt_compiler_boilerplate=`cat conftest.err`
273 ])# _LT_COMPILER_BOILERPLATE
276 # _LT_LINKER_BOILERPLATE
277 # ----------------------
278 # Check for linker boilerplate output or warnings with
279 # the simple link test code.
280 AC_DEFUN([_LT_LINKER_BOILERPLATE],
281 [AC_REQUIRE([LT_AC_PROG_SED])dnl
282 ac_outfile=conftest.$ac_objext
283 echo "$lt_simple_link_test_code" >conftest.$ac_ext
284 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
285 _lt_linker_boilerplate=`cat conftest.err`
287 ])# _LT_LINKER_BOILERPLATE
289 # _LT_REQUIRED_DARWIN_CHECKS
290 # --------------------------
291 # Check for some things on darwin
292 AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
295 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
296 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
298 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
299 [lt_cv_apple_cc_single_mod=no
300 if test -z "${LT_MULTI_MODULE}"; then
301 # By default we will add the -single_module flag. You can override
302 # by either setting the environment variable LT_MULTI_MODULE
303 # non-empty at configure time, or by adding -multi_module to the
305 echo "int foo(void){return 1;}" > conftest.c
306 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
307 -dynamiclib ${wl}-single_module conftest.c
308 if test -f libconftest.dylib; then
309 lt_cv_apple_cc_single_mod=yes
310 rm -rf libconftest.dylib*
314 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
315 [lt_cv_ld_exported_symbols_list],
316 [lt_cv_ld_exported_symbols_list=no
317 save_LDFLAGS=$LDFLAGS
318 echo "_main" > conftest.sym
319 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
320 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
321 [lt_cv_ld_exported_symbols_list=yes],
322 [lt_cv_ld_exported_symbols_list=no])
323 LDFLAGS="$save_LDFLAGS"
326 rhapsody* | darwin1.[[0123]])
327 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
329 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
331 # if running on 10.5 or later, the deployment target defaults
332 # to the OS version, if on x86, and 10.4, the deployment
333 # target defaults to 10.4. Don't you love it?
334 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
335 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
336 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
338 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
340 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
344 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
345 _lt_dar_single_mod='$single_module'
347 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
348 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
350 _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
352 if test "$DSYMUTIL" != ":"; then
353 _lt_dsymutil="~$DSYMUTIL \$lib || :"
361 # _LT_AC_SYS_LIBPATH_AIX
362 # ----------------------
363 # Links a minimal program and checks the executable
364 # for the system default hardcoded library path. In most cases,
365 # this is /usr/lib:/lib, but when the MPI compilers are used
366 # the location of the communication and MPI libs are included too.
367 # If we don't find anything, use the default library path according
368 # to the aix ld manual.
369 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
370 [AC_REQUIRE([LT_AC_PROG_SED])dnl
371 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
373 /Import File Strings/,/^$/ {
379 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
380 # Check for a 64-bit object if we didn't find anything.
381 if test -z "$aix_libpath"; then
382 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
384 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
385 ])# _LT_AC_SYS_LIBPATH_AIX
388 # _LT_AC_SHELL_INIT(ARG)
389 # ----------------------
390 AC_DEFUN([_LT_AC_SHELL_INIT],
391 [ifdef([AC_DIVERSION_NOTICE],
392 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
393 [AC_DIVERT_PUSH(NOTICE)])
396 ])# _LT_AC_SHELL_INIT
399 # _LT_AC_PROG_ECHO_BACKSLASH
400 # --------------------------
401 # Add some code to the start of the generated configure script which
402 # will find an echo command which doesn't interpret backslashes.
403 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
405 # Check that we are running under the correct shell.
406 SHELL=${CONFIG_SHELL-/bin/sh}
410 # Remove one level of quotation (which was required for Make).
411 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
416 if test "X[$]1" = X--no-reexec; then
417 # Discard the --no-reexec flag, and continue.
419 elif test "X[$]1" = X--fallback-echo; then
420 # Avoid inline document here, it may be left over
422 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
423 # Yippee, $echo works!
426 # Restart under the correct shell.
427 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
430 if test "X[$]1" = X--fallback-echo; then
431 # used as fallback echo
439 # The HP-UX ksh and POSIX shell print the target directory to stdout
441 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
443 if test -z "$ECHO"; then
444 if test "X${echo_test_string+set}" != Xset; then
445 # find a string as large as possible, as long as the shell can cope with it
446 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
447 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
448 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
449 echo_test_string=`eval $cmd` &&
450 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
457 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
458 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
459 test "X$echo_testing_string" = "X$echo_test_string"; then
462 # The Solaris, AIX, and Digital Unix default echo programs unquote
463 # backslashes. This makes it impossible to quote backslashes using
464 # echo "$something" | sed 's/\\/\\\\/g'
466 # So, first we look for a working echo in the user's PATH.
468 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
469 for dir in $PATH /usr/ucb; do
471 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
472 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
473 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
474 test "X$echo_testing_string" = "X$echo_test_string"; then
481 if test "X$echo" = Xecho; then
482 # We didn't find a better echo, so look for alternatives.
483 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
484 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
485 test "X$echo_testing_string" = "X$echo_test_string"; then
486 # This shell has a builtin print -r that does the trick.
488 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
489 test "X$CONFIG_SHELL" != X/bin/ksh; then
490 # If we have ksh, try running configure again with it.
491 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
492 export ORIGINAL_CONFIG_SHELL
493 CONFIG_SHELL=/bin/ksh
495 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
499 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
500 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
501 test "X$echo_testing_string" = "X$echo_test_string"; then
504 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
505 test "X$echo_testing_string" = 'X\t' &&
506 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
507 test "X$echo_testing_string" = "X$echo_test_string"; then
508 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
510 SHELL="$CONFIG_SHELL"
512 echo="$CONFIG_SHELL [$]0 --fallback-echo"
513 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
514 test "X$echo_testing_string" = 'X\t' &&
515 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
516 test "X$echo_testing_string" = "X$echo_test_string"; then
517 echo="$CONFIG_SHELL [$]0 --fallback-echo"
519 # maybe with a smaller string...
522 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
523 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
530 if test "$prev" != 'sed 50q "[$]0"'; then
531 echo_test_string=`eval $prev`
532 export echo_test_string
533 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
535 # Oops. We lost completely, so just stick with echo.
544 # Copy echo and quote the copy suitably for passing to libtool from
545 # the Makefile, instead of quoting the original, which is used later.
547 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
548 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
552 ])])# _LT_AC_PROG_ECHO_BACKSLASH
557 AC_DEFUN([_LT_AC_LOCK],
558 [AC_ARG_ENABLE([libtool-lock],
559 [AC_HELP_STRING([--disable-libtool-lock],
560 [avoid locking (might break parallel builds)])])
561 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
563 # Some flags need to be propagated to the compiler or linker for good
567 # Find out which ABI we are using.
568 echo 'int i;' > conftest.$ac_ext
569 if AC_TRY_EVAL(ac_compile); then
570 case `/usr/bin/file conftest.$ac_objext` in
582 # Find out which ABI we are using.
583 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
584 if AC_TRY_EVAL(ac_compile); then
585 if test "$lt_cv_prog_gnu_ld" = yes; then
586 case `/usr/bin/file conftest.$ac_objext` in
588 LD="${LD-ld} -melf32bsmip"
591 LD="${LD-ld} -melf32bmipn32"
594 LD="${LD-ld} -melf64bmip"
598 case `/usr/bin/file conftest.$ac_objext` in
614 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
615 s390*-*linux*|sparc*-*linux*)
616 # Find out which ABI we are using.
617 echo 'int i;' > conftest.$ac_ext
618 if AC_TRY_EVAL(ac_compile); then
619 case `/usr/bin/file conftest.o` in
622 x86_64-*kfreebsd*-gnu)
623 LD="${LD-ld} -m elf_i386_fbsd"
626 LD="${LD-ld} -m elf_i386"
628 ppc64-*linux*|powerpc64-*linux*)
629 LD="${LD-ld} -m elf32ppclinux"
632 LD="${LD-ld} -m elf_s390"
635 LD="${LD-ld} -m elf32_sparc"
641 x86_64-*kfreebsd*-gnu)
642 LD="${LD-ld} -m elf_x86_64_fbsd"
645 LD="${LD-ld} -m elf_x86_64"
647 ppc*-*linux*|powerpc*-*linux*)
648 LD="${LD-ld} -m elf64ppc"
651 LD="${LD-ld} -m elf64_s390"
654 LD="${LD-ld} -m elf64_sparc"
664 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
665 SAVE_CFLAGS="$CFLAGS"
666 CFLAGS="$CFLAGS -belf"
667 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
669 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
671 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
672 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
673 CFLAGS="$SAVE_CFLAGS"
677 # Find out which ABI we are using.
678 echo 'int i;' > conftest.$ac_ext
679 if AC_TRY_EVAL(ac_compile); then
680 case `/usr/bin/file conftest.o` in
682 case $lt_cv_prog_gnu_ld in
683 yes*) LD="${LD-ld} -m elf64_sparc" ;;
685 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
696 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
697 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
698 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
699 AC_CHECK_TOOL(AS, as, false)
700 AC_CHECK_TOOL(OBJDUMP, objdump, false)
705 need_locks="$enable_libtool_lock"
710 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
711 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
712 # ----------------------------------------------------------------
713 # Check whether the given compiler option works
714 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
715 [AC_REQUIRE([LT_AC_PROG_SED])
716 AC_CACHE_CHECK([$1], [$2],
718 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
719 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
720 lt_compiler_flag="$3"
721 # Insert the option either (1) after the last *FLAGS variable, or
722 # (2) before a word containing "conftest.", or (3) at the end.
723 # Note that $ac_compile itself does not contain backslashes and begins
724 # with a dollar sign (not a hyphen), so the echo should work correctly.
725 # The option is referenced via a variable to avoid confusing sed.
726 lt_compile=`echo "$ac_compile" | $SED \
727 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
728 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
729 -e 's:$: $lt_compiler_flag:'`
730 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
731 (eval "$lt_compile" 2>conftest.err)
733 cat conftest.err >&AS_MESSAGE_LOG_FD
734 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
735 if (exit $ac_status) && test -s "$ac_outfile"; then
736 # The compiler can only warn and ignore the option if not recognized
737 # So say no if there are warnings other than the usual output.
738 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
739 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
740 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
747 if test x"[$]$2" = xyes; then
748 ifelse([$5], , :, [$5])
750 ifelse([$6], , :, [$6])
752 ])# AC_LIBTOOL_COMPILER_OPTION
755 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
756 # [ACTION-SUCCESS], [ACTION-FAILURE])
757 # ------------------------------------------------------------
758 # Check whether the given compiler option works
759 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
760 [AC_REQUIRE([LT_AC_PROG_SED])dnl
761 AC_CACHE_CHECK([$1], [$2],
763 save_LDFLAGS="$LDFLAGS"
764 LDFLAGS="$LDFLAGS $3"
765 echo "$lt_simple_link_test_code" > conftest.$ac_ext
766 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
767 # The linker can only warn and ignore the option if not recognized
768 # So say no if there are warnings
769 if test -s conftest.err; then
770 # Append any errors to the config.log.
771 cat conftest.err 1>&AS_MESSAGE_LOG_FD
772 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
773 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
774 if diff conftest.exp conftest.er2 >/dev/null; then
782 LDFLAGS="$save_LDFLAGS"
785 if test x"[$]$2" = xyes; then
786 ifelse([$4], , :, [$4])
788 ifelse([$5], , :, [$5])
790 ])# AC_LIBTOOL_LINKER_OPTION
793 # AC_LIBTOOL_SYS_MAX_CMD_LEN
794 # --------------------------
795 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
796 [# find the maximum length of command line arguments
797 AC_MSG_CHECKING([the maximum length of command line arguments])
798 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
804 # On DJGPP, this test can blow up pretty badly due to problems in libc
805 # (any single argument exceeding 2000 bytes causes a buffer overrun
806 # during glob expansion). Even if it were fixed, the result of this
807 # check would be larger than it should be.
808 lt_cv_sys_max_cmd_len=12288; # 12K is about right
812 # Under GNU Hurd, this test is not required because there is
813 # no limit to the length of command line arguments.
814 # Libtool will interpret -1 as no limit whatsoever
815 lt_cv_sys_max_cmd_len=-1;
819 # On Win9x/ME, this test blows up -- it succeeds, but takes
820 # about 5 minutes as the teststring grows exponentially.
821 # Worse, since 9x/ME are not pre-emptively multitasking,
822 # you end up with a "frozen" computer, even though with patience
823 # the test eventually succeeds (with a max line length of 256k).
824 # Instead, let's just punt: use the minimum linelength reported by
825 # all of the supported platforms: 8192 (on NT/2K/XP).
826 lt_cv_sys_max_cmd_len=8192;
830 # On AmigaOS with pdksh, this test takes hours, literally.
831 # So we just punt and use a minimum line length of 8192.
832 lt_cv_sys_max_cmd_len=8192;
835 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
836 # This has been around since 386BSD, at least. Likely further.
837 if test -x /sbin/sysctl; then
838 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
839 elif test -x /usr/sbin/sysctl; then
840 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
842 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
844 # And add a safety zone
845 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
846 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
850 # We know the value 262144 and hardcode it with a safety zone (like BSD)
851 lt_cv_sys_max_cmd_len=196608
855 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
856 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
857 # nice to cause kernel panics so lets avoid the loop below.
858 # First set a reasonable default.
859 lt_cv_sys_max_cmd_len=16384
861 if test -x /sbin/sysconfig; then
862 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
863 *1*) lt_cv_sys_max_cmd_len=-1 ;;
868 lt_cv_sys_max_cmd_len=102400
870 sysv5* | sco5v6* | sysv4.2uw2*)
871 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
872 if test -n "$kargmax"; then
873 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
875 lt_cv_sys_max_cmd_len=32768
879 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
880 if test -n "$lt_cv_sys_max_cmd_len"; then
881 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
882 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
884 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
885 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
886 = "XX$teststring") >/dev/null 2>&1 &&
887 new_result=`expr "X$teststring" : ".*" 2>&1` &&
888 lt_cv_sys_max_cmd_len=$new_result &&
889 test $i != 17 # 1/2 MB should be enough
892 teststring=$teststring$teststring
895 # Add a significant safety factor because C++ compilers can tack on massive
896 # amounts of additional arguments before passing them to the linker.
897 # It appears as though 1/2 is a usable value.
898 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
903 if test -n $lt_cv_sys_max_cmd_len ; then
904 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
908 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
913 AC_DEFUN([_LT_AC_CHECK_DLFCN],
914 [AC_CHECK_HEADERS(dlfcn.h)dnl
915 ])# _LT_AC_CHECK_DLFCN
918 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
919 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
920 # ---------------------------------------------------------------------
921 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
922 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
923 if test "$cross_compiling" = yes; then :
926 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
927 lt_status=$lt_dlunknown
928 cat > conftest.$ac_ext <<EOF
929 [#line __oline__ "configure"
930 #include "confdefs.h"
939 # define LT_DLGLOBAL RTLD_GLOBAL
942 # define LT_DLGLOBAL DL_GLOBAL
944 # define LT_DLGLOBAL 0
948 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
949 find out it does not work in some platform. */
950 #ifndef LT_DLLAZY_OR_NOW
952 # define LT_DLLAZY_OR_NOW RTLD_LAZY
955 # define LT_DLLAZY_OR_NOW DL_LAZY
958 # define LT_DLLAZY_OR_NOW RTLD_NOW
961 # define LT_DLLAZY_OR_NOW DL_NOW
963 # define LT_DLLAZY_OR_NOW 0
971 extern "C" void exit (int);
974 void fnord() { int i=42;}
977 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
978 int status = $lt_dlunknown;
982 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
983 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
984 /* dlclose (self); */
992 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
993 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
996 x$lt_dlno_uscore) $1 ;;
997 x$lt_dlneed_uscore) $2 ;;
998 x$lt_dlunknown|x*) $3 ;;
1001 # compilation failed
1006 ])# _LT_AC_TRY_DLOPEN_SELF
1009 # AC_LIBTOOL_DLOPEN_SELF
1010 # ----------------------
1011 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1012 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1013 if test "x$enable_dlopen" != xyes; then
1014 enable_dlopen=unknown
1015 enable_dlopen_self=unknown
1016 enable_dlopen_self_static=unknown
1023 lt_cv_dlopen="load_add_on"
1025 lt_cv_dlopen_self=yes
1029 lt_cv_dlopen="LoadLibrary"
1034 lt_cv_dlopen="dlopen"
1039 # if libdl is installed we need to link against it
1040 AC_CHECK_LIB([dl], [dlopen],
1041 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1044 lt_cv_dlopen_self=yes
1049 AC_CHECK_FUNC([shl_load],
1050 [lt_cv_dlopen="shl_load"],
1051 [AC_CHECK_LIB([dld], [shl_load],
1052 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1053 [AC_CHECK_FUNC([dlopen],
1054 [lt_cv_dlopen="dlopen"],
1055 [AC_CHECK_LIB([dl], [dlopen],
1056 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1057 [AC_CHECK_LIB([svld], [dlopen],
1058 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1059 [AC_CHECK_LIB([dld], [dld_link],
1060 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1069 if test "x$lt_cv_dlopen" != xno; then
1075 case $lt_cv_dlopen in
1077 save_CPPFLAGS="$CPPFLAGS"
1078 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1080 save_LDFLAGS="$LDFLAGS"
1081 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1084 LIBS="$lt_cv_dlopen_libs $LIBS"
1086 AC_CACHE_CHECK([whether a program can dlopen itself],
1087 lt_cv_dlopen_self, [dnl
1088 _LT_AC_TRY_DLOPEN_SELF(
1089 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1090 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1093 if test "x$lt_cv_dlopen_self" = xyes; then
1094 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1095 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1096 lt_cv_dlopen_self_static, [dnl
1097 _LT_AC_TRY_DLOPEN_SELF(
1098 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1099 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1103 CPPFLAGS="$save_CPPFLAGS"
1104 LDFLAGS="$save_LDFLAGS"
1109 case $lt_cv_dlopen_self in
1110 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1111 *) enable_dlopen_self=unknown ;;
1114 case $lt_cv_dlopen_self_static in
1115 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1116 *) enable_dlopen_self_static=unknown ;;
1119 ])# AC_LIBTOOL_DLOPEN_SELF
1122 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1123 # ---------------------------------
1124 # Check to see if options -c and -o are simultaneously supported by compiler
1125 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1126 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1127 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1128 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1129 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1130 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1131 $rm -r conftest 2>/dev/null
1135 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1137 lt_compiler_flag="-o out/conftest2.$ac_objext"
1138 # Insert the option either (1) after the last *FLAGS variable, or
1139 # (2) before a word containing "conftest.", or (3) at the end.
1140 # Note that $ac_compile itself does not contain backslashes and begins
1141 # with a dollar sign (not a hyphen), so the echo should work correctly.
1142 lt_compile=`echo "$ac_compile" | $SED \
1143 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1144 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1145 -e 's:$: $lt_compiler_flag:'`
1146 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1147 (eval "$lt_compile" 2>out/conftest.err)
1149 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1150 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1151 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1153 # The compiler can only warn and ignore the option if not recognized
1154 # So say no if there are warnings
1155 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1156 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1157 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1158 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1161 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1163 # SGI C++ compiler will create directory out/ii_files/ for
1164 # template instantiation
1165 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1166 $rm out/* && rmdir out
1171 ])# AC_LIBTOOL_PROG_CC_C_O
1174 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1175 # -----------------------------------------
1176 # Check to see if we can do hard links to lock some files if needed
1177 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1178 [AC_REQUIRE([_LT_AC_LOCK])dnl
1180 hard_links="nottested"
1181 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1182 # do not overwrite the value of need_locks provided by the user
1183 AC_MSG_CHECKING([if we can lock with hard links])
1186 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1188 ln conftest.a conftest.b 2>&5 || hard_links=no
1189 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1190 AC_MSG_RESULT([$hard_links])
1191 if test "$hard_links" = no; then
1192 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1198 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1203 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1204 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1205 [rm -f .libs 2>/dev/null
1206 mkdir .libs 2>/dev/null
1207 if test -d .libs; then
1210 # MS-DOS does not allow filenames that begin with a dot.
1213 rmdir .libs 2>/dev/null])
1214 objdir=$lt_cv_objdir
1215 ])# AC_LIBTOOL_OBJDIR
1218 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1219 # ----------------------------------------------
1220 # Check hardcoding attributes.
1221 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1222 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1223 _LT_AC_TAGVAR(hardcode_action, $1)=
1224 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1225 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1226 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1228 # We can hardcode non-existant directories.
1229 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1230 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1231 # have to relink, otherwise we might link with an installed library
1232 # when we should be linking with a yet-to-be-installed one
1233 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1234 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1235 # Linking always hardcodes the temporary library directory.
1236 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1238 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1239 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1242 # We cannot hardcode anything, or else we can only hardcode existing
1244 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1246 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1248 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1249 # Fast installation is not supported
1250 enable_fast_install=no
1251 elif test "$shlibpath_overrides_runpath" = yes ||
1252 test "$enable_shared" = no; then
1253 # Fast installation is not necessary
1254 enable_fast_install=needless
1256 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1259 # AC_LIBTOOL_SYS_LIB_STRIP
1260 # ------------------------
1261 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1264 AC_MSG_CHECKING([whether stripping libraries is possible])
1265 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1266 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1267 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1268 AC_MSG_RESULT([yes])
1270 # FIXME - insert some real tests, host_os isn't really good enough
1273 if test -n "$STRIP" ; then
1274 striplib="$STRIP -x"
1275 old_striplib="$STRIP -S"
1276 AC_MSG_RESULT([yes])
1286 ])# AC_LIBTOOL_SYS_LIB_STRIP
1289 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1290 # -----------------------------
1291 # PORTME Fill in your ld.so characteristics
1292 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1293 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1294 AC_MSG_CHECKING([dynamic linker characteristics])
1296 libname_spec='lib$name'
1304 shlibpath_overrides_runpath=unknown
1306 dynamic_linker="$host_os ld.so"
1307 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1309 if test "$GCC" = yes; then
1311 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1312 *) lt_awk_arg="/^libraries:/" ;;
1314 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1315 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1316 # if the path contains ";" then we assume it to be the separator
1317 # otherwise default to the standard path separator (i.e. ":") - it is
1318 # assumed that no part of a normal pathname contains ";" but that should
1319 # okay in the real world where ";" in dirpaths is itself problematic.
1320 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1322 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1324 # Ok, now we have the path, separated by spaces, we can step through it
1325 # and add multilib dir if necessary.
1326 lt_tmp_lt_search_path_spec=
1327 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1328 for lt_sys_path in $lt_search_path_spec; do
1329 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1330 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1332 test -d "$lt_sys_path" && \
1333 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1336 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1337 BEGIN {RS=" "; FS="/|\n";} {
1340 for (lt_i = NF; lt_i > 0; lt_i--) {
1341 if ($lt_i != "" && $lt_i != ".") {
1342 if ($lt_i == "..") {
1345 if (lt_count == 0) {
1346 lt_foo="/" $lt_i lt_foo;
1353 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1354 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1356 sys_lib_search_path_spec=`echo $lt_search_path_spec`
1358 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1360 need_lib_prefix=unknown
1361 hardcode_into_libs=no
1363 # when you set need_version to no, make sure it does not cause -set_version
1364 # flags to be left without arguments
1365 need_version=unknown
1370 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1371 shlibpath_var=LIBPATH
1373 # AIX 3 has no versioning support, so we append a major version to the name.
1374 soname_spec='${libname}${release}${shared_ext}$major'
1381 hardcode_into_libs=yes
1382 if test "$host_cpu" = ia64; then
1383 # AIX 5 supports IA64
1384 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1385 shlibpath_var=LD_LIBRARY_PATH
1387 # With GCC up to 2.95.x, collect2 would create an import file
1388 # for dependence libraries. The import file would start with
1389 # the line `#! .'. This would cause the generated library to
1390 # depend on `.', always an invalid library. This was fixed in
1391 # development snapshots of GCC prior to 3.0.
1393 aix4 | aix4.[[01]] | aix4.[[01]].*)
1394 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1396 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1403 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1404 # soname into executable. Probably we can add versioning support to
1405 # collect2, so additional links can be useful in future.
1406 if test "$aix_use_runtimelinking" = yes; then
1407 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1408 # instead of lib<name>.a to let people know that these are not
1409 # typical AIX shared libraries.
1410 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1412 # We preserve .a as extension for shared libraries through AIX4.2
1413 # and later when we are not doing run time linking.
1414 library_names_spec='${libname}${release}.a $libname.a'
1415 soname_spec='${libname}${release}${shared_ext}$major'
1417 shlibpath_var=LIBPATH
1422 library_names_spec='$libname.ixlibrary $libname.a'
1423 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1424 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'
1428 library_names_spec='${libname}${shared_ext}'
1429 dynamic_linker="$host_os ld.so"
1430 shlibpath_var=LIBRARY_PATH
1436 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1437 soname_spec='${libname}${release}${shared_ext}$major'
1438 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1439 shlibpath_var=LD_LIBRARY_PATH
1440 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1441 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1442 # the default ld.so.conf also contains /usr/contrib/lib and
1443 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1444 # libtool to hard-code these into programs
1447 cygwin* | mingw* | pw32*)
1448 version_type=windows
1453 case $GCC,$host_os in
1454 yes,cygwin* | yes,mingw* | yes,pw32*)
1455 library_names_spec='$libname.dll.a'
1456 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1457 postinstall_cmds='base_file=`basename \${file}`~
1458 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1459 dldir=$destdir/`dirname \$dlpath`~
1460 test -d \$dldir || mkdir -p \$dldir~
1461 $install_prog $dir/$dlname \$dldir/$dlname~
1462 chmod a+x \$dldir/$dlname'
1463 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1464 dlpath=$dir/\$dldll~
1466 shlibpath_overrides_runpath=yes
1470 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1471 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1472 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1475 # MinGW DLLs use traditional 'lib' prefix
1476 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1477 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1478 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1479 # It is most probably a Windows format PATH printed by
1480 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1481 # path with ; separators, and with drive letters. We can handle the
1482 # drive letters (cygwin fileutils understands them), so leave them,
1483 # especially as we might pass files found there to a mingw objdump,
1484 # which wouldn't understand a cygwinified path. Ahh.
1485 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1487 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1491 # pw32 DLLs use 'pw' prefix rather than 'lib'
1492 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1498 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1501 dynamic_linker='Win32 ld.exe'
1502 # FIXME: first we should search . and the directory the executable is in
1506 darwin* | rhapsody*)
1507 dynamic_linker="$host_os dyld"
1511 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1512 soname_spec='${libname}${release}${major}$shared_ext'
1513 shlibpath_overrides_runpath=yes
1514 shlibpath_var=DYLD_LIBRARY_PATH
1515 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1517 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1518 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1526 soname_spec='${libname}${release}${shared_ext}$major'
1527 shlibpath_var=LD_LIBRARY_PATH
1534 freebsd* | dragonfly*)
1535 # DragonFly does not have aout. When/if they implement a new
1536 # versioning mechanism, adjust this.
1537 if test -x /usr/bin/objformat; then
1538 objformat=`/usr/bin/objformat`
1541 freebsd[[123]]*) objformat=aout ;;
1545 version_type=freebsd-$objformat
1546 case $version_type in
1548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1553 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1557 shlibpath_var=LD_LIBRARY_PATH
1560 shlibpath_overrides_runpath=yes
1562 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1563 shlibpath_overrides_runpath=yes
1564 hardcode_into_libs=yes
1566 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1567 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1568 shlibpath_overrides_runpath=no
1569 hardcode_into_libs=yes
1571 *) # from 4.6 on, and DragonFly
1572 shlibpath_overrides_runpath=yes
1573 hardcode_into_libs=yes
1582 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1583 soname_spec='${libname}${release}${shared_ext}$major'
1584 shlibpath_var=LD_LIBRARY_PATH
1585 hardcode_into_libs=yes
1588 hpux9* | hpux10* | hpux11*)
1589 # Give a soname corresponding to the major version so that dld.sl refuses to
1590 # link against other versions.
1597 hardcode_into_libs=yes
1598 dynamic_linker="$host_os dld.so"
1599 shlibpath_var=LD_LIBRARY_PATH
1600 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1602 soname_spec='${libname}${release}${shared_ext}$major'
1603 if test "X$HPUX_IA64_MODE" = X32; then
1604 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1606 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1608 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1612 hardcode_into_libs=yes
1613 dynamic_linker="$host_os dld.sl"
1614 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1615 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1616 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1617 soname_spec='${libname}${release}${shared_ext}$major'
1618 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1619 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1623 dynamic_linker="$host_os dld.sl"
1624 shlibpath_var=SHLIB_PATH
1625 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
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'
1630 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1631 postinstall_cmds='chmod 555 $lib'
1638 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1639 soname_spec='${libname}${release}${shared_ext}$major'
1640 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1641 shlibpath_var=LD_LIBRARY_PATH
1642 shlibpath_overrides_runpath=no
1643 hardcode_into_libs=yes
1646 irix5* | irix6* | nonstopux*)
1648 nonstopux*) version_type=nonstopux ;;
1650 if test "$lt_cv_prog_gnu_ld" = yes; then
1658 soname_spec='${libname}${release}${shared_ext}$major'
1659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1661 irix5* | nonstopux*)
1665 case $LD in # libtool.m4 will add one of these switches to LD
1666 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1667 libsuff= shlibsuff= libmagic=32-bit;;
1668 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1669 libsuff=32 shlibsuff=N32 libmagic=N32;;
1670 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1671 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1672 *) libsuff= shlibsuff= libmagic=never-match;;
1676 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1677 shlibpath_overrides_runpath=no
1678 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1679 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1680 hardcode_into_libs=yes
1683 # No shared lib support for Linux oldld, aout, or coff.
1684 linux*oldld* | linux*aout* | linux*coff*)
1688 # This must be Linux ELF.
1689 linux* | k*bsd*-gnu)
1693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1694 soname_spec='${libname}${release}${shared_ext}$major'
1695 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1696 shlibpath_var=LD_LIBRARY_PATH
1697 shlibpath_overrides_runpath=no
1698 # This implies no fast_install, which is unacceptable.
1699 # Some rework will be needed to allow for fast_install
1700 # before this can be enabled.
1701 hardcode_into_libs=yes
1703 # Append ld.so.conf contents to the search path
1704 if test -f /etc/ld.so.conf; then
1705 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' ' '`
1706 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1709 # We used to test for /lib/ld.so.1 and disable shared libraries on
1710 # powerpc, because MkLinux only supported shared libraries with the
1711 # GNU dynamic linker. Since this was broken with cross compilers,
1712 # most powerpc-linux boxes support dynamic linking these days and
1713 # people can always --disable-shared, the test was removed, and we
1714 # assume the GNU/Linux dynamic linker is in use.
1715 dynamic_linker='GNU/Linux ld.so'
1722 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1723 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1724 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1725 dynamic_linker='NetBSD (a.out) ld.so'
1727 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1728 soname_spec='${libname}${release}${shared_ext}$major'
1729 dynamic_linker='NetBSD ld.elf_so'
1731 shlibpath_var=LD_LIBRARY_PATH
1732 shlibpath_overrides_runpath=yes
1733 hardcode_into_libs=yes
1738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1739 shlibpath_var=LD_LIBRARY_PATH
1740 shlibpath_overrides_runpath=yes
1747 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1748 soname_spec='${libname}${release}${shared_ext}$major'
1749 shlibpath_var=LD_LIBRARY_PATH
1750 shlibpath_overrides_runpath=yes
1755 sys_lib_dlsearch_path_spec="/usr/lib"
1757 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1759 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1760 *) need_version=no ;;
1762 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1763 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1764 shlibpath_var=LD_LIBRARY_PATH
1765 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1767 openbsd2.[[89]] | openbsd2.[[89]].*)
1768 shlibpath_overrides_runpath=no
1771 shlibpath_overrides_runpath=yes
1775 shlibpath_overrides_runpath=yes
1780 libname_spec='$name'
1783 library_names_spec='$libname${shared_ext} $libname.a'
1784 dynamic_linker='OS/2 ld.exe'
1785 shlibpath_var=LIBPATH
1788 osf3* | osf4* | osf5*)
1792 soname_spec='${libname}${release}${shared_ext}$major'
1793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1794 shlibpath_var=LD_LIBRARY_PATH
1795 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1796 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1807 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1808 soname_spec='${libname}${release}${shared_ext}$major'
1809 shlibpath_var=LD_LIBRARY_PATH
1810 shlibpath_overrides_runpath=yes
1811 hardcode_into_libs=yes
1812 # ldd complains unless libraries are executable
1813 postinstall_cmds='chmod +x $lib'
1818 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1819 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1820 shlibpath_var=LD_LIBRARY_PATH
1821 shlibpath_overrides_runpath=yes
1822 if test "$with_gnu_ld" = yes; then
1830 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1831 soname_spec='${libname}${release}${shared_ext}$major'
1832 shlibpath_var=LD_LIBRARY_PATH
1833 case $host_vendor in
1835 shlibpath_overrides_runpath=no
1837 export_dynamic_flag_spec='${wl}-Blargedynsym'
1838 runpath_var=LD_RUN_PATH
1846 shlibpath_overrides_runpath=no
1847 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1853 if test -d /usr/nec ;then
1855 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1856 soname_spec='$libname${shared_ext}.$major'
1857 shlibpath_var=LD_LIBRARY_PATH
1861 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1862 version_type=freebsd-elf
1865 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1866 soname_spec='${libname}${release}${shared_ext}$major'
1867 shlibpath_var=LD_LIBRARY_PATH
1868 hardcode_into_libs=yes
1869 if test "$with_gnu_ld" = yes; then
1870 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1871 shlibpath_overrides_runpath=no
1873 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1874 shlibpath_overrides_runpath=yes
1877 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1881 sys_lib_dlsearch_path_spec='/usr/lib'
1886 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1887 soname_spec='${libname}${release}${shared_ext}$major'
1888 shlibpath_var=LD_LIBRARY_PATH
1895 AC_MSG_RESULT([$dynamic_linker])
1896 test "$dynamic_linker" = no && can_build_shared=no
1898 AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1899 [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1900 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1901 AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1902 [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1903 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1905 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1906 if test "$GCC" = yes; then
1907 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1909 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1914 AC_DEFUN([_LT_AC_TAGCONFIG],
1915 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1917 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1918 [include additional configurations @<:@automatic@:>@])],
1919 [tagnames="$withval"])
1921 if test -f "$ltmain" && test -n "$tagnames"; then
1922 if test ! -f "${ofile}"; then
1923 AC_MSG_WARN([output file `$ofile' does not exist])
1926 if test -z "$LTCC"; then
1927 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1928 if test -z "$LTCC"; then
1929 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1931 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1934 if test -z "$LTCFLAGS"; then
1935 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1938 # Extract list of available tagged configurations in $ofile.
1939 # Note that this assumes the entire list is on one line.
1940 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1942 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1943 for tagname in $tagnames; do
1945 # Check whether tagname contains only valid characters
1946 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1948 *) AC_MSG_ERROR([invalid tag name: $tagname])
1952 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1954 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1957 # Update the list of available tags.
1958 if test -n "$tagname"; then
1959 echo appending configuration tag \"$tagname\" to $ofile
1963 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1964 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1965 (test "X$CXX" != "Xg++"))) ; then
1966 AC_LIBTOOL_LANG_CXX_CONFIG
1973 if test -n "$F77" && test "X$F77" != "Xno"; then
1974 AC_LIBTOOL_LANG_F77_CONFIG
1981 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1982 AC_LIBTOOL_LANG_GCJ_CONFIG
1989 AC_LIBTOOL_LANG_RC_CONFIG
1993 AC_MSG_ERROR([Unsupported tag name: $tagname])
1997 # Append the new tag name to the list of available tags.
1998 if test -n "$tagname" ; then
1999 available_tags="$available_tags $tagname"
2005 # Now substitute the updated list of available tags.
2006 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2007 mv "${ofile}T" "$ofile"
2011 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2014 ])# _LT_AC_TAGCONFIG
2019 # enable checks for dlopen support
2020 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2021 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2022 ])# AC_LIBTOOL_DLOPEN
2025 # AC_LIBTOOL_WIN32_DLL
2026 # --------------------
2027 # declare package support for building win32 DLLs
2028 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2029 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2030 ])# AC_LIBTOOL_WIN32_DLL
2033 # AC_ENABLE_SHARED([DEFAULT])
2034 # ---------------------------
2035 # implement the --enable-shared flag
2036 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2037 AC_DEFUN([AC_ENABLE_SHARED],
2038 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2039 AC_ARG_ENABLE([shared],
2040 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2041 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2042 [p=${PACKAGE-default}
2044 yes) enable_shared=yes ;;
2045 no) enable_shared=no ;;
2048 # Look at the argument we got. We use all the common list separators.
2049 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2050 for pkg in $enableval; do
2052 if test "X$pkg" = "X$p"; then
2059 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2060 ])# AC_ENABLE_SHARED
2065 # set the default shared flag to --disable-shared
2066 AC_DEFUN([AC_DISABLE_SHARED],
2067 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2068 AC_ENABLE_SHARED(no)
2069 ])# AC_DISABLE_SHARED
2072 # AC_ENABLE_STATIC([DEFAULT])
2073 # ---------------------------
2074 # implement the --enable-static flag
2075 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2076 AC_DEFUN([AC_ENABLE_STATIC],
2077 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2078 AC_ARG_ENABLE([static],
2079 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2080 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2081 [p=${PACKAGE-default}
2083 yes) enable_static=yes ;;
2084 no) enable_static=no ;;
2087 # Look at the argument we got. We use all the common list separators.
2088 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2089 for pkg in $enableval; do
2091 if test "X$pkg" = "X$p"; then
2098 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2099 ])# AC_ENABLE_STATIC
2104 # set the default static flag to --disable-static
2105 AC_DEFUN([AC_DISABLE_STATIC],
2106 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2107 AC_ENABLE_STATIC(no)
2108 ])# AC_DISABLE_STATIC
2111 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2112 # ---------------------------------
2113 # implement the --enable-fast-install flag
2114 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2115 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2116 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2117 AC_ARG_ENABLE([fast-install],
2118 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2119 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2120 [p=${PACKAGE-default}
2122 yes) enable_fast_install=yes ;;
2123 no) enable_fast_install=no ;;
2125 enable_fast_install=no
2126 # Look at the argument we got. We use all the common list separators.
2127 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2128 for pkg in $enableval; do
2130 if test "X$pkg" = "X$p"; then
2131 enable_fast_install=yes
2137 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2138 ])# AC_ENABLE_FAST_INSTALL
2141 # AC_DISABLE_FAST_INSTALL
2142 # -----------------------
2143 # set the default to --disable-fast-install
2144 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2145 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2146 AC_ENABLE_FAST_INSTALL(no)
2147 ])# AC_DISABLE_FAST_INSTALL
2150 # AC_LIBTOOL_PICMODE([MODE])
2151 # --------------------------
2152 # implement the --with-pic flag
2153 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2154 AC_DEFUN([AC_LIBTOOL_PICMODE],
2155 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2156 pic_mode=ifelse($#,1,$1,default)
2157 ])# AC_LIBTOOL_PICMODE
2162 # This is predefined starting with Autoconf 2.54, so this conditional
2163 # definition can be removed once we require Autoconf 2.54 or later.
2164 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2165 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2166 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2167 then ac_cv_prog_egrep='grep -E'
2168 else ac_cv_prog_egrep='egrep'
2170 EGREP=$ac_cv_prog_egrep
2175 # AC_PATH_TOOL_PREFIX
2176 # -------------------
2177 # find a file program which can recognize shared library
2178 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2179 [AC_REQUIRE([AC_PROG_EGREP])dnl
2180 AC_MSG_CHECKING([for $1])
2181 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2183 [[\\/*] | ?:[\\/]*])
2184 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2187 lt_save_MAGIC_CMD="$MAGIC_CMD"
2188 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2189 dnl $ac_dummy forces splitting on constant user-supplied paths.
2190 dnl POSIX.2 word splitting is done only on the output of word expansions,
2191 dnl not every word. This closes a longstanding sh security hole.
2192 ac_dummy="ifelse([$2], , $PATH, [$2])"
2193 for ac_dir in $ac_dummy; do
2195 test -z "$ac_dir" && ac_dir=.
2196 if test -f $ac_dir/$1; then
2197 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2198 if test -n "$file_magic_test_file"; then
2199 case $deplibs_check_method in
2201 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2202 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2203 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2204 $EGREP "$file_magic_regex" > /dev/null; then
2209 *** Warning: the command libtool uses to detect shared libraries,
2210 *** $file_magic_cmd, produces output that libtool cannot recognize.
2211 *** The result is that libtool may fail to recognize shared libraries
2212 *** as such. This will affect the creation of libtool libraries that
2213 *** depend on shared libraries, but programs linked with such libtool
2214 *** libraries will work regardless of this problem. Nevertheless, you
2215 *** may want to report the problem to your system manager and/or to
2216 *** bug-libtool@gnu.org
2226 MAGIC_CMD="$lt_save_MAGIC_CMD"
2229 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2230 if test -n "$MAGIC_CMD"; then
2231 AC_MSG_RESULT($MAGIC_CMD)
2235 ])# AC_PATH_TOOL_PREFIX
2240 # find a file program which can recognize a shared library
2241 AC_DEFUN([AC_PATH_MAGIC],
2242 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2243 if test -z "$lt_cv_path_MAGIC_CMD"; then
2244 if test -n "$ac_tool_prefix"; then
2245 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2255 # find the pathname to the GNU or non-GNU linker
2256 AC_DEFUN([AC_PROG_LD],
2257 [AC_ARG_WITH([gnu-ld],
2258 [AC_HELP_STRING([--with-gnu-ld],
2259 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2260 [test "$withval" = no || with_gnu_ld=yes],
2262 AC_REQUIRE([LT_AC_PROG_SED])dnl
2263 AC_REQUIRE([AC_PROG_CC])dnl
2264 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2265 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2267 if test "$GCC" = yes; then
2268 # Check if gcc -print-prog-name=ld gives a path.
2269 AC_MSG_CHECKING([for ld used by $CC])
2272 # gcc leaves a trailing carriage return which upsets mingw
2273 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2275 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2278 # Accept absolute paths.
2279 [[\\/]]* | ?:[[\\/]]*)
2280 re_direlt='/[[^/]][[^/]]*/\.\./'
2281 # Canonicalize the pathname of ld
2282 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2283 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2284 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2286 test -z "$LD" && LD="$ac_prog"
2289 # If it fails, then pretend we aren't using GCC.
2293 # If it is relative, then search for the first ld in PATH.
2297 elif test "$with_gnu_ld" = yes; then
2298 AC_MSG_CHECKING([for GNU ld])
2300 AC_MSG_CHECKING([for non-GNU ld])
2302 AC_CACHE_VAL(lt_cv_path_LD,
2303 [if test -z "$LD"; then
2304 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2305 for ac_dir in $PATH; do
2307 test -z "$ac_dir" && ac_dir=.
2308 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2309 lt_cv_path_LD="$ac_dir/$ac_prog"
2310 # Check to see if the program is GNU ld. I'd rather use --version,
2311 # but apparently some variants of GNU ld only accept -v.
2312 # Break only if it was the GNU/non-GNU ld that we prefer.
2313 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2314 *GNU* | *'with BFD'*)
2315 test "$with_gnu_ld" != no && break
2318 test "$with_gnu_ld" != yes && break
2325 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2328 if test -n "$LD"; then
2333 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2340 AC_DEFUN([AC_PROG_LD_GNU],
2341 [AC_REQUIRE([AC_PROG_EGREP])dnl
2342 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2343 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2344 case `$LD -v 2>&1 </dev/null` in
2345 *GNU* | *'with BFD'*)
2346 lt_cv_prog_gnu_ld=yes
2349 lt_cv_prog_gnu_ld=no
2352 with_gnu_ld=$lt_cv_prog_gnu_ld
2356 # AC_PROG_LD_RELOAD_FLAG
2357 # ----------------------
2358 # find reload flag for linker
2359 # -- PORTME Some linkers may need a different reload flag.
2360 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2361 [AC_CACHE_CHECK([for $LD option to reload object files],
2362 lt_cv_ld_reload_flag,
2363 [lt_cv_ld_reload_flag='-r'])
2364 reload_flag=$lt_cv_ld_reload_flag
2365 case $reload_flag in
2367 *) reload_flag=" $reload_flag" ;;
2369 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2372 if test "$GCC" = yes; then
2373 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2375 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2379 ])# AC_PROG_LD_RELOAD_FLAG
2382 # AC_DEPLIBS_CHECK_METHOD
2383 # -----------------------
2384 # how to check for library dependencies
2385 # -- PORTME fill in with the dynamic library characteristics
2386 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2387 [AC_CACHE_CHECK([how to recognize dependent libraries],
2388 lt_cv_deplibs_check_method,
2389 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2390 lt_cv_file_magic_test_file=
2391 lt_cv_deplibs_check_method='unknown'
2392 # Need to set the preceding variable on all platforms that support
2393 # interlibrary dependencies.
2394 # 'none' -- dependencies not supported.
2395 # `unknown' -- same as none, but documents that we really don't know.
2396 # 'pass_all' -- all dependencies passed with no checks.
2397 # 'test_compile' -- check by making test program.
2398 # 'file_magic [[regex]]' -- check by looking for files in library path
2399 # which responds to the $file_magic_cmd with a given extended regex.
2400 # If you have `file' or equivalent on your system and you're not sure
2401 # whether `pass_all' will *always* work, you probably want this one.
2405 lt_cv_deplibs_check_method=pass_all
2409 lt_cv_deplibs_check_method=pass_all
2413 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2414 lt_cv_file_magic_cmd='/usr/bin/file -L'
2415 lt_cv_file_magic_test_file=/shlib/libc.so
2419 # func_win32_libid is a shell function defined in ltmain.sh
2420 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2421 lt_cv_file_magic_cmd='func_win32_libid'
2425 # Base MSYS/MinGW do not provide the 'file' command needed by
2426 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2427 # unless we find 'file', for example because we are cross-compiling.
2428 if ( file / ) >/dev/null 2>&1; then
2429 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2430 lt_cv_file_magic_cmd='func_win32_libid'
2432 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2433 lt_cv_file_magic_cmd='$OBJDUMP -f'
2437 darwin* | rhapsody*)
2438 lt_cv_deplibs_check_method=pass_all
2441 freebsd* | dragonfly*)
2442 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2445 # Not sure whether the presence of OpenBSD here was a mistake.
2446 # Let's accept both of them until this is cleared up.
2447 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2448 lt_cv_file_magic_cmd=/usr/bin/file
2449 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2453 lt_cv_deplibs_check_method=pass_all
2458 lt_cv_deplibs_check_method=pass_all
2461 hpux10.20* | hpux11*)
2462 lt_cv_file_magic_cmd=/usr/bin/file
2465 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2466 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2469 [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]']
2470 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2473 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2474 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2480 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2481 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2484 irix5* | irix6* | nonstopux*)
2486 *-32|*"-32 ") libmagic=32-bit;;
2487 *-n32|*"-n32 ") libmagic=N32;;
2488 *-64|*"-64 ") libmagic=64-bit;;
2489 *) libmagic=never-match;;
2491 lt_cv_deplibs_check_method=pass_all
2494 # This must be Linux ELF.
2495 linux* | k*bsd*-gnu)
2496 lt_cv_deplibs_check_method=pass_all
2500 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2501 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2503 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2508 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2509 lt_cv_file_magic_cmd=/usr/bin/file
2510 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2514 lt_cv_deplibs_check_method=unknown
2518 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2519 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2521 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2525 osf3* | osf4* | osf5*)
2526 lt_cv_deplibs_check_method=pass_all
2530 lt_cv_deplibs_check_method=pass_all
2534 lt_cv_deplibs_check_method=pass_all
2538 case $host_vendor in
2540 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]]'
2541 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2544 lt_cv_deplibs_check_method=pass_all
2547 lt_cv_file_magic_cmd='/bin/file'
2548 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2551 lt_cv_file_magic_cmd='/bin/file'
2552 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2553 lt_cv_file_magic_test_file=/lib/libc.so
2556 lt_cv_deplibs_check_method=pass_all
2559 lt_cv_deplibs_check_method=pass_all
2564 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2565 lt_cv_deplibs_check_method=pass_all
2569 file_magic_cmd=$lt_cv_file_magic_cmd
2570 deplibs_check_method=$lt_cv_deplibs_check_method
2571 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2572 ])# AC_DEPLIBS_CHECK_METHOD
2577 # find the pathname to a BSD-compatible name lister
2578 AC_DEFUN([AC_PROG_NM],
2579 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2580 [if test -n "$NM"; then
2581 # Let the user override the test.
2584 lt_nm_to_check="${ac_tool_prefix}nm"
2585 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2586 lt_nm_to_check="$lt_nm_to_check nm"
2588 for lt_tmp_nm in $lt_nm_to_check; do
2589 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2590 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2592 test -z "$ac_dir" && ac_dir=.
2593 tmp_nm="$ac_dir/$lt_tmp_nm"
2594 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2595 # Check to see if the nm accepts a BSD-compat flag.
2596 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2597 # nm: unknown option "B" ignored
2598 # Tru64's nm complains that /dev/null is an invalid object file
2599 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2600 */dev/null* | *'Invalid file or object type'*)
2601 lt_cv_path_NM="$tmp_nm -B"
2605 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2607 lt_cv_path_NM="$tmp_nm -p"
2611 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2612 continue # so that we can try to find one that supports BSD flags
2621 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2629 # check for math library
2630 AC_DEFUN([AC_CHECK_LIBM],
2631 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2634 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2635 # These system don't have libm, or don't need it
2638 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2639 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2642 AC_CHECK_LIB(m, cos, LIBM="-lm")
2648 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2649 # -----------------------------------
2650 # sets LIBLTDL to the link flags for the libltdl convenience library and
2651 # LTDLINCL to the include flags for the libltdl header and adds
2652 # --enable-ltdl-convenience to the configure arguments. Note that
2653 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2654 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2655 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2656 # (note the single quotes!). If your package is not flat and you're not
2657 # using automake, define top_builddir and top_srcdir appropriately in
2659 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2660 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2661 case $enable_ltdl_convenience in
2662 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2663 "") enable_ltdl_convenience=yes
2664 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2666 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2667 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2668 # For backwards non-gettext consistent compatibility...
2670 ])# AC_LIBLTDL_CONVENIENCE
2673 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2674 # -----------------------------------
2675 # sets LIBLTDL to the link flags for the libltdl installable library and
2676 # LTDLINCL to the include flags for the libltdl header and adds
2677 # --enable-ltdl-install to the configure arguments. Note that
2678 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2679 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2680 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2681 # '${top_srcdir}/' (note the single quotes!). If your package is not
2682 # flat and you're not using automake, define top_builddir and top_srcdir
2683 # appropriately in the Makefiles.
2684 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2685 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2686 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2687 AC_CHECK_LIB(ltdl, lt_dlinit,
2688 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2689 [if test x"$enable_ltdl_install" = xno; then
2690 AC_MSG_WARN([libltdl not installed, but installation disabled])
2692 enable_ltdl_install=yes
2695 if test x"$enable_ltdl_install" = x"yes"; then
2696 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2697 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2698 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2700 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2704 # For backwards non-gettext consistent compatibility...
2706 ])# AC_LIBLTDL_INSTALLABLE
2711 # enable support for C++ libraries
2712 AC_DEFUN([AC_LIBTOOL_CXX],
2713 [AC_REQUIRE([_LT_AC_LANG_CXX])
2719 AC_DEFUN([_LT_AC_LANG_CXX],
2720 [AC_REQUIRE([AC_PROG_CXX])
2721 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2722 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2725 # _LT_AC_PROG_CXXCPP
2726 # ------------------
2727 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2729 AC_REQUIRE([AC_PROG_CXX])
2730 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2731 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2732 (test "X$CXX" != "Xg++"))) ; then
2735 ])# _LT_AC_PROG_CXXCPP
2739 # enable support for Fortran 77 libraries
2740 AC_DEFUN([AC_LIBTOOL_F77],
2741 [AC_REQUIRE([_LT_AC_LANG_F77])
2747 AC_DEFUN([_LT_AC_LANG_F77],
2748 [AC_REQUIRE([AC_PROG_F77])
2749 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2755 # enable support for GCJ libraries
2756 AC_DEFUN([AC_LIBTOOL_GCJ],
2757 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2763 AC_DEFUN([_LT_AC_LANG_GCJ],
2764 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2765 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2766 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2767 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2768 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2769 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2770 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2776 # enable support for Windows resource files
2777 AC_DEFUN([AC_LIBTOOL_RC],
2778 [AC_REQUIRE([LT_AC_PROG_RC])
2779 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2783 # AC_LIBTOOL_LANG_C_CONFIG
2784 # ------------------------
2785 # Ensure that the configuration vars for the C compiler are
2786 # suitably defined. Those variables are subsequently used by
2787 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2788 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2789 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2793 # Source file extension for C test sources.
2796 # Object file extension for compiled C test sources.
2798 _LT_AC_TAGVAR(objext, $1)=$objext
2800 # Code to be used in simple compile tests
2801 lt_simple_compile_test_code="int some_variable = 0;"
2803 # Code to be used in simple link tests
2804 lt_simple_link_test_code='int main(){return(0);}'
2808 # save warnings/boilerplate of simple test code
2809 _LT_COMPILER_BOILERPLATE
2810 _LT_LINKER_BOILERPLATE
2812 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2813 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2814 AC_LIBTOOL_PROG_CC_C_O($1)
2815 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2816 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2817 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2818 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2819 AC_LIBTOOL_SYS_LIB_STRIP
2820 AC_LIBTOOL_DLOPEN_SELF
2822 # Report which library types will actually be built
2823 AC_MSG_CHECKING([if libtool supports shared libraries])
2824 AC_MSG_RESULT([$can_build_shared])
2826 AC_MSG_CHECKING([whether to build shared libraries])
2827 test "$can_build_shared" = "no" && enable_shared=no
2829 # On AIX, shared libraries and static libraries use the same namespace, and
2830 # are all built from PIC.
2833 test "$enable_shared" = yes && enable_static=no
2834 if test -n "$RANLIB"; then
2835 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2836 postinstall_cmds='$RANLIB $lib'
2841 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2842 test "$enable_shared" = yes && enable_static=no
2846 AC_MSG_RESULT([$enable_shared])
2848 AC_MSG_CHECKING([whether to build static libraries])
2849 # Make sure either enable_shared or enable_static is yes.
2850 test "$enable_shared" = yes || enable_static=yes
2851 AC_MSG_RESULT([$enable_static])
2853 AC_LIBTOOL_CONFIG($1)
2857 ])# AC_LIBTOOL_LANG_C_CONFIG
2860 # AC_LIBTOOL_LANG_CXX_CONFIG
2861 # --------------------------
2862 # Ensure that the configuration vars for the C compiler are
2863 # suitably defined. Those variables are subsequently used by
2864 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2865 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2866 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2868 AC_REQUIRE([AC_PROG_CXX])
2869 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2871 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2872 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2873 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2874 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2875 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2876 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2877 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2878 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2879 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2880 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2881 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2882 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2883 _LT_AC_TAGVAR(module_cmds, $1)=
2884 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2885 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2886 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2887 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2888 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2889 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2891 # Dependencies to place before and after the object being linked:
2892 _LT_AC_TAGVAR(predep_objects, $1)=
2893 _LT_AC_TAGVAR(postdep_objects, $1)=
2894 _LT_AC_TAGVAR(predeps, $1)=
2895 _LT_AC_TAGVAR(postdeps, $1)=
2896 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2897 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2899 # Source file extension for C++ test sources.
2902 # Object file extension for compiled C++ test sources.
2904 _LT_AC_TAGVAR(objext, $1)=$objext
2906 # Code to be used in simple compile tests
2907 lt_simple_compile_test_code="int some_variable = 0;"
2909 # Code to be used in simple link tests
2910 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2912 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2915 # save warnings/boilerplate of simple test code
2916 _LT_COMPILER_BOILERPLATE
2917 _LT_LINKER_BOILERPLATE
2919 # Allow CC to be a program name with arguments.
2924 lt_save_with_gnu_ld=$with_gnu_ld
2925 lt_save_path_LD=$lt_cv_path_LD
2926 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2927 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2929 $as_unset lt_cv_prog_gnu_ld
2931 if test -n "${lt_cv_path_LDCXX+set}"; then
2932 lt_cv_path_LD=$lt_cv_path_LDCXX
2934 $as_unset lt_cv_path_LD
2936 test -z "${LDCXX+set}" || LD=$LDCXX
2939 _LT_AC_TAGVAR(compiler, $1)=$CC
2940 _LT_CC_BASENAME([$compiler])
2942 # We don't want -fno-exception wen compiling C++ code, so set the
2943 # no_builtin_flag separately
2944 if test "$GXX" = yes; then
2945 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2947 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2950 if test "$GXX" = yes; then
2951 # Set up default GNU C++ configuration
2955 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2956 # archiving commands below assume that GNU ld is being used.
2957 if test "$with_gnu_ld" = yes; then
2958 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2959 _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'
2961 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2962 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2964 # If archive_cmds runs LD, not CC, wlarc should be empty
2965 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2966 # investigate it a little bit more. (MM)
2969 # ancient GNU ld didn't support --whole-archive et. al.
2970 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2971 grep 'no-whole-archive' > /dev/null; then
2972 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2974 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2980 # A generic and very simple default shared library creation
2981 # command for GNU C++ for the case where it uses the native
2982 # linker, instead of GNU ld. If possible, this setting should
2983 # overridden to take advantage of the native linker features on
2984 # the platform it is being used on.
2985 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2988 # Commands to make compiler produce verbose output that lists
2989 # what "hidden" libraries, object files and flags are used when
2990 # linking a shared library.
2991 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2999 # PORTME: fill in a description of your system's C++ link characteristics
3000 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3001 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3004 # FIXME: insert proper C++ library support
3005 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3008 if test "$host_cpu" = ia64; then
3009 # On IA64, the linker does run time linking by default, so we don't
3010 # have to do anything special.
3011 aix_use_runtimelinking=no
3012 exp_sym_flag='-Bexport'
3015 aix_use_runtimelinking=no
3017 # Test if we are trying to use run time linking or normal
3018 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3019 # need to do runtime linking.
3020 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3021 for ld_flag in $LDFLAGS; do
3024 aix_use_runtimelinking=yes
3032 exp_sym_flag='-bexport'
3033 no_entry_flag='-bnoentry'
3036 # When large executables or shared objects are built, AIX ld can
3037 # have problems creating the table of contents. If linking a library
3038 # or program results in "error TOC overflow" add -mminimal-toc to
3039 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3040 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3042 _LT_AC_TAGVAR(archive_cmds, $1)=''
3043 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3044 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3045 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3047 if test "$GXX" = yes; then
3048 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3049 # We only want to do this on AIX 4.2 and lower, the check
3050 # below for broken collect2 doesn't work under 4.3+
3051 collect2name=`${CC} -print-prog-name=collect2`
3052 if test -f "$collect2name" && \
3053 strings "$collect2name" | grep resolve_lib_name >/dev/null
3055 # We have reworked collect2
3058 # We have old collect2
3059 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3060 # It fails to find uninstalled libraries when the uninstalled
3061 # path is not listed in the libpath. Setting hardcode_minus_L
3062 # to unsupported forces relinking
3063 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3064 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3065 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3069 shared_flag='-shared'
3070 if test "$aix_use_runtimelinking" = yes; then
3071 shared_flag="$shared_flag "'${wl}-G'
3075 if test "$host_cpu" = ia64; then
3076 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3077 # chokes on -Wl,-G. The following line is correct:
3080 if test "$aix_use_runtimelinking" = yes; then
3081 shared_flag='${wl}-G'
3083 shared_flag='${wl}-bM:SRE'
3088 # It seems that -bexpall does not export symbols beginning with
3089 # underscore (_), so it is better to generate a list of symbols to export.
3090 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3091 if test "$aix_use_runtimelinking" = yes; then
3092 # Warning - without using the other runtime loading flags (-brtl),
3093 # -berok will link without error, but may produce a broken library.
3094 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3095 # Determine the default libpath from the value encoded in an empty executable.
3096 _LT_AC_SYS_LIBPATH_AIX
3097 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3099 _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"
3101 if test "$host_cpu" = ia64; then
3102 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3103 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3104 _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"
3106 # Determine the default libpath from the value encoded in an empty executable.
3107 _LT_AC_SYS_LIBPATH_AIX
3108 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3109 # Warning - without using the other run time loading flags,
3110 # -berok will link without error, but may produce a broken library.
3111 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3112 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3113 # Exported symbols can be pulled into shared objects from archives
3114 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3115 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3116 # This is similar to how AIX traditionally builds its shared libraries.
3117 _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'
3123 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3124 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3125 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3126 # support --undefined. This deserves some investigation. FIXME
3127 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3129 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3134 case $cc_basename in
3136 # FIXME: insert proper C++ library support
3137 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3142 cygwin* | mingw* | pw32*)
3143 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3144 # as there is no search path for DLLs.
3145 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3146 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3147 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3148 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3150 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3151 _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'
3152 # If the export-symbols file already is a .def file (1st line
3153 # is EXPORTS), use it as is; otherwise, prepend...
3154 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3155 cp $export_symbols $output_objdir/$soname.def;
3157 echo EXPORTS > $output_objdir/$soname.def;
3158 cat $export_symbols >> $output_objdir/$soname.def;
3160 $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'
3162 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3165 darwin* | rhapsody*)
3166 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3167 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3168 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3169 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3170 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3171 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3172 _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3173 if test "$GXX" = yes ; then
3174 output_verbose_link_cmd='echo'
3175 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3176 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3177 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3178 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3179 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3180 _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${_lt_dsymutil}"
3181 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
3184 case $cc_basename in
3186 output_verbose_link_cmd='echo'
3187 _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'
3188 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3189 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3190 _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}'
3191 _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}'
3194 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3201 case $cc_basename in
3203 # FIXME: insert proper C++ library support
3204 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3207 # Green Hills C++ Compiler
3208 # FIXME: insert proper C++ library support
3209 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3212 # FIXME: insert proper C++ library support
3213 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3218 # C++ shared libraries reported to be fairly broken before switch to ELF
3219 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3222 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3224 freebsd* | dragonfly*)
3225 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3227 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3232 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3233 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3234 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3235 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3236 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3237 # but as the default
3238 # location of the library.
3240 case $cc_basename in
3242 # FIXME: insert proper C++ library support
3243 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3246 _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'
3247 # Commands to make compiler produce verbose output that lists
3248 # what "hidden" libraries, object files and flags are used when
3249 # linking a shared library.
3251 # There doesn't appear to be a way to prevent this compiler from
3252 # explicitly linking system object files so we need to strip them
3253 # from the output so that they don't get included in the library
3255 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'
3258 if test "$GXX" = yes; then
3259 _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'
3261 # FIXME: insert proper C++ library support
3262 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3268 if test $with_gnu_ld = no; then
3269 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3270 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3275 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3281 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3282 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3285 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3286 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3287 # but as the default
3288 # location of the library.
3292 case $cc_basename in
3294 # FIXME: insert proper C++ library support
3295 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3303 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3306 _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'
3309 # Commands to make compiler produce verbose output that lists
3310 # what "hidden" libraries, object files and flags are used when
3311 # linking a shared library.
3313 # There doesn't appear to be a way to prevent this compiler from
3314 # explicitly linking system object files so we need to strip them
3315 # from the output so that they don't get included in the library
3317 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'
3320 if test "$GXX" = yes; then
3321 if test $with_gnu_ld = no; then
3324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3327 _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'
3330 _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'
3335 # FIXME: insert proper C++ library support
3336 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3342 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3343 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3345 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3346 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3347 # Instead, shared libraries are loaded at an image base (0x10000000 by
3348 # default) and relocated if they conflict, which is a slow very memory
3349 # consuming and fragmenting process. To avoid this, we pick a random,
3350 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3351 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3352 _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'
3353 _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'
3356 case $cc_basename in
3359 _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'
3361 # Archives containing C++ object files must be created using
3362 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3363 # necessary to make sure instantiated templates are included
3365 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3368 if test "$GXX" = yes; then
3369 if test "$with_gnu_ld" = no; then
3370 _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'
3372 _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'
3375 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3378 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3379 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3381 linux* | k*bsd*-gnu)
3382 case $cc_basename in
3384 # Kuck and Associates, Inc. (KAI) C++ Compiler
3386 # KCC will only create a shared library if the output file
3387 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3388 # to its proper name (with version) after linking.
3389 _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'
3390 _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'
3391 # Commands to make compiler produce verbose output that lists
3392 # what "hidden" libraries, object files and flags are used when
3393 # linking a shared library.
3395 # There doesn't appear to be a way to prevent this compiler from
3396 # explicitly linking system object files so we need to strip them
3397 # from the output so that they don't get included in the library
3399 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'
3401 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3402 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3404 # Archives containing C++ object files must be created using
3405 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3406 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3411 # version 8.0 and above of icpc choke on multiply defined symbols
3412 # if we add $predep_objects and $postdep_objects, however 7.1 and
3413 # earlier do not add the objects themselves.
3414 case `$CC -V 2>&1` in
3416 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3417 _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'
3419 *) # Version 8.0 or newer
3422 ia64*) tmp_idyn=' -i_dynamic';;
3424 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3425 _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'
3428 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3429 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3430 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3431 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3434 # Portland Group C++ compiler
3435 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3436 _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'
3438 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3439 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3440 _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'
3444 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3445 _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'
3447 runpath_var=LD_RUN_PATH
3448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3449 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3451 # Commands to make compiler produce verbose output that lists
3452 # what "hidden" libraries, object files and flags are used when
3453 # linking a shared library.
3455 # There doesn't appear to be a way to prevent this compiler from
3456 # explicitly linking system object files so we need to strip them
3457 # from the output so that they don't get included in the library
3459 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'
3462 case `$CC -V 2>&1 | sed 5q` in
3465 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3466 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3467 _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'
3468 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3469 _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'
3471 # Not sure whether something based on
3472 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3474 output_verbose_link_cmd='echo'
3476 # Archives containing C++ object files must be created using
3477 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3478 # necessary to make sure instantiated templates are included
3480 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3487 # FIXME: insert proper C++ library support
3488 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3491 # FIXME: insert proper C++ library support
3492 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3495 case $cc_basename in
3497 # FIXME: insert proper C++ library support
3498 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3501 # FIXME: insert proper C++ library support
3502 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3507 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3508 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3510 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3511 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3512 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3514 # Workaround some broken pre-1.5 toolchains
3515 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3518 # C++ shared libraries are fairly broken
3519 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3522 if test -f /usr/libexec/ld.so; then
3523 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3524 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3525 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3527 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3528 _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'
3529 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3530 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3532 output_verbose_link_cmd='echo'
3534 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3538 case $cc_basename in
3540 # Kuck and Associates, Inc. (KAI) C++ Compiler
3542 # KCC will only create a shared library if the output file
3543 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3544 # to its proper name (with version) after linking.
3545 _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'
3547 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3548 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3550 # Archives containing C++ object files must be created using
3551 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3552 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3556 # Rational C++ 2.4.1
3557 # FIXME: insert proper C++ library support
3558 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3561 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3562 _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'
3564 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3565 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3567 # Commands to make compiler produce verbose output that lists
3568 # what "hidden" libraries, object files and flags are used when
3569 # linking a shared library.
3571 # There doesn't appear to be a way to prevent this compiler from
3572 # explicitly linking system object files so we need to strip them
3573 # from the output so that they don't get included in the library
3575 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'
3578 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3579 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3580 _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'
3582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$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.
3588 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3591 # FIXME: insert proper C++ library support
3592 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3598 case $cc_basename in
3600 # Kuck and Associates, Inc. (KAI) C++ Compiler
3602 # KCC will only create a shared library if the output file
3603 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3604 # to its proper name (with version) after linking.
3605 _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'
3607 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3608 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3610 # Archives containing C++ object files must be created using
3611 # the KAI C++ compiler.
3612 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3615 # Rational C++ 2.4.1
3616 # FIXME: insert proper C++ library support
3617 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3620 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3621 _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'
3622 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3623 echo "-hidden">> $lib.exp~
3624 $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~
3627 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3628 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3630 # Commands to make compiler produce verbose output that lists
3631 # what "hidden" libraries, object files and flags are used when
3632 # linking a shared library.
3634 # There doesn't appear to be a way to prevent this compiler from
3635 # explicitly linking system object files so we need to strip them
3636 # from the output so that they don't get included in the library
3638 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'
3641 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3642 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3643 _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'
3645 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3646 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3648 # Commands to make compiler produce verbose output that lists
3649 # what "hidden" libraries, object files and flags are used when
3650 # linking a shared library.
3651 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3654 # FIXME: insert proper C++ library support
3655 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3661 # FIXME: insert proper C++ library support
3662 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3665 case $cc_basename in
3668 # FIXME: insert proper C++ library support
3669 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3673 # FIXME: insert proper C++ library support
3674 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3677 # FIXME: insert proper C++ library support
3678 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3683 case $cc_basename in
3685 # Sun C++ 4.2, 5.x and Centerline C++
3686 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3687 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3688 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3689 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3690 $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'
3692 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3693 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3695 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3697 # The compiler driver will combine and reorder linker options,
3698 # but understands `-z linker_flag'.
3699 # Supported since Solaris 2.6 (maybe 2.5.1?)
3700 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3703 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3705 output_verbose_link_cmd='echo'
3707 # Archives containing C++ object files must be created using
3708 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3709 # necessary to make sure instantiated templates are included
3711 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3714 # Green Hills C++ Compiler
3715 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3717 # The C++ compiler must be used to create the archive.
3718 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3721 # GNU C++ compiler with Solaris linker
3722 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3723 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3724 if $CC --version | grep -v '^2\.7' > /dev/null; then
3725 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3726 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3727 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3729 # Commands to make compiler produce verbose output that lists
3730 # what "hidden" libraries, object files and flags are used when
3731 # linking a shared library.
3732 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3734 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3736 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3737 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3738 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3740 # Commands to make compiler produce verbose output that lists
3741 # what "hidden" libraries, object files and flags are used when
3742 # linking a shared library.
3743 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3746 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3748 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3750 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3757 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3758 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3759 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3760 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3761 runpath_var='LD_RUN_PATH'
3763 case $cc_basename in
3765 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3766 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3769 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3770 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3774 sysv5* | sco3.2v5* | sco5v6*)
3775 # Note: We can NOT use -z defs as we might desire, because we do not
3776 # link with -lc, and that would cause any symbols used from libc to
3777 # always be unresolved, which means just about no library would
3778 # ever link correctly. If we're not using GNU ld we use -z text
3779 # though, which does catch some bad symbols but isn't as heavy-handed
3781 # For security reasons, it is highly recommended that you always
3782 # use absolute paths for naming shared libraries, and exclude the
3783 # DT_RUNPATH tag from executables and libraries. But doing so
3784 # requires that you compile everything twice, which is a pain.
3785 # So that behaviour is only enabled if SCOABSPATH is set to a
3786 # non-empty value in the environment. Most likely only useful for
3787 # creating official distributions of packages.
3788 # This is a hack until libtool officially supports absolute path
3789 # names for shared libraries.
3790 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3791 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3792 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3793 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3794 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3795 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3796 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3797 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3798 runpath_var='LD_RUN_PATH'
3800 case $cc_basename in
3802 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3803 _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'
3806 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3807 _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'
3812 case $cc_basename in
3814 # NonStop-UX NCC 3.20
3815 # FIXME: insert proper C++ library support
3816 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3819 # FIXME: insert proper C++ library support
3820 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3825 # FIXME: insert proper C++ library support
3826 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3829 # FIXME: insert proper C++ library support
3830 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3833 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3834 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3836 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3837 _LT_AC_TAGVAR(LD, $1)="$LD"
3839 AC_LIBTOOL_POSTDEP_PREDEP($1)
3840 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3841 AC_LIBTOOL_PROG_CC_C_O($1)
3842 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3843 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3844 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3845 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3847 AC_LIBTOOL_CONFIG($1)
3854 with_gnu_ldcxx=$with_gnu_ld
3855 with_gnu_ld=$lt_save_with_gnu_ld
3856 lt_cv_path_LDCXX=$lt_cv_path_LD
3857 lt_cv_path_LD=$lt_save_path_LD
3858 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3859 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3860 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3862 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3863 # ------------------------------------
3864 # Figure out "hidden" library dependencies from verbose
3865 # compiler output when linking a shared library.
3866 # Parse the compiler output and extract the necessary
3867 # objects, libraries and library flags.
3868 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3869 [AC_REQUIRE([LT_AC_PROG_SED])dnl
3870 dnl we can't use the lt_simple_compile_test_code here,
3871 dnl because it contains code intended for an executable,
3872 dnl not a library. It's possible we should let each
3873 dnl tag define a new lt_????_link_test_code variable,
3874 dnl but it's only used here...
3875 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3877 void foo (void) { a = 0; }
3879 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3883 Foo (void) { a = 0; }
3888 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3896 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3899 public void bar (void) {
3905 dnl Parse the compiler output and extract the necessary
3906 dnl objects, libraries and library flags.
3907 if AC_TRY_EVAL(ac_compile); then
3908 # Parse the compiler output and extract the necessary
3909 # objects, libraries and library flags.
3911 # Sentinel used to keep track of whether or not we are before
3912 # the conftest object file.
3913 pre_test_object_deps_done=no
3915 # The `*' in the case matches for architectures that use `case' in
3916 # $output_verbose_cmd can trigger glob expansion during the loop
3917 # eval without this substitution.
3918 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3920 for p in `eval $output_verbose_link_cmd`; do
3924 # Some compilers place space between "-{L,R}" and the path.
3927 || test $p = "-R"; then
3934 if test "$pre_test_object_deps_done" = no; then
3937 # Internal compiler library paths should come after those
3938 # provided the user. The postdeps already come after the
3939 # user supplied libs so there is no need to process them.
3940 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3941 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3943 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3946 # The "-l" case would never come before the object being
3947 # linked, so don't bother handling this case.
3950 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3951 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3953 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3959 # This assumes that the test object file only shows up
3960 # once in the compiler output.
3961 if test "$p" = "conftest.$objext"; then
3962 pre_test_object_deps_done=yes
3966 if test "$pre_test_object_deps_done" = no; then
3967 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3968 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3970 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3973 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3974 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3976 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3981 *) ;; # Ignore the rest.
3989 echo "libtool.m4: error: problem compiling $1 test program"
3992 $rm -f confest.$objext
3994 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3995 if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3996 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
3999 # PORTME: override above test on systems where it is broken
4003 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4004 # hack all around it, let's just trust "g++" to DTRT.
4005 _LT_AC_TAGVAR(predep_objects,$1)=
4006 _LT_AC_TAGVAR(postdep_objects,$1)=
4007 _LT_AC_TAGVAR(postdeps,$1)=
4011 case `$CC -V 2>&1 | sed 5q` in
4015 # The more standards-conforming stlport4 library is
4016 # incompatible with the Cstd library. Avoid specifying
4017 # it if it's in CXXFLAGS. Ignore libCrun as
4018 # -library=stlport4 depends on it.
4019 case " $CXX $CXXFLAGS " in
4020 *" -library=stlport4 "*)
4021 solaris_use_stlport4=yes
4024 if test "$solaris_use_stlport4" != yes; then
4025 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4032 case $cc_basename in
4034 # The more standards-conforming stlport4 library is
4035 # incompatible with the Cstd library. Avoid specifying
4036 # it if it's in CXXFLAGS. Ignore libCrun as
4037 # -library=stlport4 depends on it.
4038 case " $CXX $CXXFLAGS " in
4039 *" -library=stlport4 "*)
4040 solaris_use_stlport4=yes
4044 # Adding this requires a known-good setup of shared libraries for
4045 # Sun compiler versions before 5.6, else PIC objects from an old
4046 # archive will be linked into the output, leading to subtle bugs.
4047 if test "$solaris_use_stlport4" != yes; then
4048 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4055 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4056 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4058 ])# AC_LIBTOOL_POSTDEP_PREDEP
4060 # AC_LIBTOOL_LANG_F77_CONFIG
4061 # --------------------------
4062 # Ensure that the configuration vars for the C compiler are
4063 # suitably defined. Those variables are subsequently used by
4064 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4065 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4066 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4067 [AC_REQUIRE([AC_PROG_F77])
4068 AC_LANG_PUSH(Fortran 77)
4070 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4071 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4072 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4073 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4074 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4075 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4076 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4077 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4078 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4079 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4080 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4081 _LT_AC_TAGVAR(module_cmds, $1)=
4082 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4083 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4084 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4085 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4086 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4087 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4089 # Source file extension for f77 test sources.
4092 # Object file extension for compiled f77 test sources.
4094 _LT_AC_TAGVAR(objext, $1)=$objext
4096 # Code to be used in simple compile tests
4097 lt_simple_compile_test_code="\
4103 # Code to be used in simple link tests
4104 lt_simple_link_test_code="\
4109 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4112 # save warnings/boilerplate of simple test code
4113 _LT_COMPILER_BOILERPLATE
4114 _LT_LINKER_BOILERPLATE
4116 # Allow CC to be a program name with arguments.
4120 _LT_AC_TAGVAR(compiler, $1)=$CC
4121 _LT_CC_BASENAME([$compiler])
4123 AC_MSG_CHECKING([if libtool supports shared libraries])
4124 AC_MSG_RESULT([$can_build_shared])
4126 AC_MSG_CHECKING([whether to build shared libraries])
4127 test "$can_build_shared" = "no" && enable_shared=no
4129 # On AIX, shared libraries and static libraries use the same namespace, and
4130 # are all built from PIC.
4133 test "$enable_shared" = yes && enable_static=no
4134 if test -n "$RANLIB"; then
4135 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4136 postinstall_cmds='$RANLIB $lib'
4140 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4141 test "$enable_shared" = yes && enable_static=no
4145 AC_MSG_RESULT([$enable_shared])
4147 AC_MSG_CHECKING([whether to build static libraries])
4148 # Make sure either enable_shared or enable_static is yes.
4149 test "$enable_shared" = yes || enable_static=yes
4150 AC_MSG_RESULT([$enable_static])
4152 _LT_AC_TAGVAR(GCC, $1)="$G77"
4153 _LT_AC_TAGVAR(LD, $1)="$LD"
4155 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4156 AC_LIBTOOL_PROG_CC_C_O($1)
4157 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4158 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4159 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4160 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4162 AC_LIBTOOL_CONFIG($1)
4166 ])# AC_LIBTOOL_LANG_F77_CONFIG
4169 # AC_LIBTOOL_LANG_GCJ_CONFIG
4170 # --------------------------
4171 # Ensure that the configuration vars for the C compiler are
4172 # suitably defined. Those variables are subsequently used by
4173 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4174 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4175 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4178 # Source file extension for Java test sources.
4181 # Object file extension for compiled Java test sources.
4183 _LT_AC_TAGVAR(objext, $1)=$objext
4185 # Code to be used in simple compile tests
4186 lt_simple_compile_test_code="class foo {}"
4188 # Code to be used in simple link tests
4189 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4191 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4194 # save warnings/boilerplate of simple test code
4195 _LT_COMPILER_BOILERPLATE
4196 _LT_LINKER_BOILERPLATE
4198 # Allow CC to be a program name with arguments.
4202 _LT_AC_TAGVAR(compiler, $1)=$CC
4203 _LT_CC_BASENAME([$compiler])
4205 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4206 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4208 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4210 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4211 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4212 AC_LIBTOOL_PROG_CC_C_O($1)
4213 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4214 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4215 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4216 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4218 AC_LIBTOOL_CONFIG($1)
4222 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4225 # AC_LIBTOOL_LANG_RC_CONFIG
4226 # -------------------------
4227 # Ensure that the configuration vars for the Windows resource compiler are
4228 # suitably defined. Those variables are subsequently used by
4229 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4230 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4231 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4234 # Source file extension for RC test sources.
4237 # Object file extension for compiled RC test sources.
4239 _LT_AC_TAGVAR(objext, $1)=$objext
4241 # Code to be used in simple compile tests
4242 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4244 # Code to be used in simple link tests
4245 lt_simple_link_test_code="$lt_simple_compile_test_code"
4247 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4250 # save warnings/boilerplate of simple test code
4251 _LT_COMPILER_BOILERPLATE
4252 _LT_LINKER_BOILERPLATE
4254 # Allow CC to be a program name with arguments.
4258 _LT_AC_TAGVAR(compiler, $1)=$CC
4259 _LT_CC_BASENAME([$compiler])
4260 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4262 AC_LIBTOOL_CONFIG($1)
4266 ])# AC_LIBTOOL_LANG_RC_CONFIG
4269 # AC_LIBTOOL_CONFIG([TAGNAME])
4270 # ----------------------------
4271 # If TAGNAME is not passed, then create an initial libtool script
4272 # with a default configuration from the untagged config vars. Otherwise
4273 # add code to config.status for appending the configuration named by
4274 # TAGNAME from the matching tagged config vars.
4275 AC_DEFUN([AC_LIBTOOL_CONFIG],
4276 [# The else clause should only fire when bootstrapping the
4277 # libtool distribution, otherwise you forgot to ship ltmain.sh
4278 # with your package, and you will get complaints that there are
4279 # no rules to generate ltmain.sh.
4280 if test -f "$ltmain"; then
4281 # See if we are running on zsh, and set the options which allow our commands through
4282 # without removal of \ escapes.
4283 if test -n "${ZSH_VERSION+set}" ; then
4284 setopt NO_GLOB_SUBST
4286 # Now quote all the things that may contain metacharacters while being
4287 # careful not to overquote the AC_SUBSTed values. We take copies of the
4288 # variables and quote the copies for generation of the libtool script.
4289 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4291 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4292 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4293 deplibs_check_method reload_flag reload_cmds need_locks \
4294 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4295 lt_cv_sys_global_symbol_to_c_name_address \
4296 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4297 old_postinstall_cmds old_postuninstall_cmds \
4298 _LT_AC_TAGVAR(compiler, $1) \
4299 _LT_AC_TAGVAR(CC, $1) \
4300 _LT_AC_TAGVAR(LD, $1) \
4301 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4302 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4303 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4304 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4305 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4306 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4307 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4308 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4309 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4310 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4311 _LT_AC_TAGVAR(predep_objects, $1) \
4312 _LT_AC_TAGVAR(postdep_objects, $1) \
4313 _LT_AC_TAGVAR(predeps, $1) \
4314 _LT_AC_TAGVAR(postdeps, $1) \
4315 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4316 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4317 _LT_AC_TAGVAR(archive_cmds, $1) \
4318 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4319 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4320 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4321 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4322 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4323 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4324 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4325 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4326 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4327 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4328 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4329 _LT_AC_TAGVAR(module_cmds, $1) \
4330 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4331 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4332 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4333 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4334 _LT_AC_TAGVAR(include_expsyms, $1); do
4337 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4338 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4339 _LT_AC_TAGVAR(archive_cmds, $1) | \
4340 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4341 _LT_AC_TAGVAR(module_cmds, $1) | \
4342 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4343 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4344 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4345 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4346 postinstall_cmds | postuninstall_cmds | \
4347 old_postinstall_cmds | old_postuninstall_cmds | \
4348 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4349 # Double-quote double-evaled strings.
4350 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4353 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4359 *'\[$]0 --fallback-echo"')
4360 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4365 [cfgfile="${ofile}T"
4366 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4368 AC_MSG_NOTICE([creating $ofile])],
4371 cat <<__EOF__ >> "$cfgfile"
4375 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4376 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4377 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4379 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4380 # Free Software Foundation, Inc.
4382 # This file is part of GNU Libtool:
4383 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4385 # This program is free software; you can redistribute it and/or modify
4386 # it under the terms of the GNU General Public License as published by
4387 # the Free Software Foundation; either version 2 of the License, or
4388 # (at your option) any later version.
4390 # This program is distributed in the hope that it will be useful, but
4391 # WITHOUT ANY WARRANTY; without even the implied warranty of
4392 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4393 # General Public License for more details.
4395 # You should have received a copy of the GNU General Public License
4396 # along with this program; if not, write to the Free Software
4397 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4399 # As a special exception to the GNU General Public License, if you
4400 # distribute this file as part of a program that contains a
4401 # configuration script generated by Autoconf, you may include it under
4402 # the same distribution terms that you use for the rest of that program.
4404 # A sed program that does not truncate output.
4407 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4408 Xsed="$SED -e 1s/^X//"
4410 # The HP-UX ksh and POSIX shell print the target directory to stdout
4412 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4414 # The names of the tagged configurations supported by this script.
4417 # ### BEGIN LIBTOOL CONFIG],
4418 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4420 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4422 # Shell to use when invoking shell scripts.
4425 # Whether or not to build shared libraries.
4426 build_libtool_libs=$enable_shared
4428 # Whether or not to build static libraries.
4429 build_old_libs=$enable_static
4431 # Whether or not to add -lc for building shared libraries.
4432 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4434 # Whether or not to disallow shared libs when runtime libs are static
4435 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4437 # Whether or not to optimize for fast installation.
4438 fast_install=$enable_fast_install
4441 host_alias=$host_alias
4446 build_alias=$build_alias
4450 # An echo program that does not interpret backslashes.
4455 AR_FLAGS=$lt_AR_FLAGS
4460 # LTCC compiler flags.
4461 LTCFLAGS=$lt_LTCFLAGS
4463 # A language-specific compiler.
4464 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4466 # Is the compiler the GNU C compiler?
4467 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4472 # The linker used to build libraries.
4473 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4475 # Whether we need hard or soft links.
4478 # A BSD-compatible nm program.
4481 # A symbol stripping program
4484 # Used to examine libraries when file_magic_cmd begins "file"
4485 MAGIC_CMD=$MAGIC_CMD
4487 # Used on cygwin: DLL creation program.
4490 # Used on cygwin: object dumper.
4493 # Used on cygwin: assembler.
4496 # The name of the directory that contains temporary libtool files.
4499 # How to create reloadable object files.
4500 reload_flag=$lt_reload_flag
4501 reload_cmds=$lt_reload_cmds
4503 # How to pass a linker flag through the compiler.
4504 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4506 # Object file suffix (normally "o").
4509 # Old archive suffix (normally "a").
4512 # Shared library suffix (normally ".so").
4513 shrext_cmds='$shrext_cmds'
4515 # Executable file suffix (normally "").
4518 # Additional compiler flags for building library objects.
4519 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4522 # What is the maximum length of a command?
4523 max_cmd_len=$lt_cv_sys_max_cmd_len
4525 # Does compiler simultaneously support -c and -o options?
4526 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4528 # Must we lock files when doing compilation?
4529 need_locks=$lt_need_locks
4531 # Do we need the lib prefix for modules?
4532 need_lib_prefix=$need_lib_prefix
4534 # Do we need a version for libraries?
4535 need_version=$need_version
4537 # Whether dlopen is supported.
4538 dlopen_support=$enable_dlopen
4540 # Whether dlopen of programs is supported.
4541 dlopen_self=$enable_dlopen_self
4543 # Whether dlopen of statically linked programs is supported.
4544 dlopen_self_static=$enable_dlopen_self_static
4546 # Compiler flag to prevent dynamic linking.
4547 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4549 # Compiler flag to turn off builtin functions.
4550 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4552 # Compiler flag to allow reflexive dlopens.
4553 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4555 # Compiler flag to generate shared objects directly from archives.
4556 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4558 # Compiler flag to generate thread-safe objects.
4559 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4561 # Library versioning type.
4562 version_type=$version_type
4564 # Format of library name prefix.
4565 libname_spec=$lt_libname_spec
4567 # List of archive names. First name is the real one, the rest are links.
4568 # The last name is the one that the linker finds with -lNAME.
4569 library_names_spec=$lt_library_names_spec
4571 # The coded name of the library, if different from the real name.
4572 soname_spec=$lt_soname_spec
4574 # Commands used to build and install an old-style archive.
4576 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4577 old_postinstall_cmds=$lt_old_postinstall_cmds
4578 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4580 # Create an old-style archive from a shared archive.
4581 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4583 # Create a temporary old-style archive to link instead of a shared archive.
4584 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4586 # Commands used to build and install a shared archive.
4587 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4588 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4589 postinstall_cmds=$lt_postinstall_cmds
4590 postuninstall_cmds=$lt_postuninstall_cmds
4592 # Commands used to build a loadable module (assumed same as above if empty)
4593 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4594 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4596 # Commands to strip libraries.
4597 old_striplib=$lt_old_striplib
4598 striplib=$lt_striplib
4600 # Dependencies to place before the objects being linked to create a
4602 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4604 # Dependencies to place after the objects being linked to create a
4606 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4608 # Dependencies to place before the objects being linked to create a
4610 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4612 # Dependencies to place after the objects being linked to create a
4614 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4616 # The directories searched by this compiler when creating a shared
4618 compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4620 # The library search path used internally by the compiler when linking
4622 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4624 # Method to check whether dependent libraries are shared objects.
4625 deplibs_check_method=$lt_deplibs_check_method
4627 # Command to use when deplibs_check_method == file_magic.
4628 file_magic_cmd=$lt_file_magic_cmd
4630 # Flag that allows shared libraries with undefined symbols to be built.
4631 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4633 # Flag that forces no undefined symbols.
4634 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4636 # Commands used to finish a libtool library installation in a directory.
4637 finish_cmds=$lt_finish_cmds
4639 # Same as above, but a single script fragment to be evaled but not shown.
4640 finish_eval=$lt_finish_eval
4642 # Take the output of nm and produce a listing of raw symbols and C names.
4643 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4645 # Transform the output of nm in a proper C declaration
4646 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4648 # Transform the output of nm in a C name address pair
4649 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4651 # This is the shared library runtime path variable.
4652 runpath_var=$runpath_var
4654 # This is the shared library path variable.
4655 shlibpath_var=$shlibpath_var
4657 # Is shlibpath searched before the hard-coded library search path?
4658 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4660 # How to hardcode a shared library path into an executable.
4661 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4663 # Whether we should hardcode library paths into libraries.
4664 hardcode_into_libs=$hardcode_into_libs
4666 # Flag to hardcode \$libdir into a binary during linking.
4667 # This must work even if \$libdir does not exist.
4668 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4670 # If ld is used when linking, flag to hardcode \$libdir into
4671 # a binary during linking. This must work even if \$libdir does
4673 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4675 # Whether we need a single -rpath flag with a separated argument.
4676 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4678 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4680 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4682 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4684 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4686 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4687 # the resulting binary.
4688 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4690 # Set to yes if building a shared library automatically hardcodes DIR into the library
4691 # and all subsequent libraries and executables linked against it.
4692 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4694 # Variables whose values should be saved in libtool wrapper scripts and
4695 # restored at relink time.
4696 variables_saved_for_relink="$variables_saved_for_relink"
4698 # Whether libtool must link a program against all its dependency libraries.
4699 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4701 # Compile-time system search path for libraries
4702 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4704 # Run-time system search path for libraries
4705 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4707 # Fix the shell variable \$srcfile for the compiler.
4708 fix_srcfile_path=$lt_fix_srcfile_path
4710 # Set to yes if exported symbols are required.
4711 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4713 # The commands to list exported symbols.
4714 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4716 # The commands to extract the exported symbol list from a shared archive.
4717 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4719 # Symbols that should not be listed in the preloaded symbols.
4720 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4722 # Symbols that must always be exported.
4723 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4726 [# ### END LIBTOOL CONFIG],
4727 [# ### END LIBTOOL TAG CONFIG: $tagname])
4734 cat <<\EOF >> "$cfgfile"
4736 # AIX sometimes has problems with the GCC collect2 program. For some
4737 # reason, if we set the COLLECT_NAMES environment variable, the problems
4738 # vanish in a puff of smoke.
4739 if test "X${COLLECT_NAMES+set}" != Xset; then
4741 export COLLECT_NAMES
4747 # We use sed instead of cat because bash on DJGPP gets confused if
4748 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4749 # text mode, it properly converts lines to CR/LF. This bash problem
4750 # is reportedly fixed, but why not run on old versions too?
4751 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4753 mv -f "$cfgfile" "$ofile" || \
4754 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4758 # If there is no Makefile yet, we rely on a make rule to execute
4759 # `config.status --recheck' to rerun these tests and create the
4760 # libtool script then.
4761 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4762 if test -f "$ltmain_in"; then
4763 test -f Makefile && make "$ltmain"
4766 ])# AC_LIBTOOL_CONFIG
4769 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4770 # -------------------------------------------
4771 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4772 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4774 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4776 if test "$GCC" = yes; then
4777 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4779 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4780 lt_cv_prog_compiler_rtti_exceptions,
4781 [-fno-rtti -fno-exceptions], [],
4782 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4784 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4787 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4788 # ---------------------------------
4789 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4790 [AC_REQUIRE([AC_CANONICAL_HOST])
4791 AC_REQUIRE([LT_AC_PROG_SED])
4792 AC_REQUIRE([AC_PROG_NM])
4793 AC_REQUIRE([AC_OBJEXT])
4794 # Check for command to grab the raw symbol name followed by C symbol from nm.
4795 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4796 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4798 # These are sane defaults that work on at least a few old systems.
4799 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4801 # Character class describing NM global symbol codes.
4802 symcode='[[BCDEGRST]]'
4804 # Regexp to match symbols that can be accessed directly from C.
4805 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4807 # Transform an extracted symbol line into a proper C declaration
4808 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4810 # Transform an extracted symbol line into symbol name and symbol address
4811 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'"
4813 # Define system-specific variables.
4818 cygwin* | mingw* | pw32*)
4819 symcode='[[ABCDGISTW]]'
4821 hpux*) # Its linker distinguishes data from code symbols
4822 if test "$host_cpu" = ia64; then
4823 symcode='[[ABCDEGRST]]'
4825 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4826 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'"
4828 linux* | k*bsd*-gnu)
4829 if test "$host_cpu" = ia64; then
4830 symcode='[[ABCDGIRSTW]]'
4831 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4832 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'"
4836 symcode='[[BCDEGRST]]'
4839 symcode='[[BCDEGQRST]]'
4850 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4854 symcode='[[DFNSTU]]'
4858 # Handle CRLF in mingw tool chain
4862 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4866 # If we're using GNU nm, then use its standard symbol codes.
4867 case `$NM -V 2>&1` in
4868 *GNU* | *'with BFD'*)
4869 symcode='[[ABCDGIRSTW]]' ;;
4872 # Try without a prefix undercore, then with it.
4873 for ac_symprfx in "" "_"; do
4875 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4876 symxfrm="\\1 $ac_symprfx\\2 \\2"
4878 # Write the raw and C identifiers.
4879 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4881 # Check to see that the pipe works correctly.
4885 cat > conftest.$ac_ext <<EOF
4890 void nm_test_func(){}
4894 int main(){nm_test_var='a';nm_test_func();return(0);}
4897 if AC_TRY_EVAL(ac_compile); then
4898 # Now try to grab the symbols.
4900 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4901 # Try sorting and uniquifying the output.
4902 if sort "$nlist" | uniq > "$nlist"T; then
4903 mv -f "$nlist"T "$nlist"
4908 # Make sure that we snagged all the symbols we need.
4909 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4910 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4911 cat <<EOF > conftest.$ac_ext
4917 # Now generate the symbol file.
4918 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4920 cat <<EOF >> conftest.$ac_ext
4921 #if defined (__STDC__) && __STDC__
4922 # define lt_ptr_t void *
4924 # define lt_ptr_t char *
4928 /* The mapping between symbol names and symbols. */
4933 lt_preloaded_symbols[[]] =
4936 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4937 cat <<\EOF >> conftest.$ac_ext
4945 # Now try linking the two files.
4946 mv conftest.$ac_objext conftstm.$ac_objext
4947 lt_save_LIBS="$LIBS"
4948 lt_save_CFLAGS="$CFLAGS"
4949 LIBS="conftstm.$ac_objext"
4950 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4951 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4954 LIBS="$lt_save_LIBS"
4955 CFLAGS="$lt_save_CFLAGS"
4957 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4960 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4963 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4966 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4967 cat conftest.$ac_ext >&5
4969 rm -rf conftest* conftst*
4971 # Do not use the global_symbol_pipe unless it works.
4972 if test "$pipe_works" = yes; then
4975 lt_cv_sys_global_symbol_pipe=
4979 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4980 lt_cv_sys_global_symbol_to_cdecl=
4982 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4983 AC_MSG_RESULT(failed)
4987 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4990 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4991 # ---------------------------------------
4992 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4993 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4994 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4995 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4997 AC_MSG_CHECKING([for $compiler option to produce PIC])
4999 # C++ specific cases for pic, static, wl, etc.
5000 if test "$GXX" = yes; then
5001 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5002 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5006 # All AIX code is PIC.
5007 if test "$host_cpu" = ia64; then
5008 # AIX 5 now supports IA64 processor
5009 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5013 # FIXME: we need at least 68020 code to build shared libraries, but
5014 # adding the `-m68020' flag to GCC prevents building anything better,
5016 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5018 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5019 # PIC is the default for these OSes.
5021 mingw* | cygwin* | os2* | pw32*)
5022 # This hack is so that the source file can tell whether it is being
5023 # built for inclusion in a dll (and should export symbols for example).
5024 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5025 # (--disable-auto-import) libraries
5026 m4_if([$1], [GCJ], [],
5027 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5029 darwin* | rhapsody*)
5030 # PIC is the default on this platform
5031 # Common symbols not allowed in MH_DYLIB files
5032 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5035 # DJGPP does not support shared libraries at all
5036 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5039 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5040 # Instead, we relocate shared libraries at runtime.
5043 if test -d /usr/nec; then
5044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5048 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5054 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5059 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5065 # All AIX code is PIC.
5066 if test "$host_cpu" = ia64; then
5067 # AIX 5 now supports IA64 processor
5068 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5070 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5074 case $cc_basename in
5076 # Green Hills C++ Compiler
5077 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5082 # PIC is the default on this platform
5083 # Common symbols not allowed in MH_DYLIB files
5084 case $cc_basename in
5086 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5087 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5092 case $cc_basename in
5094 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5097 # Green Hills C++ Compiler
5098 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5104 freebsd* | dragonfly*)
5105 # FreeBSD uses GNU C++
5107 hpux9* | hpux10* | hpux11*)
5108 case $cc_basename in
5110 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5111 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5112 if test "$host_cpu" != ia64; then
5113 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5117 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5118 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5133 # This is c89, which is MS Visual C++ (no shared libs)
5134 # Anyone wants to do a port?
5136 irix5* | irix6* | nonstopux*)
5137 case $cc_basename in
5139 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5140 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5141 # CC pic flag -KPIC is the default.
5147 linux* | k*bsd*-gnu)
5148 case $cc_basename in
5151 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5152 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5156 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5157 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5158 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5161 # Portland Group C++ compiler.
5162 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5163 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5164 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5168 # Make sure the PIC flag is empty. It appears that all Alpha
5169 # Linux and Compaq Tru64 Unix objects are PIC.
5170 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5171 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5174 case `$CC -V 2>&1 | sed 5q` in
5177 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5178 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5179 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5190 case $cc_basename in
5192 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5200 osf3* | osf4* | osf5*)
5201 case $cc_basename in
5203 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5206 # Rational C++ 2.4.1
5207 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5210 # Digital/Compaq C++
5211 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5212 # Make sure the PIC flag is empty. It appears that all Alpha
5213 # Linux and Compaq Tru64 Unix objects are PIC.
5214 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5215 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5224 case $cc_basename in
5226 # Sun C++ 4.2, 5.x and Centerline C++
5227 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5228 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5229 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5232 # Green Hills C++ Compiler
5233 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5240 case $cc_basename in
5243 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5244 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5248 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5255 case $cc_basename in
5257 # NonStop-UX NCC 3.20
5258 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5264 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5265 case $cc_basename in
5267 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5268 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5269 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5276 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5282 if test "$GCC" = yes; then
5283 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5284 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5288 # All AIX code is PIC.
5289 if test "$host_cpu" = ia64; then
5290 # AIX 5 now supports IA64 processor
5291 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5296 # FIXME: we need at least 68020 code to build shared libraries, but
5297 # adding the `-m68020' flag to GCC prevents building anything better,
5299 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5302 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5303 # PIC is the default for these OSes.
5306 mingw* | cygwin* | pw32* | os2*)
5307 # This hack is so that the source file can tell whether it is being
5308 # built for inclusion in a dll (and should export symbols for example).
5309 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5310 # (--disable-auto-import) libraries
5311 m4_if([$1], [GCJ], [],
5312 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5315 darwin* | rhapsody*)
5316 # PIC is the default on this platform
5317 # Common symbols not allowed in MH_DYLIB files
5318 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5322 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5323 # Instead, we relocate shared libraries at runtime.
5327 # Just because we use GCC doesn't mean we suddenly get shared libraries
5328 # on systems that don't support them.
5329 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5334 if test -d /usr/nec; then
5335 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5340 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5347 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5353 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5357 # PORTME Check for flag to pass linker flags through the system compiler.
5360 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5361 if test "$host_cpu" = ia64; then
5362 # AIX 5 now supports IA64 processor
5363 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5365 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5369 # PIC is the default on this platform
5370 # Common symbols not allowed in MH_DYLIB files
5371 case $cc_basename in
5373 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5374 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5379 mingw* | cygwin* | pw32* | os2*)
5380 # This hack is so that the source file can tell whether it is being
5381 # built for inclusion in a dll (and should export symbols for example).
5382 m4_if([$1], [GCJ], [],
5383 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5386 hpux9* | hpux10* | hpux11*)
5387 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5388 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5395 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5398 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5399 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5402 irix5* | irix6* | nonstopux*)
5403 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404 # PIC (with -KPIC) is the default.
5405 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5409 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5410 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5413 linux* | k*bsd*-gnu)
5414 case $cc_basename in
5416 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5418 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5420 pgcc* | pgf77* | pgf90* | pgf95*)
5421 # Portland Group compilers (*not* the Pentium gcc compiler,
5422 # which looks to be a dead project)
5423 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5424 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5425 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5428 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5429 # All Alpha code is PIC.
5430 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5433 case `$CC -V 2>&1 | sed 5q` in
5436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5437 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5438 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5441 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5442 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5443 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5444 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5451 osf3* | osf4* | osf5*)
5452 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5453 # All OSF/1 code is PIC.
5454 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5458 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5462 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5463 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5464 case $cc_basename in
5466 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5468 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5473 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5474 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5475 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5478 sysv4 | sysv4.2uw2* | sysv4.3*)
5479 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5480 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5481 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5485 if test -d /usr/nec ;then
5486 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5487 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5491 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5492 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5493 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5494 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5498 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5499 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5503 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5504 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5508 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5513 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5516 # Check to make sure the PIC flag actually works.
5518 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5519 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5520 _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5521 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5522 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5524 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5526 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5527 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5530 # For platforms which do not support PIC, -DPIC is meaningless:
5532 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5535 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5540 # Check to make sure the static flag actually works.
5542 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5543 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5544 _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5545 $lt_tmp_static_flag,
5547 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5551 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5552 # ------------------------------------
5553 # See if the linker supports building shared libraries.
5554 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5555 [AC_REQUIRE([LT_AC_PROG_SED])dnl
5556 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5558 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5561 # If we're using GNU nm, then we don't want the "-C" option.
5562 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5563 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5564 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5566 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5570 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5573 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5576 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5579 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5582 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5583 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5584 _LT_AC_TAGVAR(archive_cmds, $1)=
5585 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5586 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5587 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5588 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5589 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5590 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5591 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5593 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5594 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5595 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5596 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5597 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5598 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5599 _LT_AC_TAGVAR(module_cmds, $1)=
5600 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5601 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5602 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5603 # include_expsyms should be a list of space-separated symbols to be *always*
5604 # included in the symbol list
5605 _LT_AC_TAGVAR(include_expsyms, $1)=
5606 # exclude_expsyms can be an extended regexp of symbols to exclude
5607 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5608 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5609 # as well as any symbol that contains `d'.
5610 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5611 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5612 # platforms (ab)use it in PIC code, but their linkers get confused if
5613 # the symbol is explicitly referenced. Since portable code cannot
5614 # rely on this symbol name, it's probably fine to never include it in
5615 # preloaded symbol tables.
5616 # Exclude shared library initialization/finalization symbols.
5617 dnl Note also adjust exclude_expsyms for C++ above.
5618 extract_expsyms_cmds=
5619 # Just being paranoid about ensuring that cc_basename is set.
5620 _LT_CC_BASENAME([$compiler])
5622 cygwin* | mingw* | pw32*)
5623 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5624 # When not using gcc, we currently assume that we are using
5625 # Microsoft Visual C++.
5626 if test "$GCC" != yes; then
5631 # we just hope/assume this is gcc and not c89 (= MSVC++)
5639 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5640 if test "$with_gnu_ld" = yes; then
5641 # If archive_cmds runs LD, not CC, wlarc should be empty
5644 # Set some defaults for GNU ld with shared library support. These
5645 # are reset later if shared libraries are not supported. Putting them
5646 # here allows them to be overridden if necessary.
5647 runpath_var=LD_RUN_PATH
5648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5649 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5650 # ancient GNU ld didn't support --whole-archive et. al.
5651 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5652 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5654 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5656 supports_anon_versioning=no
5657 case `$LD -v 2>/dev/null` in
5658 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5659 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5660 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5661 *\ 2.11.*) ;; # other 2.11 versions
5662 *) supports_anon_versioning=yes ;;
5665 # See if GNU ld supports shared libraries.
5668 # On AIX/PPC, the GNU linker is very broken
5669 if test "$host_cpu" != ia64; then
5670 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5673 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5674 *** to be unable to reliably create shared libraries on AIX.
5675 *** Therefore, libtool is disabling shared libraries support. If you
5676 *** really care for shared libraries, you may want to modify your PATH
5677 *** so that a non-GNU linker is found, and then restart.
5684 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5685 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5686 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5688 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5689 # that the semantics of dynamic libraries on AmigaOS, at least up
5690 # to version 4, is to share data among multiple programs linked
5691 # with the same dynamic library. Since this doesn't match the
5692 # behavior of shared libraries on other platforms, we can't use
5694 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5698 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5699 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5700 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5701 # support --undefined. This deserves some investigation. FIXME
5702 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5704 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5708 cygwin* | mingw* | pw32*)
5709 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5710 # as there is no search path for DLLs.
5711 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5712 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5713 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5714 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5715 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5717 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5719 # If the export-symbols file already is a .def file (1st line
5720 # is EXPORTS), use it as is; otherwise, prepend...
5721 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5722 cp $export_symbols $output_objdir/$soname.def;
5724 echo EXPORTS > $output_objdir/$soname.def;
5725 cat $export_symbols >> $output_objdir/$soname.def;
5727 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5729 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5734 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5735 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5737 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5738 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5739 # Instead, shared libraries are loaded at an image base (0x10000000 by
5740 # default) and relocated if they conflict, which is a slow very memory
5741 # consuming and fragmenting process. To avoid this, we pick a random,
5742 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5743 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5744 _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'
5745 _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'
5748 gnu* | linux* | k*bsd*-gnu)
5749 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5751 case $cc_basename,$host_cpu in
5752 pgcc*) # Portland Group C compiler
5753 _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'
5754 tmp_addflag=' $pic_flag'
5756 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5757 _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'
5758 tmp_addflag=' $pic_flag -Mnomain' ;;
5759 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5760 tmp_addflag=' -i_dynamic' ;;
5761 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5762 tmp_addflag=' -i_dynamic -nofor_main' ;;
5763 ifc* | ifort*) # Intel Fortran compiler
5764 tmp_addflag=' -nofor_main' ;;
5766 case `$CC -V 2>&1 | sed 5q` in
5767 *Sun\ C*) # Sun C 5.9
5768 _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'
5769 tmp_sharedflag='-G' ;;
5770 *Sun\ F*) # Sun Fortran 8.3
5771 tmp_sharedflag='-G' ;;
5773 tmp_sharedflag='-shared' ;;
5775 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5777 if test $supports_anon_versioning = yes; then
5778 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5779 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5780 $echo "local: *; };" >> $output_objdir/$libname.ver~
5781 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5784 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5789 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5790 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5793 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5794 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5799 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5800 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5803 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5804 *** create shared libraries on Solaris systems. Therefore, libtool
5805 *** is disabling shared libraries support. We urge you to upgrade GNU
5806 *** binutils to release 2.9.1 or newer. Another option is to modify
5807 *** your PATH or compiler configuration so that the native linker is
5808 *** used, and then restart.
5811 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5812 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5813 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5815 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5819 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5820 case `$LD -v 2>&1` in
5821 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5822 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5825 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5826 *** reliably create shared libraries on SCO systems. Therefore, libtool
5827 *** is disabling shared libraries support. We urge you to upgrade GNU
5828 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5829 *** your PATH or compiler configuration so that the native linker is
5830 *** used, and then restart.
5835 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5836 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5837 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5838 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5840 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5847 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5849 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5850 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5854 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5855 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5856 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5858 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5863 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5865 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5866 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5867 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5870 # PORTME fill in a description of your system's linker (not GNU ld)
5873 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5874 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5875 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5876 # Note: this linker hardcodes the directories in LIBPATH if there
5877 # are no directories specified by -L.
5878 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5879 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5880 # Neither direct hardcoding nor static linking is supported with a
5882 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5887 if test "$host_cpu" = ia64; then
5888 # On IA64, the linker does run time linking by default, so we don't
5889 # have to do anything special.
5890 aix_use_runtimelinking=no
5891 exp_sym_flag='-Bexport'
5894 # If we're using GNU nm, then we don't want the "-C" option.
5895 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5896 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5897 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5899 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5901 aix_use_runtimelinking=no
5903 # Test if we are trying to use run time linking or normal
5904 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5905 # need to do runtime linking.
5906 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5907 for ld_flag in $LDFLAGS; do
5908 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5909 aix_use_runtimelinking=yes
5916 exp_sym_flag='-bexport'
5917 no_entry_flag='-bnoentry'
5920 # When large executables or shared objects are built, AIX ld can
5921 # have problems creating the table of contents. If linking a library
5922 # or program results in "error TOC overflow" add -mminimal-toc to
5923 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5924 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5926 _LT_AC_TAGVAR(archive_cmds, $1)=''
5927 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5928 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5929 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5931 if test "$GCC" = yes; then
5932 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5933 # We only want to do this on AIX 4.2 and lower, the check
5934 # below for broken collect2 doesn't work under 4.3+
5935 collect2name=`${CC} -print-prog-name=collect2`
5936 if test -f "$collect2name" && \
5937 strings "$collect2name" | grep resolve_lib_name >/dev/null
5939 # We have reworked collect2
5942 # We have old collect2
5943 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5944 # It fails to find uninstalled libraries when the uninstalled
5945 # path is not listed in the libpath. Setting hardcode_minus_L
5946 # to unsupported forces relinking
5947 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5948 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5949 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5953 shared_flag='-shared'
5954 if test "$aix_use_runtimelinking" = yes; then
5955 shared_flag="$shared_flag "'${wl}-G'
5959 if test "$host_cpu" = ia64; then
5960 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5961 # chokes on -Wl,-G. The following line is correct:
5964 if test "$aix_use_runtimelinking" = yes; then
5965 shared_flag='${wl}-G'
5967 shared_flag='${wl}-bM:SRE'
5972 # It seems that -bexpall does not export symbols beginning with
5973 # underscore (_), so it is better to generate a list of symbols to export.
5974 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5975 if test "$aix_use_runtimelinking" = yes; then
5976 # Warning - without using the other runtime loading flags (-brtl),
5977 # -berok will link without error, but may produce a broken library.
5978 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5979 # Determine the default libpath from the value encoded in an empty executable.
5980 _LT_AC_SYS_LIBPATH_AIX
5981 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5982 _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"
5984 if test "$host_cpu" = ia64; then
5985 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5986 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5987 _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"
5989 # Determine the default libpath from the value encoded in an empty executable.
5990 _LT_AC_SYS_LIBPATH_AIX
5991 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5992 # Warning - without using the other run time loading flags,
5993 # -berok will link without error, but may produce a broken library.
5994 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5995 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5996 # Exported symbols can be pulled into shared objects from archives
5997 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5998 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5999 # This is similar to how AIX traditionally builds its shared libraries.
6000 _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'
6006 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6008 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6009 # see comment about different semantics on the GNU ld section
6010 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6014 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6017 cygwin* | mingw* | pw32*)
6018 # When not using gcc, we currently assume that we are using
6019 # Microsoft Visual C++.
6020 # hardcode_libdir_flag_spec is actually meaningless, as there is
6021 # no search path for DLLs.
6022 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6023 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6024 # Tell ltmain to make .lib files, not .a files.
6026 # Tell ltmain to make .dll files, not .so files.
6028 # FIXME: Setting linknames here is a bad hack.
6029 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6030 # The linker will automatically build a .lib file if we build a DLL.
6031 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6032 # FIXME: Should let the user specify the lib program.
6033 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6034 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6035 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6038 darwin* | rhapsody*)
6040 rhapsody* | darwin1.[[012]])
6041 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6044 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6045 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6047 case ${MACOSX_DEPLOYMENT_TARGET} in
6049 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6052 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6058 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6059 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6060 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6061 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6062 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6063 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6064 if test "$GCC" = yes ; then
6065 output_verbose_link_cmd='echo'
6066 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
6067 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6068 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
6069 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6071 case $cc_basename in
6073 output_verbose_link_cmd='echo'
6074 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6075 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6076 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6077 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6078 _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}'
6081 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6088 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6089 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6090 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6094 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6097 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6098 # support. Future versions do this automatically, but an explicit c++rt0.o
6099 # does not break anything, and helps significantly (at the cost of a little
6102 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6103 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6104 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6105 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6108 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6110 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6111 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6112 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6113 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6116 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6117 freebsd* | dragonfly*)
6118 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6119 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6120 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6121 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6125 if test "$GCC" = yes; then
6126 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6128 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6130 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6131 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6132 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6134 # hardcode_minus_L: Not really in the search PATH,
6135 # but as the default location of the library.
6136 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6137 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6141 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6142 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6144 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6146 if test "$with_gnu_ld" = no; then
6147 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6148 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6150 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6151 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6153 # hardcode_minus_L: Not really in the search PATH,
6154 # but as the default location of the library.
6155 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6160 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6163 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6166 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6169 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6175 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6178 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6181 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6185 if test "$with_gnu_ld" = no; then
6186 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6187 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6191 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6192 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6193 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6196 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6197 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6199 # hardcode_minus_L: Not really in the search PATH,
6200 # but as the default location of the library.
6201 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6207 irix5* | irix6* | nonstopux*)
6208 if test "$GCC" = yes; then
6209 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6211 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6212 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6216 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6220 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6221 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6223 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6226 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6227 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6231 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6232 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6234 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6235 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6239 if test -f /usr/libexec/ld.so; then
6240 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6241 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6242 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6243 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6244 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6245 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6246 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6249 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6250 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6254 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6255 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6260 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6265 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6266 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6267 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6268 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6269 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6273 if test "$GCC" = yes; then
6274 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6275 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6277 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6278 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6280 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6281 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6284 osf4* | osf5*) # as osf3* with the addition of -msym flag
6285 if test "$GCC" = yes; then
6286 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6287 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6288 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6290 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6291 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6292 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6293 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6295 # Both c and cxx compiler support -rpath directly
6296 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6298 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6302 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6303 if test "$GCC" = yes; then
6305 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6306 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6307 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6310 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6311 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6312 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6314 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6315 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6317 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6319 # The compiler driver will combine and reorder linker options,
6320 # but understands `-z linker_flag'. GCC discards it without `$wl',
6321 # but is careful enough not to reorder.
6322 # Supported since Solaris 2.6 (maybe 2.5.1?)
6323 if test "$GCC" = yes; then
6324 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6326 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6330 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6334 if test "x$host_vendor" = xsequent; then
6335 # Use $CC to link under sequent, because it throws in some extra .o
6336 # files that make .init and .fini sections work.
6337 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6339 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6341 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6342 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6343 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6344 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6348 case $host_vendor in
6350 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6351 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6354 ## LD is ld it makes a PLAMLIB
6355 ## CC just makes a GrossModule.
6356 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6357 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6358 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6361 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6362 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6365 runpath_var='LD_RUN_PATH'
6366 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6370 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6371 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6372 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6376 if test -d /usr/nec; then
6377 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6378 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6379 runpath_var=LD_RUN_PATH
6380 hardcode_runpath_var=yes
6381 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6385 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6386 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6387 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6388 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6389 runpath_var='LD_RUN_PATH'
6391 if test "$GCC" = yes; then
6392 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6393 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6395 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6396 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6400 sysv5* | sco3.2v5* | sco5v6*)
6401 # Note: We can NOT use -z defs as we might desire, because we do not
6402 # link with -lc, and that would cause any symbols used from libc to
6403 # always be unresolved, which means just about no library would
6404 # ever link correctly. If we're not using GNU ld we use -z text
6405 # though, which does catch some bad symbols but isn't as heavy-handed
6407 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6408 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6409 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6410 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6411 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6412 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6413 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6414 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6415 runpath_var='LD_RUN_PATH'
6417 if test "$GCC" = yes; then
6418 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6419 _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'
6421 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6422 _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'
6427 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6428 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6429 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6433 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6438 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6439 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6442 # Do we need to explicitly link libc?
6444 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6446 # Assume -lc should be added
6447 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6449 if test "$enable_shared" = yes && test "$GCC" = yes; then
6450 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6452 # FIXME: we may have to deal with multi-command sequences.
6455 # Test whether the compiler implicitly links with -lc since on some
6456 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6457 # to ld, don't add -lc before -lgcc.
6458 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6460 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6462 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6465 libobjs=conftest.$ac_objext
6467 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6468 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6474 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6475 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6476 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6478 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6480 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6482 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6484 cat conftest.err 1>&5
6487 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6493 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6496 # _LT_AC_FILE_LTDLL_C
6497 # -------------------
6498 # Be careful that the start marker always follows a newline.
6499 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6500 # /* ltdll.c starts here */
6501 # #define WIN32_LEAN_AND_MEAN
6502 # #include <windows.h>
6503 # #undef WIN32_LEAN_AND_MEAN
6504 # #include <stdio.h>
6506 # #ifndef __CYGWIN__
6507 # # ifdef __CYGWIN32__
6508 # # define __CYGWIN__ __CYGWIN32__
6512 # #ifdef __cplusplus
6515 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6516 # #ifdef __cplusplus
6521 # #include <cygwin/cygwin_dll.h>
6522 # DECLARE_CYGWIN_DLL( DllMain );
6524 # HINSTANCE __hDllInstance_base;
6527 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6529 # __hDllInstance_base = hInst;
6532 # /* ltdll.c ends here */
6533 ])# _LT_AC_FILE_LTDLL_C
6536 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6537 # ---------------------------------
6538 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6542 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6543 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6544 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6545 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6546 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6547 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6548 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6550 # This is just to silence aclocal about the macro not being used
6551 ifelse([AC_DISABLE_FAST_INSTALL])
6553 AC_DEFUN([LT_AC_PROG_GCJ],
6554 [AC_CHECK_TOOL(GCJ, gcj, no)
6555 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6559 AC_DEFUN([LT_AC_PROG_RC],
6560 [AC_CHECK_TOOL(RC, windres, no)
6564 # Cheap backport of AS_EXECUTABLE_P and required macros
6565 # from Autoconf 2.59; we should not use $as_executable_p directly.
6569 m4_ifndef([_AS_TEST_PREPARE],
6570 [m4_defun([_AS_TEST_PREPARE],
6571 [if test -x / >/dev/null 2>&1; then
6572 as_executable_p='test -x'
6574 as_executable_p='test -f'
6576 ])])# _AS_TEST_PREPARE
6580 # Check whether a file is executable.
6581 m4_ifndef([AS_EXECUTABLE_P],
6582 [m4_defun([AS_EXECUTABLE_P],
6583 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
6584 $as_executable_p $1[]dnl
6585 ])])# AS_EXECUTABLE_P
6587 # NOTE: This macro has been submitted for inclusion into #
6588 # GNU Autoconf as AC_PROG_SED. When it is available in #
6589 # a released version of Autoconf we should remove this #
6590 # macro and use it instead. #
6593 # Check for a fully-functional sed program, that truncates
6594 # as few characters as possible. Prefer GNU sed if found.
6595 AC_DEFUN([LT_AC_PROG_SED],
6596 [AC_MSG_CHECKING([for a sed that does not truncate output])
6597 AC_CACHE_VAL(lt_cv_path_SED,
6598 [# Loop through the user's path and test for sed and gsed.
6599 # Then use that list of sed's as ones to test for truncation.
6600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604 test -z "$as_dir" && as_dir=.
6605 for lt_ac_prog in sed gsed; do
6606 for ac_exec_ext in '' $ac_executable_extensions; do
6607 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6608 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6616 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6617 # along with /bin/sed that truncates output.
6618 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6619 test ! -f $lt_ac_sed && continue
6620 cat /dev/null > conftest.in
6622 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6623 # Check for GNU sed and select it if it is found.
6624 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6625 lt_cv_path_SED=$lt_ac_sed
6629 cat conftest.in conftest.in >conftest.tmp
6630 mv conftest.tmp conftest.in
6631 cp conftest.in conftest.nl
6633 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6634 cmp -s conftest.out conftest.nl || break
6635 # 10000 chars as input seems more than enough
6636 test $lt_ac_count -gt 10 && break
6637 lt_ac_count=`expr $lt_ac_count + 1`
6638 if test $lt_ac_count -gt $lt_ac_max; then
6639 lt_ac_max=$lt_ac_count
6640 lt_cv_path_SED=$lt_ac_sed
6647 AC_MSG_RESULT([$SED])
6650 # iconv.m4 serial AM6 (gettext-0.17)
6651 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
6652 dnl This file is free software; the Free Software Foundation
6653 dnl gives unlimited permission to copy and/or distribute it,
6654 dnl with or without modifications, as long as this notice is preserved.
6656 dnl From Bruno Haible.
6658 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
6660 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
6661 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6662 AC_REQUIRE([AC_LIB_RPATH])
6664 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
6666 AC_LIB_LINKFLAGS_BODY([iconv])
6669 AC_DEFUN([AM_ICONV_LINK],
6671 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
6672 dnl those with the standalone portable GNU libiconv installed).
6673 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
6675 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
6677 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
6679 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
6680 dnl because if the user has installed libiconv and not disabled its use
6681 dnl via --without-libiconv-prefix, he wants to use it. The first
6682 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
6683 am_save_CPPFLAGS="$CPPFLAGS"
6684 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
6686 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
6687 am_cv_func_iconv="no, consider installing GNU libiconv"
6689 AC_TRY_LINK([#include <stdlib.h>
6690 #include <iconv.h>],
6691 [iconv_t cd = iconv_open("","");
6692 iconv(cd,NULL,NULL,NULL,NULL);
6694 am_cv_func_iconv=yes)
6695 if test "$am_cv_func_iconv" != yes; then
6696 am_save_LIBS="$LIBS"
6697 LIBS="$LIBS $LIBICONV"
6698 AC_TRY_LINK([#include <stdlib.h>
6699 #include <iconv.h>],
6700 [iconv_t cd = iconv_open("","");
6701 iconv(cd,NULL,NULL,NULL,NULL);
6704 am_cv_func_iconv=yes)
6705 LIBS="$am_save_LIBS"
6708 if test "$am_cv_func_iconv" = yes; then
6709 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
6710 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
6711 am_save_LIBS="$LIBS"
6712 if test $am_cv_lib_iconv = yes; then
6713 LIBS="$LIBS $LIBICONV"
6720 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
6723 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
6724 if (cd_utf8_to_88591 != (iconv_t)(-1))
6726 static const char input[] = "\342\202\254"; /* EURO SIGN */
6728 const char *inptr = input;
6729 size_t inbytesleft = strlen (input);
6731 size_t outbytesleft = sizeof (buf);
6732 size_t res = iconv (cd_utf8_to_88591,
6733 (char **) &inptr, &inbytesleft,
6734 &outptr, &outbytesleft);
6739 #if 0 /* This bug could be worked around by the caller. */
6740 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
6742 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
6743 if (cd_88591_to_utf8 != (iconv_t)(-1))
6745 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
6747 const char *inptr = input;
6748 size_t inbytesleft = strlen (input);
6750 size_t outbytesleft = sizeof (buf);
6751 size_t res = iconv (cd_88591_to_utf8,
6752 (char **) &inptr, &inbytesleft,
6753 &outptr, &outbytesleft);
6759 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
6761 if (/* Try standardized names. */
6762 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
6763 /* Try IRIX, OSF/1 names. */
6764 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
6765 /* Try AIX names. */
6766 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
6767 /* Try HP-UX names. */
6768 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
6771 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
6773 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
6774 *) am_cv_func_iconv_works="guessing yes" ;;
6776 LIBS="$am_save_LIBS"
6778 case "$am_cv_func_iconv_works" in
6779 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
6780 *) am_func_iconv=yes ;;
6783 am_func_iconv=no am_cv_lib_iconv=no
6785 if test "$am_func_iconv" = yes; then
6786 AC_DEFINE(HAVE_ICONV, 1,
6787 [Define if you have the iconv() function and it works.])
6789 if test "$am_cv_lib_iconv" = yes; then
6790 AC_MSG_CHECKING([how to link with libiconv])
6791 AC_MSG_RESULT([$LIBICONV])
6793 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
6795 CPPFLAGS="$am_save_CPPFLAGS"
6800 AC_SUBST(LTLIBICONV)
6803 AC_DEFUN([AM_ICONV],
6806 if test "$am_cv_func_iconv" = yes; then
6807 AC_MSG_CHECKING([for iconv declaration])
6808 AC_CACHE_VAL(am_cv_proto_iconv, [
6816 #if defined(__STDC__) || defined(__cplusplus)
6817 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
6821 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
6822 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
6823 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
6824 AC_MSG_RESULT([$]{ac_t:-
6825 }[$]am_cv_proto_iconv)
6826 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
6827 [Define as const if the declaration of iconv() needs const.])
6831 # lib-ld.m4 serial 3 (gettext-0.13)
6832 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
6833 dnl This file is free software; the Free Software Foundation
6834 dnl gives unlimited permission to copy and/or distribute it,
6835 dnl with or without modifications, as long as this notice is preserved.
6837 dnl Subroutines of libtool.m4,
6838 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
6839 dnl with libtool.m4.
6841 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
6842 AC_DEFUN([AC_LIB_PROG_LD_GNU],
6843 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
6844 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
6845 case `$LD -v 2>&1 </dev/null` in
6846 *GNU* | *'with BFD'*)
6847 acl_cv_prog_gnu_ld=yes ;;
6849 acl_cv_prog_gnu_ld=no ;;
6851 with_gnu_ld=$acl_cv_prog_gnu_ld
6854 dnl From libtool-1.4. Sets the variable LD.
6855 AC_DEFUN([AC_LIB_PROG_LD],
6856 [AC_ARG_WITH(gnu-ld,
6857 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
6858 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
6859 AC_REQUIRE([AC_PROG_CC])dnl
6860 AC_REQUIRE([AC_CANONICAL_HOST])dnl
6861 # Prepare PATH_SEPARATOR.
6862 # The user is always right.
6863 if test "${PATH_SEPARATOR+set}" != set; then
6864 echo "#! /bin/sh" >conf$$.sh
6865 echo "exit 0" >>conf$$.sh
6867 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
6875 if test "$GCC" = yes; then
6876 # Check if gcc -print-prog-name=ld gives a path.
6877 AC_MSG_CHECKING([for ld used by GCC])
6880 # gcc leaves a trailing carriage return which upsets mingw
6881 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6883 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6886 # Accept absolute paths.
6887 [[\\/]* | [A-Za-z]:[\\/]*)]
6888 [re_direlt='/[^/][^/]*/\.\./']
6889 # Canonicalize the path of ld
6890 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6891 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6892 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6894 test -z "$LD" && LD="$ac_prog"
6897 # If it fails, then pretend we aren't using GCC.
6901 # If it is relative, then search for the first ld in PATH.
6905 elif test "$with_gnu_ld" = yes; then
6906 AC_MSG_CHECKING([for GNU ld])
6908 AC_MSG_CHECKING([for non-GNU ld])
6910 AC_CACHE_VAL(acl_cv_path_LD,
6911 [if test -z "$LD"; then
6912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6913 for ac_dir in $PATH; do
6914 test -z "$ac_dir" && ac_dir=.
6915 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6916 acl_cv_path_LD="$ac_dir/$ac_prog"
6917 # Check to see if the program is GNU ld. I'd rather use --version,
6918 # but apparently some GNU ld's only accept -v.
6919 # Break only if it was the GNU/non-GNU ld that we prefer.
6920 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
6921 *GNU* | *'with BFD'*)
6922 test "$with_gnu_ld" != no && break ;;
6924 test "$with_gnu_ld" != yes && break ;;
6930 acl_cv_path_LD="$LD" # Let the user override the test with a path.
6932 LD="$acl_cv_path_LD"
6933 if test -n "$LD"; then
6938 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6942 # lib-link.m4 serial 13 (gettext-0.17)
6943 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
6944 dnl This file is free software; the Free Software Foundation
6945 dnl gives unlimited permission to copy and/or distribute it,
6946 dnl with or without modifications, as long as this notice is preserved.
6948 dnl From Bruno Haible.
6952 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
6953 dnl the libraries corresponding to explicit and implicit dependencies.
6954 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
6955 dnl augments the CPPFLAGS variable.
6956 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
6957 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
6958 AC_DEFUN([AC_LIB_LINKFLAGS],
6960 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6961 AC_REQUIRE([AC_LIB_RPATH])
6962 define([Name],[translit([$1],[./-], [___])])
6963 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6964 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6965 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
6966 AC_LIB_LINKFLAGS_BODY([$1], [$2])
6967 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
6968 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
6969 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
6970 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
6972 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
6973 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
6974 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
6975 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
6976 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
6978 AC_SUBST([LTLIB]NAME)
6979 AC_SUBST([LIB]NAME[_PREFIX])
6980 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
6981 dnl results of this search when this library appears as a dependency.
6987 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
6988 dnl searches for libname and the libraries corresponding to explicit and
6989 dnl implicit dependencies, together with the specified include files and
6990 dnl the ability to compile and link the specified testcode. If found, it
6991 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
6992 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
6993 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
6994 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
6995 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
6996 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
6997 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
6999 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7000 AC_REQUIRE([AC_LIB_RPATH])
7001 define([Name],[translit([$1],[./-], [___])])
7002 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
7003 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
7005 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
7007 AC_LIB_LINKFLAGS_BODY([$1], [$2])
7009 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
7010 dnl because if the user has installed lib[]Name and not disabled its use
7011 dnl via --without-lib[]Name-prefix, he wants to use it.
7012 ac_save_CPPFLAGS="$CPPFLAGS"
7013 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
7015 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
7016 ac_save_LIBS="$LIBS"
7017 LIBS="$LIBS $LIB[]NAME"
7018 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
7019 LIBS="$ac_save_LIBS"
7021 if test "$ac_cv_lib[]Name" = yes; then
7023 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
7024 AC_MSG_CHECKING([how to link with lib[]$1])
7025 AC_MSG_RESULT([$LIB[]NAME])
7028 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
7029 dnl $INC[]NAME either.
7030 CPPFLAGS="$ac_save_CPPFLAGS"
7035 AC_SUBST([HAVE_LIB]NAME)
7037 AC_SUBST([LTLIB]NAME)
7038 AC_SUBST([LIB]NAME[_PREFIX])
7043 dnl Determine the platform dependent parameters needed to use rpath:
7046 dnl acl_hardcode_libdir_flag_spec,
7047 dnl acl_hardcode_libdir_separator,
7048 dnl acl_hardcode_direct,
7049 dnl acl_hardcode_minus_L.
7050 AC_DEFUN([AC_LIB_RPATH],
7052 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
7053 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
7054 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
7055 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
7056 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
7057 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
7058 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
7059 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
7060 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
7066 acl_libext="$acl_cv_libext"
7067 acl_shlibext="$acl_cv_shlibext"
7068 acl_libname_spec="$acl_cv_libname_spec"
7069 acl_library_names_spec="$acl_cv_library_names_spec"
7070 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
7071 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
7072 acl_hardcode_direct="$acl_cv_hardcode_direct"
7073 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
7074 dnl Determine whether the user wants rpath handling at all.
7075 AC_ARG_ENABLE(rpath,
7076 [ --disable-rpath do not hardcode runtime library paths],
7077 :, enable_rpath=yes)
7080 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
7081 dnl the libraries corresponding to explicit and implicit dependencies.
7082 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
7083 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
7084 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
7085 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
7087 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
7088 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
7089 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
7090 dnl Autoconf >= 2.61 supports dots in --with options.
7091 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
7092 dnl By default, look in $includedir and $libdir.
7094 AC_LIB_WITH_FINAL_PREFIX([
7095 eval additional_includedir=\"$includedir\"
7096 eval additional_libdir=\"$libdir\"
7098 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
7099 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
7100 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
7102 if test "X$withval" = "Xno"; then
7105 if test "X$withval" = "X"; then
7106 AC_LIB_WITH_FINAL_PREFIX([
7107 eval additional_includedir=\"$includedir\"
7108 eval additional_libdir=\"$libdir\"
7111 additional_includedir="$withval/include"
7112 additional_libdir="$withval/$acl_libdirstem"
7116 dnl Search the library and its dependencies in $additional_libdir and
7117 dnl $LDFLAGS. Using breadth-first-seach.
7124 names_already_handled=
7125 names_next_round='$1 $2'
7126 while test -n "$names_next_round"; do
7127 names_this_round="$names_next_round"
7129 for name in $names_this_round; do
7131 for n in $names_already_handled; do
7132 if test "$n" = "$name"; then
7137 if test -z "$already_handled"; then
7138 names_already_handled="$names_already_handled $name"
7139 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
7140 dnl or AC_LIB_HAVE_LINKFLAGS call.
7141 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
7142 eval value=\"\$HAVE_LIB$uppername\"
7143 if test -n "$value"; then
7144 if test "$value" = yes; then
7145 eval value=\"\$LIB$uppername\"
7146 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
7147 eval value=\"\$LTLIB$uppername\"
7148 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
7150 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
7151 dnl that this library doesn't exist. So just drop it.
7155 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
7156 dnl and the already constructed $LIBNAME/$LTLIBNAME.
7161 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
7162 if test -n "$acl_shlibext"; then
7163 shrext=".$acl_shlibext" # typically: shrext=.so
7167 if test $use_additional = yes; then
7168 dir="$additional_libdir"
7169 dnl The same code as in the loop below:
7170 dnl First look for a shared library.
7171 if test -n "$acl_shlibext"; then
7172 if test -f "$dir/$libname$shrext"; then
7174 found_so="$dir/$libname$shrext"
7176 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7177 ver=`(cd "$dir" && \
7178 for f in "$libname$shrext".*; do echo "$f"; done \
7179 | sed -e "s,^$libname$shrext\\\\.,," \
7180 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7181 | sed 1q ) 2>/dev/null`
7182 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7184 found_so="$dir/$libname$shrext.$ver"
7187 eval library_names=\"$acl_library_names_spec\"
7188 for f in $library_names; do
7189 if test -f "$dir/$f"; then
7198 dnl Then look for a static library.
7199 if test "X$found_dir" = "X"; then
7200 if test -f "$dir/$libname.$acl_libext"; then
7202 found_a="$dir/$libname.$acl_libext"
7205 if test "X$found_dir" != "X"; then
7206 if test -f "$dir/$libname.la"; then
7207 found_la="$dir/$libname.la"
7211 if test "X$found_dir" = "X"; then
7212 for x in $LDFLAGS $LTLIB[]NAME; do
7213 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7216 dir=`echo "X$x" | sed -e 's/^X-L//'`
7217 dnl First look for a shared library.
7218 if test -n "$acl_shlibext"; then
7219 if test -f "$dir/$libname$shrext"; then
7221 found_so="$dir/$libname$shrext"
7223 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
7224 ver=`(cd "$dir" && \
7225 for f in "$libname$shrext".*; do echo "$f"; done \
7226 | sed -e "s,^$libname$shrext\\\\.,," \
7227 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
7228 | sed 1q ) 2>/dev/null`
7229 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
7231 found_so="$dir/$libname$shrext.$ver"
7234 eval library_names=\"$acl_library_names_spec\"
7235 for f in $library_names; do
7236 if test -f "$dir/$f"; then
7245 dnl Then look for a static library.
7246 if test "X$found_dir" = "X"; then
7247 if test -f "$dir/$libname.$acl_libext"; then
7249 found_a="$dir/$libname.$acl_libext"
7252 if test "X$found_dir" != "X"; then
7253 if test -f "$dir/$libname.la"; then
7254 found_la="$dir/$libname.la"
7259 if test "X$found_dir" != "X"; then
7264 if test "X$found_dir" != "X"; then
7265 dnl Found the library.
7266 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
7267 if test "X$found_so" != "X"; then
7268 dnl Linking with a shared library. We attempt to hardcode its
7269 dnl directory into the executable's runpath, unless it's the
7270 dnl standard /usr/lib.
7271 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
7272 dnl No hardcoding is needed.
7273 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
7275 dnl Use an explicit option to hardcode DIR into the resulting
7277 dnl Potentially add DIR to ltrpathdirs.
7278 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
7280 for x in $ltrpathdirs; do
7281 if test "X$x" = "X$found_dir"; then
7286 if test -z "$haveit"; then
7287 ltrpathdirs="$ltrpathdirs $found_dir"
7289 dnl The hardcoding into $LIBNAME is system dependent.
7290 if test "$acl_hardcode_direct" = yes; then
7291 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
7292 dnl resulting binary.
7293 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
7295 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
7296 dnl Use an explicit option to hardcode DIR into the resulting
7298 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
7299 dnl Potentially add DIR to rpathdirs.
7300 dnl The rpathdirs will be appended to $LIBNAME at the end.
7302 for x in $rpathdirs; do
7303 if test "X$x" = "X$found_dir"; then
7308 if test -z "$haveit"; then
7309 rpathdirs="$rpathdirs $found_dir"
7312 dnl Rely on "-L$found_dir".
7313 dnl But don't add it if it's already contained in the LDFLAGS
7314 dnl or the already constructed $LIBNAME
7316 for x in $LDFLAGS $LIB[]NAME; do
7317 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7318 if test "X$x" = "X-L$found_dir"; then
7323 if test -z "$haveit"; then
7324 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
7326 if test "$acl_hardcode_minus_L" != no; then
7327 dnl FIXME: Not sure whether we should use
7328 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
7330 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
7332 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
7333 dnl here, because this doesn't fit in flags passed to the
7334 dnl compiler. So give up. No hardcoding. This affects only
7335 dnl very old systems.
7336 dnl FIXME: Not sure whether we should use
7337 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
7339 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
7345 if test "X$found_a" != "X"; then
7346 dnl Linking with a static library.
7347 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
7349 dnl We shouldn't come here, but anyway it's good to have a
7351 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
7354 dnl Assume the include files are nearby.
7355 additional_includedir=
7356 case "$found_dir" in
7357 */$acl_libdirstem | */$acl_libdirstem/)
7358 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
7359 LIB[]NAME[]_PREFIX="$basedir"
7360 additional_includedir="$basedir/include"
7363 if test "X$additional_includedir" != "X"; then
7364 dnl Potentially add $additional_includedir to $INCNAME.
7365 dnl But don't add it
7366 dnl 1. if it's the standard /usr/include,
7367 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
7368 dnl 3. if it's already present in $CPPFLAGS or the already
7369 dnl constructed $INCNAME,
7370 dnl 4. if it doesn't exist as a directory.
7371 if test "X$additional_includedir" != "X/usr/include"; then
7373 if test "X$additional_includedir" = "X/usr/local/include"; then
7374 if test -n "$GCC"; then
7376 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
7380 if test -z "$haveit"; then
7381 for x in $CPPFLAGS $INC[]NAME; do
7382 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7383 if test "X$x" = "X-I$additional_includedir"; then
7388 if test -z "$haveit"; then
7389 if test -d "$additional_includedir"; then
7390 dnl Really add $additional_includedir to $INCNAME.
7391 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
7397 dnl Look for dependencies.
7398 if test -n "$found_la"; then
7399 dnl Read the .la file. It defines the variables
7400 dnl dlname, library_names, old_library, dependency_libs, current,
7401 dnl age, revision, installed, dlopen, dlpreopen, libdir.
7402 save_libdir="$libdir"
7404 */* | *\\*) . "$found_la" ;;
7405 *) . "./$found_la" ;;
7407 libdir="$save_libdir"
7408 dnl We use only dependency_libs.
7409 for dep in $dependency_libs; do
7412 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
7413 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
7414 dnl But don't add it
7415 dnl 1. if it's the standard /usr/lib,
7416 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
7417 dnl 3. if it's already present in $LDFLAGS or the already
7418 dnl constructed $LIBNAME,
7419 dnl 4. if it doesn't exist as a directory.
7420 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
7422 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
7423 if test -n "$GCC"; then
7425 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
7429 if test -z "$haveit"; then
7431 for x in $LDFLAGS $LIB[]NAME; do
7432 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7433 if test "X$x" = "X-L$additional_libdir"; then
7438 if test -z "$haveit"; then
7439 if test -d "$additional_libdir"; then
7440 dnl Really add $additional_libdir to $LIBNAME.
7441 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
7445 for x in $LDFLAGS $LTLIB[]NAME; do
7446 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7447 if test "X$x" = "X-L$additional_libdir"; then
7452 if test -z "$haveit"; then
7453 if test -d "$additional_libdir"; then
7454 dnl Really add $additional_libdir to $LTLIBNAME.
7455 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
7462 dir=`echo "X$dep" | sed -e 's/^X-R//'`
7463 if test "$enable_rpath" != no; then
7464 dnl Potentially add DIR to rpathdirs.
7465 dnl The rpathdirs will be appended to $LIBNAME at the end.
7467 for x in $rpathdirs; do
7468 if test "X$x" = "X$dir"; then
7473 if test -z "$haveit"; then
7474 rpathdirs="$rpathdirs $dir"
7476 dnl Potentially add DIR to ltrpathdirs.
7477 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
7479 for x in $ltrpathdirs; do
7480 if test "X$x" = "X$dir"; then
7485 if test -z "$haveit"; then
7486 ltrpathdirs="$ltrpathdirs $dir"
7491 dnl Handle this in the next round.
7492 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
7495 dnl Handle this in the next round. Throw away the .la's
7496 dnl directory; it is already contained in a preceding -L
7498 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
7501 dnl Most likely an immediate library name.
7502 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
7503 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
7509 dnl Didn't find the library; assume it is in the system directories
7510 dnl known to the linker and runtime loader. (All the system
7511 dnl directories known to the linker should also be known to the
7512 dnl runtime loader, otherwise the system is severely misconfigured.)
7513 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
7514 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
7520 if test "X$rpathdirs" != "X"; then
7521 if test -n "$acl_hardcode_libdir_separator"; then
7522 dnl Weird platform: only the last -rpath option counts, the user must
7523 dnl pass all path elements in one option. We can arrange that for a
7524 dnl single library, but not when more than one $LIBNAMEs are used.
7526 for found_dir in $rpathdirs; do
7527 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
7529 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
7530 acl_save_libdir="$libdir"
7532 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7533 libdir="$acl_save_libdir"
7534 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
7536 dnl The -rpath options are cumulative.
7537 for found_dir in $rpathdirs; do
7538 acl_save_libdir="$libdir"
7540 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7541 libdir="$acl_save_libdir"
7542 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
7546 if test "X$ltrpathdirs" != "X"; then
7547 dnl When using libtool, the option that works for both libraries and
7548 dnl executables is -R. The -R options are cumulative.
7549 for found_dir in $ltrpathdirs; do
7550 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
7555 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
7556 dnl unless already present in VAR.
7557 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
7558 dnl contains two or three consecutive elements that belong together.
7559 AC_DEFUN([AC_LIB_APPENDTOVAR],
7561 for element in [$2]; do
7564 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7565 if test "X$x" = "X$element"; then
7570 if test -z "$haveit"; then
7571 [$1]="${[$1]}${[$1]:+ }$element"
7576 dnl For those cases where a variable contains several -L and -l options
7577 dnl referring to unknown libraries and directories, this macro determines the
7578 dnl necessary additional linker options for the runtime path.
7579 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
7580 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
7581 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
7582 dnl otherwise linking without libtool is assumed.
7583 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
7585 AC_REQUIRE([AC_LIB_RPATH])
7586 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
7588 if test "$enable_rpath" != no; then
7589 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
7590 dnl Use an explicit option to hardcode directories into the resulting
7595 if test -n "$next"; then
7597 dnl No need to hardcode the standard /usr/lib.
7598 if test "X$dir" != "X/usr/$acl_libdirstem"; then
7599 rpathdirs="$rpathdirs $dir"
7605 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
7606 dnl No need to hardcode the standard /usr/lib.
7607 if test "X$dir" != "X/usr/$acl_libdirstem"; then
7608 rpathdirs="$rpathdirs $dir"
7615 if test "X$rpathdirs" != "X"; then
7616 if test -n ""$3""; then
7617 dnl libtool is used for linking. Use -R options.
7618 for dir in $rpathdirs; do
7619 $1="${$1}${$1:+ }-R$dir"
7622 dnl The linker is used for linking directly.
7623 if test -n "$acl_hardcode_libdir_separator"; then
7624 dnl Weird platform: only the last -rpath option counts, the user
7625 dnl must pass all path elements in one option.
7627 for dir in $rpathdirs; do
7628 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
7630 acl_save_libdir="$libdir"
7632 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7633 libdir="$acl_save_libdir"
7636 dnl The -rpath options are cumulative.
7637 for dir in $rpathdirs; do
7638 acl_save_libdir="$libdir"
7640 eval flag=\"$acl_hardcode_libdir_flag_spec\"
7641 libdir="$acl_save_libdir"
7642 $1="${$1}${$1:+ }$flag"
7652 # lib-prefix.m4 serial 5 (gettext-0.15)
7653 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
7654 dnl This file is free software; the Free Software Foundation
7655 dnl gives unlimited permission to copy and/or distribute it,
7656 dnl with or without modifications, as long as this notice is preserved.
7658 dnl From Bruno Haible.
7660 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
7661 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
7662 dnl require excessive bracketing.
7663 ifdef([AC_HELP_STRING],
7664 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
7665 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
7667 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
7668 dnl to access previously installed libraries. The basic assumption is that
7669 dnl a user will want packages to use other packages he previously installed
7670 dnl with the same --prefix option.
7671 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
7672 dnl libraries, but is otherwise very convenient.
7673 AC_DEFUN([AC_LIB_PREFIX],
7675 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
7676 AC_REQUIRE([AC_PROG_CC])
7677 AC_REQUIRE([AC_CANONICAL_HOST])
7678 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
7679 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
7680 dnl By default, look in $includedir and $libdir.
7682 AC_LIB_WITH_FINAL_PREFIX([
7683 eval additional_includedir=\"$includedir\"
7684 eval additional_libdir=\"$libdir\"
7686 AC_LIB_ARG_WITH([lib-prefix],
7687 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
7688 --without-lib-prefix don't search for libraries in includedir and libdir],
7690 if test "X$withval" = "Xno"; then
7693 if test "X$withval" = "X"; then
7694 AC_LIB_WITH_FINAL_PREFIX([
7695 eval additional_includedir=\"$includedir\"
7696 eval additional_libdir=\"$libdir\"
7699 additional_includedir="$withval/include"
7700 additional_libdir="$withval/$acl_libdirstem"
7704 if test $use_additional = yes; then
7705 dnl Potentially add $additional_includedir to $CPPFLAGS.
7706 dnl But don't add it
7707 dnl 1. if it's the standard /usr/include,
7708 dnl 2. if it's already present in $CPPFLAGS,
7709 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
7710 dnl 4. if it doesn't exist as a directory.
7711 if test "X$additional_includedir" != "X/usr/include"; then
7713 for x in $CPPFLAGS; do
7714 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7715 if test "X$x" = "X-I$additional_includedir"; then
7720 if test -z "$haveit"; then
7721 if test "X$additional_includedir" = "X/usr/local/include"; then
7722 if test -n "$GCC"; then
7724 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
7728 if test -z "$haveit"; then
7729 if test -d "$additional_includedir"; then
7730 dnl Really add $additional_includedir to $CPPFLAGS.
7731 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
7736 dnl Potentially add $additional_libdir to $LDFLAGS.
7737 dnl But don't add it
7738 dnl 1. if it's the standard /usr/lib,
7739 dnl 2. if it's already present in $LDFLAGS,
7740 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
7741 dnl 4. if it doesn't exist as a directory.
7742 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
7744 for x in $LDFLAGS; do
7745 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
7746 if test "X$x" = "X-L$additional_libdir"; then
7751 if test -z "$haveit"; then
7752 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
7753 if test -n "$GCC"; then
7755 linux*) haveit=yes;;
7759 if test -z "$haveit"; then
7760 if test -d "$additional_libdir"; then
7761 dnl Really add $additional_libdir to $LDFLAGS.
7762 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
7770 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
7771 dnl acl_final_exec_prefix, containing the values to which $prefix and
7772 dnl $exec_prefix will expand at the end of the configure script.
7773 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
7775 dnl Unfortunately, prefix and exec_prefix get only finally determined
7776 dnl at the end of configure.
7777 if test "X$prefix" = "XNONE"; then
7778 acl_final_prefix="$ac_default_prefix"
7780 acl_final_prefix="$prefix"
7782 if test "X$exec_prefix" = "XNONE"; then
7783 acl_final_exec_prefix='${prefix}'
7785 acl_final_exec_prefix="$exec_prefix"
7787 acl_save_prefix="$prefix"
7788 prefix="$acl_final_prefix"
7789 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
7790 prefix="$acl_save_prefix"
7793 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
7794 dnl variables prefix and exec_prefix bound to the values they will have
7795 dnl at the end of the configure script.
7796 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
7798 acl_save_prefix="$prefix"
7799 prefix="$acl_final_prefix"
7800 acl_save_exec_prefix="$exec_prefix"
7801 exec_prefix="$acl_final_exec_prefix"
7803 exec_prefix="$acl_save_exec_prefix"
7804 prefix="$acl_save_prefix"
7807 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
7808 dnl the basename of the libdir, either "lib" or "lib64".
7809 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
7811 dnl There is no formal standard regarding lib and lib64. The current
7812 dnl practice is that on a system supporting 32-bit and 64-bit instruction
7813 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
7814 dnl libraries go under $prefix/lib. We determine the compiler's default
7815 dnl mode by looking at the compiler's library search path. If at least
7816 dnl of its elements ends in /lib64 or points to a directory whose absolute
7817 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
7818 dnl default, namely "lib".
7820 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
7821 if test -n "$searchpath"; then
7822 acl_save_IFS="${IFS= }"; IFS=":"
7823 for searchdir in $searchpath; do
7824 if test -d "$searchdir"; then
7825 case "$searchdir" in
7826 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
7827 *) searchdir=`cd "$searchdir" && pwd`
7828 case "$searchdir" in
7829 */lib64 ) acl_libdirstem=lib64 ;;
7839 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
7840 # Generated from amversion.in; do not edit by hand.
7842 # This program is free software; you can redistribute it and/or modify
7843 # it under the terms of the GNU General Public License as published by
7844 # the Free Software Foundation; either version 2, or (at your option)
7845 # any later version.
7847 # This program is distributed in the hope that it will be useful,
7848 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7849 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7850 # GNU General Public License for more details.
7852 # You should have received a copy of the GNU General Public License
7853 # along with this program; if not, write to the Free Software
7854 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7856 # AM_AUTOMAKE_VERSION(VERSION)
7857 # ----------------------------
7858 # Automake X.Y traces this macro to ensure aclocal.m4 has been
7859 # generated from the m4 files accompanying Automake X.Y.
7860 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
7862 # AM_SET_CURRENT_AUTOMAKE_VERSION
7863 # -------------------------------
7864 # Call AM_AUTOMAKE_VERSION so it can be traced.
7865 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
7866 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7867 [AM_AUTOMAKE_VERSION([1.8.5])])
7871 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7873 # This program is free software; you can redistribute it and/or modify
7874 # it under the terms of the GNU General Public License as published by
7875 # the Free Software Foundation; either version 2, or (at your option)
7876 # any later version.
7878 # This program is distributed in the hope that it will be useful,
7879 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7880 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7881 # GNU General Public License for more details.
7883 # You should have received a copy of the GNU General Public License
7884 # along with this program; if not, write to the Free Software
7885 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7888 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7889 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
7890 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7892 # Of course, Automake must honor this variable whenever it calls a
7893 # tool from the auxiliary directory. The problem is that $srcdir (and
7894 # therefore $ac_aux_dir as well) can be either absolute or relative,
7895 # depending on how configure is run. This is pretty annoying, since
7896 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
7897 # source directory, any form will work fine, but in subdirectories a
7898 # relative path needs to be adjusted first.
7900 # $ac_aux_dir/missing
7901 # fails when called from a subdirectory if $ac_aux_dir is relative
7902 # $top_srcdir/$ac_aux_dir/missing
7903 # fails if $ac_aux_dir is absolute,
7904 # fails when called from a subdirectory in a VPATH build with
7905 # a relative $ac_aux_dir
7907 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7908 # are both prefixed by $srcdir. In an in-source build this is usually
7909 # harmless because $srcdir is `.', but things will broke when you
7910 # start a VPATH build or use an absolute $srcdir.
7912 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7913 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
7914 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7915 # and then we would define $MISSING as
7916 # MISSING="\${SHELL} $am_aux_dir/missing"
7917 # This will work as long as MISSING is not called from configure, because
7918 # unfortunately $(top_srcdir) has no meaning in configure.
7919 # However there are other variables, like CC, which are often used in
7920 # configure, and could therefore not use this "fixed" $ac_aux_dir.
7922 # Another solution, used here, is to always expand $ac_aux_dir to an
7923 # absolute PATH. The drawback is that using absolute paths prevent a
7924 # configured tree to be moved without reconfiguration.
7926 AC_DEFUN([AM_AUX_DIR_EXPAND],
7927 [dnl Rely on autoconf to set up CDPATH properly.
7928 AC_PREREQ([2.50])dnl
7929 # expand $ac_aux_dir to an absolute path
7930 am_aux_dir=`cd $ac_aux_dir && pwd`
7933 # AM_CONDITIONAL -*- Autoconf -*-
7935 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7937 # This program is free software; you can redistribute it and/or modify
7938 # it under the terms of the GNU General Public License as published by
7939 # the Free Software Foundation; either version 2, or (at your option)
7940 # any later version.
7942 # This program is distributed in the hope that it will be useful,
7943 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7944 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7945 # GNU General Public License for more details.
7947 # You should have received a copy of the GNU General Public License
7948 # along with this program; if not, write to the Free Software
7949 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7954 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
7955 # -------------------------------------
7956 # Define a conditional.
7957 AC_DEFUN([AM_CONDITIONAL],
7959 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
7960 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7962 AC_SUBST([$1_FALSE])
7970 AC_CONFIG_COMMANDS_PRE(
7971 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7972 AC_MSG_ERROR([conditional "$1" was never defined.
7973 Usually this means the macro was only invoked conditionally.])
7976 # serial 7 -*- Autoconf -*-
7978 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
7979 # Free Software Foundation, Inc.
7981 # This program is free software; you can redistribute it and/or modify
7982 # it under the terms of the GNU General Public License as published by
7983 # the Free Software Foundation; either version 2, or (at your option)
7984 # any later version.
7986 # This program is distributed in the hope that it will be useful,
7987 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7988 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7989 # GNU General Public License for more details.
7991 # You should have received a copy of the GNU General Public License
7992 # along with this program; if not, write to the Free Software
7993 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7997 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7998 # written in clear, in which case automake, when reading aclocal.m4,
7999 # will think it sees a *use*, and therefore will trigger all it's
8000 # C support machinery. Also note that it means that autoscan, seeing
8001 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8005 # _AM_DEPENDENCIES(NAME)
8006 # ----------------------
8007 # See how the compiler implements dependency checking.
8008 # NAME is "CC", "CXX", "GCJ", or "OBJC".
8009 # We try a few techniques and use that to set a single cache variable.
8011 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8012 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8013 # dependency, and given that the user is not expected to run this macro,
8014 # just rely on AC_PROG_CC.
8015 AC_DEFUN([_AM_DEPENDENCIES],
8016 [AC_REQUIRE([AM_SET_DEPDIR])dnl
8017 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8018 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8019 AC_REQUIRE([AM_DEP_TRACK])dnl
8021 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
8022 [$1], CXX, [depcc="$CXX" am_compiler_list=],
8023 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8024 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
8025 [depcc="$$1" am_compiler_list=])
8027 AC_CACHE_CHECK([dependency style of $depcc],
8028 [am_cv_$1_dependencies_compiler_type],
8029 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8030 # We make a subdir and do the tests there. Otherwise we can end up
8031 # making bogus files that we don't know about and never remove. For
8032 # instance it was reported that on HP-UX the gcc test will end up
8033 # making a dummy file named `D' -- because `-MD' means `put the output
8036 # Copy depcomp to subdir because otherwise we won't find it if we're
8037 # using a relative directory.
8038 cp "$am_depcomp" conftest.dir
8040 # We will build objects and dependencies in a subdirectory because
8041 # it helps to detect inapplicable dependency modes. For instance
8042 # both Tru64's cc and ICC support -MD to output dependencies as a
8043 # side effect of compilation, but ICC will put the dependencies in
8044 # the current directory while Tru64 will put them in the object
8048 am_cv_$1_dependencies_compiler_type=none
8049 if test "$am_compiler_list" = ""; then
8050 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8052 for depmode in $am_compiler_list; do
8053 # Setup a source with many dependencies, because some compilers
8054 # like to wrap large dependency lists on column 80 (with \), and
8055 # we should not choose a depcomp mode which is confused by this.
8057 # We need to recreate these files for each test, as the compiler may
8058 # overwrite some of them when testing with obscure command lines.
8059 # This happens at least with the AIX C compiler.
8061 for i in 1 2 3 4 5 6; do
8062 echo '#include "conftst'$i'.h"' >> sub/conftest.c
8063 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8064 # Solaris 8's {/usr,}/bin/sh.
8065 touch sub/conftst$i.h
8067 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8071 # after this tag, mechanisms are not by side-effect, so they'll
8072 # only be used when explicitly requested
8073 if test "x$enable_dependency_tracking" = xyes; then
8081 # We check with `-c' and `-o' for the sake of the "dashmstdout"
8082 # mode. It turns out that the SunPro C++ compiler does not properly
8083 # handle `-M -o', and we need to detect this.
8084 if depmode=$depmode \
8085 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
8086 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8087 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
8088 >/dev/null 2>conftest.err &&
8089 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8090 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
8091 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8092 # icc doesn't choke on unknown options, it will just issue warnings
8093 # or remarks (even with -Werror). So we grep stderr for any message
8094 # that says an option was ignored or not supported.
8095 # When given -MP, icc 7.0 and 7.1 complain thusly:
8096 # icc: Command line warning: ignoring option '-M'; no argument required
8097 # The diagnosis changed in icc 8.0:
8098 # icc: Command line remark: option '-MP' not supported
8099 if (grep 'ignoring option' conftest.err ||
8100 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8101 am_cv_$1_dependencies_compiler_type=$depmode
8110 am_cv_$1_dependencies_compiler_type=none
8113 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8114 AM_CONDITIONAL([am__fastdep$1], [
8115 test "x$enable_dependency_tracking" != xno \
8116 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8122 # Choose a directory name for dependency files.
8123 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
8124 AC_DEFUN([AM_SET_DEPDIR],
8125 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8126 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8132 AC_DEFUN([AM_DEP_TRACK],
8133 [AC_ARG_ENABLE(dependency-tracking,
8134 [ --disable-dependency-tracking speeds up one-time build
8135 --enable-dependency-tracking do not reject slow dependency extractors])
8136 if test "x$enable_dependency_tracking" != xno; then
8137 am_depcomp="$ac_aux_dir/depcomp"
8140 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8141 AC_SUBST([AMDEPBACKSLASH])
8144 # Generate code to set up dependency tracking. -*- Autoconf -*-
8146 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
8148 # This program is free software; you can redistribute it and/or modify
8149 # it under the terms of the GNU General Public License as published by
8150 # the Free Software Foundation; either version 2, or (at your option)
8151 # any later version.
8153 # This program is distributed in the hope that it will be useful,
8154 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8155 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8156 # GNU General Public License for more details.
8158 # You should have received a copy of the GNU General Public License
8159 # along with this program; if not, write to the Free Software
8160 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8165 # _AM_OUTPUT_DEPENDENCY_COMMANDS
8166 # ------------------------------
8167 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8168 [for mf in $CONFIG_FILES; do
8169 # Strip MF so we end up with the name of the file.
8170 mf=`echo "$mf" | sed -e 's/:.*$//'`
8171 # Check whether this is an Automake generated Makefile or not.
8172 # We used to match only the files named `Makefile.in', but
8173 # some people rename them; so instead we look at the file content.
8174 # Grep'ing the first line is not enough: some people post-process
8175 # each Makefile.in and add a new line on top of each file to say so.
8176 # So let's grep whole file.
8177 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
8178 dirpart=`AS_DIRNAME("$mf")`
8182 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
8183 # Extract the definition of DEP_FILES from the Makefile without
8185 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8186 test -z "$DEPDIR" && continue
8187 # When using ansi2knr, U may be empty or an underscore; expand it
8188 U=`sed -n 's/^U = //p' < "$mf"`
8189 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
8190 # We invoke sed twice because it is the simplest approach to
8191 # changing $(DEPDIR) to its actual value in the expansion.
8192 for file in `sed -n '
8193 /^DEP_FILES = .*\\\\$/ {
8202 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
8203 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8204 # Make sure the directory exists.
8205 test -f "$dirpart/$file" && continue
8206 fdir=`AS_DIRNAME(["$file"])`
8207 AS_MKDIR_P([$dirpart/$fdir])
8208 # echo "creating $dirpart/$file"
8209 echo '# dummy' > "$dirpart/$file"
8212 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8215 # AM_OUTPUT_DEPENDENCY_COMMANDS
8216 # -----------------------------
8217 # This macro should only be invoked once -- use via AC_REQUIRE.
8219 # This code is only required when automatic dependency tracking
8220 # is enabled. FIXME. This creates each `.P' file that we will
8221 # need in order to bootstrap the dependency handling code.
8222 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8223 [AC_CONFIG_COMMANDS([depfiles],
8224 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8225 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8228 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
8230 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
8232 # This program is free software; you can redistribute it and/or modify
8233 # it under the terms of the GNU General Public License as published by
8234 # the Free Software Foundation; either version 2, or (at your option)
8235 # any later version.
8237 # This program is distributed in the hope that it will be useful,
8238 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8239 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8240 # GNU General Public License for more details.
8242 # You should have received a copy of the GNU General Public License
8243 # along with this program; if not, write to the Free Software
8244 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8249 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
8250 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
8252 # Do all the work for Automake. -*- Autoconf -*-
8254 # This macro actually does too much some checks are only needed if
8255 # your package does certain things. But this isn't really a big deal.
8257 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
8258 # Free Software Foundation, Inc.
8260 # This program is free software; you can redistribute it and/or modify
8261 # it under the terms of the GNU General Public License as published by
8262 # the Free Software Foundation; either version 2, or (at your option)
8263 # any later version.
8265 # This program is distributed in the hope that it will be useful,
8266 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8267 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8268 # GNU General Public License for more details.
8270 # You should have received a copy of the GNU General Public License
8271 # along with this program; if not, write to the Free Software
8272 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8277 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8278 # AM_INIT_AUTOMAKE([OPTIONS])
8279 # -----------------------------------------------
8280 # The call with PACKAGE and VERSION arguments is the old style
8281 # call (pre autoconf-2.50), which is being phased out. PACKAGE
8282 # and VERSION should now be passed to AC_INIT and removed from
8283 # the call to AM_INIT_AUTOMAKE.
8284 # We support both call styles for the transition. After
8285 # the next Automake release, Autoconf can make the AC_INIT
8286 # arguments mandatory, and then we can depend on a new Autoconf
8287 # release and drop the old call support.
8288 AC_DEFUN([AM_INIT_AUTOMAKE],
8289 [AC_PREREQ([2.58])dnl
8290 dnl Autoconf wants to disallow AM_ names. We explicitly allow
8291 dnl the ones we care about.
8292 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8293 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8294 AC_REQUIRE([AC_PROG_INSTALL])dnl
8295 # test to see if srcdir already configured
8296 if test "`cd $srcdir && pwd`" != "`pwd`" &&
8297 test -f $srcdir/config.status; then
8298 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8301 # test whether we have cygpath
8302 if test -z "$CYGPATH_W"; then
8303 if (cygpath --version) >/dev/null 2>/dev/null; then
8304 CYGPATH_W='cygpath -w'
8309 AC_SUBST([CYGPATH_W])
8311 # Define the identity of the package.
8312 dnl Distinguish between old-style and new-style calls.
8314 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8315 AC_SUBST([PACKAGE], [$1])dnl
8316 AC_SUBST([VERSION], [$2])],
8317 [_AM_SET_OPTIONS([$1])dnl
8318 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8319 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8321 _AM_IF_OPTION([no-define],,
8322 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8323 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8325 # Some tools Automake needs.
8326 AC_REQUIRE([AM_SANITY_CHECK])dnl
8327 AC_REQUIRE([AC_ARG_PROGRAM])dnl
8328 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8329 AM_MISSING_PROG(AUTOCONF, autoconf)
8330 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8331 AM_MISSING_PROG(AUTOHEADER, autoheader)
8332 AM_MISSING_PROG(MAKEINFO, makeinfo)
8333 AM_MISSING_PROG(AMTAR, tar)
8335 AM_PROG_INSTALL_STRIP
8336 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
8337 # We need awk for the "check" target. The system "awk" is bad on
8339 AC_REQUIRE([AC_PROG_AWK])dnl
8340 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8341 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8343 _AM_IF_OPTION([no-dependencies],,
8344 [AC_PROVIDE_IFELSE([AC_PROG_CC],
8345 [_AM_DEPENDENCIES(CC)],
8346 [define([AC_PROG_CC],
8347 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8348 AC_PROVIDE_IFELSE([AC_PROG_CXX],
8349 [_AM_DEPENDENCIES(CXX)],
8350 [define([AC_PROG_CXX],
8351 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8356 # When config.status generates a header, we must update the stamp-h file.
8357 # This file resides in the same directory as the config header
8358 # that is generated. The stamp files are numbered to have different names.
8360 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8361 # loop where config.status creates the headers, so we can generate
8362 # our stamp files there.
8363 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8364 [# Compute $1's index in $config_headers.
8366 for _am_header in $config_headers :; do
8371 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8374 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
8376 # AM_PROG_INSTALL_SH
8377 # ------------------
8378 # Define $install_sh.
8380 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
8382 # This program is free software; you can redistribute it and/or modify
8383 # it under the terms of the GNU General Public License as published by
8384 # the Free Software Foundation; either version 2, or (at your option)
8385 # any later version.
8387 # This program is distributed in the hope that it will be useful,
8388 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8389 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8390 # GNU General Public License for more details.
8392 # You should have received a copy of the GNU General Public License
8393 # along with this program; if not, write to the Free Software
8394 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8397 AC_DEFUN([AM_PROG_INSTALL_SH],
8398 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8399 install_sh=${install_sh-"$am_aux_dir/install-sh"}
8400 AC_SUBST(install_sh)])
8403 # Copyright (C) 2003 Free Software Foundation, Inc.
8405 # This program is free software; you can redistribute it and/or modify
8406 # it under the terms of the GNU General Public License as published by
8407 # the Free Software Foundation; either version 2, or (at your option)
8408 # any later version.
8410 # This program is distributed in the hope that it will be useful,
8411 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8412 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8413 # GNU General Public License for more details.
8415 # You should have received a copy of the GNU General Public License
8416 # along with this program; if not, write to the Free Software
8417 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8422 # Check whether the underlying file-system supports filenames
8423 # with a leading dot. For instance MS-DOS doesn't.
8424 AC_DEFUN([AM_SET_LEADING_DOT],
8425 [rm -rf .tst 2>/dev/null
8426 mkdir .tst 2>/dev/null
8427 if test -d .tst; then
8432 rmdir .tst 2>/dev/null
8433 AC_SUBST([am__leading_dot])])
8435 # Check to see how 'make' treats includes. -*- Autoconf -*-
8437 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
8439 # This program is free software; you can redistribute it and/or modify
8440 # it under the terms of the GNU General Public License as published by
8441 # the Free Software Foundation; either version 2, or (at your option)
8442 # any later version.
8444 # This program is distributed in the hope that it will be useful,
8445 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8446 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8447 # GNU General Public License for more details.
8449 # You should have received a copy of the GNU General Public License
8450 # along with this program; if not, write to the Free Software
8451 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8458 # Check to see how make treats includes.
8459 AC_DEFUN([AM_MAKE_INCLUDE],
8460 [am_make=${MAKE-make}
8461 cat > confinc << 'END'
8466 # If we don't find an include directive, just comment out the code.
8467 AC_MSG_CHECKING([for style of include used by $am_make])
8471 # First try GNU make style include.
8472 echo "include confinc" > confmf
8473 # We grep out `Entering directory' and `Leaving directory'
8474 # messages which can occur if `w' ends up in MAKEFLAGS.
8475 # In particular we don't look at `^make:' because GNU make might
8476 # be invoked under some other name (usually "gmake"), in which
8477 # case it prints its new name instead of `make'.
8478 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
8483 # Now try BSD make style include.
8484 if test "$am__include" = "#"; then
8485 echo '.include "confinc"' > confmf
8486 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
8487 am__include=.include
8492 AC_SUBST([am__include])
8493 AC_SUBST([am__quote])
8494 AC_MSG_RESULT([$_am_result])
8495 rm -f confinc confmf
8502 # Like AC_PROG_CC_C_O, but changed for automake.
8504 # Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
8506 # This program is free software; you can redistribute it and/or modify
8507 # it under the terms of the GNU General Public License as published by
8508 # the Free Software Foundation; either version 2, or (at your option)
8509 # any later version.
8511 # This program is distributed in the hope that it will be useful,
8512 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8513 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8514 # GNU General Public License for more details.
8516 # You should have received a copy of the GNU General Public License
8517 # along with this program; if not, write to the Free Software
8518 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8521 AC_DEFUN([AM_PROG_CC_C_O],
8522 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
8523 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8524 # FIXME: we rely on the cache variable name because
8525 # there is no other way.
8527 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
8528 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
8529 # Losing compiler, so override with the script.
8530 # FIXME: It is wrong to rewrite CC.
8531 # But if we don't then we get into trouble of one sort or another.
8532 # A longer-term fix would be to have automake use am__CC in this case,
8533 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8534 CC="$am_aux_dir/compile $CC"
8541 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
8543 # This program is free software; you can redistribute it and/or modify
8544 # it under the terms of the GNU General Public License as published by
8545 # the Free Software Foundation; either version 2, or (at your option)
8546 # any later version.
8548 # This program is distributed in the hope that it will be useful,
8549 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8550 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8551 # GNU General Public License for more details.
8553 # You should have received a copy of the GNU General Public License
8554 # along with this program; if not, write to the Free Software
8555 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8560 # AM_MISSING_PROG(NAME, PROGRAM)
8561 # ------------------------------
8562 AC_DEFUN([AM_MISSING_PROG],
8563 [AC_REQUIRE([AM_MISSING_HAS_RUN])
8564 $1=${$1-"${am_missing_run}$2"}
8568 # AM_MISSING_HAS_RUN
8569 # ------------------
8570 # Define MISSING if not defined so far and test if it supports --run.
8571 # If it does, set am_missing_run to use it, otherwise, to nothing.
8572 AC_DEFUN([AM_MISSING_HAS_RUN],
8573 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8574 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8575 # Use eval to expand $SHELL
8576 if eval "$MISSING --run true"; then
8577 am_missing_run="$MISSING --run "
8580 AC_MSG_WARN([`missing' script is too old or missing])
8586 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
8588 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
8590 # This program is free software; you can redistribute it and/or modify
8591 # it under the terms of the GNU General Public License as published by
8592 # the Free Software Foundation; either version 2, or (at your option)
8593 # any later version.
8595 # This program is distributed in the hope that it will be useful,
8596 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8597 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8598 # GNU General Public License for more details.
8600 # You should have received a copy of the GNU General Public License
8601 # along with this program; if not, write to the Free Software
8602 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8605 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
8606 # created by `make install' are always world readable, even if the
8607 # installer happens to have an overly restrictive umask (e.g. 077).
8608 # This was a mistake. There are at least two reasons why we must not
8610 # - it causes special bits like SGID to be ignored,
8611 # - it may be too restrictive (some setups expect 775 directories).
8613 # Do not use -m 0755 and let people choose whatever they expect by
8616 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
8617 # Some implementations (such as Solaris 8's) are not thread-safe: if a
8618 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
8619 # concurrently, both version can detect that a/ is missing, but only
8620 # one can create it and the other will error out. Consequently we
8621 # restrict ourselves to GNU make (using the --version option ensures
8623 AC_DEFUN([AM_PROG_MKDIR_P],
8624 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
8625 # Keeping the `.' argument allows $(mkdir_p) to be used without
8626 # argument. Indeed, we sometimes output rules like
8627 # $(mkdir_p) $(somedir)
8628 # where $(somedir) is conditionally defined.
8629 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
8630 # expensive solution, as it forces Make to start a sub-shell.)
8631 mkdir_p='mkdir -p -- .'
8633 # On NextStep and OpenStep, the `mkdir' command does not
8634 # recognize any option. It will interpret all options as
8635 # directories to create, and then abort because `.' already
8637 for d in ./-p ./--version;
8639 test -d $d && rmdir $d
8641 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
8642 if test -f "$ac_aux_dir/mkinstalldirs"; then
8643 mkdir_p='$(mkinstalldirs)'
8645 mkdir_p='$(install_sh) -d'
8648 AC_SUBST([mkdir_p])])
8650 # Helper functions for option handling. -*- Autoconf -*-
8652 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
8654 # This program is free software; you can redistribute it and/or modify
8655 # it under the terms of the GNU General Public License as published by
8656 # the Free Software Foundation; either version 2, or (at your option)
8657 # any later version.
8659 # This program is distributed in the hope that it will be useful,
8660 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8661 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8662 # GNU General Public License for more details.
8664 # You should have received a copy of the GNU General Public License
8665 # along with this program; if not, write to the Free Software
8666 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8671 # _AM_MANGLE_OPTION(NAME)
8672 # -----------------------
8673 AC_DEFUN([_AM_MANGLE_OPTION],
8674 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8676 # _AM_SET_OPTION(NAME)
8677 # ------------------------------
8678 # Set option NAME. Presently that only means defining a flag for this option.
8679 AC_DEFUN([_AM_SET_OPTION],
8680 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8682 # _AM_SET_OPTIONS(OPTIONS)
8683 # ----------------------------------
8684 # OPTIONS is a space-separated list of Automake options.
8685 AC_DEFUN([_AM_SET_OPTIONS],
8686 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8688 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8689 # -------------------------------------------
8690 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8691 AC_DEFUN([_AM_IF_OPTION],
8692 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8695 # Check to make sure that the build environment is sane.
8698 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
8700 # This program is free software; you can redistribute it and/or modify
8701 # it under the terms of the GNU General Public License as published by
8702 # the Free Software Foundation; either version 2, or (at your option)
8703 # any later version.
8705 # This program is distributed in the hope that it will be useful,
8706 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8707 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8708 # GNU General Public License for more details.
8710 # You should have received a copy of the GNU General Public License
8711 # along with this program; if not, write to the Free Software
8712 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8719 AC_DEFUN([AM_SANITY_CHECK],
8720 [AC_MSG_CHECKING([whether build environment is sane])
8723 echo timestamp > conftest.file
8724 # Do `set' in a subshell so we don't clobber the current shell's
8725 # arguments. Must try -L first in case configure is actually a
8726 # symlink; some systems play weird games with the mod time of symlinks
8727 # (eg FreeBSD returns the mod time of the symlink's containing
8730 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8731 if test "$[*]" = "X"; then
8733 set X `ls -t $srcdir/configure conftest.file`
8736 if test "$[*]" != "X $srcdir/configure conftest.file" \
8737 && test "$[*]" != "X conftest.file $srcdir/configure"; then
8739 # If neither matched, then we have a broken ls. This can happen
8740 # if, for instance, CONFIG_SHELL is bash and it inherits a
8741 # broken ls alias from the environment. This has actually
8742 # happened. Such a system could not be considered "sane".
8743 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8744 alias in your environment])
8747 test "$[2]" = conftest.file
8753 AC_MSG_ERROR([newly created file is older than distributed files!
8754 Check your system clock])
8756 AC_MSG_RESULT(yes)])
8758 # AM_PROG_INSTALL_STRIP
8760 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
8762 # This program is free software; you can redistribute it and/or modify
8763 # it under the terms of the GNU General Public License as published by
8764 # the Free Software Foundation; either version 2, or (at your option)
8765 # any later version.
8767 # This program is distributed in the hope that it will be useful,
8768 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8769 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8770 # GNU General Public License for more details.
8772 # You should have received a copy of the GNU General Public License
8773 # along with this program; if not, write to the Free Software
8774 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
8777 # One issue with vendor `install' (even GNU) is that you can't
8778 # specify the program used to strip binaries. This is especially
8779 # annoying in cross-compiling environments, where the build's strip
8780 # is unlikely to handle the host's binaries.
8781 # Fortunately install-sh will honor a STRIPPROG variable, so we
8782 # always use install-sh in `make install-strip', and initialize
8783 # STRIPPROG with the value of the STRIP variable (set by the user).
8784 AC_DEFUN([AM_PROG_INSTALL_STRIP],
8785 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8786 # Installed binaries are usually stripped using `strip' when the user
8787 # run `make install-strip'. However `strip' might not be the right
8788 # tool to use in cross-compilation environments, therefore Automake
8789 # will honor the `STRIP' environment variable to overrule this program.
8790 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8791 if test "$cross_compiling" != no; then
8792 AC_CHECK_TOOL([STRIP], [strip], :)
8794 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
8795 AC_SUBST([INSTALL_STRIP_PROGRAM])])
8797 m4_include([m4/pkg.m4])