1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
3 ## Free Software Foundation, Inc.
4 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful, but
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ## General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 ## As a special exception to the GNU General Public License, if you
21 ## distribute this file as part of a program that contains a
22 ## configuration script generated by Autoconf, you may include it under
23 ## the same distribution terms that you use for the rest of that program.
25 # serial 47 AC_PROG_LIBTOOL
28 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
29 # -----------------------------------------------------------
30 # If this macro is not defined by Autoconf, define it here.
31 m4_ifdef([AC_PROVIDE_IFELSE],
33 [m4_define([AC_PROVIDE_IFELSE],
34 [m4_ifdef([AC_PROVIDE_$1],
40 AC_DEFUN([AC_PROG_LIBTOOL],
41 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
42 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
43 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
44 AC_PROVIDE_IFELSE([AC_PROG_CXX],
46 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
48 dnl And a similar setup for Fortran 77 support
49 AC_PROVIDE_IFELSE([AC_PROG_F77],
51 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
54 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
55 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
56 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
57 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
59 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
61 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
64 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
65 ifdef([A][M_PROG_GCJ],
66 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
67 ifdef([LT_AC_PROG_GCJ],
68 [define([LT_AC_PROG_GCJ],
69 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
75 AC_DEFUN([_AC_PROG_LIBTOOL],
76 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
77 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
78 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
79 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
81 # This can be used to rebuild libtool when needed
82 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
84 # Always use our own libtool.
85 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
88 # Prevent multiple expansion
89 define([AC_PROG_LIBTOOL], [])
95 AC_DEFUN([AC_LIBTOOL_SETUP],
97 AC_REQUIRE([AC_ENABLE_SHARED])dnl
98 AC_REQUIRE([AC_ENABLE_STATIC])dnl
99 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
100 AC_REQUIRE([AC_CANONICAL_HOST])dnl
101 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
102 AC_REQUIRE([AC_PROG_CC])dnl
103 AC_REQUIRE([AC_PROG_LD])dnl
104 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
105 AC_REQUIRE([AC_PROG_NM])dnl
106 AC_REQUIRE([LT_AC_PROG_SED])dnl
108 AC_REQUIRE([AC_PROG_LN_S])dnl
109 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
110 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
111 AC_REQUIRE([AC_OBJEXT])dnl
112 AC_REQUIRE([AC_EXEEXT])dnl
115 AC_LIBTOOL_SYS_MAX_CMD_LEN
116 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
119 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
120 _LT_AC_PROG_ECHO_BACKSLASH
124 # AIX sometimes has problems with the GCC collect2 program. For some
125 # reason, if we set the COLLECT_NAMES environment variable, the problems
126 # vanish in a puff of smoke.
127 if test "X${COLLECT_NAMES+set}" != Xset; then
134 # Sed substitution that helps us do robust quoting. It backslashifies
135 # metacharacters that are still active within double-quoted strings.
137 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
139 # Same as above, but do not quote variable references.
140 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
142 # Sed substitution to delay expansion of an escaped shell variable in a
143 # double_quote_subst'ed string.
144 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
146 # Sed substitution to avoid accidental globbing in evaled expressions
147 no_glob_subst='s/\*/\\\*/g'
153 default_ofile=libtool
156 # All known linkers require a `.a' archive for static linking (except M$VC,
157 # which needs '.lib').
159 ltmain="$ac_aux_dir/ltmain.sh"
160 ofile="$default_ofile"
161 with_gnu_ld="$lt_cv_prog_gnu_ld"
163 AC_CHECK_TOOL(RANLIB, ranlib, :)
164 AC_CHECK_TOOL(STRIP, strip, :)
169 # Set sane defaults for various variables
170 test -z "$AR" && AR=ar
171 test -z "$AR_FLAGS" && AR_FLAGS=cru
172 test -z "$AS" && AS=as
173 test -z "$CC" && CC=cc
174 test -z "$LTCC" && LTCC=$CC
175 test -z "$DLLTOOL" && DLLTOOL=dlltool
176 test -z "$LD" && LD=ld
177 test -z "$LN_S" && LN_S="ln -s"
178 test -z "$MAGIC_CMD" && MAGIC_CMD=file
179 test -z "$NM" && NM=nm
180 test -z "$SED" && SED=sed
181 test -z "$OBJDUMP" && OBJDUMP=objdump
182 test -z "$RANLIB" && RANLIB=:
183 test -z "$STRIP" && STRIP=:
184 test -z "$ac_objext" && ac_objext=o
186 # Determine commands to create old-style static archives.
187 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
188 old_postinstall_cmds='chmod 644 $oldlib'
189 old_postuninstall_cmds=
191 if test -n "$RANLIB"; then
194 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
197 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
200 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
203 # Only perform the check for file, if the check method requires it
204 case $deplibs_check_method in
206 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
212 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
213 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
214 enable_win32_dll=yes, enable_win32_dll=no)
216 AC_ARG_ENABLE([libtool-lock],
217 [AC_HELP_STRING([--disable-libtool-lock],
218 [avoid locking (might break parallel builds)])])
219 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
222 [AC_HELP_STRING([--with-pic],
223 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
224 [pic_mode="$withval"],
226 test -z "$pic_mode" && pic_mode=default
228 # Use C for the default configuration in the libtool script
230 AC_LIBTOOL_LANG_C_CONFIG
235 # _LT_AC_SYS_COMPILER
236 # -------------------
237 AC_DEFUN([_LT_AC_SYS_COMPILER],
238 [AC_REQUIRE([AC_PROG_CC])dnl
240 # If no C compiler was specified, use CC.
243 # Allow CC to be a program name with arguments.
246 ])# _LT_AC_SYS_COMPILER
249 # _LT_AC_SYS_LIBPATH_AIX
250 # ----------------------
251 # Links a minimal program and checks the executable
252 # for the system default hardcoded library path. In most cases,
253 # this is /usr/lib:/lib, but when the MPI compilers are used
254 # the location of the communication and MPI libs are included too.
255 # If we don't find anything, use the default library path according
256 # to the aix ld manual.
257 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
258 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
259 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
261 # Check for a 64-bit object if we didn't find anything.
262 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
264 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
265 ])# _LT_AC_SYS_LIBPATH_AIX
268 # _LT_AC_SHELL_INIT(ARG)
269 # ----------------------
270 AC_DEFUN([_LT_AC_SHELL_INIT],
271 [ifdef([AC_DIVERSION_NOTICE],
272 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
273 [AC_DIVERT_PUSH(NOTICE)])
276 ])# _LT_AC_SHELL_INIT
279 # _LT_AC_PROG_ECHO_BACKSLASH
280 # --------------------------
281 # Add some code to the start of the generated configure script which
282 # will find an echo command which doesn't interpret backslashes.
283 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
285 # Check that we are running under the correct shell.
286 SHELL=${CONFIG_SHELL-/bin/sh}
290 # Remove one level of quotation (which was required for Make).
291 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
296 if test "X[$]1" = X--no-reexec; then
297 # Discard the --no-reexec flag, and continue.
299 elif test "X[$]1" = X--fallback-echo; then
300 # Avoid inline document here, it may be left over
302 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
303 # Yippee, $echo works!
306 # Restart under the correct shell.
307 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
310 if test "X[$]1" = X--fallback-echo; then
311 # used as fallback echo
319 # The HP-UX ksh and POSIX shell print the target directory to stdout
321 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
323 if test -z "$ECHO"; then
324 if test "X${echo_test_string+set}" != Xset; then
325 # find a string as large as possible, as long as the shell can cope with it
326 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
327 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
328 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
329 echo_test_string="`eval $cmd`" &&
330 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
337 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
338 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
339 test "X$echo_testing_string" = "X$echo_test_string"; then
342 # The Solaris, AIX, and Digital Unix default echo programs unquote
343 # backslashes. This makes it impossible to quote backslashes using
344 # echo "$something" | sed 's/\\/\\\\/g'
346 # So, first we look for a working echo in the user's PATH.
348 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
349 for dir in $PATH /usr/ucb; do
351 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
352 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
353 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
354 test "X$echo_testing_string" = "X$echo_test_string"; then
361 if test "X$echo" = Xecho; then
362 # We didn't find a better echo, so look for alternatives.
363 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
364 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
365 test "X$echo_testing_string" = "X$echo_test_string"; then
366 # This shell has a builtin print -r that does the trick.
368 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
369 test "X$CONFIG_SHELL" != X/bin/ksh; then
370 # If we have ksh, try running configure again with it.
371 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
372 export ORIGINAL_CONFIG_SHELL
373 CONFIG_SHELL=/bin/ksh
375 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
379 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
380 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
381 test "X$echo_testing_string" = "X$echo_test_string"; then
384 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
385 test "X$echo_testing_string" = 'X\t' &&
386 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
387 test "X$echo_testing_string" = "X$echo_test_string"; then
388 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
390 SHELL="$CONFIG_SHELL"
392 echo="$CONFIG_SHELL [$]0 --fallback-echo"
393 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
394 test "X$echo_testing_string" = 'X\t' &&
395 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
396 test "X$echo_testing_string" = "X$echo_test_string"; then
397 echo="$CONFIG_SHELL [$]0 --fallback-echo"
399 # maybe with a smaller string...
402 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
403 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
410 if test "$prev" != 'sed 50q "[$]0"'; then
411 echo_test_string=`eval $prev`
412 export echo_test_string
413 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
415 # Oops. We lost completely, so just stick with echo.
424 # Copy echo and quote the copy suitably for passing to libtool from
425 # the Makefile, instead of quoting the original, which is used later.
427 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
428 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
432 ])])# _LT_AC_PROG_ECHO_BACKSLASH
437 AC_DEFUN([_LT_AC_LOCK],
438 [AC_ARG_ENABLE([libtool-lock],
439 [AC_HELP_STRING([--disable-libtool-lock],
440 [avoid locking (might break parallel builds)])])
441 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
443 # Some flags need to be propagated to the compiler or linker for good
447 # Find out which ABI we are using.
448 echo 'int i;' > conftest.$ac_ext
449 if AC_TRY_EVAL(ac_compile); then
450 case `/usr/bin/file conftest.$ac_objext` in
462 # Find out which ABI we are using.
463 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
464 if AC_TRY_EVAL(ac_compile); then
465 case `/usr/bin/file conftest.$ac_objext` in
480 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
481 # Find out which ABI we are using.
482 echo 'int i;' > conftest.$ac_ext
483 if AC_TRY_EVAL(ac_compile); then
484 case "`/usr/bin/file conftest.o`" in
488 LD="${LD-ld} -m elf_i386"
491 LD="${LD-ld} -m elf32ppclinux"
494 LD="${LD-ld} -m elf_s390"
497 LD="${LD-ld} -m elf32_sparc"
504 LD="${LD-ld} -m elf_x86_64"
506 ppc*-*linux*|powerpc*-*linux*)
507 LD="${LD-ld} -m elf64ppc"
510 LD="${LD-ld} -m elf64_s390"
513 LD="${LD-ld} -m elf64_sparc"
523 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
524 SAVE_CFLAGS="$CFLAGS"
525 CFLAGS="$CFLAGS -belf"
526 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
528 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
530 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
531 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
532 CFLAGS="$SAVE_CFLAGS"
535 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
536 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
537 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
538 AC_CHECK_TOOL(AS, as, false)
539 AC_CHECK_TOOL(OBJDUMP, objdump, false)
544 need_locks="$enable_libtool_lock"
549 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
550 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
551 # ----------------------------------------------------------------
552 # Check whether the given compiler option works
553 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
554 [AC_CACHE_CHECK([$1], [$2],
556 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
557 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
558 lt_compiler_flag="$3"
559 # Insert the option either (1) after the last *FLAGS variable, or
560 # (2) before a word containing "conftest.", or (3) at the end.
561 # Note that $ac_compile itself does not contain backslashes and begins
562 # with a dollar sign (not a hyphen), so the echo should work correctly.
563 # The option is referenced via a variable to avoid confusing sed.
564 lt_compile=`echo "$ac_compile" | sed \
565 -e 's:.*FLAGS\}\? :&$lt_compiler_flag :; t' \
566 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
567 -e 's:$: $lt_compiler_flag:'`
568 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
569 (eval "$lt_compile" 2>conftest.err)
571 cat conftest.err >&AS_MESSAGE_LOG_FD
572 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
573 if (exit $ac_status) && test -s "$ac_outfile"; then
574 # The compiler can only warn and ignore the option if not recognized
575 # So say no if there are warnings
576 if test ! -s conftest.err; then
583 if test x"[$]$2" = xyes; then
584 ifelse([$5], , :, [$5])
586 ifelse([$6], , :, [$6])
588 ])# AC_LIBTOOL_COMPILER_OPTION
591 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
592 # [ACTION-SUCCESS], [ACTION-FAILURE])
593 # ------------------------------------------------------------
594 # Check whether the given compiler option works
595 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
596 [AC_CACHE_CHECK([$1], [$2],
598 save_LDFLAGS="$LDFLAGS"
599 LDFLAGS="$LDFLAGS $3"
600 printf "$lt_simple_link_test_code" > conftest.$ac_ext
601 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
602 # The compiler can only warn and ignore the option if not recognized
603 # So say no if there are warnings
604 if test -s conftest.err; then
605 # Append any errors to the config.log.
606 cat conftest.err 1>&AS_MESSAGE_LOG_FD
612 LDFLAGS="$save_LDFLAGS"
615 if test x"[$]$2" = xyes; then
616 ifelse([$4], , :, [$4])
618 ifelse([$5], , :, [$5])
620 ])# AC_LIBTOOL_LINKER_OPTION
623 # AC_LIBTOOL_SYS_MAX_CMD_LEN
624 # --------------------------
625 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
626 [# find the maximum length of command line arguments
627 AC_MSG_CHECKING([the maximum length of command line arguments])
628 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
634 # On DJGPP, this test can blow up pretty badly due to problems in libc
635 # (any single argument exceeding 2000 bytes causes a buffer overrun
636 # during glob expansion). Even if it were fixed, the result of this
637 # check would be larger than it should be.
638 lt_cv_sys_max_cmd_len=12288; # 12K is about right
642 # Under GNU Hurd, this test is not required because there is
643 # no limit to the length of command line arguments.
644 # Libtool will interpret -1 as no limit whatsoever
645 lt_cv_sys_max_cmd_len=-1;
649 # On Win9x/ME, this test blows up -- it succeeds, but takes
650 # about 5 minutes as the teststring grows exponentially.
651 # Worse, since 9x/ME are not pre-emptively multitasking,
652 # you end up with a "frozen" computer, even though with patience
653 # the test eventually succeeds (with a max line length of 256k).
654 # Instead, let's just punt: use the minimum linelength reported by
655 # all of the supported platforms: 8192 (on NT/2K/XP).
656 lt_cv_sys_max_cmd_len=8192;
660 # If test is not a shell built-in, we'll probably end up computing a
661 # maximum length that is only half of the actual maximum length, but
663 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
664 = "XX$testring") >/dev/null 2>&1 &&
665 new_result=`expr "X$testring" : ".*" 2>&1` &&
666 lt_cv_sys_max_cmd_len=$new_result &&
667 test $i != 17 # 1/2 MB should be enough
670 testring=$testring$testring
673 # Add a significant safety factor because C++ compilers can tack on massive
674 # amounts of additional arguments before passing them to the linker.
675 # It appears as though 1/2 is a usable value.
676 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
680 if test -n $lt_cv_sys_max_cmd_len ; then
681 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
685 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
689 # --------------------
690 AC_DEFUN([_LT_AC_CHECK_DLFCN],
691 [AC_CHECK_HEADERS(dlfcn.h)dnl
692 ])# _LT_AC_CHECK_DLFCN
695 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
696 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
697 # ------------------------------------------------------------------
698 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
699 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
700 if test "$cross_compiling" = yes; then :
703 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
704 lt_status=$lt_dlunknown
705 cat > conftest.$ac_ext <<EOF
706 [#line __oline__ "configure"
707 #include "confdefs.h"
716 # define LT_DLGLOBAL RTLD_GLOBAL
719 # define LT_DLGLOBAL DL_GLOBAL
721 # define LT_DLGLOBAL 0
725 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
726 find out it does not work in some platform. */
727 #ifndef LT_DLLAZY_OR_NOW
729 # define LT_DLLAZY_OR_NOW RTLD_LAZY
732 # define LT_DLLAZY_OR_NOW DL_LAZY
735 # define LT_DLLAZY_OR_NOW RTLD_NOW
738 # define LT_DLLAZY_OR_NOW DL_NOW
740 # define LT_DLLAZY_OR_NOW 0
748 extern "C" void exit (int);
751 void fnord() { int i=42;}
754 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
755 int status = $lt_dlunknown;
759 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
760 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
761 /* dlclose (self); */
767 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
768 (./conftest; exit; ) 2>/dev/null
771 x$lt_dlno_uscore) $1 ;;
772 x$lt_dlneed_uscore) $2 ;;
773 x$lt_unknown|x*) $3 ;;
781 ])# _LT_AC_TRY_DLOPEN_SELF
784 # AC_LIBTOOL_DLOPEN_SELF
785 # -------------------
786 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
787 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
788 if test "x$enable_dlopen" != xyes; then
789 enable_dlopen=unknown
790 enable_dlopen_self=unknown
791 enable_dlopen_self_static=unknown
798 lt_cv_dlopen="load_add_on"
800 lt_cv_dlopen_self=yes
804 lt_cv_dlopen="LoadLibrary"
809 lt_cv_dlopen="dlopen"
814 AC_CHECK_FUNC([shl_load],
815 [lt_cv_dlopen="shl_load"],
816 [AC_CHECK_LIB([dld], [shl_load],
817 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
818 [AC_CHECK_FUNC([dlopen],
819 [lt_cv_dlopen="dlopen"],
820 [AC_CHECK_LIB([dl], [dlopen],
821 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
822 [AC_CHECK_LIB([svld], [dlopen],
823 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
824 [AC_CHECK_LIB([dld], [dld_link],
825 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
834 if test "x$lt_cv_dlopen" != xno; then
840 case $lt_cv_dlopen in
842 save_CPPFLAGS="$CPPFLAGS"
843 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
845 save_LDFLAGS="$LDFLAGS"
846 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
849 LIBS="$lt_cv_dlopen_libs $LIBS"
851 AC_CACHE_CHECK([whether a program can dlopen itself],
852 lt_cv_dlopen_self, [dnl
853 _LT_AC_TRY_DLOPEN_SELF(
854 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
855 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
858 if test "x$lt_cv_dlopen_self" = xyes; then
859 LDFLAGS="$LDFLAGS $link_static_flag"
860 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
861 lt_cv_dlopen_self_static, [dnl
862 _LT_AC_TRY_DLOPEN_SELF(
863 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
864 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
868 CPPFLAGS="$save_CPPFLAGS"
869 LDFLAGS="$save_LDFLAGS"
874 case $lt_cv_dlopen_self in
875 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
876 *) enable_dlopen_self=unknown ;;
879 case $lt_cv_dlopen_self_static in
880 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
881 *) enable_dlopen_self_static=unknown ;;
884 ])# AC_LIBTOOL_DLOPEN_SELF
887 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
888 # ---------------------------------
889 # Check to see if options -c and -o are simultaneously supported by compiler
890 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
891 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
892 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
893 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
894 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
895 $rm -r conftest 2>/dev/null
899 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
901 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
902 # that will create temporary files in the current directory regardless of
903 # the output directory. Thus, making CWD read-only will cause this test
904 # to fail, enabling locking or at least warning the user not to do parallel
908 lt_compiler_flag="-o out/conftest2.$ac_objext"
909 # Insert the option either (1) after the last *FLAGS variable, or
910 # (2) before a word containing "conftest.", or (3) at the end.
911 # Note that $ac_compile itself does not contain backslashes and begins
912 # with a dollar sign (not a hyphen), so the echo should work correctly.
913 lt_compile=`echo "$ac_compile" | sed \
914 -e 's:.*FLAGS\}\? :&$lt_compiler_flag :; t' \
915 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
916 -e 's:$: $lt_compiler_flag:'`
917 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
918 (eval "$lt_compile" 2>out/conftest.err)
920 cat out/conftest.err >&AS_MESSAGE_LOG_FD
921 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
922 if (exit $ac_status) && test -s out/conftest2.$ac_objext
924 # The compiler can only warn and ignore the option if not recognized
925 # So say no if there are warnings
926 if test ! -s out/conftest.err; then
927 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
937 ])# AC_LIBTOOL_PROG_CC_C_O
940 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
941 # -----------------------------------------
942 # Check to see if we can do hard links to lock some files if needed
943 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
944 [AC_REQUIRE([_LT_AC_LOCK])dnl
946 hard_links="nottested"
947 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
948 # do not overwrite the value of need_locks provided by the user
949 AC_MSG_CHECKING([if we can lock with hard links])
952 ln conftest.a conftest.b 2>/dev/null && hard_links=no
954 ln conftest.a conftest.b 2>&5 || hard_links=no
955 ln conftest.a conftest.b 2>/dev/null && hard_links=no
956 AC_MSG_RESULT([$hard_links])
957 if test "$hard_links" = no; then
958 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
964 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
969 AC_DEFUN([AC_LIBTOOL_OBJDIR],
970 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
971 [rm -f .libs 2>/dev/null
972 mkdir .libs 2>/dev/null
973 if test -d .libs; then
976 # MS-DOS does not allow filenames that begin with a dot.
979 rmdir .libs 2>/dev/null])
981 ])# AC_LIBTOOL_OBJDIR
984 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
985 # ----------------------------------------------
986 # Check hardcoding attributes.
987 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
988 [AC_MSG_CHECKING([how to hardcode library paths into programs])
989 _LT_AC_TAGVAR(hardcode_action, $1)=
990 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
991 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
993 # We can hardcode non-existant directories.
994 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
995 # If the only mechanism to avoid hardcoding is shlibpath_var, we
996 # have to relink, otherwise we might link with an installed library
997 # when we should be linking with a yet-to-be-installed one
998 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
999 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1000 # Linking always hardcodes the temporary library directory.
1001 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1003 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1004 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1007 # We cannot hardcode anything, or else we can only hardcode existing
1009 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1011 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1013 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1014 # Fast installation is not supported
1015 enable_fast_install=no
1016 elif test "$shlibpath_overrides_runpath" = yes ||
1017 test "$enable_shared" = no; then
1018 # Fast installation is not necessary
1019 enable_fast_install=needless
1021 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1024 # AC_LIBTOOL_SYS_LIB_STRIP
1025 # ------------------------
1026 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1029 AC_MSG_CHECKING([whether stripping libraries is possible])
1030 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1031 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1032 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1033 AC_MSG_RESULT([yes])
1037 ])# AC_LIBTOOL_SYS_LIB_STRIP
1040 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1041 # -----------------------------
1042 # PORTME Fill in your ld.so characteristics
1043 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1044 [AC_MSG_CHECKING([dynamic linker characteristics])
1046 libname_spec='lib$name'
1053 shlibpath_overrides_runpath=unknown
1055 dynamic_linker="$host_os ld.so"
1056 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1057 if test "$GCC" = yes; then
1058 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
1059 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1060 # if the path contains ";" then we assume it to be the separator
1061 # otherwise default to the standard path separator (i.e. ":") - it is
1062 # assumed that no part of a normal pathname contains ";" but that should
1063 # okay in the real world where ";" in dirpaths is itself problematic.
1064 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1066 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1069 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1071 need_lib_prefix=unknown
1072 hardcode_into_libs=no
1074 # when you set need_version to no, make sure it does not cause -set_version
1075 # flags to be left without arguments
1076 need_version=unknown
1081 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1082 shlibpath_var=LIBPATH
1084 # AIX 3 has no versioning support, so we append a major version to the name.
1085 soname_spec='${libname}${release}.so$major'
1092 hardcode_into_libs=yes
1093 if test "$host_cpu" = ia64; then
1094 # AIX 5 supports IA64
1095 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1096 shlibpath_var=LD_LIBRARY_PATH
1098 # With GCC up to 2.95.x, collect2 would create an import file
1099 # for dependence libraries. The import file would start with
1100 # the line `#! .'. This would cause the generated library to
1101 # depend on `.', always an invalid library. This was fixed in
1102 # development snapshots of GCC prior to 3.0.
1104 aix4 | aix4.[[01]] | aix4.[[01]].*)
1105 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1107 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1114 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1115 # soname into executable. Probably we can add versioning support to
1116 # collect2, so additional links can be useful in future.
1117 if test "$aix_use_runtimelinking" = yes; then
1118 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1119 # instead of lib<name>.a to let people know that these are not
1120 # typical AIX shared libraries.
1121 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1123 # We preserve .a as extension for shared libraries through AIX4.2
1124 # and later when we are not doing run time linking.
1125 library_names_spec='${libname}${release}.a $libname.a'
1126 soname_spec='${libname}${release}.so$major'
1128 shlibpath_var=LIBPATH
1133 library_names_spec='$libname.ixlibrary $libname.a'
1134 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1135 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'
1139 library_names_spec='${libname}.so'
1140 dynamic_linker="$host_os ld.so"
1141 shlibpath_var=LIBRARY_PATH
1147 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1148 soname_spec='${libname}${release}.so$major'
1149 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1150 shlibpath_var=LD_LIBRARY_PATH
1151 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1152 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1153 # the default ld.so.conf also contains /usr/contrib/lib and
1154 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1155 # libtool to hard-code these into programs
1158 cygwin* | mingw* | pw32*)
1159 version_type=windows
1163 case $GCC,$host_os in
1164 yes,cygwin* | yes,mingw* | yes,pw32*)
1165 library_names_spec='$libname.dll.a'
1166 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1167 postinstall_cmds='base_file=`basename \${file}`~
1168 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1169 dldir=$destdir/`dirname \$dlpath`~
1170 test -d \$dldir || mkdir -p \$dldir~
1171 $install_prog $dir/$dlname \$dldir/$dlname'
1172 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1173 dlpath=$dir/\$dldll~
1175 shlibpath_overrides_runpath=yes
1179 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1180 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1181 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1184 # MinGW DLLs use traditional 'lib' prefix
1185 soname_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1186 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
1187 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1188 # It is most probably a Windows format PATH printed by
1189 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1190 # path with ; separators, and with drive letters. We can handle the
1191 # drive letters (cygwin fileutils understands them), so leave them,
1192 # especially as we might pass files found there to a mingw objdump,
1193 # which wouldn't understand a cygwinified path. Ahh.
1194 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1196 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1200 # pw32 DLLs use 'pw' prefix rather than 'lib'
1201 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1207 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
1210 dynamic_linker='Win32 ld.exe'
1211 # FIXME: first we should search . and the directory the executable is in
1215 darwin* | rhapsody*)
1216 dynamic_linker="$host_os dyld"
1220 # FIXME: Relying on posixy $() will cause problems for
1221 # cross-compilation, but unfortunately the echo tests do not
1222 # yet detect zsh echo's removal of \ escapes.
1223 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
1224 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1225 shlibpath_overrides_runpath=yes
1226 shlibpath_var=DYLD_LIBRARY_PATH
1233 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1234 soname_spec='${libname}${release}.so$major'
1235 shlibpath_var=LD_LIBRARY_PATH
1243 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1244 version_type=freebsd-$objformat
1245 case $version_type in
1247 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1252 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1256 shlibpath_var=LD_LIBRARY_PATH
1259 shlibpath_overrides_runpath=yes
1261 freebsd3.[01]* | freebsdelf3.[01]*)
1262 shlibpath_overrides_runpath=yes
1263 hardcode_into_libs=yes
1266 shlibpath_overrides_runpath=no
1267 hardcode_into_libs=yes
1276 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1277 soname_spec='${libname}${release}.so$major'
1278 shlibpath_var=LD_LIBRARY_PATH
1279 hardcode_into_libs=yes
1282 hpux9* | hpux10* | hpux11*)
1283 # Give a soname corresponding to the major version so that dld.sl refuses to
1284 # link against other versions.
1288 if test "$host_cpu" = ia64; then
1289 hardcode_into_libs=yes
1290 dynamic_linker="$host_os dld.so"
1291 shlibpath_var=LD_LIBRARY_PATH
1292 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1293 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1294 soname_spec='${libname}${release}.so$major'
1295 if test "X$HPUX_IA64_MODE" = X32; then
1296 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1298 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1300 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1302 dynamic_linker="$host_os dld.sl"
1303 shlibpath_var=SHLIB_PATH
1304 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1305 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1306 soname_spec='${libname}${release}.sl$major'
1308 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1309 postinstall_cmds='chmod 555 $lib'
1312 irix5* | irix6* | nonstopux*)
1314 nonstopux*) version_type=nonstopux ;;
1315 *) version_type=irix ;;
1319 soname_spec='${libname}${release}.so$major'
1320 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1322 irix5* | nonstopux*)
1326 case $LD in # libtool.m4 will add one of these switches to LD
1327 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1328 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1329 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1330 *) libsuff= shlibsuff= libmagic=never-match;;
1334 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1335 shlibpath_overrides_runpath=no
1336 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1337 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1340 # No shared lib support for Linux oldld, aout, or coff.
1341 linux*oldld* | linux*aout* | linux*coff*)
1345 # This must be Linux ELF.
1350 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1351 soname_spec='${libname}${release}.so$major'
1352 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1353 shlibpath_var=LD_LIBRARY_PATH
1354 shlibpath_overrides_runpath=no
1355 # This implies no fast_install, which is unacceptable.
1356 # Some rework will be needed to allow for fast_install
1357 # before this can be enabled.
1358 hardcode_into_libs=yes
1360 # We used to test for /lib/ld.so.1 and disable shared libraries on
1361 # powerpc, because MkLinux only supported shared libraries with the
1362 # GNU dynamic linker. Since this was broken with cross compilers,
1363 # most powerpc-linux boxes support dynamic linking these days and
1364 # people can always --disable-shared, the test was removed, and we
1365 # assume the GNU/Linux dynamic linker is in use.
1366 dynamic_linker='GNU/Linux ld.so'
1373 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1374 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1375 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1376 dynamic_linker='NetBSD (a.out) ld.so'
1378 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1379 soname_spec='${libname}${release}.so$major'
1380 dynamic_linker='NetBSD ld.elf_so'
1382 shlibpath_var=LD_LIBRARY_PATH
1383 shlibpath_overrides_runpath=yes
1384 hardcode_into_libs=yes
1389 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1390 shlibpath_var=LD_LIBRARY_PATH
1391 shlibpath_overrides_runpath=yes
1398 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1399 soname_spec='${libname}${release}.so$major'
1400 shlibpath_var=LD_LIBRARY_PATH
1401 shlibpath_overrides_runpath=yes
1408 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1409 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1410 shlibpath_var=LD_LIBRARY_PATH
1411 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1413 openbsd2.[[89]] | openbsd2.[[89]].*)
1414 shlibpath_overrides_runpath=no
1417 shlibpath_overrides_runpath=yes
1421 shlibpath_overrides_runpath=yes
1426 libname_spec='$name'
1428 library_names_spec='$libname.dll $libname.a'
1429 dynamic_linker='OS/2 ld.exe'
1430 shlibpath_var=LIBPATH
1433 osf3* | osf4* | osf5*)
1437 soname_spec='${libname}${release}.so$major'
1438 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1439 shlibpath_var=LD_LIBRARY_PATH
1440 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1441 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1446 soname_spec='${libname}${release}.so$major'
1447 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1448 shlibpath_var=LD_LIBRARY_PATH
1455 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1456 soname_spec='${libname}${release}.so$major'
1457 shlibpath_var=LD_LIBRARY_PATH
1458 shlibpath_overrides_runpath=yes
1459 hardcode_into_libs=yes
1460 # ldd complains unless libraries are executable
1461 postinstall_cmds='chmod +x $lib'
1466 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1467 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1468 shlibpath_var=LD_LIBRARY_PATH
1469 shlibpath_overrides_runpath=yes
1470 if test "$with_gnu_ld" = yes; then
1476 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1478 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1479 soname_spec='${libname}${release}.so$major'
1480 shlibpath_var=LD_LIBRARY_PATH
1481 case $host_vendor in
1483 shlibpath_overrides_runpath=no
1485 export_dynamic_flag_spec='${wl}-Blargedynsym'
1486 runpath_var=LD_RUN_PATH
1494 shlibpath_overrides_runpath=no
1495 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1501 if test -d /usr/nec ;then
1503 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1504 soname_spec='$libname.so.$major'
1505 shlibpath_var=LD_LIBRARY_PATH
1511 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1512 soname_spec='${libname}${release}.so$major'
1513 shlibpath_var=LD_LIBRARY_PATH
1520 AC_MSG_RESULT([$dynamic_linker])
1521 test "$dynamic_linker" = no && can_build_shared=no
1522 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1527 AC_DEFUN([_LT_AC_TAGCONFIG],
1528 [AC_ARG_WITH([tags],
1529 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1530 [include additional configurations @<:@automatic@:>@])],
1531 [tagnames="$withval"])
1533 if test -f "$ltmain" && test -n "$tagnames"; then
1534 if test ! -f "${ofile}"; then
1535 AC_MSG_WARN([output file `$ofile' does not exist])
1538 if test -z "$LTCC"; then
1539 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1540 if test -z "$LTCC"; then
1541 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1543 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1547 # Extract list of available tagged configurations in $ofile.
1548 # Note that this assumes the entire list is on one line.
1549 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1551 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1552 for tagname in $tagnames; do
1554 # Check whether tagname contains only valid characters
1555 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1557 *) AC_MSG_ERROR([invalid tag name: $tagname])
1561 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1563 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1566 # Update the list of available tags.
1567 if test -n "$tagname"; then
1568 echo appending configuration tag \"$tagname\" to $ofile
1572 AC_LIBTOOL_LANG_CXX_CONFIG
1576 AC_LIBTOOL_LANG_F77_CONFIG
1580 AC_LIBTOOL_LANG_GCJ_CONFIG
1584 AC_LIBTOOL_LANG_RC_CONFIG
1588 AC_MSG_ERROR([Unsupported tag name: $tagname])
1592 # Append the new tag name to the list of available tags.
1593 available_tags="$available_tags $tagname"
1598 # Now substitute the updated list of available tags.
1599 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1600 mv "${ofile}T" "$ofile"
1604 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1607 ])# _LT_AC_TAGCONFIG
1612 # enable checks for dlopen support
1613 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1614 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1615 ])# AC_LIBTOOL_DLOPEN
1618 # AC_LIBTOOL_WIN32_DLL
1619 # --------------------
1620 # declare package support for building win32 dll's
1621 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1622 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1623 ])# AC_LIBTOOL_WIN32_DLL
1626 # AC_ENABLE_SHARED([DEFAULT])
1627 # ---------------------------
1628 # implement the --enable-shared flag
1629 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1630 AC_DEFUN([AC_ENABLE_SHARED],
1631 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1632 AC_ARG_ENABLE([shared],
1633 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1634 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1635 [p=${PACKAGE-default}
1637 yes) enable_shared=yes ;;
1638 no) enable_shared=no ;;
1641 # Look at the argument we got. We use all the common list separators.
1642 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1643 for pkg in $enableval; do
1645 if test "X$pkg" = "X$p"; then
1652 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1653 ])# AC_ENABLE_SHARED
1658 #- set the default shared flag to --disable-shared
1659 AC_DEFUN([AC_DISABLE_SHARED],
1660 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1661 AC_ENABLE_SHARED(no)
1662 ])# AC_DISABLE_SHARED
1665 # AC_ENABLE_STATIC([DEFAULT])
1666 # ---------------------------
1667 # implement the --enable-static flag
1668 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1669 AC_DEFUN([AC_ENABLE_STATIC],
1670 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1671 AC_ARG_ENABLE([static],
1672 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1673 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1674 [p=${PACKAGE-default}
1676 yes) enable_static=yes ;;
1677 no) enable_static=no ;;
1680 # Look at the argument we got. We use all the common list separators.
1681 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1682 for pkg in $enableval; do
1684 if test "X$pkg" = "X$p"; then
1691 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1692 ])# AC_ENABLE_STATIC
1697 # set the default static flag to --disable-static
1698 AC_DEFUN([AC_DISABLE_STATIC],
1699 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1700 AC_ENABLE_STATIC(no)
1701 ])# AC_DISABLE_STATIC
1704 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1705 # ---------------------------------
1706 # implement the --enable-fast-install flag
1707 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1708 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1709 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1710 AC_ARG_ENABLE([fast-install],
1711 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1712 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1713 [p=${PACKAGE-default}
1715 yes) enable_fast_install=yes ;;
1716 no) enable_fast_install=no ;;
1718 enable_fast_install=no
1719 # Look at the argument we got. We use all the common list separators.
1720 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1721 for pkg in $enableval; do
1723 if test "X$pkg" = "X$p"; then
1724 enable_fast_install=yes
1730 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1731 ])# AC_ENABLE_FAST_INSTALL
1734 # AC_DISABLE_FAST_INSTALL
1735 # -----------------------
1736 # set the default to --disable-fast-install
1737 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1738 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1739 AC_ENABLE_FAST_INSTALL(no)
1740 ])# AC_DISABLE_FAST_INSTALL
1743 # AC_LIBTOOL_PICMODE([MODE])
1744 # --------------------------
1745 # implement the --with-pic flag
1746 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1747 AC_DEFUN([AC_LIBTOOL_PICMODE],
1748 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1749 pic_mode=ifelse($#,1,$1,default)
1750 ])# AC_LIBTOOL_PICMODE
1755 # This is predefined starting with Autoconf 2.54, so this conditional
1756 # definition can be removed once we require Autoconf 2.54 or later.
1757 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1758 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1759 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1760 then ac_cv_prog_egrep='grep -E'
1761 else ac_cv_prog_egrep='egrep'
1763 EGREP=$ac_cv_prog_egrep
1768 # AC_PATH_TOOL_PREFIX
1769 # -------------------
1770 # find a file program which can recognise shared library
1771 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1772 [AC_REQUIRE([AC_PROG_EGREP])dnl
1773 AC_MSG_CHECKING([for $1])
1774 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1776 [[\\/*] | ?:[\\/]*])
1777 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1780 lt_save_MAGIC_CMD="$MAGIC_CMD"
1781 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1782 dnl $ac_dummy forces splitting on constant user-supplied paths.
1783 dnl POSIX.2 word splitting is done only on the output of word expansions,
1784 dnl not every word. This closes a longstanding sh security hole.
1785 ac_dummy="ifelse([$2], , $PATH, [$2])"
1786 for ac_dir in $ac_dummy; do
1788 test -z "$ac_dir" && ac_dir=.
1789 if test -f $ac_dir/$1; then
1790 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1791 if test -n "$file_magic_test_file"; then
1792 case $deplibs_check_method in
1794 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1795 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1796 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1797 $EGREP "$file_magic_regex" > /dev/null; then
1802 *** Warning: the command libtool uses to detect shared libraries,
1803 *** $file_magic_cmd, produces output that libtool cannot recognize.
1804 *** The result is that libtool may fail to recognize shared libraries
1805 *** as such. This will affect the creation of libtool libraries that
1806 *** depend on shared libraries, but programs linked with such libtool
1807 *** libraries will work regardless of this problem. Nevertheless, you
1808 *** may want to report the problem to your system manager and/or to
1809 *** bug-libtool@gnu.org
1819 MAGIC_CMD="$lt_save_MAGIC_CMD"
1822 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1823 if test -n "$MAGIC_CMD"; then
1824 AC_MSG_RESULT($MAGIC_CMD)
1828 ])# AC_PATH_TOOL_PREFIX
1833 # find a file program which can recognise a shared library
1834 AC_DEFUN([AC_PATH_MAGIC],
1835 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1836 if test -z "$lt_cv_path_MAGIC_CMD"; then
1837 if test -n "$ac_tool_prefix"; then
1838 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1848 # find the path to the GNU or non-GNU linker
1849 AC_DEFUN([AC_PROG_LD],
1850 [AC_ARG_WITH([gnu-ld],
1851 [AC_HELP_STRING([--with-gnu-ld],
1852 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1853 [test "$withval" = no || with_gnu_ld=yes],
1855 AC_REQUIRE([AC_PROG_CC])dnl
1856 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1857 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1859 if test "$GCC" = yes; then
1860 # Check if gcc -print-prog-name=ld gives a path.
1861 AC_MSG_CHECKING([for ld used by GCC])
1864 # gcc leaves a trailing carriage return which upsets mingw
1865 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1867 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1870 # Accept absolute paths.
1871 [[\\/]]* | ?:[[\\/]]*)
1872 re_direlt='/[[^/]][[^/]]*/\.\./'
1873 # Canonicalize the path of ld
1874 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1875 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1876 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1878 test -z "$LD" && LD="$ac_prog"
1881 # If it fails, then pretend we aren't using GCC.
1885 # If it is relative, then search for the first ld in PATH.
1889 elif test "$with_gnu_ld" = yes; then
1890 AC_MSG_CHECKING([for GNU ld])
1892 AC_MSG_CHECKING([for non-GNU ld])
1894 AC_CACHE_VAL(lt_cv_path_LD,
1895 [if test -z "$LD"; then
1896 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1897 for ac_dir in $PATH; do
1899 test -z "$ac_dir" && ac_dir=.
1900 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1901 lt_cv_path_LD="$ac_dir/$ac_prog"
1902 # Check to see if the program is GNU ld. I'd rather use --version,
1903 # but apparently some GNU ld's only accept -v.
1904 # Break only if it was the GNU/non-GNU ld that we prefer.
1905 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
1906 *GNU* | *'with BFD'*)
1907 test "$with_gnu_ld" != no && break
1910 test "$with_gnu_ld" != yes && break
1917 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1920 if test -n "$LD"; then
1925 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1932 AC_DEFUN([AC_PROG_LD_GNU],
1933 [AC_REQUIRE([AC_PROG_EGREP])dnl
1934 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1935 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1936 if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
1937 lt_cv_prog_gnu_ld=yes
1939 lt_cv_prog_gnu_ld=no
1941 with_gnu_ld=$lt_cv_prog_gnu_ld
1945 # AC_PROG_LD_RELOAD_FLAG
1946 # ----------------------
1947 # find reload flag for linker
1948 # -- PORTME Some linkers may need a different reload flag.
1949 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
1950 [AC_CACHE_CHECK([for $LD option to reload object files],
1951 lt_cv_ld_reload_flag,
1952 [lt_cv_ld_reload_flag='-r'])
1953 reload_flag=$lt_cv_ld_reload_flag
1954 case $reload_flag in
1956 *) reload_flag=" $reload_flag" ;;
1958 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1959 ])# AC_PROG_LD_RELOAD_FLAG
1962 # AC_DEPLIBS_CHECK_METHOD
1963 # -----------------------
1964 # how to check for library dependencies
1965 # -- PORTME fill in with the dynamic library characteristics
1966 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1967 [AC_CACHE_CHECK([how to recognise dependent libraries],
1968 lt_cv_deplibs_check_method,
1969 [lt_cv_file_magic_cmd='$MAGIC_CMD'
1970 lt_cv_file_magic_test_file=
1971 lt_cv_deplibs_check_method='unknown'
1972 # Need to set the preceding variable on all platforms that support
1973 # interlibrary dependencies.
1974 # 'none' -- dependencies not supported.
1975 # `unknown' -- same as none, but documents that we really don't know.
1976 # 'pass_all' -- all dependencies passed with no checks.
1977 # 'test_compile' -- check by making test program.
1978 # 'file_magic [[regex]]' -- check by looking for files in library path
1979 # which responds to the $file_magic_cmd with a given extended regex.
1980 # If you have `file' or equivalent on your system and you're not sure
1981 # whether `pass_all' will *always* work, you probably want this one.
1985 lt_cv_deplibs_check_method=pass_all
1989 lt_cv_deplibs_check_method=pass_all
1993 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
1994 lt_cv_file_magic_cmd='/usr/bin/file -L'
1995 lt_cv_file_magic_test_file=/shlib/libc.so
1998 cygwin* | mingw* | pw32*)
1999 # win32_libid is a shell function defined in ltmain.sh
2000 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2001 lt_cv_file_magic_cmd='win32_libid'
2004 darwin* | rhapsody*)
2005 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2006 lt_cv_file_magic_cmd='/usr/bin/file -L'
2008 rhapsody* | darwin1.[[012]])
2009 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2012 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2018 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2021 # Not sure whether the presence of OpenBSD here was a mistake.
2022 # Let's accept both of them until this is cleared up.
2023 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2024 lt_cv_file_magic_cmd=/usr/bin/file
2025 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2029 lt_cv_deplibs_check_method=pass_all
2034 lt_cv_deplibs_check_method=pass_all
2037 hpux10.20* | hpux11*)
2038 lt_cv_file_magic_cmd=/usr/bin/file
2039 if test "$host_cpu" = ia64; then
2040 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2041 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2043 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2044 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2048 irix5* | irix6* | nonstopux*)
2050 irix5* | nonstopux*)
2051 # this will be overridden with pass_all, but let us keep it just in case
2052 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2056 *-32|*"-32 ") libmagic=32-bit;;
2057 *-n32|*"-n32 ") libmagic=N32;;
2058 *-64|*"-64 ") libmagic=64-bit;;
2059 *) libmagic=never-match;;
2061 # this will be overridden with pass_all, but let us keep it just in case
2062 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2065 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2066 lt_cv_deplibs_check_method=pass_all
2069 # This must be Linux ELF.
2072 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2073 lt_cv_deplibs_check_method=pass_all ;;
2075 # glibc up to 2.1.1 does not perform some relocations on ARM
2076 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2078 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2082 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2083 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2085 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2090 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2091 lt_cv_file_magic_cmd=/usr/bin/file
2092 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2096 lt_cv_deplibs_check_method=unknown
2100 lt_cv_file_magic_cmd=/usr/bin/file
2101 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2102 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2103 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2105 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2109 osf3* | osf4* | osf5*)
2110 # this will be overridden with pass_all, but let us keep it just in case
2111 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2112 lt_cv_file_magic_test_file=/shlib/libc.so
2113 lt_cv_deplibs_check_method=pass_all
2117 lt_cv_deplibs_check_method=pass_all
2121 lt_cv_deplibs_check_method=pass_all
2122 lt_cv_file_magic_test_file=/lib/libc.so
2125 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2126 case $host_vendor in
2128 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]]'
2129 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2132 lt_cv_deplibs_check_method=pass_all
2135 lt_cv_file_magic_cmd='/bin/file'
2136 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2139 lt_cv_file_magic_cmd='/bin/file'
2140 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2141 lt_cv_file_magic_test_file=/lib/libc.so
2144 lt_cv_deplibs_check_method=pass_all
2149 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2150 lt_cv_deplibs_check_method=pass_all
2154 file_magic_cmd=$lt_cv_file_magic_cmd
2155 deplibs_check_method=$lt_cv_deplibs_check_method
2156 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2157 ])# AC_DEPLIBS_CHECK_METHOD
2162 # find the path to a BSD-compatible name lister
2163 AC_DEFUN([AC_PROG_NM],
2164 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2165 [if test -n "$NM"; then
2166 # Let the user override the test.
2169 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2170 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2172 test -z "$ac_dir" && ac_dir=.
2173 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2174 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2175 # Check to see if the nm accepts a BSD-compat flag.
2176 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2177 # nm: unknown option "B" ignored
2178 # Tru64's nm complains that /dev/null is an invalid object file
2179 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2180 */dev/null* | *'Invalid file or object type'*)
2181 lt_cv_path_NM="$tmp_nm -B"
2185 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2187 lt_cv_path_NM="$tmp_nm -p"
2191 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2192 continue # so that we can try to find one that supports BSD flags
2199 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2207 # check for math library
2208 AC_DEFUN([AC_CHECK_LIBM],
2209 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2212 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2213 # These system don't have libm
2216 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2217 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2220 AC_CHECK_LIB(m, main, LIBM="-lm")
2226 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2227 # -----------------------------------
2228 # sets LIBLTDL to the link flags for the libltdl convenience library and
2229 # LTDLINCL to the include flags for the libltdl header and adds
2230 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2231 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2232 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2233 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2234 # '${top_srcdir}/' (note the single quotes!). If your package is not
2235 # flat and you're not using automake, define top_builddir and
2236 # top_srcdir appropriately in the Makefiles.
2237 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2238 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2239 case $enable_ltdl_convenience in
2240 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2241 "") enable_ltdl_convenience=yes
2242 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2244 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2245 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2246 # For backwards non-gettext consistent compatibility...
2248 ])# AC_LIBLTDL_CONVENIENCE
2251 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2252 # -----------------------------------
2253 # sets LIBLTDL to the link flags for the libltdl installable library and
2254 # LTDLINCL to the include flags for the libltdl header and adds
2255 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2256 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2257 # DIRECTORY is not provided and an installed libltdl is not found, it is
2258 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2259 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2260 # quotes!). If your package is not flat and you're not using automake,
2261 # define top_builddir and top_srcdir appropriately in the Makefiles.
2262 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2263 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2264 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2265 AC_CHECK_LIB(ltdl, main,
2266 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2267 [if test x"$enable_ltdl_install" = xno; then
2268 AC_MSG_WARN([libltdl not installed, but installation disabled])
2270 enable_ltdl_install=yes
2273 if test x"$enable_ltdl_install" = x"yes"; then
2274 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2275 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2276 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2278 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2282 # For backwards non-gettext consistent compatibility...
2284 ])# AC_LIBLTDL_INSTALLABLE
2289 # enable support for C++ libraries
2290 AC_DEFUN([AC_LIBTOOL_CXX],
2291 [AC_REQUIRE([_LT_AC_LANG_CXX])
2297 AC_DEFUN([_LT_AC_LANG_CXX],
2298 [AC_REQUIRE([AC_PROG_CXX])
2299 AC_REQUIRE([AC_PROG_CXXCPP])
2300 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
2306 # enable support for Fortran 77 libraries
2307 AC_DEFUN([AC_LIBTOOL_F77],
2308 [AC_REQUIRE([_LT_AC_LANG_F77])
2314 AC_DEFUN([_LT_AC_LANG_F77],
2315 [AC_REQUIRE([AC_PROG_F77])
2316 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
2322 # enable support for GCJ libraries
2323 AC_DEFUN([AC_LIBTOOL_GCJ],
2324 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2330 AC_DEFUN([_LT_AC_LANG_GCJ],
2331 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2332 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2333 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2334 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2335 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2336 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2337 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
2343 # enable support for Windows resource files
2344 AC_DEFUN([AC_LIBTOOL_RC],
2345 [AC_REQUIRE([AC_PROG_RC])
2346 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
2350 # AC_LIBTOOL_LANG_C_CONFIG
2351 # ------------------------
2352 # Ensure that the configuration vars for the C compiler are
2353 # suitably defined. Those variables are subsequently used by
2354 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2355 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2356 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2360 # Source file extension for C test sources.
2363 # Object file extension for compiled C test sources.
2365 _LT_AC_TAGVAR(objext, $1)=$objext
2367 # Code to be used in simple compile tests
2368 lt_simple_compile_test_code="int some_variable = 0;\n"
2370 # Code to be used in simple link tests
2371 lt_simple_link_test_code='int main(){return(0);}\n'
2376 # Check for any special shared library compilation flags.
2378 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2379 if test "$GCC" = no; then
2382 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2386 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2387 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2388 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2390 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2391 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2397 # Check to make sure the static flag actually works.
2399 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2400 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2401 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2403 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2407 ## There is no encapsulation within the following macros, do not change
2408 ## the running order or otherwise move them around unless you know exactly
2409 ## what you are doing...
2410 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2411 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2412 AC_LIBTOOL_PROG_CC_C_O($1)
2413 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2414 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2415 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2416 AC_LIBTOOL_SYS_LIB_STRIP
2417 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2418 AC_LIBTOOL_DLOPEN_SELF($1)
2420 # Report which librarie types wil actually be built
2421 AC_MSG_CHECKING([if libtool supports shared libraries])
2422 AC_MSG_RESULT([$can_build_shared])
2424 AC_MSG_CHECKING([whether to build shared libraries])
2425 test "$can_build_shared" = "no" && enable_shared=no
2427 # On AIX, shared libraries and static libraries use the same namespace, and
2428 # are all built from PIC.
2431 test "$enable_shared" = yes && enable_static=no
2432 if test -n "$RANLIB"; then
2433 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2434 postinstall_cmds='$RANLIB $lib'
2439 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2440 test "$enable_shared" = yes && enable_static=no
2444 AC_MSG_RESULT([$enable_shared])
2446 AC_MSG_CHECKING([whether to build static libraries])
2447 # Make sure either enable_shared or enable_static is yes.
2448 test "$enable_shared" = yes || enable_static=yes
2449 AC_MSG_RESULT([$enable_static])
2451 AC_LIBTOOL_CONFIG($1)
2455 ])# AC_LIBTOOL_LANG_C_CONFIG
2458 # AC_LIBTOOL_LANG_CXX_CONFIG
2459 # --------------------------
2460 # Ensure that the configuration vars for the C compiler are
2461 # suitably defined. Those variables are subsequently used by
2462 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2463 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2464 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2466 AC_REQUIRE([AC_PROG_CXX])
2467 AC_REQUIRE([AC_PROG_CXXCPP])
2469 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2470 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2471 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2472 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2473 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2474 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2475 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2476 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2477 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2478 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2479 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2480 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2481 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2482 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2484 # Dependencies to place before and after the object being linked:
2485 _LT_AC_TAGVAR(predep_objects, $1)=
2486 _LT_AC_TAGVAR(postdep_objects, $1)=
2487 _LT_AC_TAGVAR(predeps, $1)=
2488 _LT_AC_TAGVAR(postdeps, $1)=
2489 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2491 # Source file extension for C test sources.
2494 # Object file extension for compiled C test sources.
2496 _LT_AC_TAGVAR(objext, $1)=$objext
2498 # Code to be used in simple compile tests
2499 lt_simple_compile_test_code="int some_variable = 0;\n"
2501 # Code to be used in simple link tests
2502 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2504 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2507 # Allow CC to be a program name with arguments.
2512 _LT_AC_TAGVAR(compiler, $1)=$CC
2513 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2515 # We don't want -fno-exception wen compiling C++ code, so set the
2516 # no_builtin_flag separately
2517 if test "$GXX" = yes; then
2518 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2520 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2523 if test "$GXX" = yes; then
2524 # Set up default GNU C++ configuration
2526 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2527 # archiving commands below assume that GNU ld is being used.
2528 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2529 grep 'GNU ld' > /dev/null; then
2532 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2533 _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'
2535 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2536 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2538 # If archive_cmds runs LD, not CC, wlarc should be empty
2539 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2540 # investigate it a little bit more. (MM)
2543 # ancient GNU ld didn't support --whole-archive et. al.
2544 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2545 grep 'no-whole-archive' > /dev/null; then
2546 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2548 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2554 # A generic and very simple default shared library creation
2555 # command for GNU C++ for the case where it uses the native
2556 # linker, instead of GNU ld. If possible, this setting should
2557 # overridden to take advantage of the native linker features on
2558 # the platform it is being used on.
2559 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2562 # Commands to make compiler produce verbose output that lists
2563 # what "hidden" libraries, object files and flags are used when
2564 # linking a shared library.
2565 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2573 # PORTME: fill in a description of your system's C++ link characteristics
2574 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2575 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2578 # FIXME: insert proper C++ library support
2579 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2582 if test "$host_cpu" = ia64; then
2583 # On IA64, the linker does run time linking by default, so we don't
2584 # have to do anything special.
2585 aix_use_runtimelinking=no
2586 exp_sym_flag='-Bexport'
2589 aix_use_runtimelinking=no
2591 # Test if we are trying to use run time linking or normal
2592 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2593 # need to do runtime linking.
2594 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2595 for ld_flag in $LDFLAGS; do
2598 aix_use_runtimelinking=yes
2605 exp_sym_flag='-bexport'
2606 no_entry_flag='-bnoentry'
2609 # When large executables or shared objects are built, AIX ld can
2610 # have problems creating the table of contents. If linking a library
2611 # or program results in "error TOC overflow" add -mminimal-toc to
2612 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2613 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2615 _LT_AC_TAGVAR(archive_cmds, $1)=''
2616 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2617 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2618 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2620 if test "$GXX" = yes; then
2621 case $host_os in aix4.[012]|aix4.[012].*)
2622 # We only want to do this on AIX 4.2 and lower, the check
2623 # below for broken collect2 doesn't work under 4.3+
2624 collect2name=`${CC} -print-prog-name=collect2`
2625 if test -f "$collect2name" && \
2626 strings "$collect2name" | grep resolve_lib_name >/dev/null
2628 # We have reworked collect2
2629 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2631 # We have old collect2
2632 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2633 # It fails to find uninstalled libraries when the uninstalled
2634 # path is not listed in the libpath. Setting hardcode_minus_L
2635 # to unsupported forces relinking
2636 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2637 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2638 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2641 shared_flag='-shared'
2644 if test "$host_cpu" = ia64; then
2645 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2646 # chokes on -Wl,-G. The following line is correct:
2649 if test "$aix_use_runtimelinking" = yes; then
2650 shared_flag='${wl}-G'
2652 shared_flag='${wl}-bM:SRE'
2657 # It seems that -bexpall does not export symbols beginning with
2658 # underscore (_), so it is better to generate a list of symbols to export.
2659 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2660 if test "$aix_use_runtimelinking" = yes; then
2661 # Warning - without using the other runtime loading flags (-brtl),
2662 # -berok will link without error, but may produce a broken library.
2663 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2664 # Determine the default libpath from the value encoded in an empty executable.
2665 _LT_AC_SYS_LIBPATH_AIX
2666 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2668 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2670 if test "$host_cpu" = ia64; then
2671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2672 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2673 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2675 # Determine the default libpath from the value encoded in an empty executable.
2676 _LT_AC_SYS_LIBPATH_AIX
2677 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2678 # Warning - without using the other run time loading flags,
2679 # -berok will link without error, but may produce a broken library.
2680 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2681 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2682 # -bexpall does not export symbols beginning with underscore (_)
2683 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2684 # Exported symbols can be pulled into shared objects from archives
2685 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2686 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2687 # This is similar to how AIX traditionally builds it's shared libraries.
2688 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2691 postinstall_cmds='dlpath=`sh 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2692 dldir=$destdir/`dirname \$dlpath`~
2693 test -d \$dldir || mkdir -p \$dldir~
2694 $install_prog .libs/$dlname \$dldir/$dlname'
2695 postuninstall_cmds='dldll=`sh 2>&1 -c '\''. $file; echo \$dlname'\''`~
2696 dlpath=$dir/\$dldll~
2698 shlibpath_overrides_runpath=yes
2701 case $cc_basename in
2703 # FIXME: insert proper C++ library support
2704 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2709 cygwin* | mingw* | pw32*)
2710 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2711 # as there is no search path for DLLs.
2712 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2713 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2714 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2715 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2717 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2718 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2719 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
2721 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2726 case $cc_basename in
2728 # FIXME: insert proper C++ library support
2729 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2732 # Green Hills C++ Compiler
2733 # FIXME: insert proper C++ library support
2734 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2737 # FIXME: insert proper C++ library support
2738 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2743 # C++ shared libraries reported to be fairly broken before switch to ELF
2744 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2747 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2750 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2752 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2757 if test $with_gnu_ld = no; then
2758 if test "$host_cpu" = ia64; then
2759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2762 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2763 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2766 if test "$host_cpu" = ia64; then
2767 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2768 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2770 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2772 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2773 # but as the default
2774 # location of the library.
2776 case $cc_basename in
2778 # FIXME: insert proper C++ library support
2779 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2784 _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'
2787 if test "$host_cpu" = ia64; then
2788 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2790 _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'
2794 # Commands to make compiler produce verbose output that lists
2795 # what "hidden" libraries, object files and flags are used when
2796 # linking a shared library.
2798 # There doesn't appear to be a way to prevent this compiler from
2799 # explicitly linking system object files so we need to strip them
2800 # from the output so that they don't get included in the library
2802 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'
2805 if test "$GXX" = yes; then
2806 if test $with_gnu_ld = no; then
2809 _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'
2812 if test "$host_cpu" = ia64; then
2813 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2815 _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'
2821 # FIXME: insert proper C++ library support
2822 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2828 case $cc_basename in
2831 _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 ${objdir}/so_locations -o $lib'
2833 # Archives containing C++ object files must be created using
2834 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
2835 # necessary to make sure instantiated templates are included
2837 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
2840 if test "$GXX" = yes; then
2841 if test "$with_gnu_ld" = no; then
2842 _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}${objdir}/so_locations -o $lib'
2844 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
2847 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2850 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2851 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2854 case $cc_basename in
2856 # Kuck and Associates, Inc. (KAI) C++ Compiler
2858 # KCC will only create a shared library if the output file
2859 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2860 # to its proper name (with version) after linking.
2861 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2862 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
2864 # Commands to make compiler produce verbose output that lists
2865 # what "hidden" libraries, object files and flags are used when
2866 # linking a shared library.
2868 # There doesn't appear to be a way to prevent this compiler from
2869 # explicitly linking system object files so we need to strip them
2870 # from the output so that they don't get included in the library
2872 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | grep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2874 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2875 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2877 # Archives containing C++ object files must be created using
2878 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2879 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2883 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2884 _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'
2886 runpath_var=LD_RUN_PATH
2887 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2888 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2890 # Commands to make compiler produce verbose output that lists
2891 # what "hidden" libraries, object files and flags are used when
2892 # linking a shared library.
2894 # There doesn't appear to be a way to prevent this compiler from
2895 # explicitly linking system object files so we need to strip them
2896 # from the output so that they don't get included in the library
2898 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'
2903 # FIXME: insert proper C++ library support
2904 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2907 # FIXME: insert proper C++ library support
2908 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2911 case $cc_basename in
2913 # FIXME: insert proper C++ library support
2914 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2917 # FIXME: insert proper C++ library support
2918 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2923 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2924 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
2926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2927 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2928 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2930 # Workaround some broken pre-1.5 toolchains
2931 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | sed -e "s:-lgcc -lc -lgcc::"'
2934 case $cc_basename in
2936 # Kuck and Associates, Inc. (KAI) C++ Compiler
2938 # KCC will only create a shared library if the output file
2939 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2940 # to its proper name (with version) after linking.
2941 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
2943 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2944 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2946 # Archives containing C++ object files must be created using
2947 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2948 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2952 # Rational C++ 2.4.1
2953 # FIXME: insert proper C++ library support
2954 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2957 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2958 _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 ${objdir}/so_locations -o $lib'
2960 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2961 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2963 # Commands to make compiler produce verbose output that lists
2964 # what "hidden" libraries, object files and flags are used when
2965 # linking a shared library.
2967 # There doesn't appear to be a way to prevent this compiler from
2968 # explicitly linking system object files so we need to strip them
2969 # from the output so that they don't get included in the library
2971 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'
2974 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2975 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2976 _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}${objdir}/so_locations -o $lib'
2978 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2979 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2981 # Commands to make compiler produce verbose output that lists
2982 # what "hidden" libraries, object files and flags are used when
2983 # linking a shared library.
2984 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2987 # FIXME: insert proper C++ library support
2988 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2994 case $cc_basename in
2996 # Kuck and Associates, Inc. (KAI) C++ Compiler
2998 # KCC will only create a shared library if the output file
2999 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3000 # to its proper name (with version) after linking.
3001 _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3004 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3006 # Archives containing C++ object files must be created using
3007 # the KAI C++ compiler.
3008 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3011 # Rational C++ 2.4.1
3012 # FIXME: insert proper C++ library support
3013 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3016 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3017 _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 ${objdir}/so_locations -o $lib'
3018 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
3019 echo "-hidden">> $lib.exp~
3020 $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 $objdir/so_locations -o $lib~
3023 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3024 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3026 # Commands to make compiler produce verbose output that lists
3027 # what "hidden" libraries, object files and flags are used when
3028 # linking a shared library.
3030 # There doesn't appear to be a way to prevent this compiler from
3031 # explicitly linking system object files so we need to strip them
3032 # from the output so that they don't get included in the library
3034 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'
3037 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3038 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3039 _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}${objdir}/so_locations -o $lib'
3041 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3042 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3044 # Commands to make compiler produce verbose output that lists
3045 # what "hidden" libraries, object files and flags are used when
3046 # linking a shared library.
3047 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3050 # FIXME: insert proper C++ library support
3051 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3057 # FIXME: insert proper C++ library support
3058 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3061 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3062 case $cc_basename in
3064 # FIXME: insert proper C++ library support
3065 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3068 # FIXME: insert proper C++ library support
3069 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3074 case $cc_basename in
3077 # FIXME: insert proper C++ library support
3078 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3082 # FIXME: insert proper C++ library support
3083 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3086 # FIXME: insert proper C++ library support
3087 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3092 case $cc_basename in
3094 # Sun C++ 4.2, 5.x and Centerline C++
3095 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3096 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3097 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3098 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3100 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3101 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3103 solaris2.[0-5] | solaris2.[0-5].*) ;;
3105 # The C++ compiler is used as linker so we must use $wl
3106 # flag to pass the commands to the underlying system
3108 # Supported since Solaris 2.6 (maybe 2.5.1?)
3109 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3112 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3114 # Commands to make compiler produce verbose output that lists
3115 # what "hidden" libraries, object files and flags are used when
3116 # linking a shared library.
3118 # There doesn't appear to be a way to prevent this compiler from
3119 # explicitly linking system object files so we need to strip them
3120 # from the output so that they don't get included in the library
3122 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3124 # Archives containing C++ object files must be created using
3125 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3126 # necessary to make sure instantiated templates are included
3128 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3131 # Green Hills C++ Compiler
3132 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3134 # The C++ compiler must be used to create the archive.
3135 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3138 # GNU C++ compiler with Solaris linker
3139 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3140 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3141 if $CC --version | grep -v '^2\.7' > /dev/null; then
3142 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3143 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3144 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3146 # Commands to make compiler produce verbose output that lists
3147 # what "hidden" libraries, object files and flags are used when
3148 # linking a shared library.
3149 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3151 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3153 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3154 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3155 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3157 # Commands to make compiler produce verbose output that lists
3158 # what "hidden" libraries, object files and flags are used when
3159 # linking a shared library.
3160 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3163 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3168 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3169 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3172 case $cc_basename in
3174 # NonStop-UX NCC 3.20
3175 # FIXME: insert proper C++ library support
3176 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3179 # FIXME: insert proper C++ library support
3180 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3185 # FIXME: insert proper C++ library support
3186 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3189 # FIXME: insert proper C++ library support
3190 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3193 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3194 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3196 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3197 _LT_AC_TAGVAR(LD, $1)="$LD"
3200 ## There is no encapsulation within the following macros, do not change
3201 ## the running order or otherwise move them around unless you know exactly
3202 ## what you are doing...
3203 AC_LIBTOOL_POSTDEP_PREDEP($1)
3204 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3205 AC_LIBTOOL_PROG_CC_C_O($1)
3206 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3207 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3208 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3209 AC_LIBTOOL_SYS_LIB_STRIP
3210 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3211 AC_LIBTOOL_DLOPEN_SELF($1)
3213 AC_LIBTOOL_CONFIG($1)
3217 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3219 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3220 # ------------------------
3221 # Figure out "hidden" library dependencies from verbose
3222 # compiler output when linking a shared library.
3223 # Parse the compiler output and extract the necessary
3224 # objects, libraries and library flags.
3225 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3226 dnl we can't use the lt_simple_compile_test_code here,
3227 dnl because it contains code intended for an executable,
3228 dnl not a library. It's possible we should let each
3229 dnl tag define a new lt_????_link_test_code variable,
3230 dnl but it's only used here...
3231 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3233 void foo (void) { a = 0; }
3235 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3239 Foo (void) { a = 0; }
3244 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3252 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3255 public void bar (void) {
3261 dnl Parse the compiler output and extract the necessary
3262 dnl objects, libraries and library flags.
3263 if AC_TRY_EVAL(ac_compile); then
3264 # Parse the compiler output and extract the necessary
3265 # objects, libraries and library flags.
3267 # Sentinel used to keep track of whether or not we are before
3268 # the conftest object file.
3269 pre_test_object_deps_done=no
3271 # The `*' in the case matches for architectures that use `case' in
3272 # $output_verbose_cmd can trigger glob expansion during the loop
3273 # eval without this substitution.
3274 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3276 for p in `eval $output_verbose_link_cmd`; do
3280 # Some compilers place space between "-{L,R}" and the path.
3283 || test $p = "-R"; then
3290 if test "$pre_test_object_deps_done" = no; then
3293 # Internal compiler library paths should come after those
3294 # provided the user. The postdeps already come after the
3295 # user supplied libs so there is no need to process them.
3296 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3297 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3299 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3302 # The "-l" case would never come before the object being
3303 # linked, so don't bother handling this case.
3306 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3307 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3309 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3315 # This assumes that the test object file only shows up
3316 # once in the compiler output.
3317 if test "$p" = "conftest.$objext"; then
3318 pre_test_object_deps_done=yes
3322 if test "$pre_test_object_deps_done" = no; then
3323 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3324 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3326 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3329 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3330 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3332 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3337 *) ;; # Ignore the rest.
3345 echo "libtool.m4: error: problem compiling $1 test program"
3348 $rm -f confest.$objext
3350 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3351 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3352 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3354 ])# AC_LIBTOOL_POSTDEP_PREDEP
3356 # AC_LIBTOOL_LANG_F77_CONFIG
3357 # ------------------------
3358 # Ensure that the configuration vars for the C compiler are
3359 # suitably defined. Those variables are subsequently used by
3360 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3361 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3362 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3363 [AC_REQUIRE([AC_PROG_F77])
3364 AC_LANG_PUSH(Fortran 77)
3366 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3367 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3368 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3369 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3370 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3371 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3373 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3374 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3375 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3376 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3377 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3378 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3379 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3381 # Source file extension for f77 test sources.
3384 # Object file extension for compiled f77 test sources.
3386 _LT_AC_TAGVAR(objext, $1)=$objext
3388 # Code to be used in simple compile tests
3389 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3391 # Code to be used in simple link tests
3392 lt_simple_link_test_code=" program t\n end\n"
3394 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3397 # Allow CC to be a program name with arguments.
3402 _LT_AC_TAGVAR(compiler, $1)=$CC
3403 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3405 AC_MSG_CHECKING([if libtool supports shared libraries])
3406 AC_MSG_RESULT([$can_build_shared])
3408 AC_MSG_CHECKING([whether to build shared libraries])
3409 test "$can_build_shared" = "no" && enable_shared=no
3411 # On AIX, shared libraries and static libraries use the same namespace, and
3412 # are all built from PIC.
3415 test "$enable_shared" = yes && enable_static=no
3416 if test -n "$RANLIB"; then
3417 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3418 postinstall_cmds='$RANLIB $lib'
3422 test "$enable_shared" = yes && enable_static=no
3425 AC_MSG_RESULT([$enable_shared])
3427 AC_MSG_CHECKING([whether to build static libraries])
3428 # Make sure either enable_shared or enable_static is yes.
3429 test "$enable_shared" = yes || enable_static=yes
3430 AC_MSG_RESULT([$enable_static])
3432 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3434 _LT_AC_TAGVAR(GCC, $1)="$G77"
3435 _LT_AC_TAGVAR(LD, $1)="$LD"
3437 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3438 AC_LIBTOOL_PROG_CC_C_O($1)
3439 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3440 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3441 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3442 AC_LIBTOOL_SYS_LIB_STRIP
3443 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3445 AC_LIBTOOL_CONFIG($1)
3449 ])# AC_LIBTOOL_LANG_F77_CONFIG
3452 # AC_LIBTOOL_LANG_GCJ_CONFIG
3453 # --------------------------
3454 # Ensure that the configuration vars for the C compiler are
3455 # suitably defined. Those variables are subsequently used by
3456 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3457 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3458 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3461 # Source file extension for C test sources.
3464 # Object file extension for compiled C test sources.
3466 _LT_AC_TAGVAR(objext, $1)=$objext
3468 # Code to be used in simple compile tests
3469 lt_simple_compile_test_code="class foo {}\n"
3471 # Code to be used in simple link tests
3472 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3474 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3477 # Allow CC to be a program name with arguments.
3482 _LT_AC_TAGVAR(compiler, $1)=$CC
3484 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3485 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3488 ## There is no encapsulation within the following macros, do not change
3489 ## the running order or otherwise move them around unless you know exactly
3490 ## what you are doing...
3491 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3492 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3493 AC_LIBTOOL_PROG_CC_C_O($1)
3494 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3495 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3496 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3497 AC_LIBTOOL_SYS_LIB_STRIP
3498 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3499 AC_LIBTOOL_DLOPEN_SELF($1)
3501 AC_LIBTOOL_CONFIG($1)
3505 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3508 # AC_LIBTOOL_LANG_RC_CONFIG
3509 # --------------------------
3510 # Ensure that the configuration vars for the Windows resource compiler are
3511 # suitably defined. Those variables are subsequently used by
3512 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3513 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3514 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3517 # Source file extension for RC test sources.
3520 # Object file extension for compiled RC test sources.
3522 _LT_AC_TAGVAR(objext, $1)=$objext
3524 # Code to be used in simple compile tests
3525 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3527 # Code to be used in simple link tests
3528 lt_simple_link_test_code="$lt_simple_compile_test_code"
3530 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3533 # Allow CC to be a program name with arguments.
3538 _LT_AC_TAGVAR(compiler, $1)=$CC
3539 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3541 AC_LIBTOOL_CONFIG($1)
3545 ])# AC_LIBTOOL_LANG_RC_CONFIG
3548 # AC_LIBTOOL_CONFIG([TAGNAME])
3549 # ----------------------------
3550 # If TAGNAME is not passed, then create an initial libtool script
3551 # with a default configuration from the untagged config vars. Otherwise
3552 # add code to config.status for appending the configuration named by
3553 # TAGNAME from the matching tagged config vars.
3554 AC_DEFUN([AC_LIBTOOL_CONFIG],
3555 [# The else clause should only fire when bootstrapping the
3556 # libtool distribution, otherwise you forgot to ship ltmain.sh
3557 # with your package, and you will get complaints that there are
3558 # no rules to generate ltmain.sh.
3559 if test -f "$ltmain"; then
3560 # Now quote all the things that may contain metacharacters while being
3561 # careful not to overquote the AC_SUBSTed values. We take copies of the
3562 # variables and quote the copies for generation of the libtool script.
3563 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
3564 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3565 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3566 deplibs_check_method reload_flag reload_cmds need_locks \
3567 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3568 lt_cv_sys_global_symbol_to_c_name_address \
3569 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3570 old_postinstall_cmds old_postuninstall_cmds \
3571 _LT_AC_TAGVAR(compiler, $1) \
3572 _LT_AC_TAGVAR(CC, $1) \
3573 _LT_AC_TAGVAR(LD, $1) \
3574 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3575 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3576 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3577 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3578 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3579 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3580 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3581 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
3582 _LT_AC_TAGVAR(old_archive_cmds, $1) \
3583 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3584 _LT_AC_TAGVAR(predep_objects, $1) \
3585 _LT_AC_TAGVAR(postdep_objects, $1) \
3586 _LT_AC_TAGVAR(predeps, $1) \
3587 _LT_AC_TAGVAR(postdeps, $1) \
3588 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3589 _LT_AC_TAGVAR(archive_cmds, $1) \
3590 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3591 _LT_AC_TAGVAR(postinstall_cmds, $1) \
3592 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
3593 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3594 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
3595 _LT_AC_TAGVAR(no_undefined_flag, $1) \
3596 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3597 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3598 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3599 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3600 _LT_AC_TAGVAR(exclude_expsyms, $1) \
3601 _LT_AC_TAGVAR(include_expsyms, $1); do
3604 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
3605 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3606 _LT_AC_TAGVAR(archive_cmds, $1) | \
3607 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3608 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3609 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3610 extract_expsyms_cmds | reload_cmds | finish_cmds | \
3611 postinstall_cmds | postuninstall_cmds | \
3612 old_postinstall_cmds | old_postuninstall_cmds | \
3613 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3614 # Double-quote double-evaled strings.
3615 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3618 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3624 *'\[$]0 --fallback-echo"')
3625 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3630 [cfgfile="${ofile}T"
3631 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3633 AC_MSG_NOTICE([creating $ofile])],
3636 cat <<__EOF__ >> "$cfgfile"
3640 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3641 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3642 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3644 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3645 # Free Software Foundation, Inc.
3647 # This file is part of GNU Libtool:
3648 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3650 # This program is free software; you can redistribute it and/or modify
3651 # it under the terms of the GNU General Public License as published by
3652 # the Free Software Foundation; either version 2 of the License, or
3653 # (at your option) any later version.
3655 # This program is distributed in the hope that it will be useful, but
3656 # WITHOUT ANY WARRANTY; without even the implied warranty of
3657 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3658 # General Public License for more details.
3660 # You should have received a copy of the GNU General Public License
3661 # along with this program; if not, write to the Free Software
3662 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3664 # As a special exception to the GNU General Public License, if you
3665 # distribute this file as part of a program that contains a
3666 # configuration script generated by Autoconf, you may include it under
3667 # the same distribution terms that you use for the rest of that program.
3669 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3670 Xsed="sed -e s/^X//"
3672 # The HP-UX ksh and POSIX shell print the target directory to stdout
3674 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3676 # The names of the tagged configurations supported by this script.
3679 # ### BEGIN LIBTOOL CONFIG],
3680 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3682 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3684 # Shell to use when invoking shell scripts.
3687 # Whether or not to build shared libraries.
3688 build_libtool_libs=$enable_shared
3690 # Whether or not to build static libraries.
3691 build_old_libs=$enable_static
3693 # Whether or not to add -lc for building shared libraries.
3694 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3696 # Whether or not to disallow shared libs when runtime libs are static
3697 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
3699 # Whether or not to optimize for fast installation.
3700 fast_install=$enable_fast_install
3703 host_alias=$host_alias
3706 # An echo program that does not interpret backslashes.
3711 AR_FLAGS=$lt_AR_FLAGS
3716 # A language-specific compiler.
3717 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3719 # Is the compiler the GNU C compiler?
3720 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3725 # The linker used to build libraries.
3726 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3728 # Whether we need hard or soft links.
3731 # A BSD-compatible nm program.
3734 # A sed program that does not truncate output.
3737 # A symbol stripping program
3740 # Used to examine libraries when file_magic_cmd begins "file"
3741 MAGIC_CMD=$MAGIC_CMD
3743 # Used on cygwin: DLL creation program.
3746 # Used on cygwin: object dumper.
3749 # Used on cygwin: assembler.
3752 # The name of the directory that contains temporary libtool files.
3755 # How to create reloadable object files.
3756 reload_flag=$lt_reload_flag
3757 reload_cmds=$lt_reload_cmds
3759 # How to pass a linker flag through the compiler.
3760 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3762 # Object file suffix (normally "o").
3765 # Old archive suffix (normally "a").
3768 # Executable file suffix (normally "").
3771 # Additional compiler flags for building library objects.
3772 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3775 # What is the maximum length of a command?
3776 max_cmd_len=$lt_cv_sys_max_cmd_len
3778 # Does compiler simultaneously support -c and -o options?
3779 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3781 # Must we lock files when doing compilation ?
3782 need_locks=$lt_need_locks
3784 # Do we need the lib prefix for modules?
3785 need_lib_prefix=$need_lib_prefix
3787 # Do we need a version for libraries?
3788 need_version=$need_version
3790 # Whether dlopen is supported.
3791 dlopen_support=$enable_dlopen
3793 # Whether dlopen of programs is supported.
3794 dlopen_self=$enable_dlopen_self
3796 # Whether dlopen of statically linked programs is supported.
3797 dlopen_self_static=$enable_dlopen_self_static
3799 # Compiler flag to prevent dynamic linking.
3800 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3802 # Compiler flag to turn off builtin functions.
3803 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3805 # Compiler flag to allow reflexive dlopens.
3806 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3808 # Compiler flag to generate shared objects directly from archives.
3809 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3811 # Compiler flag to generate thread-safe objects.
3812 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3814 # Library versioning type.
3815 version_type=$version_type
3817 # Format of library name prefix.
3818 libname_spec=$lt_libname_spec
3820 # List of archive names. First name is the real one, the rest are links.
3821 # The last name is the one that the linker finds with -lNAME.
3822 library_names_spec=$lt_library_names_spec
3824 # The coded name of the library, if different from the real name.
3825 soname_spec=$lt_soname_spec
3827 # Commands used to build and install an old-style archive.
3829 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3830 old_postinstall_cmds=$lt_old_postinstall_cmds
3831 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3833 # Create an old-style archive from a shared archive.
3834 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3836 # Create a temporary old-style archive to link instead of a shared archive.
3837 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3839 # Commands used to build and install a shared archive.
3840 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3841 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3842 postinstall_cmds=$lt_postinstall_cmds
3843 postuninstall_cmds=$lt_postuninstall_cmds
3845 # Commands to strip libraries.
3846 old_striplib=$lt_old_striplib
3847 striplib=$lt_striplib
3849 # Dependencies to place before the objects being linked to create a
3851 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3853 # Dependencies to place after the objects being linked to create a
3855 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3857 # Dependencies to place before the objects being linked to create a
3859 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3861 # Dependencies to place after the objects being linked to create a
3863 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3865 # The library search path used internally by the compiler when linking
3867 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3869 # Method to check whether dependent libraries are shared objects.
3870 deplibs_check_method=$lt_deplibs_check_method
3872 # Command to use when deplibs_check_method == file_magic.
3873 file_magic_cmd=$lt_file_magic_cmd
3875 # Flag that allows shared libraries with undefined symbols to be built.
3876 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3878 # Flag that forces no undefined symbols.
3879 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3881 # Commands used to finish a libtool library installation in a directory.
3882 finish_cmds=$lt_finish_cmds
3884 # Same as above, but a single script fragment to be evaled but not shown.
3885 finish_eval=$lt_finish_eval
3887 # Take the output of nm and produce a listing of raw symbols and C names.
3888 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3890 # Transform the output of nm in a proper C declaration
3891 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3893 # Transform the output of nm in a C name address pair
3894 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3896 # This is the shared library runtime path variable.
3897 runpath_var=$runpath_var
3899 # This is the shared library path variable.
3900 shlibpath_var=$shlibpath_var
3902 # Is shlibpath searched before the hard-coded library search path?
3903 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3905 # How to hardcode a shared library path into an executable.
3906 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3908 # Whether we should hardcode library paths into libraries.
3909 hardcode_into_libs=$hardcode_into_libs
3911 # Flag to hardcode \$libdir into a binary during linking.
3912 # This must work even if \$libdir does not exist.
3913 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3915 # Whether we need a single -rpath flag with a separated argument.
3916 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3918 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3920 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3922 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3924 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3926 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3927 # the resulting binary.
3928 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3930 # Variables whose values should be saved in libtool wrapper scripts and
3931 # restored at relink time.
3932 variables_saved_for_relink="$variables_saved_for_relink"
3934 # Whether libtool must link a program against all its dependency libraries.
3935 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3937 # Compile-time system search path for libraries
3938 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3940 # Run-time system search path for libraries
3941 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3943 # Fix the shell variable \$srcfile for the compiler.
3944 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3946 # Set to yes if exported symbols are required.
3947 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3949 # The commands to list exported symbols.
3950 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3952 # The commands to extract the exported symbol list from a shared archive.
3953 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3955 # Symbols that should not be listed in the preloaded symbols.
3956 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3958 # Symbols that must always be exported.
3959 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3962 [# ### END LIBTOOL CONFIG],
3963 [# ### END LIBTOOL TAG CONFIG: $tagname])
3970 cat <<\EOF >> "$cfgfile"
3972 # AIX sometimes has problems with the GCC collect2 program. For some
3973 # reason, if we set the COLLECT_NAMES environment variable, the problems
3974 # vanish in a puff of smoke.
3975 if test "X${COLLECT_NAMES+set}" != Xset; then
3977 export COLLECT_NAMES
3983 # We use sed instead of cat because bash on DJGPP gets confused if
3984 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3985 # text mode, it properly converts lines to CR/LF. This bash problem
3986 # is reportedly fixed, but why not run on old versions too?
3987 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3989 mv -f "$cfgfile" "$ofile" || \
3990 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3994 # If there is no Makefile yet, we rely on a make rule to execute
3995 # `config.status --recheck' to rerun these tests and create the
3996 # libtool script then.
3997 test -f Makefile && make "$ltmain"
3999 ])# AC_LIBTOOL_CONFIG
4002 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4003 # -------------------------------------------
4004 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4005 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4007 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4009 if test "$GCC" = yes; then
4010 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4012 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4013 lt_cv_prog_compiler_rtti_exceptions,
4014 [-fno-rtti -fno-exceptions], [],
4015 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4017 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4020 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4021 # ---------------------------------
4022 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4023 [AC_REQUIRE([AC_CANONICAL_HOST])
4024 AC_REQUIRE([AC_PROG_NM])
4025 AC_REQUIRE([AC_OBJEXT])
4026 # Check for command to grab the raw symbol name followed by C symbol from nm.
4027 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4028 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4030 # These are sane defaults that work on at least a few old systems.
4031 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4033 # Character class describing NM global symbol codes.
4034 symcode='[[BCDEGRST]]'
4036 # Regexp to match symbols that can be accessed directly from C.
4037 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4039 # Transform the above into a raw symbol and a C symbol.
4040 symxfrm='\1 \2\3 \3'
4042 # Transform an extracted symbol line into a proper C declaration
4043 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4045 # Transform an extracted symbol line into symbol name and symbol address
4046 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'"
4048 # Define system-specific variables.
4053 cygwin* | mingw* | pw32*)
4054 symcode='[[ABCDGISTW]]'
4056 hpux*) # Its linker distinguishes data from code symbols
4057 if test "$host_cpu" = ia64; then
4058 symcode='[[ABCDEGRST]]'
4060 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4061 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'"
4064 symcode='[[BCDEGRST]]'
4067 symcode='[[BCDEGQRST]]'
4073 symcode='[[DFNSTU]]'
4077 # Handle CRLF in mingw tool chain
4081 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4085 # If we're using GNU nm, then use its standard symbol codes.
4086 case `$NM -V 2>&1` in
4087 *GNU* | *'with BFD'*)
4088 symcode='[[ABCDGISTW]]' ;;
4091 # Try without a prefix undercore, then with it.
4092 for ac_symprfx in "" "_"; do
4094 # Write the raw and C identifiers.
4095 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4097 # Check to see that the pipe works correctly.
4101 cat > conftest.$ac_ext <<EOF
4106 void nm_test_func(){}
4110 int main(){nm_test_var='a';nm_test_func();return(0);}
4113 if AC_TRY_EVAL(ac_compile); then
4114 # Now try to grab the symbols.
4116 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4117 # Try sorting and uniquifying the output.
4118 if sort "$nlist" | uniq > "$nlist"T; then
4119 mv -f "$nlist"T "$nlist"
4124 # Make sure that we snagged all the symbols we need.
4125 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4126 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4127 cat <<EOF > conftest.$ac_ext
4133 # Now generate the symbol file.
4134 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4136 cat <<EOF >> conftest.$ac_ext
4137 #if defined (__STDC__) && __STDC__
4138 # define lt_ptr_t void *
4140 # define lt_ptr_t char *
4144 /* The mapping between symbol names and symbols. */
4149 lt_preloaded_symbols[[]] =
4152 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4153 cat <<\EOF >> conftest.$ac_ext
4161 # Now try linking the two files.
4162 mv conftest.$ac_objext conftstm.$ac_objext
4163 lt_save_LIBS="$LIBS"
4164 lt_save_CFLAGS="$CFLAGS"
4165 LIBS="conftstm.$ac_objext"
4166 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4167 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4170 LIBS="$lt_save_LIBS"
4171 CFLAGS="$lt_save_CFLAGS"
4173 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4176 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4179 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4182 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4183 cat conftest.$ac_ext >&5
4185 rm -f conftest* conftst*
4187 # Do not use the global_symbol_pipe unless it works.
4188 if test "$pipe_works" = yes; then
4191 lt_cv_sys_global_symbol_pipe=
4195 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4196 lt_cv_sys_global_symbol_to_cdecl=
4198 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4199 AC_MSG_RESULT(failed)
4203 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4206 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4207 # ---------------------------------------
4208 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4209 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4210 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4211 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4213 AC_MSG_CHECKING([for $compiler option to produce PIC])
4215 # C++ specific cases for pic, static, wl, etc.
4216 if test "$GXX" = yes; then
4217 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4218 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4222 # All AIX code is PIC.
4223 if test "$host_cpu" = ia64; then
4224 # AIX 5 now supports IA64 processor
4225 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4229 # FIXME: we need at least 68020 code to build shared libraries, but
4230 # adding the `-m68020' flag to GCC prevents building anything better,
4232 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4234 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4235 # PIC is the default for these OSes.
4237 mingw* | os2* | pw32*)
4238 # This hack is so that the source file can tell whether it is being
4239 # built for inclusion in a dll (and should export symbols for example).
4240 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4242 darwin* | rhapsody*)
4243 # PIC is the default on this platform
4244 # Common symbols not allowed in MH_DYLIB files
4245 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4248 # DJGPP does not support shared libraries at all
4249 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4252 if test -d /usr/nec; then
4253 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4257 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4258 if test "$host_cpu" != ia64; then
4259 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4263 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4269 # All AIX code is PIC.
4270 if test "$host_cpu" = ia64; then
4271 # AIX 5 now supports IA64 processor
4272 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4274 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4278 case $cc_basename in
4280 # Green Hills C++ Compiler
4281 # _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"
4286 case $cc_basename in
4288 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4291 # Green Hills C++ Compiler
4292 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4299 # FreeBSD uses GNU C++
4301 hpux9* | hpux10* | hpux11*)
4302 case $cc_basename in
4304 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4305 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4306 if test "$host_cpu" != ia64; then
4307 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4311 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4312 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4313 if test "$host_cpu" != ia64; then
4314 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4321 irix5* | irix6* | nonstopux*)
4322 case $cc_basename in
4324 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4325 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4326 # CC pic flag -KPIC is the default.
4333 case $cc_basename in
4336 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4337 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4341 # Make sure the PIC flag is empty. It appears that all Alpha
4342 # Linux and Compaq Tru64 Unix objects are PIC.
4343 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4344 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4355 case $cc_basename in
4357 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4365 osf3* | osf4* | osf5*)
4366 case $cc_basename in
4368 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4371 # Rational C++ 2.4.1
4372 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4375 # Digital/Compaq C++
4376 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4377 # Make sure the PIC flag is empty. It appears that all Alpha
4378 # Linux and Compaq Tru64 Unix objects are PIC.
4379 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4380 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4389 case $cc_basename in
4391 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4398 case $cc_basename in
4400 # Sun C++ 4.2, 5.x and Centerline C++
4401 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4402 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4403 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4406 # Green Hills C++ Compiler
4407 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4414 case $cc_basename in
4417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4418 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4422 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4429 case $cc_basename in
4431 # NonStop-UX NCC 3.20
4432 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4443 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4449 if test "$GCC" = yes; then
4450 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4451 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4455 # All AIX code is PIC.
4456 if test "$host_cpu" = ia64; then
4457 # AIX 5 now supports IA64 processor
4458 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4463 # FIXME: we need at least 68020 code to build shared libraries, but
4464 # adding the `-m68020' flag to GCC prevents building anything better,
4466 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4469 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4470 # PIC is the default for these OSes.
4473 mingw* | pw32* | os2*)
4474 # This hack is so that the source file can tell whether it is being
4475 # built for inclusion in a dll (and should export symbols for example).
4476 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4479 darwin* | rhapsody*)
4480 # PIC is the default on this platform
4481 # Common symbols not allowed in MH_DYLIB files
4482 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4486 # Just because we use GCC doesn't mean we suddenly get shared libraries
4487 # on systems that don't support them.
4488 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4493 if test -d /usr/nec; then
4494 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4499 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4500 if test "$host_cpu" != ia64; then
4501 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4506 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4510 # PORTME Check for flag to pass linker flags through the system compiler.
4513 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4514 if test "$host_cpu" = ia64; then
4515 # AIX 5 now supports IA64 processor
4516 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4518 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4522 mingw* | pw32* | os2*)
4523 # This hack is so that the source file can tell whether it is being
4524 # built for inclusion in a dll (and should export symbols for example).
4525 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4528 hpux9* | hpux10* | hpux11*)
4529 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4530 if test "$host_cpu" != ia64; then
4531 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4533 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4534 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4537 irix5* | irix6* | nonstopux*)
4538 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4539 # PIC (with -KPIC) is the default.
4540 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4544 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4545 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4548 osf3* | osf4* | osf5*)
4549 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4550 # All OSF/1 code is PIC.
4551 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4555 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4556 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4560 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4561 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4562 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4566 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4567 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4568 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4571 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4572 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4573 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4574 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4578 if test -d /usr/nec ;then
4579 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4580 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4585 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4586 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4590 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4595 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4598 # Check to make sure the PIC flag actually works.
4600 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4601 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4602 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4603 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [],
4604 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4606 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4608 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4609 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4612 # For platforms which do not support PIC, -DPIC is meaningless:
4614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4617 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])"
4623 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4624 # ------------------------------------
4625 # See if the linker supports building shared libraries.
4626 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4627 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4629 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4632 # If we're using GNU nm, then we don't want the "-C" option.
4633 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4634 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4635 _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'
4637 _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'
4641 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4644 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4649 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4650 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4651 _LT_AC_TAGVAR(archive_cmds, $1)=
4652 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4653 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4654 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4655 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4656 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4657 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4658 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4659 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4660 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4661 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4662 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4663 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4664 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4665 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4666 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4667 # include_expsyms should be a list of space-separated symbols to be *always*
4668 # included in the symbol list
4669 _LT_AC_TAGVAR(include_expsyms, $1)=
4670 # exclude_expsyms can be an extended regexp of symbols to exclude
4671 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4672 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4673 # as well as any symbol that contains `d'.
4674 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4675 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4676 # platforms (ab)use it in PIC code, but their linkers get confused if
4677 # the symbol is explicitly referenced. Since portable code cannot
4678 # rely on this symbol name, it's probably fine to never include it in
4679 # preloaded symbol tables.
4680 extract_expsyms_cmds=
4683 cygwin* | mingw* | pw32*)
4684 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4685 # When not using gcc, we currently assume that we are using
4686 # Microsoft Visual C++.
4687 if test "$GCC" != yes; then
4696 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4697 if test "$with_gnu_ld" = yes; then
4698 # If archive_cmds runs LD, not CC, wlarc should be empty
4701 # See if GNU ld supports shared libraries.
4703 aix3* | aix4* | aix5*)
4704 # On AIX/PPC, the GNU linker is very broken
4705 if test "$host_cpu" != ia64; then
4706 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4709 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4710 *** to be unable to reliably create shared libraries on AIX.
4711 *** Therefore, libtool is disabling shared libraries support. If you
4712 *** really care for shared libraries, you may want to modify your PATH
4713 *** so that a non-GNU linker is found, and then restart.
4720 _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)'
4721 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4724 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4725 # that the semantics of dynamic libraries on AmigaOS, at least up
4726 # to version 4, is to share data among multiple programs linked
4727 # with the same dynamic library. Since this doesn't match the
4728 # behavior of shared libraries on other platforms, we can't use
4730 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4734 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4735 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4736 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4737 # support --undefined. This deserves some investigation. FIXME
4738 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4740 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4744 cygwin* | mingw* | pw32*)
4745 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4746 # as there is no search path for DLLs.
4747 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4748 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4749 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4750 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4752 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4753 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4754 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}-retain-symbols-file $wl$export_symbols ${wl}--out-implib,$lib'
4761 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4762 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4765 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4766 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4771 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
4772 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4775 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4776 *** create shared libraries on Solaris systems. Therefore, libtool
4777 *** is disabling shared libraries support. We urge you to upgrade GNU
4778 *** binutils to release 2.9.1 or newer. Another option is to modify
4779 *** your PATH or compiler configuration so that the native linker is
4780 *** used, and then restart.
4783 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4784 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4785 _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'
4787 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4792 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4794 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4795 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4799 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4800 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4801 _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'
4803 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4808 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
4809 runpath_var=LD_RUN_PATH
4810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4811 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4812 # ancient GNU ld didn't support --whole-archive et. al.
4813 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
4814 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4816 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4820 # PORTME fill in a description of your system's linker (not GNU ld)
4823 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4824 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4825 _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'
4826 # Note: this linker hardcodes the directories in LIBPATH if there
4827 # are no directories specified by -L.
4828 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4829 if test "$GCC" = yes && test -z "$link_static_flag"; then
4830 # Neither direct hardcoding nor static linking is supported with a
4832 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4837 if test "$host_cpu" = ia64; then
4838 # On IA64, the linker does run time linking by default, so we don't
4839 # have to do anything special.
4840 aix_use_runtimelinking=no
4841 exp_sym_flag='-Bexport'
4844 # If we're using GNU nm, then we don't want the "-C" option.
4845 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4846 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
4847 _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'
4849 _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'
4851 aix_use_runtimelinking=no
4853 # Test if we are trying to use run time linking or normal
4854 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4855 # need to do runtime linking.
4856 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4857 for ld_flag in $LDFLAGS; do
4858 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4859 aix_use_runtimelinking=yes
4865 exp_sym_flag='-bexport'
4866 no_entry_flag='-bnoentry'
4869 # When large executables or shared objects are built, AIX ld can
4870 # have problems creating the table of contents. If linking a library
4871 # or program results in "error TOC overflow" add -mminimal-toc to
4872 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4873 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4875 _LT_AC_TAGVAR(archive_cmds, $1)=''
4876 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4877 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4878 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4880 if test "$GCC" = yes; then
4881 case $host_os in aix4.[012]|aix4.[012].*)
4882 # We only want to do this on AIX 4.2 and lower, the check
4883 # below for broken collect2 doesn't work under 4.3+
4884 collect2name=`${CC} -print-prog-name=collect2`
4885 if test -f "$collect2name" && \
4886 strings "$collect2name" | grep resolve_lib_name >/dev/null
4888 # We have reworked collect2
4889 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4891 # We have old collect2
4892 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4893 # It fails to find uninstalled libraries when the uninstalled
4894 # path is not listed in the libpath. Setting hardcode_minus_L
4895 # to unsupported forces relinking
4896 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4897 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4898 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4901 shared_flag='-shared'
4904 if test "$host_cpu" = ia64; then
4905 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4906 # chokes on -Wl,-G. The following line is correct:
4909 if test "$aix_use_runtimelinking" = yes; then
4910 shared_flag='${wl}-G'
4912 shared_flag='${wl}-bM:SRE'
4917 # It seems that -bexpall does not export symbols beginning with
4918 # underscore (_), so it is better to generate a list of symbols to export.
4919 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4920 if test "$aix_use_runtimelinking" = yes; then
4921 # Warning - without using the other runtime loading flags (-brtl),
4922 # -berok will link without error, but may produce a broken library.
4923 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4924 # Determine the default libpath from the value encoded in an empty executable.
4925 _LT_AC_SYS_LIBPATH_AIX
4926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4927 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4929 if test "$host_cpu" = ia64; then
4930 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4931 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4932 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4934 # Determine the default libpath from the value encoded in an empty executable.
4935 _LT_AC_SYS_LIBPATH_AIX
4936 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4937 # Warning - without using the other run time loading flags,
4938 # -berok will link without error, but may produce a broken library.
4939 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4940 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4941 # -bexpall does not export symbols beginning with underscore (_)
4942 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4943 # Exported symbols can be pulled into shared objects from archives
4944 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4945 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4946 # This is similar to how AIX traditionally builds it's shared libraries.
4947 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4953 _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)'
4954 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4955 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4956 # see comment about different semantics on the GNU ld section
4957 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4961 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4964 cygwin* | mingw* | pw32*)
4965 # When not using gcc, we currently assume that we are using
4966 # Microsoft Visual C++.
4967 # hardcode_libdir_flag_spec is actually meaningless, as there is
4968 # no search path for DLLs.
4969 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4970 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4971 # Tell ltmain to make .lib files, not .a files.
4973 # FIXME: Setting linknames here is a bad hack.
4974 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4975 # The linker will automatically build a .lib file if we build a DLL.
4976 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4977 # FIXME: Should let the user specify the lib program.
4978 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4979 fix_srcfile_path='`cygpath -w "$srcfile"`'
4980 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4983 darwin* | rhapsody*)
4985 rhapsody* | darwin1.[[012]])
4986 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4989 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4993 # FIXME: Relying on posixy $() will cause problems for
4994 # cross-compilation, but unfortunately the echo tests do not
4995 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
4996 # `"' quotes if we put them in here... so don't!
4997 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
4998 # We need to add '_' to the symbols in $export_symbols first
4999 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
5000 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5001 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5002 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5006 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5008 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5012 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5015 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5016 # support. Future versions do this automatically, but an explicit c++rt0.o
5017 # does not break anything, and helps significantly (at the cost of a little
5020 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5021 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5022 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5023 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5026 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5028 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5029 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5030 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5031 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5034 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5036 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5038 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5039 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5042 hpux9* | hpux10* | hpux11*)
5043 if test "$GCC" = yes; then
5046 _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'
5049 if test "$host_cpu" = ia64; then
5050 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5052 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5059 _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'
5062 if test "$host_cpu" = ia64; then
5063 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5065 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5070 if test "$host_cpu" = ia64; then
5071 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5072 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5073 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5075 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5076 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5077 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5079 # hardcode_minus_L: Not really in the search PATH,
5080 # but as the default location of the library.
5081 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5082 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5085 irix5* | irix6* | nonstopux*)
5086 if test "$GCC" = yes; then
5087 _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'
5089 _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'
5091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5092 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5093 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5097 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5098 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5100 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5102 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5103 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5104 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5108 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5109 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5110 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5111 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5112 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5116 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5117 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5118 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5119 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5120 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5121 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5124 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5125 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5126 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5129 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5130 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5137 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5138 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5139 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5140 _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'
5141 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5145 if test "$GCC" = yes; then
5146 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5147 _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'
5149 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5150 _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'
5152 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5153 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5156 osf4* | osf5*) # as osf3* with the addition of -msym flag
5157 if test "$GCC" = yes; then
5158 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5159 _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'
5160 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5162 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5163 _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'
5164 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5165 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
5167 # Both c and cxx compiler support -rpath directly
5168 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5170 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5174 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5175 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5176 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5177 runpath_var=LD_RUN_PATH
5178 hardcode_runpath_var=yes
5182 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5183 if test "$GCC" = yes; then
5184 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5185 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5186 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5188 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5189 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5190 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5192 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5193 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5195 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5196 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5197 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5199 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5203 if test "x$host_vendor" = xsequent; then
5204 # Use $CC to link under sequent, because it throws in some extra .o
5205 # files that make .init and .fini sections work.
5206 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5208 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5210 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5211 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5212 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5213 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5217 case $host_vendor in
5219 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5220 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5223 ## LD is ld it makes a PLAMLIB
5224 ## CC just makes a GrossModule.
5225 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5226 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5227 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5230 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5231 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5234 runpath_var='LD_RUN_PATH'
5235 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5239 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5240 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5241 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5245 if test -d /usr/nec; then
5246 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5247 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5248 runpath_var=LD_RUN_PATH
5249 hardcode_runpath_var=yes
5250 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5255 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5256 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5257 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5258 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5259 hardcode_runpath_var=yes
5260 runpath_var=LD_RUN_PATH
5263 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5264 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5265 if test "$GCC" = yes; then
5266 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5268 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5270 runpath_var='LD_RUN_PATH'
5271 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5275 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5276 # $CC -shared without GNU ld will not create a library from C++
5277 # object files and a static libstdc++, better avoid it by now
5278 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5279 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5280 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5281 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5282 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5283 runpath_var='LD_RUN_PATH'
5287 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5288 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5289 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5293 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5298 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5299 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5301 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5302 if test "$GCC" = yes; then
5303 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5307 # Do we need to explicitly link libc?
5309 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5310 if test "$enable_shared" = yes && test "$GCC" = yes; then
5311 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5313 # FIXME: we may have to deal with multi-command sequences.
5316 # Test whether the compiler implicitly links with -lc since on some
5317 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5318 # to ld, don't add -lc before -lgcc.
5319 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5321 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5323 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5326 libobjs=conftest.$ac_objext
5328 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5334 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5335 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5336 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5338 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5340 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5342 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5344 cat conftest.err 1>&5
5347 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5351 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5354 # _LT_AC_FILE_LTDLL_C
5355 # -------------------
5356 # Be careful that the start marker always follows a newline.
5357 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5358 # /* ltdll.c starts here */
5359 # #define WIN32_LEAN_AND_MEAN
5360 # #include <windows.h>
5361 # #undef WIN32_LEAN_AND_MEAN
5362 # #include <stdio.h>
5364 # #ifndef __CYGWIN__
5365 # # ifdef __CYGWIN32__
5366 # # define __CYGWIN__ __CYGWIN32__
5370 # #ifdef __cplusplus
5373 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5374 # #ifdef __cplusplus
5379 # #include <cygwin/cygwin_dll.h>
5380 # DECLARE_CYGWIN_DLL( DllMain );
5382 # HINSTANCE __hDllInstance_base;
5385 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5387 # __hDllInstance_base = hInst;
5390 # /* ltdll.c ends here */
5391 ])# _LT_AC_FILE_LTDLL_C
5394 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5395 # ---------------------------------
5396 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5400 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5401 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5402 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5403 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5404 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5405 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5406 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5408 # This is just to silence aclocal about the macro not being used
5409 ifelse([AC_DISABLE_FAST_INSTALL])
5411 AC_DEFUN([LT_AC_PROG_GCJ],
5412 [AC_CHECK_TOOL(GCJ, gcj, no)
5413 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5417 AC_DEFUN([LT_AC_PROG_RC],
5418 [AC_CHECK_TOOL(RC, windres, no)
5421 ############################################################
5422 # NOTE: This macro has been submitted for inclusion into #
5423 # GNU Autoconf as AC_PROG_SED. When it is available in #
5424 # a released version of Autoconf we should remove this #
5425 # macro and use it instead. #
5426 ############################################################
5429 # Check for a fully-functional sed program, that truncates
5430 # as few characters as possible. Prefer GNU sed if found.
5431 AC_DEFUN([LT_AC_PROG_SED],
5432 [AC_MSG_CHECKING([for a sed that does not truncate output])
5433 AC_CACHE_VAL(lt_cv_path_SED,
5434 [# Loop through the user's path and test for sed and gsed.
5435 # Then use that list of sed's as ones to test for truncation.
5436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440 test -z "$as_dir" && as_dir=.
5441 for lt_ac_prog in sed gsed; do
5442 for ac_exec_ext in '' $ac_executable_extensions; do
5443 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5444 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5451 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5452 # along with /bin/sed that truncates output.
5453 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5454 test ! -f $lt_ac_sed && break
5455 cat /dev/null > conftest.in
5457 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5458 # Check for GNU sed and select it if it is found.
5459 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5460 lt_cv_path_SED=$lt_ac_sed
5464 cat conftest.in conftest.in >conftest.tmp
5465 mv conftest.tmp conftest.in
5466 cp conftest.in conftest.nl
5468 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5469 cmp -s conftest.out conftest.nl || break
5470 # 10000 chars as input seems more than enough
5471 test $lt_ac_count -gt 10 && break
5472 lt_ac_count=`expr $lt_ac_count + 1`
5473 if test $lt_ac_count -gt $lt_ac_max; then
5474 lt_ac_max=$lt_ac_count
5475 lt_cv_path_SED=$lt_ac_sed
5481 AC_MSG_RESULT([$SED])
5483 ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
5484 ## Copyright (C) 1999-2000 Free Software Foundation, Inc.
5486 ## This program is free software; you can redistribute it and/or modify
5487 ## it under the terms of the GNU General Public License as published by
5488 ## the Free Software Foundation; either version 2 of the License, or
5489 ## (at your option) any later version.
5491 ## This program is distributed in the hope that it will be useful, but
5492 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5493 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5494 ## General Public License for more details.
5496 ## You should have received a copy of the GNU General Public License
5497 ## along with this program; if not, write to the Free Software
5498 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5500 ## As a special exception to the GNU General Public License, if you
5501 ## distribute this file as part of a program that contains a
5502 ## configuration script generated by Autoconf, you may include it under
5503 ## the same distribution terms that you use for the rest of that program.
5505 # serial 6 AC_LIB_LTDL
5509 # Clients of libltdl can use this macro to allow the installer to
5510 # choose between a shipped copy of the ltdl sources or a preinstalled
5511 # version of the library.
5512 AC_DEFUN([AC_WITH_LTDL],
5513 [AC_REQUIRE([AC_LIB_LTDL])
5517 # Unless the user asks us to check, assume no installed ltdl exists.
5518 use_installed_libltdl=no
5520 AC_ARG_WITH([included_ltdl],
5521 [ --with-included-ltdl use the GNU ltdl sources included here])
5523 if test "x$with_included_ltdl" != xyes; then
5524 # We are not being forced to use the included libltdl sources, so
5525 # decide whether there is a useful installed version we can use.
5526 AC_CHECK_HEADER([ltdl.h],
5527 [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
5528 [with_included_ltdl=no],
5529 [with_included_ltdl=yes])
5533 if test "x$enable_ltdl_install" != xyes; then
5534 # If the user did not specify an installable libltdl, then default
5535 # to a convenience lib.
5536 AC_LIBLTDL_CONVENIENCE
5539 if test "x$with_included_ltdl" = xno; then
5540 # If the included ltdl is not to be used. then Use the
5541 # preinstalled libltdl we found.
5542 AC_DEFINE([HAVE_LTDL], 1,
5543 [Define this if a modern libltdl is already installed])
5547 # Report our decision...
5548 AC_MSG_CHECKING([whether to use included libltdl])
5549 AC_MSG_RESULT([$with_included_ltdl])
5551 AC_CONFIG_SUBDIRS([libltdl])
5557 # Perform all the checks necessary for compilation of the ltdl objects
5558 # -- including compiler checks and header checks.
5559 AC_DEFUN([AC_LIB_LTDL],
5561 AC_REQUIRE([AC_PROG_CC])
5562 AC_REQUIRE([AC_C_CONST])
5563 AC_REQUIRE([AC_HEADER_STDC])
5564 AC_REQUIRE([AC_HEADER_DIRENT])
5565 AC_REQUIRE([_LT_AC_CHECK_DLFCN])
5566 AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
5567 AC_REQUIRE([AC_LTDL_SHLIBEXT])
5568 AC_REQUIRE([AC_LTDL_SHLIBPATH])
5569 AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
5570 AC_REQUIRE([AC_LTDL_OBJDIR])
5571 AC_REQUIRE([AC_LTDL_DLPREOPEN])
5572 AC_REQUIRE([AC_LTDL_DLLIB])
5573 AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
5574 AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
5575 AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
5576 AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
5578 AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \
5580 AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
5581 AC_CHECK_HEADERS([string.h strings.h], [break])
5583 AC_CHECK_FUNCS([strchr index], [break])
5584 AC_CHECK_FUNCS([strrchr rindex], [break])
5585 AC_CHECK_FUNCS([memcpy bcopy], [break])
5586 AC_CHECK_FUNCS([memmove strcmp])
5587 AC_CHECK_FUNCS([closedir opendir readdir])
5591 # AC_LTDL_ENABLE_INSTALL
5592 # ----------------------
5593 AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
5594 [AC_ARG_ENABLE([ltdl-install],
5595 [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])])
5597 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
5598 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
5599 ])])# AC_LTDL_ENABLE_INSTALL
5602 # AC_LTDL_SYS_DLOPEN_DEPLIBS
5603 # --------------------------
5604 AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
5605 [AC_REQUIRE([AC_CANONICAL_HOST])
5606 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
5607 [libltdl_cv_sys_dlopen_deplibs],
5608 [# PORTME does your system automatically load deplibs for dlopen?
5609 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
5610 # For now, we just catch OSes we know something about -- in the
5611 # future, we'll try test this programmatically.
5612 libltdl_cv_sys_dlopen_deplibs=unknown
5614 aix3*|aix4.1.*|aix4.2.*)
5615 # Unknown whether this is true for these versions of AIX, but
5616 # we want this `case' here to explicitly catch those versions.
5617 libltdl_cv_sys_dlopen_deplibs=unknown
5620 libltdl_cv_sys_dlopen_deplibs=yes
5623 libltdl_cv_sys_dlopen_deplibs=yes
5626 libltdl_cv_sys_dlopen_deplibs=yes
5628 irix[[12345]]*|irix6.[[01]]*)
5629 # Catch all versions of IRIX before 6.2, and indicate that we don't
5630 # know how it worked for any of those versions.
5631 libltdl_cv_sys_dlopen_deplibs=unknown
5634 # The case above catches anything before 6.2, and it's known that
5635 # at 6.2 and later dlopen does load deplibs.
5636 libltdl_cv_sys_dlopen_deplibs=yes
5639 libltdl_cv_sys_dlopen_deplibs=yes
5642 libltdl_cv_sys_dlopen_deplibs=yes
5645 libltdl_cv_sys_dlopen_deplibs=yes
5648 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
5649 # it did *not* use an RPATH in a shared library to find objects the
5650 # library depends on, so we explictly say `no'.
5651 libltdl_cv_sys_dlopen_deplibs=no
5653 osf5.0|osf5.0a|osf5.1)
5654 # dlopen *does* load deplibs and with the right loader patch applied
5655 # it even uses RPATH in a shared library to search for shared objects
5656 # that the library depends on, but there's no easy way to know if that
5657 # patch is installed. Since this is the case, all we can really
5658 # say is unknown -- it depends on the patch being installed. If
5659 # it is, this changes to `yes'. Without it, it would be `no'.
5660 libltdl_cv_sys_dlopen_deplibs=unknown
5663 # the two cases above should catch all versions of osf <= 5.1. Read
5664 # the comments above for what we know about them.
5665 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
5666 # is used to find them so we can finally say `yes'.
5667 libltdl_cv_sys_dlopen_deplibs=yes
5670 libltdl_cv_sys_dlopen_deplibs=yes
5674 if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
5675 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
5676 [Define if the OS needs help to load dependent libraries for dlopen().])
5678 ])# AC_LTDL_SYS_DLOPEN_DEPLIBS
5683 AC_DEFUN([AC_LTDL_SHLIBEXT],
5684 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
5685 AC_CACHE_CHECK([which extension is used for shared libraries],
5686 [libltdl_cv_shlibext],
5688 for ac_spec in $library_names_spec; do
5691 echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
5692 libltdl_cv_shlibext=`cat conftest`
5695 if test -n "$libltdl_cv_shlibext"; then
5696 AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
5697 [Define to the extension used for shared libraries, say, ".so".])
5699 ])# AC_LTDL_SHLIBEXT
5704 AC_DEFUN([AC_LTDL_SHLIBPATH],
5705 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
5706 AC_CACHE_CHECK([which variable specifies run-time library path],
5707 [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"])
5708 if test -n "$libltdl_cv_shlibpath_var"; then
5709 AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
5710 [Define to the name of the environment variable that determines the dynamic library search path.])
5712 ])# AC_LTDL_SHLIBPATH
5715 # AC_LTDL_SYSSEARCHPATH
5716 # ---------------------
5717 AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
5718 [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
5719 AC_CACHE_CHECK([for the default library search path],
5720 [libltdl_cv_sys_search_path],
5721 [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
5722 if test -n "$libltdl_cv_sys_search_path"; then
5724 for dir in $libltdl_cv_sys_search_path; do
5725 if test -z "$sys_search_path"; then
5726 sys_search_path="$dir"
5728 sys_search_path="$sys_search_path$PATH_SEPARATOR$dir"
5731 AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
5732 [Define to the system default library search path.])
5734 ])# AC_LTDL_SYSSEARCHPATH
5739 AC_DEFUN([AC_LTDL_OBJDIR],
5740 [AC_CACHE_CHECK([for objdir],
5741 [libltdl_cv_objdir],
5742 [libltdl_cv_objdir="$objdir"
5743 if test -n "$objdir"; then
5746 rm -f .libs 2>/dev/null
5747 mkdir .libs 2>/dev/null
5748 if test -d .libs; then
5749 libltdl_cv_objdir=.libs
5751 # MS-DOS does not allow filenames that begin with a dot.
5752 libltdl_cv_objdir=_libs
5754 rmdir .libs 2>/dev/null
5757 AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
5758 [Define to the sub-directory in which libtool stores uninstalled libraries.])
5764 AC_DEFUN([AC_LTDL_DLPREOPEN],
5765 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
5766 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
5767 [libltdl_cv_preloaded_symbols],
5768 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
5769 libltdl_cv_preloaded_symbols=yes
5771 libltdl_cv_preloaded_symbols=no
5774 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
5775 AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
5776 [Define if libtool can extract symbol lists from object files.])
5778 ])# AC_LTDL_DLPREOPEN
5783 AC_DEFUN([AC_LTDL_DLLIB],
5788 AC_CHECK_FUNC([shl_load],
5789 [AC_DEFINE([HAVE_SHL_LOAD], [1],
5790 [Define if you have the shl_load function.])],
5791 [AC_CHECK_LIB([dld], [shl_load],
5792 [AC_DEFINE([HAVE_SHL_LOAD], [1],
5793 [Define if you have the shl_load function.])
5794 LIBADD_DL="$LIBADD_DL -ldld"],
5795 [AC_CHECK_LIB([dl], [dlopen],
5796 [AC_DEFINE([HAVE_LIBDL], [1],
5797 [Define if you have the libdl library or equivalent.])
5798 LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"],
5799 [AC_TRY_LINK([#if HAVE_DLFCN_H
5804 [AC_DEFINE([HAVE_LIBDL], [1],
5805 [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"],
5806 [AC_CHECK_LIB([svld], [dlopen],
5807 [AC_DEFINE([HAVE_LIBDL], [1],
5808 [Define if you have the libdl library or equivalent.])
5809 LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"],
5810 [AC_CHECK_LIB([dld], [dld_link],
5811 [AC_DEFINE([HAVE_DLD], [1],
5812 [Define if you have the GNU dld library.])
5813 LIBADD_DL="$LIBADD_DL -ldld"
5821 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
5823 lt_save_LIBS="$LIBS"
5824 LIBS="$LIBS $LIBADD_DL"
5825 AC_CHECK_FUNCS([dlerror])
5826 LIBS="$lt_save_LIBS"
5832 # AC_LTDL_SYMBOL_USCORE
5833 # ---------------------
5834 # does the compiler prefix global symbols with an underscore?
5835 AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
5836 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
5837 AC_CACHE_CHECK([for _ prefix in compiled symbols],
5838 [ac_cv_sys_symbol_underscore],
5839 [ac_cv_sys_symbol_underscore=no
5840 cat > conftest.$ac_ext <<EOF
5841 void nm_test_func(){}
5842 int main(){nm_test_func;return 0;}
5844 if AC_TRY_EVAL(ac_compile); then
5845 # Now try to grab the symbols.
5846 ac_nlist=conftest.nm
5847 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
5848 # See whether the symbols have a leading underscore.
5849 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
5850 ac_cv_sys_symbol_underscore=yes
5852 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
5855 echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
5859 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
5862 echo "configure: failed program was:" >&AC_FD_CC
5863 cat conftest.c >&AC_FD_CC
5867 ])# AC_LTDL_SYMBOL_USCORE
5870 # AC_LTDL_DLSYM_USCORE
5871 # --------------------
5872 AC_DEFUN([AC_LTDL_DLSYM_USCORE],
5873 [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
5874 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
5875 if test x"$libltdl_cv_func_dlopen" = xyes ||
5876 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
5877 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
5878 [libltdl_cv_need_uscore],
5879 [libltdl_cv_need_uscore=unknown
5881 LIBS="$LIBS $LIBADD_DL"
5882 _LT_AC_TRY_DLOPEN_SELF(
5883 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
5884 [], [libltdl_cv_need_uscore=cross])
5890 if test x"$libltdl_cv_need_uscore" = xyes; then
5891 AC_DEFINE(NEED_USCORE, 1,
5892 [Define if dlsym() requires a leading underscore in symbol names.])
5894 ])# AC_LTDL_DLSYM_USCORE
5898 AC_DEFUN([AC_LTDL_FUNC_ARGZ],
5899 [AC_CHECK_HEADERS([argz.h])
5901 AC_CHECK_TYPES([error_t],
5903 [AC_DEFINE([error_t], [int],
5904 [Define to a type to use for `error_t' if it is not otherwise available.])],
5909 AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
5910 ])# AC_LTDL_FUNC_ARGZ