1 # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
16 # serial 51 Debian 1.5.24-2 AC_PROG_LIBTOOL
19 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20 # -----------------------------------------------------------
21 # If this macro is not defined by Autoconf, define it here.
22 m4_ifdef([AC_PROVIDE_IFELSE],
24 [m4_define([AC_PROVIDE_IFELSE],
25 [m4_ifdef([AC_PROVIDE_$1],
31 AC_DEFUN([AC_PROG_LIBTOOL],
32 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35 AC_PROVIDE_IFELSE([AC_PROG_CXX],
37 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
39 dnl And a similar setup for Fortran 77 support
40 AC_PROVIDE_IFELSE([AC_PROG_F77],
42 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
45 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
50 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
52 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
55 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56 ifdef([A][M_PROG_GCJ],
57 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58 ifdef([LT_AC_PROG_GCJ],
59 [define([LT_AC_PROG_GCJ],
60 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
66 AC_DEFUN([_AC_PROG_LIBTOOL],
67 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
72 # This can be used to rebuild libtool when needed
73 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
75 # Always use our own libtool.
76 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
79 # Prevent multiple expansion
80 define([AC_PROG_LIBTOOL], [])
86 AC_DEFUN([AC_LIBTOOL_SETUP],
88 AC_REQUIRE([AC_ENABLE_SHARED])dnl
89 AC_REQUIRE([AC_ENABLE_STATIC])dnl
90 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91 AC_REQUIRE([AC_CANONICAL_HOST])dnl
92 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
93 AC_REQUIRE([AC_PROG_CC])dnl
94 AC_REQUIRE([AC_PROG_LD])dnl
95 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96 AC_REQUIRE([AC_PROG_NM])dnl
98 AC_REQUIRE([AC_PROG_LN_S])dnl
99 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101 AC_REQUIRE([AC_OBJEXT])dnl
102 AC_REQUIRE([AC_EXEEXT])dnl
105 AC_LIBTOOL_SYS_MAX_CMD_LEN
106 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
109 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110 _LT_AC_PROG_ECHO_BACKSLASH
114 # AIX sometimes has problems with the GCC collect2 program. For some
115 # reason, if we set the COLLECT_NAMES environment variable, the problems
116 # vanish in a puff of smoke.
117 if test "X${COLLECT_NAMES+set}" != Xset; then
124 # Sed substitution that helps us do robust quoting. It backslashifies
125 # metacharacters that are still active within double-quoted strings.
126 Xsed='sed -e 1s/^X//'
127 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
129 # Same as above, but do not quote variable references.
130 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
132 # Sed substitution to delay expansion of an escaped shell variable in a
133 # double_quote_subst'ed string.
134 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
136 # Sed substitution to avoid accidental globbing in evaled expressions
137 no_glob_subst='s/\*/\\\*/g'
143 default_ofile=libtool
146 # All known linkers require a `.a' archive for static linking (except MSVC,
147 # which needs '.lib').
149 ltmain="$ac_aux_dir/ltmain.sh"
150 ofile="$default_ofile"
151 with_gnu_ld="$lt_cv_prog_gnu_ld"
153 AC_CHECK_TOOL(AR, ar, false)
154 AC_CHECK_TOOL(RANLIB, ranlib, :)
155 AC_CHECK_TOOL(STRIP, strip, :)
160 # Set sane defaults for various variables
161 test -z "$AR" && AR=ar
162 test -z "$AR_FLAGS" && AR_FLAGS=cru
163 test -z "$AS" && AS=as
164 test -z "$CC" && CC=cc
165 test -z "$LTCC" && LTCC=$CC
166 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167 test -z "$DLLTOOL" && DLLTOOL=dlltool
168 test -z "$LD" && LD=ld
169 test -z "$LN_S" && LN_S="ln -s"
170 test -z "$MAGIC_CMD" && MAGIC_CMD=file
171 test -z "$NM" && NM=nm
172 test -z "$SED" && SED=sed
173 test -z "$OBJDUMP" && OBJDUMP=objdump
174 test -z "$RANLIB" && RANLIB=:
175 test -z "$STRIP" && STRIP=:
176 test -z "$ac_objext" && ac_objext=o
178 # Determine commands to create old-style static archives.
179 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
180 old_postinstall_cmds='chmod 644 $oldlib'
181 old_postuninstall_cmds=
183 if test -n "$RANLIB"; then
186 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
189 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
192 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
195 _LT_CC_BASENAME([$compiler])
197 # Only perform the check for file, if the check method requires it
198 case $deplibs_check_method in
200 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
206 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208 enable_win32_dll=yes, enable_win32_dll=no)
210 AC_ARG_ENABLE([libtool-lock],
211 [AC_HELP_STRING([--disable-libtool-lock],
212 [avoid locking (might break parallel builds)])])
213 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
216 [AC_HELP_STRING([--with-pic],
217 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218 [pic_mode="$withval"],
220 test -z "$pic_mode" && pic_mode=default
222 # Use C for the default configuration in the libtool script
224 AC_LIBTOOL_LANG_C_CONFIG
229 # _LT_AC_SYS_COMPILER
230 # -------------------
231 AC_DEFUN([_LT_AC_SYS_COMPILER],
232 [AC_REQUIRE([AC_PROG_CC])dnl
234 # If no C compiler was specified, use CC.
237 # If no C compiler flags were specified, use CFLAGS.
238 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
240 # Allow CC to be a program name with arguments.
242 ])# _LT_AC_SYS_COMPILER
245 # _LT_CC_BASENAME(CC)
246 # -------------------
247 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
248 AC_DEFUN([_LT_CC_BASENAME],
249 [for cc_temp in $1""; do
251 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
257 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
261 # _LT_COMPILER_BOILERPLATE
262 # ------------------------
263 # Check for compiler boilerplate output or warnings with
264 # the simple compiler test code.
265 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
266 [AC_REQUIRE([LT_AC_PROG_SED])dnl
267 ac_outfile=conftest.$ac_objext
268 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
269 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
270 _lt_compiler_boilerplate=`cat conftest.err`
272 ])# _LT_COMPILER_BOILERPLATE
275 # _LT_LINKER_BOILERPLATE
276 # ----------------------
277 # Check for linker boilerplate output or warnings with
278 # the simple link test code.
279 AC_DEFUN([_LT_LINKER_BOILERPLATE],
280 [AC_REQUIRE([LT_AC_PROG_SED])dnl
281 ac_outfile=conftest.$ac_objext
282 echo "$lt_simple_link_test_code" >conftest.$ac_ext
283 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
284 _lt_linker_boilerplate=`cat conftest.err`
286 ])# _LT_LINKER_BOILERPLATE
289 # _LT_AC_SYS_LIBPATH_AIX
290 # ----------------------
291 # Links a minimal program and checks the executable
292 # for the system default hardcoded library path. In most cases,
293 # this is /usr/lib:/lib, but when the MPI compilers are used
294 # the location of the communication and MPI libs are included too.
295 # If we don't find anything, use the default library path according
296 # to the aix ld manual.
297 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
298 [AC_REQUIRE([LT_AC_PROG_SED])dnl
299 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
301 /Import File Strings/,/^$/ {
307 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
308 # Check for a 64-bit object if we didn't find anything.
309 if test -z "$aix_libpath"; then
310 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
312 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
313 ])# _LT_AC_SYS_LIBPATH_AIX
316 # _LT_AC_SHELL_INIT(ARG)
317 # ----------------------
318 AC_DEFUN([_LT_AC_SHELL_INIT],
319 [ifdef([AC_DIVERSION_NOTICE],
320 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
321 [AC_DIVERT_PUSH(NOTICE)])
324 ])# _LT_AC_SHELL_INIT
327 # _LT_AC_PROG_ECHO_BACKSLASH
328 # --------------------------
329 # Add some code to the start of the generated configure script which
330 # will find an echo command which doesn't interpret backslashes.
331 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
333 # Check that we are running under the correct shell.
334 SHELL=${CONFIG_SHELL-/bin/sh}
338 # Remove one level of quotation (which was required for Make).
339 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
344 if test "X[$]1" = X--no-reexec; then
345 # Discard the --no-reexec flag, and continue.
347 elif test "X[$]1" = X--fallback-echo; then
348 # Avoid inline document here, it may be left over
350 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
351 # Yippee, $echo works!
354 # Restart under the correct shell.
355 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
358 if test "X[$]1" = X--fallback-echo; then
359 # used as fallback echo
367 # The HP-UX ksh and POSIX shell print the target directory to stdout
369 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
371 if test -z "$ECHO"; then
372 if test "X${echo_test_string+set}" != Xset; then
373 # find a string as large as possible, as long as the shell can cope with it
374 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
375 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
376 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
377 echo_test_string=`eval $cmd` &&
378 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
385 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
386 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
387 test "X$echo_testing_string" = "X$echo_test_string"; then
390 # The Solaris, AIX, and Digital Unix default echo programs unquote
391 # backslashes. This makes it impossible to quote backslashes using
392 # echo "$something" | sed 's/\\/\\\\/g'
394 # So, first we look for a working echo in the user's PATH.
396 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
397 for dir in $PATH /usr/ucb; do
399 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
400 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
401 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
402 test "X$echo_testing_string" = "X$echo_test_string"; then
409 if test "X$echo" = Xecho; then
410 # We didn't find a better echo, so look for alternatives.
411 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
412 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
413 test "X$echo_testing_string" = "X$echo_test_string"; then
414 # This shell has a builtin print -r that does the trick.
416 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
417 test "X$CONFIG_SHELL" != X/bin/ksh; then
418 # If we have ksh, try running configure again with it.
419 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
420 export ORIGINAL_CONFIG_SHELL
421 CONFIG_SHELL=/bin/ksh
423 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
427 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
428 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
429 test "X$echo_testing_string" = "X$echo_test_string"; then
432 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
433 test "X$echo_testing_string" = 'X\t' &&
434 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
435 test "X$echo_testing_string" = "X$echo_test_string"; then
436 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
438 SHELL="$CONFIG_SHELL"
440 echo="$CONFIG_SHELL [$]0 --fallback-echo"
441 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
442 test "X$echo_testing_string" = 'X\t' &&
443 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
444 test "X$echo_testing_string" = "X$echo_test_string"; then
445 echo="$CONFIG_SHELL [$]0 --fallback-echo"
447 # maybe with a smaller string...
450 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
451 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
458 if test "$prev" != 'sed 50q "[$]0"'; then
459 echo_test_string=`eval $prev`
460 export echo_test_string
461 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
463 # Oops. We lost completely, so just stick with echo.
472 # Copy echo and quote the copy suitably for passing to libtool from
473 # the Makefile, instead of quoting the original, which is used later.
475 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
476 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
480 ])])# _LT_AC_PROG_ECHO_BACKSLASH
485 AC_DEFUN([_LT_AC_LOCK],
486 [AC_ARG_ENABLE([libtool-lock],
487 [AC_HELP_STRING([--disable-libtool-lock],
488 [avoid locking (might break parallel builds)])])
489 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
491 # Some flags need to be propagated to the compiler or linker for good
495 # Find out which ABI we are using.
496 echo 'int i;' > conftest.$ac_ext
497 if AC_TRY_EVAL(ac_compile); then
498 case `/usr/bin/file conftest.$ac_objext` in
510 # Find out which ABI we are using.
511 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
512 if AC_TRY_EVAL(ac_compile); then
513 if test "$lt_cv_prog_gnu_ld" = yes; then
514 case `/usr/bin/file conftest.$ac_objext` in
516 LD="${LD-ld} -melf32bsmip"
519 LD="${LD-ld} -melf32bmipn32"
522 LD="${LD-ld} -melf64bmip"
526 case `/usr/bin/file conftest.$ac_objext` in
542 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
543 s390*-*linux*|sparc*-*linux*)
544 # Find out which ABI we are using.
545 echo 'int i;' > conftest.$ac_ext
546 if AC_TRY_EVAL(ac_compile); then
547 case `/usr/bin/file conftest.o` in
550 x86_64-*kfreebsd*-gnu)
551 LD="${LD-ld} -m elf_i386_fbsd"
554 LD="${LD-ld} -m elf_i386"
556 ppc64-*linux*|powerpc64-*linux*)
557 LD="${LD-ld} -m elf32ppclinux"
560 LD="${LD-ld} -m elf_s390"
563 LD="${LD-ld} -m elf32_sparc"
569 x86_64-*kfreebsd*-gnu)
570 LD="${LD-ld} -m elf_x86_64_fbsd"
573 LD="${LD-ld} -m elf_x86_64"
575 ppc*-*linux*|powerpc*-*linux*)
576 LD="${LD-ld} -m elf64ppc"
579 LD="${LD-ld} -m elf64_s390"
582 LD="${LD-ld} -m elf64_sparc"
592 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
593 SAVE_CFLAGS="$CFLAGS"
594 CFLAGS="$CFLAGS -belf"
595 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
597 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
599 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
600 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
601 CFLAGS="$SAVE_CFLAGS"
605 # Find out which ABI we are using.
606 echo 'int i;' > conftest.$ac_ext
607 if AC_TRY_EVAL(ac_compile); then
608 case `/usr/bin/file conftest.o` in
610 case $lt_cv_prog_gnu_ld in
611 yes*) LD="${LD-ld} -m elf64_sparc" ;;
612 *) LD="${LD-ld} -64" ;;
620 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
621 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
622 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
623 AC_CHECK_TOOL(AS, as, false)
624 AC_CHECK_TOOL(OBJDUMP, objdump, false)
629 need_locks="$enable_libtool_lock"
634 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
635 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
636 # ----------------------------------------------------------------
637 # Check whether the given compiler option works
638 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
639 [AC_REQUIRE([LT_AC_PROG_SED])
640 AC_CACHE_CHECK([$1], [$2],
642 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
643 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
644 lt_compiler_flag="$3"
645 # Insert the option either (1) after the last *FLAGS variable, or
646 # (2) before a word containing "conftest.", or (3) at the end.
647 # Note that $ac_compile itself does not contain backslashes and begins
648 # with a dollar sign (not a hyphen), so the echo should work correctly.
649 # The option is referenced via a variable to avoid confusing sed.
650 lt_compile=`echo "$ac_compile" | $SED \
651 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
652 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
653 -e 's:$: $lt_compiler_flag:'`
654 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
655 (eval "$lt_compile" 2>conftest.err)
657 cat conftest.err >&AS_MESSAGE_LOG_FD
658 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
659 if (exit $ac_status) && test -s "$ac_outfile"; then
660 # The compiler can only warn and ignore the option if not recognized
661 # So say no if there are warnings other than the usual output.
662 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
663 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
664 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
671 if test x"[$]$2" = xyes; then
672 ifelse([$5], , :, [$5])
674 ifelse([$6], , :, [$6])
676 ])# AC_LIBTOOL_COMPILER_OPTION
679 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
680 # [ACTION-SUCCESS], [ACTION-FAILURE])
681 # ------------------------------------------------------------
682 # Check whether the given compiler option works
683 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
684 [AC_REQUIRE([LT_AC_PROG_SED])dnl
685 AC_CACHE_CHECK([$1], [$2],
687 save_LDFLAGS="$LDFLAGS"
688 LDFLAGS="$LDFLAGS $3"
689 echo "$lt_simple_link_test_code" > conftest.$ac_ext
690 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
691 # The linker can only warn and ignore the option if not recognized
692 # So say no if there are warnings
693 if test -s conftest.err; then
694 # Append any errors to the config.log.
695 cat conftest.err 1>&AS_MESSAGE_LOG_FD
696 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
697 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
698 if diff conftest.exp conftest.er2 >/dev/null; then
706 LDFLAGS="$save_LDFLAGS"
709 if test x"[$]$2" = xyes; then
710 ifelse([$4], , :, [$4])
712 ifelse([$5], , :, [$5])
714 ])# AC_LIBTOOL_LINKER_OPTION
717 # AC_LIBTOOL_SYS_MAX_CMD_LEN
718 # --------------------------
719 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
720 [# find the maximum length of command line arguments
721 AC_MSG_CHECKING([the maximum length of command line arguments])
722 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
728 # On DJGPP, this test can blow up pretty badly due to problems in libc
729 # (any single argument exceeding 2000 bytes causes a buffer overrun
730 # during glob expansion). Even if it were fixed, the result of this
731 # check would be larger than it should be.
732 lt_cv_sys_max_cmd_len=12288; # 12K is about right
736 # Under GNU Hurd, this test is not required because there is
737 # no limit to the length of command line arguments.
738 # Libtool will interpret -1 as no limit whatsoever
739 lt_cv_sys_max_cmd_len=-1;
743 # On Win9x/ME, this test blows up -- it succeeds, but takes
744 # about 5 minutes as the teststring grows exponentially.
745 # Worse, since 9x/ME are not pre-emptively multitasking,
746 # you end up with a "frozen" computer, even though with patience
747 # the test eventually succeeds (with a max line length of 256k).
748 # Instead, let's just punt: use the minimum linelength reported by
749 # all of the supported platforms: 8192 (on NT/2K/XP).
750 lt_cv_sys_max_cmd_len=8192;
754 # On AmigaOS with pdksh, this test takes hours, literally.
755 # So we just punt and use a minimum line length of 8192.
756 lt_cv_sys_max_cmd_len=8192;
759 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
760 # This has been around since 386BSD, at least. Likely further.
761 if test -x /sbin/sysctl; then
762 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
763 elif test -x /usr/sbin/sysctl; then
764 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
766 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
768 # And add a safety zone
769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
774 # We know the value 262144 and hardcode it with a safety zone (like BSD)
775 lt_cv_sys_max_cmd_len=196608
779 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
780 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
781 # nice to cause kernel panics so lets avoid the loop below.
782 # First set a reasonable default.
783 lt_cv_sys_max_cmd_len=16384
785 if test -x /sbin/sysconfig; then
786 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
787 *1*) lt_cv_sys_max_cmd_len=-1 ;;
792 lt_cv_sys_max_cmd_len=102400
794 sysv5* | sco5v6* | sysv4.2uw2*)
795 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
796 if test -n "$kargmax"; then
797 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
799 lt_cv_sys_max_cmd_len=32768
803 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
804 if test -n "$lt_cv_sys_max_cmd_len"; then
805 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
806 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
808 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
809 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
810 = "XX$teststring") >/dev/null 2>&1 &&
811 new_result=`expr "X$teststring" : ".*" 2>&1` &&
812 lt_cv_sys_max_cmd_len=$new_result &&
813 test $i != 17 # 1/2 MB should be enough
816 teststring=$teststring$teststring
819 # Add a significant safety factor because C++ compilers can tack on massive
820 # amounts of additional arguments before passing them to the linker.
821 # It appears as though 1/2 is a usable value.
822 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
827 if test -n $lt_cv_sys_max_cmd_len ; then
828 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
832 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
837 AC_DEFUN([_LT_AC_CHECK_DLFCN],
838 [AC_CHECK_HEADERS(dlfcn.h)dnl
839 ])# _LT_AC_CHECK_DLFCN
842 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
843 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
844 # ---------------------------------------------------------------------
845 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
846 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
847 if test "$cross_compiling" = yes; then :
850 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
851 lt_status=$lt_dlunknown
852 cat > conftest.$ac_ext <<EOF
853 [#line __oline__ "configure"
854 #include "confdefs.h"
863 # define LT_DLGLOBAL RTLD_GLOBAL
866 # define LT_DLGLOBAL DL_GLOBAL
868 # define LT_DLGLOBAL 0
872 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
873 find out it does not work in some platform. */
874 #ifndef LT_DLLAZY_OR_NOW
876 # define LT_DLLAZY_OR_NOW RTLD_LAZY
879 # define LT_DLLAZY_OR_NOW DL_LAZY
882 # define LT_DLLAZY_OR_NOW RTLD_NOW
885 # define LT_DLLAZY_OR_NOW DL_NOW
887 # define LT_DLLAZY_OR_NOW 0
895 extern "C" void exit (int);
898 void fnord() { int i=42;}
901 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
902 int status = $lt_dlunknown;
906 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
907 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
908 /* dlclose (self); */
916 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
917 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
920 x$lt_dlno_uscore) $1 ;;
921 x$lt_dlneed_uscore) $2 ;;
922 x$lt_dlunknown|x*) $3 ;;
930 ])# _LT_AC_TRY_DLOPEN_SELF
933 # AC_LIBTOOL_DLOPEN_SELF
934 # ----------------------
935 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
936 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
937 if test "x$enable_dlopen" != xyes; then
938 enable_dlopen=unknown
939 enable_dlopen_self=unknown
940 enable_dlopen_self_static=unknown
947 lt_cv_dlopen="load_add_on"
949 lt_cv_dlopen_self=yes
953 lt_cv_dlopen="LoadLibrary"
958 lt_cv_dlopen="dlopen"
963 # if libdl is installed we need to link against it
964 AC_CHECK_LIB([dl], [dlopen],
965 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
968 lt_cv_dlopen_self=yes
973 AC_CHECK_FUNC([shl_load],
974 [lt_cv_dlopen="shl_load"],
975 [AC_CHECK_LIB([dld], [shl_load],
976 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
977 [AC_CHECK_FUNC([dlopen],
978 [lt_cv_dlopen="dlopen"],
979 [AC_CHECK_LIB([dl], [dlopen],
980 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
981 [AC_CHECK_LIB([svld], [dlopen],
982 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
983 [AC_CHECK_LIB([dld], [dld_link],
984 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
993 if test "x$lt_cv_dlopen" != xno; then
999 case $lt_cv_dlopen in
1001 save_CPPFLAGS="$CPPFLAGS"
1002 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1004 save_LDFLAGS="$LDFLAGS"
1005 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1008 LIBS="$lt_cv_dlopen_libs $LIBS"
1010 AC_CACHE_CHECK([whether a program can dlopen itself],
1011 lt_cv_dlopen_self, [dnl
1012 _LT_AC_TRY_DLOPEN_SELF(
1013 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1014 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1017 if test "x$lt_cv_dlopen_self" = xyes; then
1018 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1019 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1020 lt_cv_dlopen_self_static, [dnl
1021 _LT_AC_TRY_DLOPEN_SELF(
1022 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1023 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1027 CPPFLAGS="$save_CPPFLAGS"
1028 LDFLAGS="$save_LDFLAGS"
1033 case $lt_cv_dlopen_self in
1034 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1035 *) enable_dlopen_self=unknown ;;
1038 case $lt_cv_dlopen_self_static in
1039 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1040 *) enable_dlopen_self_static=unknown ;;
1043 ])# AC_LIBTOOL_DLOPEN_SELF
1046 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1047 # ---------------------------------
1048 # Check to see if options -c and -o are simultaneously supported by compiler
1049 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1050 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1051 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1052 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1053 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1054 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1055 $rm -r conftest 2>/dev/null
1059 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1061 lt_compiler_flag="-o out/conftest2.$ac_objext"
1062 # Insert the option either (1) after the last *FLAGS variable, or
1063 # (2) before a word containing "conftest.", or (3) at the end.
1064 # Note that $ac_compile itself does not contain backslashes and begins
1065 # with a dollar sign (not a hyphen), so the echo should work correctly.
1066 lt_compile=`echo "$ac_compile" | $SED \
1067 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1068 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1069 -e 's:$: $lt_compiler_flag:'`
1070 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1071 (eval "$lt_compile" 2>out/conftest.err)
1073 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1074 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1075 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1077 # The compiler can only warn and ignore the option if not recognized
1078 # So say no if there are warnings
1079 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1080 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1081 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1082 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1085 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1087 # SGI C++ compiler will create directory out/ii_files/ for
1088 # template instantiation
1089 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1090 $rm out/* && rmdir out
1095 ])# AC_LIBTOOL_PROG_CC_C_O
1098 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1099 # -----------------------------------------
1100 # Check to see if we can do hard links to lock some files if needed
1101 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1102 [AC_REQUIRE([_LT_AC_LOCK])dnl
1104 hard_links="nottested"
1105 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1106 # do not overwrite the value of need_locks provided by the user
1107 AC_MSG_CHECKING([if we can lock with hard links])
1110 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1112 ln conftest.a conftest.b 2>&5 || hard_links=no
1113 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1114 AC_MSG_RESULT([$hard_links])
1115 if test "$hard_links" = no; then
1116 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1122 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1127 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1128 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1129 [rm -f .libs 2>/dev/null
1130 mkdir .libs 2>/dev/null
1131 if test -d .libs; then
1134 # MS-DOS does not allow filenames that begin with a dot.
1137 rmdir .libs 2>/dev/null])
1138 objdir=$lt_cv_objdir
1139 ])# AC_LIBTOOL_OBJDIR
1142 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1143 # ----------------------------------------------
1144 # Check hardcoding attributes.
1145 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1146 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1147 _LT_AC_TAGVAR(hardcode_action, $1)=
1148 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1149 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1150 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1152 # We can hardcode non-existant directories.
1153 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1154 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1155 # have to relink, otherwise we might link with an installed library
1156 # when we should be linking with a yet-to-be-installed one
1157 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1158 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1159 # Linking always hardcodes the temporary library directory.
1160 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1162 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1163 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1166 # We cannot hardcode anything, or else we can only hardcode existing
1168 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1170 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1172 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1173 # Fast installation is not supported
1174 enable_fast_install=no
1175 elif test "$shlibpath_overrides_runpath" = yes ||
1176 test "$enable_shared" = no; then
1177 # Fast installation is not necessary
1178 enable_fast_install=needless
1180 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1183 # AC_LIBTOOL_SYS_LIB_STRIP
1184 # ------------------------
1185 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1188 AC_MSG_CHECKING([whether stripping libraries is possible])
1189 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1190 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1191 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1192 AC_MSG_RESULT([yes])
1194 # FIXME - insert some real tests, host_os isn't really good enough
1197 if test -n "$STRIP" ; then
1198 striplib="$STRIP -x"
1199 old_striplib="$STRIP -S"
1200 AC_MSG_RESULT([yes])
1210 ])# AC_LIBTOOL_SYS_LIB_STRIP
1213 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1214 # -----------------------------
1215 # PORTME Fill in your ld.so characteristics
1216 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1217 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1218 AC_MSG_CHECKING([dynamic linker characteristics])
1220 libname_spec='lib$name'
1228 shlibpath_overrides_runpath=unknown
1230 dynamic_linker="$host_os ld.so"
1231 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1233 if test "$GCC" = yes; then
1235 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1236 *) lt_awk_arg="/^libraries:/" ;;
1238 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1239 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1240 # if the path contains ";" then we assume it to be the separator
1241 # otherwise default to the standard path separator (i.e. ":") - it is
1242 # assumed that no part of a normal pathname contains ";" but that should
1243 # okay in the real world where ";" in dirpaths is itself problematic.
1244 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1246 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1248 # Ok, now we have the path, separated by spaces, we can step through it
1249 # and add multilib dir if necessary.
1250 lt_tmp_lt_search_path_spec=
1251 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1252 for lt_sys_path in $lt_search_path_spec; do
1253 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1254 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1256 test -d "$lt_sys_path" && \
1257 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1260 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1261 BEGIN {RS=" "; FS="/|\n";} {
1264 for (lt_i = NF; lt_i > 0; lt_i--) {
1265 if ($lt_i != "" && $lt_i != ".") {
1266 if ($lt_i == "..") {
1269 if (lt_count == 0) {
1270 lt_foo="/" $lt_i lt_foo;
1277 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1278 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1280 sys_lib_search_path_spec=`echo $lt_search_path_spec`
1282 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1284 need_lib_prefix=unknown
1285 hardcode_into_libs=no
1287 # when you set need_version to no, make sure it does not cause -set_version
1288 # flags to be left without arguments
1289 need_version=unknown
1294 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1295 shlibpath_var=LIBPATH
1297 # AIX 3 has no versioning support, so we append a major version to the name.
1298 soname_spec='${libname}${release}${shared_ext}$major'
1305 hardcode_into_libs=yes
1306 if test "$host_cpu" = ia64; then
1307 # AIX 5 supports IA64
1308 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1309 shlibpath_var=LD_LIBRARY_PATH
1311 # With GCC up to 2.95.x, collect2 would create an import file
1312 # for dependence libraries. The import file would start with
1313 # the line `#! .'. This would cause the generated library to
1314 # depend on `.', always an invalid library. This was fixed in
1315 # development snapshots of GCC prior to 3.0.
1317 aix4 | aix4.[[01]] | aix4.[[01]].*)
1318 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1320 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1327 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1328 # soname into executable. Probably we can add versioning support to
1329 # collect2, so additional links can be useful in future.
1330 if test "$aix_use_runtimelinking" = yes; then
1331 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1332 # instead of lib<name>.a to let people know that these are not
1333 # typical AIX shared libraries.
1334 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1336 # We preserve .a as extension for shared libraries through AIX4.2
1337 # and later when we are not doing run time linking.
1338 library_names_spec='${libname}${release}.a $libname.a'
1339 soname_spec='${libname}${release}${shared_ext}$major'
1341 shlibpath_var=LIBPATH
1346 library_names_spec='$libname.ixlibrary $libname.a'
1347 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1348 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'
1352 library_names_spec='${libname}${shared_ext}'
1353 dynamic_linker="$host_os ld.so"
1354 shlibpath_var=LIBRARY_PATH
1360 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1361 soname_spec='${libname}${release}${shared_ext}$major'
1362 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1363 shlibpath_var=LD_LIBRARY_PATH
1364 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1365 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1366 # the default ld.so.conf also contains /usr/contrib/lib and
1367 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1368 # libtool to hard-code these into programs
1371 cygwin* | mingw* | pw32*)
1372 version_type=windows
1377 case $GCC,$host_os in
1378 yes,cygwin* | yes,mingw* | yes,pw32*)
1379 library_names_spec='$libname.dll.a'
1380 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1381 postinstall_cmds='base_file=`basename \${file}`~
1382 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1383 dldir=$destdir/`dirname \$dlpath`~
1384 test -d \$dldir || mkdir -p \$dldir~
1385 $install_prog $dir/$dlname \$dldir/$dlname~
1386 chmod a+x \$dldir/$dlname'
1387 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1388 dlpath=$dir/\$dldll~
1390 shlibpath_overrides_runpath=yes
1394 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1395 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1396 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1399 # MinGW DLLs use traditional 'lib' prefix
1400 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1401 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1402 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1403 # It is most probably a Windows format PATH printed by
1404 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1405 # path with ; separators, and with drive letters. We can handle the
1406 # drive letters (cygwin fileutils understands them), so leave them,
1407 # especially as we might pass files found there to a mingw objdump,
1408 # which wouldn't understand a cygwinified path. Ahh.
1409 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1411 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1415 # pw32 DLLs use 'pw' prefix rather than 'lib'
1416 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1422 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1425 dynamic_linker='Win32 ld.exe'
1426 # FIXME: first we should search . and the directory the executable is in
1430 darwin* | rhapsody*)
1431 dynamic_linker="$host_os dyld"
1435 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1436 soname_spec='${libname}${release}${major}$shared_ext'
1437 shlibpath_overrides_runpath=yes
1438 shlibpath_var=DYLD_LIBRARY_PATH
1439 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1441 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1442 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1450 soname_spec='${libname}${release}${shared_ext}$major'
1451 shlibpath_var=LD_LIBRARY_PATH
1458 freebsd* | dragonfly*)
1459 # DragonFly does not have aout. When/if they implement a new
1460 # versioning mechanism, adjust this.
1461 if test -x /usr/bin/objformat; then
1462 objformat=`/usr/bin/objformat`
1465 freebsd[[123]]*) objformat=aout ;;
1469 version_type=freebsd-$objformat
1470 case $version_type in
1472 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1477 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1481 shlibpath_var=LD_LIBRARY_PATH
1484 shlibpath_overrides_runpath=yes
1486 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1487 shlibpath_overrides_runpath=yes
1488 hardcode_into_libs=yes
1490 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1491 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1492 shlibpath_overrides_runpath=no
1493 hardcode_into_libs=yes
1495 *) # from 4.6 on, and DragonFly
1496 shlibpath_overrides_runpath=yes
1497 hardcode_into_libs=yes
1506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1507 soname_spec='${libname}${release}${shared_ext}$major'
1508 shlibpath_var=LD_LIBRARY_PATH
1509 hardcode_into_libs=yes
1512 hpux9* | hpux10* | hpux11*)
1513 # Give a soname corresponding to the major version so that dld.sl refuses to
1514 # link against other versions.
1521 hardcode_into_libs=yes
1522 dynamic_linker="$host_os dld.so"
1523 shlibpath_var=LD_LIBRARY_PATH
1524 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1526 soname_spec='${libname}${release}${shared_ext}$major'
1527 if test "X$HPUX_IA64_MODE" = X32; then
1528 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1530 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1532 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1536 hardcode_into_libs=yes
1537 dynamic_linker="$host_os dld.sl"
1538 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1539 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1541 soname_spec='${libname}${release}${shared_ext}$major'
1542 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1543 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1547 dynamic_linker="$host_os dld.sl"
1548 shlibpath_var=SHLIB_PATH
1549 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1551 soname_spec='${libname}${release}${shared_ext}$major'
1554 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1555 postinstall_cmds='chmod 555 $lib'
1562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1563 soname_spec='${libname}${release}${shared_ext}$major'
1564 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1565 shlibpath_var=LD_LIBRARY_PATH
1566 shlibpath_overrides_runpath=no
1567 hardcode_into_libs=yes
1570 irix5* | irix6* | nonstopux*)
1572 nonstopux*) version_type=nonstopux ;;
1574 if test "$lt_cv_prog_gnu_ld" = yes; then
1582 soname_spec='${libname}${release}${shared_ext}$major'
1583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1585 irix5* | nonstopux*)
1589 case $LD in # libtool.m4 will add one of these switches to LD
1590 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1591 libsuff= shlibsuff= libmagic=32-bit;;
1592 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1593 libsuff=32 shlibsuff=N32 libmagic=N32;;
1594 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1595 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1596 *) libsuff= shlibsuff= libmagic=never-match;;
1600 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1601 shlibpath_overrides_runpath=no
1602 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1603 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1604 hardcode_into_libs=yes
1607 # No shared lib support for Linux oldld, aout, or coff.
1608 linux*oldld* | linux*aout* | linux*coff*)
1612 # This must be Linux ELF.
1613 linux* | k*bsd*-gnu)
1617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1618 soname_spec='${libname}${release}${shared_ext}$major'
1619 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1620 shlibpath_var=LD_LIBRARY_PATH
1621 shlibpath_overrides_runpath=no
1622 # This implies no fast_install, which is unacceptable.
1623 # Some rework will be needed to allow for fast_install
1624 # before this can be enabled.
1625 hardcode_into_libs=yes
1627 # Append ld.so.conf contents to the search path
1628 if test -f /etc/ld.so.conf; then
1629 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1630 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1633 # We used to test for /lib/ld.so.1 and disable shared libraries on
1634 # powerpc, because MkLinux only supported shared libraries with the
1635 # GNU dynamic linker. Since this was broken with cross compilers,
1636 # most powerpc-linux boxes support dynamic linking these days and
1637 # people can always --disable-shared, the test was removed, and we
1638 # assume the GNU/Linux dynamic linker is in use.
1639 dynamic_linker='GNU/Linux ld.so'
1646 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1647 soname_spec='${libname}${release}${shared_ext}$major'
1648 shlibpath_var=LD_LIBRARY_PATH
1649 shlibpath_overrides_runpath=no
1650 hardcode_into_libs=yes
1651 dynamic_linker='NetBSD ld.elf_so'
1658 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1660 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1661 dynamic_linker='NetBSD (a.out) ld.so'
1663 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1664 soname_spec='${libname}${release}${shared_ext}$major'
1665 dynamic_linker='NetBSD ld.elf_so'
1667 shlibpath_var=LD_LIBRARY_PATH
1668 shlibpath_overrides_runpath=yes
1669 hardcode_into_libs=yes
1674 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1675 shlibpath_var=LD_LIBRARY_PATH
1676 shlibpath_overrides_runpath=yes
1683 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1684 soname_spec='${libname}${release}${shared_ext}$major'
1685 shlibpath_var=LD_LIBRARY_PATH
1686 shlibpath_overrides_runpath=yes
1691 sys_lib_dlsearch_path_spec="/usr/lib"
1693 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1695 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1696 *) need_version=no ;;
1698 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1699 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1700 shlibpath_var=LD_LIBRARY_PATH
1701 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1703 openbsd2.[[89]] | openbsd2.[[89]].*)
1704 shlibpath_overrides_runpath=no
1707 shlibpath_overrides_runpath=yes
1711 shlibpath_overrides_runpath=yes
1716 libname_spec='$name'
1719 library_names_spec='$libname${shared_ext} $libname.a'
1720 dynamic_linker='OS/2 ld.exe'
1721 shlibpath_var=LIBPATH
1724 osf3* | osf4* | osf5*)
1728 soname_spec='${libname}${release}${shared_ext}$major'
1729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1730 shlibpath_var=LD_LIBRARY_PATH
1731 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1732 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1744 soname_spec='${libname}${release}${shared_ext}$major'
1745 shlibpath_var=LD_LIBRARY_PATH
1746 shlibpath_overrides_runpath=yes
1747 hardcode_into_libs=yes
1748 # ldd complains unless libraries are executable
1749 postinstall_cmds='chmod +x $lib'
1754 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1755 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1756 shlibpath_var=LD_LIBRARY_PATH
1757 shlibpath_overrides_runpath=yes
1758 if test "$with_gnu_ld" = yes; then
1766 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1767 soname_spec='${libname}${release}${shared_ext}$major'
1768 shlibpath_var=LD_LIBRARY_PATH
1769 case $host_vendor in
1771 shlibpath_overrides_runpath=no
1773 export_dynamic_flag_spec='${wl}-Blargedynsym'
1774 runpath_var=LD_RUN_PATH
1782 shlibpath_overrides_runpath=no
1783 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1789 if test -d /usr/nec ;then
1791 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1792 soname_spec='$libname${shared_ext}.$major'
1793 shlibpath_var=LD_LIBRARY_PATH
1797 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1798 version_type=freebsd-elf
1801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1802 soname_spec='${libname}${release}${shared_ext}$major'
1803 shlibpath_var=LD_LIBRARY_PATH
1804 hardcode_into_libs=yes
1805 if test "$with_gnu_ld" = yes; then
1806 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1807 shlibpath_overrides_runpath=no
1809 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1810 shlibpath_overrides_runpath=yes
1813 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1817 sys_lib_dlsearch_path_spec='/usr/lib'
1822 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1823 soname_spec='${libname}${release}${shared_ext}$major'
1824 shlibpath_var=LD_LIBRARY_PATH
1831 AC_MSG_RESULT([$dynamic_linker])
1832 test "$dynamic_linker" = no && can_build_shared=no
1834 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1835 if test "$GCC" = yes; then
1836 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1838 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1843 AC_DEFUN([_LT_AC_TAGCONFIG],
1844 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1846 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1847 [include additional configurations @<:@automatic@:>@])],
1848 [tagnames="$withval"])
1850 if test -f "$ltmain" && test -n "$tagnames"; then
1851 if test ! -f "${ofile}"; then
1852 AC_MSG_WARN([output file `$ofile' does not exist])
1855 if test -z "$LTCC"; then
1856 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1857 if test -z "$LTCC"; then
1858 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1860 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1863 if test -z "$LTCFLAGS"; then
1864 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1867 # Extract list of available tagged configurations in $ofile.
1868 # Note that this assumes the entire list is on one line.
1869 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1871 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1872 for tagname in $tagnames; do
1874 # Check whether tagname contains only valid characters
1875 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1877 *) AC_MSG_ERROR([invalid tag name: $tagname])
1881 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1883 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1886 # Update the list of available tags.
1887 if test -n "$tagname"; then
1888 echo appending configuration tag \"$tagname\" to $ofile
1892 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1893 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1894 (test "X$CXX" != "Xg++"))) ; then
1895 AC_LIBTOOL_LANG_CXX_CONFIG
1902 if test -n "$F77" && test "X$F77" != "Xno"; then
1903 AC_LIBTOOL_LANG_F77_CONFIG
1910 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1911 AC_LIBTOOL_LANG_GCJ_CONFIG
1918 AC_LIBTOOL_LANG_RC_CONFIG
1922 AC_MSG_ERROR([Unsupported tag name: $tagname])
1926 # Append the new tag name to the list of available tags.
1927 if test -n "$tagname" ; then
1928 available_tags="$available_tags $tagname"
1934 # Now substitute the updated list of available tags.
1935 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1936 mv "${ofile}T" "$ofile"
1940 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1943 ])# _LT_AC_TAGCONFIG
1948 # enable checks for dlopen support
1949 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1950 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1951 ])# AC_LIBTOOL_DLOPEN
1954 # AC_LIBTOOL_WIN32_DLL
1955 # --------------------
1956 # declare package support for building win32 DLLs
1957 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1958 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1959 ])# AC_LIBTOOL_WIN32_DLL
1962 # AC_ENABLE_SHARED([DEFAULT])
1963 # ---------------------------
1964 # implement the --enable-shared flag
1965 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1966 AC_DEFUN([AC_ENABLE_SHARED],
1967 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1968 AC_ARG_ENABLE([shared],
1969 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1970 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1971 [p=${PACKAGE-default}
1973 yes) enable_shared=yes ;;
1974 no) enable_shared=no ;;
1977 # Look at the argument we got. We use all the common list separators.
1978 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1979 for pkg in $enableval; do
1981 if test "X$pkg" = "X$p"; then
1988 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1989 ])# AC_ENABLE_SHARED
1994 # set the default shared flag to --disable-shared
1995 AC_DEFUN([AC_DISABLE_SHARED],
1996 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1997 AC_ENABLE_SHARED(no)
1998 ])# AC_DISABLE_SHARED
2001 # AC_ENABLE_STATIC([DEFAULT])
2002 # ---------------------------
2003 # implement the --enable-static flag
2004 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2005 AC_DEFUN([AC_ENABLE_STATIC],
2006 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2007 AC_ARG_ENABLE([static],
2008 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2009 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2010 [p=${PACKAGE-default}
2012 yes) enable_static=yes ;;
2013 no) enable_static=no ;;
2016 # Look at the argument we got. We use all the common list separators.
2017 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2018 for pkg in $enableval; do
2020 if test "X$pkg" = "X$p"; then
2027 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2028 ])# AC_ENABLE_STATIC
2033 # set the default static flag to --disable-static
2034 AC_DEFUN([AC_DISABLE_STATIC],
2035 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2036 AC_ENABLE_STATIC(no)
2037 ])# AC_DISABLE_STATIC
2040 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2041 # ---------------------------------
2042 # implement the --enable-fast-install flag
2043 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2044 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2045 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2046 AC_ARG_ENABLE([fast-install],
2047 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2048 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2049 [p=${PACKAGE-default}
2051 yes) enable_fast_install=yes ;;
2052 no) enable_fast_install=no ;;
2054 enable_fast_install=no
2055 # Look at the argument we got. We use all the common list separators.
2056 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2057 for pkg in $enableval; do
2059 if test "X$pkg" = "X$p"; then
2060 enable_fast_install=yes
2066 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2067 ])# AC_ENABLE_FAST_INSTALL
2070 # AC_DISABLE_FAST_INSTALL
2071 # -----------------------
2072 # set the default to --disable-fast-install
2073 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2074 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2075 AC_ENABLE_FAST_INSTALL(no)
2076 ])# AC_DISABLE_FAST_INSTALL
2079 # AC_LIBTOOL_PICMODE([MODE])
2080 # --------------------------
2081 # implement the --with-pic flag
2082 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2083 AC_DEFUN([AC_LIBTOOL_PICMODE],
2084 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2085 pic_mode=ifelse($#,1,$1,default)
2086 ])# AC_LIBTOOL_PICMODE
2091 # This is predefined starting with Autoconf 2.54, so this conditional
2092 # definition can be removed once we require Autoconf 2.54 or later.
2093 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2094 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2095 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2096 then ac_cv_prog_egrep='grep -E'
2097 else ac_cv_prog_egrep='egrep'
2099 EGREP=$ac_cv_prog_egrep
2104 # AC_PATH_TOOL_PREFIX
2105 # -------------------
2106 # find a file program which can recognize shared library
2107 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2108 [AC_REQUIRE([AC_PROG_EGREP])dnl
2109 AC_MSG_CHECKING([for $1])
2110 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2112 [[\\/*] | ?:[\\/]*])
2113 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2116 lt_save_MAGIC_CMD="$MAGIC_CMD"
2117 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2118 dnl $ac_dummy forces splitting on constant user-supplied paths.
2119 dnl POSIX.2 word splitting is done only on the output of word expansions,
2120 dnl not every word. This closes a longstanding sh security hole.
2121 ac_dummy="ifelse([$2], , $PATH, [$2])"
2122 for ac_dir in $ac_dummy; do
2124 test -z "$ac_dir" && ac_dir=.
2125 if test -f $ac_dir/$1; then
2126 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2127 if test -n "$file_magic_test_file"; then
2128 case $deplibs_check_method in
2130 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2131 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2132 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2133 $EGREP "$file_magic_regex" > /dev/null; then
2138 *** Warning: the command libtool uses to detect shared libraries,
2139 *** $file_magic_cmd, produces output that libtool cannot recognize.
2140 *** The result is that libtool may fail to recognize shared libraries
2141 *** as such. This will affect the creation of libtool libraries that
2142 *** depend on shared libraries, but programs linked with such libtool
2143 *** libraries will work regardless of this problem. Nevertheless, you
2144 *** may want to report the problem to your system manager and/or to
2145 *** bug-libtool@gnu.org
2155 MAGIC_CMD="$lt_save_MAGIC_CMD"
2158 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2159 if test -n "$MAGIC_CMD"; then
2160 AC_MSG_RESULT($MAGIC_CMD)
2164 ])# AC_PATH_TOOL_PREFIX
2169 # find a file program which can recognize a shared library
2170 AC_DEFUN([AC_PATH_MAGIC],
2171 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2172 if test -z "$lt_cv_path_MAGIC_CMD"; then
2173 if test -n "$ac_tool_prefix"; then
2174 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2184 # find the pathname to the GNU or non-GNU linker
2185 AC_DEFUN([AC_PROG_LD],
2186 [AC_ARG_WITH([gnu-ld],
2187 [AC_HELP_STRING([--with-gnu-ld],
2188 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2189 [test "$withval" = no || with_gnu_ld=yes],
2191 AC_REQUIRE([LT_AC_PROG_SED])dnl
2192 AC_REQUIRE([AC_PROG_CC])dnl
2193 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2194 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2196 if test "$GCC" = yes; then
2197 # Check if gcc -print-prog-name=ld gives a path.
2198 AC_MSG_CHECKING([for ld used by $CC])
2201 # gcc leaves a trailing carriage return which upsets mingw
2202 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2204 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2207 # Accept absolute paths.
2208 [[\\/]]* | ?:[[\\/]]*)
2209 re_direlt='/[[^/]][[^/]]*/\.\./'
2210 # Canonicalize the pathname of ld
2211 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2212 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2213 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2215 test -z "$LD" && LD="$ac_prog"
2218 # If it fails, then pretend we aren't using GCC.
2222 # If it is relative, then search for the first ld in PATH.
2226 elif test "$with_gnu_ld" = yes; then
2227 AC_MSG_CHECKING([for GNU ld])
2229 AC_MSG_CHECKING([for non-GNU ld])
2231 AC_CACHE_VAL(lt_cv_path_LD,
2232 [if test -z "$LD"; then
2233 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2234 for ac_dir in $PATH; do
2236 test -z "$ac_dir" && ac_dir=.
2237 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2238 lt_cv_path_LD="$ac_dir/$ac_prog"
2239 # Check to see if the program is GNU ld. I'd rather use --version,
2240 # but apparently some variants of GNU ld only accept -v.
2241 # Break only if it was the GNU/non-GNU ld that we prefer.
2242 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2243 *GNU* | *'with BFD'*)
2244 test "$with_gnu_ld" != no && break
2247 test "$with_gnu_ld" != yes && break
2254 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2257 if test -n "$LD"; then
2262 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2269 AC_DEFUN([AC_PROG_LD_GNU],
2270 [AC_REQUIRE([AC_PROG_EGREP])dnl
2271 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2272 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2273 case `$LD -v 2>&1 </dev/null` in
2274 *GNU* | *'with BFD'*)
2275 lt_cv_prog_gnu_ld=yes
2278 lt_cv_prog_gnu_ld=no
2281 with_gnu_ld=$lt_cv_prog_gnu_ld
2285 # AC_PROG_LD_RELOAD_FLAG
2286 # ----------------------
2287 # find reload flag for linker
2288 # -- PORTME Some linkers may need a different reload flag.
2289 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2290 [AC_CACHE_CHECK([for $LD option to reload object files],
2291 lt_cv_ld_reload_flag,
2292 [lt_cv_ld_reload_flag='-r'])
2293 reload_flag=$lt_cv_ld_reload_flag
2294 case $reload_flag in
2296 *) reload_flag=" $reload_flag" ;;
2298 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2301 if test "$GCC" = yes; then
2302 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2304 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2308 ])# AC_PROG_LD_RELOAD_FLAG
2311 # AC_DEPLIBS_CHECK_METHOD
2312 # -----------------------
2313 # how to check for library dependencies
2314 # -- PORTME fill in with the dynamic library characteristics
2315 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2316 [AC_CACHE_CHECK([how to recognize dependent libraries],
2317 lt_cv_deplibs_check_method,
2318 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2319 lt_cv_file_magic_test_file=
2320 lt_cv_deplibs_check_method='unknown'
2321 # Need to set the preceding variable on all platforms that support
2322 # interlibrary dependencies.
2323 # 'none' -- dependencies not supported.
2324 # `unknown' -- same as none, but documents that we really don't know.
2325 # 'pass_all' -- all dependencies passed with no checks.
2326 # 'test_compile' -- check by making test program.
2327 # 'file_magic [[regex]]' -- check by looking for files in library path
2328 # which responds to the $file_magic_cmd with a given extended regex.
2329 # If you have `file' or equivalent on your system and you're not sure
2330 # whether `pass_all' will *always* work, you probably want this one.
2334 lt_cv_deplibs_check_method=pass_all
2338 lt_cv_deplibs_check_method=pass_all
2342 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2343 lt_cv_file_magic_cmd='/usr/bin/file -L'
2344 lt_cv_file_magic_test_file=/shlib/libc.so
2348 # func_win32_libid is a shell function defined in ltmain.sh
2349 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2350 lt_cv_file_magic_cmd='func_win32_libid'
2354 # Base MSYS/MinGW do not provide the 'file' command needed by
2355 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2356 # unless we find 'file', for example because we are cross-compiling.
2357 if ( file / ) >/dev/null 2>&1; then
2358 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2359 lt_cv_file_magic_cmd='func_win32_libid'
2361 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2362 lt_cv_file_magic_cmd='$OBJDUMP -f'
2366 darwin* | rhapsody*)
2367 lt_cv_deplibs_check_method=pass_all
2370 freebsd* | dragonfly*)
2371 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2374 # Not sure whether the presence of OpenBSD here was a mistake.
2375 # Let's accept both of them until this is cleared up.
2376 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2377 lt_cv_file_magic_cmd=/usr/bin/file
2378 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2382 lt_cv_deplibs_check_method=pass_all
2387 lt_cv_deplibs_check_method=pass_all
2390 hpux10.20* | hpux11*)
2391 lt_cv_file_magic_cmd=/usr/bin/file
2394 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2395 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2398 [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]']
2399 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2402 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2403 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2409 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2410 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2413 irix5* | irix6* | nonstopux*)
2415 *-32|*"-32 ") libmagic=32-bit;;
2416 *-n32|*"-n32 ") libmagic=N32;;
2417 *-64|*"-64 ") libmagic=64-bit;;
2418 *) libmagic=never-match;;
2420 lt_cv_deplibs_check_method=pass_all
2423 # This must be Linux ELF.
2424 linux* | k*bsd*-gnu)
2425 lt_cv_deplibs_check_method=pass_all
2428 netbsd* | netbsdelf*-gnu)
2429 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2430 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2432 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2437 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2438 lt_cv_file_magic_cmd=/usr/bin/file
2439 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2443 lt_cv_deplibs_check_method=unknown
2447 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2448 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2450 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2454 osf3* | osf4* | osf5*)
2455 lt_cv_deplibs_check_method=pass_all
2459 lt_cv_deplibs_check_method=pass_all
2463 lt_cv_deplibs_check_method=pass_all
2467 case $host_vendor in
2469 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]]'
2470 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2473 lt_cv_deplibs_check_method=pass_all
2476 lt_cv_file_magic_cmd='/bin/file'
2477 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2480 lt_cv_file_magic_cmd='/bin/file'
2481 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2482 lt_cv_file_magic_test_file=/lib/libc.so
2485 lt_cv_deplibs_check_method=pass_all
2488 lt_cv_deplibs_check_method=pass_all
2493 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2494 lt_cv_deplibs_check_method=pass_all
2498 file_magic_cmd=$lt_cv_file_magic_cmd
2499 deplibs_check_method=$lt_cv_deplibs_check_method
2500 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2501 ])# AC_DEPLIBS_CHECK_METHOD
2506 # find the pathname to a BSD-compatible name lister
2507 AC_DEFUN([AC_PROG_NM],
2508 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2509 [if test -n "$NM"; then
2510 # Let the user override the test.
2513 lt_nm_to_check="${ac_tool_prefix}nm"
2514 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2515 lt_nm_to_check="$lt_nm_to_check nm"
2517 for lt_tmp_nm in $lt_nm_to_check; do
2518 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2519 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2521 test -z "$ac_dir" && ac_dir=.
2522 tmp_nm="$ac_dir/$lt_tmp_nm"
2523 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2524 # Check to see if the nm accepts a BSD-compat flag.
2525 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2526 # nm: unknown option "B" ignored
2527 # Tru64's nm complains that /dev/null is an invalid object file
2528 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2529 */dev/null* | *'Invalid file or object type'*)
2530 lt_cv_path_NM="$tmp_nm -B"
2534 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2536 lt_cv_path_NM="$tmp_nm -p"
2540 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2541 continue # so that we can try to find one that supports BSD flags
2550 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2558 # check for math library
2559 AC_DEFUN([AC_CHECK_LIBM],
2560 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2563 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2564 # These system don't have libm, or don't need it
2567 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2568 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2571 AC_CHECK_LIB(m, cos, LIBM="-lm")
2577 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2578 # -----------------------------------
2579 # sets LIBLTDL to the link flags for the libltdl convenience library and
2580 # LTDLINCL to the include flags for the libltdl header and adds
2581 # --enable-ltdl-convenience to the configure arguments. Note that
2582 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2583 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2584 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2585 # (note the single quotes!). If your package is not flat and you're not
2586 # using automake, define top_builddir and top_srcdir appropriately in
2588 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2589 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2590 case $enable_ltdl_convenience in
2591 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2592 "") enable_ltdl_convenience=yes
2593 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2595 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2596 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2597 # For backwards non-gettext consistent compatibility...
2599 ])# AC_LIBLTDL_CONVENIENCE
2602 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2603 # -----------------------------------
2604 # sets LIBLTDL to the link flags for the libltdl installable library and
2605 # LTDLINCL to the include flags for the libltdl header and adds
2606 # --enable-ltdl-install to the configure arguments. Note that
2607 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2608 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2609 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2610 # '${top_srcdir}/' (note the single quotes!). If your package is not
2611 # flat and you're not using automake, define top_builddir and top_srcdir
2612 # appropriately in the Makefiles.
2613 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2614 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2615 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2616 AC_CHECK_LIB(ltdl, lt_dlinit,
2617 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2618 [if test x"$enable_ltdl_install" = xno; then
2619 AC_MSG_WARN([libltdl not installed, but installation disabled])
2621 enable_ltdl_install=yes
2624 if test x"$enable_ltdl_install" = x"yes"; then
2625 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2626 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2627 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2629 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2633 # For backwards non-gettext consistent compatibility...
2635 ])# AC_LIBLTDL_INSTALLABLE
2640 # enable support for C++ libraries
2641 AC_DEFUN([AC_LIBTOOL_CXX],
2642 [AC_REQUIRE([_LT_AC_LANG_CXX])
2648 AC_DEFUN([_LT_AC_LANG_CXX],
2649 [AC_REQUIRE([AC_PROG_CXX])
2650 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2651 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2654 # _LT_AC_PROG_CXXCPP
2655 # ------------------
2656 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2658 AC_REQUIRE([AC_PROG_CXX])
2659 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2660 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2661 (test "X$CXX" != "Xg++"))) ; then
2664 ])# _LT_AC_PROG_CXXCPP
2668 # enable support for Fortran 77 libraries
2669 AC_DEFUN([AC_LIBTOOL_F77],
2670 [AC_REQUIRE([_LT_AC_LANG_F77])
2676 AC_DEFUN([_LT_AC_LANG_F77],
2677 [AC_REQUIRE([AC_PROG_F77])
2678 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2684 # enable support for GCJ libraries
2685 AC_DEFUN([AC_LIBTOOL_GCJ],
2686 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2692 AC_DEFUN([_LT_AC_LANG_GCJ],
2693 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2694 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2695 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2696 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2697 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2698 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2699 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2705 # enable support for Windows resource files
2706 AC_DEFUN([AC_LIBTOOL_RC],
2707 [AC_REQUIRE([LT_AC_PROG_RC])
2708 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2712 # AC_LIBTOOL_LANG_C_CONFIG
2713 # ------------------------
2714 # Ensure that the configuration vars for the C compiler are
2715 # suitably defined. Those variables are subsequently used by
2716 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2717 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2718 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2722 # Source file extension for C test sources.
2725 # Object file extension for compiled C test sources.
2727 _LT_AC_TAGVAR(objext, $1)=$objext
2729 # Code to be used in simple compile tests
2730 lt_simple_compile_test_code="int some_variable = 0;"
2732 # Code to be used in simple link tests
2733 lt_simple_link_test_code='int main(){return(0);}'
2737 # save warnings/boilerplate of simple test code
2738 _LT_COMPILER_BOILERPLATE
2739 _LT_LINKER_BOILERPLATE
2741 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2742 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2743 AC_LIBTOOL_PROG_CC_C_O($1)
2744 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2745 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2746 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2747 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2748 AC_LIBTOOL_SYS_LIB_STRIP
2749 AC_LIBTOOL_DLOPEN_SELF
2751 # Report which library types will actually be built
2752 AC_MSG_CHECKING([if libtool supports shared libraries])
2753 AC_MSG_RESULT([$can_build_shared])
2755 AC_MSG_CHECKING([whether to build shared libraries])
2756 test "$can_build_shared" = "no" && enable_shared=no
2758 # On AIX, shared libraries and static libraries use the same namespace, and
2759 # are all built from PIC.
2762 test "$enable_shared" = yes && enable_static=no
2763 if test -n "$RANLIB"; then
2764 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2765 postinstall_cmds='$RANLIB $lib'
2770 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2771 test "$enable_shared" = yes && enable_static=no
2775 AC_MSG_RESULT([$enable_shared])
2777 AC_MSG_CHECKING([whether to build static libraries])
2778 # Make sure either enable_shared or enable_static is yes.
2779 test "$enable_shared" = yes || enable_static=yes
2780 AC_MSG_RESULT([$enable_static])
2782 AC_LIBTOOL_CONFIG($1)
2786 ])# AC_LIBTOOL_LANG_C_CONFIG
2789 # AC_LIBTOOL_LANG_CXX_CONFIG
2790 # --------------------------
2791 # Ensure that the configuration vars for the C compiler are
2792 # suitably defined. Those variables are subsequently used by
2793 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2794 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2795 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2797 AC_REQUIRE([AC_PROG_CXX])
2798 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2800 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2801 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2802 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2803 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2804 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2805 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2806 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2807 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2808 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2809 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2810 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2811 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2812 _LT_AC_TAGVAR(module_cmds, $1)=
2813 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2814 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2815 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2816 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2817 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2818 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2820 # Dependencies to place before and after the object being linked:
2821 _LT_AC_TAGVAR(predep_objects, $1)=
2822 _LT_AC_TAGVAR(postdep_objects, $1)=
2823 _LT_AC_TAGVAR(predeps, $1)=
2824 _LT_AC_TAGVAR(postdeps, $1)=
2825 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2827 # Source file extension for C++ test sources.
2830 # Object file extension for compiled C++ test sources.
2832 _LT_AC_TAGVAR(objext, $1)=$objext
2834 # Code to be used in simple compile tests
2835 lt_simple_compile_test_code="int some_variable = 0;"
2837 # Code to be used in simple link tests
2838 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2840 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2843 # save warnings/boilerplate of simple test code
2844 _LT_COMPILER_BOILERPLATE
2845 _LT_LINKER_BOILERPLATE
2847 # Allow CC to be a program name with arguments.
2852 lt_save_with_gnu_ld=$with_gnu_ld
2853 lt_save_path_LD=$lt_cv_path_LD
2854 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2855 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2857 $as_unset lt_cv_prog_gnu_ld
2859 if test -n "${lt_cv_path_LDCXX+set}"; then
2860 lt_cv_path_LD=$lt_cv_path_LDCXX
2862 $as_unset lt_cv_path_LD
2864 test -z "${LDCXX+set}" || LD=$LDCXX
2867 _LT_AC_TAGVAR(compiler, $1)=$CC
2868 _LT_CC_BASENAME([$compiler])
2870 # We don't want -fno-exception wen compiling C++ code, so set the
2871 # no_builtin_flag separately
2872 if test "$GXX" = yes; then
2873 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2875 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2878 if test "$GXX" = yes; then
2879 # Set up default GNU C++ configuration
2883 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2884 # archiving commands below assume that GNU ld is being used.
2885 if test "$with_gnu_ld" = yes; then
2886 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2887 _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'
2889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2890 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2892 # If archive_cmds runs LD, not CC, wlarc should be empty
2893 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2894 # investigate it a little bit more. (MM)
2897 # ancient GNU ld didn't support --whole-archive et. al.
2898 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2899 grep 'no-whole-archive' > /dev/null; then
2900 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2902 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2908 # A generic and very simple default shared library creation
2909 # command for GNU C++ for the case where it uses the native
2910 # linker, instead of GNU ld. If possible, this setting should
2911 # overridden to take advantage of the native linker features on
2912 # the platform it is being used on.
2913 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2916 # Commands to make compiler produce verbose output that lists
2917 # what "hidden" libraries, object files and flags are used when
2918 # linking a shared library.
2919 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2927 # PORTME: fill in a description of your system's C++ link characteristics
2928 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2929 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2932 # FIXME: insert proper C++ library support
2933 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2936 if test "$host_cpu" = ia64; then
2937 # On IA64, the linker does run time linking by default, so we don't
2938 # have to do anything special.
2939 aix_use_runtimelinking=no
2940 exp_sym_flag='-Bexport'
2943 aix_use_runtimelinking=no
2945 # Test if we are trying to use run time linking or normal
2946 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2947 # need to do runtime linking.
2948 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2949 for ld_flag in $LDFLAGS; do
2952 aix_use_runtimelinking=yes
2960 exp_sym_flag='-bexport'
2961 no_entry_flag='-bnoentry'
2964 # When large executables or shared objects are built, AIX ld can
2965 # have problems creating the table of contents. If linking a library
2966 # or program results in "error TOC overflow" add -mminimal-toc to
2967 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2968 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2970 _LT_AC_TAGVAR(archive_cmds, $1)=''
2971 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2972 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2973 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2975 if test "$GXX" = yes; then
2976 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2977 # We only want to do this on AIX 4.2 and lower, the check
2978 # below for broken collect2 doesn't work under 4.3+
2979 collect2name=`${CC} -print-prog-name=collect2`
2980 if test -f "$collect2name" && \
2981 strings "$collect2name" | grep resolve_lib_name >/dev/null
2983 # We have reworked collect2
2986 # We have old collect2
2987 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2988 # It fails to find uninstalled libraries when the uninstalled
2989 # path is not listed in the libpath. Setting hardcode_minus_L
2990 # to unsupported forces relinking
2991 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2992 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2993 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2997 shared_flag='-shared'
2998 if test "$aix_use_runtimelinking" = yes; then
2999 shared_flag="$shared_flag "'${wl}-G'
3003 if test "$host_cpu" = ia64; then
3004 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3005 # chokes on -Wl,-G. The following line is correct:
3008 if test "$aix_use_runtimelinking" = yes; then
3009 shared_flag='${wl}-G'
3011 shared_flag='${wl}-bM:SRE'
3016 # It seems that -bexpall does not export symbols beginning with
3017 # underscore (_), so it is better to generate a list of symbols to export.
3018 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3019 if test "$aix_use_runtimelinking" = yes; then
3020 # Warning - without using the other runtime loading flags (-brtl),
3021 # -berok will link without error, but may produce a broken library.
3022 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3023 # Determine the default libpath from the value encoded in an empty executable.
3024 _LT_AC_SYS_LIBPATH_AIX
3025 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3027 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3029 if test "$host_cpu" = ia64; then
3030 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3031 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3032 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3034 # Determine the default libpath from the value encoded in an empty executable.
3035 _LT_AC_SYS_LIBPATH_AIX
3036 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3037 # Warning - without using the other run time loading flags,
3038 # -berok will link without error, but may produce a broken library.
3039 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3040 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3041 # Exported symbols can be pulled into shared objects from archives
3042 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3043 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3044 # This is similar to how AIX traditionally builds its shared libraries.
3045 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3051 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3052 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3053 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3054 # support --undefined. This deserves some investigation. FIXME
3055 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3057 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3062 case $cc_basename in
3064 # FIXME: insert proper C++ library support
3065 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3070 cygwin* | mingw* | pw32*)
3071 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3072 # as there is no search path for DLLs.
3073 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3074 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3075 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3076 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3078 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3079 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3080 # If the export-symbols file already is a .def file (1st line
3081 # is EXPORTS), use it as is; otherwise, prepend...
3082 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3083 cp $export_symbols $output_objdir/$soname.def;
3085 echo EXPORTS > $output_objdir/$soname.def;
3086 cat $export_symbols >> $output_objdir/$soname.def;
3088 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3090 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3093 darwin* | rhapsody*)
3095 rhapsody* | darwin1.[[012]])
3096 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3099 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3100 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3102 case ${MACOSX_DEPLOYMENT_TARGET} in
3104 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3107 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3113 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3114 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3115 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3116 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3117 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3118 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3120 if test "$GXX" = yes ; then
3121 lt_int_apple_cc_single_mod=no
3122 output_verbose_link_cmd='echo'
3123 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3124 lt_int_apple_cc_single_mod=yes
3126 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3127 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3129 _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'
3131 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3132 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3133 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3134 _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}'
3136 _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}'
3138 _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}'
3140 case $cc_basename in
3142 output_verbose_link_cmd='echo'
3143 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3144 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3145 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3146 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3147 _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}'
3150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3157 case $cc_basename in
3159 # FIXME: insert proper C++ library support
3160 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3163 # Green Hills C++ Compiler
3164 # FIXME: insert proper C++ library support
3165 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3168 # FIXME: insert proper C++ library support
3169 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3174 # C++ shared libraries reported to be fairly broken before switch to ELF
3175 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3178 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3180 freebsd* | dragonfly*)
3181 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3183 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3188 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3189 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3190 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3191 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3192 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3193 # but as the default
3194 # location of the library.
3196 case $cc_basename in
3198 # FIXME: insert proper C++ library support
3199 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3202 _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'
3203 # Commands to make compiler produce verbose output that lists
3204 # what "hidden" libraries, object files and flags are used when
3205 # linking a shared library.
3207 # There doesn't appear to be a way to prevent this compiler from
3208 # explicitly linking system object files so we need to strip them
3209 # from the output so that they don't get included in the library
3211 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'
3214 if test "$GXX" = yes; then
3215 _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'
3217 # FIXME: insert proper C++ library support
3218 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3224 if test $with_gnu_ld = no; then
3225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3226 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3231 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3237 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3238 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3241 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3242 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3243 # but as the default
3244 # location of the library.
3248 case $cc_basename in
3250 # FIXME: insert proper C++ library support
3251 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3256 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3259 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3262 _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'
3265 # Commands to make compiler produce verbose output that lists
3266 # what "hidden" libraries, object files and flags are used when
3267 # linking a shared library.
3269 # There doesn't appear to be a way to prevent this compiler from
3270 # explicitly linking system object files so we need to strip them
3271 # from the output so that they don't get included in the library
3273 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'
3276 if test "$GXX" = yes; then
3277 if test $with_gnu_ld = no; then
3280 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3283 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3286 _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'
3291 # FIXME: insert proper C++ library support
3292 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3298 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3299 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3301 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3302 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3303 # Instead, shared libraries are loaded at an image base (0x10000000 by
3304 # default) and relocated if they conflict, which is a slow very memory
3305 # consuming and fragmenting process. To avoid this, we pick a random,
3306 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3307 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3308 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3309 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3312 case $cc_basename in
3315 _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'
3317 # Archives containing C++ object files must be created using
3318 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3319 # necessary to make sure instantiated templates are included
3321 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3324 if test "$GXX" = yes; then
3325 if test "$with_gnu_ld" = no; then
3326 _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'
3328 _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'
3331 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3334 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3335 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3337 linux* | k*bsd*-gnu)
3338 case $cc_basename in
3340 # Kuck and Associates, Inc. (KAI) C++ Compiler
3342 # KCC will only create a shared library if the output file
3343 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3344 # to its proper name (with version) after linking.
3345 _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'
3346 _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'
3347 # Commands to make compiler produce verbose output that lists
3348 # what "hidden" libraries, object files and flags are used when
3349 # linking a shared library.
3351 # There doesn't appear to be a way to prevent this compiler from
3352 # explicitly linking system object files so we need to strip them
3353 # from the output so that they don't get included in the library
3355 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'
3357 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3358 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3360 # Archives containing C++ object files must be created using
3361 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3362 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3367 # version 8.0 and above of icpc choke on multiply defined symbols
3368 # if we add $predep_objects and $postdep_objects, however 7.1 and
3369 # earlier do not add the objects themselves.
3370 case `$CC -V 2>&1` in
3372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3373 _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'
3375 *) # Version 8.0 or newer
3378 ia64*) tmp_idyn=' -i_dynamic';;
3380 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3381 _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'
3384 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3385 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3386 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3387 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3390 # Portland Group C++ compiler
3391 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3392 _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'
3394 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3395 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3396 _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'
3400 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3401 _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'
3403 runpath_var=LD_RUN_PATH
3404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3405 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3407 # Commands to make compiler produce verbose output that lists
3408 # what "hidden" libraries, object files and flags are used when
3409 # linking a shared library.
3411 # There doesn't appear to be a way to prevent this compiler from
3412 # explicitly linking system object files so we need to strip them
3413 # from the output so that they don't get included in the library
3415 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'
3418 case `$CC -V 2>&1 | sed 5q` in
3421 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3423 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3424 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3425 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3427 # Not sure whether something based on
3428 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3430 output_verbose_link_cmd='echo'
3432 # Archives containing C++ object files must be created using
3433 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3434 # necessary to make sure instantiated templates are included
3436 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3443 # FIXME: insert proper C++ library support
3444 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3447 # FIXME: insert proper C++ library support
3448 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3451 case $cc_basename in
3453 # FIXME: insert proper C++ library support
3454 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3457 # FIXME: insert proper C++ library support
3458 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3462 netbsd* | netbsdelf*-gnu)
3463 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3464 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3466 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3467 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3468 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3470 # Workaround some broken pre-1.5 toolchains
3471 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3474 # C++ shared libraries are fairly broken
3475 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3478 if test -f /usr/libexec/ld.so; then
3479 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3480 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3481 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3482 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3483 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3484 _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'
3485 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3486 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3488 output_verbose_link_cmd='echo'
3490 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3494 case $cc_basename in
3496 # Kuck and Associates, Inc. (KAI) C++ Compiler
3498 # KCC will only create a shared library if the output file
3499 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3500 # to its proper name (with version) after linking.
3501 _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'
3503 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3504 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3506 # Archives containing C++ object files must be created using
3507 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3508 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3512 # Rational C++ 2.4.1
3513 # FIXME: insert proper C++ library support
3514 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3517 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3518 _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'
3520 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3521 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3523 # Commands to make compiler produce verbose output that lists
3524 # what "hidden" libraries, object files and flags are used when
3525 # linking a shared library.
3527 # There doesn't appear to be a way to prevent this compiler from
3528 # explicitly linking system object files so we need to strip them
3529 # from the output so that they don't get included in the library
3531 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'
3534 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3535 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3536 _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'
3538 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3539 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3541 # Commands to make compiler produce verbose output that lists
3542 # what "hidden" libraries, object files and flags are used when
3543 # linking a shared library.
3544 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3547 # FIXME: insert proper C++ library support
3548 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3554 case $cc_basename in
3556 # Kuck and Associates, Inc. (KAI) C++ Compiler
3558 # KCC will only create a shared library if the output file
3559 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3560 # to its proper name (with version) after linking.
3561 _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'
3563 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3564 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3566 # Archives containing C++ object files must be created using
3567 # the KAI C++ compiler.
3568 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3571 # Rational C++ 2.4.1
3572 # FIXME: insert proper C++ library support
3573 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3576 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3577 _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'
3578 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3579 echo "-hidden">> $lib.exp~
3580 $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~
3583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3584 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3586 # Commands to make compiler produce verbose output that lists
3587 # what "hidden" libraries, object files and flags are used when
3588 # linking a shared library.
3590 # There doesn't appear to be a way to prevent this compiler from
3591 # explicitly linking system object files so we need to strip them
3592 # from the output so that they don't get included in the library
3594 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'
3597 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3598 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3599 _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'
3601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3602 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3604 # Commands to make compiler produce verbose output that lists
3605 # what "hidden" libraries, object files and flags are used when
3606 # linking a shared library.
3607 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3610 # FIXME: insert proper C++ library support
3611 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3617 # FIXME: insert proper C++ library support
3618 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3621 case $cc_basename in
3624 # FIXME: insert proper C++ library support
3625 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3629 # FIXME: insert proper C++ library support
3630 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3633 # FIXME: insert proper C++ library support
3634 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3639 case $cc_basename in
3641 # Sun C++ 4.2, 5.x and Centerline C++
3642 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3643 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3644 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3645 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3646 $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'
3648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3649 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3651 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3653 # The compiler driver will combine and reorder linker options,
3654 # but understands `-z linker_flag'.
3655 # Supported since Solaris 2.6 (maybe 2.5.1?)
3656 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3659 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3661 output_verbose_link_cmd='echo'
3663 # Archives containing C++ object files must be created using
3664 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3665 # necessary to make sure instantiated templates are included
3667 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3670 # Green Hills C++ Compiler
3671 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3673 # The C++ compiler must be used to create the archive.
3674 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3677 # GNU C++ compiler with Solaris linker
3678 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3679 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3680 if $CC --version | grep -v '^2\.7' > /dev/null; then
3681 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3682 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3683 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3685 # Commands to make compiler produce verbose output that lists
3686 # what "hidden" libraries, object files and flags are used when
3687 # linking a shared library.
3688 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3690 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3693 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3694 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3696 # Commands to make compiler produce verbose output that lists
3697 # what "hidden" libraries, object files and flags are used when
3698 # linking a shared library.
3699 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3704 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3713 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3714 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3715 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3716 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3717 runpath_var='LD_RUN_PATH'
3719 case $cc_basename in
3721 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3722 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3725 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3726 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3730 sysv5* | sco3.2v5* | sco5v6*)
3731 # Note: We can NOT use -z defs as we might desire, because we do not
3732 # link with -lc, and that would cause any symbols used from libc to
3733 # always be unresolved, which means just about no library would
3734 # ever link correctly. If we're not using GNU ld we use -z text
3735 # though, which does catch some bad symbols but isn't as heavy-handed
3737 # For security reasons, it is highly recommended that you always
3738 # use absolute paths for naming shared libraries, and exclude the
3739 # DT_RUNPATH tag from executables and libraries. But doing so
3740 # requires that you compile everything twice, which is a pain.
3741 # So that behaviour is only enabled if SCOABSPATH is set to a
3742 # non-empty value in the environment. Most likely only useful for
3743 # creating official distributions of packages.
3744 # This is a hack until libtool officially supports absolute path
3745 # names for shared libraries.
3746 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3747 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3748 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3749 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3751 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3752 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3753 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3754 runpath_var='LD_RUN_PATH'
3756 case $cc_basename in
3758 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3759 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3762 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3763 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3768 case $cc_basename in
3770 # NonStop-UX NCC 3.20
3771 # FIXME: insert proper C++ library support
3772 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3775 # FIXME: insert proper C++ library support
3776 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3781 # FIXME: insert proper C++ library support
3782 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3785 # FIXME: insert proper C++ library support
3786 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3789 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3790 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3792 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3793 _LT_AC_TAGVAR(LD, $1)="$LD"
3795 AC_LIBTOOL_POSTDEP_PREDEP($1)
3796 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3797 AC_LIBTOOL_PROG_CC_C_O($1)
3798 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3799 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3800 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3801 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3803 AC_LIBTOOL_CONFIG($1)
3810 with_gnu_ldcxx=$with_gnu_ld
3811 with_gnu_ld=$lt_save_with_gnu_ld
3812 lt_cv_path_LDCXX=$lt_cv_path_LD
3813 lt_cv_path_LD=$lt_save_path_LD
3814 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3815 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3816 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3818 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3819 # ------------------------------------
3820 # Figure out "hidden" library dependencies from verbose
3821 # compiler output when linking a shared library.
3822 # Parse the compiler output and extract the necessary
3823 # objects, libraries and library flags.
3824 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3825 dnl we can't use the lt_simple_compile_test_code here,
3826 dnl because it contains code intended for an executable,
3827 dnl not a library. It's possible we should let each
3828 dnl tag define a new lt_????_link_test_code variable,
3829 dnl but it's only used here...
3830 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3832 void foo (void) { a = 0; }
3834 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3838 Foo (void) { a = 0; }
3843 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3851 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3854 public void bar (void) {
3860 dnl Parse the compiler output and extract the necessary
3861 dnl objects, libraries and library flags.
3862 if AC_TRY_EVAL(ac_compile); then
3863 # Parse the compiler output and extract the necessary
3864 # objects, libraries and library flags.
3866 # Sentinel used to keep track of whether or not we are before
3867 # the conftest object file.
3868 pre_test_object_deps_done=no
3870 # The `*' in the case matches for architectures that use `case' in
3871 # $output_verbose_cmd can trigger glob expansion during the loop
3872 # eval without this substitution.
3873 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3875 for p in `eval $output_verbose_link_cmd`; do
3879 # Some compilers place space between "-{L,R}" and the path.
3882 || test $p = "-R"; then
3889 if test "$pre_test_object_deps_done" = no; then
3892 # Internal compiler library paths should come after those
3893 # provided the user. The postdeps already come after the
3894 # user supplied libs so there is no need to process them.
3895 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3896 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3898 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3901 # The "-l" case would never come before the object being
3902 # linked, so don't bother handling this case.
3905 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3906 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3908 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3914 # This assumes that the test object file only shows up
3915 # once in the compiler output.
3916 if test "$p" = "conftest.$objext"; then
3917 pre_test_object_deps_done=yes
3921 if test "$pre_test_object_deps_done" = no; then
3922 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3923 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3925 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3928 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3929 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3931 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3936 *) ;; # Ignore the rest.
3944 echo "libtool.m4: error: problem compiling $1 test program"
3947 $rm -f confest.$objext
3949 # PORTME: override above test on systems where it is broken
3953 # Interix 3.5 installs completely hosed .la files for C++, so rather than
3954 # hack all around it, let's just trust "g++" to DTRT.
3955 _LT_AC_TAGVAR(predep_objects,$1)=
3956 _LT_AC_TAGVAR(postdep_objects,$1)=
3957 _LT_AC_TAGVAR(postdeps,$1)=
3961 case `$CC -V 2>&1 | sed 5q` in
3965 # The more standards-conforming stlport4 library is
3966 # incompatible with the Cstd library. Avoid specifying
3967 # it if it's in CXXFLAGS. Ignore libCrun as
3968 # -library=stlport4 depends on it.
3969 case " $CXX $CXXFLAGS " in
3970 *" -library=stlport4 "*)
3971 solaris_use_stlport4=yes
3974 if test "$solaris_use_stlport4" != yes; then
3975 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3982 case $cc_basename in
3984 # The more standards-conforming stlport4 library is
3985 # incompatible with the Cstd library. Avoid specifying
3986 # it if it's in CXXFLAGS. Ignore libCrun as
3987 # -library=stlport4 depends on it.
3988 case " $CXX $CXXFLAGS " in
3989 *" -library=stlport4 "*)
3990 solaris_use_stlport4=yes
3994 # Adding this requires a known-good setup of shared libraries for
3995 # Sun compiler versions before 5.6, else PIC objects from an old
3996 # archive will be linked into the output, leading to subtle bugs.
3997 if test "$solaris_use_stlport4" != yes; then
3998 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4006 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4007 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4009 ])# AC_LIBTOOL_POSTDEP_PREDEP
4011 # AC_LIBTOOL_LANG_F77_CONFIG
4012 # --------------------------
4013 # Ensure that the configuration vars for the C compiler are
4014 # suitably defined. Those variables are subsequently used by
4015 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4016 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4017 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4018 [AC_REQUIRE([AC_PROG_F77])
4019 AC_LANG_PUSH(Fortran 77)
4021 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4022 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4023 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4024 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4025 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4026 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4030 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4031 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4032 _LT_AC_TAGVAR(module_cmds, $1)=
4033 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4034 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4035 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4036 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4037 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4038 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4040 # Source file extension for f77 test sources.
4043 # Object file extension for compiled f77 test sources.
4045 _LT_AC_TAGVAR(objext, $1)=$objext
4047 # Code to be used in simple compile tests
4048 lt_simple_compile_test_code="\
4054 # Code to be used in simple link tests
4055 lt_simple_link_test_code="\
4060 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4063 # save warnings/boilerplate of simple test code
4064 _LT_COMPILER_BOILERPLATE
4065 _LT_LINKER_BOILERPLATE
4067 # Allow CC to be a program name with arguments.
4071 _LT_AC_TAGVAR(compiler, $1)=$CC
4072 _LT_CC_BASENAME([$compiler])
4074 AC_MSG_CHECKING([if libtool supports shared libraries])
4075 AC_MSG_RESULT([$can_build_shared])
4077 AC_MSG_CHECKING([whether to build shared libraries])
4078 test "$can_build_shared" = "no" && enable_shared=no
4080 # On AIX, shared libraries and static libraries use the same namespace, and
4081 # are all built from PIC.
4084 test "$enable_shared" = yes && enable_static=no
4085 if test -n "$RANLIB"; then
4086 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4087 postinstall_cmds='$RANLIB $lib'
4091 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4092 test "$enable_shared" = yes && enable_static=no
4096 AC_MSG_RESULT([$enable_shared])
4098 AC_MSG_CHECKING([whether to build static libraries])
4099 # Make sure either enable_shared or enable_static is yes.
4100 test "$enable_shared" = yes || enable_static=yes
4101 AC_MSG_RESULT([$enable_static])
4103 _LT_AC_TAGVAR(GCC, $1)="$G77"
4104 _LT_AC_TAGVAR(LD, $1)="$LD"
4106 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4107 AC_LIBTOOL_PROG_CC_C_O($1)
4108 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4109 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4110 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4111 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4113 AC_LIBTOOL_CONFIG($1)
4117 ])# AC_LIBTOOL_LANG_F77_CONFIG
4120 # AC_LIBTOOL_LANG_GCJ_CONFIG
4121 # --------------------------
4122 # Ensure that the configuration vars for the C compiler are
4123 # suitably defined. Those variables are subsequently used by
4124 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4125 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4126 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4129 # Source file extension for Java test sources.
4132 # Object file extension for compiled Java test sources.
4134 _LT_AC_TAGVAR(objext, $1)=$objext
4136 # Code to be used in simple compile tests
4137 lt_simple_compile_test_code="class foo {}"
4139 # Code to be used in simple link tests
4140 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4142 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4145 # save warnings/boilerplate of simple test code
4146 _LT_COMPILER_BOILERPLATE
4147 _LT_LINKER_BOILERPLATE
4149 # Allow CC to be a program name with arguments.
4153 _LT_AC_TAGVAR(compiler, $1)=$CC
4154 _LT_CC_BASENAME([$compiler])
4156 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4157 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4159 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4161 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4162 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4163 AC_LIBTOOL_PROG_CC_C_O($1)
4164 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4165 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4166 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4167 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4169 AC_LIBTOOL_CONFIG($1)
4173 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4176 # AC_LIBTOOL_LANG_RC_CONFIG
4177 # -------------------------
4178 # Ensure that the configuration vars for the Windows resource compiler are
4179 # suitably defined. Those variables are subsequently used by
4180 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4181 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4182 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4185 # Source file extension for RC test sources.
4188 # Object file extension for compiled RC test sources.
4190 _LT_AC_TAGVAR(objext, $1)=$objext
4192 # Code to be used in simple compile tests
4193 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4195 # Code to be used in simple link tests
4196 lt_simple_link_test_code="$lt_simple_compile_test_code"
4198 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4201 # save warnings/boilerplate of simple test code
4202 _LT_COMPILER_BOILERPLATE
4203 _LT_LINKER_BOILERPLATE
4205 # Allow CC to be a program name with arguments.
4209 _LT_AC_TAGVAR(compiler, $1)=$CC
4210 _LT_CC_BASENAME([$compiler])
4211 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4213 AC_LIBTOOL_CONFIG($1)
4217 ])# AC_LIBTOOL_LANG_RC_CONFIG
4220 # AC_LIBTOOL_CONFIG([TAGNAME])
4221 # ----------------------------
4222 # If TAGNAME is not passed, then create an initial libtool script
4223 # with a default configuration from the untagged config vars. Otherwise
4224 # add code to config.status for appending the configuration named by
4225 # TAGNAME from the matching tagged config vars.
4226 AC_DEFUN([AC_LIBTOOL_CONFIG],
4227 [# The else clause should only fire when bootstrapping the
4228 # libtool distribution, otherwise you forgot to ship ltmain.sh
4229 # with your package, and you will get complaints that there are
4230 # no rules to generate ltmain.sh.
4231 if test -f "$ltmain"; then
4232 # See if we are running on zsh, and set the options which allow our commands through
4233 # without removal of \ escapes.
4234 if test -n "${ZSH_VERSION+set}" ; then
4235 setopt NO_GLOB_SUBST
4237 # Now quote all the things that may contain metacharacters while being
4238 # careful not to overquote the AC_SUBSTed values. We take copies of the
4239 # variables and quote the copies for generation of the libtool script.
4240 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4242 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4243 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4244 deplibs_check_method reload_flag reload_cmds need_locks \
4245 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4246 lt_cv_sys_global_symbol_to_c_name_address \
4247 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4248 old_postinstall_cmds old_postuninstall_cmds \
4249 _LT_AC_TAGVAR(compiler, $1) \
4250 _LT_AC_TAGVAR(CC, $1) \
4251 _LT_AC_TAGVAR(LD, $1) \
4252 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4253 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4254 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4255 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4256 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4257 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4258 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4259 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4260 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4261 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4262 _LT_AC_TAGVAR(predep_objects, $1) \
4263 _LT_AC_TAGVAR(postdep_objects, $1) \
4264 _LT_AC_TAGVAR(predeps, $1) \
4265 _LT_AC_TAGVAR(postdeps, $1) \
4266 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4267 _LT_AC_TAGVAR(archive_cmds, $1) \
4268 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4269 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4270 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4271 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4272 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4273 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4274 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4276 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4277 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4278 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4279 _LT_AC_TAGVAR(module_cmds, $1) \
4280 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4281 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4282 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4283 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4284 _LT_AC_TAGVAR(include_expsyms, $1); do
4287 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4288 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4289 _LT_AC_TAGVAR(archive_cmds, $1) | \
4290 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4291 _LT_AC_TAGVAR(module_cmds, $1) | \
4292 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4293 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4294 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4295 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4296 postinstall_cmds | postuninstall_cmds | \
4297 old_postinstall_cmds | old_postuninstall_cmds | \
4298 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4299 # Double-quote double-evaled strings.
4300 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4303 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4309 *'\[$]0 --fallback-echo"')
4310 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4315 [cfgfile="${ofile}T"
4316 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4318 AC_MSG_NOTICE([creating $ofile])],
4321 cat <<__EOF__ >> "$cfgfile"
4325 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4326 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4327 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4329 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4330 # Free Software Foundation, Inc.
4332 # This file is part of GNU Libtool:
4333 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4335 # This program is free software; you can redistribute it and/or modify
4336 # it under the terms of the GNU General Public License as published by
4337 # the Free Software Foundation; either version 2 of the License, or
4338 # (at your option) any later version.
4340 # This program is distributed in the hope that it will be useful, but
4341 # WITHOUT ANY WARRANTY; without even the implied warranty of
4342 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4343 # General Public License for more details.
4345 # You should have received a copy of the GNU General Public License
4346 # along with this program; if not, write to the Free Software
4347 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4349 # As a special exception to the GNU General Public License, if you
4350 # distribute this file as part of a program that contains a
4351 # configuration script generated by Autoconf, you may include it under
4352 # the same distribution terms that you use for the rest of that program.
4354 # A sed program that does not truncate output.
4357 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4358 Xsed="$SED -e 1s/^X//"
4360 # The HP-UX ksh and POSIX shell print the target directory to stdout
4362 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4364 # The names of the tagged configurations supported by this script.
4367 # ### BEGIN LIBTOOL CONFIG],
4368 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4370 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4372 # Shell to use when invoking shell scripts.
4375 # Whether or not to build shared libraries.
4376 build_libtool_libs=$enable_shared
4378 # Whether or not to build static libraries.
4379 build_old_libs=$enable_static
4381 # Whether or not to add -lc for building shared libraries.
4382 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4384 # Whether or not to disallow shared libs when runtime libs are static
4385 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4387 # Whether or not to optimize for fast installation.
4388 fast_install=$enable_fast_install
4391 host_alias=$host_alias
4396 build_alias=$build_alias
4400 # An echo program that does not interpret backslashes.
4405 AR_FLAGS=$lt_AR_FLAGS
4410 # LTCC compiler flags.
4411 LTCFLAGS=$lt_LTCFLAGS
4413 # A language-specific compiler.
4414 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4416 # Is the compiler the GNU C compiler?
4417 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4422 # The linker used to build libraries.
4423 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4425 # Whether we need hard or soft links.
4428 # A BSD-compatible nm program.
4431 # A symbol stripping program
4434 # Used to examine libraries when file_magic_cmd begins "file"
4435 MAGIC_CMD=$MAGIC_CMD
4437 # Used on cygwin: DLL creation program.
4440 # Used on cygwin: object dumper.
4443 # Used on cygwin: assembler.
4446 # The name of the directory that contains temporary libtool files.
4449 # How to create reloadable object files.
4450 reload_flag=$lt_reload_flag
4451 reload_cmds=$lt_reload_cmds
4453 # How to pass a linker flag through the compiler.
4454 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4456 # Object file suffix (normally "o").
4459 # Old archive suffix (normally "a").
4462 # Shared library suffix (normally ".so").
4463 shrext_cmds='$shrext_cmds'
4465 # Executable file suffix (normally "").
4468 # Additional compiler flags for building library objects.
4469 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4472 # What is the maximum length of a command?
4473 max_cmd_len=$lt_cv_sys_max_cmd_len
4475 # Does compiler simultaneously support -c and -o options?
4476 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4478 # Must we lock files when doing compilation?
4479 need_locks=$lt_need_locks
4481 # Do we need the lib prefix for modules?
4482 need_lib_prefix=$need_lib_prefix
4484 # Do we need a version for libraries?
4485 need_version=$need_version
4487 # Whether dlopen is supported.
4488 dlopen_support=$enable_dlopen
4490 # Whether dlopen of programs is supported.
4491 dlopen_self=$enable_dlopen_self
4493 # Whether dlopen of statically linked programs is supported.
4494 dlopen_self_static=$enable_dlopen_self_static
4496 # Compiler flag to prevent dynamic linking.
4497 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4499 # Compiler flag to turn off builtin functions.
4500 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4502 # Compiler flag to allow reflexive dlopens.
4503 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4505 # Compiler flag to generate shared objects directly from archives.
4506 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4508 # Compiler flag to generate thread-safe objects.
4509 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4511 # Library versioning type.
4512 version_type=$version_type
4514 # Format of library name prefix.
4515 libname_spec=$lt_libname_spec
4517 # List of archive names. First name is the real one, the rest are links.
4518 # The last name is the one that the linker finds with -lNAME.
4519 library_names_spec=$lt_library_names_spec
4521 # The coded name of the library, if different from the real name.
4522 soname_spec=$lt_soname_spec
4524 # Commands used to build and install an old-style archive.
4526 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4527 old_postinstall_cmds=$lt_old_postinstall_cmds
4528 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4530 # Create an old-style archive from a shared archive.
4531 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4533 # Create a temporary old-style archive to link instead of a shared archive.
4534 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4536 # Commands used to build and install a shared archive.
4537 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4538 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4539 postinstall_cmds=$lt_postinstall_cmds
4540 postuninstall_cmds=$lt_postuninstall_cmds
4542 # Commands used to build a loadable module (assumed same as above if empty)
4543 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4544 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4546 # Commands to strip libraries.
4547 old_striplib=$lt_old_striplib
4548 striplib=$lt_striplib
4550 # Dependencies to place before the objects being linked to create a
4552 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4554 # Dependencies to place after the objects being linked to create a
4556 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4558 # Dependencies to place before the objects being linked to create a
4560 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4562 # Dependencies to place after the objects being linked to create a
4564 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4566 # The library search path used internally by the compiler when linking
4568 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4570 # Method to check whether dependent libraries are shared objects.
4571 deplibs_check_method=$lt_deplibs_check_method
4573 # Command to use when deplibs_check_method == file_magic.
4574 file_magic_cmd=$lt_file_magic_cmd
4576 # Flag that allows shared libraries with undefined symbols to be built.
4577 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4579 # Flag that forces no undefined symbols.
4580 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4582 # Commands used to finish a libtool library installation in a directory.
4583 finish_cmds=$lt_finish_cmds
4585 # Same as above, but a single script fragment to be evaled but not shown.
4586 finish_eval=$lt_finish_eval
4588 # Take the output of nm and produce a listing of raw symbols and C names.
4589 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4591 # Transform the output of nm in a proper C declaration
4592 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4594 # Transform the output of nm in a C name address pair
4595 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4597 # This is the shared library runtime path variable.
4598 runpath_var=$runpath_var
4600 # This is the shared library path variable.
4601 shlibpath_var=$shlibpath_var
4603 # Is shlibpath searched before the hard-coded library search path?
4604 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4606 # How to hardcode a shared library path into an executable.
4607 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4609 # Whether we should hardcode library paths into libraries.
4610 hardcode_into_libs=$hardcode_into_libs
4612 # Flag to hardcode \$libdir into a binary during linking.
4613 # This must work even if \$libdir does not exist.
4614 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4616 # If ld is used when linking, flag to hardcode \$libdir into
4617 # a binary during linking. This must work even if \$libdir does
4619 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4621 # Whether we need a single -rpath flag with a separated argument.
4622 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4624 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4626 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4628 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4630 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4632 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4633 # the resulting binary.
4634 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4636 # Set to yes if building a shared library automatically hardcodes DIR into the library
4637 # and all subsequent libraries and executables linked against it.
4638 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4640 # Variables whose values should be saved in libtool wrapper scripts and
4641 # restored at relink time.
4642 variables_saved_for_relink="$variables_saved_for_relink"
4644 # Whether libtool must link a program against all its dependency libraries.
4645 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4647 # Compile-time system search path for libraries
4648 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4650 # Run-time system search path for libraries
4651 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4653 # Fix the shell variable \$srcfile for the compiler.
4654 fix_srcfile_path=$lt_fix_srcfile_path
4656 # Set to yes if exported symbols are required.
4657 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4659 # The commands to list exported symbols.
4660 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4662 # The commands to extract the exported symbol list from a shared archive.
4663 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4665 # Symbols that should not be listed in the preloaded symbols.
4666 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4668 # Symbols that must always be exported.
4669 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4672 [# ### END LIBTOOL CONFIG],
4673 [# ### END LIBTOOL TAG CONFIG: $tagname])
4680 cat <<\EOF >> "$cfgfile"
4682 # AIX sometimes has problems with the GCC collect2 program. For some
4683 # reason, if we set the COLLECT_NAMES environment variable, the problems
4684 # vanish in a puff of smoke.
4685 if test "X${COLLECT_NAMES+set}" != Xset; then
4687 export COLLECT_NAMES
4693 # We use sed instead of cat because bash on DJGPP gets confused if
4694 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4695 # text mode, it properly converts lines to CR/LF. This bash problem
4696 # is reportedly fixed, but why not run on old versions too?
4697 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4699 mv -f "$cfgfile" "$ofile" || \
4700 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4704 # If there is no Makefile yet, we rely on a make rule to execute
4705 # `config.status --recheck' to rerun these tests and create the
4706 # libtool script then.
4707 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4708 if test -f "$ltmain_in"; then
4709 test -f Makefile && make "$ltmain"
4712 ])# AC_LIBTOOL_CONFIG
4715 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4716 # -------------------------------------------
4717 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4718 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4720 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4722 if test "$GCC" = yes; then
4723 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4725 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4726 lt_cv_prog_compiler_rtti_exceptions,
4727 [-fno-rtti -fno-exceptions], [],
4728 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4730 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4733 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4734 # ---------------------------------
4735 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4736 [AC_REQUIRE([AC_CANONICAL_HOST])
4737 AC_REQUIRE([LT_AC_PROG_SED])
4738 AC_REQUIRE([AC_PROG_NM])
4739 AC_REQUIRE([AC_OBJEXT])
4740 # Check for command to grab the raw symbol name followed by C symbol from nm.
4741 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4742 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4744 # These are sane defaults that work on at least a few old systems.
4745 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4747 # Character class describing NM global symbol codes.
4748 symcode='[[BCDEGRST]]'
4750 # Regexp to match symbols that can be accessed directly from C.
4751 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4753 # Transform an extracted symbol line into a proper C declaration
4754 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4756 # Transform an extracted symbol line into symbol name and symbol address
4757 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'"
4759 # Define system-specific variables.
4764 cygwin* | mingw* | pw32*)
4765 symcode='[[ABCDGISTW]]'
4767 hpux*) # Its linker distinguishes data from code symbols
4768 if test "$host_cpu" = ia64; then
4769 symcode='[[ABCDEGRST]]'
4771 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4772 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'"
4774 linux* | k*bsd*-gnu)
4775 if test "$host_cpu" = ia64; then
4776 symcode='[[ABCDGIRSTW]]'
4777 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4778 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'"
4782 symcode='[[BCDEGRST]]'
4785 symcode='[[BCDEGQRST]]'
4796 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4800 symcode='[[DFNSTU]]'
4804 # Handle CRLF in mingw tool chain
4808 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4812 # If we're using GNU nm, then use its standard symbol codes.
4813 case `$NM -V 2>&1` in
4814 *GNU* | *'with BFD'*)
4815 symcode='[[ABCDGIRSTW]]' ;;
4818 # Try without a prefix undercore, then with it.
4819 for ac_symprfx in "" "_"; do
4821 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4822 symxfrm="\\1 $ac_symprfx\\2 \\2"
4824 # Write the raw and C identifiers.
4825 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4827 # Check to see that the pipe works correctly.
4831 cat > conftest.$ac_ext <<EOF
4836 void nm_test_func(){}
4840 int main(){nm_test_var='a';nm_test_func();return(0);}
4843 if AC_TRY_EVAL(ac_compile); then
4844 # Now try to grab the symbols.
4846 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4847 # Try sorting and uniquifying the output.
4848 if sort "$nlist" | uniq > "$nlist"T; then
4849 mv -f "$nlist"T "$nlist"
4854 # Make sure that we snagged all the symbols we need.
4855 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4856 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4857 cat <<EOF > conftest.$ac_ext
4863 # Now generate the symbol file.
4864 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4866 cat <<EOF >> conftest.$ac_ext
4867 #if defined (__STDC__) && __STDC__
4868 # define lt_ptr_t void *
4870 # define lt_ptr_t char *
4874 /* The mapping between symbol names and symbols. */
4879 lt_preloaded_symbols[[]] =
4882 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4883 cat <<\EOF >> conftest.$ac_ext
4891 # Now try linking the two files.
4892 mv conftest.$ac_objext conftstm.$ac_objext
4893 lt_save_LIBS="$LIBS"
4894 lt_save_CFLAGS="$CFLAGS"
4895 LIBS="conftstm.$ac_objext"
4896 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4897 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4900 LIBS="$lt_save_LIBS"
4901 CFLAGS="$lt_save_CFLAGS"
4903 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4906 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4909 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4912 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4913 cat conftest.$ac_ext >&5
4915 rm -f conftest* conftst*
4917 # Do not use the global_symbol_pipe unless it works.
4918 if test "$pipe_works" = yes; then
4921 lt_cv_sys_global_symbol_pipe=
4925 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4926 lt_cv_sys_global_symbol_to_cdecl=
4928 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4929 AC_MSG_RESULT(failed)
4933 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4936 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4937 # ---------------------------------------
4938 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4939 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4940 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4943 AC_MSG_CHECKING([for $compiler option to produce PIC])
4945 # C++ specific cases for pic, static, wl, etc.
4946 if test "$GXX" = yes; then
4947 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4948 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4952 # All AIX code is PIC.
4953 if test "$host_cpu" = ia64; then
4954 # AIX 5 now supports IA64 processor
4955 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4959 # FIXME: we need at least 68020 code to build shared libraries, but
4960 # adding the `-m68020' flag to GCC prevents building anything better,
4962 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4964 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4965 # PIC is the default for these OSes.
4967 mingw* | cygwin* | os2* | pw32*)
4968 # This hack is so that the source file can tell whether it is being
4969 # built for inclusion in a dll (and should export symbols for example).
4970 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4971 # (--disable-auto-import) libraries
4972 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4974 darwin* | rhapsody*)
4975 # PIC is the default on this platform
4976 # Common symbols not allowed in MH_DYLIB files
4977 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4980 # DJGPP does not support shared libraries at all
4981 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4984 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4985 # Instead, we relocate shared libraries at runtime.
4988 if test -d /usr/nec; then
4989 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4993 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4999 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5004 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5010 # All AIX code is PIC.
5011 if test "$host_cpu" = ia64; then
5012 # AIX 5 now supports IA64 processor
5013 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5015 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5019 case $cc_basename in
5021 # Green Hills C++ Compiler
5022 # _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"
5027 # PIC is the default on this platform
5028 # Common symbols not allowed in MH_DYLIB files
5029 case $cc_basename in
5031 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5032 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5037 case $cc_basename in
5039 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5042 # Green Hills C++ Compiler
5043 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5049 freebsd* | dragonfly*)
5050 # FreeBSD uses GNU C++
5052 hpux9* | hpux10* | hpux11*)
5053 case $cc_basename in
5055 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5056 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5057 if test "$host_cpu" != ia64; then
5058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5062 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5063 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5069 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5078 # This is c89, which is MS Visual C++ (no shared libs)
5079 # Anyone wants to do a port?
5081 irix5* | irix6* | nonstopux*)
5082 case $cc_basename in
5084 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5086 # CC pic flag -KPIC is the default.
5092 linux* | k*bsd*-gnu)
5093 case $cc_basename in
5096 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5097 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5101 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5102 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5103 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5106 # Portland Group C++ compiler.
5107 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5108 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5109 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5113 # Make sure the PIC flag is empty. It appears that all Alpha
5114 # Linux and Compaq Tru64 Unix objects are PIC.
5115 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5116 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5119 case `$CC -V 2>&1 | sed 5q` in
5122 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5123 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5124 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5135 case $cc_basename in
5137 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5143 netbsd* | netbsdelf*-gnu)
5145 osf3* | osf4* | osf5*)
5146 case $cc_basename in
5148 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5151 # Rational C++ 2.4.1
5152 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5155 # Digital/Compaq C++
5156 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5157 # Make sure the PIC flag is empty. It appears that all Alpha
5158 # Linux and Compaq Tru64 Unix objects are PIC.
5159 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5160 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5169 case $cc_basename in
5171 # Sun C++ 4.2, 5.x and Centerline C++
5172 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5173 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5174 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5177 # Green Hills C++ Compiler
5178 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5185 case $cc_basename in
5188 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5189 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5193 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5200 case $cc_basename in
5202 # NonStop-UX NCC 3.20
5203 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5209 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5210 case $cc_basename in
5212 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5213 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5214 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5221 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5227 if test "$GCC" = yes; then
5228 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5229 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5233 # All AIX code is PIC.
5234 if test "$host_cpu" = ia64; then
5235 # AIX 5 now supports IA64 processor
5236 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5241 # FIXME: we need at least 68020 code to build shared libraries, but
5242 # adding the `-m68020' flag to GCC prevents building anything better,
5244 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5247 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5248 # PIC is the default for these OSes.
5251 mingw* | cygwin* | pw32* | os2*)
5252 # This hack is so that the source file can tell whether it is being
5253 # built for inclusion in a dll (and should export symbols for example).
5254 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5255 # (--disable-auto-import) libraries
5256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5259 darwin* | rhapsody*)
5260 # PIC is the default on this platform
5261 # Common symbols not allowed in MH_DYLIB files
5262 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5266 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5267 # Instead, we relocate shared libraries at runtime.
5271 # Just because we use GCC doesn't mean we suddenly get shared libraries
5272 # on systems that don't support them.
5273 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5278 if test -d /usr/nec; then
5279 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5284 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5291 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5297 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5301 # PORTME Check for flag to pass linker flags through the system compiler.
5304 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5305 if test "$host_cpu" = ia64; then
5306 # AIX 5 now supports IA64 processor
5307 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5309 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5313 # PIC is the default on this platform
5314 # Common symbols not allowed in MH_DYLIB files
5315 case $cc_basename in
5317 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5318 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5323 mingw* | cygwin* | pw32* | os2*)
5324 # This hack is so that the source file can tell whether it is being
5325 # built for inclusion in a dll (and should export symbols for example).
5326 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5329 hpux9* | hpux10* | hpux11*)
5330 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5331 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5338 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5341 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5342 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5345 irix5* | irix6* | nonstopux*)
5346 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5347 # PIC (with -KPIC) is the default.
5348 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5352 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5353 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5356 linux* | k*bsd*-gnu)
5357 case $cc_basename in
5359 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5360 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5361 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5363 pgcc* | pgf77* | pgf90* | pgf95*)
5364 # Portland Group compilers (*not* the Pentium gcc compiler,
5365 # which looks to be a dead project)
5366 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5367 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5368 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5371 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372 # All Alpha code is PIC.
5373 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5376 case `$CC -V 2>&1 | sed 5q` in
5379 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5380 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5381 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5384 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5385 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5386 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5387 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5394 osf3* | osf4* | osf5*)
5395 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5396 # All OSF/1 code is PIC.
5397 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5401 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5405 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5406 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5407 case $cc_basename in
5409 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5411 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5416 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5418 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5421 sysv4 | sysv4.2uw2* | sysv4.3*)
5422 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5423 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5424 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5428 if test -d /usr/nec ;then
5429 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5430 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5434 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5435 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5437 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5441 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5442 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5446 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5447 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5451 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5456 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5459 # Check to make sure the PIC flag actually works.
5461 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5462 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5463 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5464 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5465 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5467 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5469 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5470 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5473 # For platforms which do not support PIC, -DPIC is meaningless:
5475 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5478 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5483 # Check to make sure the static flag actually works.
5485 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5486 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5487 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5488 $lt_tmp_static_flag,
5490 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5494 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5495 # ------------------------------------
5496 # See if the linker supports building shared libraries.
5497 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5498 [AC_REQUIRE([LT_AC_PROG_SED])dnl
5499 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5501 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5504 # If we're using GNU nm, then we don't want the "-C" option.
5505 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5506 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5507 _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'
5509 _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'
5513 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5516 _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'
5518 linux* | k*bsd*-gnu)
5519 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5522 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5527 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5528 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5529 _LT_AC_TAGVAR(archive_cmds, $1)=
5530 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5531 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5532 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5533 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5534 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5535 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5537 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5538 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5539 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5540 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5541 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5542 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5543 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5544 _LT_AC_TAGVAR(module_cmds, $1)=
5545 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5546 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5547 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5548 # include_expsyms should be a list of space-separated symbols to be *always*
5549 # included in the symbol list
5550 _LT_AC_TAGVAR(include_expsyms, $1)=
5551 # exclude_expsyms can be an extended regexp of symbols to exclude
5552 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5553 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5554 # as well as any symbol that contains `d'.
5555 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5556 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5557 # platforms (ab)use it in PIC code, but their linkers get confused if
5558 # the symbol is explicitly referenced. Since portable code cannot
5559 # rely on this symbol name, it's probably fine to never include it in
5560 # preloaded symbol tables.
5561 extract_expsyms_cmds=
5562 # Just being paranoid about ensuring that cc_basename is set.
5563 _LT_CC_BASENAME([$compiler])
5565 cygwin* | mingw* | pw32*)
5566 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5567 # When not using gcc, we currently assume that we are using
5568 # Microsoft Visual C++.
5569 if test "$GCC" != yes; then
5574 # we just hope/assume this is gcc and not c89 (= MSVC++)
5582 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5583 if test "$with_gnu_ld" = yes; then
5584 # If archive_cmds runs LD, not CC, wlarc should be empty
5587 # Set some defaults for GNU ld with shared library support. These
5588 # are reset later if shared libraries are not supported. Putting them
5589 # here allows them to be overridden if necessary.
5590 runpath_var=LD_RUN_PATH
5591 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5592 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5593 # ancient GNU ld didn't support --whole-archive et. al.
5594 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5595 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5597 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5599 supports_anon_versioning=no
5600 case `$LD -v 2>/dev/null` in
5601 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5602 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5603 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5604 *\ 2.11.*) ;; # other 2.11 versions
5605 *) supports_anon_versioning=yes ;;
5608 # See if GNU ld supports shared libraries.
5610 aix3* | aix4* | aix5*)
5611 # On AIX/PPC, the GNU linker is very broken
5612 if test "$host_cpu" != ia64; then
5613 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5616 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5617 *** to be unable to reliably create shared libraries on AIX.
5618 *** Therefore, libtool is disabling shared libraries support. If you
5619 *** really care for shared libraries, you may want to modify your PATH
5620 *** so that a non-GNU linker is found, and then restart.
5627 _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)'
5628 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5629 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5631 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5632 # that the semantics of dynamic libraries on AmigaOS, at least up
5633 # to version 4, is to share data among multiple programs linked
5634 # with the same dynamic library. Since this doesn't match the
5635 # behavior of shared libraries on other platforms, we can't use
5637 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5641 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5642 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5643 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5644 # support --undefined. This deserves some investigation. FIXME
5645 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5647 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5651 cygwin* | mingw* | pw32*)
5652 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5653 # as there is no search path for DLLs.
5654 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5655 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5656 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5657 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5658 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5660 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5661 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5662 # If the export-symbols file already is a .def file (1st line
5663 # is EXPORTS), use it as is; otherwise, prepend...
5664 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5665 cp $export_symbols $output_objdir/$soname.def;
5667 echo EXPORTS > $output_objdir/$soname.def;
5668 cat $export_symbols >> $output_objdir/$soname.def;
5670 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5672 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5677 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5678 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5679 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5680 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5681 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5682 # Instead, shared libraries are loaded at an image base (0x10000000 by
5683 # default) and relocated if they conflict, which is a slow very memory
5684 # consuming and fragmenting process. To avoid this, we pick a random,
5685 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5686 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5687 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5688 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5691 gnu* | linux* | k*bsd*-gnu)
5692 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5694 case $cc_basename,$host_cpu in
5695 pgcc*) # Portland Group C compiler
5696 _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'
5697 tmp_addflag=' $pic_flag'
5699 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5700 _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'
5701 tmp_addflag=' $pic_flag -Mnomain' ;;
5702 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5703 tmp_addflag=' -i_dynamic' ;;
5704 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5705 tmp_addflag=' -i_dynamic -nofor_main' ;;
5706 ifc* | ifort*) # Intel Fortran compiler
5707 tmp_addflag=' -nofor_main' ;;
5709 case `$CC -V 2>&1 | sed 5q` in
5710 *Sun\ C*) # Sun C 5.9
5711 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5712 tmp_sharedflag='-G' ;;
5713 *Sun\ F*) # Sun Fortran 8.3
5714 tmp_sharedflag='-G' ;;
5716 tmp_sharedflag='-shared' ;;
5718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5720 if test $supports_anon_versioning = yes; then
5721 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5722 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5723 $echo "local: *; };" >> $output_objdir/$libname.ver~
5724 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5726 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5728 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5732 netbsd* | netbsdelf*-gnu)
5733 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5734 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5737 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5738 _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'
5743 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5744 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5747 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5748 *** create shared libraries on Solaris systems. Therefore, libtool
5749 *** is disabling shared libraries support. We urge you to upgrade GNU
5750 *** binutils to release 2.9.1 or newer. Another option is to modify
5751 *** your PATH or compiler configuration so that the native linker is
5752 *** used, and then restart.
5755 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5756 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5757 _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'
5759 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5763 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5764 case `$LD -v 2>&1` in
5765 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5766 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5769 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5770 *** reliably create shared libraries on SCO systems. Therefore, libtool
5771 *** is disabling shared libraries support. We urge you to upgrade GNU
5772 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5773 *** your PATH or compiler configuration so that the native linker is
5774 *** used, and then restart.
5779 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5781 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5782 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5784 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5791 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5793 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5794 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5798 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5799 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5800 _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'
5802 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5807 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5809 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5810 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5811 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5814 # PORTME fill in a description of your system's linker (not GNU ld)
5817 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5818 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5819 _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'
5820 # Note: this linker hardcodes the directories in LIBPATH if there
5821 # are no directories specified by -L.
5822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5823 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5824 # Neither direct hardcoding nor static linking is supported with a
5826 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5831 if test "$host_cpu" = ia64; then
5832 # On IA64, the linker does run time linking by default, so we don't
5833 # have to do anything special.
5834 aix_use_runtimelinking=no
5835 exp_sym_flag='-Bexport'
5838 # If we're using GNU nm, then we don't want the "-C" option.
5839 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5840 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5841 _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'
5843 _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'
5845 aix_use_runtimelinking=no
5847 # Test if we are trying to use run time linking or normal
5848 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5849 # need to do runtime linking.
5850 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5851 for ld_flag in $LDFLAGS; do
5852 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5853 aix_use_runtimelinking=yes
5860 exp_sym_flag='-bexport'
5861 no_entry_flag='-bnoentry'
5864 # When large executables or shared objects are built, AIX ld can
5865 # have problems creating the table of contents. If linking a library
5866 # or program results in "error TOC overflow" add -mminimal-toc to
5867 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5868 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5870 _LT_AC_TAGVAR(archive_cmds, $1)=''
5871 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5872 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5873 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5875 if test "$GCC" = yes; then
5876 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5877 # We only want to do this on AIX 4.2 and lower, the check
5878 # below for broken collect2 doesn't work under 4.3+
5879 collect2name=`${CC} -print-prog-name=collect2`
5880 if test -f "$collect2name" && \
5881 strings "$collect2name" | grep resolve_lib_name >/dev/null
5883 # We have reworked collect2
5886 # We have old collect2
5887 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5888 # It fails to find uninstalled libraries when the uninstalled
5889 # path is not listed in the libpath. Setting hardcode_minus_L
5890 # to unsupported forces relinking
5891 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5892 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5893 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5897 shared_flag='-shared'
5898 if test "$aix_use_runtimelinking" = yes; then
5899 shared_flag="$shared_flag "'${wl}-G'
5903 if test "$host_cpu" = ia64; then
5904 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5905 # chokes on -Wl,-G. The following line is correct:
5908 if test "$aix_use_runtimelinking" = yes; then
5909 shared_flag='${wl}-G'
5911 shared_flag='${wl}-bM:SRE'
5916 # It seems that -bexpall does not export symbols beginning with
5917 # underscore (_), so it is better to generate a list of symbols to export.
5918 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5919 if test "$aix_use_runtimelinking" = yes; then
5920 # Warning - without using the other runtime loading flags (-brtl),
5921 # -berok will link without error, but may produce a broken library.
5922 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5923 # Determine the default libpath from the value encoded in an empty executable.
5924 _LT_AC_SYS_LIBPATH_AIX
5925 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5926 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5928 if test "$host_cpu" = ia64; then
5929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5930 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5931 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5933 # Determine the default libpath from the value encoded in an empty executable.
5934 _LT_AC_SYS_LIBPATH_AIX
5935 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5936 # Warning - without using the other run time loading flags,
5937 # -berok will link without error, but may produce a broken library.
5938 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5939 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5940 # Exported symbols can be pulled into shared objects from archives
5941 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5942 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5943 # This is similar to how AIX traditionally builds its shared libraries.
5944 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5950 _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)'
5951 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5952 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5953 # see comment about different semantics on the GNU ld section
5954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5958 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5961 cygwin* | mingw* | pw32*)
5962 # When not using gcc, we currently assume that we are using
5963 # Microsoft Visual C++.
5964 # hardcode_libdir_flag_spec is actually meaningless, as there is
5965 # no search path for DLLs.
5966 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5967 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5968 # Tell ltmain to make .lib files, not .a files.
5970 # Tell ltmain to make .dll files, not .so files.
5972 # FIXME: Setting linknames here is a bad hack.
5973 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5974 # The linker will automatically build a .lib file if we build a DLL.
5975 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5976 # FIXME: Should let the user specify the lib program.
5977 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5978 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5979 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5982 darwin* | rhapsody*)
5984 rhapsody* | darwin1.[[012]])
5985 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5988 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5989 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5991 case ${MACOSX_DEPLOYMENT_TARGET} in
5993 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5996 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6002 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6003 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6004 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6005 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6006 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6007 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6008 if test "$GCC" = yes ; then
6009 output_verbose_link_cmd='echo'
6010 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6011 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6012 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6013 _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}'
6014 _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}'
6016 case $cc_basename in
6018 output_verbose_link_cmd='echo'
6019 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6020 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6021 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6022 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6023 _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}'
6026 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6033 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6035 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6039 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6042 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6043 # support. Future versions do this automatically, but an explicit c++rt0.o
6044 # does not break anything, and helps significantly (at the cost of a little
6047 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6048 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6049 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6050 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6053 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6055 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6056 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6057 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6058 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6061 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6062 freebsd* | dragonfly*)
6063 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6064 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6065 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6066 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6070 if test "$GCC" = yes; then
6071 _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'
6073 _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'
6075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6076 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6077 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6079 # hardcode_minus_L: Not really in the search PATH,
6080 # but as the default location of the library.
6081 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6082 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6086 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6087 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6089 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6091 if test "$with_gnu_ld" = no; then
6092 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6093 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6095 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6096 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6098 # hardcode_minus_L: Not really in the search PATH,
6099 # but as the default location of the library.
6100 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6105 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6111 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6114 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6120 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6123 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6126 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6130 if test "$with_gnu_ld" = no; then
6131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6132 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6137 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6138 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6141 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6142 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6144 # hardcode_minus_L: Not really in the search PATH,
6145 # but as the default location of the library.
6146 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6152 irix5* | irix6* | nonstopux*)
6153 if test "$GCC" = yes; then
6154 _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'
6156 _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'
6157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6159 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6160 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6161 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6164 netbsd* | netbsdelf*-gnu)
6165 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6166 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6168 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6171 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6172 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6176 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6177 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6179 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6180 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6184 if test -f /usr/libexec/ld.so; then
6185 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6186 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6187 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6188 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6189 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6190 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6191 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6194 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6195 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6199 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6200 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6205 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6210 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6211 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6212 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6213 _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'
6214 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6218 if test "$GCC" = yes; then
6219 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6220 _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'
6222 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6223 _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'
6225 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6226 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6229 osf4* | osf5*) # as osf3* with the addition of -msym flag
6230 if test "$GCC" = yes; then
6231 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6232 _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'
6233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6235 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6236 _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'
6237 _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~
6238 $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'
6240 # Both c and cxx compiler support -rpath directly
6241 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6243 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6247 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6248 if test "$GCC" = yes; then
6250 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6251 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6252 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6255 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6256 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6257 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6259 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6260 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6262 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6264 # The compiler driver will combine and reorder linker options,
6265 # but understands `-z linker_flag'. GCC discards it without `$wl',
6266 # but is careful enough not to reorder.
6267 # Supported since Solaris 2.6 (maybe 2.5.1?)
6268 if test "$GCC" = yes; then
6269 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6271 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6275 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6279 if test "x$host_vendor" = xsequent; then
6280 # Use $CC to link under sequent, because it throws in some extra .o
6281 # files that make .init and .fini sections work.
6282 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6284 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6287 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6288 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6289 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6293 case $host_vendor in
6295 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6296 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6299 ## LD is ld it makes a PLAMLIB
6300 ## CC just makes a GrossModule.
6301 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6302 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6303 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6306 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6307 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6310 runpath_var='LD_RUN_PATH'
6311 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6315 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6316 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6317 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6321 if test -d /usr/nec; then
6322 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6323 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6324 runpath_var=LD_RUN_PATH
6325 hardcode_runpath_var=yes
6326 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6331 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6332 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6333 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6334 runpath_var='LD_RUN_PATH'
6336 if test "$GCC" = yes; then
6337 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6338 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6340 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6341 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6345 sysv5* | sco3.2v5* | sco5v6*)
6346 # Note: We can NOT use -z defs as we might desire, because we do not
6347 # link with -lc, and that would cause any symbols used from libc to
6348 # always be unresolved, which means just about no library would
6349 # ever link correctly. If we're not using GNU ld we use -z text
6350 # though, which does catch some bad symbols but isn't as heavy-handed
6352 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6353 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6354 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6355 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6356 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6357 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6358 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6359 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6360 runpath_var='LD_RUN_PATH'
6362 if test "$GCC" = yes; then
6363 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6366 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6367 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6372 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6374 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6378 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6383 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6384 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6387 # Do we need to explicitly link libc?
6389 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6391 # Assume -lc should be added
6392 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6394 if test "$enable_shared" = yes && test "$GCC" = yes; then
6395 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6397 # FIXME: we may have to deal with multi-command sequences.
6400 # Test whether the compiler implicitly links with -lc since on some
6401 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6402 # to ld, don't add -lc before -lgcc.
6403 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6405 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6407 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6410 libobjs=conftest.$ac_objext
6412 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6413 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6419 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6420 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6421 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6423 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6425 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6427 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6429 cat conftest.err 1>&5
6432 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6438 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6441 # _LT_AC_FILE_LTDLL_C
6442 # -------------------
6443 # Be careful that the start marker always follows a newline.
6444 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6445 # /* ltdll.c starts here */
6446 # #define WIN32_LEAN_AND_MEAN
6447 # #include <windows.h>
6448 # #undef WIN32_LEAN_AND_MEAN
6449 # #include <stdio.h>
6451 # #ifndef __CYGWIN__
6452 # # ifdef __CYGWIN32__
6453 # # define __CYGWIN__ __CYGWIN32__
6457 # #ifdef __cplusplus
6460 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6461 # #ifdef __cplusplus
6466 # #include <cygwin/cygwin_dll.h>
6467 # DECLARE_CYGWIN_DLL( DllMain );
6469 # HINSTANCE __hDllInstance_base;
6472 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6474 # __hDllInstance_base = hInst;
6477 # /* ltdll.c ends here */
6478 ])# _LT_AC_FILE_LTDLL_C
6481 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6482 # ---------------------------------
6483 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6487 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6488 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6489 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6490 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6491 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6492 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6493 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6495 # This is just to silence aclocal about the macro not being used
6496 ifelse([AC_DISABLE_FAST_INSTALL])
6498 AC_DEFUN([LT_AC_PROG_GCJ],
6499 [AC_CHECK_TOOL(GCJ, gcj, no)
6500 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6504 AC_DEFUN([LT_AC_PROG_RC],
6505 [AC_CHECK_TOOL(RC, windres, no)
6509 # Cheap backport of AS_EXECUTABLE_P and required macros
6510 # from Autoconf 2.59; we should not use $as_executable_p directly.
6514 m4_ifndef([_AS_TEST_PREPARE],
6515 [m4_defun([_AS_TEST_PREPARE],
6516 [if test -x / >/dev/null 2>&1; then
6517 as_executable_p='test -x'
6519 as_executable_p='test -f'
6521 ])])# _AS_TEST_PREPARE
6525 # Check whether a file is executable.
6526 m4_ifndef([AS_EXECUTABLE_P],
6527 [m4_defun([AS_EXECUTABLE_P],
6528 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
6529 $as_executable_p $1[]dnl
6530 ])])# AS_EXECUTABLE_P
6532 # NOTE: This macro has been submitted for inclusion into #
6533 # GNU Autoconf as AC_PROG_SED. When it is available in #
6534 # a released version of Autoconf we should remove this #
6535 # macro and use it instead. #
6538 # Check for a fully-functional sed program, that truncates
6539 # as few characters as possible. Prefer GNU sed if found.
6540 AC_DEFUN([LT_AC_PROG_SED],
6541 [AC_MSG_CHECKING([for a sed that does not truncate output])
6542 AC_CACHE_VAL(lt_cv_path_SED,
6543 [# Loop through the user's path and test for sed and gsed.
6544 # Then use that list of sed's as ones to test for truncation.
6545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6549 test -z "$as_dir" && as_dir=.
6550 for lt_ac_prog in sed gsed; do
6551 for ac_exec_ext in '' $ac_executable_extensions; do
6552 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6553 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6561 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6562 # along with /bin/sed that truncates output.
6563 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6564 test ! -f $lt_ac_sed && continue
6565 cat /dev/null > conftest.in
6567 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6568 # Check for GNU sed and select it if it is found.
6569 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6570 lt_cv_path_SED=$lt_ac_sed
6574 cat conftest.in conftest.in >conftest.tmp
6575 mv conftest.tmp conftest.in
6576 cp conftest.in conftest.nl
6578 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6579 cmp -s conftest.out conftest.nl || break
6580 # 10000 chars as input seems more than enough
6581 test $lt_ac_count -gt 10 && break
6582 lt_ac_count=`expr $lt_ac_count + 1`
6583 if test $lt_ac_count -gt $lt_ac_max; then
6584 lt_ac_max=$lt_ac_count
6585 lt_cv_path_SED=$lt_ac_sed
6592 AC_MSG_RESULT([$SED])
6595 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6597 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6599 # This program is free software; you can redistribute it and/or modify
6600 # it under the terms of the GNU General Public License as published by
6601 # the Free Software Foundation; either version 2 of the License, or
6602 # (at your option) any later version.
6604 # This program is distributed in the hope that it will be useful, but
6605 # WITHOUT ANY WARRANTY; without even the implied warranty of
6606 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6607 # General Public License for more details.
6609 # You should have received a copy of the GNU General Public License
6610 # along with this program; if not, write to the Free Software
6611 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6613 # As a special exception to the GNU General Public License, if you
6614 # distribute this file as part of a program that contains a
6615 # configuration script generated by Autoconf, you may include it under
6616 # the same distribution terms that you use for the rest of that program.
6618 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
6619 # ----------------------------------
6620 AC_DEFUN([PKG_PROG_PKG_CONFIG],
6621 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6622 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6623 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6624 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6625 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6627 if test -n "$PKG_CONFIG"; then
6628 _pkg_min_version=m4_default([$1], [0.9.0])
6629 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6630 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6631 AC_MSG_RESULT([yes])
6638 ])# PKG_PROG_PKG_CONFIG
6640 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6642 # Check to see whether a particular set of modules exists. Similar
6643 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
6646 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
6647 # this or PKG_CHECK_MODULES is called, or make sure to call
6648 # PKG_CHECK_EXISTS manually
6649 # --------------------------------------------------------------
6650 AC_DEFUN([PKG_CHECK_EXISTS],
6651 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6652 if test -n "$PKG_CONFIG" && \
6653 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6654 m4_ifval([$2], [$2], [:])
6655 m4_ifvaln([$3], [else
6660 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6661 # ---------------------------------------------
6662 m4_define([_PKG_CONFIG],
6663 [if test -n "$PKG_CONFIG"; then
6664 if test -n "$$1"; then
6667 PKG_CHECK_EXISTS([$3],
6668 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6676 # _PKG_SHORT_ERRORS_SUPPORTED
6677 # -----------------------------
6678 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6679 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6680 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6681 _pkg_short_errors_supported=yes
6683 _pkg_short_errors_supported=no
6685 ])# _PKG_SHORT_ERRORS_SUPPORTED
6688 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6689 # [ACTION-IF-NOT-FOUND])
6692 # Note that if there is a possibility the first call to
6693 # PKG_CHECK_MODULES might not happen, you should be sure to include an
6694 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6697 # --------------------------------------------------------------
6698 AC_DEFUN([PKG_CHECK_MODULES],
6699 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6700 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6701 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6704 AC_MSG_CHECKING([for $1])
6706 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6707 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
6709 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6710 and $1[]_LIBS to avoid the need to call pkg-config.
6711 See the pkg-config man page for more details.])
6713 if test $pkg_failed = yes; then
6714 _PKG_SHORT_ERRORS_SUPPORTED
6715 if test $_pkg_short_errors_supported = yes; then
6716 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6718 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6720 # Put the nasty error message in config.log where it belongs
6721 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6723 ifelse([$4], , [AC_MSG_ERROR(dnl
6724 [Package requirements ($2) were not met:
6728 Consider adjusting the PKG_CONFIG_PATH environment variable if you
6729 installed software in a non-standard prefix.
6733 [AC_MSG_RESULT([no])
6735 elif test $pkg_failed = untried; then
6736 ifelse([$4], , [AC_MSG_FAILURE(dnl
6737 [The pkg-config script could not be found or is too old. Make sure it
6738 is in your PATH or set the PKG_CONFIG environment variable to the full
6743 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6746 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6747 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6748 AC_MSG_RESULT([yes])
6749 ifelse([$3], , :, [$3])
6751 ])# PKG_CHECK_MODULES
6753 # Configure paths for SDL
6754 # Sam Lantinga 9/21/99
6755 # stolen from Manish Singh
6756 # stolen back from Frank Belew
6757 # stolen from Manish Singh
6758 # Shamelessly stolen from Owen Taylor
6760 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
6761 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
6763 AC_DEFUN([AM_PATH_SDL],
6765 dnl Get the cflags and libraries from the sdl-config script
6767 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
6768 sdl_prefix="$withval", sdl_prefix="")
6769 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
6770 sdl_exec_prefix="$withval", sdl_exec_prefix="")
6771 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
6772 , enable_sdltest=yes)
6774 if test x$sdl_exec_prefix != x ; then
6775 sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
6776 if test x${SDL_CONFIG+set} != xset ; then
6777 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
6780 if test x$sdl_prefix != x ; then
6781 sdl_args="$sdl_args --prefix=$sdl_prefix"
6782 if test x${SDL_CONFIG+set} != xset ; then
6783 SDL_CONFIG=$sdl_prefix/bin/sdl-config
6787 if test "x$prefix" != xNONE; then
6788 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
6790 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
6791 min_sdl_version=ifelse([$1], ,0.11.0,$1)
6792 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
6794 if test "$SDL_CONFIG" = "no" ; then
6797 SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
6798 SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
6800 sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
6801 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
6802 sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
6803 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
6804 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
6805 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
6806 if test "x$enable_sdltest" = "xyes" ; then
6807 ac_save_CFLAGS="$CFLAGS"
6808 ac_save_CXXFLAGS="$CXXFLAGS"
6809 ac_save_LIBS="$LIBS"
6810 CFLAGS="$CFLAGS $SDL_CFLAGS"
6811 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
6812 LIBS="$LIBS $SDL_LIBS"
6814 dnl Now check if the installed SDL is sufficiently new. (Also sanity
6815 dnl checks the results of sdl-config to some extent
6825 my_strdup (char *str)
6831 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
6832 strcpy (new_str, str);
6840 int main (int argc, char *argv[])
6842 int major, minor, micro;
6845 /* This hangs on some systems (?)
6846 system ("touch conf.sdltest");
6848 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
6850 /* HP/UX 9 (%@#!) writes to sscanf strings */
6851 tmp_version = my_strdup("$min_sdl_version");
6852 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
6853 printf("%s, bad version string\n", "$min_sdl_version");
6857 if (($sdl_major_version > major) ||
6858 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
6859 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
6865 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
6866 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
6867 printf("*** best to upgrade to the required version.\n");
6868 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
6869 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
6870 printf("*** config.cache before re-running configure\n");
6875 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
6876 CFLAGS="$ac_save_CFLAGS"
6877 CXXFLAGS="$ac_save_CXXFLAGS"
6878 LIBS="$ac_save_LIBS"
6881 if test "x$no_sdl" = x ; then
6883 ifelse([$2], , :, [$2])
6886 if test "$SDL_CONFIG" = "no" ; then
6887 echo "*** The sdl-config script installed by SDL could not be found"
6888 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
6889 echo "*** your path, or set the SDL_CONFIG environment variable to the"
6890 echo "*** full path to sdl-config."
6892 if test -f conf.sdltest ; then
6895 echo "*** Could not run SDL test program, checking why..."
6896 CFLAGS="$CFLAGS $SDL_CFLAGS"
6897 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
6898 LIBS="$LIBS $SDL_LIBS"
6903 int main(int argc, char *argv[])
6906 #define main K_and_R_C_main
6908 [ echo "*** The test program compiled, but did not run. This usually means"
6909 echo "*** that the run-time linker is not finding SDL or finding the wrong"
6910 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
6911 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6912 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6913 echo "*** is required on your system"
6915 echo "*** If you have an old version installed, it is best to remove it, although"
6916 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
6917 [ echo "*** The test program failed to compile or link. See the file config.log for the"
6918 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
6919 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
6920 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
6921 CFLAGS="$ac_save_CFLAGS"
6922 CXXFLAGS="$ac_save_CXXFLAGS"
6923 LIBS="$ac_save_LIBS"
6928 ifelse([$3], , :, [$3])
6930 AC_SUBST(SDL_CFLAGS)
6936 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
6937 # Generated from amversion.in; do not edit by hand.
6939 # This program is free software; you can redistribute it and/or modify
6940 # it under the terms of the GNU General Public License as published by
6941 # the Free Software Foundation; either version 2, or (at your option)
6942 # any later version.
6944 # This program is distributed in the hope that it will be useful,
6945 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6946 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6947 # GNU General Public License for more details.
6949 # You should have received a copy of the GNU General Public License
6950 # along with this program; if not, write to the Free Software
6951 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6953 # AM_AUTOMAKE_VERSION(VERSION)
6954 # ----------------------------
6955 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6956 # generated from the m4 files accompanying Automake X.Y.
6957 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
6959 # AM_SET_CURRENT_AUTOMAKE_VERSION
6960 # -------------------------------
6961 # Call AM_AUTOMAKE_VERSION so it can be traced.
6962 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6963 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6964 [AM_AUTOMAKE_VERSION([1.8.5])])
6968 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6970 # This program is free software; you can redistribute it and/or modify
6971 # it under the terms of the GNU General Public License as published by
6972 # the Free Software Foundation; either version 2, or (at your option)
6973 # any later version.
6975 # This program is distributed in the hope that it will be useful,
6976 # but WITHOUT ANY WARRANTY; without even the implied warranty of
6977 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6978 # GNU General Public License for more details.
6980 # You should have received a copy of the GNU General Public License
6981 # along with this program; if not, write to the Free Software
6982 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6985 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6986 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6987 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6989 # Of course, Automake must honor this variable whenever it calls a
6990 # tool from the auxiliary directory. The problem is that $srcdir (and
6991 # therefore $ac_aux_dir as well) can be either absolute or relative,
6992 # depending on how configure is run. This is pretty annoying, since
6993 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6994 # source directory, any form will work fine, but in subdirectories a
6995 # relative path needs to be adjusted first.
6997 # $ac_aux_dir/missing
6998 # fails when called from a subdirectory if $ac_aux_dir is relative
6999 # $top_srcdir/$ac_aux_dir/missing
7000 # fails if $ac_aux_dir is absolute,
7001 # fails when called from a subdirectory in a VPATH build with
7002 # a relative $ac_aux_dir
7004 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7005 # are both prefixed by $srcdir. In an in-source build this is usually
7006 # harmless because $srcdir is `.', but things will broke when you
7007 # start a VPATH build or use an absolute $srcdir.
7009 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7010 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
7011 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7012 # and then we would define $MISSING as
7013 # MISSING="\${SHELL} $am_aux_dir/missing"
7014 # This will work as long as MISSING is not called from configure, because
7015 # unfortunately $(top_srcdir) has no meaning in configure.
7016 # However there are other variables, like CC, which are often used in
7017 # configure, and could therefore not use this "fixed" $ac_aux_dir.
7019 # Another solution, used here, is to always expand $ac_aux_dir to an
7020 # absolute PATH. The drawback is that using absolute paths prevent a
7021 # configured tree to be moved without reconfiguration.
7023 AC_DEFUN([AM_AUX_DIR_EXPAND],
7024 [dnl Rely on autoconf to set up CDPATH properly.
7025 AC_PREREQ([2.50])dnl
7026 # expand $ac_aux_dir to an absolute path
7027 am_aux_dir=`cd $ac_aux_dir && pwd`
7030 # AM_CONDITIONAL -*- Autoconf -*-
7032 # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7034 # This program is free software; you can redistribute it and/or modify
7035 # it under the terms of the GNU General Public License as published by
7036 # the Free Software Foundation; either version 2, or (at your option)
7037 # any later version.
7039 # This program is distributed in the hope that it will be useful,
7040 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7041 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7042 # GNU General Public License for more details.
7044 # You should have received a copy of the GNU General Public License
7045 # along with this program; if not, write to the Free Software
7046 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7051 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
7052 # -------------------------------------
7053 # Define a conditional.
7054 AC_DEFUN([AM_CONDITIONAL],
7056 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
7057 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7059 AC_SUBST([$1_FALSE])
7067 AC_CONFIG_COMMANDS_PRE(
7068 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7069 AC_MSG_ERROR([conditional "$1" was never defined.
7070 Usually this means the macro was only invoked conditionally.])
7073 # serial 7 -*- Autoconf -*-
7075 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
7076 # Free Software Foundation, Inc.
7078 # This program is free software; you can redistribute it and/or modify
7079 # it under the terms of the GNU General Public License as published by
7080 # the Free Software Foundation; either version 2, or (at your option)
7081 # any later version.
7083 # This program is distributed in the hope that it will be useful,
7084 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7085 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7086 # GNU General Public License for more details.
7088 # You should have received a copy of the GNU General Public License
7089 # along with this program; if not, write to the Free Software
7090 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7094 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7095 # written in clear, in which case automake, when reading aclocal.m4,
7096 # will think it sees a *use*, and therefore will trigger all it's
7097 # C support machinery. Also note that it means that autoscan, seeing
7098 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7102 # _AM_DEPENDENCIES(NAME)
7103 # ----------------------
7104 # See how the compiler implements dependency checking.
7105 # NAME is "CC", "CXX", "GCJ", or "OBJC".
7106 # We try a few techniques and use that to set a single cache variable.
7108 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7109 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7110 # dependency, and given that the user is not expected to run this macro,
7111 # just rely on AC_PROG_CC.
7112 AC_DEFUN([_AM_DEPENDENCIES],
7113 [AC_REQUIRE([AM_SET_DEPDIR])dnl
7114 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7115 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
7116 AC_REQUIRE([AM_DEP_TRACK])dnl
7118 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
7119 [$1], CXX, [depcc="$CXX" am_compiler_list=],
7120 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7121 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
7122 [depcc="$$1" am_compiler_list=])
7124 AC_CACHE_CHECK([dependency style of $depcc],
7125 [am_cv_$1_dependencies_compiler_type],
7126 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7127 # We make a subdir and do the tests there. Otherwise we can end up
7128 # making bogus files that we don't know about and never remove. For
7129 # instance it was reported that on HP-UX the gcc test will end up
7130 # making a dummy file named `D' -- because `-MD' means `put the output
7133 # Copy depcomp to subdir because otherwise we won't find it if we're
7134 # using a relative directory.
7135 cp "$am_depcomp" conftest.dir
7137 # We will build objects and dependencies in a subdirectory because
7138 # it helps to detect inapplicable dependency modes. For instance
7139 # both Tru64's cc and ICC support -MD to output dependencies as a
7140 # side effect of compilation, but ICC will put the dependencies in
7141 # the current directory while Tru64 will put them in the object
7145 am_cv_$1_dependencies_compiler_type=none
7146 if test "$am_compiler_list" = ""; then
7147 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7149 for depmode in $am_compiler_list; do
7150 # Setup a source with many dependencies, because some compilers
7151 # like to wrap large dependency lists on column 80 (with \), and
7152 # we should not choose a depcomp mode which is confused by this.
7154 # We need to recreate these files for each test, as the compiler may
7155 # overwrite some of them when testing with obscure command lines.
7156 # This happens at least with the AIX C compiler.
7158 for i in 1 2 3 4 5 6; do
7159 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7160 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7161 # Solaris 8's {/usr,}/bin/sh.
7162 touch sub/conftst$i.h
7164 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7168 # after this tag, mechanisms are not by side-effect, so they'll
7169 # only be used when explicitly requested
7170 if test "x$enable_dependency_tracking" = xyes; then
7178 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7179 # mode. It turns out that the SunPro C++ compiler does not properly
7180 # handle `-M -o', and we need to detect this.
7181 if depmode=$depmode \
7182 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7183 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7184 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7185 >/dev/null 2>conftest.err &&
7186 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7187 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7188 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7189 # icc doesn't choke on unknown options, it will just issue warnings
7190 # or remarks (even with -Werror). So we grep stderr for any message
7191 # that says an option was ignored or not supported.
7192 # When given -MP, icc 7.0 and 7.1 complain thusly:
7193 # icc: Command line warning: ignoring option '-M'; no argument required
7194 # The diagnosis changed in icc 8.0:
7195 # icc: Command line remark: option '-MP' not supported
7196 if (grep 'ignoring option' conftest.err ||
7197 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7198 am_cv_$1_dependencies_compiler_type=$depmode
7207 am_cv_$1_dependencies_compiler_type=none
7210 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7211 AM_CONDITIONAL([am__fastdep$1], [
7212 test "x$enable_dependency_tracking" != xno \
7213 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7219 # Choose a directory name for dependency files.
7220 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7221 AC_DEFUN([AM_SET_DEPDIR],
7222 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7223 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7229 AC_DEFUN([AM_DEP_TRACK],
7230 [AC_ARG_ENABLE(dependency-tracking,
7231 [ --disable-dependency-tracking speeds up one-time build
7232 --enable-dependency-tracking do not reject slow dependency extractors])
7233 if test "x$enable_dependency_tracking" != xno; then
7234 am_depcomp="$ac_aux_dir/depcomp"
7237 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7238 AC_SUBST([AMDEPBACKSLASH])
7241 # Generate code to set up dependency tracking. -*- Autoconf -*-
7243 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
7245 # This program is free software; you can redistribute it and/or modify
7246 # it under the terms of the GNU General Public License as published by
7247 # the Free Software Foundation; either version 2, or (at your option)
7248 # any later version.
7250 # This program is distributed in the hope that it will be useful,
7251 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7252 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7253 # GNU General Public License for more details.
7255 # You should have received a copy of the GNU General Public License
7256 # along with this program; if not, write to the Free Software
7257 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7262 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7263 # ------------------------------
7264 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7265 [for mf in $CONFIG_FILES; do
7266 # Strip MF so we end up with the name of the file.
7267 mf=`echo "$mf" | sed -e 's/:.*$//'`
7268 # Check whether this is an Automake generated Makefile or not.
7269 # We used to match only the files named `Makefile.in', but
7270 # some people rename them; so instead we look at the file content.
7271 # Grep'ing the first line is not enough: some people post-process
7272 # each Makefile.in and add a new line on top of each file to say so.
7273 # So let's grep whole file.
7274 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7275 dirpart=`AS_DIRNAME("$mf")`
7279 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
7280 # Extract the definition of DEP_FILES from the Makefile without
7282 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7283 test -z "$DEPDIR" && continue
7284 # When using ansi2knr, U may be empty or an underscore; expand it
7285 U=`sed -n 's/^U = //p' < "$mf"`
7286 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
7287 # We invoke sed twice because it is the simplest approach to
7288 # changing $(DEPDIR) to its actual value in the expansion.
7289 for file in `sed -n '
7290 /^DEP_FILES = .*\\\\$/ {
7299 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
7300 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7301 # Make sure the directory exists.
7302 test -f "$dirpart/$file" && continue
7303 fdir=`AS_DIRNAME(["$file"])`
7304 AS_MKDIR_P([$dirpart/$fdir])
7305 # echo "creating $dirpart/$file"
7306 echo '# dummy' > "$dirpart/$file"
7309 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7312 # AM_OUTPUT_DEPENDENCY_COMMANDS
7313 # -----------------------------
7314 # This macro should only be invoked once -- use via AC_REQUIRE.
7316 # This code is only required when automatic dependency tracking
7317 # is enabled. FIXME. This creates each `.P' file that we will
7318 # need in order to bootstrap the dependency handling code.
7319 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7320 [AC_CONFIG_COMMANDS([depfiles],
7321 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7322 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7325 # Do all the work for Automake. -*- Autoconf -*-
7327 # This macro actually does too much some checks are only needed if
7328 # your package does certain things. But this isn't really a big deal.
7330 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
7331 # Free Software Foundation, Inc.
7333 # This program is free software; you can redistribute it and/or modify
7334 # it under the terms of the GNU General Public License as published by
7335 # the Free Software Foundation; either version 2, or (at your option)
7336 # any later version.
7338 # This program is distributed in the hope that it will be useful,
7339 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7340 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7341 # GNU General Public License for more details.
7343 # You should have received a copy of the GNU General Public License
7344 # along with this program; if not, write to the Free Software
7345 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7350 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7351 # AM_INIT_AUTOMAKE([OPTIONS])
7352 # -----------------------------------------------
7353 # The call with PACKAGE and VERSION arguments is the old style
7354 # call (pre autoconf-2.50), which is being phased out. PACKAGE
7355 # and VERSION should now be passed to AC_INIT and removed from
7356 # the call to AM_INIT_AUTOMAKE.
7357 # We support both call styles for the transition. After
7358 # the next Automake release, Autoconf can make the AC_INIT
7359 # arguments mandatory, and then we can depend on a new Autoconf
7360 # release and drop the old call support.
7361 AC_DEFUN([AM_INIT_AUTOMAKE],
7362 [AC_PREREQ([2.58])dnl
7363 dnl Autoconf wants to disallow AM_ names. We explicitly allow
7364 dnl the ones we care about.
7365 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7366 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7367 AC_REQUIRE([AC_PROG_INSTALL])dnl
7368 # test to see if srcdir already configured
7369 if test "`cd $srcdir && pwd`" != "`pwd`" &&
7370 test -f $srcdir/config.status; then
7371 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7374 # test whether we have cygpath
7375 if test -z "$CYGPATH_W"; then
7376 if (cygpath --version) >/dev/null 2>/dev/null; then
7377 CYGPATH_W='cygpath -w'
7382 AC_SUBST([CYGPATH_W])
7384 # Define the identity of the package.
7385 dnl Distinguish between old-style and new-style calls.
7387 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7388 AC_SUBST([PACKAGE], [$1])dnl
7389 AC_SUBST([VERSION], [$2])],
7390 [_AM_SET_OPTIONS([$1])dnl
7391 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7392 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7394 _AM_IF_OPTION([no-define],,
7395 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7396 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7398 # Some tools Automake needs.
7399 AC_REQUIRE([AM_SANITY_CHECK])dnl
7400 AC_REQUIRE([AC_ARG_PROGRAM])dnl
7401 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7402 AM_MISSING_PROG(AUTOCONF, autoconf)
7403 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7404 AM_MISSING_PROG(AUTOHEADER, autoheader)
7405 AM_MISSING_PROG(MAKEINFO, makeinfo)
7406 AM_MISSING_PROG(AMTAR, tar)
7408 AM_PROG_INSTALL_STRIP
7409 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7410 # We need awk for the "check" target. The system "awk" is bad on
7412 AC_REQUIRE([AC_PROG_AWK])dnl
7413 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7414 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7416 _AM_IF_OPTION([no-dependencies],,
7417 [AC_PROVIDE_IFELSE([AC_PROG_CC],
7418 [_AM_DEPENDENCIES(CC)],
7419 [define([AC_PROG_CC],
7420 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7421 AC_PROVIDE_IFELSE([AC_PROG_CXX],
7422 [_AM_DEPENDENCIES(CXX)],
7423 [define([AC_PROG_CXX],
7424 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7429 # When config.status generates a header, we must update the stamp-h file.
7430 # This file resides in the same directory as the config header
7431 # that is generated. The stamp files are numbered to have different names.
7433 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7434 # loop where config.status creates the headers, so we can generate
7435 # our stamp files there.
7436 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7437 [# Compute $1's index in $config_headers.
7439 for _am_header in $config_headers :; do
7444 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7447 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7449 # AM_PROG_INSTALL_SH
7450 # ------------------
7451 # Define $install_sh.
7453 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7455 # This program is free software; you can redistribute it and/or modify
7456 # it under the terms of the GNU General Public License as published by
7457 # the Free Software Foundation; either version 2, or (at your option)
7458 # any later version.
7460 # This program is distributed in the hope that it will be useful,
7461 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7463 # GNU General Public License for more details.
7465 # You should have received a copy of the GNU General Public License
7466 # along with this program; if not, write to the Free Software
7467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7470 AC_DEFUN([AM_PROG_INSTALL_SH],
7471 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7472 install_sh=${install_sh-"$am_aux_dir/install-sh"}
7473 AC_SUBST(install_sh)])
7476 # Copyright (C) 2003 Free Software Foundation, Inc.
7478 # This program is free software; you can redistribute it and/or modify
7479 # it under the terms of the GNU General Public License as published by
7480 # the Free Software Foundation; either version 2, or (at your option)
7481 # any later version.
7483 # This program is distributed in the hope that it will be useful,
7484 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7485 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7486 # GNU General Public License for more details.
7488 # You should have received a copy of the GNU General Public License
7489 # along with this program; if not, write to the Free Software
7490 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7495 # Check whether the underlying file-system supports filenames
7496 # with a leading dot. For instance MS-DOS doesn't.
7497 AC_DEFUN([AM_SET_LEADING_DOT],
7498 [rm -rf .tst 2>/dev/null
7499 mkdir .tst 2>/dev/null
7500 if test -d .tst; then
7505 rmdir .tst 2>/dev/null
7506 AC_SUBST([am__leading_dot])])
7508 # Add --enable-maintainer-mode option to configure.
7511 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
7512 # Free Software Foundation, Inc.
7514 # This program is free software; you can redistribute it and/or modify
7515 # it under the terms of the GNU General Public License as published by
7516 # the Free Software Foundation; either version 2, or (at your option)
7517 # any later version.
7519 # This program is distributed in the hope that it will be useful,
7520 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7521 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7522 # GNU General Public License for more details.
7524 # You should have received a copy of the GNU General Public License
7525 # along with this program; if not, write to the Free Software
7526 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7531 AC_DEFUN([AM_MAINTAINER_MODE],
7532 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7533 dnl maintainer-mode is disabled by default
7534 AC_ARG_ENABLE(maintainer-mode,
7535 [ --enable-maintainer-mode enable make rules and dependencies not useful
7536 (and sometimes confusing) to the casual installer],
7537 USE_MAINTAINER_MODE=$enableval,
7538 USE_MAINTAINER_MODE=no)
7539 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7540 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7541 MAINT=$MAINTAINER_MODE_TRUE
7546 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7548 # Check to see how 'make' treats includes. -*- Autoconf -*-
7550 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7552 # This program is free software; you can redistribute it and/or modify
7553 # it under the terms of the GNU General Public License as published by
7554 # the Free Software Foundation; either version 2, or (at your option)
7555 # any later version.
7557 # This program is distributed in the hope that it will be useful,
7558 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7559 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7560 # GNU General Public License for more details.
7562 # You should have received a copy of the GNU General Public License
7563 # along with this program; if not, write to the Free Software
7564 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7571 # Check to see how make treats includes.
7572 AC_DEFUN([AM_MAKE_INCLUDE],
7573 [am_make=${MAKE-make}
7574 cat > confinc << 'END'
7579 # If we don't find an include directive, just comment out the code.
7580 AC_MSG_CHECKING([for style of include used by $am_make])
7584 # First try GNU make style include.
7585 echo "include confinc" > confmf
7586 # We grep out `Entering directory' and `Leaving directory'
7587 # messages which can occur if `w' ends up in MAKEFLAGS.
7588 # In particular we don't look at `^make:' because GNU make might
7589 # be invoked under some other name (usually "gmake"), in which
7590 # case it prints its new name instead of `make'.
7591 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7596 # Now try BSD make style include.
7597 if test "$am__include" = "#"; then
7598 echo '.include "confinc"' > confmf
7599 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7600 am__include=.include
7605 AC_SUBST([am__include])
7606 AC_SUBST([am__quote])
7607 AC_MSG_RESULT([$_am_result])
7608 rm -f confinc confmf
7614 # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
7616 # This program is free software; you can redistribute it and/or modify
7617 # it under the terms of the GNU General Public License as published by
7618 # the Free Software Foundation; either version 2, or (at your option)
7619 # any later version.
7621 # This program is distributed in the hope that it will be useful,
7622 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7623 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7624 # GNU General Public License for more details.
7626 # You should have received a copy of the GNU General Public License
7627 # along with this program; if not, write to the Free Software
7628 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7633 # AM_MISSING_PROG(NAME, PROGRAM)
7634 # ------------------------------
7635 AC_DEFUN([AM_MISSING_PROG],
7636 [AC_REQUIRE([AM_MISSING_HAS_RUN])
7637 $1=${$1-"${am_missing_run}$2"}
7641 # AM_MISSING_HAS_RUN
7642 # ------------------
7643 # Define MISSING if not defined so far and test if it supports --run.
7644 # If it does, set am_missing_run to use it, otherwise, to nothing.
7645 AC_DEFUN([AM_MISSING_HAS_RUN],
7646 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7647 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7648 # Use eval to expand $SHELL
7649 if eval "$MISSING --run true"; then
7650 am_missing_run="$MISSING --run "
7653 AC_MSG_WARN([`missing' script is too old or missing])
7659 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7661 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
7663 # This program is free software; you can redistribute it and/or modify
7664 # it under the terms of the GNU General Public License as published by
7665 # the Free Software Foundation; either version 2, or (at your option)
7666 # any later version.
7668 # This program is distributed in the hope that it will be useful,
7669 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7670 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7671 # GNU General Public License for more details.
7673 # You should have received a copy of the GNU General Public License
7674 # along with this program; if not, write to the Free Software
7675 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7678 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7679 # created by `make install' are always world readable, even if the
7680 # installer happens to have an overly restrictive umask (e.g. 077).
7681 # This was a mistake. There are at least two reasons why we must not
7683 # - it causes special bits like SGID to be ignored,
7684 # - it may be too restrictive (some setups expect 775 directories).
7686 # Do not use -m 0755 and let people choose whatever they expect by
7689 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
7690 # Some implementations (such as Solaris 8's) are not thread-safe: if a
7691 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7692 # concurrently, both version can detect that a/ is missing, but only
7693 # one can create it and the other will error out. Consequently we
7694 # restrict ourselves to GNU make (using the --version option ensures
7696 AC_DEFUN([AM_PROG_MKDIR_P],
7697 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7698 # Keeping the `.' argument allows $(mkdir_p) to be used without
7699 # argument. Indeed, we sometimes output rules like
7700 # $(mkdir_p) $(somedir)
7701 # where $(somedir) is conditionally defined.
7702 # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
7703 # expensive solution, as it forces Make to start a sub-shell.)
7704 mkdir_p='mkdir -p -- .'
7706 # On NextStep and OpenStep, the `mkdir' command does not
7707 # recognize any option. It will interpret all options as
7708 # directories to create, and then abort because `.' already
7710 for d in ./-p ./--version;
7712 test -d $d && rmdir $d
7714 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7715 if test -f "$ac_aux_dir/mkinstalldirs"; then
7716 mkdir_p='$(mkinstalldirs)'
7718 mkdir_p='$(install_sh) -d'
7721 AC_SUBST([mkdir_p])])
7723 # Helper functions for option handling. -*- Autoconf -*-
7725 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
7727 # This program is free software; you can redistribute it and/or modify
7728 # it under the terms of the GNU General Public License as published by
7729 # the Free Software Foundation; either version 2, or (at your option)
7730 # any later version.
7732 # This program is distributed in the hope that it will be useful,
7733 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7734 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7735 # GNU General Public License for more details.
7737 # You should have received a copy of the GNU General Public License
7738 # along with this program; if not, write to the Free Software
7739 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7744 # _AM_MANGLE_OPTION(NAME)
7745 # -----------------------
7746 AC_DEFUN([_AM_MANGLE_OPTION],
7747 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7749 # _AM_SET_OPTION(NAME)
7750 # ------------------------------
7751 # Set option NAME. Presently that only means defining a flag for this option.
7752 AC_DEFUN([_AM_SET_OPTION],
7753 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7755 # _AM_SET_OPTIONS(OPTIONS)
7756 # ----------------------------------
7757 # OPTIONS is a space-separated list of Automake options.
7758 AC_DEFUN([_AM_SET_OPTIONS],
7759 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7761 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7762 # -------------------------------------------
7763 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7764 AC_DEFUN([_AM_IF_OPTION],
7765 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7768 # Check to make sure that the build environment is sane.
7771 # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
7773 # This program is free software; you can redistribute it and/or modify
7774 # it under the terms of the GNU General Public License as published by
7775 # the Free Software Foundation; either version 2, or (at your option)
7776 # any later version.
7778 # This program is distributed in the hope that it will be useful,
7779 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7780 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7781 # GNU General Public License for more details.
7783 # You should have received a copy of the GNU General Public License
7784 # along with this program; if not, write to the Free Software
7785 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7792 AC_DEFUN([AM_SANITY_CHECK],
7793 [AC_MSG_CHECKING([whether build environment is sane])
7796 echo timestamp > conftest.file
7797 # Do `set' in a subshell so we don't clobber the current shell's
7798 # arguments. Must try -L first in case configure is actually a
7799 # symlink; some systems play weird games with the mod time of symlinks
7800 # (eg FreeBSD returns the mod time of the symlink's containing
7803 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7804 if test "$[*]" = "X"; then
7806 set X `ls -t $srcdir/configure conftest.file`
7809 if test "$[*]" != "X $srcdir/configure conftest.file" \
7810 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7812 # If neither matched, then we have a broken ls. This can happen
7813 # if, for instance, CONFIG_SHELL is bash and it inherits a
7814 # broken ls alias from the environment. This has actually
7815 # happened. Such a system could not be considered "sane".
7816 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7817 alias in your environment])
7820 test "$[2]" = conftest.file
7826 AC_MSG_ERROR([newly created file is older than distributed files!
7827 Check your system clock])
7829 AC_MSG_RESULT(yes)])
7831 # AM_PROG_INSTALL_STRIP
7833 # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
7835 # This program is free software; you can redistribute it and/or modify
7836 # it under the terms of the GNU General Public License as published by
7837 # the Free Software Foundation; either version 2, or (at your option)
7838 # any later version.
7840 # This program is distributed in the hope that it will be useful,
7841 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7842 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7843 # GNU General Public License for more details.
7845 # You should have received a copy of the GNU General Public License
7846 # along with this program; if not, write to the Free Software
7847 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
7850 # One issue with vendor `install' (even GNU) is that you can't
7851 # specify the program used to strip binaries. This is especially
7852 # annoying in cross-compiling environments, where the build's strip
7853 # is unlikely to handle the host's binaries.
7854 # Fortunately install-sh will honor a STRIPPROG variable, so we
7855 # always use install-sh in `make install-strip', and initialize
7856 # STRIPPROG with the value of the STRIP variable (set by the user).
7857 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7858 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7859 # Installed binaries are usually stripped using `strip' when the user
7860 # run `make install-strip'. However `strip' might not be the right
7861 # tool to use in cross-compilation environments, therefore Automake
7862 # will honor the `STRIP' environment variable to overrule this program.
7863 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7864 if test "$cross_compiling" != no; then
7865 AC_CHECK_TOOL([STRIP], [strip], :)
7867 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7868 AC_SUBST([INSTALL_STRIP_PROGRAM])])