1 dnl acinclude.m4 - configure macros used by pacman and libalpm
2 dnl The majority of this file is the libtool macros we use, kept here so
3 dnl we are not dependent on the host-system version of the macros. There
4 dnl are some pacman/libalpm specific macros at the end of the file as well.
6 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
7 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007
8 ## Free Software Foundation, Inc.
9 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11 ## This file is free software; the Free Software Foundation gives
12 ## unlimited permission to copy and/or distribute it, with or without
13 ## modifications, as long as this notice is preserved.
15 # serial 51 AC_PROG_LIBTOOL
18 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
19 # -----------------------------------------------------------
20 # If this macro is not defined by Autoconf, define it here.
21 m4_ifdef([AC_PROVIDE_IFELSE],
23 [m4_define([AC_PROVIDE_IFELSE],
24 [m4_ifdef([AC_PROVIDE_$1],
30 AC_DEFUN([AC_PROG_LIBTOOL],
31 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
37 AC_DEFUN([_AC_PROG_LIBTOOL],
38 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
40 # This can be used to rebuild libtool when needed
41 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
43 # Always use our own libtool.
44 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
47 # Prevent multiple expansion
48 define([AC_PROG_LIBTOOL], [])
54 AC_DEFUN([AC_LIBTOOL_SETUP],
56 AC_REQUIRE([AC_ENABLE_SHARED])dnl
57 AC_REQUIRE([AC_ENABLE_STATIC])dnl
58 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
59 AC_REQUIRE([AC_CANONICAL_HOST])dnl
60 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
61 AC_REQUIRE([AC_PROG_CC])dnl
62 AC_REQUIRE([AC_PROG_LD])dnl
63 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
64 AC_REQUIRE([AC_PROG_NM])dnl
66 AC_REQUIRE([AC_PROG_LN_S])dnl
67 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
68 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
69 AC_REQUIRE([AC_OBJEXT])dnl
70 AC_REQUIRE([AC_EXEEXT])dnl
73 AC_LIBTOOL_SYS_MAX_CMD_LEN
74 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
77 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
78 _LT_AC_PROG_ECHO_BACKSLASH
82 # AIX sometimes has problems with the GCC collect2 program. For some
83 # reason, if we set the COLLECT_NAMES environment variable, the problems
84 # vanish in a puff of smoke.
85 if test "X${COLLECT_NAMES+set}" != Xset; then
92 # Sed substitution that helps us do robust quoting. It backslashifies
93 # metacharacters that are still active within double-quoted strings.
95 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
97 # Same as above, but do not quote variable references.
98 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
100 # Sed substitution to delay expansion of an escaped shell variable in a
101 # double_quote_subst'ed string.
102 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
104 # Sed substitution to avoid accidental globbing in evaled expressions
105 no_glob_subst='s/\*/\\\*/g'
111 default_ofile=libtool
114 # All known linkers require a `.a' archive for static linking (except MSVC,
115 # which needs '.lib').
117 ltmain="$ac_aux_dir/ltmain.sh"
118 ofile="$default_ofile"
119 with_gnu_ld="$lt_cv_prog_gnu_ld"
121 AC_CHECK_TOOL(AR, ar, false)
122 AC_CHECK_TOOL(RANLIB, ranlib, :)
123 AC_CHECK_TOOL(STRIP, strip, :)
128 # Set sane defaults for various variables
129 test -z "$AR" && AR=ar
130 test -z "$AR_FLAGS" && AR_FLAGS=cru
131 test -z "$AS" && AS=as
132 test -z "$CC" && CC=cc
133 test -z "$LTCC" && LTCC=$CC
134 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
135 test -z "$DLLTOOL" && DLLTOOL=dlltool
136 test -z "$LD" && LD=ld
137 test -z "$LN_S" && LN_S="ln -s"
138 test -z "$MAGIC_CMD" && MAGIC_CMD=file
139 test -z "$NM" && NM=nm
140 test -z "$SED" && SED=sed
141 test -z "$OBJDUMP" && OBJDUMP=objdump
142 test -z "$RANLIB" && RANLIB=:
143 test -z "$STRIP" && STRIP=:
144 test -z "$ac_objext" && ac_objext=o
146 # Determine commands to create old-style static archives.
147 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
148 old_postinstall_cmds='chmod 644 $oldlib'
149 old_postuninstall_cmds=
151 if test -n "$RANLIB"; then
154 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
157 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
160 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
163 _LT_CC_BASENAME([$compiler])
165 # Only perform the check for file, if the check method requires it
166 case $deplibs_check_method in
168 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
174 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
175 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
176 enable_win32_dll=yes, enable_win32_dll=no)
178 AC_ARG_ENABLE([libtool-lock],
179 [AC_HELP_STRING([--disable-libtool-lock],
180 [avoid locking (might break parallel builds)])])
181 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
184 [AC_HELP_STRING([--with-pic],
185 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
186 [pic_mode="$withval"],
188 test -z "$pic_mode" && pic_mode=default
190 # Use C for the default configuration in the libtool script
192 AC_LIBTOOL_LANG_C_CONFIG
197 # _LT_AC_SYS_COMPILER
198 # -------------------
199 AC_DEFUN([_LT_AC_SYS_COMPILER],
200 [AC_REQUIRE([AC_PROG_CC])dnl
202 # If no C compiler was specified, use CC.
205 # If no C compiler flags were specified, use CFLAGS.
206 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
208 # Allow CC to be a program name with arguments.
210 ])# _LT_AC_SYS_COMPILER
213 # _LT_CC_BASENAME(CC)
214 # -------------------
215 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
216 AC_DEFUN([_LT_CC_BASENAME],
217 [for cc_temp in $1""; do
219 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
220 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
225 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
229 # _LT_COMPILER_BOILERPLATE
230 # ------------------------
231 # Check for compiler boilerplate output or warnings with
232 # the simple compiler test code.
233 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
234 [AC_REQUIRE([LT_AC_PROG_SED])dnl
235 ac_outfile=conftest.$ac_objext
236 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
237 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
238 _lt_compiler_boilerplate=`cat conftest.err`
240 ])# _LT_COMPILER_BOILERPLATE
243 # _LT_LINKER_BOILERPLATE
244 # ----------------------
245 # Check for linker boilerplate output or warnings with
246 # the simple link test code.
247 AC_DEFUN([_LT_LINKER_BOILERPLATE],
248 [AC_REQUIRE([LT_AC_PROG_SED])dnl
249 ac_outfile=conftest.$ac_objext
250 echo "$lt_simple_link_test_code" >conftest.$ac_ext
251 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
252 _lt_linker_boilerplate=`cat conftest.err`
254 ])# _LT_LINKER_BOILERPLATE
257 # _LT_AC_SYS_LIBPATH_AIX
258 # ----------------------
259 # Links a minimal program and checks the executable
260 # for the system default hardcoded library path. In most cases,
261 # this is /usr/lib:/lib, but when the MPI compilers are used
262 # the location of the communication and MPI libs are included too.
263 # If we don't find anything, use the default library path according
264 # to the aix ld manual.
265 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
266 [AC_REQUIRE([LT_AC_PROG_SED])dnl
267 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
269 /Import File Strings/,/^$/ {
275 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
276 # Check for a 64-bit object if we didn't find anything.
277 if test -z "$aix_libpath"; then
278 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
280 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
281 ])# _LT_AC_SYS_LIBPATH_AIX
284 # _LT_AC_SHELL_INIT(ARG)
285 # ----------------------
286 AC_DEFUN([_LT_AC_SHELL_INIT],
287 [ifdef([AC_DIVERSION_NOTICE],
288 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
289 [AC_DIVERT_PUSH(NOTICE)])
292 ])# _LT_AC_SHELL_INIT
295 # _LT_AC_PROG_ECHO_BACKSLASH
296 # --------------------------
297 # Add some code to the start of the generated configure script which
298 # will find an echo command which doesn't interpret backslashes.
299 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
301 # Check that we are running under the correct shell.
302 SHELL=${CONFIG_SHELL-/bin/sh}
306 # Remove one level of quotation (which was required for Make).
307 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
312 if test "X[$]1" = X--no-reexec; then
313 # Discard the --no-reexec flag, and continue.
315 elif test "X[$]1" = X--fallback-echo; then
316 # Avoid inline document here, it may be left over
318 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
319 # Yippee, $echo works!
322 # Restart under the correct shell.
323 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
326 if test "X[$]1" = X--fallback-echo; then
327 # used as fallback echo
335 # The HP-UX ksh and POSIX shell print the target directory to stdout
337 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
339 if test -z "$ECHO"; then
340 if test "X${echo_test_string+set}" != Xset; then
341 # find a string as large as possible, as long as the shell can cope with it
342 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
343 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
344 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
345 echo_test_string=`eval $cmd` &&
346 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
353 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
354 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
355 test "X$echo_testing_string" = "X$echo_test_string"; then
358 # The Solaris, AIX, and Digital Unix default echo programs unquote
359 # backslashes. This makes it impossible to quote backslashes using
360 # echo "$something" | sed 's/\\/\\\\/g'
362 # So, first we look for a working echo in the user's PATH.
364 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
365 for dir in $PATH /usr/ucb; do
367 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
368 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
369 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
370 test "X$echo_testing_string" = "X$echo_test_string"; then
377 if test "X$echo" = Xecho; then
378 # We didn't find a better echo, so look for alternatives.
379 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
380 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
381 test "X$echo_testing_string" = "X$echo_test_string"; then
382 # This shell has a builtin print -r that does the trick.
384 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
385 test "X$CONFIG_SHELL" != X/bin/ksh; then
386 # If we have ksh, try running configure again with it.
387 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
388 export ORIGINAL_CONFIG_SHELL
389 CONFIG_SHELL=/bin/ksh
391 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
395 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
396 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
397 test "X$echo_testing_string" = "X$echo_test_string"; then
400 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
401 test "X$echo_testing_string" = 'X\t' &&
402 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
403 test "X$echo_testing_string" = "X$echo_test_string"; then
404 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
406 SHELL="$CONFIG_SHELL"
408 echo="$CONFIG_SHELL [$]0 --fallback-echo"
409 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
410 test "X$echo_testing_string" = 'X\t' &&
411 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
412 test "X$echo_testing_string" = "X$echo_test_string"; then
413 echo="$CONFIG_SHELL [$]0 --fallback-echo"
415 # maybe with a smaller string...
418 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
419 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
426 if test "$prev" != 'sed 50q "[$]0"'; then
427 echo_test_string=`eval $prev`
428 export echo_test_string
429 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
431 # Oops. We lost completely, so just stick with echo.
440 # Copy echo and quote the copy suitably for passing to libtool from
441 # the Makefile, instead of quoting the original, which is used later.
443 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
444 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
448 ])])# _LT_AC_PROG_ECHO_BACKSLASH
453 AC_DEFUN([_LT_AC_LOCK],
454 [AC_ARG_ENABLE([libtool-lock],
455 [AC_HELP_STRING([--disable-libtool-lock],
456 [avoid locking (might break parallel builds)])])
457 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
459 # Some flags need to be propagated to the compiler or linker for good
463 # Find out which ABI we are using.
464 echo 'int i;' > conftest.$ac_ext
465 if AC_TRY_EVAL(ac_compile); then
466 case `/usr/bin/file conftest.$ac_objext` in
478 # Find out which ABI we are using.
479 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
480 if AC_TRY_EVAL(ac_compile); then
481 if test "$lt_cv_prog_gnu_ld" = yes; then
482 case `/usr/bin/file conftest.$ac_objext` in
484 LD="${LD-ld} -melf32bsmip"
487 LD="${LD-ld} -melf32bmipn32"
490 LD="${LD-ld} -melf64bmip"
494 case `/usr/bin/file conftest.$ac_objext` in
510 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
511 s390*-*linux*|sparc*-*linux*)
512 # Find out which ABI we are using.
513 echo 'int i;' > conftest.$ac_ext
514 if AC_TRY_EVAL(ac_compile); then
515 case `/usr/bin/file conftest.o` in
518 x86_64-*kfreebsd*-gnu)
519 LD="${LD-ld} -m elf_i386_fbsd"
522 LD="${LD-ld} -m elf_i386"
524 ppc64-*linux*|powerpc64-*linux*)
525 LD="${LD-ld} -m elf32ppclinux"
528 LD="${LD-ld} -m elf_s390"
531 LD="${LD-ld} -m elf32_sparc"
537 x86_64-*kfreebsd*-gnu)
538 LD="${LD-ld} -m elf_x86_64_fbsd"
541 LD="${LD-ld} -m elf_x86_64"
543 ppc*-*linux*|powerpc*-*linux*)
544 LD="${LD-ld} -m elf64ppc"
547 LD="${LD-ld} -m elf64_s390"
550 LD="${LD-ld} -m elf64_sparc"
560 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
561 SAVE_CFLAGS="$CFLAGS"
562 CFLAGS="$CFLAGS -belf"
563 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
565 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
567 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
568 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
569 CFLAGS="$SAVE_CFLAGS"
573 # Find out which ABI we are using.
574 echo 'int i;' > conftest.$ac_ext
575 if AC_TRY_EVAL(ac_compile); then
576 case `/usr/bin/file conftest.o` in
578 case $lt_cv_prog_gnu_ld in
579 yes*) LD="${LD-ld} -m elf64_sparc" ;;
580 *) LD="${LD-ld} -64" ;;
588 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
589 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
590 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
591 AC_CHECK_TOOL(AS, as, false)
592 AC_CHECK_TOOL(OBJDUMP, objdump, false)
597 need_locks="$enable_libtool_lock"
602 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
603 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
604 # ----------------------------------------------------------------
605 # Check whether the given compiler option works
606 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
607 [AC_REQUIRE([LT_AC_PROG_SED])
608 AC_CACHE_CHECK([$1], [$2],
610 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
611 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
612 lt_compiler_flag="$3"
613 # Insert the option either (1) after the last *FLAGS variable, or
614 # (2) before a word containing "conftest.", or (3) at the end.
615 # Note that $ac_compile itself does not contain backslashes and begins
616 # with a dollar sign (not a hyphen), so the echo should work correctly.
617 # The option is referenced via a variable to avoid confusing sed.
618 lt_compile=`echo "$ac_compile" | $SED \
619 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
620 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
621 -e 's:$: $lt_compiler_flag:'`
622 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
623 (eval "$lt_compile" 2>conftest.err)
625 cat conftest.err >&AS_MESSAGE_LOG_FD
626 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
627 if (exit $ac_status) && test -s "$ac_outfile"; then
628 # The compiler can only warn and ignore the option if not recognized
629 # So say no if there are warnings other than the usual output.
630 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
631 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
632 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
639 if test x"[$]$2" = xyes; then
640 ifelse([$5], , :, [$5])
642 ifelse([$6], , :, [$6])
644 ])# AC_LIBTOOL_COMPILER_OPTION
647 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
648 # [ACTION-SUCCESS], [ACTION-FAILURE])
649 # ------------------------------------------------------------
650 # Check whether the given compiler option works
651 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
652 [AC_REQUIRE([LT_AC_PROG_SED])dnl
653 AC_CACHE_CHECK([$1], [$2],
655 save_LDFLAGS="$LDFLAGS"
656 LDFLAGS="$LDFLAGS $3"
657 echo "$lt_simple_link_test_code" > conftest.$ac_ext
658 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
659 # The linker can only warn and ignore the option if not recognized
660 # So say no if there are warnings
661 if test -s conftest.err; then
662 # Append any errors to the config.log.
663 cat conftest.err 1>&AS_MESSAGE_LOG_FD
664 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
665 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
666 if diff conftest.exp conftest.er2 >/dev/null; then
674 LDFLAGS="$save_LDFLAGS"
677 if test x"[$]$2" = xyes; then
678 ifelse([$4], , :, [$4])
680 ifelse([$5], , :, [$5])
682 ])# AC_LIBTOOL_LINKER_OPTION
685 # AC_LIBTOOL_SYS_MAX_CMD_LEN
686 # --------------------------
687 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
688 [# find the maximum length of command line arguments
689 AC_MSG_CHECKING([the maximum length of command line arguments])
690 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
696 # On DJGPP, this test can blow up pretty badly due to problems in libc
697 # (any single argument exceeding 2000 bytes causes a buffer overrun
698 # during glob expansion). Even if it were fixed, the result of this
699 # check would be larger than it should be.
700 lt_cv_sys_max_cmd_len=12288; # 12K is about right
704 # Under GNU Hurd, this test is not required because there is
705 # no limit to the length of command line arguments.
706 # Libtool will interpret -1 as no limit whatsoever
707 lt_cv_sys_max_cmd_len=-1;
711 # On Win9x/ME, this test blows up -- it succeeds, but takes
712 # about 5 minutes as the teststring grows exponentially.
713 # Worse, since 9x/ME are not pre-emptively multitasking,
714 # you end up with a "frozen" computer, even though with patience
715 # the test eventually succeeds (with a max line length of 256k).
716 # Instead, let's just punt: use the minimum linelength reported by
717 # all of the supported platforms: 8192 (on NT/2K/XP).
718 lt_cv_sys_max_cmd_len=8192;
722 # On AmigaOS with pdksh, this test takes hours, literally.
723 # So we just punt and use a minimum line length of 8192.
724 lt_cv_sys_max_cmd_len=8192;
727 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
728 # This has been around since 386BSD, at least. Likely further.
729 if test -x /sbin/sysctl; then
730 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
731 elif test -x /usr/sbin/sysctl; then
732 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
734 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
736 # And add a safety zone
737 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
738 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
742 # We know the value 262144 and hardcode it with a safety zone (like BSD)
743 lt_cv_sys_max_cmd_len=196608
747 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
748 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
749 # nice to cause kernel panics so lets avoid the loop below.
750 # First set a reasonable default.
751 lt_cv_sys_max_cmd_len=16384
753 if test -x /sbin/sysconfig; then
754 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
755 *1*) lt_cv_sys_max_cmd_len=-1 ;;
760 lt_cv_sys_max_cmd_len=102400
762 sysv5* | sco5v6* | sysv4.2uw2*)
763 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
764 if test -n "$kargmax"; then
765 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
767 lt_cv_sys_max_cmd_len=32768
771 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
772 if test -n "$lt_cv_sys_max_cmd_len"; then
773 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
774 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
777 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
778 = "XX$teststring") >/dev/null 2>&1 &&
779 new_result=`expr "X$teststring" : ".*" 2>&1` &&
780 lt_cv_sys_max_cmd_len=$new_result &&
781 test $i != 17 # 1/2 MB should be enough
784 teststring=$teststring$teststring
787 # Add a significant safety factor because C++ compilers can tack on massive
788 # amounts of additional arguments before passing them to the linker.
789 # It appears as though 1/2 is a usable value.
790 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
795 if test -n $lt_cv_sys_max_cmd_len ; then
796 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
800 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
805 AC_DEFUN([_LT_AC_CHECK_DLFCN],
806 [AC_CHECK_HEADERS(dlfcn.h)dnl
807 ])# _LT_AC_CHECK_DLFCN
810 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
811 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
812 # ---------------------------------------------------------------------
813 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
814 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
815 if test "$cross_compiling" = yes; then :
818 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
819 lt_status=$lt_dlunknown
820 cat > conftest.$ac_ext <<EOF
821 [#line __oline__ "configure"
822 #include "confdefs.h"
831 # define LT_DLGLOBAL RTLD_GLOBAL
834 # define LT_DLGLOBAL DL_GLOBAL
836 # define LT_DLGLOBAL 0
840 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
841 find out it does not work in some platform. */
842 #ifndef LT_DLLAZY_OR_NOW
844 # define LT_DLLAZY_OR_NOW RTLD_LAZY
847 # define LT_DLLAZY_OR_NOW DL_LAZY
850 # define LT_DLLAZY_OR_NOW RTLD_NOW
853 # define LT_DLLAZY_OR_NOW DL_NOW
855 # define LT_DLLAZY_OR_NOW 0
863 extern "C" void exit (int);
866 void fnord() { int i=42;}
869 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
870 int status = $lt_dlunknown;
874 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
875 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
876 /* dlclose (self); */
884 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
885 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
888 x$lt_dlno_uscore) $1 ;;
889 x$lt_dlneed_uscore) $2 ;;
890 x$lt_dlunknown|x*) $3 ;;
898 ])# _LT_AC_TRY_DLOPEN_SELF
901 # AC_LIBTOOL_DLOPEN_SELF
902 # ----------------------
903 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
904 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
905 if test "x$enable_dlopen" != xyes; then
906 enable_dlopen=unknown
907 enable_dlopen_self=unknown
908 enable_dlopen_self_static=unknown
915 lt_cv_dlopen="load_add_on"
917 lt_cv_dlopen_self=yes
921 lt_cv_dlopen="LoadLibrary"
926 lt_cv_dlopen="dlopen"
931 # if libdl is installed we need to link against it
932 AC_CHECK_LIB([dl], [dlopen],
933 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
936 lt_cv_dlopen_self=yes
941 AC_CHECK_FUNC([shl_load],
942 [lt_cv_dlopen="shl_load"],
943 [AC_CHECK_LIB([dld], [shl_load],
944 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
945 [AC_CHECK_FUNC([dlopen],
946 [lt_cv_dlopen="dlopen"],
947 [AC_CHECK_LIB([dl], [dlopen],
948 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
949 [AC_CHECK_LIB([svld], [dlopen],
950 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
951 [AC_CHECK_LIB([dld], [dld_link],
952 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
961 if test "x$lt_cv_dlopen" != xno; then
967 case $lt_cv_dlopen in
969 save_CPPFLAGS="$CPPFLAGS"
970 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
972 save_LDFLAGS="$LDFLAGS"
973 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
976 LIBS="$lt_cv_dlopen_libs $LIBS"
978 AC_CACHE_CHECK([whether a program can dlopen itself],
979 lt_cv_dlopen_self, [dnl
980 _LT_AC_TRY_DLOPEN_SELF(
981 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
982 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
985 if test "x$lt_cv_dlopen_self" = xyes; then
986 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
987 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
988 lt_cv_dlopen_self_static, [dnl
989 _LT_AC_TRY_DLOPEN_SELF(
990 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
991 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
995 CPPFLAGS="$save_CPPFLAGS"
996 LDFLAGS="$save_LDFLAGS"
1001 case $lt_cv_dlopen_self in
1002 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1003 *) enable_dlopen_self=unknown ;;
1006 case $lt_cv_dlopen_self_static in
1007 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1008 *) enable_dlopen_self_static=unknown ;;
1011 ])# AC_LIBTOOL_DLOPEN_SELF
1014 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1015 # ---------------------------------
1016 # Check to see if options -c and -o are simultaneously supported by compiler
1017 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1018 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1019 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1020 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1021 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1022 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1023 $rm -r conftest 2>/dev/null
1027 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1029 lt_compiler_flag="-o out/conftest2.$ac_objext"
1030 # Insert the option either (1) after the last *FLAGS variable, or
1031 # (2) before a word containing "conftest.", or (3) at the end.
1032 # Note that $ac_compile itself does not contain backslashes and begins
1033 # with a dollar sign (not a hyphen), so the echo should work correctly.
1034 lt_compile=`echo "$ac_compile" | $SED \
1035 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1036 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1037 -e 's:$: $lt_compiler_flag:'`
1038 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1039 (eval "$lt_compile" 2>out/conftest.err)
1041 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1042 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1043 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1045 # The compiler can only warn and ignore the option if not recognized
1046 # So say no if there are warnings
1047 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1048 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1049 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1050 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1053 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1055 # SGI C++ compiler will create directory out/ii_files/ for
1056 # template instantiation
1057 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1058 $rm out/* && rmdir out
1063 ])# AC_LIBTOOL_PROG_CC_C_O
1066 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1067 # -----------------------------------------
1068 # Check to see if we can do hard links to lock some files if needed
1069 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1070 [AC_REQUIRE([_LT_AC_LOCK])dnl
1072 hard_links="nottested"
1073 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1074 # do not overwrite the value of need_locks provided by the user
1075 AC_MSG_CHECKING([if we can lock with hard links])
1078 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1080 ln conftest.a conftest.b 2>&5 || hard_links=no
1081 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1082 AC_MSG_RESULT([$hard_links])
1083 if test "$hard_links" = no; then
1084 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1090 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1095 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1096 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1097 [rm -f .libs 2>/dev/null
1098 mkdir .libs 2>/dev/null
1099 if test -d .libs; then
1102 # MS-DOS does not allow filenames that begin with a dot.
1105 rmdir .libs 2>/dev/null])
1106 objdir=$lt_cv_objdir
1107 ])# AC_LIBTOOL_OBJDIR
1110 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1111 # ----------------------------------------------
1112 # Check hardcoding attributes.
1113 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1114 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1115 _LT_AC_TAGVAR(hardcode_action, $1)=
1116 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1117 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1118 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1120 # We can hardcode non-existant directories.
1121 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1122 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1123 # have to relink, otherwise we might link with an installed library
1124 # when we should be linking with a yet-to-be-installed one
1125 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1126 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1127 # Linking always hardcodes the temporary library directory.
1128 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1130 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1131 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1134 # We cannot hardcode anything, or else we can only hardcode existing
1136 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1138 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1140 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1141 # Fast installation is not supported
1142 enable_fast_install=no
1143 elif test "$shlibpath_overrides_runpath" = yes ||
1144 test "$enable_shared" = no; then
1145 # Fast installation is not necessary
1146 enable_fast_install=needless
1148 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1151 # AC_LIBTOOL_SYS_LIB_STRIP
1152 # ------------------------
1153 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1156 AC_MSG_CHECKING([whether stripping libraries is possible])
1157 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1158 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1159 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1160 AC_MSG_RESULT([yes])
1162 # FIXME - insert some real tests, host_os isn't really good enough
1165 if test -n "$STRIP" ; then
1166 striplib="$STRIP -x"
1167 old_striplib="$STRIP -S"
1168 AC_MSG_RESULT([yes])
1178 ])# AC_LIBTOOL_SYS_LIB_STRIP
1181 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1182 # -----------------------------
1183 # PORTME Fill in your ld.so characteristics
1184 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1185 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1186 AC_MSG_CHECKING([dynamic linker characteristics])
1188 libname_spec='lib$name'
1196 shlibpath_overrides_runpath=unknown
1198 dynamic_linker="$host_os ld.so"
1199 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1201 if test "$GCC" = yes; then
1203 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1204 *) lt_awk_arg="/^libraries:/" ;;
1206 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1207 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1208 # if the path contains ";" then we assume it to be the separator
1209 # otherwise default to the standard path separator (i.e. ":") - it is
1210 # assumed that no part of a normal pathname contains ";" but that should
1211 # okay in the real world where ";" in dirpaths is itself problematic.
1212 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1214 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1216 # Ok, now we have the path, separated by spaces, we can step through it
1217 # and add multilib dir if necessary.
1218 lt_tmp_lt_search_path_spec=
1219 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1220 for lt_sys_path in $lt_search_path_spec; do
1221 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1222 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1224 test -d "$lt_sys_path" && \
1225 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1228 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1229 BEGIN {RS=" "; FS="/|\n";} {
1232 for (lt_i = NF; lt_i > 0; lt_i--) {
1233 if ($lt_i != "" && $lt_i != ".") {
1234 if ($lt_i == "..") {
1237 if (lt_count == 0) {
1238 lt_foo="/" $lt_i lt_foo;
1245 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1246 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1248 sys_lib_search_path_spec=`echo $lt_search_path_spec`
1250 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1252 need_lib_prefix=unknown
1253 hardcode_into_libs=no
1255 # when you set need_version to no, make sure it does not cause -set_version
1256 # flags to be left without arguments
1257 need_version=unknown
1262 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1263 shlibpath_var=LIBPATH
1265 # AIX 3 has no versioning support, so we append a major version to the name.
1266 soname_spec='${libname}${release}${shared_ext}$major'
1273 hardcode_into_libs=yes
1274 if test "$host_cpu" = ia64; then
1275 # AIX 5 supports IA64
1276 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1277 shlibpath_var=LD_LIBRARY_PATH
1279 # With GCC up to 2.95.x, collect2 would create an import file
1280 # for dependence libraries. The import file would start with
1281 # the line `#! .'. This would cause the generated library to
1282 # depend on `.', always an invalid library. This was fixed in
1283 # development snapshots of GCC prior to 3.0.
1285 aix4 | aix4.[[01]] | aix4.[[01]].*)
1286 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1288 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1295 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1296 # soname into executable. Probably we can add versioning support to
1297 # collect2, so additional links can be useful in future.
1298 if test "$aix_use_runtimelinking" = yes; then
1299 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1300 # instead of lib<name>.a to let people know that these are not
1301 # typical AIX shared libraries.
1302 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1304 # We preserve .a as extension for shared libraries through AIX4.2
1305 # and later when we are not doing run time linking.
1306 library_names_spec='${libname}${release}.a $libname.a'
1307 soname_spec='${libname}${release}${shared_ext}$major'
1309 shlibpath_var=LIBPATH
1314 library_names_spec='$libname.ixlibrary $libname.a'
1315 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1316 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'
1320 library_names_spec='${libname}${shared_ext}'
1321 dynamic_linker="$host_os ld.so"
1322 shlibpath_var=LIBRARY_PATH
1328 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1329 soname_spec='${libname}${release}${shared_ext}$major'
1330 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1331 shlibpath_var=LD_LIBRARY_PATH
1332 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1333 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1334 # the default ld.so.conf also contains /usr/contrib/lib and
1335 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1336 # libtool to hard-code these into programs
1339 cygwin* | mingw* | pw32*)
1340 version_type=windows
1345 case $GCC,$host_os in
1346 yes,cygwin* | yes,mingw* | yes,pw32*)
1347 library_names_spec='$libname.dll.a'
1348 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1349 postinstall_cmds='base_file=`basename \${file}`~
1350 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1351 dldir=$destdir/`dirname \$dlpath`~
1352 test -d \$dldir || mkdir -p \$dldir~
1353 $install_prog $dir/$dlname \$dldir/$dlname~
1354 chmod a+x \$dldir/$dlname'
1355 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1356 dlpath=$dir/\$dldll~
1358 shlibpath_overrides_runpath=yes
1362 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1363 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1364 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1367 # MinGW DLLs use traditional 'lib' prefix
1368 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1369 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1370 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1371 # It is most probably a Windows format PATH printed by
1372 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1373 # path with ; separators, and with drive letters. We can handle the
1374 # drive letters (cygwin fileutils understands them), so leave them,
1375 # especially as we might pass files found there to a mingw objdump,
1376 # which wouldn't understand a cygwinified path. Ahh.
1377 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1379 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1383 # pw32 DLLs use 'pw' prefix rather than 'lib'
1384 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1390 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1393 dynamic_linker='Win32 ld.exe'
1394 # FIXME: first we should search . and the directory the executable is in
1398 darwin* | rhapsody*)
1399 dynamic_linker="$host_os dyld"
1403 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1404 soname_spec='${libname}${release}${major}$shared_ext'
1405 shlibpath_overrides_runpath=yes
1406 shlibpath_var=DYLD_LIBRARY_PATH
1407 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1409 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1410 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1418 soname_spec='${libname}${release}${shared_ext}$major'
1419 shlibpath_var=LD_LIBRARY_PATH
1426 freebsd* | dragonfly*)
1427 # DragonFly does not have aout. When/if they implement a new
1428 # versioning mechanism, adjust this.
1429 if test -x /usr/bin/objformat; then
1430 objformat=`/usr/bin/objformat`
1433 freebsd[[123]]*) objformat=aout ;;
1437 version_type=freebsd-$objformat
1438 case $version_type in
1440 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1445 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1449 shlibpath_var=LD_LIBRARY_PATH
1452 shlibpath_overrides_runpath=yes
1454 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1455 shlibpath_overrides_runpath=yes
1456 hardcode_into_libs=yes
1458 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1459 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1460 shlibpath_overrides_runpath=no
1461 hardcode_into_libs=yes
1463 *) # from 4.6 on, and DragonFly
1464 shlibpath_overrides_runpath=yes
1465 hardcode_into_libs=yes
1474 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1475 soname_spec='${libname}${release}${shared_ext}$major'
1476 shlibpath_var=LD_LIBRARY_PATH
1477 hardcode_into_libs=yes
1480 hpux9* | hpux10* | hpux11*)
1481 # Give a soname corresponding to the major version so that dld.sl refuses to
1482 # link against other versions.
1489 hardcode_into_libs=yes
1490 dynamic_linker="$host_os dld.so"
1491 shlibpath_var=LD_LIBRARY_PATH
1492 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1494 soname_spec='${libname}${release}${shared_ext}$major'
1495 if test "X$HPUX_IA64_MODE" = X32; then
1496 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1498 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1500 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1504 hardcode_into_libs=yes
1505 dynamic_linker="$host_os dld.sl"
1506 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1507 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1509 soname_spec='${libname}${release}${shared_ext}$major'
1510 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1511 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1515 dynamic_linker="$host_os dld.sl"
1516 shlibpath_var=SHLIB_PATH
1517 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1518 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1519 soname_spec='${libname}${release}${shared_ext}$major'
1522 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1523 postinstall_cmds='chmod 555 $lib'
1530 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1531 soname_spec='${libname}${release}${shared_ext}$major'
1532 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1533 shlibpath_var=LD_LIBRARY_PATH
1534 shlibpath_overrides_runpath=no
1535 hardcode_into_libs=yes
1538 irix5* | irix6* | nonstopux*)
1540 nonstopux*) version_type=nonstopux ;;
1542 if test "$lt_cv_prog_gnu_ld" = yes; then
1550 soname_spec='${libname}${release}${shared_ext}$major'
1551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1553 irix5* | nonstopux*)
1557 case $LD in # libtool.m4 will add one of these switches to LD
1558 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1559 libsuff= shlibsuff= libmagic=32-bit;;
1560 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1561 libsuff=32 shlibsuff=N32 libmagic=N32;;
1562 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1563 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1564 *) libsuff= shlibsuff= libmagic=never-match;;
1568 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1569 shlibpath_overrides_runpath=no
1570 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1571 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1572 hardcode_into_libs=yes
1575 # No shared lib support for Linux oldld, aout, or coff.
1576 linux*oldld* | linux*aout* | linux*coff*)
1580 # This must be Linux ELF.
1581 linux* | k*bsd*-gnu)
1585 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1586 soname_spec='${libname}${release}${shared_ext}$major'
1587 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1588 shlibpath_var=LD_LIBRARY_PATH
1589 shlibpath_overrides_runpath=no
1590 # This implies no fast_install, which is unacceptable.
1591 # Some rework will be needed to allow for fast_install
1592 # before this can be enabled.
1593 hardcode_into_libs=yes
1595 # Append ld.so.conf contents to the search path
1596 if test -f /etc/ld.so.conf; then
1597 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' ' '`
1598 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1601 # We used to test for /lib/ld.so.1 and disable shared libraries on
1602 # powerpc, because MkLinux only supported shared libraries with the
1603 # GNU dynamic linker. Since this was broken with cross compilers,
1604 # most powerpc-linux boxes support dynamic linking these days and
1605 # people can always --disable-shared, the test was removed, and we
1606 # assume the GNU/Linux dynamic linker is in use.
1607 dynamic_linker='GNU/Linux ld.so'
1614 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1616 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1617 dynamic_linker='NetBSD (a.out) ld.so'
1619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1620 soname_spec='${libname}${release}${shared_ext}$major'
1621 dynamic_linker='NetBSD ld.elf_so'
1623 shlibpath_var=LD_LIBRARY_PATH
1624 shlibpath_overrides_runpath=yes
1625 hardcode_into_libs=yes
1630 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1631 shlibpath_var=LD_LIBRARY_PATH
1632 shlibpath_overrides_runpath=yes
1639 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1640 soname_spec='${libname}${release}${shared_ext}$major'
1641 shlibpath_var=LD_LIBRARY_PATH
1642 shlibpath_overrides_runpath=yes
1647 sys_lib_dlsearch_path_spec="/usr/lib"
1649 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1651 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1652 *) need_version=no ;;
1654 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1655 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1656 shlibpath_var=LD_LIBRARY_PATH
1657 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1659 openbsd2.[[89]] | openbsd2.[[89]].*)
1660 shlibpath_overrides_runpath=no
1663 shlibpath_overrides_runpath=yes
1667 shlibpath_overrides_runpath=yes
1672 libname_spec='$name'
1675 library_names_spec='$libname${shared_ext} $libname.a'
1676 dynamic_linker='OS/2 ld.exe'
1677 shlibpath_var=LIBPATH
1680 osf3* | osf4* | osf5*)
1684 soname_spec='${libname}${release}${shared_ext}$major'
1685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1686 shlibpath_var=LD_LIBRARY_PATH
1687 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1688 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1699 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1700 soname_spec='${libname}${release}${shared_ext}$major'
1701 shlibpath_var=LD_LIBRARY_PATH
1702 shlibpath_overrides_runpath=yes
1703 hardcode_into_libs=yes
1704 # ldd complains unless libraries are executable
1705 postinstall_cmds='chmod +x $lib'
1710 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1711 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1712 shlibpath_var=LD_LIBRARY_PATH
1713 shlibpath_overrides_runpath=yes
1714 if test "$with_gnu_ld" = yes; then
1722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1723 soname_spec='${libname}${release}${shared_ext}$major'
1724 shlibpath_var=LD_LIBRARY_PATH
1725 case $host_vendor in
1727 shlibpath_overrides_runpath=no
1729 export_dynamic_flag_spec='${wl}-Blargedynsym'
1730 runpath_var=LD_RUN_PATH
1738 shlibpath_overrides_runpath=no
1739 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1745 if test -d /usr/nec ;then
1747 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1748 soname_spec='$libname${shared_ext}.$major'
1749 shlibpath_var=LD_LIBRARY_PATH
1753 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1754 version_type=freebsd-elf
1757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1758 soname_spec='${libname}${release}${shared_ext}$major'
1759 shlibpath_var=LD_LIBRARY_PATH
1760 hardcode_into_libs=yes
1761 if test "$with_gnu_ld" = yes; then
1762 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1763 shlibpath_overrides_runpath=no
1765 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1766 shlibpath_overrides_runpath=yes
1769 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1773 sys_lib_dlsearch_path_spec='/usr/lib'
1778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1779 soname_spec='${libname}${release}${shared_ext}$major'
1780 shlibpath_var=LD_LIBRARY_PATH
1787 AC_MSG_RESULT([$dynamic_linker])
1788 test "$dynamic_linker" = no && can_build_shared=no
1790 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1791 if test "$GCC" = yes; then
1792 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1794 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1799 AC_DEFUN([_LT_AC_TAGCONFIG],
1800 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1802 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1803 [include additional configurations @<:@automatic@:>@])],
1804 [tagnames="$withval"])
1806 if test -f "$ltmain" && test -n "$tagnames"; then
1807 if test ! -f "${ofile}"; then
1808 AC_MSG_WARN([output file `$ofile' does not exist])
1811 if test -z "$LTCC"; then
1812 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1813 if test -z "$LTCC"; then
1814 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1816 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1819 if test -z "$LTCFLAGS"; then
1820 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1823 # Extract list of available tagged configurations in $ofile.
1824 # Note that this assumes the entire list is on one line.
1825 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1827 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1828 for tagname in $tagnames; do
1830 # Check whether tagname contains only valid characters
1831 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1833 *) AC_MSG_ERROR([invalid tag name: $tagname])
1837 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1839 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1842 # Update the list of available tags.
1843 if test -n "$tagname"; then
1844 echo appending configuration tag \"$tagname\" to $ofile
1848 AC_LIBTOOL_LANG_RC_CONFIG
1852 AC_MSG_ERROR([Unsupported tag name: $tagname])
1856 # Append the new tag name to the list of available tags.
1857 if test -n "$tagname" ; then
1858 available_tags="$available_tags $tagname"
1864 # Now substitute the updated list of available tags.
1865 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1866 mv "${ofile}T" "$ofile"
1870 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1873 ])# _LT_AC_TAGCONFIG
1878 # enable checks for dlopen support
1879 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1880 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1881 ])# AC_LIBTOOL_DLOPEN
1884 # AC_LIBTOOL_WIN32_DLL
1885 # --------------------
1886 # declare package support for building win32 DLLs
1887 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1888 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1889 ])# AC_LIBTOOL_WIN32_DLL
1892 # AC_ENABLE_SHARED([DEFAULT])
1893 # ---------------------------
1894 # implement the --enable-shared flag
1895 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1896 AC_DEFUN([AC_ENABLE_SHARED],
1897 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1898 AC_ARG_ENABLE([shared],
1899 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1900 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1901 [p=${PACKAGE-default}
1903 yes) enable_shared=yes ;;
1904 no) enable_shared=no ;;
1907 # Look at the argument we got. We use all the common list separators.
1908 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1909 for pkg in $enableval; do
1911 if test "X$pkg" = "X$p"; then
1918 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1919 ])# AC_ENABLE_SHARED
1924 # set the default shared flag to --disable-shared
1925 AC_DEFUN([AC_DISABLE_SHARED],
1926 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1927 AC_ENABLE_SHARED(no)
1928 ])# AC_DISABLE_SHARED
1931 # AC_ENABLE_STATIC([DEFAULT])
1932 # ---------------------------
1933 # implement the --enable-static flag
1934 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1935 AC_DEFUN([AC_ENABLE_STATIC],
1936 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1937 AC_ARG_ENABLE([static],
1938 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1939 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1940 [p=${PACKAGE-default}
1942 yes) enable_static=yes ;;
1943 no) enable_static=no ;;
1946 # Look at the argument we got. We use all the common list separators.
1947 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1948 for pkg in $enableval; do
1950 if test "X$pkg" = "X$p"; then
1957 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1958 ])# AC_ENABLE_STATIC
1963 # set the default static flag to --disable-static
1964 AC_DEFUN([AC_DISABLE_STATIC],
1965 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1966 AC_ENABLE_STATIC(no)
1967 ])# AC_DISABLE_STATIC
1970 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1971 # ---------------------------------
1972 # implement the --enable-fast-install flag
1973 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1974 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1975 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1976 AC_ARG_ENABLE([fast-install],
1977 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1978 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1979 [p=${PACKAGE-default}
1981 yes) enable_fast_install=yes ;;
1982 no) enable_fast_install=no ;;
1984 enable_fast_install=no
1985 # Look at the argument we got. We use all the common list separators.
1986 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1987 for pkg in $enableval; do
1989 if test "X$pkg" = "X$p"; then
1990 enable_fast_install=yes
1996 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1997 ])# AC_ENABLE_FAST_INSTALL
2000 # AC_DISABLE_FAST_INSTALL
2001 # -----------------------
2002 # set the default to --disable-fast-install
2003 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2004 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2005 AC_ENABLE_FAST_INSTALL(no)
2006 ])# AC_DISABLE_FAST_INSTALL
2009 # AC_LIBTOOL_PICMODE([MODE])
2010 # --------------------------
2011 # implement the --with-pic flag
2012 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2013 AC_DEFUN([AC_LIBTOOL_PICMODE],
2014 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2015 pic_mode=ifelse($#,1,$1,default)
2016 ])# AC_LIBTOOL_PICMODE
2021 # This is predefined starting with Autoconf 2.54, so this conditional
2022 # definition can be removed once we require Autoconf 2.54 or later.
2023 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2024 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2025 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2026 then ac_cv_prog_egrep='grep -E'
2027 else ac_cv_prog_egrep='egrep'
2029 EGREP=$ac_cv_prog_egrep
2034 # AC_PATH_TOOL_PREFIX
2035 # -------------------
2036 # find a file program which can recognize shared library
2037 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2038 [AC_REQUIRE([AC_PROG_EGREP])dnl
2039 AC_MSG_CHECKING([for $1])
2040 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2042 [[\\/*] | ?:[\\/]*])
2043 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2046 lt_save_MAGIC_CMD="$MAGIC_CMD"
2047 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2048 dnl $ac_dummy forces splitting on constant user-supplied paths.
2049 dnl POSIX.2 word splitting is done only on the output of word expansions,
2050 dnl not every word. This closes a longstanding sh security hole.
2051 ac_dummy="ifelse([$2], , $PATH, [$2])"
2052 for ac_dir in $ac_dummy; do
2054 test -z "$ac_dir" && ac_dir=.
2055 if test -f $ac_dir/$1; then
2056 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2057 if test -n "$file_magic_test_file"; then
2058 case $deplibs_check_method in
2060 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2061 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2062 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2063 $EGREP "$file_magic_regex" > /dev/null; then
2068 *** Warning: the command libtool uses to detect shared libraries,
2069 *** $file_magic_cmd, produces output that libtool cannot recognize.
2070 *** The result is that libtool may fail to recognize shared libraries
2071 *** as such. This will affect the creation of libtool libraries that
2072 *** depend on shared libraries, but programs linked with such libtool
2073 *** libraries will work regardless of this problem. Nevertheless, you
2074 *** may want to report the problem to your system manager and/or to
2075 *** bug-libtool@gnu.org
2085 MAGIC_CMD="$lt_save_MAGIC_CMD"
2088 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2089 if test -n "$MAGIC_CMD"; then
2090 AC_MSG_RESULT($MAGIC_CMD)
2094 ])# AC_PATH_TOOL_PREFIX
2099 # find a file program which can recognize a shared library
2100 AC_DEFUN([AC_PATH_MAGIC],
2101 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2102 if test -z "$lt_cv_path_MAGIC_CMD"; then
2103 if test -n "$ac_tool_prefix"; then
2104 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2114 # find the pathname to the GNU or non-GNU linker
2115 AC_DEFUN([AC_PROG_LD],
2116 [AC_ARG_WITH([gnu-ld],
2117 [AC_HELP_STRING([--with-gnu-ld],
2118 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2119 [test "$withval" = no || with_gnu_ld=yes],
2121 AC_REQUIRE([LT_AC_PROG_SED])dnl
2122 AC_REQUIRE([AC_PROG_CC])dnl
2123 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2124 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2126 if test "$GCC" = yes; then
2127 # Check if gcc -print-prog-name=ld gives a path.
2128 AC_MSG_CHECKING([for ld used by $CC])
2131 # gcc leaves a trailing carriage return which upsets mingw
2132 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2134 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2137 # Accept absolute paths.
2138 [[\\/]]* | ?:[[\\/]]*)
2139 re_direlt='/[[^/]][[^/]]*/\.\./'
2140 # Canonicalize the pathname of ld
2141 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2142 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2143 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2145 test -z "$LD" && LD="$ac_prog"
2148 # If it fails, then pretend we aren't using GCC.
2152 # If it is relative, then search for the first ld in PATH.
2156 elif test "$with_gnu_ld" = yes; then
2157 AC_MSG_CHECKING([for GNU ld])
2159 AC_MSG_CHECKING([for non-GNU ld])
2161 AC_CACHE_VAL(lt_cv_path_LD,
2162 [if test -z "$LD"; then
2163 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2164 for ac_dir in $PATH; do
2166 test -z "$ac_dir" && ac_dir=.
2167 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2168 lt_cv_path_LD="$ac_dir/$ac_prog"
2169 # Check to see if the program is GNU ld. I'd rather use --version,
2170 # but apparently some variants of GNU ld only accept -v.
2171 # Break only if it was the GNU/non-GNU ld that we prefer.
2172 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2173 *GNU* | *'with BFD'*)
2174 test "$with_gnu_ld" != no && break
2177 test "$with_gnu_ld" != yes && break
2184 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2187 if test -n "$LD"; then
2192 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2199 AC_DEFUN([AC_PROG_LD_GNU],
2200 [AC_REQUIRE([AC_PROG_EGREP])dnl
2201 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2202 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2203 case `$LD -v 2>&1 </dev/null` in
2204 *GNU* | *'with BFD'*)
2205 lt_cv_prog_gnu_ld=yes
2208 lt_cv_prog_gnu_ld=no
2211 with_gnu_ld=$lt_cv_prog_gnu_ld
2215 # AC_PROG_LD_RELOAD_FLAG
2216 # ----------------------
2217 # find reload flag for linker
2218 # -- PORTME Some linkers may need a different reload flag.
2219 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2220 [AC_CACHE_CHECK([for $LD option to reload object files],
2221 lt_cv_ld_reload_flag,
2222 [lt_cv_ld_reload_flag='-r'])
2223 reload_flag=$lt_cv_ld_reload_flag
2224 case $reload_flag in
2226 *) reload_flag=" $reload_flag" ;;
2228 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2231 if test "$GCC" = yes; then
2232 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2234 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2238 ])# AC_PROG_LD_RELOAD_FLAG
2241 # AC_DEPLIBS_CHECK_METHOD
2242 # -----------------------
2243 # how to check for library dependencies
2244 # -- PORTME fill in with the dynamic library characteristics
2245 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2246 [AC_CACHE_CHECK([how to recognize dependent libraries],
2247 lt_cv_deplibs_check_method,
2248 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2249 lt_cv_file_magic_test_file=
2250 lt_cv_deplibs_check_method='unknown'
2251 # Need to set the preceding variable on all platforms that support
2252 # interlibrary dependencies.
2253 # 'none' -- dependencies not supported.
2254 # `unknown' -- same as none, but documents that we really don't know.
2255 # 'pass_all' -- all dependencies passed with no checks.
2256 # 'test_compile' -- check by making test program.
2257 # 'file_magic [[regex]]' -- check by looking for files in library path
2258 # which responds to the $file_magic_cmd with a given extended regex.
2259 # If you have `file' or equivalent on your system and you're not sure
2260 # whether `pass_all' will *always* work, you probably want this one.
2264 lt_cv_deplibs_check_method=pass_all
2268 lt_cv_deplibs_check_method=pass_all
2272 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2273 lt_cv_file_magic_cmd='/usr/bin/file -L'
2274 lt_cv_file_magic_test_file=/shlib/libc.so
2278 # func_win32_libid is a shell function defined in ltmain.sh
2279 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2280 lt_cv_file_magic_cmd='func_win32_libid'
2284 # Base MSYS/MinGW do not provide the 'file' command needed by
2285 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2286 # unless we find 'file', for example because we are cross-compiling.
2287 if ( file / ) >/dev/null 2>&1; then
2288 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2289 lt_cv_file_magic_cmd='func_win32_libid'
2291 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2292 lt_cv_file_magic_cmd='$OBJDUMP -f'
2296 darwin* | rhapsody*)
2297 lt_cv_deplibs_check_method=pass_all
2300 freebsd* | dragonfly*)
2301 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2304 # Not sure whether the presence of OpenBSD here was a mistake.
2305 # Let's accept both of them until this is cleared up.
2306 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2307 lt_cv_file_magic_cmd=/usr/bin/file
2308 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2312 lt_cv_deplibs_check_method=pass_all
2317 lt_cv_deplibs_check_method=pass_all
2320 hpux10.20* | hpux11*)
2321 lt_cv_file_magic_cmd=/usr/bin/file
2324 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2325 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2328 [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]']
2329 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2332 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2333 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2339 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2340 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2343 irix5* | irix6* | nonstopux*)
2345 *-32|*"-32 ") libmagic=32-bit;;
2346 *-n32|*"-n32 ") libmagic=N32;;
2347 *-64|*"-64 ") libmagic=64-bit;;
2348 *) libmagic=never-match;;
2350 lt_cv_deplibs_check_method=pass_all
2353 # This must be Linux ELF.
2354 linux* | k*bsd*-gnu)
2355 lt_cv_deplibs_check_method=pass_all
2359 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2360 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2362 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2367 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2368 lt_cv_file_magic_cmd=/usr/bin/file
2369 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2373 lt_cv_deplibs_check_method=unknown
2377 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2378 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2380 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2384 osf3* | osf4* | osf5*)
2385 lt_cv_deplibs_check_method=pass_all
2389 lt_cv_deplibs_check_method=pass_all
2393 lt_cv_deplibs_check_method=pass_all
2397 case $host_vendor in
2399 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]]'
2400 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2403 lt_cv_deplibs_check_method=pass_all
2406 lt_cv_file_magic_cmd='/bin/file'
2407 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2410 lt_cv_file_magic_cmd='/bin/file'
2411 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2412 lt_cv_file_magic_test_file=/lib/libc.so
2415 lt_cv_deplibs_check_method=pass_all
2418 lt_cv_deplibs_check_method=pass_all
2423 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2424 lt_cv_deplibs_check_method=pass_all
2428 file_magic_cmd=$lt_cv_file_magic_cmd
2429 deplibs_check_method=$lt_cv_deplibs_check_method
2430 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2431 ])# AC_DEPLIBS_CHECK_METHOD
2436 # find the pathname to a BSD-compatible name lister
2437 AC_DEFUN([AC_PROG_NM],
2438 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2439 [if test -n "$NM"; then
2440 # Let the user override the test.
2443 lt_nm_to_check="${ac_tool_prefix}nm"
2444 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2445 lt_nm_to_check="$lt_nm_to_check nm"
2447 for lt_tmp_nm in $lt_nm_to_check; do
2448 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2449 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2451 test -z "$ac_dir" && ac_dir=.
2452 tmp_nm="$ac_dir/$lt_tmp_nm"
2453 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2454 # Check to see if the nm accepts a BSD-compat flag.
2455 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2456 # nm: unknown option "B" ignored
2457 # Tru64's nm complains that /dev/null is an invalid object file
2458 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2459 */dev/null* | *'Invalid file or object type'*)
2460 lt_cv_path_NM="$tmp_nm -B"
2464 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2466 lt_cv_path_NM="$tmp_nm -p"
2470 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2471 continue # so that we can try to find one that supports BSD flags
2480 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2488 # check for math library
2489 AC_DEFUN([AC_CHECK_LIBM],
2490 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2493 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2494 # These system don't have libm, or don't need it
2497 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2498 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2501 AC_CHECK_LIB(m, cos, LIBM="-lm")
2507 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2508 # -----------------------------------
2509 # sets LIBLTDL to the link flags for the libltdl convenience library and
2510 # LTDLINCL to the include flags for the libltdl header and adds
2511 # --enable-ltdl-convenience to the configure arguments. Note that
2512 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2513 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2514 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2515 # (note the single quotes!). If your package is not flat and you're not
2516 # using automake, define top_builddir and top_srcdir appropriately in
2518 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2519 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2520 case $enable_ltdl_convenience in
2521 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2522 "") enable_ltdl_convenience=yes
2523 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2525 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2526 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2527 # For backwards non-gettext consistent compatibility...
2529 ])# AC_LIBLTDL_CONVENIENCE
2532 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2533 # -----------------------------------
2534 # sets LIBLTDL to the link flags for the libltdl installable library and
2535 # LTDLINCL to the include flags for the libltdl header and adds
2536 # --enable-ltdl-install to the configure arguments. Note that
2537 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2538 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2539 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2540 # '${top_srcdir}/' (note the single quotes!). If your package is not
2541 # flat and you're not using automake, define top_builddir and top_srcdir
2542 # appropriately in the Makefiles.
2543 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2544 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2545 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2546 AC_CHECK_LIB(ltdl, lt_dlinit,
2547 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2548 [if test x"$enable_ltdl_install" = xno; then
2549 AC_MSG_WARN([libltdl not installed, but installation disabled])
2551 enable_ltdl_install=yes
2554 if test x"$enable_ltdl_install" = x"yes"; then
2555 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2556 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2557 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2559 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2563 # For backwards non-gettext consistent compatibility...
2565 ])# AC_LIBLTDL_INSTALLABLE
2570 # enable support for Windows resource files
2571 AC_DEFUN([AC_LIBTOOL_RC],
2572 [AC_REQUIRE([LT_AC_PROG_RC])
2573 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2577 # AC_LIBTOOL_LANG_C_CONFIG
2578 # ------------------------
2579 # Ensure that the configuration vars for the C compiler are
2580 # suitably defined. Those variables are subsequently used by
2581 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2582 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2583 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2587 # Source file extension for C test sources.
2590 # Object file extension for compiled C test sources.
2592 _LT_AC_TAGVAR(objext, $1)=$objext
2594 # Code to be used in simple compile tests
2595 lt_simple_compile_test_code="int some_variable = 0;"
2597 # Code to be used in simple link tests
2598 lt_simple_link_test_code='int main(){return(0);}'
2602 # save warnings/boilerplate of simple test code
2603 _LT_COMPILER_BOILERPLATE
2604 _LT_LINKER_BOILERPLATE
2607 ## There is no encapsulation within the following macros, do not change
2608 ## the running order or otherwise move them around unless you know exactly
2609 ## what you are doing...
2610 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2611 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2612 AC_LIBTOOL_PROG_CC_C_O($1)
2613 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2614 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2615 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2616 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2617 AC_LIBTOOL_SYS_LIB_STRIP
2618 AC_LIBTOOL_DLOPEN_SELF
2620 # Report which library types will actually be built
2621 AC_MSG_CHECKING([if libtool supports shared libraries])
2622 AC_MSG_RESULT([$can_build_shared])
2624 AC_MSG_CHECKING([whether to build shared libraries])
2625 test "$can_build_shared" = "no" && enable_shared=no
2627 # On AIX, shared libraries and static libraries use the same namespace, and
2628 # are all built from PIC.
2631 test "$enable_shared" = yes && enable_static=no
2632 if test -n "$RANLIB"; then
2633 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2634 postinstall_cmds='$RANLIB $lib'
2639 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2640 test "$enable_shared" = yes && enable_static=no
2644 AC_MSG_RESULT([$enable_shared])
2646 AC_MSG_CHECKING([whether to build static libraries])
2647 # Make sure either enable_shared or enable_static is yes.
2648 test "$enable_shared" = yes || enable_static=yes
2649 AC_MSG_RESULT([$enable_static])
2651 AC_LIBTOOL_CONFIG($1)
2655 ])# AC_LIBTOOL_LANG_C_CONFIG
2658 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
2659 # ------------------------------------
2660 # Figure out "hidden" library dependencies from verbose
2661 # compiler output when linking a shared library.
2662 # Parse the compiler output and extract the necessary
2663 # objects, libraries and library flags.
2664 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
2665 dnl we can't use the lt_simple_compile_test_code here,
2666 dnl because it contains code intended for an executable,
2667 dnl not a library. It's possible we should let each
2668 dnl tag define a new lt_????_link_test_code variable,
2669 dnl but it's only used here...
2670 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
2672 void foo (void) { a = 0; }
2675 dnl Parse the compiler output and extract the necessary
2676 dnl objects, libraries and library flags.
2677 if AC_TRY_EVAL(ac_compile); then
2678 # Parse the compiler output and extract the necessary
2679 # objects, libraries and library flags.
2681 # Sentinel used to keep track of whether or not we are before
2682 # the conftest object file.
2683 pre_test_object_deps_done=no
2685 # The `*' in the case matches for architectures that use `case' in
2686 # $output_verbose_cmd can trigger glob expansion during the loop
2687 # eval without this substitution.
2688 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
2690 for p in `eval $output_verbose_link_cmd`; do
2694 # Some compilers place space between "-{L,R}" and the path.
2697 || test $p = "-R"; then
2704 if test "$pre_test_object_deps_done" = no; then
2707 # Internal compiler library paths should come after those
2708 # provided the user. The postdeps already come after the
2709 # user supplied libs so there is no need to process them.
2710 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
2711 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
2713 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
2716 # The "-l" case would never come before the object being
2717 # linked, so don't bother handling this case.
2720 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
2721 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
2723 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
2729 # This assumes that the test object file only shows up
2730 # once in the compiler output.
2731 if test "$p" = "conftest.$objext"; then
2732 pre_test_object_deps_done=yes
2736 if test "$pre_test_object_deps_done" = no; then
2737 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
2738 _LT_AC_TAGVAR(predep_objects, $1)="$p"
2740 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
2743 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
2744 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
2746 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
2751 *) ;; # Ignore the rest.
2759 echo "libtool.m4: error: problem compiling $1 test program"
2762 $rm -f confest.$objext
2764 case " $_LT_AC_TAGVAR(postdeps, $1) " in
2765 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
2767 ])# AC_LIBTOOL_POSTDEP_PREDEP
2770 # AC_LIBTOOL_LANG_RC_CONFIG
2771 # -------------------------
2772 # Ensure that the configuration vars for the Windows resource compiler are
2773 # suitably defined. Those variables are subsequently used by
2774 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2775 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
2776 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
2779 # Source file extension for RC test sources.
2782 # Object file extension for compiled RC test sources.
2784 _LT_AC_TAGVAR(objext, $1)=$objext
2786 # Code to be used in simple compile tests
2787 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
2789 # Code to be used in simple link tests
2790 lt_simple_link_test_code="$lt_simple_compile_test_code"
2792 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2795 # save warnings/boilerplate of simple test code
2796 _LT_COMPILER_BOILERPLATE
2797 _LT_LINKER_BOILERPLATE
2799 # Allow CC to be a program name with arguments.
2803 _LT_AC_TAGVAR(compiler, $1)=$CC
2804 _LT_CC_BASENAME([$compiler])
2805 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2807 AC_LIBTOOL_CONFIG($1)
2811 ])# AC_LIBTOOL_LANG_RC_CONFIG
2814 # AC_LIBTOOL_CONFIG([TAGNAME])
2815 # ----------------------------
2816 # If TAGNAME is not passed, then create an initial libtool script
2817 # with a default configuration from the untagged config vars. Otherwise
2818 # add code to config.status for appending the configuration named by
2819 # TAGNAME from the matching tagged config vars.
2820 AC_DEFUN([AC_LIBTOOL_CONFIG],
2821 [# The else clause should only fire when bootstrapping the
2822 # libtool distribution, otherwise you forgot to ship ltmain.sh
2823 # with your package, and you will get complaints that there are
2824 # no rules to generate ltmain.sh.
2825 if test -f "$ltmain"; then
2826 # See if we are running on zsh, and set the options which allow our commands through
2827 # without removal of \ escapes.
2828 if test -n "${ZSH_VERSION+set}" ; then
2829 setopt NO_GLOB_SUBST
2831 # Now quote all the things that may contain metacharacters while being
2832 # careful not to overquote the AC_SUBSTed values. We take copies of the
2833 # variables and quote the copies for generation of the libtool script.
2834 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
2836 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
2837 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
2838 deplibs_check_method reload_flag reload_cmds need_locks \
2839 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
2840 lt_cv_sys_global_symbol_to_c_name_address \
2841 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2842 old_postinstall_cmds old_postuninstall_cmds \
2843 _LT_AC_TAGVAR(compiler, $1) \
2844 _LT_AC_TAGVAR(CC, $1) \
2845 _LT_AC_TAGVAR(LD, $1) \
2846 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
2847 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
2848 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
2849 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
2850 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
2851 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
2852 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
2853 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
2854 _LT_AC_TAGVAR(old_archive_cmds, $1) \
2855 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
2856 _LT_AC_TAGVAR(predep_objects, $1) \
2857 _LT_AC_TAGVAR(postdep_objects, $1) \
2858 _LT_AC_TAGVAR(predeps, $1) \
2859 _LT_AC_TAGVAR(postdeps, $1) \
2860 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
2861 _LT_AC_TAGVAR(archive_cmds, $1) \
2862 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
2863 _LT_AC_TAGVAR(postinstall_cmds, $1) \
2864 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
2865 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
2866 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
2867 _LT_AC_TAGVAR(no_undefined_flag, $1) \
2868 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
2869 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
2870 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
2871 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
2872 _LT_AC_TAGVAR(hardcode_automatic, $1) \
2873 _LT_AC_TAGVAR(module_cmds, $1) \
2874 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
2875 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
2876 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
2877 _LT_AC_TAGVAR(exclude_expsyms, $1) \
2878 _LT_AC_TAGVAR(include_expsyms, $1); do
2881 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
2882 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
2883 _LT_AC_TAGVAR(archive_cmds, $1) | \
2884 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
2885 _LT_AC_TAGVAR(module_cmds, $1) | \
2886 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
2887 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
2888 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
2889 extract_expsyms_cmds | reload_cmds | finish_cmds | \
2890 postinstall_cmds | postuninstall_cmds | \
2891 old_postinstall_cmds | old_postuninstall_cmds | \
2892 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2893 # Double-quote double-evaled strings.
2894 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2897 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2903 *'\[$]0 --fallback-echo"')
2904 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
2909 [cfgfile="${ofile}T"
2910 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
2912 AC_MSG_NOTICE([creating $ofile])],
2915 cat <<__EOF__ >> "$cfgfile"
2919 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2920 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2921 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2923 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
2924 # Free Software Foundation, Inc.
2926 # This file is part of GNU Libtool:
2927 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2929 # This program is free software; you can redistribute it and/or modify
2930 # it under the terms of the GNU General Public License as published by
2931 # the Free Software Foundation; either version 2 of the License, or
2932 # (at your option) any later version.
2934 # This program is distributed in the hope that it will be useful, but
2935 # WITHOUT ANY WARRANTY; without even the implied warranty of
2936 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2937 # General Public License for more details.
2939 # You should have received a copy of the GNU General Public License
2940 # along with this program; if not, write to the Free Software
2941 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2943 # As a special exception to the GNU General Public License, if you
2944 # distribute this file as part of a program that contains a
2945 # configuration script generated by Autoconf, you may include it under
2946 # the same distribution terms that you use for the rest of that program.
2948 # A sed program that does not truncate output.
2951 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2952 Xsed="$SED -e 1s/^X//"
2954 # The HP-UX ksh and POSIX shell print the target directory to stdout
2956 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2958 # The names of the tagged configurations supported by this script.
2961 # ### BEGIN LIBTOOL CONFIG],
2962 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
2964 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2966 # Shell to use when invoking shell scripts.
2969 # Whether or not to build shared libraries.
2970 build_libtool_libs=$enable_shared
2972 # Whether or not to build static libraries.
2973 build_old_libs=$enable_static
2975 # Whether or not to add -lc for building shared libraries.
2976 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
2978 # Whether or not to disallow shared libs when runtime libs are static
2979 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
2981 # Whether or not to optimize for fast installation.
2982 fast_install=$enable_fast_install
2985 host_alias=$host_alias
2990 build_alias=$build_alias
2994 # An echo program that does not interpret backslashes.
2999 AR_FLAGS=$lt_AR_FLAGS
3004 # LTCC compiler flags.
3005 LTCFLAGS=$lt_LTCFLAGS
3007 # A language-specific compiler.
3008 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3010 # Is the compiler the GNU C compiler?
3011 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3016 # The linker used to build libraries.
3017 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3019 # Whether we need hard or soft links.
3022 # A BSD-compatible nm program.
3025 # A symbol stripping program
3028 # Used to examine libraries when file_magic_cmd begins "file"
3029 MAGIC_CMD=$MAGIC_CMD
3031 # Used on cygwin: DLL creation program.
3034 # Used on cygwin: object dumper.
3037 # Used on cygwin: assembler.
3040 # The name of the directory that contains temporary libtool files.
3043 # How to create reloadable object files.
3044 reload_flag=$lt_reload_flag
3045 reload_cmds=$lt_reload_cmds
3047 # How to pass a linker flag through the compiler.
3048 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3050 # Object file suffix (normally "o").
3053 # Old archive suffix (normally "a").
3056 # Shared library suffix (normally ".so").
3057 shrext_cmds='$shrext_cmds'
3059 # Executable file suffix (normally "").
3062 # Additional compiler flags for building library objects.
3063 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3066 # What is the maximum length of a command?
3067 max_cmd_len=$lt_cv_sys_max_cmd_len
3069 # Does compiler simultaneously support -c and -o options?
3070 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3072 # Must we lock files when doing compilation?
3073 need_locks=$lt_need_locks
3075 # Do we need the lib prefix for modules?
3076 need_lib_prefix=$need_lib_prefix
3078 # Do we need a version for libraries?
3079 need_version=$need_version
3081 # Whether dlopen is supported.
3082 dlopen_support=$enable_dlopen
3084 # Whether dlopen of programs is supported.
3085 dlopen_self=$enable_dlopen_self
3087 # Whether dlopen of statically linked programs is supported.
3088 dlopen_self_static=$enable_dlopen_self_static
3090 # Compiler flag to prevent dynamic linking.
3091 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3093 # Compiler flag to turn off builtin functions.
3094 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3096 # Compiler flag to allow reflexive dlopens.
3097 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3099 # Compiler flag to generate shared objects directly from archives.
3100 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3102 # Compiler flag to generate thread-safe objects.
3103 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3105 # Library versioning type.
3106 version_type=$version_type
3108 # Format of library name prefix.
3109 libname_spec=$lt_libname_spec
3111 # List of archive names. First name is the real one, the rest are links.
3112 # The last name is the one that the linker finds with -lNAME.
3113 library_names_spec=$lt_library_names_spec
3115 # The coded name of the library, if different from the real name.
3116 soname_spec=$lt_soname_spec
3118 # Commands used to build and install an old-style archive.
3120 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3121 old_postinstall_cmds=$lt_old_postinstall_cmds
3122 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3124 # Create an old-style archive from a shared archive.
3125 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3127 # Create a temporary old-style archive to link instead of a shared archive.
3128 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3130 # Commands used to build and install a shared archive.
3131 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3132 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3133 postinstall_cmds=$lt_postinstall_cmds
3134 postuninstall_cmds=$lt_postuninstall_cmds
3136 # Commands used to build a loadable module (assumed same as above if empty)
3137 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
3138 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
3140 # Commands to strip libraries.
3141 old_striplib=$lt_old_striplib
3142 striplib=$lt_striplib
3144 # Dependencies to place before the objects being linked to create a
3146 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3148 # Dependencies to place after the objects being linked to create a
3150 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3152 # Dependencies to place before the objects being linked to create a
3154 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3156 # Dependencies to place after the objects being linked to create a
3158 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3160 # The library search path used internally by the compiler when linking
3162 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3164 # Method to check whether dependent libraries are shared objects.
3165 deplibs_check_method=$lt_deplibs_check_method
3167 # Command to use when deplibs_check_method == file_magic.
3168 file_magic_cmd=$lt_file_magic_cmd
3170 # Flag that allows shared libraries with undefined symbols to be built.
3171 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3173 # Flag that forces no undefined symbols.
3174 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3176 # Commands used to finish a libtool library installation in a directory.
3177 finish_cmds=$lt_finish_cmds
3179 # Same as above, but a single script fragment to be evaled but not shown.
3180 finish_eval=$lt_finish_eval
3182 # Take the output of nm and produce a listing of raw symbols and C names.
3183 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3185 # Transform the output of nm in a proper C declaration
3186 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3188 # Transform the output of nm in a C name address pair
3189 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3191 # This is the shared library runtime path variable.
3192 runpath_var=$runpath_var
3194 # This is the shared library path variable.
3195 shlibpath_var=$shlibpath_var
3197 # Is shlibpath searched before the hard-coded library search path?
3198 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3200 # How to hardcode a shared library path into an executable.
3201 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3203 # Whether we should hardcode library paths into libraries.
3204 hardcode_into_libs=$hardcode_into_libs
3206 # Flag to hardcode \$libdir into a binary during linking.
3207 # This must work even if \$libdir does not exist.
3208 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3210 # If ld is used when linking, flag to hardcode \$libdir into
3211 # a binary during linking. This must work even if \$libdir does
3213 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
3215 # Whether we need a single -rpath flag with a separated argument.
3216 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3218 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
3220 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3222 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3224 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3226 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3227 # the resulting binary.
3228 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3230 # Set to yes if building a shared library automatically hardcodes DIR into the library
3231 # and all subsequent libraries and executables linked against it.
3232 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
3234 # Variables whose values should be saved in libtool wrapper scripts and
3235 # restored at relink time.
3236 variables_saved_for_relink="$variables_saved_for_relink"
3238 # Whether libtool must link a program against all its dependency libraries.
3239 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3241 # Compile-time system search path for libraries
3242 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3244 # Run-time system search path for libraries
3245 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3247 # Fix the shell variable \$srcfile for the compiler.
3248 fix_srcfile_path=$lt_fix_srcfile_path
3250 # Set to yes if exported symbols are required.
3251 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3253 # The commands to list exported symbols.
3254 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3256 # The commands to extract the exported symbol list from a shared archive.
3257 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3259 # Symbols that should not be listed in the preloaded symbols.
3260 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3262 # Symbols that must always be exported.
3263 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3266 [# ### END LIBTOOL CONFIG],
3267 [# ### END LIBTOOL TAG CONFIG: $tagname])
3274 cat <<\EOF >> "$cfgfile"
3276 # AIX sometimes has problems with the GCC collect2 program. For some
3277 # reason, if we set the COLLECT_NAMES environment variable, the problems
3278 # vanish in a puff of smoke.
3279 if test "X${COLLECT_NAMES+set}" != Xset; then
3281 export COLLECT_NAMES
3287 # We use sed instead of cat because bash on DJGPP gets confused if
3288 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3289 # text mode, it properly converts lines to CR/LF. This bash problem
3290 # is reportedly fixed, but why not run on old versions too?
3291 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3293 mv -f "$cfgfile" "$ofile" || \
3294 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3298 # If there is no Makefile yet, we rely on a make rule to execute
3299 # `config.status --recheck' to rerun these tests and create the
3300 # libtool script then.
3301 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
3302 if test -f "$ltmain_in"; then
3303 test -f Makefile && make "$ltmain"
3306 ])# AC_LIBTOOL_CONFIG
3309 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3310 # -------------------------------------------
3311 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3312 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3314 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3316 if test "$GCC" = yes; then
3317 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3319 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3320 lt_cv_prog_compiler_rtti_exceptions,
3321 [-fno-rtti -fno-exceptions], [],
3322 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3324 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3327 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3328 # ---------------------------------
3329 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3330 [AC_REQUIRE([AC_CANONICAL_HOST])
3331 AC_REQUIRE([LT_AC_PROG_SED])
3332 AC_REQUIRE([AC_PROG_NM])
3333 AC_REQUIRE([AC_OBJEXT])
3334 # Check for command to grab the raw symbol name followed by C symbol from nm.
3335 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3336 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3338 # These are sane defaults that work on at least a few old systems.
3339 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3341 # Character class describing NM global symbol codes.
3342 symcode='[[BCDEGRST]]'
3344 # Regexp to match symbols that can be accessed directly from C.
3345 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3347 # Transform an extracted symbol line into a proper C declaration
3348 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3350 # Transform an extracted symbol line into symbol name and symbol address
3351 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'"
3353 # Define system-specific variables.
3358 cygwin* | mingw* | pw32*)
3359 symcode='[[ABCDGISTW]]'
3361 hpux*) # Its linker distinguishes data from code symbols
3362 if test "$host_cpu" = ia64; then
3363 symcode='[[ABCDEGRST]]'
3365 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3366 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'"
3368 linux* | k*bsd*-gnu)
3369 if test "$host_cpu" = ia64; then
3370 symcode='[[ABCDGIRSTW]]'
3371 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3372 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'"
3376 symcode='[[BCDEGRST]]'
3379 symcode='[[BCDEGQRST]]'
3390 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3394 symcode='[[DFNSTU]]'
3398 # Handle CRLF in mingw tool chain
3402 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3406 # If we're using GNU nm, then use its standard symbol codes.
3407 case `$NM -V 2>&1` in
3408 *GNU* | *'with BFD'*)
3409 symcode='[[ABCDGIRSTW]]' ;;
3412 # Try without a prefix undercore, then with it.
3413 for ac_symprfx in "" "_"; do
3415 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3416 symxfrm="\\1 $ac_symprfx\\2 \\2"
3418 # Write the raw and C identifiers.
3419 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3421 # Check to see that the pipe works correctly.
3425 cat > conftest.$ac_ext <<EOF
3430 void nm_test_func(){}
3434 int main(){nm_test_var='a';nm_test_func();return(0);}
3437 if AC_TRY_EVAL(ac_compile); then
3438 # Now try to grab the symbols.
3440 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3441 # Try sorting and uniquifying the output.
3442 if sort "$nlist" | uniq > "$nlist"T; then
3443 mv -f "$nlist"T "$nlist"
3448 # Make sure that we snagged all the symbols we need.
3449 if grep ' nm_test_var$' "$nlist" >/dev/null; then
3450 if grep ' nm_test_func$' "$nlist" >/dev/null; then
3451 cat <<EOF > conftest.$ac_ext
3457 # Now generate the symbol file.
3458 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
3460 cat <<EOF >> conftest.$ac_ext
3461 #if defined (__STDC__) && __STDC__
3462 # define lt_ptr_t void *
3464 # define lt_ptr_t char *
3468 /* The mapping between symbol names and symbols. */
3473 lt_preloaded_symbols[[]] =
3476 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
3477 cat <<\EOF >> conftest.$ac_ext
3485 # Now try linking the two files.
3486 mv conftest.$ac_objext conftstm.$ac_objext
3487 lt_save_LIBS="$LIBS"
3488 lt_save_CFLAGS="$CFLAGS"
3489 LIBS="conftstm.$ac_objext"
3490 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3491 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3494 LIBS="$lt_save_LIBS"
3495 CFLAGS="$lt_save_CFLAGS"
3497 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3500 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3503 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3506 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3507 cat conftest.$ac_ext >&5
3509 rm -f conftest* conftst*
3511 # Do not use the global_symbol_pipe unless it works.
3512 if test "$pipe_works" = yes; then
3515 lt_cv_sys_global_symbol_pipe=
3519 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3520 lt_cv_sys_global_symbol_to_cdecl=
3522 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3523 AC_MSG_RESULT(failed)
3527 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3530 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3531 # ---------------------------------------
3532 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3533 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3534 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3535 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3537 AC_MSG_CHECKING([for $compiler option to produce PIC])
3538 if test "$GCC" = yes; then
3539 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3540 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3544 # All AIX code is PIC.
3545 if test "$host_cpu" = ia64; then
3546 # AIX 5 now supports IA64 processor
3547 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3552 # FIXME: we need at least 68020 code to build shared libraries, but
3553 # adding the `-m68020' flag to GCC prevents building anything better,
3555 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3558 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3559 # PIC is the default for these OSes.
3562 mingw* | cygwin* | pw32* | os2*)
3563 # This hack is so that the source file can tell whether it is being
3564 # built for inclusion in a dll (and should export symbols for example).
3565 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3566 # (--disable-auto-import) libraries
3567 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3570 darwin* | rhapsody*)
3571 # PIC is the default on this platform
3572 # Common symbols not allowed in MH_DYLIB files
3573 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3577 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3578 # Instead, we relocate shared libraries at runtime.
3582 # Just because we use GCC doesn't mean we suddenly get shared libraries
3583 # on systems that don't support them.
3584 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3589 if test -d /usr/nec; then
3590 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3595 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3602 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3608 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3612 # PORTME Check for flag to pass linker flags through the system compiler.
3615 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3616 if test "$host_cpu" = ia64; then
3617 # AIX 5 now supports IA64 processor
3618 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3620 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3624 # PIC is the default on this platform
3625 # Common symbols not allowed in MH_DYLIB files
3626 case $cc_basename in
3628 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3629 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3634 mingw* | cygwin* | pw32* | os2*)
3635 # This hack is so that the source file can tell whether it is being
3636 # built for inclusion in a dll (and should export symbols for example).
3637 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3640 hpux9* | hpux10* | hpux11*)
3641 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3642 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3649 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3652 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3653 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3656 irix5* | irix6* | nonstopux*)
3657 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3658 # PIC (with -KPIC) is the default.
3659 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3663 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3664 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3667 linux* | k*bsd*-gnu)
3668 case $cc_basename in
3670 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3671 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3672 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3674 pgcc* | pgf77* | pgf90* | pgf95*)
3675 # Portland Group compilers (*not* the Pentium gcc compiler,
3676 # which looks to be a dead project)
3677 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3679 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3682 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3683 # All Alpha code is PIC.
3684 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3687 case `$CC -V 2>&1 | sed 5q` in
3690 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3691 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3692 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3695 # Sun Fortran 8.3 passes all unrecognized flags to the linker
3696 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3697 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3698 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
3705 osf3* | osf4* | osf5*)
3706 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707 # All OSF/1 code is PIC.
3708 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3712 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3717 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3718 case $cc_basename in
3720 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3722 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3727 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3728 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3729 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3732 sysv4 | sysv4.2uw2* | sysv4.3*)
3733 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3734 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3735 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739 if test -d /usr/nec ;then
3740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3741 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3745 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3746 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3747 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3748 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3752 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3753 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3757 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3758 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3762 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3766 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
3769 # Check to make sure the PIC flag actually works.
3771 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
3772 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
3773 _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
3774 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC])], [],
3775 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
3777 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3779 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3780 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3783 # For platforms which do not support PIC, -DPIC is meaningless:
3785 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3788 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC])"
3793 # Check to make sure the static flag actually works.
3795 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
3796 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3797 _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
3798 $lt_tmp_static_flag,
3800 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3804 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
3805 # ------------------------------------
3806 # See if the linker supports building shared libraries.
3807 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3808 [AC_REQUIRE([LT_AC_PROG_SED])dnl
3809 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3811 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3812 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3813 _LT_AC_TAGVAR(archive_cmds, $1)=
3814 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3815 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
3816 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3817 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3818 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3819 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
3820 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3821 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3822 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3823 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3824 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3825 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3826 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3827 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3828 _LT_AC_TAGVAR(module_cmds, $1)=
3829 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3830 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3831 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3832 # include_expsyms should be a list of space-separated symbols to be *always*
3833 # included in the symbol list
3834 _LT_AC_TAGVAR(include_expsyms, $1)=
3835 # exclude_expsyms can be an extended regexp of symbols to exclude
3836 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3837 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3838 # as well as any symbol that contains `d'.
3839 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3840 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3841 # platforms (ab)use it in PIC code, but their linkers get confused if
3842 # the symbol is explicitly referenced. Since portable code cannot
3843 # rely on this symbol name, it's probably fine to never include it in
3844 # preloaded symbol tables.
3845 extract_expsyms_cmds=
3846 # Just being paranoid about ensuring that cc_basename is set.
3847 _LT_CC_BASENAME([$compiler])
3849 cygwin* | mingw* | pw32*)
3850 # FIXME: the MSVC++ port hasn't been tested in a loooong time
3851 # When not using gcc, we currently assume that we are using
3852 # Microsoft Visual C++.
3853 if test "$GCC" != yes; then
3858 # we just hope/assume this is gcc and not c89 (= MSVC++)
3866 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3867 if test "$with_gnu_ld" = yes; then
3868 # If archive_cmds runs LD, not CC, wlarc should be empty
3871 # Set some defaults for GNU ld with shared library support. These
3872 # are reset later if shared libraries are not supported. Putting them
3873 # here allows them to be overridden if necessary.
3874 runpath_var=LD_RUN_PATH
3875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3876 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3877 # ancient GNU ld didn't support --whole-archive et. al.
3878 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
3879 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3881 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3883 supports_anon_versioning=no
3884 case `$LD -v 2>/dev/null` in
3885 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3886 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3887 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3888 *\ 2.11.*) ;; # other 2.11 versions
3889 *) supports_anon_versioning=yes ;;
3892 # See if GNU ld supports shared libraries.
3894 aix3* | aix4* | aix5*)
3895 # On AIX/PPC, the GNU linker is very broken
3896 if test "$host_cpu" != ia64; then
3897 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3900 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3901 *** to be unable to reliably create shared libraries on AIX.
3902 *** Therefore, libtool is disabling shared libraries support. If you
3903 *** really care for shared libraries, you may want to modify your PATH
3904 *** so that a non-GNU linker is found, and then restart.
3911 _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)'
3912 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3913 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3915 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3916 # that the semantics of dynamic libraries on AmigaOS, at least up
3917 # to version 4, is to share data among multiple programs linked
3918 # with the same dynamic library. Since this doesn't match the
3919 # behavior of shared libraries on other platforms, we can't use
3921 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3925 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3926 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3927 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3928 # support --undefined. This deserves some investigation. FIXME
3929 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3931 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3935 cygwin* | mingw* | pw32*)
3936 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3937 # as there is no search path for DLLs.
3938 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3939 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3940 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3941 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3942 _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'
3944 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3945 _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'
3946 # If the export-symbols file already is a .def file (1st line
3947 # is EXPORTS), use it as is; otherwise, prepend...
3948 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3949 cp $export_symbols $output_objdir/$soname.def;
3951 echo EXPORTS > $output_objdir/$soname.def;
3952 cat $export_symbols >> $output_objdir/$soname.def;
3954 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3956 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3961 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3962 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3963 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3964 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3965 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3966 # Instead, shared libraries are loaded at an image base (0x10000000 by
3967 # default) and relocated if they conflict, which is a slow very memory
3968 # consuming and fragmenting process. To avoid this, we pick a random,
3969 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3970 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3971 _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'
3972 _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'
3975 gnu* | linux* | k*bsd*-gnu)
3976 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3978 case $cc_basename,$host_cpu in
3979 pgcc*) # Portland Group C compiler
3980 _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'
3981 tmp_addflag=' $pic_flag'
3983 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
3984 _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'
3985 tmp_addflag=' $pic_flag -Mnomain' ;;
3986 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
3987 tmp_addflag=' -i_dynamic' ;;
3988 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
3989 tmp_addflag=' -i_dynamic -nofor_main' ;;
3990 ifc* | ifort*) # Intel Fortran compiler
3991 tmp_addflag=' -nofor_main' ;;
3993 case `$CC -V 2>&1 | sed 5q` in
3994 *Sun\ C*) # Sun C 5.9
3995 _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'
3996 tmp_sharedflag='-G' ;;
3997 *Sun\ F*) # Sun Fortran 8.3
3998 tmp_sharedflag='-G' ;;
4000 tmp_sharedflag='-shared' ;;
4002 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4004 if test $supports_anon_versioning = yes; then
4005 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
4006 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4007 $echo "local: *; };" >> $output_objdir/$libname.ver~
4008 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4011 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4016 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4017 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4020 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4021 _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'
4026 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
4027 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4030 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4031 *** create shared libraries on Solaris systems. Therefore, libtool
4032 *** is disabling shared libraries support. We urge you to upgrade GNU
4033 *** binutils to release 2.9.1 or newer. Another option is to modify
4034 *** your PATH or compiler configuration so that the native linker is
4035 *** used, and then restart.
4038 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4039 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4040 _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'
4042 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4046 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4047 case `$LD -v 2>&1` in
4048 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4049 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4052 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4053 *** reliably create shared libraries on SCO systems. Therefore, libtool
4054 *** is disabling shared libraries support. We urge you to upgrade GNU
4055 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4056 *** your PATH or compiler configuration so that the native linker is
4057 *** used, and then restart.
4062 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4063 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
4064 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
4065 _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'
4067 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4074 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4076 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4077 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4081 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4083 _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'
4085 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4090 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
4092 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4093 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4094 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4097 # PORTME fill in a description of your system's linker (not GNU ld)
4100 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4101 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4102 _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'
4103 # Note: this linker hardcodes the directories in LIBPATH if there
4104 # are no directories specified by -L.
4105 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4106 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4107 # Neither direct hardcoding nor static linking is supported with a
4109 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4114 if test "$host_cpu" = ia64; then
4115 # On IA64, the linker does run time linking by default, so we don't
4116 # have to do anything special.
4117 aix_use_runtimelinking=no
4118 exp_sym_flag='-Bexport'
4121 # If we're using GNU nm, then we don't want the "-C" option.
4122 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4123 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4124 _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'
4126 _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'
4128 aix_use_runtimelinking=no
4130 # Test if we are trying to use run time linking or normal
4131 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4132 # need to do runtime linking.
4133 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4134 for ld_flag in $LDFLAGS; do
4135 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4136 aix_use_runtimelinking=yes
4143 exp_sym_flag='-bexport'
4144 no_entry_flag='-bnoentry'
4147 # When large executables or shared objects are built, AIX ld can
4148 # have problems creating the table of contents. If linking a library
4149 # or program results in "error TOC overflow" add -mminimal-toc to
4150 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4151 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4153 _LT_AC_TAGVAR(archive_cmds, $1)=''
4154 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4155 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4156 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4158 if test "$GCC" = yes; then
4159 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4160 # We only want to do this on AIX 4.2 and lower, the check
4161 # below for broken collect2 doesn't work under 4.3+
4162 collect2name=`${CC} -print-prog-name=collect2`
4163 if test -f "$collect2name" && \
4164 strings "$collect2name" | grep resolve_lib_name >/dev/null
4166 # We have reworked collect2
4169 # We have old collect2
4170 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4171 # It fails to find uninstalled libraries when the uninstalled
4172 # path is not listed in the libpath. Setting hardcode_minus_L
4173 # to unsupported forces relinking
4174 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4175 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4176 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4180 shared_flag='-shared'
4181 if test "$aix_use_runtimelinking" = yes; then
4182 shared_flag="$shared_flag "'${wl}-G'
4186 if test "$host_cpu" = ia64; then
4187 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4188 # chokes on -Wl,-G. The following line is correct:
4191 if test "$aix_use_runtimelinking" = yes; then
4192 shared_flag='${wl}-G'
4194 shared_flag='${wl}-bM:SRE'
4199 # It seems that -bexpall does not export symbols beginning with
4200 # underscore (_), so it is better to generate a list of symbols to export.
4201 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4202 if test "$aix_use_runtimelinking" = yes; then
4203 # Warning - without using the other runtime loading flags (-brtl),
4204 # -berok will link without error, but may produce a broken library.
4205 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4206 # Determine the default libpath from the value encoded in an empty executable.
4207 _LT_AC_SYS_LIBPATH_AIX
4208 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4209 _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"
4211 if test "$host_cpu" = ia64; then
4212 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4213 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4214 _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"
4216 # Determine the default libpath from the value encoded in an empty executable.
4217 _LT_AC_SYS_LIBPATH_AIX
4218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4219 # Warning - without using the other run time loading flags,
4220 # -berok will link without error, but may produce a broken library.
4221 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4222 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4223 # Exported symbols can be pulled into shared objects from archives
4224 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4225 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4226 # This is similar to how AIX traditionally builds its shared libraries.
4227 _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'
4233 _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)'
4234 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4235 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4236 # see comment about different semantics on the GNU ld section
4237 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4241 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4244 cygwin* | mingw* | pw32*)
4245 # When not using gcc, we currently assume that we are using
4246 # Microsoft Visual C++.
4247 # hardcode_libdir_flag_spec is actually meaningless, as there is
4248 # no search path for DLLs.
4249 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4250 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4251 # Tell ltmain to make .lib files, not .a files.
4253 # Tell ltmain to make .dll files, not .so files.
4255 # FIXME: Setting linknames here is a bad hack.
4256 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
4257 # The linker will automatically build a .lib file if we build a DLL.
4258 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4259 # FIXME: Should let the user specify the lib program.
4260 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4261 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4262 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4265 darwin* | rhapsody*)
4267 rhapsody* | darwin1.[[012]])
4268 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4271 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4272 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4274 case ${MACOSX_DEPLOYMENT_TARGET} in
4276 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4279 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4285 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4286 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4287 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4288 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4289 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4290 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4291 if test "$GCC" = yes ; then
4292 output_verbose_link_cmd='echo'
4293 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4294 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4295 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4296 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4297 _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}'
4299 case $cc_basename in
4301 output_verbose_link_cmd='echo'
4302 _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'
4303 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4304 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4305 _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}'
4306 _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}'
4309 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4316 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4317 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4318 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4322 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4325 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4326 # support. Future versions do this automatically, but an explicit c++rt0.o
4327 # does not break anything, and helps significantly (at the cost of a little
4330 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4331 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4332 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4333 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4336 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4338 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4339 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4340 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4341 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4344 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4345 freebsd* | dragonfly*)
4346 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4347 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4348 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4349 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4353 if test "$GCC" = yes; then
4354 _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'
4356 _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'
4358 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4359 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4360 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4362 # hardcode_minus_L: Not really in the search PATH,
4363 # but as the default location of the library.
4364 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4365 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4370 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4372 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4374 if test "$with_gnu_ld" = no; then
4375 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4376 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4378 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4379 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4381 # hardcode_minus_L: Not really in the search PATH,
4382 # but as the default location of the library.
4383 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4388 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4391 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4394 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4397 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4403 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4406 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4409 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4413 if test "$with_gnu_ld" = no; then
4414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4415 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4419 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4420 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4421 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4424 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4425 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4427 # hardcode_minus_L: Not really in the search PATH,
4428 # but as the default location of the library.
4429 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4435 irix5* | irix6* | nonstopux*)
4436 if test "$GCC" = yes; then
4437 _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'
4439 _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'
4440 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4442 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4443 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4444 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4448 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4449 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4451 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4453 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4454 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4455 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4459 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4460 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4463 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4467 if test -f /usr/libexec/ld.so; then
4468 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4469 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4470 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4471 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4472 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4473 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4474 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4477 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4478 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4479 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4482 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4483 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4488 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4493 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4494 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4495 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4496 _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'
4497 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4501 if test "$GCC" = yes; then
4502 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4503 _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'
4505 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4506 _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'
4508 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4509 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4512 osf4* | osf5*) # as osf3* with the addition of -msym flag
4513 if test "$GCC" = yes; then
4514 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4515 _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'
4516 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4518 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4519 _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'
4520 _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~
4521 $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'
4523 # Both c and cxx compiler support -rpath directly
4524 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4526 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4530 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4531 if test "$GCC" = yes; then
4533 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4534 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4535 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4538 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4539 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4540 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4542 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4543 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4545 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4547 # The compiler driver will combine and reorder linker options,
4548 # but understands `-z linker_flag'. GCC discards it without `$wl',
4549 # but is careful enough not to reorder.
4550 # Supported since Solaris 2.6 (maybe 2.5.1?)
4551 if test "$GCC" = yes; then
4552 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4554 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4558 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4562 if test "x$host_vendor" = xsequent; then
4563 # Use $CC to link under sequent, because it throws in some extra .o
4564 # files that make .init and .fini sections work.
4565 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4567 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4569 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4570 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4571 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4572 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4576 case $host_vendor in
4578 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4579 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4582 ## LD is ld it makes a PLAMLIB
4583 ## CC just makes a GrossModule.
4584 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4585 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4586 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4589 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4590 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4593 runpath_var='LD_RUN_PATH'
4594 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4598 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4599 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4600 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4604 if test -d /usr/nec; then
4605 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4606 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4607 runpath_var=LD_RUN_PATH
4608 hardcode_runpath_var=yes
4609 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4613 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4614 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4615 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4616 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4617 runpath_var='LD_RUN_PATH'
4619 if test "$GCC" = yes; then
4620 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4621 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4623 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4624 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4628 sysv5* | sco3.2v5* | sco5v6*)
4629 # Note: We can NOT use -z defs as we might desire, because we do not
4630 # link with -lc, and that would cause any symbols used from libc to
4631 # always be unresolved, which means just about no library would
4632 # ever link correctly. If we're not using GNU ld we use -z text
4633 # though, which does catch some bad symbols but isn't as heavy-handed
4635 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4636 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4637 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4638 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4639 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4640 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4641 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4642 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4643 runpath_var='LD_RUN_PATH'
4645 if test "$GCC" = yes; then
4646 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4647 _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'
4649 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4650 _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'
4655 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4656 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4657 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4661 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4665 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4666 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4669 # Do we need to explicitly link libc?
4671 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
4673 # Assume -lc should be added
4674 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4676 if test "$enable_shared" = yes && test "$GCC" = yes; then
4677 case $_LT_AC_TAGVAR(archive_cmds, $1) in
4679 # FIXME: we may have to deal with multi-command sequences.
4682 # Test whether the compiler implicitly links with -lc since on some
4683 # systems, -lgcc has to come before -lc. If gcc already passes -lc
4684 # to ld, don't add -lc before -lgcc.
4685 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4687 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4689 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4692 libobjs=conftest.$ac_objext
4694 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4695 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4701 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
4702 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4703 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
4705 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4707 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4709 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4711 cat conftest.err 1>&5
4714 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
4720 ])# AC_LIBTOOL_PROG_LD_SHLIBS
4723 # _LT_AC_FILE_LTDLL_C
4724 # -------------------
4725 # Be careful that the start marker always follows a newline.
4726 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
4727 # /* ltdll.c starts here */
4728 # #define WIN32_LEAN_AND_MEAN
4729 # #include <windows.h>
4730 # #undef WIN32_LEAN_AND_MEAN
4731 # #include <stdio.h>
4733 # #ifndef __CYGWIN__
4734 # # ifdef __CYGWIN32__
4735 # # define __CYGWIN__ __CYGWIN32__
4739 # #ifdef __cplusplus
4742 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
4743 # #ifdef __cplusplus
4748 # #include <cygwin/cygwin_dll.h>
4749 # DECLARE_CYGWIN_DLL( DllMain );
4751 # HINSTANCE __hDllInstance_base;
4754 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
4756 # __hDllInstance_base = hInst;
4759 # /* ltdll.c ends here */
4760 ])# _LT_AC_FILE_LTDLL_C
4763 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
4764 # ---------------------------------
4765 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
4769 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4770 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4771 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4772 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4773 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4774 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4775 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4777 # This is just to silence aclocal about the macro not being used
4778 ifelse([AC_DISABLE_FAST_INSTALL])
4780 AC_DEFUN([LT_AC_PROG_RC],
4781 [AC_CHECK_TOOL(RC, windres, no)
4785 # Cheap backport of AS_EXECUTABLE_P and required macros
4786 # from Autoconf 2.59; we should not use $as_executable_p directly.
4790 m4_ifndef([_AS_TEST_PREPARE],
4791 [m4_defun([_AS_TEST_PREPARE],
4792 [if test -x / >/dev/null 2>&1; then
4793 as_executable_p='test -x'
4795 as_executable_p='test -f'
4797 ])])# _AS_TEST_PREPARE
4801 # Check whether a file is executable.
4802 m4_ifndef([AS_EXECUTABLE_P],
4803 [m4_defun([AS_EXECUTABLE_P],
4804 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
4805 $as_executable_p $1[]dnl
4806 ])])# AS_EXECUTABLE_P
4808 ############################################################
4809 # NOTE: This macro has been submitted for inclusion into #
4810 # GNU Autoconf as AC_PROG_SED. When it is available in #
4811 # a released version of Autoconf we should remove this #
4812 # macro and use it instead. #
4813 ############################################################
4816 # Check for a fully-functional sed program, that truncates
4817 # as few characters as possible. Prefer GNU sed if found.
4818 AC_DEFUN([LT_AC_PROG_SED],
4819 [AC_MSG_CHECKING([for a sed that does not truncate output])
4820 AC_CACHE_VAL(lt_cv_path_SED,
4821 [# Loop through the user's path and test for sed and gsed.
4822 # Then use that list of sed's as ones to test for truncation.
4823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827 test -z "$as_dir" && as_dir=.
4828 for lt_ac_prog in sed gsed; do
4829 for ac_exec_ext in '' $ac_executable_extensions; do
4830 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
4831 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4839 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4840 # along with /bin/sed that truncates output.
4841 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
4842 test ! -f $lt_ac_sed && continue
4843 cat /dev/null > conftest.in
4845 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
4846 # Check for GNU sed and select it if it is found.
4847 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
4848 lt_cv_path_SED=$lt_ac_sed
4852 cat conftest.in conftest.in >conftest.tmp
4853 mv conftest.tmp conftest.in
4854 cp conftest.in conftest.nl
4856 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
4857 cmp -s conftest.out conftest.nl || break
4858 # 10000 chars as input seems more than enough
4859 test $lt_ac_count -gt 10 && break
4860 lt_ac_count=`expr $lt_ac_count + 1`
4861 if test $lt_ac_count -gt $lt_ac_max; then
4862 lt_ac_max=$lt_ac_count
4863 lt_cv_path_SED=$lt_ac_sed
4870 AC_MSG_RESULT([$SED])
4874 dnl Add some custom macros for pacman and libalpm
4876 dnl GCC_STACK_PROTECT_LIB
4877 dnl adds -lssp to LIBS if it is available
4878 dnl ssp is usually provided as part of libc, but was previously a separate lib
4879 dnl It does not hurt to add -lssp even if libc provides SSP - in that case
4880 dnl libssp will simply be ignored.
4881 AC_DEFUN([GCC_STACK_PROTECT_LIB],[
4882 AC_CACHE_CHECK([whether libssp exists], ssp_cv_lib,
4883 [ssp_old_libs="$LIBS"
4885 AC_TRY_LINK(,, ssp_cv_lib=yes, ssp_cv_lib=no)
4886 LIBS="$ssp_old_libs"
4888 if test $ssp_cv_lib = yes; then
4893 dnl GCC_STACK_PROTECT_CC
4894 dnl checks -fstack-protector-all with the C compiler, if it exists then updates
4895 dnl CFLAGS and defines ENABLE_SSP_CC
4896 AC_DEFUN([GCC_STACK_PROTECT_CC],[
4898 if test "X$CC" != "X"; then
4899 AC_CACHE_CHECK([whether ${CC} accepts -fstack-protector-all],
4901 [ssp_old_cflags="$CFLAGS"
4902 CFLAGS="$CFLAGS -fstack-protector-all"
4903 AC_TRY_COMPILE(,, ssp_cv_cc=yes, ssp_cv_cc=no)
4904 CFLAGS="$ssp_old_cflags"
4906 if test $ssp_cv_cc = yes; then
4907 CFLAGS="$CFLAGS -fstack-protector-all"
4908 AC_DEFINE([ENABLE_SSP_CC], 1, [Define if SSP C support is enabled.])
4913 dnl GCC_VISIBILITY_CC
4914 dnl checks -fvisibility=internal with the C compiler, if it exists then
4915 dnl defines ENABLE_VISIBILITY_CC in both configure script and Makefiles
4916 AC_DEFUN([GCC_VISIBILITY_CC],[
4918 if test "X$CC" != "X"; then
4919 AC_CACHE_CHECK([whether ${CC} accepts -fvisibility=internal],
4921 [visibility_old_cflags="$CFLAGS"
4922 CFLAGS="$CFLAGS -fvisibility=internal"
4923 AC_TRY_COMPILE(,, visibility_cv_cc=yes, visibility_cv_cc=no)
4924 CFLAGS="$visibility_old_cflags"
4926 if test $visibility_cv_cc = yes; then
4927 AC_DEFINE([ENABLE_VISIBILITY_CC], 1, [Define if symbol visibility C support is enabled.])
4929 AM_CONDITIONAL([ENABLE_VISIBILITY_CC], test "x$visibility_cv_cc" = "xyes")
4933 dnl GCC_GNU89_INLINE_CC
4934 dnl checks -fgnu89-inline with the C compiler, if it exists then defines
4935 dnl ENABLE_GNU89_INLINE_CC in both configure script and Makefiles
4936 AC_DEFUN([GCC_GNU89_INLINE_CC],[
4938 if test "X$CC" != "X"; then
4939 AC_CACHE_CHECK([for -fgnu89-inline],
4941 [ gnu89_inline_old_cflags="$CFLAGS"
4942 CFLAGS="$CFLAGS -fgnu89-inline"
4943 AC_TRY_COMPILE(,, gnu89_inline_cv_cc=yes, gnu89_inline_cv_cc=no)
4944 CFLAGS="$gnu89_inline_old_cflags"
4946 if test $gnu89_inline_cv_cc = yes; then
4947 AC_DEFINE([ENABLE_GNU89_INLINE_CC], 1, [Define if gnu89 inlining semantics should be used.])
4949 AM_CONDITIONAL([ENABLE_GNU89_INLINE_CC], test "x$gnu89_inline_cv_cc" = "xyes")