1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
3 ## Free Software Foundation, Inc.
4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 ## This file is free software; the Free Software Foundation gives
7 ## unlimited permission to copy and/or distribute it, with or without
8 ## modifications, as long as this notice is preserved.
10 # serial 47 AC_PROG_LIBTOOL
13 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
14 # -----------------------------------------------------------
15 # If this macro is not defined by Autoconf, define it here.
16 m4_ifdef([AC_PROVIDE_IFELSE],
18 [m4_define([AC_PROVIDE_IFELSE],
19 [m4_ifdef([AC_PROVIDE_$1],
25 AC_DEFUN([AC_PROG_LIBTOOL],
26 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
27 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
28 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
29 AC_PROVIDE_IFELSE([AC_PROG_CXX],
31 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
33 dnl And a similar setup for Fortran 77 support
34 AC_PROVIDE_IFELSE([AC_PROG_F77],
36 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
39 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
40 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
41 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
42 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
44 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
46 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
49 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
50 ifdef([A][M_PROG_GCJ],
51 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
52 ifdef([LT_AC_PROG_GCJ],
53 [define([LT_AC_PROG_GCJ],
54 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
60 AC_DEFUN([_AC_PROG_LIBTOOL],
61 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
62 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
63 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
64 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
66 # This can be used to rebuild libtool when needed
67 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
69 # Always use our own libtool.
70 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
73 # Prevent multiple expansion
74 define([AC_PROG_LIBTOOL], [])
80 AC_DEFUN([AC_LIBTOOL_SETUP],
82 AC_REQUIRE([AC_ENABLE_SHARED])dnl
83 AC_REQUIRE([AC_ENABLE_STATIC])dnl
84 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
85 AC_REQUIRE([AC_CANONICAL_HOST])dnl
86 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
87 AC_REQUIRE([AC_PROG_CC])dnl
88 AC_REQUIRE([AC_PROG_LD])dnl
89 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
90 AC_REQUIRE([AC_PROG_NM])dnl
92 AC_REQUIRE([AC_PROG_LN_S])dnl
93 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
94 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
95 AC_REQUIRE([AC_OBJEXT])dnl
96 AC_REQUIRE([AC_EXEEXT])dnl
99 AC_LIBTOOL_SYS_MAX_CMD_LEN
100 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
103 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
104 _LT_AC_PROG_ECHO_BACKSLASH
108 # AIX sometimes has problems with the GCC collect2 program. For some
109 # reason, if we set the COLLECT_NAMES environment variable, the problems
110 # vanish in a puff of smoke.
111 if test "X${COLLECT_NAMES+set}" != Xset; then
118 # Sed substitution that helps us do robust quoting. It backslashifies
119 # metacharacters that are still active within double-quoted strings.
120 Xsed='sed -e 1s/^X//'
121 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
123 # Same as above, but do not quote variable references.
124 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
126 # Sed substitution to delay expansion of an escaped shell variable in a
127 # double_quote_subst'ed string.
128 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
130 # Sed substitution to avoid accidental globbing in evaled expressions
131 no_glob_subst='s/\*/\\\*/g'
137 default_ofile=libtool
140 # All known linkers require a `.a' archive for static linking (except MSVC,
141 # which needs '.lib').
143 ltmain="$ac_aux_dir/ltmain.sh"
144 ofile="$default_ofile"
145 with_gnu_ld="$lt_cv_prog_gnu_ld"
147 AC_CHECK_TOOL(AR, ar, false)
148 AC_CHECK_TOOL(RANLIB, ranlib, :)
149 AC_CHECK_TOOL(STRIP, strip, :)
154 # Set sane defaults for various variables
155 test -z "$AR" && AR=ar
156 test -z "$AR_FLAGS" && AR_FLAGS=cru
157 test -z "$AS" && AS=as
158 test -z "$CC" && CC=cc
159 test -z "$LTCC" && LTCC=$CC
160 test -z "$DLLTOOL" && DLLTOOL=dlltool
161 test -z "$LD" && LD=ld
162 test -z "$LN_S" && LN_S="ln -s"
163 test -z "$MAGIC_CMD" && MAGIC_CMD=file
164 test -z "$NM" && NM=nm
165 test -z "$SED" && SED=sed
166 test -z "$OBJDUMP" && OBJDUMP=objdump
167 test -z "$RANLIB" && RANLIB=:
168 test -z "$STRIP" && STRIP=:
169 test -z "$ac_objext" && ac_objext=o
171 # Determine commands to create old-style static archives.
172 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
173 old_postinstall_cmds='chmod 644 $oldlib'
174 old_postuninstall_cmds=
176 if test -n "$RANLIB"; then
179 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
182 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
185 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
188 _LT_CC_BASENAME([$compiler])
190 # Only perform the check for file, if the check method requires it
191 case $deplibs_check_method in
193 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
199 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
200 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
201 enable_win32_dll=yes, enable_win32_dll=no)
203 AC_ARG_ENABLE([libtool-lock],
204 [AC_HELP_STRING([--disable-libtool-lock],
205 [avoid locking (might break parallel builds)])])
206 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
209 [AC_HELP_STRING([--with-pic],
210 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
211 [pic_mode="$withval"],
213 test -z "$pic_mode" && pic_mode=default
215 # Use C for the default configuration in the libtool script
217 AC_LIBTOOL_LANG_C_CONFIG
222 # _LT_AC_SYS_COMPILER
223 # -------------------
224 AC_DEFUN([_LT_AC_SYS_COMPILER],
225 [AC_REQUIRE([AC_PROG_CC])dnl
227 # If no C compiler was specified, use CC.
230 # Allow CC to be a program name with arguments.
232 ])# _LT_AC_SYS_COMPILER
235 # _LT_CC_BASENAME(CC)
236 # -------------------
237 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
238 AC_DEFUN([_LT_CC_BASENAME],
239 [for cc_temp in $1""; do
241 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
242 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
247 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
251 # _LT_COMPILER_BOILERPLATE
252 # ------------------------
253 # Check for compiler boilerplate output or warnings with
254 # the simple compiler test code.
255 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
256 [ac_outfile=conftest.$ac_objext
257 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
258 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
259 _lt_compiler_boilerplate=`cat conftest.err`
261 ])# _LT_COMPILER_BOILERPLATE
264 # _LT_LINKER_BOILERPLATE
265 # ----------------------
266 # Check for linker boilerplate output or warnings with
267 # the simple link test code.
268 AC_DEFUN([_LT_LINKER_BOILERPLATE],
269 [ac_outfile=conftest.$ac_objext
270 printf "$lt_simple_link_test_code" >conftest.$ac_ext
271 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
272 _lt_linker_boilerplate=`cat conftest.err`
274 ])# _LT_LINKER_BOILERPLATE
277 # _LT_AC_SYS_LIBPATH_AIX
278 # ----------------------
279 # Links a minimal program and checks the executable
280 # for the system default hardcoded library path. In most cases,
281 # this is /usr/lib:/lib, but when the MPI compilers are used
282 # the location of the communication and MPI libs are included too.
283 # If we don't find anything, use the default library path according
284 # to the aix ld manual.
285 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
286 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
287 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
289 # Check for a 64-bit object if we didn't find anything.
290 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
292 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
293 ])# _LT_AC_SYS_LIBPATH_AIX
296 # _LT_AC_SHELL_INIT(ARG)
297 # ----------------------
298 AC_DEFUN([_LT_AC_SHELL_INIT],
299 [ifdef([AC_DIVERSION_NOTICE],
300 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
301 [AC_DIVERT_PUSH(NOTICE)])
304 ])# _LT_AC_SHELL_INIT
307 # _LT_AC_PROG_ECHO_BACKSLASH
308 # --------------------------
309 # Add some code to the start of the generated configure script which
310 # will find an echo command which doesn't interpret backslashes.
311 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
313 # Check that we are running under the correct shell.
314 SHELL=${CONFIG_SHELL-/bin/sh}
318 # Remove one level of quotation (which was required for Make).
319 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
324 if test "X[$]1" = X--no-reexec; then
325 # Discard the --no-reexec flag, and continue.
327 elif test "X[$]1" = X--fallback-echo; then
328 # Avoid inline document here, it may be left over
330 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
331 # Yippee, $echo works!
334 # Restart under the correct shell.
335 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
338 if test "X[$]1" = X--fallback-echo; then
339 # used as fallback echo
347 # The HP-UX ksh and POSIX shell print the target directory to stdout
349 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
351 if test -z "$ECHO"; then
352 if test "X${echo_test_string+set}" != Xset; then
353 # find a string as large as possible, as long as the shell can cope with it
354 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
355 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
356 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
357 echo_test_string=`eval $cmd` &&
358 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
365 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
366 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
367 test "X$echo_testing_string" = "X$echo_test_string"; then
370 # The Solaris, AIX, and Digital Unix default echo programs unquote
371 # backslashes. This makes it impossible to quote backslashes using
372 # echo "$something" | sed 's/\\/\\\\/g'
374 # So, first we look for a working echo in the user's PATH.
376 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
377 for dir in $PATH /usr/ucb; do
379 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
380 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
381 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
382 test "X$echo_testing_string" = "X$echo_test_string"; then
389 if test "X$echo" = Xecho; then
390 # We didn't find a better echo, so look for alternatives.
391 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
392 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
393 test "X$echo_testing_string" = "X$echo_test_string"; then
394 # This shell has a builtin print -r that does the trick.
396 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
397 test "X$CONFIG_SHELL" != X/bin/ksh; then
398 # If we have ksh, try running configure again with it.
399 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
400 export ORIGINAL_CONFIG_SHELL
401 CONFIG_SHELL=/bin/ksh
403 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
407 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
408 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
409 test "X$echo_testing_string" = "X$echo_test_string"; then
412 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
413 test "X$echo_testing_string" = 'X\t' &&
414 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
415 test "X$echo_testing_string" = "X$echo_test_string"; then
416 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
418 SHELL="$CONFIG_SHELL"
420 echo="$CONFIG_SHELL [$]0 --fallback-echo"
421 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
422 test "X$echo_testing_string" = 'X\t' &&
423 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
424 test "X$echo_testing_string" = "X$echo_test_string"; then
425 echo="$CONFIG_SHELL [$]0 --fallback-echo"
427 # maybe with a smaller string...
430 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
431 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
438 if test "$prev" != 'sed 50q "[$]0"'; then
439 echo_test_string=`eval $prev`
440 export echo_test_string
441 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
443 # Oops. We lost completely, so just stick with echo.
452 # Copy echo and quote the copy suitably for passing to libtool from
453 # the Makefile, instead of quoting the original, which is used later.
455 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
456 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
460 ])])# _LT_AC_PROG_ECHO_BACKSLASH
465 AC_DEFUN([_LT_AC_LOCK],
466 [AC_ARG_ENABLE([libtool-lock],
467 [AC_HELP_STRING([--disable-libtool-lock],
468 [avoid locking (might break parallel builds)])])
469 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
471 # Some flags need to be propagated to the compiler or linker for good
475 # Find out which ABI we are using.
476 echo 'int i;' > conftest.$ac_ext
477 if AC_TRY_EVAL(ac_compile); then
478 case `/usr/bin/file conftest.$ac_objext` in
490 # Find out which ABI we are using.
491 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
492 if AC_TRY_EVAL(ac_compile); then
493 if test "$lt_cv_prog_gnu_ld" = yes; then
494 case `/usr/bin/file conftest.$ac_objext` in
496 LD="${LD-ld} -melf32bsmip"
499 LD="${LD-ld} -melf32bmipn32"
502 LD="${LD-ld} -melf64bmip"
506 case `/usr/bin/file conftest.$ac_objext` in
522 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
523 # Find out which ABI we are using.
524 echo 'int i;' > conftest.$ac_ext
525 if AC_TRY_EVAL(ac_compile); then
526 case `/usr/bin/file conftest.o` in
530 LD="${LD-ld} -m elf_i386"
532 ppc64-*linux*|powerpc64-*linux*)
533 LD="${LD-ld} -m elf32ppclinux"
536 LD="${LD-ld} -m elf_s390"
539 LD="${LD-ld} -m elf32_sparc"
546 LD="${LD-ld} -m elf_x86_64"
548 ppc*-*linux*|powerpc*-*linux*)
549 LD="${LD-ld} -m elf64ppc"
552 LD="${LD-ld} -m elf64_s390"
555 LD="${LD-ld} -m elf64_sparc"
565 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
566 SAVE_CFLAGS="$CFLAGS"
567 CFLAGS="$CFLAGS -belf"
568 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
570 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
572 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
573 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
574 CFLAGS="$SAVE_CFLAGS"
577 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
578 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
579 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
580 AC_CHECK_TOOL(AS, as, false)
581 AC_CHECK_TOOL(OBJDUMP, objdump, false)
586 need_locks="$enable_libtool_lock"
591 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
592 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
593 # ----------------------------------------------------------------
594 # Check whether the given compiler option works
595 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
596 [AC_REQUIRE([LT_AC_PROG_SED])
597 AC_CACHE_CHECK([$1], [$2],
599 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
600 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
601 lt_compiler_flag="$3"
602 # Insert the option either (1) after the last *FLAGS variable, or
603 # (2) before a word containing "conftest.", or (3) at the end.
604 # Note that $ac_compile itself does not contain backslashes and begins
605 # with a dollar sign (not a hyphen), so the echo should work correctly.
606 # The option is referenced via a variable to avoid confusing sed.
607 lt_compile=`echo "$ac_compile" | $SED \
608 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
609 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
610 -e 's:$: $lt_compiler_flag:'`
611 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
612 (eval "$lt_compile" 2>conftest.err)
614 cat conftest.err >&AS_MESSAGE_LOG_FD
615 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
616 if (exit $ac_status) && test -s "$ac_outfile"; then
617 # The compiler can only warn and ignore the option if not recognized
618 # So say no if there are warnings other than the usual output.
619 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
620 $SED '/^$/d' conftest.err >conftest.er2
621 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
628 if test x"[$]$2" = xyes; then
629 ifelse([$5], , :, [$5])
631 ifelse([$6], , :, [$6])
633 ])# AC_LIBTOOL_COMPILER_OPTION
636 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
637 # [ACTION-SUCCESS], [ACTION-FAILURE])
638 # ------------------------------------------------------------
639 # Check whether the given compiler option works
640 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
641 [AC_CACHE_CHECK([$1], [$2],
643 save_LDFLAGS="$LDFLAGS"
644 LDFLAGS="$LDFLAGS $3"
645 printf "$lt_simple_link_test_code" > conftest.$ac_ext
646 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
647 # The linker can only warn and ignore the option if not recognized
648 # So say no if there are warnings
649 if test -s conftest.err; then
650 # Append any errors to the config.log.
651 cat conftest.err 1>&AS_MESSAGE_LOG_FD
652 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
653 $SED '/^$/d' conftest.err >conftest.er2
654 if diff conftest.exp conftest.er2 >/dev/null; then
662 LDFLAGS="$save_LDFLAGS"
665 if test x"[$]$2" = xyes; then
666 ifelse([$4], , :, [$4])
668 ifelse([$5], , :, [$5])
670 ])# AC_LIBTOOL_LINKER_OPTION
673 # AC_LIBTOOL_SYS_MAX_CMD_LEN
674 # --------------------------
675 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
676 [# find the maximum length of command line arguments
677 AC_MSG_CHECKING([the maximum length of command line arguments])
678 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
684 # On DJGPP, this test can blow up pretty badly due to problems in libc
685 # (any single argument exceeding 2000 bytes causes a buffer overrun
686 # during glob expansion). Even if it were fixed, the result of this
687 # check would be larger than it should be.
688 lt_cv_sys_max_cmd_len=12288; # 12K is about right
692 # Under GNU Hurd, this test is not required because there is
693 # no limit to the length of command line arguments.
694 # Libtool will interpret -1 as no limit whatsoever
695 lt_cv_sys_max_cmd_len=-1;
699 # On Win9x/ME, this test blows up -- it succeeds, but takes
700 # about 5 minutes as the teststring grows exponentially.
701 # Worse, since 9x/ME are not pre-emptively multitasking,
702 # you end up with a "frozen" computer, even though with patience
703 # the test eventually succeeds (with a max line length of 256k).
704 # Instead, let's just punt: use the minimum linelength reported by
705 # all of the supported platforms: 8192 (on NT/2K/XP).
706 lt_cv_sys_max_cmd_len=8192;
710 # On AmigaOS with pdksh, this test takes hours, literally.
711 # So we just punt and use a minimum line length of 8192.
712 lt_cv_sys_max_cmd_len=8192;
715 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
716 # This has been around since 386BSD, at least. Likely further.
717 if test -x /sbin/sysctl; then
718 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
719 elif test -x /usr/sbin/sysctl; then
720 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
722 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
724 # And add a safety zone
725 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
729 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
730 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
731 # nice to cause kernel panics so lets avoid the loop below.
732 # First set a reasonable default.
733 lt_cv_sys_max_cmd_len=16384
735 if test -x /sbin/sysconfig; then
736 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
737 *1*) lt_cv_sys_max_cmd_len=-1 ;;
742 # If test is not a shell built-in, we'll probably end up computing a
743 # maximum length that is only half of the actual maximum length, but
745 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
746 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
747 = "XX$teststring") >/dev/null 2>&1 &&
748 new_result=`expr "X$teststring" : ".*" 2>&1` &&
749 lt_cv_sys_max_cmd_len=$new_result &&
750 test $i != 17 # 1/2 MB should be enough
753 teststring=$teststring$teststring
756 # Add a significant safety factor because C++ compilers can tack on massive
757 # amounts of additional arguments before passing them to the linker.
758 # It appears as though 1/2 is a usable value.
759 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
763 if test -n $lt_cv_sys_max_cmd_len ; then
764 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
768 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
772 # --------------------
773 AC_DEFUN([_LT_AC_CHECK_DLFCN],
774 [AC_CHECK_HEADERS(dlfcn.h)dnl
775 ])# _LT_AC_CHECK_DLFCN
778 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
779 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
780 # ------------------------------------------------------------------
781 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
782 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
783 if test "$cross_compiling" = yes; then :
786 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
787 lt_status=$lt_dlunknown
788 cat > conftest.$ac_ext <<EOF
789 [#line __oline__ "configure"
790 #include "confdefs.h"
799 # define LT_DLGLOBAL RTLD_GLOBAL
802 # define LT_DLGLOBAL DL_GLOBAL
804 # define LT_DLGLOBAL 0
808 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
809 find out it does not work in some platform. */
810 #ifndef LT_DLLAZY_OR_NOW
812 # define LT_DLLAZY_OR_NOW RTLD_LAZY
815 # define LT_DLLAZY_OR_NOW DL_LAZY
818 # define LT_DLLAZY_OR_NOW RTLD_NOW
821 # define LT_DLLAZY_OR_NOW DL_NOW
823 # define LT_DLLAZY_OR_NOW 0
831 extern "C" void exit (int);
834 void fnord() { int i=42;}
837 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
838 int status = $lt_dlunknown;
842 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
843 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
844 /* dlclose (self); */
850 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
851 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
854 x$lt_dlno_uscore) $1 ;;
855 x$lt_dlneed_uscore) $2 ;;
856 x$lt_unknown|x*) $3 ;;
864 ])# _LT_AC_TRY_DLOPEN_SELF
867 # AC_LIBTOOL_DLOPEN_SELF
868 # -------------------
869 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
870 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
871 if test "x$enable_dlopen" != xyes; then
872 enable_dlopen=unknown
873 enable_dlopen_self=unknown
874 enable_dlopen_self_static=unknown
881 lt_cv_dlopen="load_add_on"
883 lt_cv_dlopen_self=yes
887 lt_cv_dlopen="LoadLibrary"
892 lt_cv_dlopen="dlopen"
897 # if libdl is installed we need to link against it
898 AC_CHECK_LIB([dl], [dlopen],
899 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
902 lt_cv_dlopen_self=yes
907 AC_CHECK_FUNC([shl_load],
908 [lt_cv_dlopen="shl_load"],
909 [AC_CHECK_LIB([dld], [shl_load],
910 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
911 [AC_CHECK_FUNC([dlopen],
912 [lt_cv_dlopen="dlopen"],
913 [AC_CHECK_LIB([dl], [dlopen],
914 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
915 [AC_CHECK_LIB([svld], [dlopen],
916 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
917 [AC_CHECK_LIB([dld], [dld_link],
918 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
927 if test "x$lt_cv_dlopen" != xno; then
933 case $lt_cv_dlopen in
935 save_CPPFLAGS="$CPPFLAGS"
936 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
938 save_LDFLAGS="$LDFLAGS"
939 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
942 LIBS="$lt_cv_dlopen_libs $LIBS"
944 AC_CACHE_CHECK([whether a program can dlopen itself],
945 lt_cv_dlopen_self, [dnl
946 _LT_AC_TRY_DLOPEN_SELF(
947 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
948 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
951 if test "x$lt_cv_dlopen_self" = xyes; then
952 LDFLAGS="$LDFLAGS $link_static_flag"
953 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
954 lt_cv_dlopen_self_static, [dnl
955 _LT_AC_TRY_DLOPEN_SELF(
956 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
957 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
961 CPPFLAGS="$save_CPPFLAGS"
962 LDFLAGS="$save_LDFLAGS"
967 case $lt_cv_dlopen_self in
968 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
969 *) enable_dlopen_self=unknown ;;
972 case $lt_cv_dlopen_self_static in
973 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
974 *) enable_dlopen_self_static=unknown ;;
977 ])# AC_LIBTOOL_DLOPEN_SELF
980 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
981 # ---------------------------------
982 # Check to see if options -c and -o are simultaneously supported by compiler
983 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
984 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
985 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
986 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
987 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
988 $rm -r conftest 2>/dev/null
992 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
994 lt_compiler_flag="-o out/conftest2.$ac_objext"
995 # Insert the option either (1) after the last *FLAGS variable, or
996 # (2) before a word containing "conftest.", or (3) at the end.
997 # Note that $ac_compile itself does not contain backslashes and begins
998 # with a dollar sign (not a hyphen), so the echo should work correctly.
999 lt_compile=`echo "$ac_compile" | $SED \
1000 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1001 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1002 -e 's:$: $lt_compiler_flag:'`
1003 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1004 (eval "$lt_compile" 2>out/conftest.err)
1006 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1007 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1008 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1010 # The compiler can only warn and ignore the option if not recognized
1011 # So say no if there are warnings
1012 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
1013 $SED '/^$/d' out/conftest.err >out/conftest.er2
1014 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1015 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1018 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1020 # SGI C++ compiler will create directory out/ii_files/ for
1021 # template instantiation
1022 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1023 $rm out/* && rmdir out
1028 ])# AC_LIBTOOL_PROG_CC_C_O
1031 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1032 # -----------------------------------------
1033 # Check to see if we can do hard links to lock some files if needed
1034 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1035 [AC_REQUIRE([_LT_AC_LOCK])dnl
1037 hard_links="nottested"
1038 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1039 # do not overwrite the value of need_locks provided by the user
1040 AC_MSG_CHECKING([if we can lock with hard links])
1043 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1045 ln conftest.a conftest.b 2>&5 || hard_links=no
1046 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1047 AC_MSG_RESULT([$hard_links])
1048 if test "$hard_links" = no; then
1049 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1055 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1060 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1061 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1062 [rm -f .libs 2>/dev/null
1063 mkdir .libs 2>/dev/null
1064 if test -d .libs; then
1067 # MS-DOS does not allow filenames that begin with a dot.
1070 rmdir .libs 2>/dev/null])
1071 objdir=$lt_cv_objdir
1072 ])# AC_LIBTOOL_OBJDIR
1075 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1076 # ----------------------------------------------
1077 # Check hardcoding attributes.
1078 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1079 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1080 _LT_AC_TAGVAR(hardcode_action, $1)=
1081 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1082 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1083 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1085 # We can hardcode non-existant directories.
1086 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1087 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1088 # have to relink, otherwise we might link with an installed library
1089 # when we should be linking with a yet-to-be-installed one
1090 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1091 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1092 # Linking always hardcodes the temporary library directory.
1093 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1095 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1096 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1099 # We cannot hardcode anything, or else we can only hardcode existing
1101 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1103 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1105 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1106 # Fast installation is not supported
1107 enable_fast_install=no
1108 elif test "$shlibpath_overrides_runpath" = yes ||
1109 test "$enable_shared" = no; then
1110 # Fast installation is not necessary
1111 enable_fast_install=needless
1113 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1116 # AC_LIBTOOL_SYS_LIB_STRIP
1117 # ------------------------
1118 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1121 AC_MSG_CHECKING([whether stripping libraries is possible])
1122 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1123 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1124 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1125 AC_MSG_RESULT([yes])
1127 # FIXME - insert some real tests, host_os isn't really good enough
1130 if test -n "$STRIP" ; then
1131 striplib="$STRIP -x"
1132 AC_MSG_RESULT([yes])
1142 ])# AC_LIBTOOL_SYS_LIB_STRIP
1145 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1146 # -----------------------------
1147 # PORTME Fill in your ld.so characteristics
1148 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1149 [AC_MSG_CHECKING([dynamic linker characteristics])
1151 libname_spec='lib$name'
1159 shlibpath_overrides_runpath=unknown
1161 dynamic_linker="$host_os ld.so"
1162 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1163 if test "$GCC" = yes; then
1164 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1165 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1166 # if the path contains ";" then we assume it to be the separator
1167 # otherwise default to the standard path separator (i.e. ":") - it is
1168 # assumed that no part of a normal pathname contains ";" but that should
1169 # okay in the real world where ";" in dirpaths is itself problematic.
1170 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1172 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1175 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1177 need_lib_prefix=unknown
1178 hardcode_into_libs=no
1180 # when you set need_version to no, make sure it does not cause -set_version
1181 # flags to be left without arguments
1182 need_version=unknown
1187 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1188 shlibpath_var=LIBPATH
1190 # AIX 3 has no versioning support, so we append a major version to the name.
1191 soname_spec='${libname}${release}${shared_ext}$major'
1198 hardcode_into_libs=yes
1199 if test "$host_cpu" = ia64; then
1200 # AIX 5 supports IA64
1201 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1202 shlibpath_var=LD_LIBRARY_PATH
1204 # With GCC up to 2.95.x, collect2 would create an import file
1205 # for dependence libraries. The import file would start with
1206 # the line `#! .'. This would cause the generated library to
1207 # depend on `.', always an invalid library. This was fixed in
1208 # development snapshots of GCC prior to 3.0.
1210 aix4 | aix4.[[01]] | aix4.[[01]].*)
1211 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1213 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1220 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1221 # soname into executable. Probably we can add versioning support to
1222 # collect2, so additional links can be useful in future.
1223 if test "$aix_use_runtimelinking" = yes; then
1224 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1225 # instead of lib<name>.a to let people know that these are not
1226 # typical AIX shared libraries.
1227 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1229 # We preserve .a as extension for shared libraries through AIX4.2
1230 # and later when we are not doing run time linking.
1231 library_names_spec='${libname}${release}.a $libname.a'
1232 soname_spec='${libname}${release}${shared_ext}$major'
1234 shlibpath_var=LIBPATH
1239 library_names_spec='$libname.ixlibrary $libname.a'
1240 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1241 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'
1245 library_names_spec='${libname}${shared_ext}'
1246 dynamic_linker="$host_os ld.so"
1247 shlibpath_var=LIBRARY_PATH
1253 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1254 soname_spec='${libname}${release}${shared_ext}$major'
1255 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1256 shlibpath_var=LD_LIBRARY_PATH
1257 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1258 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1259 # the default ld.so.conf also contains /usr/contrib/lib and
1260 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1261 # libtool to hard-code these into programs
1264 cygwin* | mingw* | pw32*)
1265 version_type=windows
1270 case $GCC,$host_os in
1271 yes,cygwin* | yes,mingw* | yes,pw32*)
1272 library_names_spec='$libname.dll.a'
1273 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1274 postinstall_cmds='base_file=`basename \${file}`~
1275 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1276 dldir=$destdir/`dirname \$dlpath`~
1277 test -d \$dldir || mkdir -p \$dldir~
1278 $install_prog $dir/$dlname \$dldir/$dlname~
1279 chmod a+x \$dldir/$dlname'
1280 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1281 dlpath=$dir/\$dldll~
1283 shlibpath_overrides_runpath=yes
1287 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1288 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1289 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1292 # MinGW DLLs use traditional 'lib' prefix
1293 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1294 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1295 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1296 # It is most probably a Windows format PATH printed by
1297 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1298 # path with ; separators, and with drive letters. We can handle the
1299 # drive letters (cygwin fileutils understands them), so leave them,
1300 # especially as we might pass files found there to a mingw objdump,
1301 # which wouldn't understand a cygwinified path. Ahh.
1302 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1304 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1308 # pw32 DLLs use 'pw' prefix rather than 'lib'
1309 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1315 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1318 dynamic_linker='Win32 ld.exe'
1319 # FIXME: first we should search . and the directory the executable is in
1323 darwin* | rhapsody*)
1324 dynamic_linker="$host_os dyld"
1328 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1329 soname_spec='${libname}${release}${major}$shared_ext'
1330 shlibpath_overrides_runpath=yes
1331 shlibpath_var=DYLD_LIBRARY_PATH
1332 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1333 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1334 if test "$GCC" = yes; then
1335 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1337 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1339 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1347 soname_spec='${libname}${release}${shared_ext}$major'
1348 shlibpath_var=LD_LIBRARY_PATH
1359 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1360 soname_spec='${libname}${release}${shared_ext}$major'
1361 shlibpath_var=LD_LIBRARY_PATH
1362 shlibpath_overrides_runpath=no
1363 hardcode_into_libs=yes
1364 dynamic_linker='GNU ld.so'
1367 freebsd* | dragonfly*)
1368 # DragonFly does not have aout. When/if they implement a new
1369 # versioning mechanism, adjust this.
1370 if test -x /usr/bin/objformat; then
1371 objformat=`/usr/bin/objformat`
1374 freebsd[[123]]*) objformat=aout ;;
1378 version_type=freebsd-$objformat
1379 case $version_type in
1381 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1386 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1390 shlibpath_var=LD_LIBRARY_PATH
1393 shlibpath_overrides_runpath=yes
1395 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1396 shlibpath_overrides_runpath=yes
1397 hardcode_into_libs=yes
1400 shlibpath_overrides_runpath=no
1401 hardcode_into_libs=yes
1410 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1411 soname_spec='${libname}${release}${shared_ext}$major'
1412 shlibpath_var=LD_LIBRARY_PATH
1413 hardcode_into_libs=yes
1416 hpux9* | hpux10* | hpux11*)
1417 # Give a soname corresponding to the major version so that dld.sl refuses to
1418 # link against other versions.
1425 hardcode_into_libs=yes
1426 dynamic_linker="$host_os dld.so"
1427 shlibpath_var=LD_LIBRARY_PATH
1428 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1429 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1430 soname_spec='${libname}${release}${shared_ext}$major'
1431 if test "X$HPUX_IA64_MODE" = X32; then
1432 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1434 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1436 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1440 hardcode_into_libs=yes
1441 dynamic_linker="$host_os dld.sl"
1442 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1443 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1444 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1445 soname_spec='${libname}${release}${shared_ext}$major'
1446 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1447 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1451 dynamic_linker="$host_os dld.sl"
1452 shlibpath_var=SHLIB_PATH
1453 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1455 soname_spec='${libname}${release}${shared_ext}$major'
1458 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1459 postinstall_cmds='chmod 555 $lib'
1462 irix5* | irix6* | nonstopux*)
1464 nonstopux*) version_type=nonstopux ;;
1466 if test "$lt_cv_prog_gnu_ld" = yes; then
1474 soname_spec='${libname}${release}${shared_ext}$major'
1475 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1477 irix5* | nonstopux*)
1481 case $LD in # libtool.m4 will add one of these switches to LD
1482 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1483 libsuff= shlibsuff= libmagic=32-bit;;
1484 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1485 libsuff=32 shlibsuff=N32 libmagic=N32;;
1486 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1487 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1488 *) libsuff= shlibsuff= libmagic=never-match;;
1492 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1493 shlibpath_overrides_runpath=no
1494 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1495 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1496 hardcode_into_libs=yes
1499 # No shared lib support for Linux oldld, aout, or coff.
1500 linux*oldld* | linux*aout* | linux*coff*)
1504 # This must be Linux ELF.
1509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1510 soname_spec='${libname}${release}${shared_ext}$major'
1511 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1512 shlibpath_var=LD_LIBRARY_PATH
1513 shlibpath_overrides_runpath=no
1514 # This implies no fast_install, which is unacceptable.
1515 # Some rework will be needed to allow for fast_install
1516 # before this can be enabled.
1517 hardcode_into_libs=yes
1519 # Append ld.so.conf contents to the search path
1520 if test -f /etc/ld.so.conf; then
1521 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1522 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1525 # We used to test for /lib/ld.so.1 and disable shared libraries on
1526 # powerpc, because MkLinux only supported shared libraries with the
1527 # GNU dynamic linker. Since this was broken with cross compilers,
1528 # most powerpc-linux boxes support dynamic linking these days and
1529 # people can always --disable-shared, the test was removed, and we
1530 # assume the GNU/Linux dynamic linker is in use.
1531 dynamic_linker='GNU/Linux ld.so'
1538 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1539 soname_spec='${libname}${release}${shared_ext}$major'
1540 shlibpath_var=LD_LIBRARY_PATH
1541 shlibpath_overrides_runpath=no
1542 hardcode_into_libs=yes
1543 dynamic_linker='GNU ld.so'
1550 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1552 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1553 dynamic_linker='NetBSD (a.out) ld.so'
1555 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1556 soname_spec='${libname}${release}${shared_ext}$major'
1557 dynamic_linker='NetBSD ld.elf_so'
1559 shlibpath_var=LD_LIBRARY_PATH
1560 shlibpath_overrides_runpath=yes
1561 hardcode_into_libs=yes
1566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1567 shlibpath_var=LD_LIBRARY_PATH
1568 shlibpath_overrides_runpath=yes
1575 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1576 soname_spec='${libname}${release}${shared_ext}$major'
1577 shlibpath_var=LD_LIBRARY_PATH
1578 shlibpath_overrides_runpath=yes
1584 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1586 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1587 *) need_version=no ;;
1589 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1590 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1591 shlibpath_var=LD_LIBRARY_PATH
1592 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1594 openbsd2.[[89]] | openbsd2.[[89]].*)
1595 shlibpath_overrides_runpath=no
1598 shlibpath_overrides_runpath=yes
1602 shlibpath_overrides_runpath=yes
1607 libname_spec='$name'
1610 library_names_spec='$libname${shared_ext} $libname.a'
1611 dynamic_linker='OS/2 ld.exe'
1612 shlibpath_var=LIBPATH
1615 osf3* | osf4* | osf5*)
1619 soname_spec='${libname}${release}${shared_ext}$major'
1620 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1621 shlibpath_var=LD_LIBRARY_PATH
1622 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1623 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1628 soname_spec='${libname}${release}${shared_ext}$major'
1629 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1630 shlibpath_var=LD_LIBRARY_PATH
1637 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1638 soname_spec='${libname}${release}${shared_ext}$major'
1639 shlibpath_var=LD_LIBRARY_PATH
1640 shlibpath_overrides_runpath=yes
1641 hardcode_into_libs=yes
1642 # ldd complains unless libraries are executable
1643 postinstall_cmds='chmod +x $lib'
1648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1649 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1650 shlibpath_var=LD_LIBRARY_PATH
1651 shlibpath_overrides_runpath=yes
1652 if test "$with_gnu_ld" = yes; then
1658 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1660 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1661 soname_spec='${libname}${release}${shared_ext}$major'
1662 shlibpath_var=LD_LIBRARY_PATH
1663 case $host_vendor in
1665 shlibpath_overrides_runpath=no
1667 export_dynamic_flag_spec='${wl}-Blargedynsym'
1668 runpath_var=LD_RUN_PATH
1676 shlibpath_overrides_runpath=no
1677 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1683 if test -d /usr/nec ;then
1685 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1686 soname_spec='$libname${shared_ext}.$major'
1687 shlibpath_var=LD_LIBRARY_PATH
1693 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1694 soname_spec='${libname}${release}${shared_ext}$major'
1695 shlibpath_var=LD_LIBRARY_PATH
1702 AC_MSG_RESULT([$dynamic_linker])
1703 test "$dynamic_linker" = no && can_build_shared=no
1704 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1709 AC_DEFUN([_LT_AC_TAGCONFIG],
1710 [AC_ARG_WITH([tags],
1711 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1712 [include additional configurations @<:@automatic@:>@])],
1713 [tagnames="$withval"])
1715 if test -f "$ltmain" && test -n "$tagnames"; then
1716 if test ! -f "${ofile}"; then
1717 AC_MSG_WARN([output file `$ofile' does not exist])
1720 if test -z "$LTCC"; then
1721 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1722 if test -z "$LTCC"; then
1723 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1725 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1729 # Extract list of available tagged configurations in $ofile.
1730 # Note that this assumes the entire list is on one line.
1731 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1733 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1734 for tagname in $tagnames; do
1736 # Check whether tagname contains only valid characters
1737 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1739 *) AC_MSG_ERROR([invalid tag name: $tagname])
1743 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1745 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1748 # Update the list of available tags.
1749 if test -n "$tagname"; then
1750 echo appending configuration tag \"$tagname\" to $ofile
1754 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1755 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1756 (test "X$CXX" != "Xg++"))) ; then
1757 AC_LIBTOOL_LANG_CXX_CONFIG
1764 if test -n "$F77" && test "X$F77" != "Xno"; then
1765 AC_LIBTOOL_LANG_F77_CONFIG
1772 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1773 AC_LIBTOOL_LANG_GCJ_CONFIG
1780 AC_LIBTOOL_LANG_RC_CONFIG
1784 AC_MSG_ERROR([Unsupported tag name: $tagname])
1788 # Append the new tag name to the list of available tags.
1789 if test -n "$tagname" ; then
1790 available_tags="$available_tags $tagname"
1796 # Now substitute the updated list of available tags.
1797 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1798 mv "${ofile}T" "$ofile"
1802 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1805 ])# _LT_AC_TAGCONFIG
1810 # enable checks for dlopen support
1811 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1812 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1813 ])# AC_LIBTOOL_DLOPEN
1816 # AC_LIBTOOL_WIN32_DLL
1817 # --------------------
1818 # declare package support for building win32 DLLs
1819 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1820 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1821 ])# AC_LIBTOOL_WIN32_DLL
1824 # AC_ENABLE_SHARED([DEFAULT])
1825 # ---------------------------
1826 # implement the --enable-shared flag
1827 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1828 AC_DEFUN([AC_ENABLE_SHARED],
1829 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1830 AC_ARG_ENABLE([shared],
1831 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1832 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1833 [p=${PACKAGE-default}
1835 yes) enable_shared=yes ;;
1836 no) enable_shared=no ;;
1839 # Look at the argument we got. We use all the common list separators.
1840 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1841 for pkg in $enableval; do
1843 if test "X$pkg" = "X$p"; then
1850 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1851 ])# AC_ENABLE_SHARED
1856 #- set the default shared flag to --disable-shared
1857 AC_DEFUN([AC_DISABLE_SHARED],
1858 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1859 AC_ENABLE_SHARED(no)
1860 ])# AC_DISABLE_SHARED
1863 # AC_ENABLE_STATIC([DEFAULT])
1864 # ---------------------------
1865 # implement the --enable-static flag
1866 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1867 AC_DEFUN([AC_ENABLE_STATIC],
1868 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1869 AC_ARG_ENABLE([static],
1870 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1871 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1872 [p=${PACKAGE-default}
1874 yes) enable_static=yes ;;
1875 no) enable_static=no ;;
1878 # Look at the argument we got. We use all the common list separators.
1879 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1880 for pkg in $enableval; do
1882 if test "X$pkg" = "X$p"; then
1889 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1890 ])# AC_ENABLE_STATIC
1895 # set the default static flag to --disable-static
1896 AC_DEFUN([AC_DISABLE_STATIC],
1897 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1898 AC_ENABLE_STATIC(no)
1899 ])# AC_DISABLE_STATIC
1902 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1903 # ---------------------------------
1904 # implement the --enable-fast-install flag
1905 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1906 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1907 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1908 AC_ARG_ENABLE([fast-install],
1909 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1910 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1911 [p=${PACKAGE-default}
1913 yes) enable_fast_install=yes ;;
1914 no) enable_fast_install=no ;;
1916 enable_fast_install=no
1917 # Look at the argument we got. We use all the common list separators.
1918 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1919 for pkg in $enableval; do
1921 if test "X$pkg" = "X$p"; then
1922 enable_fast_install=yes
1928 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1929 ])# AC_ENABLE_FAST_INSTALL
1932 # AC_DISABLE_FAST_INSTALL
1933 # -----------------------
1934 # set the default to --disable-fast-install
1935 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1936 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1937 AC_ENABLE_FAST_INSTALL(no)
1938 ])# AC_DISABLE_FAST_INSTALL
1941 # AC_LIBTOOL_PICMODE([MODE])
1942 # --------------------------
1943 # implement the --with-pic flag
1944 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1945 AC_DEFUN([AC_LIBTOOL_PICMODE],
1946 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1947 pic_mode=ifelse($#,1,$1,default)
1948 ])# AC_LIBTOOL_PICMODE
1953 # This is predefined starting with Autoconf 2.54, so this conditional
1954 # definition can be removed once we require Autoconf 2.54 or later.
1955 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1956 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1957 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1958 then ac_cv_prog_egrep='grep -E'
1959 else ac_cv_prog_egrep='egrep'
1961 EGREP=$ac_cv_prog_egrep
1966 # AC_PATH_TOOL_PREFIX
1967 # -------------------
1968 # find a file program which can recognise shared library
1969 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1970 [AC_REQUIRE([AC_PROG_EGREP])dnl
1971 AC_MSG_CHECKING([for $1])
1972 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1974 [[\\/*] | ?:[\\/]*])
1975 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1978 lt_save_MAGIC_CMD="$MAGIC_CMD"
1979 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1980 dnl $ac_dummy forces splitting on constant user-supplied paths.
1981 dnl POSIX.2 word splitting is done only on the output of word expansions,
1982 dnl not every word. This closes a longstanding sh security hole.
1983 ac_dummy="ifelse([$2], , $PATH, [$2])"
1984 for ac_dir in $ac_dummy; do
1986 test -z "$ac_dir" && ac_dir=.
1987 if test -f $ac_dir/$1; then
1988 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1989 if test -n "$file_magic_test_file"; then
1990 case $deplibs_check_method in
1992 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1993 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1994 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1995 $EGREP "$file_magic_regex" > /dev/null; then
2000 *** Warning: the command libtool uses to detect shared libraries,
2001 *** $file_magic_cmd, produces output that libtool cannot recognize.
2002 *** The result is that libtool may fail to recognize shared libraries
2003 *** as such. This will affect the creation of libtool libraries that
2004 *** depend on shared libraries, but programs linked with such libtool
2005 *** libraries will work regardless of this problem. Nevertheless, you
2006 *** may want to report the problem to your system manager and/or to
2007 *** bug-libtool@gnu.org
2017 MAGIC_CMD="$lt_save_MAGIC_CMD"
2020 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2021 if test -n "$MAGIC_CMD"; then
2022 AC_MSG_RESULT($MAGIC_CMD)
2026 ])# AC_PATH_TOOL_PREFIX
2031 # find a file program which can recognise a shared library
2032 AC_DEFUN([AC_PATH_MAGIC],
2033 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2034 if test -z "$lt_cv_path_MAGIC_CMD"; then
2035 if test -n "$ac_tool_prefix"; then
2036 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2046 # find the pathname to the GNU or non-GNU linker
2047 AC_DEFUN([AC_PROG_LD],
2048 [AC_ARG_WITH([gnu-ld],
2049 [AC_HELP_STRING([--with-gnu-ld],
2050 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2051 [test "$withval" = no || with_gnu_ld=yes],
2053 AC_REQUIRE([LT_AC_PROG_SED])dnl
2054 AC_REQUIRE([AC_PROG_CC])dnl
2055 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2056 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2058 if test "$GCC" = yes; then
2059 # Check if gcc -print-prog-name=ld gives a path.
2060 AC_MSG_CHECKING([for ld used by $CC])
2063 # gcc leaves a trailing carriage return which upsets mingw
2064 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2066 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2069 # Accept absolute paths.
2070 [[\\/]]* | ?:[[\\/]]*)
2071 re_direlt='/[[^/]][[^/]]*/\.\./'
2072 # Canonicalize the pathname of ld
2073 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2074 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2075 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2077 test -z "$LD" && LD="$ac_prog"
2080 # If it fails, then pretend we aren't using GCC.
2084 # If it is relative, then search for the first ld in PATH.
2088 elif test "$with_gnu_ld" = yes; then
2089 AC_MSG_CHECKING([for GNU ld])
2091 AC_MSG_CHECKING([for non-GNU ld])
2093 AC_CACHE_VAL(lt_cv_path_LD,
2094 [if test -z "$LD"; then
2095 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2096 for ac_dir in $PATH; do
2098 test -z "$ac_dir" && ac_dir=.
2099 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2100 lt_cv_path_LD="$ac_dir/$ac_prog"
2101 # Check to see if the program is GNU ld. I'd rather use --version,
2102 # but apparently some variants of GNU ld only accept -v.
2103 # Break only if it was the GNU/non-GNU ld that we prefer.
2104 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2105 *GNU* | *'with BFD'*)
2106 test "$with_gnu_ld" != no && break
2109 test "$with_gnu_ld" != yes && break
2116 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2119 if test -n "$LD"; then
2124 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2131 AC_DEFUN([AC_PROG_LD_GNU],
2132 [AC_REQUIRE([AC_PROG_EGREP])dnl
2133 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2134 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2135 case `$LD -v 2>&1 </dev/null` in
2136 *GNU* | *'with BFD'*)
2137 lt_cv_prog_gnu_ld=yes
2140 lt_cv_prog_gnu_ld=no
2143 with_gnu_ld=$lt_cv_prog_gnu_ld
2147 # AC_PROG_LD_RELOAD_FLAG
2148 # ----------------------
2149 # find reload flag for linker
2150 # -- PORTME Some linkers may need a different reload flag.
2151 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2152 [AC_CACHE_CHECK([for $LD option to reload object files],
2153 lt_cv_ld_reload_flag,
2154 [lt_cv_ld_reload_flag='-r'])
2155 reload_flag=$lt_cv_ld_reload_flag
2156 case $reload_flag in
2158 *) reload_flag=" $reload_flag" ;;
2160 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2163 if test "$GCC" = yes; then
2164 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2166 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2170 ])# AC_PROG_LD_RELOAD_FLAG
2173 # AC_DEPLIBS_CHECK_METHOD
2174 # -----------------------
2175 # how to check for library dependencies
2176 # -- PORTME fill in with the dynamic library characteristics
2177 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2178 [AC_CACHE_CHECK([how to recognise dependent libraries],
2179 lt_cv_deplibs_check_method,
2180 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2181 lt_cv_file_magic_test_file=
2182 lt_cv_deplibs_check_method='unknown'
2183 # Need to set the preceding variable on all platforms that support
2184 # interlibrary dependencies.
2185 # 'none' -- dependencies not supported.
2186 # `unknown' -- same as none, but documents that we really don't know.
2187 # 'pass_all' -- all dependencies passed with no checks.
2188 # 'test_compile' -- check by making test program.
2189 # 'file_magic [[regex]]' -- check by looking for files in library path
2190 # which responds to the $file_magic_cmd with a given extended regex.
2191 # If you have `file' or equivalent on your system and you're not sure
2192 # whether `pass_all' will *always* work, you probably want this one.
2196 lt_cv_deplibs_check_method=pass_all
2200 lt_cv_deplibs_check_method=pass_all
2204 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2205 lt_cv_file_magic_cmd='/usr/bin/file -L'
2206 lt_cv_file_magic_test_file=/shlib/libc.so
2210 # func_win32_libid is a shell function defined in ltmain.sh
2211 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2212 lt_cv_file_magic_cmd='func_win32_libid'
2216 # Base MSYS/MinGW do not provide the 'file' command needed by
2217 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2218 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2219 lt_cv_file_magic_cmd='$OBJDUMP -f'
2222 darwin* | rhapsody*)
2223 lt_cv_deplibs_check_method=pass_all
2226 freebsd* | kfreebsd*-gnu | dragonfly*)
2227 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2230 # Not sure whether the presence of OpenBSD here was a mistake.
2231 # Let's accept both of them until this is cleared up.
2232 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2233 lt_cv_file_magic_cmd=/usr/bin/file
2234 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2238 lt_cv_deplibs_check_method=pass_all
2243 lt_cv_deplibs_check_method=pass_all
2246 hpux10.20* | hpux11*)
2247 lt_cv_file_magic_cmd=/usr/bin/file
2250 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2251 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2254 [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]']
2255 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2258 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2259 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2264 irix5* | irix6* | nonstopux*)
2266 *-32|*"-32 ") libmagic=32-bit;;
2267 *-n32|*"-n32 ") libmagic=N32;;
2268 *-64|*"-64 ") libmagic=64-bit;;
2269 *) libmagic=never-match;;
2271 lt_cv_deplibs_check_method=pass_all
2274 # This must be Linux ELF.
2276 lt_cv_deplibs_check_method=pass_all
2280 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2281 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2283 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2288 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2289 lt_cv_file_magic_cmd=/usr/bin/file
2290 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2294 lt_cv_deplibs_check_method=unknown
2298 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2299 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2301 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2305 osf3* | osf4* | osf5*)
2306 lt_cv_deplibs_check_method=pass_all
2310 lt_cv_deplibs_check_method=pass_all
2314 lt_cv_deplibs_check_method=pass_all
2317 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2318 case $host_vendor in
2320 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]]'
2321 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2324 lt_cv_deplibs_check_method=pass_all
2327 lt_cv_file_magic_cmd='/bin/file'
2328 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2331 lt_cv_file_magic_cmd='/bin/file'
2332 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2333 lt_cv_file_magic_test_file=/lib/libc.so
2336 lt_cv_deplibs_check_method=pass_all
2341 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2342 lt_cv_deplibs_check_method=pass_all
2346 file_magic_cmd=$lt_cv_file_magic_cmd
2347 deplibs_check_method=$lt_cv_deplibs_check_method
2348 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2349 ])# AC_DEPLIBS_CHECK_METHOD
2354 # find the pathname to a BSD-compatible name lister
2355 AC_DEFUN([AC_PROG_NM],
2356 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2357 [if test -n "$NM"; then
2358 # Let the user override the test.
2361 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2362 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2364 test -z "$ac_dir" && ac_dir=.
2365 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2366 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2367 # Check to see if the nm accepts a BSD-compat flag.
2368 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2369 # nm: unknown option "B" ignored
2370 # Tru64's nm complains that /dev/null is an invalid object file
2371 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2372 */dev/null* | *'Invalid file or object type'*)
2373 lt_cv_path_NM="$tmp_nm -B"
2377 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2379 lt_cv_path_NM="$tmp_nm -p"
2383 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2384 continue # so that we can try to find one that supports BSD flags
2391 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2399 # check for math library
2400 AC_DEFUN([AC_CHECK_LIBM],
2401 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2404 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2405 # These system don't have libm, or don't need it
2408 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2409 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2412 AC_CHECK_LIB(m, cos, LIBM="-lm")
2418 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2419 # -----------------------------------
2420 # sets LIBLTDL to the link flags for the libltdl convenience library and
2421 # LTDLINCL to the include flags for the libltdl header and adds
2422 # --enable-ltdl-convenience to the configure arguments. Note that
2423 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2424 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2425 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2426 # (note the single quotes!). If your package is not flat and you're not
2427 # using automake, define top_builddir and top_srcdir appropriately in
2429 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2430 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2431 case $enable_ltdl_convenience in
2432 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2433 "") enable_ltdl_convenience=yes
2434 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2436 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2437 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2438 # For backwards non-gettext consistent compatibility...
2440 ])# AC_LIBLTDL_CONVENIENCE
2443 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2444 # -----------------------------------
2445 # sets LIBLTDL to the link flags for the libltdl installable library and
2446 # LTDLINCL to the include flags for the libltdl header and adds
2447 # --enable-ltdl-install to the configure arguments. Note that
2448 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2449 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2450 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2451 # '${top_srcdir}/' (note the single quotes!). If your package is not
2452 # flat and you're not using automake, define top_builddir and top_srcdir
2453 # appropriately in the Makefiles.
2454 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2455 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2456 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2457 AC_CHECK_LIB(ltdl, lt_dlinit,
2458 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2459 [if test x"$enable_ltdl_install" = xno; then
2460 AC_MSG_WARN([libltdl not installed, but installation disabled])
2462 enable_ltdl_install=yes
2465 if test x"$enable_ltdl_install" = x"yes"; then
2466 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2467 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2468 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2470 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2474 # For backwards non-gettext consistent compatibility...
2476 ])# AC_LIBLTDL_INSTALLABLE
2481 # enable support for C++ libraries
2482 AC_DEFUN([AC_LIBTOOL_CXX],
2483 [AC_REQUIRE([_LT_AC_LANG_CXX])
2489 AC_DEFUN([_LT_AC_LANG_CXX],
2490 [AC_REQUIRE([AC_PROG_CXX])
2491 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2492 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2495 # _LT_AC_PROG_CXXCPP
2497 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2499 AC_REQUIRE([AC_PROG_CXX])
2500 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2501 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2502 (test "X$CXX" != "Xg++"))) ; then
2505 ])# _LT_AC_PROG_CXXCPP
2509 # enable support for Fortran 77 libraries
2510 AC_DEFUN([AC_LIBTOOL_F77],
2511 [AC_REQUIRE([_LT_AC_LANG_F77])
2517 AC_DEFUN([_LT_AC_LANG_F77],
2518 [AC_REQUIRE([AC_PROG_F77])
2519 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2525 # enable support for GCJ libraries
2526 AC_DEFUN([AC_LIBTOOL_GCJ],
2527 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2533 AC_DEFUN([_LT_AC_LANG_GCJ],
2534 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2535 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2536 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2537 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2538 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2539 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2540 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2546 # enable support for Windows resource files
2547 AC_DEFUN([AC_LIBTOOL_RC],
2548 [AC_REQUIRE([LT_AC_PROG_RC])
2549 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2553 # AC_LIBTOOL_LANG_C_CONFIG
2554 # ------------------------
2555 # Ensure that the configuration vars for the C compiler are
2556 # suitably defined. Those variables are subsequently used by
2557 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2558 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2559 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2563 # Source file extension for C test sources.
2566 # Object file extension for compiled C test sources.
2568 _LT_AC_TAGVAR(objext, $1)=$objext
2570 # Code to be used in simple compile tests
2571 lt_simple_compile_test_code="int some_variable = 0;\n"
2573 # Code to be used in simple link tests
2574 lt_simple_link_test_code='int main(){return(0);}\n'
2578 # save warnings/boilerplate of simple test code
2579 _LT_COMPILER_BOILERPLATE
2580 _LT_LINKER_BOILERPLATE
2583 # Check for any special shared library compilation flags.
2585 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2586 if test "$GCC" = no; then
2589 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2593 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2594 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2595 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2597 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2598 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2604 # Check to make sure the static flag actually works.
2606 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2607 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2608 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2610 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2614 ## There is no encapsulation within the following macros, do not change
2615 ## the running order or otherwise move them around unless you know exactly
2616 ## what you are doing...
2617 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2618 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2619 AC_LIBTOOL_PROG_CC_C_O($1)
2620 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2621 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2622 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2623 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2624 AC_LIBTOOL_SYS_LIB_STRIP
2625 AC_LIBTOOL_DLOPEN_SELF($1)
2627 # Report which librarie types wil actually be built
2628 AC_MSG_CHECKING([if libtool supports shared libraries])
2629 AC_MSG_RESULT([$can_build_shared])
2631 AC_MSG_CHECKING([whether to build shared libraries])
2632 test "$can_build_shared" = "no" && enable_shared=no
2634 # On AIX, shared libraries and static libraries use the same namespace, and
2635 # are all built from PIC.
2638 test "$enable_shared" = yes && enable_static=no
2639 if test -n "$RANLIB"; then
2640 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2641 postinstall_cmds='$RANLIB $lib'
2646 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2647 test "$enable_shared" = yes && enable_static=no
2651 AC_MSG_RESULT([$enable_shared])
2653 AC_MSG_CHECKING([whether to build static libraries])
2654 # Make sure either enable_shared or enable_static is yes.
2655 test "$enable_shared" = yes || enable_static=yes
2656 AC_MSG_RESULT([$enable_static])
2658 AC_LIBTOOL_CONFIG($1)
2662 ])# AC_LIBTOOL_LANG_C_CONFIG
2665 # AC_LIBTOOL_LANG_CXX_CONFIG
2666 # --------------------------
2667 # Ensure that the configuration vars for the C compiler are
2668 # suitably defined. Those variables are subsequently used by
2669 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2670 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2671 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2673 AC_REQUIRE([AC_PROG_CXX])
2674 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2676 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2677 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2678 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2679 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2680 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2681 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2682 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2683 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2684 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2685 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2686 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2687 _LT_AC_TAGVAR(module_cmds, $1)=
2688 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2689 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2690 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2691 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2692 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2693 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2695 # Dependencies to place before and after the object being linked:
2696 _LT_AC_TAGVAR(predep_objects, $1)=
2697 _LT_AC_TAGVAR(postdep_objects, $1)=
2698 _LT_AC_TAGVAR(predeps, $1)=
2699 _LT_AC_TAGVAR(postdeps, $1)=
2700 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2702 # Source file extension for C++ test sources.
2705 # Object file extension for compiled C++ test sources.
2707 _LT_AC_TAGVAR(objext, $1)=$objext
2709 # Code to be used in simple compile tests
2710 lt_simple_compile_test_code="int some_variable = 0;\n"
2712 # Code to be used in simple link tests
2713 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2715 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2718 # save warnings/boilerplate of simple test code
2719 _LT_COMPILER_BOILERPLATE
2720 _LT_LINKER_BOILERPLATE
2722 # Allow CC to be a program name with arguments.
2727 lt_save_with_gnu_ld=$with_gnu_ld
2728 lt_save_path_LD=$lt_cv_path_LD
2729 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2730 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2732 unset lt_cv_prog_gnu_ld
2734 if test -n "${lt_cv_path_LDCXX+set}"; then
2735 lt_cv_path_LD=$lt_cv_path_LDCXX
2739 test -z "${LDCXX+set}" || LD=$LDCXX
2742 _LT_AC_TAGVAR(compiler, $1)=$CC
2743 _LT_CC_BASENAME([$compiler])
2745 # We don't want -fno-exception wen compiling C++ code, so set the
2746 # no_builtin_flag separately
2747 if test "$GXX" = yes; then
2748 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2750 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2753 if test "$GXX" = yes; then
2754 # Set up default GNU C++ configuration
2758 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2759 # archiving commands below assume that GNU ld is being used.
2760 if test "$with_gnu_ld" = yes; then
2761 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2762 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2764 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2765 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2767 # If archive_cmds runs LD, not CC, wlarc should be empty
2768 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2769 # investigate it a little bit more. (MM)
2772 # ancient GNU ld didn't support --whole-archive et. al.
2773 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2774 grep 'no-whole-archive' > /dev/null; then
2775 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2777 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2783 # A generic and very simple default shared library creation
2784 # command for GNU C++ for the case where it uses the native
2785 # linker, instead of GNU ld. If possible, this setting should
2786 # overridden to take advantage of the native linker features on
2787 # the platform it is being used on.
2788 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2791 # Commands to make compiler produce verbose output that lists
2792 # what "hidden" libraries, object files and flags are used when
2793 # linking a shared library.
2794 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2802 # PORTME: fill in a description of your system's C++ link characteristics
2803 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2804 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2807 # FIXME: insert proper C++ library support
2808 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2811 if test "$host_cpu" = ia64; then
2812 # On IA64, the linker does run time linking by default, so we don't
2813 # have to do anything special.
2814 aix_use_runtimelinking=no
2815 exp_sym_flag='-Bexport'
2818 aix_use_runtimelinking=no
2820 # Test if we are trying to use run time linking or normal
2821 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2822 # need to do runtime linking.
2823 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2824 for ld_flag in $LDFLAGS; do
2827 aix_use_runtimelinking=yes
2834 exp_sym_flag='-bexport'
2835 no_entry_flag='-bnoentry'
2838 # When large executables or shared objects are built, AIX ld can
2839 # have problems creating the table of contents. If linking a library
2840 # or program results in "error TOC overflow" add -mminimal-toc to
2841 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2842 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2844 _LT_AC_TAGVAR(archive_cmds, $1)=''
2845 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2846 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2847 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2849 if test "$GXX" = yes; then
2850 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2851 # We only want to do this on AIX 4.2 and lower, the check
2852 # below for broken collect2 doesn't work under 4.3+
2853 collect2name=`${CC} -print-prog-name=collect2`
2854 if test -f "$collect2name" && \
2855 strings "$collect2name" | grep resolve_lib_name >/dev/null
2857 # We have reworked collect2
2858 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2860 # We have old collect2
2861 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2862 # It fails to find uninstalled libraries when the uninstalled
2863 # path is not listed in the libpath. Setting hardcode_minus_L
2864 # to unsupported forces relinking
2865 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2867 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2870 shared_flag='-shared'
2871 if test "$aix_use_runtimelinking" = yes; then
2872 shared_flag="$shared_flag "'${wl}-G'
2876 if test "$host_cpu" = ia64; then
2877 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2878 # chokes on -Wl,-G. The following line is correct:
2881 if test "$aix_use_runtimelinking" = yes; then
2882 shared_flag='${wl}-G'
2884 shared_flag='${wl}-bM:SRE'
2889 # It seems that -bexpall does not export symbols beginning with
2890 # underscore (_), so it is better to generate a list of symbols to export.
2891 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2892 if test "$aix_use_runtimelinking" = yes; then
2893 # Warning - without using the other runtime loading flags (-brtl),
2894 # -berok will link without error, but may produce a broken library.
2895 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2896 # Determine the default libpath from the value encoded in an empty executable.
2897 _LT_AC_SYS_LIBPATH_AIX
2898 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2900 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2902 if test "$host_cpu" = ia64; then
2903 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2904 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2905 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2907 # Determine the default libpath from the value encoded in an empty executable.
2908 _LT_AC_SYS_LIBPATH_AIX
2909 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2910 # Warning - without using the other run time loading flags,
2911 # -berok will link without error, but may produce a broken library.
2912 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2913 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2914 # -bexpall does not export symbols beginning with underscore (_)
2915 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2916 # Exported symbols can be pulled into shared objects from archives
2917 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2918 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2919 # This is similar to how AIX traditionally builds its shared libraries.
2920 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2925 case $cc_basename in
2927 # FIXME: insert proper C++ library support
2928 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2934 cygwin* | mingw* | pw32*)
2935 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2936 # as there is no search path for DLLs.
2937 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2938 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2939 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2940 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2942 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2943 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2944 # If the export-symbols file already is a .def file (1st line
2945 # is EXPORTS), use it as is; otherwise, prepend...
2946 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2947 cp $export_symbols $output_objdir/$soname.def;
2949 echo EXPORTS > $output_objdir/$soname.def;
2950 cat $export_symbols >> $output_objdir/$soname.def;
2952 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2957 darwin* | rhapsody*)
2959 rhapsody* | darwin1.[[012]])
2960 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
2963 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2964 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2966 case ${MACOSX_DEPLOYMENT_TARGET} in
2968 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
2971 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
2977 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2978 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2979 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2980 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2981 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
2982 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2984 if test "$GXX" = yes ; then
2985 lt_int_apple_cc_single_mod=no
2986 output_verbose_link_cmd='echo'
2987 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
2988 lt_int_apple_cc_single_mod=yes
2990 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2991 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2993 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2995 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2996 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
2997 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2998 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3000 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3002 _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}'
3004 case $cc_basename in
3006 output_verbose_link_cmd='echo'
3007 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3008 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3009 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3010 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3011 _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}'
3014 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3021 case $cc_basename in
3023 # FIXME: insert proper C++ library support
3024 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3027 # Green Hills C++ Compiler
3028 # FIXME: insert proper C++ library support
3029 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3032 # FIXME: insert proper C++ library support
3033 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3038 # C++ shared libraries reported to be fairly broken before switch to ELF
3039 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3042 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3044 freebsd* | kfreebsd*-gnu | dragonfly*)
3045 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3047 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3052 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3053 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3054 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3055 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3056 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3057 # but as the default
3058 # location of the library.
3060 case $cc_basename in
3062 # FIXME: insert proper C++ library support
3063 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3066 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3067 # Commands to make compiler produce verbose output that lists
3068 # what "hidden" libraries, object files and flags are used when
3069 # linking a shared library.
3071 # There doesn't appear to be a way to prevent this compiler from
3072 # explicitly linking system object files so we need to strip them
3073 # from the output so that they don't get included in the library
3075 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3078 if test "$GXX" = yes; then
3079 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3081 # FIXME: insert proper C++ library support
3082 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3088 if test $with_gnu_ld = no; then
3091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3092 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3093 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3096 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3100 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3101 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3107 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3108 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3111 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3112 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3113 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3114 # but as the default
3115 # location of the library.
3118 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3119 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3120 # but as the default
3121 # location of the library.
3125 case $cc_basename in
3127 # FIXME: insert proper C++ library support
3128 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3133 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3136 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3139 # Commands to make compiler produce verbose output that lists
3140 # what "hidden" libraries, object files and flags are used when
3141 # linking a shared library.
3143 # There doesn't appear to be a way to prevent this compiler from
3144 # explicitly linking system object files so we need to strip them
3145 # from the output so that they don't get included in the library
3147 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3150 if test "$GXX" = yes; then
3151 if test $with_gnu_ld = no; then
3154 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3157 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3162 # FIXME: insert proper C++ library support
3163 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3169 case $cc_basename in
3172 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3174 # Archives containing C++ object files must be created using
3175 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3176 # necessary to make sure instantiated templates are included
3178 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3181 if test "$GXX" = yes; then
3182 if test "$with_gnu_ld" = no; then
3183 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3185 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3188 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3191 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3192 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3195 case $cc_basename in
3197 # Kuck and Associates, Inc. (KAI) C++ Compiler
3199 # KCC will only create a shared library if the output file
3200 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3201 # to its proper name (with version) after linking.
3202 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3203 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3204 # Commands to make compiler produce verbose output that lists
3205 # what "hidden" libraries, object files and flags are used when
3206 # linking a shared library.
3208 # There doesn't appear to be a way to prevent this compiler from
3209 # explicitly linking system object files so we need to strip them
3210 # from the output so that they don't get included in the library
3212 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3215 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3217 # Archives containing C++ object files must be created using
3218 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3219 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3224 # version 8.0 and above of icpc choke on multiply defined symbols
3225 # if we add $predep_objects and $postdep_objects, however 7.1 and
3226 # earlier do not add the objects themselves.
3227 case `$CC -V 2>&1` in
3229 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3230 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3232 *) # Version 8.0 or newer
3235 ia64*) tmp_idyn=' -i_dynamic';;
3237 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3238 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3241 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3242 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3243 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3244 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3247 # Portland Group C++ compiler
3248 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3249 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3252 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3253 _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'
3257 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3258 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3260 runpath_var=LD_RUN_PATH
3261 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3262 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3264 # Commands to make compiler produce verbose output that lists
3265 # what "hidden" libraries, object files and flags are used when
3266 # linking a shared library.
3268 # There doesn't appear to be a way to prevent this compiler from
3269 # explicitly linking system object files so we need to strip them
3270 # from the output so that they don't get included in the library
3272 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3277 # FIXME: insert proper C++ library support
3278 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3281 # FIXME: insert proper C++ library support
3282 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3285 case $cc_basename in
3287 # FIXME: insert proper C++ library support
3288 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3291 # FIXME: insert proper C++ library support
3292 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3297 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3298 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3301 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3302 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3304 # Workaround some broken pre-1.5 toolchains
3305 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3308 # C++ shared libraries are fairly broken
3309 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3312 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3313 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3314 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3315 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3316 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3317 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3318 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3319 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3321 output_verbose_link_cmd='echo'
3324 case $cc_basename in
3326 # Kuck and Associates, Inc. (KAI) C++ Compiler
3328 # KCC will only create a shared library if the output file
3329 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3330 # to its proper name (with version) after linking.
3331 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3333 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3334 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3336 # Archives containing C++ object files must be created using
3337 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3338 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3342 # Rational C++ 2.4.1
3343 # FIXME: insert proper C++ library support
3344 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3347 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3348 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3350 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3351 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3353 # Commands to make compiler produce verbose output that lists
3354 # what "hidden" libraries, object files and flags are used when
3355 # linking a shared library.
3357 # There doesn't appear to be a way to prevent this compiler from
3358 # explicitly linking system object files so we need to strip them
3359 # from the output so that they don't get included in the library
3361 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3364 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3365 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3366 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3369 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3371 # Commands to make compiler produce verbose output that lists
3372 # what "hidden" libraries, object files and flags are used when
3373 # linking a shared library.
3374 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3377 # FIXME: insert proper C++ library support
3378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384 case $cc_basename in
3386 # Kuck and Associates, Inc. (KAI) C++ Compiler
3388 # KCC will only create a shared library if the output file
3389 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3390 # to its proper name (with version) after linking.
3391 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3394 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3396 # Archives containing C++ object files must be created using
3397 # the KAI C++ compiler.
3398 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3401 # Rational C++ 2.4.1
3402 # FIXME: insert proper C++ library support
3403 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3406 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3407 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3408 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3409 echo "-hidden">> $lib.exp~
3410 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3413 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3414 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3416 # Commands to make compiler produce verbose output that lists
3417 # what "hidden" libraries, object files and flags are used when
3418 # linking a shared library.
3420 # There doesn't appear to be a way to prevent this compiler from
3421 # explicitly linking system object files so we need to strip them
3422 # from the output so that they don't get included in the library
3424 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3427 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3428 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3429 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3431 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3432 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3434 # Commands to make compiler produce verbose output that lists
3435 # what "hidden" libraries, object files and flags are used when
3436 # linking a shared library.
3437 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3440 # FIXME: insert proper C++ library support
3441 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3447 # FIXME: insert proper C++ library support
3448 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3451 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3452 case $cc_basename in
3454 # FIXME: insert proper C++ library support
3455 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3458 # FIXME: insert proper C++ library support
3459 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3464 case $cc_basename in
3467 # FIXME: insert proper C++ library support
3468 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3472 # FIXME: insert proper C++ library support
3473 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3476 # FIXME: insert proper C++ library support
3477 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3482 case $cc_basename in
3484 # Sun C++ 4.2, 5.x and Centerline C++
3485 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3486 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3487 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3488 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3489 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3492 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3494 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3496 # The C++ compiler is used as linker so we must use $wl
3497 # flag to pass the commands to the underlying system
3498 # linker. We must also pass each convience library through
3499 # to the system linker between allextract/defaultextract.
3500 # The C++ compiler will combine linker options so we
3501 # cannot just pass the convience library names through
3503 # Supported since Solaris 2.6 (maybe 2.5.1?)
3504 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3507 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3509 output_verbose_link_cmd='echo'
3511 # Archives containing C++ object files must be created using
3512 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3513 # necessary to make sure instantiated templates are included
3515 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3518 # Green Hills C++ Compiler
3519 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3521 # The C++ compiler must be used to create the archive.
3522 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3525 # GNU C++ compiler with Solaris linker
3526 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3527 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3528 if $CC --version | grep -v '^2\.7' > /dev/null; then
3529 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3530 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3531 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3533 # Commands to make compiler produce verbose output that lists
3534 # what "hidden" libraries, object files and flags are used when
3535 # linking a shared library.
3536 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3538 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3540 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3541 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3542 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3544 # Commands to make compiler produce verbose output that lists
3545 # what "hidden" libraries, object files and flags are used when
3546 # linking a shared library.
3547 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3550 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3555 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3556 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3559 case $cc_basename in
3561 # NonStop-UX NCC 3.20
3562 # FIXME: insert proper C++ library support
3563 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3566 # FIXME: insert proper C++ library support
3567 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3572 # FIXME: insert proper C++ library support
3573 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3576 # FIXME: insert proper C++ library support
3577 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3580 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3581 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3583 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3584 _LT_AC_TAGVAR(LD, $1)="$LD"
3587 ## There is no encapsulation within the following macros, do not change
3588 ## the running order or otherwise move them around unless you know exactly
3589 ## what you are doing...
3590 AC_LIBTOOL_POSTDEP_PREDEP($1)
3591 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3592 AC_LIBTOOL_PROG_CC_C_O($1)
3593 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3594 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3595 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3596 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3597 AC_LIBTOOL_SYS_LIB_STRIP
3598 AC_LIBTOOL_DLOPEN_SELF($1)
3600 AC_LIBTOOL_CONFIG($1)
3607 with_gnu_ldcxx=$with_gnu_ld
3608 with_gnu_ld=$lt_save_with_gnu_ld
3609 lt_cv_path_LDCXX=$lt_cv_path_LD
3610 lt_cv_path_LD=$lt_save_path_LD
3611 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3612 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3613 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3615 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3616 # ------------------------
3617 # Figure out "hidden" library dependencies from verbose
3618 # compiler output when linking a shared library.
3619 # Parse the compiler output and extract the necessary
3620 # objects, libraries and library flags.
3621 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3622 dnl we can't use the lt_simple_compile_test_code here,
3623 dnl because it contains code intended for an executable,
3624 dnl not a library. It's possible we should let each
3625 dnl tag define a new lt_????_link_test_code variable,
3626 dnl but it's only used here...
3627 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3629 void foo (void) { a = 0; }
3631 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3635 Foo (void) { a = 0; }
3640 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3648 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3651 public void bar (void) {
3657 dnl Parse the compiler output and extract the necessary
3658 dnl objects, libraries and library flags.
3659 if AC_TRY_EVAL(ac_compile); then
3660 # Parse the compiler output and extract the necessary
3661 # objects, libraries and library flags.
3663 # Sentinel used to keep track of whether or not we are before
3664 # the conftest object file.
3665 pre_test_object_deps_done=no
3667 # The `*' in the case matches for architectures that use `case' in
3668 # $output_verbose_cmd can trigger glob expansion during the loop
3669 # eval without this substitution.
3670 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3672 for p in `eval $output_verbose_link_cmd`; do
3676 # Some compilers place space between "-{L,R}" and the path.
3679 || test $p = "-R"; then
3686 if test "$pre_test_object_deps_done" = no; then
3689 # Internal compiler library paths should come after those
3690 # provided the user. The postdeps already come after the
3691 # user supplied libs so there is no need to process them.
3692 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3693 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3695 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3698 # The "-l" case would never come before the object being
3699 # linked, so don't bother handling this case.
3702 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3703 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3705 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3711 # This assumes that the test object file only shows up
3712 # once in the compiler output.
3713 if test "$p" = "conftest.$objext"; then
3714 pre_test_object_deps_done=yes
3718 if test "$pre_test_object_deps_done" = no; then
3719 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3720 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3722 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3725 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3726 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3728 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3733 *) ;; # Ignore the rest.
3741 echo "libtool.m4: error: problem compiling $1 test program"
3744 $rm -f confest.$objext
3746 # PORTME: override above test on systems where it is broken
3750 case $cc_basename in
3752 # Adding this requires a known-good setup of shared libraries for
3753 # Sun compiler versions before 5.6, else PIC objects from an old
3754 # archive will be linked into the output, leading to subtle bugs.
3755 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3761 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3762 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3764 ])# AC_LIBTOOL_POSTDEP_PREDEP
3766 # AC_LIBTOOL_LANG_F77_CONFIG
3767 # ------------------------
3768 # Ensure that the configuration vars for the C compiler are
3769 # suitably defined. Those variables are subsequently used by
3770 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3771 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3772 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3773 [AC_REQUIRE([AC_PROG_F77])
3774 AC_LANG_PUSH(Fortran 77)
3776 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3777 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3778 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3779 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3780 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3781 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3782 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3783 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3784 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3785 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3786 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3787 _LT_AC_TAGVAR(module_cmds, $1)=
3788 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3789 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3790 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3791 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3792 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3793 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3795 # Source file extension for f77 test sources.
3798 # Object file extension for compiled f77 test sources.
3800 _LT_AC_TAGVAR(objext, $1)=$objext
3802 # Code to be used in simple compile tests
3803 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3805 # Code to be used in simple link tests
3806 lt_simple_link_test_code=" program t\n end\n"
3808 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3811 # save warnings/boilerplate of simple test code
3812 _LT_COMPILER_BOILERPLATE
3813 _LT_LINKER_BOILERPLATE
3815 # Allow CC to be a program name with arguments.
3819 _LT_AC_TAGVAR(compiler, $1)=$CC
3820 _LT_CC_BASENAME([$compiler])
3822 AC_MSG_CHECKING([if libtool supports shared libraries])
3823 AC_MSG_RESULT([$can_build_shared])
3825 AC_MSG_CHECKING([whether to build shared libraries])
3826 test "$can_build_shared" = "no" && enable_shared=no
3828 # On AIX, shared libraries and static libraries use the same namespace, and
3829 # are all built from PIC.
3832 test "$enable_shared" = yes && enable_static=no
3833 if test -n "$RANLIB"; then
3834 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3835 postinstall_cmds='$RANLIB $lib'
3839 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3840 test "$enable_shared" = yes && enable_static=no
3844 AC_MSG_RESULT([$enable_shared])
3846 AC_MSG_CHECKING([whether to build static libraries])
3847 # Make sure either enable_shared or enable_static is yes.
3848 test "$enable_shared" = yes || enable_static=yes
3849 AC_MSG_RESULT([$enable_static])
3851 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3853 _LT_AC_TAGVAR(GCC, $1)="$G77"
3854 _LT_AC_TAGVAR(LD, $1)="$LD"
3856 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3857 AC_LIBTOOL_PROG_CC_C_O($1)
3858 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3859 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3860 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3861 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3862 AC_LIBTOOL_SYS_LIB_STRIP
3865 AC_LIBTOOL_CONFIG($1)
3869 ])# AC_LIBTOOL_LANG_F77_CONFIG
3872 # AC_LIBTOOL_LANG_GCJ_CONFIG
3873 # --------------------------
3874 # Ensure that the configuration vars for the C compiler are
3875 # suitably defined. Those variables are subsequently used by
3876 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3877 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3878 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3881 # Source file extension for Java test sources.
3884 # Object file extension for compiled Java test sources.
3886 _LT_AC_TAGVAR(objext, $1)=$objext
3888 # Code to be used in simple compile tests
3889 lt_simple_compile_test_code="class foo {}\n"
3891 # Code to be used in simple link tests
3892 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3894 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3897 # save warnings/boilerplate of simple test code
3898 _LT_COMPILER_BOILERPLATE
3899 _LT_LINKER_BOILERPLATE
3901 # Allow CC to be a program name with arguments.
3905 _LT_AC_TAGVAR(compiler, $1)=$CC
3906 _LT_CC_BASENAME([$compiler])
3908 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3909 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3911 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3914 ## There is no encapsulation within the following macros, do not change
3915 ## the running order or otherwise move them around unless you know exactly
3916 ## what you are doing...
3917 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3918 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3919 AC_LIBTOOL_PROG_CC_C_O($1)
3920 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3921 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3922 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3923 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3924 AC_LIBTOOL_SYS_LIB_STRIP
3925 AC_LIBTOOL_DLOPEN_SELF($1)
3927 AC_LIBTOOL_CONFIG($1)
3931 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3934 # AC_LIBTOOL_LANG_RC_CONFIG
3935 # --------------------------
3936 # Ensure that the configuration vars for the Windows resource compiler are
3937 # suitably defined. Those variables are subsequently used by
3938 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3939 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3940 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3943 # Source file extension for RC test sources.
3946 # Object file extension for compiled RC test sources.
3948 _LT_AC_TAGVAR(objext, $1)=$objext
3950 # Code to be used in simple compile tests
3951 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3953 # Code to be used in simple link tests
3954 lt_simple_link_test_code="$lt_simple_compile_test_code"
3956 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3959 # save warnings/boilerplate of simple test code
3960 _LT_COMPILER_BOILERPLATE
3961 _LT_LINKER_BOILERPLATE
3963 # Allow CC to be a program name with arguments.
3967 _LT_AC_TAGVAR(compiler, $1)=$CC
3968 _LT_CC_BASENAME([$compiler])
3969 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3971 AC_LIBTOOL_CONFIG($1)
3975 ])# AC_LIBTOOL_LANG_RC_CONFIG
3978 # AC_LIBTOOL_CONFIG([TAGNAME])
3979 # ----------------------------
3980 # If TAGNAME is not passed, then create an initial libtool script
3981 # with a default configuration from the untagged config vars. Otherwise
3982 # add code to config.status for appending the configuration named by
3983 # TAGNAME from the matching tagged config vars.
3984 AC_DEFUN([AC_LIBTOOL_CONFIG],
3985 [# The else clause should only fire when bootstrapping the
3986 # libtool distribution, otherwise you forgot to ship ltmain.sh
3987 # with your package, and you will get complaints that there are
3988 # no rules to generate ltmain.sh.
3989 if test -f "$ltmain"; then
3990 # See if we are running on zsh, and set the options which allow our commands through
3991 # without removal of \ escapes.
3992 if test -n "${ZSH_VERSION+set}" ; then
3993 setopt NO_GLOB_SUBST
3995 # Now quote all the things that may contain metacharacters while being
3996 # careful not to overquote the AC_SUBSTed values. We take copies of the
3997 # variables and quote the copies for generation of the libtool script.
3998 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4000 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4001 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4002 deplibs_check_method reload_flag reload_cmds need_locks \
4003 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4004 lt_cv_sys_global_symbol_to_c_name_address \
4005 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4006 old_postinstall_cmds old_postuninstall_cmds \
4007 _LT_AC_TAGVAR(compiler, $1) \
4008 _LT_AC_TAGVAR(CC, $1) \
4009 _LT_AC_TAGVAR(LD, $1) \
4010 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4011 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4012 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4013 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4014 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4015 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4016 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4017 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4018 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4019 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4020 _LT_AC_TAGVAR(predep_objects, $1) \
4021 _LT_AC_TAGVAR(postdep_objects, $1) \
4022 _LT_AC_TAGVAR(predeps, $1) \
4023 _LT_AC_TAGVAR(postdeps, $1) \
4024 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4025 _LT_AC_TAGVAR(archive_cmds, $1) \
4026 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4027 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4028 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4029 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4030 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4031 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4032 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4033 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4034 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4035 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4036 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4037 _LT_AC_TAGVAR(module_cmds, $1) \
4038 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4039 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4040 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4041 _LT_AC_TAGVAR(include_expsyms, $1); do
4044 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4045 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4046 _LT_AC_TAGVAR(archive_cmds, $1) | \
4047 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4048 _LT_AC_TAGVAR(module_cmds, $1) | \
4049 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4050 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4051 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4052 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4053 postinstall_cmds | postuninstall_cmds | \
4054 old_postinstall_cmds | old_postuninstall_cmds | \
4055 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4056 # Double-quote double-evaled strings.
4057 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4060 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4066 *'\[$]0 --fallback-echo"')
4067 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4072 [cfgfile="${ofile}T"
4073 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4075 AC_MSG_NOTICE([creating $ofile])],
4078 cat <<__EOF__ >> "$cfgfile"
4082 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4083 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4084 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4086 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4087 # Free Software Foundation, Inc.
4089 # This file is part of GNU Libtool:
4090 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4092 # This program is free software; you can redistribute it and/or modify
4093 # it under the terms of the GNU General Public License as published by
4094 # the Free Software Foundation; either version 2 of the License, or
4095 # (at your option) any later version.
4097 # This program is distributed in the hope that it will be useful, but
4098 # WITHOUT ANY WARRANTY; without even the implied warranty of
4099 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4100 # General Public License for more details.
4102 # You should have received a copy of the GNU General Public License
4103 # along with this program; if not, write to the Free Software
4104 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4106 # As a special exception to the GNU General Public License, if you
4107 # distribute this file as part of a program that contains a
4108 # configuration script generated by Autoconf, you may include it under
4109 # the same distribution terms that you use for the rest of that program.
4111 # A sed program that does not truncate output.
4114 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4115 Xsed="$SED -e 1s/^X//"
4117 # The HP-UX ksh and POSIX shell print the target directory to stdout
4119 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4121 # The names of the tagged configurations supported by this script.
4124 # ### BEGIN LIBTOOL CONFIG],
4125 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4127 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4129 # Shell to use when invoking shell scripts.
4132 # Whether or not to build shared libraries.
4133 build_libtool_libs=$enable_shared
4135 # Whether or not to build static libraries.
4136 build_old_libs=$enable_static
4138 # Whether or not to add -lc for building shared libraries.
4139 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4141 # Whether or not to disallow shared libs when runtime libs are static
4142 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4144 # Whether or not to optimize for fast installation.
4145 fast_install=$enable_fast_install
4148 host_alias=$host_alias
4153 build_alias=$build_alias
4157 # An echo program that does not interpret backslashes.
4162 AR_FLAGS=$lt_AR_FLAGS
4167 # A language-specific compiler.
4168 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4170 # Is the compiler the GNU C compiler?
4171 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4176 # The linker used to build libraries.
4177 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4179 # Whether we need hard or soft links.
4182 # A BSD-compatible nm program.
4185 # A symbol stripping program
4188 # Used to examine libraries when file_magic_cmd begins "file"
4189 MAGIC_CMD=$MAGIC_CMD
4191 # Used on cygwin: DLL creation program.
4194 # Used on cygwin: object dumper.
4197 # Used on cygwin: assembler.
4200 # The name of the directory that contains temporary libtool files.
4203 # How to create reloadable object files.
4204 reload_flag=$lt_reload_flag
4205 reload_cmds=$lt_reload_cmds
4207 # How to pass a linker flag through the compiler.
4208 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4210 # Object file suffix (normally "o").
4213 # Old archive suffix (normally "a").
4216 # Shared library suffix (normally ".so").
4217 shrext_cmds='$shrext_cmds'
4219 # Executable file suffix (normally "").
4222 # Additional compiler flags for building library objects.
4223 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4226 # What is the maximum length of a command?
4227 max_cmd_len=$lt_cv_sys_max_cmd_len
4229 # Does compiler simultaneously support -c and -o options?
4230 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4232 # Must we lock files when doing compilation?
4233 need_locks=$lt_need_locks
4235 # Do we need the lib prefix for modules?
4236 need_lib_prefix=$need_lib_prefix
4238 # Do we need a version for libraries?
4239 need_version=$need_version
4241 # Whether dlopen is supported.
4242 dlopen_support=$enable_dlopen
4244 # Whether dlopen of programs is supported.
4245 dlopen_self=$enable_dlopen_self
4247 # Whether dlopen of statically linked programs is supported.
4248 dlopen_self_static=$enable_dlopen_self_static
4250 # Compiler flag to prevent dynamic linking.
4251 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4253 # Compiler flag to turn off builtin functions.
4254 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4256 # Compiler flag to allow reflexive dlopens.
4257 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4259 # Compiler flag to generate shared objects directly from archives.
4260 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4262 # Compiler flag to generate thread-safe objects.
4263 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4265 # Library versioning type.
4266 version_type=$version_type
4268 # Format of library name prefix.
4269 libname_spec=$lt_libname_spec
4271 # List of archive names. First name is the real one, the rest are links.
4272 # The last name is the one that the linker finds with -lNAME.
4273 library_names_spec=$lt_library_names_spec
4275 # The coded name of the library, if different from the real name.
4276 soname_spec=$lt_soname_spec
4278 # Commands used to build and install an old-style archive.
4280 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4281 old_postinstall_cmds=$lt_old_postinstall_cmds
4282 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4284 # Create an old-style archive from a shared archive.
4285 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4287 # Create a temporary old-style archive to link instead of a shared archive.
4288 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4290 # Commands used to build and install a shared archive.
4291 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4292 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4293 postinstall_cmds=$lt_postinstall_cmds
4294 postuninstall_cmds=$lt_postuninstall_cmds
4296 # Commands used to build a loadable module (assumed same as above if empty)
4297 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4298 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4300 # Commands to strip libraries.
4301 old_striplib=$lt_old_striplib
4302 striplib=$lt_striplib
4304 # Dependencies to place before the objects being linked to create a
4306 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4308 # Dependencies to place after the objects being linked to create a
4310 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4312 # Dependencies to place before the objects being linked to create a
4314 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4316 # Dependencies to place after the objects being linked to create a
4318 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4320 # The library search path used internally by the compiler when linking
4322 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4324 # Method to check whether dependent libraries are shared objects.
4325 deplibs_check_method=$lt_deplibs_check_method
4327 # Command to use when deplibs_check_method == file_magic.
4328 file_magic_cmd=$lt_file_magic_cmd
4330 # Flag that allows shared libraries with undefined symbols to be built.
4331 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4333 # Flag that forces no undefined symbols.
4334 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4336 # Commands used to finish a libtool library installation in a directory.
4337 finish_cmds=$lt_finish_cmds
4339 # Same as above, but a single script fragment to be evaled but not shown.
4340 finish_eval=$lt_finish_eval
4342 # Take the output of nm and produce a listing of raw symbols and C names.
4343 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4345 # Transform the output of nm in a proper C declaration
4346 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4348 # Transform the output of nm in a C name address pair
4349 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4351 # This is the shared library runtime path variable.
4352 runpath_var=$runpath_var
4354 # This is the shared library path variable.
4355 shlibpath_var=$shlibpath_var
4357 # Is shlibpath searched before the hard-coded library search path?
4358 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4360 # How to hardcode a shared library path into an executable.
4361 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4363 # Whether we should hardcode library paths into libraries.
4364 hardcode_into_libs=$hardcode_into_libs
4366 # Flag to hardcode \$libdir into a binary during linking.
4367 # This must work even if \$libdir does not exist.
4368 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4370 # If ld is used when linking, flag to hardcode \$libdir into
4371 # a binary during linking. This must work even if \$libdir does
4373 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4375 # Whether we need a single -rpath flag with a separated argument.
4376 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4378 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4380 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4382 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4384 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4386 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4387 # the resulting binary.
4388 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4390 # Set to yes if building a shared library automatically hardcodes DIR into the library
4391 # and all subsequent libraries and executables linked against it.
4392 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4394 # Variables whose values should be saved in libtool wrapper scripts and
4395 # restored at relink time.
4396 variables_saved_for_relink="$variables_saved_for_relink"
4398 # Whether libtool must link a program against all its dependency libraries.
4399 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4401 # Compile-time system search path for libraries
4402 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4404 # Run-time system search path for libraries
4405 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4407 # Fix the shell variable \$srcfile for the compiler.
4408 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4410 # Set to yes if exported symbols are required.
4411 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4413 # The commands to list exported symbols.
4414 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4416 # The commands to extract the exported symbol list from a shared archive.
4417 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4419 # Symbols that should not be listed in the preloaded symbols.
4420 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4422 # Symbols that must always be exported.
4423 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4426 [# ### END LIBTOOL CONFIG],
4427 [# ### END LIBTOOL TAG CONFIG: $tagname])
4434 cat <<\EOF >> "$cfgfile"
4436 # AIX sometimes has problems with the GCC collect2 program. For some
4437 # reason, if we set the COLLECT_NAMES environment variable, the problems
4438 # vanish in a puff of smoke.
4439 if test "X${COLLECT_NAMES+set}" != Xset; then
4441 export COLLECT_NAMES
4447 # We use sed instead of cat because bash on DJGPP gets confused if
4448 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4449 # text mode, it properly converts lines to CR/LF. This bash problem
4450 # is reportedly fixed, but why not run on old versions too?
4451 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4453 mv -f "$cfgfile" "$ofile" || \
4454 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4458 # If there is no Makefile yet, we rely on a make rule to execute
4459 # `config.status --recheck' to rerun these tests and create the
4460 # libtool script then.
4461 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4462 if test -f "$ltmain_in"; then
4463 test -f Makefile && make "$ltmain"
4466 ])# AC_LIBTOOL_CONFIG
4469 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4470 # -------------------------------------------
4471 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4472 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4474 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4476 if test "$GCC" = yes; then
4477 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4479 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4480 lt_cv_prog_compiler_rtti_exceptions,
4481 [-fno-rtti -fno-exceptions], [],
4482 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4484 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4487 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4488 # ---------------------------------
4489 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4490 [AC_REQUIRE([AC_CANONICAL_HOST])
4491 AC_REQUIRE([AC_PROG_NM])
4492 AC_REQUIRE([AC_OBJEXT])
4493 # Check for command to grab the raw symbol name followed by C symbol from nm.
4494 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4495 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4497 # These are sane defaults that work on at least a few old systems.
4498 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4500 # Character class describing NM global symbol codes.
4501 symcode='[[BCDEGRST]]'
4503 # Regexp to match symbols that can be accessed directly from C.
4504 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4506 # Transform an extracted symbol line into a proper C declaration
4507 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4509 # Transform an extracted symbol line into symbol name and symbol address
4510 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'"
4512 # Define system-specific variables.
4517 cygwin* | mingw* | pw32*)
4518 symcode='[[ABCDGISTW]]'
4520 hpux*) # Its linker distinguishes data from code symbols
4521 if test "$host_cpu" = ia64; then
4522 symcode='[[ABCDEGRST]]'
4524 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4525 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'"
4528 if test "$host_cpu" = ia64; then
4529 symcode='[[ABCDGIRSTW]]'
4530 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4531 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'"
4535 symcode='[[BCDEGRST]]'
4538 symcode='[[BCDEGQRST]]'
4544 symcode='[[DFNSTU]]'
4548 # Handle CRLF in mingw tool chain
4552 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4556 # If we're using GNU nm, then use its standard symbol codes.
4557 case `$NM -V 2>&1` in
4558 *GNU* | *'with BFD'*)
4559 symcode='[[ABCDGIRSTW]]' ;;
4562 # Try without a prefix undercore, then with it.
4563 for ac_symprfx in "" "_"; do
4565 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4566 symxfrm="\\1 $ac_symprfx\\2 \\2"
4568 # Write the raw and C identifiers.
4569 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4571 # Check to see that the pipe works correctly.
4575 cat > conftest.$ac_ext <<EOF
4580 void nm_test_func(){}
4584 int main(){nm_test_var='a';nm_test_func();return(0);}
4587 if AC_TRY_EVAL(ac_compile); then
4588 # Now try to grab the symbols.
4590 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4591 # Try sorting and uniquifying the output.
4592 if sort "$nlist" | uniq > "$nlist"T; then
4593 mv -f "$nlist"T "$nlist"
4598 # Make sure that we snagged all the symbols we need.
4599 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4600 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4601 cat <<EOF > conftest.$ac_ext
4607 # Now generate the symbol file.
4608 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4610 cat <<EOF >> conftest.$ac_ext
4611 #if defined (__STDC__) && __STDC__
4612 # define lt_ptr_t void *
4614 # define lt_ptr_t char *
4618 /* The mapping between symbol names and symbols. */
4623 lt_preloaded_symbols[[]] =
4626 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4627 cat <<\EOF >> conftest.$ac_ext
4635 # Now try linking the two files.
4636 mv conftest.$ac_objext conftstm.$ac_objext
4637 lt_save_LIBS="$LIBS"
4638 lt_save_CFLAGS="$CFLAGS"
4639 LIBS="conftstm.$ac_objext"
4640 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4641 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4644 LIBS="$lt_save_LIBS"
4645 CFLAGS="$lt_save_CFLAGS"
4647 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4650 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4653 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4656 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4657 cat conftest.$ac_ext >&5
4659 rm -f conftest* conftst*
4661 # Do not use the global_symbol_pipe unless it works.
4662 if test "$pipe_works" = yes; then
4665 lt_cv_sys_global_symbol_pipe=
4669 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4670 lt_cv_sys_global_symbol_to_cdecl=
4672 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4673 AC_MSG_RESULT(failed)
4677 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4680 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4681 # ---------------------------------------
4682 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4683 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4685 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4687 AC_MSG_CHECKING([for $compiler option to produce PIC])
4689 # C++ specific cases for pic, static, wl, etc.
4690 if test "$GXX" = yes; then
4691 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4696 # All AIX code is PIC.
4697 if test "$host_cpu" = ia64; then
4698 # AIX 5 now supports IA64 processor
4699 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4703 # FIXME: we need at least 68020 code to build shared libraries, but
4704 # adding the `-m68020' flag to GCC prevents building anything better,
4706 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4708 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4709 # PIC is the default for these OSes.
4711 mingw* | os2* | pw32*)
4712 # This hack is so that the source file can tell whether it is being
4713 # built for inclusion in a dll (and should export symbols for example).
4714 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4716 darwin* | rhapsody*)
4717 # PIC is the default on this platform
4718 # Common symbols not allowed in MH_DYLIB files
4719 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4722 # DJGPP does not support shared libraries at all
4723 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4726 if test -d /usr/nec; then
4727 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4731 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4737 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4742 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4748 # All AIX code is PIC.
4749 if test "$host_cpu" = ia64; then
4750 # AIX 5 now supports IA64 processor
4751 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4753 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4757 case $cc_basename in
4759 # Green Hills C++ Compiler
4760 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4765 # PIC is the default on this platform
4766 # Common symbols not allowed in MH_DYLIB files
4767 case $cc_basename in
4769 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4770 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775 case $cc_basename in
4777 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4780 # Green Hills C++ Compiler
4781 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4787 freebsd* | kfreebsd*-gnu | dragonfly*)
4788 # FreeBSD uses GNU C++
4790 hpux9* | hpux10* | hpux11*)
4791 case $cc_basename in
4793 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4794 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4795 if test "$host_cpu" != ia64; then
4796 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4800 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4801 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4807 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4815 irix5* | irix6* | nonstopux*)
4816 case $cc_basename in
4818 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4820 # CC pic flag -KPIC is the default.
4827 case $cc_basename in
4830 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4831 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4835 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4837 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4840 # Portland Group C++ compiler.
4841 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4843 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4847 # Make sure the PIC flag is empty. It appears that all Alpha
4848 # Linux and Compaq Tru64 Unix objects are PIC.
4849 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4850 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4861 case $cc_basename in
4863 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4871 osf3* | osf4* | osf5*)
4872 case $cc_basename in
4874 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4877 # Rational C++ 2.4.1
4878 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4881 # Digital/Compaq C++
4882 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4883 # Make sure the PIC flag is empty. It appears that all Alpha
4884 # Linux and Compaq Tru64 Unix objects are PIC.
4885 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4886 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4895 case $cc_basename in
4897 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4904 case $cc_basename in
4906 # Sun C++ 4.2, 5.x and Centerline C++
4907 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4908 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4909 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4912 # Green Hills C++ Compiler
4913 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4920 case $cc_basename in
4923 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4924 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4928 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4935 case $cc_basename in
4937 # NonStop-UX NCC 3.20
4938 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4949 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4955 if test "$GCC" = yes; then
4956 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4957 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4961 # All AIX code is PIC.
4962 if test "$host_cpu" = ia64; then
4963 # AIX 5 now supports IA64 processor
4964 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4969 # FIXME: we need at least 68020 code to build shared libraries, but
4970 # adding the `-m68020' flag to GCC prevents building anything better,
4972 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4975 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4976 # PIC is the default for these OSes.
4979 mingw* | pw32* | os2*)
4980 # This hack is so that the source file can tell whether it is being
4981 # built for inclusion in a dll (and should export symbols for example).
4982 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4985 darwin* | rhapsody*)
4986 # PIC is the default on this platform
4987 # Common symbols not allowed in MH_DYLIB files
4988 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4992 # Just because we use GCC doesn't mean we suddenly get shared libraries
4993 # on systems that don't support them.
4994 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4999 if test -d /usr/nec; then
5000 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5005 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5012 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5018 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5022 # PORTME Check for flag to pass linker flags through the system compiler.
5025 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5026 if test "$host_cpu" = ia64; then
5027 # AIX 5 now supports IA64 processor
5028 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5030 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5034 # PIC is the default on this platform
5035 # Common symbols not allowed in MH_DYLIB files
5036 case $cc_basename in
5038 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5039 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5044 mingw* | pw32* | os2*)
5045 # This hack is so that the source file can tell whether it is being
5046 # built for inclusion in a dll (and should export symbols for example).
5047 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5050 hpux9* | hpux10* | hpux11*)
5051 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5052 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5059 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5062 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5063 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5066 irix5* | irix6* | nonstopux*)
5067 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5068 # PIC (with -KPIC) is the default.
5069 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5073 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5074 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5078 case $cc_basename in
5080 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5081 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5082 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5084 pgcc* | pgf77* | pgf90* | pgf95*)
5085 # Portland Group compilers (*not* the Pentium gcc compiler,
5086 # which looks to be a dead project)
5087 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5088 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5089 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5092 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5093 # All Alpha code is PIC.
5094 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5099 osf3* | osf4* | osf5*)
5100 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5101 # All OSF/1 code is PIC.
5102 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5106 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5107 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5111 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5112 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5113 case $cc_basename in
5115 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5117 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5122 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5123 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5124 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5127 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5128 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5129 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5130 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5134 if test -d /usr/nec ;then
5135 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5136 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5141 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5142 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5146 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5147 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5151 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5156 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5159 # Check to make sure the PIC flag actually works.
5161 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5162 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5163 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5164 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5165 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5167 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5169 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5170 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5173 # For platforms which do not support PIC, -DPIC is meaningless:
5175 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5178 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5184 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5185 # ------------------------------------
5186 # See if the linker supports building shared libraries.
5187 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5188 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5190 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5193 # If we're using GNU nm, then we don't want the "-C" option.
5194 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5195 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5196 _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'
5198 _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'
5202 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5205 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5208 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5213 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5214 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5215 _LT_AC_TAGVAR(archive_cmds, $1)=
5216 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5217 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5218 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5219 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5220 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5221 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5222 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5224 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5225 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5226 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5227 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5228 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5229 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5230 _LT_AC_TAGVAR(module_cmds, $1)=
5231 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5232 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5233 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5234 # include_expsyms should be a list of space-separated symbols to be *always*
5235 # included in the symbol list
5236 _LT_AC_TAGVAR(include_expsyms, $1)=
5237 # exclude_expsyms can be an extended regexp of symbols to exclude
5238 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5239 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5240 # as well as any symbol that contains `d'.
5241 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5242 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5243 # platforms (ab)use it in PIC code, but their linkers get confused if
5244 # the symbol is explicitly referenced. Since portable code cannot
5245 # rely on this symbol name, it's probably fine to never include it in
5246 # preloaded symbol tables.
5247 extract_expsyms_cmds=
5248 # Just being paranoid about ensuring that cc_basename is set.
5249 _LT_CC_BASENAME([$compiler])
5251 cygwin* | mingw* | pw32*)
5252 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5253 # When not using gcc, we currently assume that we are using
5254 # Microsoft Visual C++.
5255 if test "$GCC" != yes; then
5264 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5265 if test "$with_gnu_ld" = yes; then
5266 # If archive_cmds runs LD, not CC, wlarc should be empty
5269 # Set some defaults for GNU ld with shared library support. These
5270 # are reset later if shared libraries are not supported. Putting them
5271 # here allows them to be overridden if necessary.
5272 runpath_var=LD_RUN_PATH
5273 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5274 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5275 # ancient GNU ld didn't support --whole-archive et. al.
5276 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5277 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5279 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5281 supports_anon_versioning=no
5282 case `$LD -v 2>/dev/null` in
5283 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5284 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5285 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5286 *\ 2.11.*) ;; # other 2.11 versions
5287 *) supports_anon_versioning=yes ;;
5290 # See if GNU ld supports shared libraries.
5292 aix3* | aix4* | aix5*)
5293 # On AIX/PPC, the GNU linker is very broken
5294 if test "$host_cpu" != ia64; then
5295 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5298 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5299 *** to be unable to reliably create shared libraries on AIX.
5300 *** Therefore, libtool is disabling shared libraries support. If you
5301 *** really care for shared libraries, you may want to modify your PATH
5302 *** so that a non-GNU linker is found, and then restart.
5309 _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)'
5310 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5311 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5313 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5314 # that the semantics of dynamic libraries on AmigaOS, at least up
5315 # to version 4, is to share data among multiple programs linked
5316 # with the same dynamic library. Since this doesn't match the
5317 # behavior of shared libraries on other platforms, we can't use
5319 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5323 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5324 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5325 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5326 # support --undefined. This deserves some investigation. FIXME
5327 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5329 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5333 cygwin* | mingw* | pw32*)
5334 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5335 # as there is no search path for DLLs.
5336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5337 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5338 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5339 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5340 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5342 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5343 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5344 # If the export-symbols file already is a .def file (1st line
5345 # is EXPORTS), use it as is; otherwise, prepend...
5346 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5347 cp $export_symbols $output_objdir/$soname.def;
5349 echo EXPORTS > $output_objdir/$soname.def;
5350 cat $export_symbols >> $output_objdir/$soname.def;
5352 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5354 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5359 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5361 case $cc_basename,$host_cpu in
5362 pgcc*) # Portland Group C compiler
5363 _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'
5364 tmp_addflag=' $pic_flag'
5366 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5367 _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'
5368 tmp_addflag=' $pic_flag -Mnomain' ;;
5369 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5370 tmp_addflag=' -i_dynamic' ;;
5371 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5372 tmp_addflag=' -i_dynamic -nofor_main' ;;
5373 ifc* | ifort*) # Intel Fortran compiler
5374 tmp_addflag=' -nofor_main' ;;
5376 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5378 if test $supports_anon_versioning = yes; then
5379 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5380 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5381 $echo "local: *; };" >> $output_objdir/$libname.ver~
5382 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5385 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5390 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5391 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5394 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5395 _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'
5400 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5401 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5404 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5405 *** create shared libraries on Solaris systems. Therefore, libtool
5406 *** is disabling shared libraries support. We urge you to upgrade GNU
5407 *** binutils to release 2.9.1 or newer. Another option is to modify
5408 *** your PATH or compiler configuration so that the native linker is
5409 *** used, and then restart.
5412 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5413 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5414 _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'
5416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5421 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5423 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5424 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5428 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5429 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5430 _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'
5432 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5437 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5439 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5440 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5441 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5444 # PORTME fill in a description of your system's linker (not GNU ld)
5447 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5448 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5449 _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'
5450 # Note: this linker hardcodes the directories in LIBPATH if there
5451 # are no directories specified by -L.
5452 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5453 if test "$GCC" = yes && test -z "$link_static_flag"; then
5454 # Neither direct hardcoding nor static linking is supported with a
5456 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5461 if test "$host_cpu" = ia64; then
5462 # On IA64, the linker does run time linking by default, so we don't
5463 # have to do anything special.
5464 aix_use_runtimelinking=no
5465 exp_sym_flag='-Bexport'
5468 # If we're using GNU nm, then we don't want the "-C" option.
5469 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5470 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5471 _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'
5473 _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'
5475 aix_use_runtimelinking=no
5477 # Test if we are trying to use run time linking or normal
5478 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5479 # need to do runtime linking.
5480 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5481 for ld_flag in $LDFLAGS; do
5482 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5483 aix_use_runtimelinking=yes
5489 exp_sym_flag='-bexport'
5490 no_entry_flag='-bnoentry'
5493 # When large executables or shared objects are built, AIX ld can
5494 # have problems creating the table of contents. If linking a library
5495 # or program results in "error TOC overflow" add -mminimal-toc to
5496 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5497 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5499 _LT_AC_TAGVAR(archive_cmds, $1)=''
5500 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5501 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5502 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5504 if test "$GCC" = yes; then
5505 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5506 # We only want to do this on AIX 4.2 and lower, the check
5507 # below for broken collect2 doesn't work under 4.3+
5508 collect2name=`${CC} -print-prog-name=collect2`
5509 if test -f "$collect2name" && \
5510 strings "$collect2name" | grep resolve_lib_name >/dev/null
5512 # We have reworked collect2
5513 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5515 # We have old collect2
5516 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5517 # It fails to find uninstalled libraries when the uninstalled
5518 # path is not listed in the libpath. Setting hardcode_minus_L
5519 # to unsupported forces relinking
5520 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5521 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5522 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5525 shared_flag='-shared'
5526 if test "$aix_use_runtimelinking" = yes; then
5527 shared_flag="$shared_flag "'${wl}-G'
5531 if test "$host_cpu" = ia64; then
5532 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5533 # chokes on -Wl,-G. The following line is correct:
5536 if test "$aix_use_runtimelinking" = yes; then
5537 shared_flag='${wl}-G'
5539 shared_flag='${wl}-bM:SRE'
5544 # It seems that -bexpall does not export symbols beginning with
5545 # underscore (_), so it is better to generate a list of symbols to export.
5546 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5547 if test "$aix_use_runtimelinking" = yes; then
5548 # Warning - without using the other runtime loading flags (-brtl),
5549 # -berok will link without error, but may produce a broken library.
5550 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5551 # Determine the default libpath from the value encoded in an empty executable.
5552 _LT_AC_SYS_LIBPATH_AIX
5553 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5554 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5556 if test "$host_cpu" = ia64; then
5557 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5558 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5559 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5561 # Determine the default libpath from the value encoded in an empty executable.
5562 _LT_AC_SYS_LIBPATH_AIX
5563 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5564 # Warning - without using the other run time loading flags,
5565 # -berok will link without error, but may produce a broken library.
5566 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5567 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5568 # -bexpall does not export symbols beginning with underscore (_)
5569 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5570 # Exported symbols can be pulled into shared objects from archives
5571 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5572 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5573 # This is similar to how AIX traditionally builds its shared libraries.
5574 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5580 _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)'
5581 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5582 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5583 # see comment about different semantics on the GNU ld section
5584 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5588 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5591 cygwin* | mingw* | pw32*)
5592 # When not using gcc, we currently assume that we are using
5593 # Microsoft Visual C++.
5594 # hardcode_libdir_flag_spec is actually meaningless, as there is
5595 # no search path for DLLs.
5596 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5597 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5598 # Tell ltmain to make .lib files, not .a files.
5600 # Tell ltmain to make .dll files, not .so files.
5602 # FIXME: Setting linknames here is a bad hack.
5603 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5604 # The linker will automatically build a .lib file if we build a DLL.
5605 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5606 # FIXME: Should let the user specify the lib program.
5607 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5608 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5609 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5612 darwin* | rhapsody*)
5614 rhapsody* | darwin1.[[012]])
5615 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5618 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5619 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5621 case ${MACOSX_DEPLOYMENT_TARGET} in
5623 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5626 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5632 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5633 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5634 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5635 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5636 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5637 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5638 if test "$GCC" = yes ; then
5639 output_verbose_link_cmd='echo'
5640 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5641 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5642 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5643 _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}'
5644 _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}'
5646 case $cc_basename in
5648 output_verbose_link_cmd='echo'
5649 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5650 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5651 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5653 _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}'
5656 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5663 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5664 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5665 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5669 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5672 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5673 # support. Future versions do this automatically, but an explicit c++rt0.o
5674 # does not break anything, and helps significantly (at the cost of a little
5677 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5678 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5679 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5680 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5683 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5685 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5686 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5687 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5688 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5691 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5692 freebsd* | kfreebsd*-gnu | dragonfly*)
5693 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5694 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5695 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5696 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5700 if test "$GCC" = yes; then
5701 _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'
5703 _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'
5705 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5706 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5707 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5709 # hardcode_minus_L: Not really in the search PATH,
5710 # but as the default location of the library.
5711 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5712 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5716 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5719 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5722 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5728 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5731 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5735 if test "$with_gnu_ld" = no; then
5738 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5739 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5740 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5741 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5742 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5745 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5746 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5747 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5749 # hardcode_minus_L: Not really in the search PATH,
5750 # but as the default location of the library.
5751 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5755 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5756 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5757 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5759 # hardcode_minus_L: Not really in the search PATH,
5760 # but as the default location of the library.
5761 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5767 irix5* | irix6* | nonstopux*)
5768 if test "$GCC" = yes; then
5769 _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'
5771 _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'
5772 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5774 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5775 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5776 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5780 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5781 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5783 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5785 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5786 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5787 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5791 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5792 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5793 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5794 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5795 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5799 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5800 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5801 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5802 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5803 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5804 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5805 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5808 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5809 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5813 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5814 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5821 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5823 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5824 _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'
5825 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5829 if test "$GCC" = yes; then
5830 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5831 _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'
5833 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5834 _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'
5836 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5837 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5840 osf4* | osf5*) # as osf3* with the addition of -msym flag
5841 if test "$GCC" = yes; then
5842 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5843 _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'
5844 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5846 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5847 _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'
5848 _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~
5849 $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'
5851 # Both c and cxx compiler support -rpath directly
5852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5854 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5858 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5860 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5861 runpath_var=LD_RUN_PATH
5862 hardcode_runpath_var=yes
5866 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5867 if test "$GCC" = yes; then
5869 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5870 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5871 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5874 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5875 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5876 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5878 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5879 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5881 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5883 # The compiler driver will combine linker options so we
5884 # cannot just pass the convience library names through
5885 # without $wl, iff we do not link with $LD.
5886 # Luckily, gcc supports the same syntax we need for Sun Studio.
5887 # Supported since Solaris 2.6 (maybe 2.5.1?)
5890 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5892 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
5895 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5899 if test "x$host_vendor" = xsequent; then
5900 # Use $CC to link under sequent, because it throws in some extra .o
5901 # files that make .init and .fini sections work.
5902 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5904 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5906 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5907 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5908 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5909 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5913 case $host_vendor in
5915 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5916 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5919 ## LD is ld it makes a PLAMLIB
5920 ## CC just makes a GrossModule.
5921 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5922 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5923 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5926 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5927 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5930 runpath_var='LD_RUN_PATH'
5931 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5935 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5937 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5941 if test -d /usr/nec; then
5942 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5943 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5944 runpath_var=LD_RUN_PATH
5945 hardcode_runpath_var=yes
5946 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5951 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5952 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5953 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5954 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5955 hardcode_runpath_var=yes
5956 runpath_var=LD_RUN_PATH
5959 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5960 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5961 if test "$GCC" = yes; then
5962 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5966 runpath_var='LD_RUN_PATH'
5967 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5971 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5972 # $CC -shared without GNU ld will not create a library from C++
5973 # object files and a static libstdc++, better avoid it by now
5974 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5976 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5978 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5979 runpath_var='LD_RUN_PATH'
5983 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5984 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5985 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5989 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5994 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5995 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5997 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5998 if test "$GCC" = yes; then
5999 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6003 # Do we need to explicitly link libc?
6005 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6007 # Assume -lc should be added
6008 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6010 if test "$enable_shared" = yes && test "$GCC" = yes; then
6011 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6013 # FIXME: we may have to deal with multi-command sequences.
6016 # Test whether the compiler implicitly links with -lc since on some
6017 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6018 # to ld, don't add -lc before -lgcc.
6019 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6021 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6023 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6026 libobjs=conftest.$ac_objext
6028 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6034 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6035 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6036 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6038 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6040 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6042 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6044 cat conftest.err 1>&5
6047 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6053 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6056 # _LT_AC_FILE_LTDLL_C
6057 # -------------------
6058 # Be careful that the start marker always follows a newline.
6059 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6060 # /* ltdll.c starts here */
6061 # #define WIN32_LEAN_AND_MEAN
6062 # #include <windows.h>
6063 # #undef WIN32_LEAN_AND_MEAN
6064 # #include <stdio.h>
6066 # #ifndef __CYGWIN__
6067 # # ifdef __CYGWIN32__
6068 # # define __CYGWIN__ __CYGWIN32__
6072 # #ifdef __cplusplus
6075 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6076 # #ifdef __cplusplus
6081 # #include <cygwin/cygwin_dll.h>
6082 # DECLARE_CYGWIN_DLL( DllMain );
6084 # HINSTANCE __hDllInstance_base;
6087 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6089 # __hDllInstance_base = hInst;
6092 # /* ltdll.c ends here */
6093 ])# _LT_AC_FILE_LTDLL_C
6096 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6097 # ---------------------------------
6098 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6102 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6103 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6104 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6105 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6106 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6107 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6108 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6110 # This is just to silence aclocal about the macro not being used
6111 ifelse([AC_DISABLE_FAST_INSTALL])
6113 AC_DEFUN([LT_AC_PROG_GCJ],
6114 [AC_CHECK_TOOL(GCJ, gcj, no)
6115 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6119 AC_DEFUN([LT_AC_PROG_RC],
6120 [AC_CHECK_TOOL(RC, windres, no)
6123 ############################################################
6124 # NOTE: This macro has been submitted for inclusion into #
6125 # GNU Autoconf as AC_PROG_SED. When it is available in #
6126 # a released version of Autoconf we should remove this #
6127 # macro and use it instead. #
6128 ############################################################
6131 # Check for a fully-functional sed program, that truncates
6132 # as few characters as possible. Prefer GNU sed if found.
6133 AC_DEFUN([LT_AC_PROG_SED],
6134 [AC_MSG_CHECKING([for a sed that does not truncate output])
6135 AC_CACHE_VAL(lt_cv_path_SED,
6136 [# Loop through the user's path and test for sed and gsed.
6137 # Then use that list of sed's as ones to test for truncation.
6138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6142 test -z "$as_dir" && as_dir=.
6143 for lt_ac_prog in sed gsed; do
6144 for ac_exec_ext in '' $ac_executable_extensions; do
6145 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6146 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6153 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6154 # along with /bin/sed that truncates output.
6155 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6156 test ! -f $lt_ac_sed && continue
6157 cat /dev/null > conftest.in
6159 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6160 # Check for GNU sed and select it if it is found.
6161 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6162 lt_cv_path_SED=$lt_ac_sed
6166 cat conftest.in conftest.in >conftest.tmp
6167 mv conftest.tmp conftest.in
6168 cp conftest.in conftest.nl
6170 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6171 cmp -s conftest.out conftest.nl || break
6172 # 10000 chars as input seems more than enough
6173 test $lt_ac_count -gt 10 && break
6174 lt_ac_count=`expr $lt_ac_count + 1`
6175 if test $lt_ac_count -gt $lt_ac_max; then
6176 lt_ac_max=$lt_ac_count
6177 lt_cv_path_SED=$lt_ac_sed
6183 AC_MSG_RESULT([$SED])
6185 m4_include([config/gnulib/absolute-header.m4])
6186 m4_include([config/gnulib/alloca.m4])
6187 m4_include([config/gnulib/arpa_inet_h.m4])
6188 m4_include([config/gnulib/eoverflow.m4])
6189 m4_include([config/gnulib/extensions.m4])
6190 m4_include([config/gnulib/getaddrinfo.m4])
6191 m4_include([config/gnulib/gnulib-cache.m4])
6192 m4_include([config/gnulib/gnulib-common.m4])
6193 m4_include([config/gnulib/gnulib-comp.m4])
6194 m4_include([config/gnulib/gnulib-tool.m4])
6195 m4_include([config/gnulib/inet_ntop.m4])
6196 m4_include([config/gnulib/intmax_t.m4])
6197 m4_include([config/gnulib/inttypes_h.m4])
6198 m4_include([config/gnulib/lib-ld.m4])
6199 m4_include([config/gnulib/lib-link.m4])
6200 m4_include([config/gnulib/lib-prefix.m4])
6201 m4_include([config/gnulib/lock.m4])
6202 m4_include([config/gnulib/longdouble.m4])
6203 m4_include([config/gnulib/longlong.m4])
6204 m4_include([config/gnulib/netinet_in_h.m4])
6205 m4_include([config/gnulib/onceonly_2_57.m4])
6206 m4_include([config/gnulib/size_max.m4])
6207 m4_include([config/gnulib/snprintf.m4])
6208 m4_include([config/gnulib/socklen.m4])
6209 m4_include([config/gnulib/sockpfaf.m4])
6210 m4_include([config/gnulib/stdbool.m4])
6211 m4_include([config/gnulib/stdint_h.m4])
6212 m4_include([config/gnulib/strdup.m4])
6213 m4_include([config/gnulib/string_h.m4])
6214 m4_include([config/gnulib/sys_socket_h.m4])
6215 m4_include([config/gnulib/vasnprintf.m4])
6216 m4_include([config/gnulib/visibility.m4])
6217 m4_include([config/gnulib/wchar_t.m4])
6218 m4_include([config/gnulib/wint_t.m4])
6219 m4_include([config/gnulib/xsize.m4])
6220 dnl Check if the compiler can handle unsigned long constants, ie 2ul.
6221 AC_DEFUN([AMANDA_C_UNSIGNED_LONG_CONSTANTS],
6224 [for working unsigned long constants],
6225 amanda_cv_c_unsigned_long_constants,
6233 amanda_cv_c_unsigned_long_constants=yes,
6234 amanda_cv_c_unsigned_long_constants=no
6238 if test "$amanda_cv_c_unsigned_long_constants" = yes; then
6239 AC_DEFINE(HAVE_UNSIGNED_LONG_CONSTANTS,1,[Define if the compiler support unsigned long constants. ])
6244 dnl Check for the argument type for shmat() and shmdt()
6245 AC_DEFUN([AMANDA_FUNC_SHM_ARG_TYPE],
6248 [for shmdt() argument type],
6249 amanda_cv_shmdt_arg_type,
6251 if test "$ac_cv_func_shmget" = yes; then
6252 cat <<EOF >conftest.$ac_ext
6253 #include "confdefs.h"
6254 #ifdef HAVE_SYS_TYPES_H
6255 # include <sys/types.h>
6257 #ifdef HAVE_SYS_IPC_H
6258 # include <sys/ipc.h>
6260 #ifdef HAVE_SYS_SHM_H
6261 # include <sys/shm.h>
6265 extern "C" void *shmat(int, void *, int);
6276 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >/dev/null 2>/dev/null
6277 if test $? = 0; then
6278 amanda_cv_shmdt_arg_type=void
6280 amanda_cv_shmdt_arg_type=char
6284 amanda_cv_shmdt_arg_type=nothing
6288 AC_DEFINE_UNQUOTED(SHM_ARG_TYPE,$amanda_cv_shmdt_arg_type,[Define to type of shmget() function argument. ])
6292 dnl Figure out the select() argument type.
6293 AC_DEFUN([AMANDA_FUNC_SELECT_ARG_TYPE],
6296 [for select() argument type],
6297 amanda_cv_select_arg_type,
6300 cat <<EOF >conftest.$ac_ext
6301 #include "confdefs.h"
6302 #ifdef HAVE_SYS_TIME_H
6303 # include <sys/time.h>
6305 #ifdef HAVE_SYS_TYPES_H
6306 # include <sys/types.h>
6308 #ifdef HAVE_SYS_SELECT_H
6309 # include <sys/select.h>
6311 #ifdef HAVE_SYS_SOCKET_H
6312 # include <sys/socket.h>
6314 #ifdef HAVE_UNISTD_H
6315 # include <unistd.h>
6320 #ifdef FD_SET_POINTER
6321 (void)select(0, (fd_set *) 0, (fd_set *) 0, (fd_set *) 0, 0);
6323 (void)select(0, (int *) 0, (int *) 0, (int *) 0, 0);
6329 dnl Figure out the select argument type by first trying to
6330 dnl compile with the fd_set argument. If the compile fails,
6331 dnl then we know to use the int. If it suceeds, then try to
6332 dnl use the int. If the int fails, then use fd_set. If
6333 dnl both suceeed, then do a line count on the number of
6334 dnl lines that the compiler spit out, assuming that the
6335 dnl compile outputing more lines had more errors.
6336 amanda_cv_select_arg_type=no
6337 select_compile="${CC-cc} -c $CFLAGS $CPPFLAGS"
6338 $select_compile -DFD_SET_POINTER conftest.$ac_ext 1>conftest.fd_set 2>&1
6339 if test $? -ne 0; then
6340 amanda_cv_select_arg_type=int
6342 if test "$amanda_cv_select_arg_type" = no; then
6343 $select_compile conftest.$ac_ext 1>conftest.int 2>&1
6344 if test $? -ne 0; then
6345 amanda_cv_select_arg_type=fd_set
6348 if test "$amanda_cv_select_arg_type" = no; then
6349 wc_fdset=`wc -l <conftest.fd_set`
6350 wc_int=`wc -l <conftest.int`
6351 if test "$wc_fdset" -le "$wc_int"; then
6352 amanda_cv_select_arg_type=fd_set
6354 amanda_cv_select_arg_type=int
6360 AC_DEFINE_UNQUOTED(SELECT_ARG_TYPE,$amanda_cv_select_arg_type,[Define to type of select arguments. ])
6364 dnl Check if setsockopt can use the SO_SNDTIMEO option.
6365 dnl This defines HAVE_SO_SNDTIMEO if setsockopt works
6366 dnl with SO_SNDTIMEO.
6367 AC_DEFUN([AMANDA_FUNC_SETSOCKOPT_SO_SNDTIMEO],
6370 [for setsockopt SO_SNDTIMEO option],
6371 amanda_cv_setsockopt_SO_SNDTIMEO,
6375 #include <sys/types.h>
6376 #include <sys/socket.h>
6377 #ifdef TIME_WITH_SYS_TIME
6378 # include <sys/time.h>
6381 # ifdef HAVE_SYS_TIME_H
6382 # include <sys/time.h>
6390 int sock = socket(AF_INET, SOCK_STREAM, 0);
6391 struct timeval timeout;
6393 timeout.tv_usec = 0;
6394 return (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
6395 (void *)&timeout, sizeof(timeout)));
6401 amanda_cv_setsockopt_SO_SNDTIMEO=yes,
6402 amanda_cv_setsockopt_SO_SNDTIMEO=no,
6403 amanda_cv_setsockopt_SO_SNDTIMEO=no
6407 if test "$amanda_cv_setsockopt_SO_SNDTIMEO" = yes; then
6408 AC_DEFINE(HAVE_SO_SNDTIMEO,1,[Define if SO_SNDTIMEO is available. ])
6413 dnl Check for the one or two argument version of gettimeofday.
6414 AC_DEFUN([AMANDA_FUNC_GETTIMEOFDAY_ARGS],
6416 AC_REQUIRE([AC_HEADER_TIME])
6418 [for gettimeofday number of arguments],
6419 amanda_cv_gettimeofday_args,
6423 #ifdef TIME_WITH_SYS_TIME
6424 # include <sys/time.h>
6427 # ifdef HAVE_SYS_TIME_H
6428 # include <sys/time.h>
6436 struct timezone zone;
6437 gettimeofday(&val, &zone);
6439 amanda_cv_gettimeofday_args=2,
6440 amanda_cv_gettimeofday_args=1
6444 if test "$amanda_cv_gettimeofday_args" = 2; then
6445 AC_DEFINE(HAVE_TWO_ARG_GETTIMEOFDAY,1,[Define if gettimeofday takes two arguments. ])
6452 dnl Check for if pid_t is a long, int, or short.
6453 AC_DEFUN([AMANDA_TYPE_PID_T],
6455 AC_REQUIRE([AC_TYPE_PID_T])
6456 AC_CACHE_CHECK([for pid_t type], amanda_cv_pid_type,
6458 amanda_cv_pid_type=unknown
6459 if test "$ac_cv_type_pid_t" = no; then
6460 amanda_cv_pid_type=int
6462 for TEST_amanda_cv_pid_type in long short int; do
6463 if test $amanda_cv_pid_type = unknown; then
6464 AC_EGREP_CPP(typedef.*${TEST_amanda_cv_pid_type}.*pid_t,
6466 #include <sys/types.h>
6472 amanda_cv_pid_type=$TEST_amanda_cv_pid_type)
6474 if test $amanda_cv_pid_type = unknown; then
6475 AC_EGREP_CPP(ZZZZ.*${TEST_amanda_cv_pid_type},
6477 #include <sys/types.h>
6484 amanda_cv_pid_type=$TEST_amanda_cv_pid_type)
6487 if test $amanda_cv_pid_type = unknown; then
6488 amanda_cv_pid_type=int
6492 case $amanda_cv_pid_type in
6493 int) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d",[Define to printf formatting string to print a PID. ]) ;;
6494 long) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%ld") ;;
6495 short) AC_DEFINE_UNQUOTED(PRINTF_PID_T,"%d") ;;
6502 dnl ICE_CHECK_DECL (FUNCTION, HEADER-FILE...)
6503 dnl If FUNCTION is available, define `HAVE_FUNCTION'. If it is declared
6504 dnl in one of the headers named in the whitespace-separated list
6505 dnl HEADER_FILE, define `HAVE_FUNCTION_DECL` (in all capitals).
6507 AC_DEFUN([ICE_CHECK_DECL],
6510 AC_CHECK_FUNCS($1, ice_have_$1=yes)
6511 if test "${ice_have_$1}" = yes; then
6512 AC_MSG_CHECKING(for $1 declaration in $2)
6513 AC_CACHE_VAL(ice_cv_have_$1_decl,
6515 ice_cv_have_$1_decl=no
6517 ice_re_params='[a-zA-Z_][a-zA-Z0-9_]*'
6518 ice_re_word='(^|[^a-zA-Z0-9_])'
6520 for header in $2; do
6521 # Check for ordinary declaration
6522 AC_EGREP_HEADER([${ice_re_word}$1[ ]*\(], $header,
6523 ice_cv_have_$1_decl=yes)
6524 if test "$ice_cv_have_$1_decl" = yes; then
6527 # Check for "fixed" declaration like "getpid _PARAMS((int))"
6528 AC_EGREP_HEADER([${ice_re_word}$1[ ]*$ice_re_params\(\(], $header,
6529 ice_cv_have_$1_decl=yes)
6530 if test "$ice_cv_have_$1_decl" = yes; then
6535 AC_MSG_RESULT($ice_cv_have_$1_decl)
6536 if test "$ice_cv_have_$1_decl" = yes; then
6537 AC_DEFINE_UNQUOTED([HAVE_]translit($1,[a-z],[A-Z])[_DECL],1,[Define if $1 is declared. ])
6541 dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'.
6542 dnl by T.E.Dickey" , Jim Spath <jspath@mail.bcpl.lib.md.us>
6544 dnl FIXME: These tests should have been in autoconf 1.11!
6546 dnl Note that we cannot simply grep for 'union wait' in the wait.h file,
6547 dnl because some Posix systems turn this on only when a BSD variable is
6548 dnl defined. Since I'm trying to do without special defines, I'll live
6549 dnl with the default behavior of the include-file.
6551 dnl I do _2_ compile checks, because we may have union-wait, but the
6552 dnl prototype for 'wait()' may want an int.
6554 dnl Don't use HAVE_UNION_WAIT, because the autoconf documentation implies
6555 dnl that if we've got union-wait, we'll automatically use it.
6557 dnl Garrett Wollman adds:
6558 dnl The tests described above don't quite do the right thing,
6559 dnl since some systems have hacks which allow `union wait' to
6560 dnl still work even though `int' is preferred (and generates
6561 dnl fewer warnings). Since all of these systems use prototypes,
6562 dnl we can use the prototype of wait(2) to disambiguate them.
6564 dnl Alexandre Oliva adds:
6565 dnl A single compile check is enough. If we don't have union wait,
6566 dnl it's obvious that the test will fail, and that we must use int.
6567 dnl If we do, the prototype (on STDC systems) and WIFEXITED will tell
6568 dnl whether we're supposed to be using union wait instead of int.
6572 AC_REQUIRE([AC_TYPE_PID_T])
6573 AC_HAVE_HEADERS(sys/wait.h wait.h)
6574 AC_CACHE_CHECK([whether wait uses union wait], [cf_cv_arg_union_wait],
6576 #include <sys/types.h>
6579 # include <sys/wait.h>
6587 pid_t wait(union wait *);
6590 union wait x; int i;
6591 wait(&x); i = WIFEXITED(x)
6592 ], [cf_cv_arg_union_wait=yes], [cf_cv_arg_union_wait=no])])
6593 if test $cf_cv_arg_union_wait = yes; then
6594 AC_DEFINE(WAIT_USES_UNION,1,[Defined if wait() puts the status in a union wait instead of int. ])
6597 AC_DEFUN([CF_WAIT_INT],
6599 AC_REQUIRE([AC_TYPE_PID_T])
6600 AC_HAVE_HEADERS(sys/wait.h wait.h)
6601 AC_CACHE_CHECK([whether wait uses int], [cf_cv_arg_int],
6603 #include <sys/types.h>
6606 # include <sys/wait.h>
6618 wait(&x); i = WIFEXITED(x)
6619 ], [cf_cv_arg_int=yes], [cf_cv_arg_int=no])])
6620 if test $cf_cv_arg_int = yes; then
6621 AC_DEFINE(WAIT_USES_INT,1,[Defined if wait() puts the status in a int instead of a union wait. ])
6625 dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
6627 dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
6628 dnl existence of an include file <stdint.h> that defines a set of
6629 dnl typedefs, especially uint8_t,int32_t,uintptr_t.
6630 dnl Many older installations will not provide this file, but some will
6631 dnl have the very same definitions in <inttypes.h>. In other enviroments
6632 dnl we can use the inet-types in <sys/types.h> which would define the
6633 dnl typedefs int8_t and u_int8_t respectivly.
6635 dnl This macros will create a local "_stdint.h" or the headerfile given as
6636 dnl an argument. In many cases that file will just "#include <stdint.h>"
6637 dnl or "#include <inttypes.h>", while in other environments it will provide
6638 dnl the set of basic 'stdint's definitions/typedefs:
6639 dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
6640 dnl int_least32_t.. int_fast32_t.. intmax_t
6641 dnl which may or may not rely on the definitions of other files,
6642 dnl or using the AC_CHECK_SIZEOF macro to determine the actual
6643 dnl sizeof each type.
6645 dnl if your header files require the stdint-types you will want to create an
6646 dnl installable file mylib-int.h that all your other installable header
6647 dnl may include. So if you have a library package named "mylib", just use
6648 dnl AX_CREATE_STDINT_H(mylib-int.h)
6649 dnl in configure.ac and go to install that very header file in Makefile.am
6650 dnl along with the other headers (mylib.h) - and the mylib-specific headers
6651 dnl can simply use "#include <mylib-int.h>" to obtain the stdint-types.
6653 dnl Remember, if the system already had a valid <stdint.h>, the generated
6654 dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
6656 dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/)
6657 dnl @version Id: ax_create_stdint_h.m4,v 1.5 2005/01/06 18:27:27 guidod Exp
6658 dnl @author Guido Draheim <guidod@gmx.de>
6660 AC_DEFUN([AX_CHECK_DATA_MODEL],[
6661 AC_CHECK_SIZEOF(char)
6662 AC_CHECK_SIZEOF(short)
6663 AC_CHECK_SIZEOF(int)
6664 AC_CHECK_SIZEOF(long)
6665 AC_CHECK_SIZEOF(void*)
6666 ac_cv_char_data_model=""
6667 ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
6668 ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
6669 ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
6670 ac_cv_long_data_model=""
6671 ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
6672 ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
6673 ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
6674 AC_MSG_CHECKING([data model])
6675 case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
6676 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;;
6677 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;;
6678 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;;
6679 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
6680 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;;
6681 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
6682 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;;
6683 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
6684 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;;
6685 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
6686 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
6687 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
6688 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
6689 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
6690 222/*|333/*|444/*|666/*|888/*) :
6691 ac_cv_data_model="iDSP" ; n="unusual dsptype" ;;
6692 *) ac_cv_data_model="none" ; n="very unusual model" ;;
6694 AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
6697 dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
6698 AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
6699 AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
6700 ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
6701 AC_MSG_RESULT([(..)])
6702 for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h]) ; do
6703 unset ac_cv_type_uintptr_t
6704 unset ac_cv_type_uint64_t
6705 AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
6706 AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
6707 m4_ifvaln([$1],[$1]) break
6709 AC_MSG_CHECKING([for stdint uintptr_t])
6713 AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
6714 AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
6715 ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
6716 AC_MSG_RESULT([(..)])
6717 for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do
6718 unset ac_cv_type_uint32_t
6719 unset ac_cv_type_uint64_t
6720 AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
6721 AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
6722 m4_ifvaln([$1],[$1]) break
6725 AC_MSG_CHECKING([for stdint uint32_t])
6729 AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
6730 AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
6731 ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
6732 AC_MSG_RESULT([(..)])
6733 for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
6734 unset ac_cv_type_u_int32_t
6735 unset ac_cv_type_u_int64_t
6736 AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
6737 AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
6738 m4_ifvaln([$1],[$1]) break
6741 AC_MSG_CHECKING([for stdint u_int32_t])
6745 AC_DEFUN([AX_CREATE_STDINT_H],
6746 [# ------ AX CREATE STDINT H -------------------------------------
6747 AC_MSG_CHECKING([for stdint types])
6748 ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
6749 # try to shortcircuit - if the default include path of the compiler
6750 # can find a "stdint.h" header then we assume that all compilers can.
6751 AC_CACHE_VAL([ac_cv_header_stdint_t],[
6752 old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
6753 old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
6754 old_CFLAGS="$CFLAGS" ; CFLAGS=""
6755 AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
6756 [ac_cv_stdint_result="(assuming C99 compatible system)"
6757 ac_cv_header_stdint_t="stdint.h"; ],
6758 [ac_cv_header_stdint_t=""])
6759 CXXFLAGS="$old_CXXFLAGS"
6760 CPPFLAGS="$old_CPPFLAGS"
6761 CFLAGS="$old_CFLAGS" ])
6763 v="... $ac_cv_header_stdint_h"
6764 if test "$ac_stdint_h" = "stdint.h" ; then
6765 AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
6766 elif test "$ac_stdint_h" = "inttypes.h" ; then
6767 AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
6768 elif test "_$ac_cv_header_stdint_t" = "_" ; then
6769 AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
6771 ac_cv_header_stdint="$ac_cv_header_stdint_t"
6772 AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
6775 if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
6777 dnl .....intro message done, now do a few system checks.....
6778 dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
6779 dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
6780 dnl instead that is triggered with 3 or more arguments (see types.m4)
6782 inttype_headers=`echo $2 | sed -e 's/,/ /g'`
6784 ac_cv_stdint_result="(no helpful system typedefs seen)"
6785 AX_CHECK_HEADER_STDINT_X(dnl
6786 stdint.h inttypes.h sys/inttypes.h $inttype_headers,
6787 ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
6789 if test "_$ac_cv_header_stdint_x" = "_" ; then
6790 AX_CHECK_HEADER_STDINT_O(dnl,
6791 inttypes.h sys/inttypes.h stdint.h $inttype_headers,
6792 ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
6795 if test "_$ac_cv_header_stdint_x" = "_" ; then
6796 if test "_$ac_cv_header_stdint_o" = "_" ; then
6797 AX_CHECK_HEADER_STDINT_U(dnl,
6798 sys/types.h inttypes.h sys/inttypes.h $inttype_headers,
6799 ac_cv_stdint_result="(seen u_int32_t$and64 in $i)")
6802 dnl if there was no good C99 header file, do some typedef checks...
6803 if test "_$ac_cv_header_stdint_x" = "_" ; then
6804 AC_MSG_CHECKING([for stdint datatype model])
6805 AC_MSG_RESULT([(..)])
6809 if test "_$ac_cv_header_stdint_x" != "_" ; then
6810 ac_cv_header_stdint="$ac_cv_header_stdint_x"
6811 elif test "_$ac_cv_header_stdint_o" != "_" ; then
6812 ac_cv_header_stdint="$ac_cv_header_stdint_o"
6813 elif test "_$ac_cv_header_stdint_u" != "_" ; then
6814 ac_cv_header_stdint="$ac_cv_header_stdint_u"
6816 ac_cv_header_stdint="stddef.h"
6819 AC_MSG_CHECKING([for extra inttypes in chosen header])
6820 AC_MSG_RESULT([($ac_cv_header_stdint)])
6821 dnl see if int_least and int_fast types are present in _this_ header.
6822 unset ac_cv_type_int_least32_t
6823 unset ac_cv_type_int_fast32_t
6824 AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
6825 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
6826 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
6828 fi # shortcircut to system "stdint.h"
6829 # ------------------ PREPARE VARIABLES ------------------------------
6830 if test "$GCC" = "yes" ; then
6831 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
6833 ac_cv_stdint_message="using $CC"
6836 AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
6837 $ac_cv_stdint_result])
6839 dnl -----------------------------------------------------------------
6840 # ----------------- DONE inttypes.h checks START header -------------
6841 AC_CONFIG_COMMANDS([$ac_stdint_h],[
6842 AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
6843 ac_stdint=$tmp/_stdint.h
6845 echo "#ifndef" $_ac_stdint_h >$ac_stdint
6846 echo "#define" $_ac_stdint_h "1" >>$ac_stdint
6847 echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
6848 echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
6849 echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
6850 if test "_$ac_cv_header_stdint_t" != "_" ; then
6851 echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
6852 echo "#include <stdint.h>" >>$ac_stdint
6853 echo "#endif" >>$ac_stdint
6854 echo "#endif" >>$ac_stdint
6857 cat >>$ac_stdint <<STDINT_EOF
6859 /* ................... shortcircuit part ........................... */
6861 #if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
6866 /* .................... configured part ............................ */
6870 echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
6871 if test "_$ac_cv_header_stdint_x" != "_" ; then
6872 ac_header="$ac_cv_header_stdint_x"
6873 echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
6875 echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
6878 echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
6879 if test "_$ac_cv_header_stdint_o" != "_" ; then
6880 ac_header="$ac_cv_header_stdint_o"
6881 echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
6883 echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
6886 echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
6887 if test "_$ac_cv_header_stdint_u" != "_" ; then
6888 ac_header="$ac_cv_header_stdint_u"
6889 echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
6891 echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
6894 echo "" >>$ac_stdint
6896 if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
6897 echo "#include <$ac_header>" >>$ac_stdint
6898 echo "" >>$ac_stdint
6901 echo "/* which 64bit typedef has been found */" >>$ac_stdint
6902 if test "$ac_cv_type_uint64_t" = "yes" ; then
6903 echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint
6905 echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
6907 if test "$ac_cv_type_u_int64_t" = "yes" ; then
6908 echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint
6910 echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
6912 echo "" >>$ac_stdint
6914 echo "/* which type model has been detected */" >>$ac_stdint
6915 if test "_$ac_cv_char_data_model" != "_" ; then
6916 echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
6917 echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
6919 echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
6920 echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
6922 echo "" >>$ac_stdint
6924 echo "/* whether int_least types were detected */" >>$ac_stdint
6925 if test "$ac_cv_type_int_least32_t" = "yes"; then
6926 echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint
6928 echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
6930 echo "/* whether int_fast types were detected */" >>$ac_stdint
6931 if test "$ac_cv_type_int_fast32_t" = "yes"; then
6932 echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
6934 echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
6936 echo "/* whether intmax_t type was detected */" >>$ac_stdint
6937 if test "$ac_cv_type_intmax_t" = "yes"; then
6938 echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
6940 echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
6942 echo "" >>$ac_stdint
6944 cat >>$ac_stdint <<STDINT_EOF
6945 /* .................... detections part ............................ */
6947 /* whether we need to define bitspecific types from compiler base types */
6948 #ifndef _STDINT_HEADER_INTPTR
6949 #ifndef _STDINT_HEADER_UINT32
6950 #ifndef _STDINT_HEADER_U_INT32
6951 #define _STDINT_NEED_INT_MODEL_T
6953 #define _STDINT_HAVE_U_INT_TYPES
6958 #ifdef _STDINT_HAVE_U_INT_TYPES
6959 #undef _STDINT_NEED_INT_MODEL_T
6962 #ifdef _STDINT_CHAR_MODEL
6963 #if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
6964 #ifndef _STDINT_BYTE_MODEL
6965 #define _STDINT_BYTE_MODEL 12
6970 #ifndef _STDINT_HAVE_INT_LEAST32_T
6971 #define _STDINT_NEED_INT_LEAST_T
6974 #ifndef _STDINT_HAVE_INT_FAST32_T
6975 #define _STDINT_NEED_INT_FAST_T
6978 #ifndef _STDINT_HEADER_INTPTR
6979 #define _STDINT_NEED_INTPTR_T
6980 #ifndef _STDINT_HAVE_INTMAX_T
6981 #define _STDINT_NEED_INTMAX_T
6986 /* .................... definition part ............................ */
6988 /* some system headers have good uint64_t */
6989 #ifndef _HAVE_UINT64_T
6990 #if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T
6991 #define _HAVE_UINT64_T
6992 #elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
6993 #define _HAVE_UINT64_T
6994 typedef u_int64_t uint64_t;
6998 #ifndef _HAVE_UINT64_T
6999 /* .. here are some common heuristics using compiler runtime specifics */
7000 #if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
7001 #define _HAVE_UINT64_T
7002 #define _HAVE_LONGLONG_UINT64_T
7003 typedef long long int64_t;
7004 typedef unsigned long long uint64_t;
7006 #elif !defined __STRICT_ANSI__
7007 #if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
7008 #define _HAVE_UINT64_T
7009 typedef __int64 int64_t;
7010 typedef unsigned __int64 uint64_t;
7012 #elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
7013 /* note: all ELF-systems seem to have loff-support which needs 64-bit */
7014 #if !defined _NO_LONGLONG
7015 #define _HAVE_UINT64_T
7016 #define _HAVE_LONGLONG_UINT64_T
7017 typedef long long int64_t;
7018 typedef unsigned long long uint64_t;
7021 #elif defined __alpha || (defined __mips && defined _ABIN32)
7022 #if !defined _NO_LONGLONG
7023 #define _HAVE_UINT64_T
7024 typedef long int64_t;
7025 typedef unsigned long uint64_t;
7027 /* compiler/cpu type to define int64_t */
7032 #if defined _STDINT_HAVE_U_INT_TYPES
7033 /* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
7034 typedef u_int8_t uint8_t;
7035 typedef u_int16_t uint16_t;
7036 typedef u_int32_t uint32_t;
7038 /* glibc compatibility */
7039 #ifndef __int8_t_defined
7040 #define __int8_t_defined
7044 #ifdef _STDINT_NEED_INT_MODEL_T
7045 /* we must guess all the basic types. Apart from byte-adressable system, */
7046 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
7047 /* (btw, those nibble-addressable systems are way off, or so we assume) */
7049 dnl /* have a look at "64bit and data size neutrality" at */
7050 dnl /* http://unix.org/version2/whatsnew/login_64bit.html */
7051 dnl /* (the shorthand "ILP" types always have a "P" part) */
7053 #if defined _STDINT_BYTE_MODEL
7054 #if _STDINT_LONG_MODEL+0 == 242
7055 /* 2:4:2 = IP16 = a normal 16-bit system */
7056 typedef unsigned char uint8_t;
7057 typedef unsigned short uint16_t;
7058 typedef unsigned long uint32_t;
7059 #ifndef __int8_t_defined
7060 #define __int8_t_defined
7061 typedef char int8_t;
7062 typedef short int16_t;
7063 typedef long int32_t;
7065 #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
7066 /* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */
7067 /* 4:4:4 = ILP32 = a normal 32-bit system */
7068 typedef unsigned char uint8_t;
7069 typedef unsigned short uint16_t;
7070 typedef unsigned int uint32_t;
7071 #ifndef __int8_t_defined
7072 #define __int8_t_defined
7073 typedef char int8_t;
7074 typedef short int16_t;
7075 typedef int int32_t;
7077 #elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
7078 /* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */
7079 /* 4:8:8 = LP64 = a normal 64-bit system */
7080 typedef unsigned char uint8_t;
7081 typedef unsigned short uint16_t;
7082 typedef unsigned int uint32_t;
7083 #ifndef __int8_t_defined
7084 #define __int8_t_defined
7085 typedef char int8_t;
7086 typedef short int16_t;
7087 typedef int int32_t;
7089 /* this system has a "long" of 64bit */
7090 #ifndef _HAVE_UINT64_T
7091 #define _HAVE_UINT64_T
7092 typedef unsigned long uint64_t;
7093 typedef long int64_t;
7095 #elif _STDINT_LONG_MODEL+0 == 448
7096 /* LLP64 a 64-bit system derived from a 32-bit system */
7097 typedef unsigned char uint8_t;
7098 typedef unsigned short uint16_t;
7099 typedef unsigned int uint32_t;
7100 #ifndef __int8_t_defined
7101 #define __int8_t_defined
7102 typedef char int8_t;
7103 typedef short int16_t;
7104 typedef int int32_t;
7106 /* assuming the system has a "long long" */
7107 #ifndef _HAVE_UINT64_T
7108 #define _HAVE_UINT64_T
7109 #define _HAVE_LONGLONG_UINT64_T
7110 typedef unsigned long long uint64_t;
7111 typedef long long int64_t;
7114 #define _STDINT_NO_INT32_T
7117 #define _STDINT_NO_INT8_T
7118 #define _STDINT_NO_INT32_T
7123 * quote from SunOS-5.8 sys/inttypes.h:
7124 * Use at your own risk. As of February 1996, the committee is squarely
7125 * behind the fixed sized types; the "least" and "fast" types are still being
7126 * discussed. The probability that the "fast" types may be removed before
7127 * the standard is finalized is high enough that they are not currently
7131 #if defined _STDINT_NEED_INT_LEAST_T
7132 typedef int8_t int_least8_t;
7133 typedef int16_t int_least16_t;
7134 typedef int32_t int_least32_t;
7135 #ifdef _HAVE_UINT64_T
7136 typedef int64_t int_least64_t;
7139 typedef uint8_t uint_least8_t;
7140 typedef uint16_t uint_least16_t;
7141 typedef uint32_t uint_least32_t;
7142 #ifdef _HAVE_UINT64_T
7143 typedef uint64_t uint_least64_t;
7148 #if defined _STDINT_NEED_INT_FAST_T
7149 typedef int8_t int_fast8_t;
7150 typedef int int_fast16_t;
7151 typedef int32_t int_fast32_t;
7152 #ifdef _HAVE_UINT64_T
7153 typedef int64_t int_fast64_t;
7156 typedef uint8_t uint_fast8_t;
7157 typedef unsigned uint_fast16_t;
7158 typedef uint32_t uint_fast32_t;
7159 #ifdef _HAVE_UINT64_T
7160 typedef uint64_t uint_fast64_t;
7165 #ifdef _STDINT_NEED_INTMAX_T
7166 #ifdef _HAVE_UINT64_T
7167 typedef int64_t intmax_t;
7168 typedef uint64_t uintmax_t;
7170 typedef long intmax_t;
7171 typedef unsigned long uintmax_t;
7175 #ifdef _STDINT_NEED_INTPTR_T
7176 #ifndef __intptr_t_defined
7177 #define __intptr_t_defined
7178 /* we encourage using "long" to store pointer values, never use "int" ! */
7179 #if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
7180 typedef unsinged int uintptr_t;
7181 typedef int intptr_t;
7182 #elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
7183 typedef unsigned long uintptr_t;
7184 typedef long intptr_t;
7185 #elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
7186 typedef uint64_t uintptr_t;
7187 typedef int64_t intptr_t;
7188 #else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
7189 typedef unsigned long uintptr_t;
7190 typedef long intptr_t;
7195 /* The ISO C99 standard specifies that in C++ implementations these
7196 should only be defined if explicitly requested. */
7197 #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
7201 # define INT8_C(c) c
7202 # define INT16_C(c) c
7203 # define INT32_C(c) c
7204 # ifdef _HAVE_LONGLONG_UINT64_T
7205 # define INT64_C(c) c ## L
7207 # define INT64_C(c) c ## LL
7211 # define UINT8_C(c) c ## U
7212 # define UINT16_C(c) c ## U
7213 # define UINT32_C(c) c ## U
7214 # ifdef _HAVE_LONGLONG_UINT64_T
7215 # define UINT64_C(c) c ## UL
7217 # define UINT64_C(c) c ## ULL
7221 # ifdef _HAVE_LONGLONG_UINT64_T
7222 # define INTMAX_C(c) c ## L
7223 # define UINTMAX_C(c) c ## UL
7225 # define INTMAX_C(c) c ## LL
7226 # define UINTMAX_C(c) c ## ULL
7229 /* literalnumbers */
7233 /* These limits are merily those of a two complement byte-oriented system */
7235 /* Minimum of signed integral types. */
7236 # define INT8_MIN (-128)
7237 # define INT16_MIN (-32767-1)
7238 # define INT32_MIN (-2147483647-1)
7239 # define INT64_MIN (-__INT64_C(9223372036854775807)-1)
7240 /* Maximum of signed integral types. */
7241 # define INT8_MAX (127)
7242 # define INT16_MAX (32767)
7243 # define INT32_MAX (2147483647)
7244 # define INT64_MAX (__INT64_C(9223372036854775807))
7246 /* Maximum of unsigned integral types. */
7247 # define UINT8_MAX (255)
7248 # define UINT16_MAX (65535)
7249 # define UINT32_MAX (4294967295U)
7250 # define UINT64_MAX (__UINT64_C(18446744073709551615))
7252 /* Minimum of signed integral types having a minimum size. */
7253 # define INT_LEAST8_MIN INT8_MIN
7254 # define INT_LEAST16_MIN INT16_MIN
7255 # define INT_LEAST32_MIN INT32_MIN
7256 # define INT_LEAST64_MIN INT64_MIN
7257 /* Maximum of signed integral types having a minimum size. */
7258 # define INT_LEAST8_MAX INT8_MAX
7259 # define INT_LEAST16_MAX INT16_MAX
7260 # define INT_LEAST32_MAX INT32_MAX
7261 # define INT_LEAST64_MAX INT64_MAX
7263 /* Maximum of unsigned integral types having a minimum size. */
7264 # define UINT_LEAST8_MAX UINT8_MAX
7265 # define UINT_LEAST16_MAX UINT16_MAX
7266 # define UINT_LEAST32_MAX UINT32_MAX
7267 # define UINT_LEAST64_MAX UINT64_MAX
7276 if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
7277 AC_MSG_NOTICE([$ac_stdint_h is unchanged])
7279 ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
7280 AS_MKDIR_P(["$ac_dir"])
7282 mv $ac_stdint $ac_stdint_h
7284 ],[# variables for create stdint.h replacement
7287 ac_stdint_h="$ac_stdint_h"
7288 _ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
7289 ac_cv_stdint_message="$ac_cv_stdint_message"
7290 ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
7291 ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
7292 ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
7293 ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
7294 ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
7295 ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
7296 ac_cv_char_data_model="$ac_cv_char_data_model"
7297 ac_cv_long_data_model="$ac_cv_long_data_model"
7298 ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
7299 ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
7300 ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
7305 # -----------------------------------------------------------------
7306 # Find an xsltproc executable.
7309 # $1 is the default $XSLTPROC_FLAGS, which will be overridden if the
7310 # user specifies --with-xsltproc-flags.
7312 # $XSLTPROC contains the path to xsltproc, or is empty if none was
7313 # found or the user specified --without-xsltproc. $XSLTPROC_FLAGS
7314 # contains the flags to use with xsltproc.
7316 AC_DEFUN([AC_PROG_XSLTPROC],
7319 AC_SUBST(XSLTPROC_FLAGS)
7321 # The (lack of) whitespace and overquoting here are all necessary for
7322 # proper formatting.
7323 AC_ARG_WITH(xsltproc,
7324 AS_HELP_STRING([--with-xsltproc[[[[[=PATH]]]]]],
7325 [Use the xsltproc binary in in PATH.]),
7326 [ ac_with_xsltproc=$withval; ],
7327 [ ac_with_xsltproc=maybe; ])
7329 AC_ARG_WITH(xsltproc-flags,
7330 AS_HELP_STRING([ --with-xsltproc-flags=FLAGS],
7331 [Flags to pass to xsltproc (default $1)]),
7332 [ if test "x$withval" == "xno"; then
7335 if test "x$withval" != "xyes"; then
7336 XSLTPROC_FLAGS="$withval"
7341 # search for xsltproc if it wasn't specified
7342 if test "$ac_with_xsltproc" = "yes" -o "$ac_with_xsltproc" = "maybe"; then
7343 AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH)
7345 if test "$ac_with_xsltproc" != "no"; then
7346 if test -x "$ac_with_xsltproc"; then
7347 XSLTPROC="$ac_with_xsltproc";
7349 AC_MSG_WARN([Specified xsltproc of $ac_with_xsltproc isn't])
7350 AC_MSG_WARN([executable; searching for an alternative.])
7351 AC_PATH_PROGS(XSLTPROC,xsltproc,,$LOCSYSPATH)
7357 # AC_CHECK_DOCBOOK_XSLT
7358 # -----------------------------------------------------------------
7359 # Check for access to docbook stylesheets of a particular revision.
7360 # This macro can be used for multiple versions within the same script.
7363 # $1 is the version of docbook to search for; default 'current'
7365 # $HAVE_DOCBOOK_XSLT_VERS will be set to 'yes' or 'no' depending
7366 # on the results of the test, where VERS is $1, with '_' substituted
7367 # for '.' $HAVE_DOCBOOK_XSLT will also be set to the same value.
7368 AC_DEFUN([AC_CHECK_DOCBOOK_XSLT],
7370 AC_REQUIRE([AC_PROG_XSLTPROC])
7372 dnl define a temporary variable for the version, so this macro can be
7373 dnl used with multiple versions
7375 ifelse(_VERS, [], [define([_VERS], [current])])
7376 define([ac_cv_docbook_xslt_VERS], patsubst([ac_cv_docbook_xslt_]_VERS, [\.], [_]))
7377 define([HAVE_DOCBOOK_XSLT_VERS], patsubst([HAVE_DOCBOOK_XSLT_]_VERS, [\.], [_]))
7379 AC_CACHE_CHECK([for Docbook XSLT version ]_VERS, [ac_cv_docbook_xslt_VERS],
7381 ac_cv_docbook_xslt_VERS=no
7382 if test -n "$XSLTPROC"; then
7383 echo "Trying '$XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl'" >&AS_MESSAGE_LOG_FD
7384 $XSLTPROC $XSLTPROC_FLAGS http://docbook.sourceforge.net/release/xsl/_VERS/xhtml/docbook.xsl >&AS_MESSAGE_LOG_FD 2>&1
7386 if test "$?" = 0; then
7387 ac_cv_docbook_xslt_VERS=yes
7392 HAVE_DOCBOOK_XSLT_VERS="$ac_cv_docbook_xslt_VERS"
7393 HAVE_DOCBOOK_XSLT=HAVE_DOCBOOK_XSLT_VERS
7397 # AC_CHECK_DOCBOOK_DTD
7398 # -----------------------------------------------------------------
7399 # Check for access to docbook DTD of a particular revision.
7400 # This macro can be used for multiple versions within the same script.
7403 # $1 is the version of docbook to search for; default 'current'
7405 # $HAVE_DOCBOOK_DTD_VERS will be set to 'yes' or 'no' depending
7406 # on the results of the test, where VERS is $1, with '_' substituted
7407 # for '.' $HAVE_DOCBOOK_DTD will also be set to the same value.
7408 AC_DEFUN([AC_CHECK_DOCBOOK_DTD],
7410 AC_REQUIRE([AC_PROG_XSLTPROC])
7412 dnl define a temporary variable for the version, so this macro can be
7413 dnl used with multiple versions
7415 ifelse(_VERS, [], [define([_VERS], [current])])
7416 define([ac_cv_docbook_dtd_VERS], patsubst([ac_cv_docbook_dtd_]_VERS, [\.], [_]))
7417 define([HAVE_DOCBOOK_DTD_VERS], patsubst([HAVE_DOCBOOK_DTD_]_VERS, [\.], [_]))
7419 AC_CACHE_CHECK([for Docbook DTD version ]_VERS, [ac_cv_docbook_dtd_VERS],
7421 ac_cv_docbook_dtd_VERS=no
7422 if test -n "$XSLTPROC"; then
7423 MY_XSLTPROC_FLAGS=`echo "" $XSLTPROC_FLAGS|sed -e s/--novalid//g`
7424 cat <<EOF >conftest.xml
7425 <?xml version="1.0" encoding='ISO-8859-1'?>
7426 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V[]_VERS//EN" "http://www.oasis-open.org/docbook/xml/_VERS/docbookx.dtd">
7430 echo "Trying '$XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml'" >&AS_MESSAGE_LOG_FD
7431 $XSLTPROC $MY_XSLTPROC_FLAGS conftest.xml >conftest.out 2>&1
7432 if test "$?" = 0; then
7433 # failing to load the DTD is just a warning, so check for it in the output.
7434 if grep 'warning: failed to load external entity' conftest_out >/dev/null 2>&1; then
7437 ac_cv_docbook_dtd_VERS=yes
7440 cat conftest.out >&AS_MESSAGE_LOG_FD
7442 rm -f conftest.xml conftest.out
7446 HAVE_DOCBOOK_DTD_VERS="$ac_cv_docbook_dtd_VERS"
7447 HAVE_DOCBOOK_DTD=HAVE_DOCBOOK_DTD_VERS
7451 dnl Checks to see if there's a sockaddr_storage structure
7455 dnl AC_SOCKADDR_STORAGE
7459 dnl HAVE_SOCKADDR_STORAGE (defined)
7461 AC_DEFUN([AC_SOCKADDR_STORAGE],
7462 [AC_MSG_CHECKING(if sockaddr_storage struct exists)
7463 AC_CACHE_VAL(ac_cv_has_sockaddr_storage,
7465 # include <sys/types.h>
7466 # include <sys/socket.h>],
7467 [u_int i = sizeof (struct sockaddr_storage)],
7468 ac_cv_has_sockaddr_storage=yes,
7469 ac_cv_has_sockaddr_storage=no))
7470 AC_MSG_RESULT($ac_cv_has_sockaddr_storage)
7471 if test $ac_cv_has_sockaddr_storage = yes ; then
7472 AC_DEFINE(HAVE_SOCKADDR_STORAGE,1,[if struct sockaddr_storage exists])