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
481 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
482 SAVE_CFLAGS="$CFLAGS"
483 CFLAGS="$CFLAGS -belf"
484 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
486 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
488 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
489 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
490 CFLAGS="$SAVE_CFLAGS"
493 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
494 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
495 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
496 AC_CHECK_TOOL(AS, as, false)
497 AC_CHECK_TOOL(OBJDUMP, objdump, false)
499 # recent cygwin and mingw systems supply a stub DllMain which the user
500 # can override, but on older systems we have to supply one
501 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
503 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
505 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
508 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
509 # old mingw systems require "-dll" to link a DLL, while more recent ones
511 SAVE_CFLAGS="$CFLAGS"
512 CFLAGS="$CFLAGS -mdll"
513 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
514 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
515 CFLAGS="$SAVE_CFLAGS" ;;
516 *-*-cygwin* | *-*-pw32*)
517 # cygwin systems need to pass --dll to the linker, and not link
518 # crt.o which will require a WinMain@16 definition.
519 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
525 need_locks="$enable_libtool_lock"
530 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
531 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
532 # ----------------------------------------------------------------
533 # Check whether the given compiler option works
534 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
535 [AC_CACHE_CHECK([$1], [$2],
537 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
538 save_CFLAGS="$CFLAGS"
540 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
541 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
542 # The compiler can only warn and ignore the option if not recognized
543 # So say no if there are warnings
544 if test -s conftest.err; then
545 # Append any errors to the config.log.
546 cat conftest.err 1>&AS_MESSAGE_LOG_FD
552 CFLAGS="$save_CFLAGS"
555 if test x"[$]$2" = xyes; then
556 ifelse([$5], , :, [$5])
558 ifelse([$6], , :, [$6])
560 ])# AC_LIBTOOL_COMPILER_OPTION
563 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
564 # [ACTION-SUCCESS], [ACTION-FAILURE])
565 # ------------------------------------------------------------
566 # Check whether the given compiler option works
567 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
568 [AC_CACHE_CHECK([$1], [$2],
570 save_LDFLAGS="$LDFLAGS"
571 LDFLAGS="$LDFLAGS $3"
572 printf "$lt_simple_link_test_code" > conftest.$ac_ext
573 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; 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
577 # Append any errors to the config.log.
578 cat conftest.err 1>&AS_MESSAGE_LOG_FD
584 LDFLAGS="$save_LDFLAGS"
587 if test x"[$]$2" = xyes; then
588 ifelse([$4], , :, [$4])
590 ifelse([$5], , :, [$5])
592 ])# AC_LIBTOOL_LINKER_OPTION
595 # AC_LIBTOOL_SYS_MAX_CMD_LEN
596 # --------------------------
597 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
598 [# find the maximum length of command line arguments
599 AC_MSG_CHECKING([the maximum length of command line arguments])
600 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
606 # On DJGPP, this test can blow up pretty badly due to problems in libc
607 # (any single argument exceeding 2000 bytes causes a buffer overrun
608 # during glob expansion). Even if it were fixed, the result of this
609 # check would be larger than it should be.
610 lt_cv_sys_max_cmd_len=12288; # 12K is about right
614 # Under GNU Hurd, this test is not required because there is
615 # no limit to the length of command line arguments.
616 # Libtool will interpret -1 as no limit whatsoever
617 lt_cv_sys_max_cmd_len=-1;
621 # If test is not a shell built-in, we'll probably end up computing a
622 # maximum length that is only half of the actual maximum length, but
624 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
625 = "XX$testring") >/dev/null 2>&1 &&
626 new_result=`expr "X$testring" : ".*" 2>&1` &&
627 lt_cv_sys_max_cmd_len=$new_result &&
628 test $i != 17 # 1/2 MB should be enough
631 testring=$testring$testring
634 # Add a significant safety factor because C++ compilers can tack on massive
635 # amounts of additional arguments before passing them to the linker.
636 # It appears as though 1/2 is a usable value.
637 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
641 if test -n $lt_cv_sys_max_cmd_len ; then
642 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
646 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
650 # --------------------
651 AC_DEFUN([_LT_AC_CHECK_DLFCN],
652 [AC_CHECK_HEADERS(dlfcn.h)dnl
653 ])# _LT_AC_CHECK_DLFCN
656 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
657 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
658 # ------------------------------------------------------------------
659 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
660 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
661 if test "$cross_compiling" = yes; then :
664 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
665 lt_status=$lt_dlunknown
666 cat > conftest.$ac_ext <<EOF
667 [#line __oline__ "configure"
668 #include "confdefs.h"
677 # define LT_DLGLOBAL RTLD_GLOBAL
680 # define LT_DLGLOBAL DL_GLOBAL
682 # define LT_DLGLOBAL 0
686 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
687 find out it does not work in some platform. */
688 #ifndef LT_DLLAZY_OR_NOW
690 # define LT_DLLAZY_OR_NOW RTLD_LAZY
693 # define LT_DLLAZY_OR_NOW DL_LAZY
696 # define LT_DLLAZY_OR_NOW RTLD_NOW
699 # define LT_DLLAZY_OR_NOW DL_NOW
701 # define LT_DLLAZY_OR_NOW 0
709 extern "C" void exit (int);
712 void fnord() { int i=42;}
715 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
716 int status = $lt_dlunknown;
720 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
721 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
722 /* dlclose (self); */
728 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
729 (./conftest; exit; ) 2>/dev/null
732 x$lt_dlno_uscore) $1 ;;
733 x$lt_dlneed_uscore) $2 ;;
734 x$lt_unknown|x*) $3 ;;
742 ])# _LT_AC_TRY_DLOPEN_SELF
745 # AC_LIBTOOL_DLOPEN_SELF
746 # -------------------
747 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
748 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
749 if test "x$enable_dlopen" != xyes; then
750 enable_dlopen=unknown
751 enable_dlopen_self=unknown
752 enable_dlopen_self_static=unknown
759 lt_cv_dlopen="load_add_on"
761 lt_cv_dlopen_self=yes
764 cygwin* | mingw* | pw32*)
765 lt_cv_dlopen="LoadLibrary"
770 AC_CHECK_FUNC([shl_load],
771 [lt_cv_dlopen="shl_load"],
772 [AC_CHECK_LIB([dld], [shl_load],
773 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
774 [AC_CHECK_FUNC([dlopen],
775 [lt_cv_dlopen="dlopen"],
776 [AC_CHECK_LIB([dl], [dlopen],
777 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
778 [AC_CHECK_LIB([svld], [dlopen],
779 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
780 [AC_CHECK_LIB([dld], [dld_link],
781 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
790 if test "x$lt_cv_dlopen" != xno; then
796 case $lt_cv_dlopen in
798 save_CPPFLAGS="$CPPFLAGS"
799 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
801 save_LDFLAGS="$LDFLAGS"
802 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
805 LIBS="$lt_cv_dlopen_libs $LIBS"
807 AC_CACHE_CHECK([whether a program can dlopen itself],
808 lt_cv_dlopen_self, [dnl
809 _LT_AC_TRY_DLOPEN_SELF(
810 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
811 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
814 if test "x$lt_cv_dlopen_self" = xyes; then
815 LDFLAGS="$LDFLAGS $link_static_flag"
816 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
817 lt_cv_dlopen_self_static, [dnl
818 _LT_AC_TRY_DLOPEN_SELF(
819 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
820 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
824 CPPFLAGS="$save_CPPFLAGS"
825 LDFLAGS="$save_LDFLAGS"
830 case $lt_cv_dlopen_self in
831 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
832 *) enable_dlopen_self=unknown ;;
835 case $lt_cv_dlopen_self_static in
836 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
837 *) enable_dlopen_self_static=unknown ;;
840 ])# AC_LIBTOOL_DLOPEN_SELF
843 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
844 # ---------------------------------
845 # Check to see if options -c and -o are simultaneously supported by compiler
846 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
847 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
848 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
849 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
850 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
851 $rm -r conftest 2>/dev/null
855 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
856 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
857 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
858 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
859 [$1],[F77],[save_FFLAGS="$FFLAGS"
860 FFLAGS="$FFLAGS -o out/conftest2.$ac_objext"],
861 [$1],[GCJ],[save_GCJFLAGS="$CFLAGS"
862 CFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
863 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
865 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
866 # that will create temporary files in the current directory regardless of
867 # the output directory. Thus, making CWD read-only will cause this test
868 # to fail, enabling locking or at least warning the user not to do parallel
872 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
874 # The compiler can only warn and ignore the option if not recognized
875 # So say no if there are warnings
876 if test -s out/conftest.err; then
877 # Append any errors to the config.log.
878 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
880 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
883 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
884 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
885 [$1],[F77],[FFLAGS="$save_FFLAGS"],
886 [$1],[GCJ],[CFLAGS="$save_CFLAGS"])
894 ])# AC_LIBTOOL_PROG_CC_C_O
897 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
898 # -----------------------------------------
899 # Check to see if we can do hard links to lock some files if needed
900 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
901 [AC_REQUIRE([_LT_AC_LOCK])dnl
903 hard_links="nottested"
904 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
905 # do not overwrite the value of need_locks provided by the user
906 AC_MSG_CHECKING([if we can lock with hard links])
909 ln conftest.a conftest.b 2>/dev/null && hard_links=no
911 ln conftest.a conftest.b 2>&5 || hard_links=no
912 ln conftest.a conftest.b 2>/dev/null && hard_links=no
913 AC_MSG_RESULT([$hard_links])
914 if test "$hard_links" = no; then
915 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
921 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
926 AC_DEFUN([AC_LIBTOOL_OBJDIR],
927 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
928 [rm -f .libs 2>/dev/null
929 mkdir .libs 2>/dev/null
930 if test -d .libs; then
933 # MS-DOS does not allow filenames that begin with a dot.
936 rmdir .libs 2>/dev/null])
938 ])# AC_LIBTOOL_OBJDIR
941 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
942 # ----------------------------------------------
943 # Check hardcoding attributes.
944 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
945 [AC_MSG_CHECKING([how to hardcode library paths into programs])
946 _LT_AC_TAGVAR(hardcode_action, $1)=
947 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
948 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
950 # We can hardcode non-existant directories.
951 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
952 # If the only mechanism to avoid hardcoding is shlibpath_var, we
953 # have to relink, otherwise we might link with an installed library
954 # when we should be linking with a yet-to-be-installed one
955 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
956 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
957 # Linking always hardcodes the temporary library directory.
958 _LT_AC_TAGVAR(hardcode_action, $1)=relink
960 # We can link without hardcoding, and we can hardcode nonexisting dirs.
961 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
964 # We cannot hardcode anything, or else we can only hardcode existing
966 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
968 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
970 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
971 # Fast installation is not supported
972 enable_fast_install=no
973 elif test "$shlibpath_overrides_runpath" = yes ||
974 test "$enable_shared" = no; then
975 # Fast installation is not necessary
976 enable_fast_install=needless
978 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
981 # AC_LIBTOOL_SYS_LIB_STRIP
982 # ------------------------
983 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
986 AC_MSG_CHECKING([whether stripping libraries is possible])
987 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
988 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
989 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
994 ])# AC_LIBTOOL_SYS_LIB_STRIP
997 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
998 # -----------------------------
999 # PORTME Fill in your ld.so characteristics
1000 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1001 [AC_MSG_CHECKING([dynamic linker characteristics])
1003 libname_spec='lib$name'
1010 shlibpath_overrides_runpath=unknown
1012 dynamic_linker="$host_os ld.so"
1013 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1014 if test "$GCC" = yes; then
1015 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
1016 if echo "$sys_lib_search_path_spec" | egrep ';' >/dev/null ; then
1017 # if the path contains ";" then we assume it to be the separator
1018 # otherwise default to the standard path separator (i.e. ":") - it is
1019 # assumed that no part of a normal pathname contains ";" but that should
1020 # okay in the real world where ";" in dirpaths is itself problematic.
1021 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1023 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1026 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1028 need_lib_prefix=unknown
1029 hardcode_into_libs=no
1031 # when you set need_version to no, make sure it does not cause -set_version
1032 # flags to be left without arguments
1033 need_version=unknown
1038 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1039 shlibpath_var=LIBPATH
1041 # AIX 3 has no versioning support, so we append a major version to the name.
1042 soname_spec='${libname}${release}.so$major'
1047 if test "$host_cpu" = ia64; then
1048 # AIX 5 supports IA64
1049 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1050 shlibpath_var=LD_LIBRARY_PATH
1052 # With GCC up to 2.95.x, collect2 would create an import file
1053 # for dependence libraries. The import file would start with
1054 # the line `#! .'. This would cause the generated library to
1055 # depend on `.', always an invalid library. This was fixed in
1056 # development snapshots of GCC prior to 3.0.
1058 aix4 | aix4.[[01]] | aix4.[[01]].*)
1059 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1061 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1068 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1069 # soname into executable. Probably we can add versioning support to
1070 # collect2, so additional links can be useful in future.
1071 if test "$aix_use_runtimelinking" = yes; then
1072 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1073 # instead of lib<name>.a to let people know that these are not
1074 # typical AIX shared libraries.
1075 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1077 # We preserve .a as extension for shared libraries through AIX4.2
1078 # and later when we are not doing run time linking.
1079 library_names_spec='${libname}${release}.a $libname.a'
1080 soname_spec='${libname}${release}.so$major'
1082 shlibpath_var=LIBPATH
1087 library_names_spec='$libname.ixlibrary $libname.a'
1088 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1089 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'
1093 library_names_spec='${libname}.so'
1094 dynamic_linker="$host_os ld.so"
1095 shlibpath_var=LIBRARY_PATH
1101 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1102 soname_spec='${libname}${release}.so$major'
1103 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1104 shlibpath_var=LD_LIBRARY_PATH
1105 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1106 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1107 # the default ld.so.conf also contains /usr/contrib/lib and
1108 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1109 # libtool to hard-code these into programs
1112 cygwin* | mingw* | pw32*)
1113 version_type=windows
1116 case $GCC,$host_os in
1118 library_names_spec='$libname.dll.a'
1119 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1120 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1121 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1122 dldir=$destdir/`dirname \$dlpath`~
1123 test -d \$dldir || mkdir -p \$dldir~
1124 $install_prog .libs/$dlname \$dldir/$dlname'
1125 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1126 dlpath=$dir/\$dldll~
1128 shlibpath_overrides_runpath=yes
1131 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1132 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g"`
1133 if echo "$sys_lib_search_path_spec" | [egrep ';[c-zC-Z]:/' >/dev/null]; then
1134 # It is most probably a Windows format PATH printed by
1135 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1136 # path with ; separators, and with drive letters. We can handle the
1137 # drive letters (cygwin fileutils understands them), so leave them,
1138 # especially as we might pass files found there to a mingw objdump,
1139 # which wouldn't understand a cygwinified path. Ahh.
1140 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1142 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1146 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1149 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
1152 dynamic_linker='Win32 ld.exe'
1153 # FIXME: first we should search . and the directory the executable is in
1157 darwin* | rhapsody*)
1158 dynamic_linker="$host_os dyld"
1162 # FIXME: Relying on posixy $() will cause problems for
1163 # cross-compilation, but unfortunately the echo tests do not
1164 # yet detect zsh echo's removal of \ escapes.
1165 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)'
1166 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1167 shlibpath_overrides_runpath=yes
1168 shlibpath_var=DYLD_LIBRARY_PATH
1175 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1176 soname_spec='${libname}${release}.so$major'
1177 shlibpath_var=LD_LIBRARY_PATH
1185 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1186 version_type=freebsd-$objformat
1187 case $version_type in
1189 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1194 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1198 shlibpath_var=LD_LIBRARY_PATH
1201 shlibpath_overrides_runpath=yes
1203 freebsd3.[01]* | freebsdelf3.[01]*)
1204 shlibpath_overrides_runpath=yes
1205 hardcode_into_libs=yes
1208 shlibpath_overrides_runpath=no
1209 hardcode_into_libs=yes
1218 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1219 soname_spec='${libname}${release}.so$major'
1220 shlibpath_var=LD_LIBRARY_PATH
1221 hardcode_into_libs=yes
1224 hpux9* | hpux10* | hpux11*)
1225 # Give a soname corresponding to the major version so that dld.sl refuses to
1226 # link against other versions.
1230 if test "$host_cpu" = ia64; then
1231 hardcode_into_libs=yes
1232 dynamic_linker="$host_os dld.so"
1233 shlibpath_var=LD_LIBRARY_PATH
1234 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1235 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1236 soname_spec='${libname}${release}.so$major'
1237 if test "X$HPUX_IA64_MODE" = X32; then
1238 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1240 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1242 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1244 dynamic_linker="$host_os dld.sl"
1245 shlibpath_var=SHLIB_PATH
1246 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1247 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1248 soname_spec='${libname}${release}.sl$major'
1250 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1251 postinstall_cmds='chmod 555 $lib'
1254 irix5* | irix6* | nonstopux*)
1256 nonstopux*) version_type=nonstopux ;;
1257 *) version_type=irix ;;
1261 soname_spec='${libname}${release}.so$major'
1262 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1264 irix5* | nonstopux*)
1268 case $LD in # libtool.m4 will add one of these switches to LD
1269 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1270 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1271 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1272 *) libsuff= shlibsuff= libmagic=never-match;;
1276 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1277 shlibpath_overrides_runpath=no
1278 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1279 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1282 # No shared lib support for Linux oldld, aout, or coff.
1283 linux*oldld* | linux*aout* | linux*coff*)
1287 # This must be Linux ELF.
1292 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1293 soname_spec='${libname}${release}.so$major'
1294 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1295 shlibpath_var=LD_LIBRARY_PATH
1296 shlibpath_overrides_runpath=no
1297 # This implies no fast_install, which is unacceptable.
1298 # Some rework will be needed to allow for fast_install
1299 # before this can be enabled.
1300 hardcode_into_libs=yes
1302 # We used to test for /lib/ld.so.1 and disable shared libraries on
1303 # powerpc, because MkLinux only supported shared libraries with the
1304 # GNU dynamic linker. Since this was broken with cross compilers,
1305 # most powerpc-linux boxes support dynamic linking these days and
1306 # people can always --disable-shared, the test was removed, and we
1307 # assume the GNU/Linux dynamic linker is in use.
1308 dynamic_linker='GNU/Linux ld.so'
1315 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1316 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1317 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1318 dynamic_linker='NetBSD (a.out) ld.so'
1320 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1321 soname_spec='${libname}${release}.so$major'
1322 dynamic_linker='NetBSD ld.elf_so'
1324 shlibpath_var=LD_LIBRARY_PATH
1325 shlibpath_overrides_runpath=yes
1326 hardcode_into_libs=yes
1331 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1332 shlibpath_var=LD_LIBRARY_PATH
1333 shlibpath_overrides_runpath=yes
1340 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1341 soname_spec='${libname}${release}.so$major'
1342 shlibpath_var=LD_LIBRARY_PATH
1343 shlibpath_overrides_runpath=yes
1350 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1351 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1352 shlibpath_var=LD_LIBRARY_PATH
1353 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1355 openbsd2.[[89]] | openbsd2.[[89]].*)
1356 shlibpath_overrides_runpath=no
1359 shlibpath_overrides_runpath=yes
1363 shlibpath_overrides_runpath=yes
1368 libname_spec='$name'
1370 library_names_spec='$libname.dll $libname.a'
1371 dynamic_linker='OS/2 ld.exe'
1372 shlibpath_var=LIBPATH
1375 osf3* | osf4* | osf5*)
1379 soname_spec='${libname}${release}.so$major'
1380 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1381 shlibpath_var=LD_LIBRARY_PATH
1382 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1383 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1388 soname_spec='${libname}${release}.so$major'
1389 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1390 shlibpath_var=LD_LIBRARY_PATH
1397 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1398 soname_spec='${libname}${release}.so$major'
1399 shlibpath_var=LD_LIBRARY_PATH
1400 shlibpath_overrides_runpath=yes
1401 hardcode_into_libs=yes
1402 # ldd complains unless libraries are executable
1403 postinstall_cmds='chmod +x $lib'
1408 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1409 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1410 shlibpath_var=LD_LIBRARY_PATH
1411 shlibpath_overrides_runpath=yes
1412 if test "$with_gnu_ld" = yes; then
1418 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1420 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1421 soname_spec='${libname}${release}.so$major'
1422 shlibpath_var=LD_LIBRARY_PATH
1423 case $host_vendor in
1425 shlibpath_overrides_runpath=no
1427 export_dynamic_flag_spec='${wl}-Blargedynsym'
1428 runpath_var=LD_RUN_PATH
1436 shlibpath_overrides_runpath=no
1437 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1443 if test -d /usr/nec ;then
1445 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1446 soname_spec='$libname.so.$major'
1447 shlibpath_var=LD_LIBRARY_PATH
1453 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1454 soname_spec='${libname}${release}.so$major'
1455 shlibpath_var=LD_LIBRARY_PATH
1462 AC_MSG_RESULT([$dynamic_linker])
1463 test "$dynamic_linker" = no && can_build_shared=no
1464 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1469 AC_DEFUN([_LT_AC_TAGCONFIG],
1470 [AC_ARG_WITH([tags],
1471 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1472 [include additional configurations @<:@automatic@:>@])],
1473 [tagnames="$withval"])
1475 if test -f "$ltmain" && test -n "$tagnames"; then
1476 if test ! -f "${ofile}"; then
1477 AC_MSG_WARN([output file `$ofile' does not exist])
1480 if test -z "$LTCC"; then
1481 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1482 if test -z "$LTCC"; then
1483 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1485 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1489 # Extract list of available tagged configurations in $ofile.
1490 # Note that this assumes the entire list is on one line.
1491 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1493 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1494 for tagname in $tagnames; do
1496 # Check whether tagname contains only valid characters
1497 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1499 *) AC_MSG_ERROR([invalid tag name: $tagname])
1503 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1505 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1508 # Update the list of available tags.
1509 if test -n "$tagname"; then
1510 echo appending configuration tag \"$tagname\" to $ofile
1514 AC_LIBTOOL_LANG_CXX_CONFIG
1518 AC_LIBTOOL_LANG_F77_CONFIG
1522 AC_LIBTOOL_LANG_GCJ_CONFIG
1526 AC_LIBTOOL_LANG_RC_CONFIG
1530 AC_MSG_ERROR([Unsupported tag name: $tagname])
1534 # Append the new tag name to the list of available tags.
1535 available_tags="$available_tags $tagname"
1540 # Now substitute the updated list of available tags.
1541 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1542 mv "${ofile}T" "$ofile"
1546 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1549 ])# _LT_AC_TAGCONFIG
1554 # enable checks for dlopen support
1555 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1556 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1557 ])# AC_LIBTOOL_DLOPEN
1560 # AC_LIBTOOL_WIN32_DLL
1561 # --------------------
1562 # declare package support for building win32 dll's
1563 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1564 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1565 ])# AC_LIBTOOL_WIN32_DLL
1568 # AC_ENABLE_SHARED([DEFAULT])
1569 # ---------------------------
1570 # implement the --enable-shared flag
1571 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1572 AC_DEFUN([AC_ENABLE_SHARED],
1573 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1574 AC_ARG_ENABLE([shared],
1575 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1576 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1577 [p=${PACKAGE-default}
1579 yes) enable_shared=yes ;;
1580 no) enable_shared=no ;;
1583 # Look at the argument we got. We use all the common list separators.
1584 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1585 for pkg in $enableval; do
1587 if test "X$pkg" = "X$p"; then
1594 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1595 ])# AC_ENABLE_SHARED
1600 #- set the default shared flag to --disable-shared
1601 AC_DEFUN([AC_DISABLE_SHARED],
1602 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1603 AC_ENABLE_SHARED(no)
1604 ])# AC_DISABLE_SHARED
1607 # AC_ENABLE_STATIC([DEFAULT])
1608 # ---------------------------
1609 # implement the --enable-static flag
1610 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1611 AC_DEFUN([AC_ENABLE_STATIC],
1612 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1613 AC_ARG_ENABLE([static],
1614 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1615 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1616 [p=${PACKAGE-default}
1618 yes) enable_static=yes ;;
1619 no) enable_static=no ;;
1622 # Look at the argument we got. We use all the common list separators.
1623 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1624 for pkg in $enableval; do
1626 if test "X$pkg" = "X$p"; then
1633 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1634 ])# AC_ENABLE_STATIC
1639 # set the default static flag to --disable-static
1640 AC_DEFUN([AC_DISABLE_STATIC],
1641 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1642 AC_ENABLE_STATIC(no)
1643 ])# AC_DISABLE_STATIC
1646 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1647 # ---------------------------------
1648 # implement the --enable-fast-install flag
1649 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1650 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1651 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1652 AC_ARG_ENABLE([fast-install],
1653 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1654 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1655 [p=${PACKAGE-default}
1657 yes) enable_fast_install=yes ;;
1658 no) enable_fast_install=no ;;
1660 enable_fast_install=no
1661 # Look at the argument we got. We use all the common list separators.
1662 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1663 for pkg in $enableval; do
1665 if test "X$pkg" = "X$p"; then
1666 enable_fast_install=yes
1672 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1673 ])# AC_ENABLE_FAST_INSTALL
1676 # AC_DISABLE_FAST_INSTALL
1677 # -----------------------
1678 # set the default to --disable-fast-install
1679 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1680 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1681 AC_ENABLE_FAST_INSTALL(no)
1682 ])# AC_DISABLE_FAST_INSTALL
1685 # AC_LIBTOOL_PICMODE([MODE])
1686 # --------------------------
1687 # implement the --with-pic flag
1688 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1689 AC_DEFUN([AC_LIBTOOL_PICMODE],
1690 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1691 pic_mode=ifelse($#,1,$1,default)
1692 ])# AC_LIBTOOL_PICMODE
1695 # AC_PATH_TOOL_PREFIX
1696 # -------------------
1697 # find a file program which can recognise shared library
1698 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1699 [AC_MSG_CHECKING([for $1])
1700 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1702 [[\\/*] | ?:[\\/]*])
1703 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1706 lt_save_MAGIC_CMD="$MAGIC_CMD"
1707 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1708 dnl $ac_dummy forces splitting on constant user-supplied paths.
1709 dnl POSIX.2 word splitting is done only on the output of word expansions,
1710 dnl not every word. This closes a longstanding sh security hole.
1711 ac_dummy="ifelse([$2], , $PATH, [$2])"
1712 for ac_dir in $ac_dummy; do
1714 test -z "$ac_dir" && ac_dir=.
1715 if test -f $ac_dir/$1; then
1716 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1717 if test -n "$file_magic_test_file"; then
1718 case $deplibs_check_method in
1720 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1721 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1722 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1723 egrep "$file_magic_regex" > /dev/null; then
1728 *** Warning: the command libtool uses to detect shared libraries,
1729 *** $file_magic_cmd, produces output that libtool cannot recognize.
1730 *** The result is that libtool may fail to recognize shared libraries
1731 *** as such. This will affect the creation of libtool libraries that
1732 *** depend on shared libraries, but programs linked with such libtool
1733 *** libraries will work regardless of this problem. Nevertheless, you
1734 *** may want to report the problem to your system manager and/or to
1735 *** bug-libtool@gnu.org
1745 MAGIC_CMD="$lt_save_MAGIC_CMD"
1748 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1749 if test -n "$MAGIC_CMD"; then
1750 AC_MSG_RESULT($MAGIC_CMD)
1754 ])# AC_PATH_TOOL_PREFIX
1759 # find a file program which can recognise a shared library
1760 AC_DEFUN([AC_PATH_MAGIC],
1761 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1762 if test -z "$lt_cv_path_MAGIC_CMD"; then
1763 if test -n "$ac_tool_prefix"; then
1764 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1774 # find the path to the GNU or non-GNU linker
1775 AC_DEFUN([AC_PROG_LD],
1776 [AC_ARG_WITH([gnu-ld],
1777 [AC_HELP_STRING([--with-gnu-ld],
1778 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1779 [test "$withval" = no || with_gnu_ld=yes],
1781 AC_REQUIRE([AC_PROG_CC])dnl
1782 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1783 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1785 if test "$GCC" = yes; then
1786 # Check if gcc -print-prog-name=ld gives a path.
1787 AC_MSG_CHECKING([for ld used by GCC])
1790 # gcc leaves a trailing carriage return which upsets mingw
1791 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1793 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1796 # Accept absolute paths.
1797 [[\\/]]* | ?:[[\\/]]*)
1798 re_direlt='/[[^/]][[^/]]*/\.\./'
1799 # Canonicalize the path of ld
1800 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1801 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1802 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1804 test -z "$LD" && LD="$ac_prog"
1807 # If it fails, then pretend we aren't using GCC.
1811 # If it is relative, then search for the first ld in PATH.
1815 elif test "$with_gnu_ld" = yes; then
1816 AC_MSG_CHECKING([for GNU ld])
1818 AC_MSG_CHECKING([for non-GNU ld])
1820 AC_CACHE_VAL(lt_cv_path_LD,
1821 [if test -z "$LD"; then
1822 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1823 for ac_dir in $PATH; do
1825 test -z "$ac_dir" && ac_dir=.
1826 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1827 lt_cv_path_LD="$ac_dir/$ac_prog"
1828 # Check to see if the program is GNU ld. I'd rather use --version,
1829 # but apparently some GNU ld's only accept -v.
1830 # Break only if it was the GNU/non-GNU ld that we prefer.
1831 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1832 test "$with_gnu_ld" != no && break
1834 test "$with_gnu_ld" != yes && break
1840 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1843 if test -n "$LD"; then
1848 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1855 AC_DEFUN([AC_PROG_LD_GNU],
1856 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1857 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1858 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1859 lt_cv_prog_gnu_ld=yes
1861 lt_cv_prog_gnu_ld=no
1863 with_gnu_ld=$lt_cv_prog_gnu_ld
1867 # AC_PROG_LD_RELOAD_FLAG
1868 # ----------------------
1869 # find reload flag for linker
1870 # -- PORTME Some linkers may need a different reload flag.
1871 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
1872 [AC_CACHE_CHECK([for $LD option to reload object files],
1873 lt_cv_ld_reload_flag,
1874 [lt_cv_ld_reload_flag='-r'])
1875 reload_flag=$lt_cv_ld_reload_flag
1876 case $reload_flag in
1878 *) reload_flag=" $reload_flag" ;;
1880 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1881 ])# AC_PROG_LD_RELOAD_FLAG
1884 # AC_DEPLIBS_CHECK_METHOD
1885 # -----------------------
1886 # how to check for library dependencies
1887 # -- PORTME fill in with the dynamic library characteristics
1888 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1889 [AC_CACHE_CHECK([how to recognise dependent libraries],
1890 lt_cv_deplibs_check_method,
1891 [lt_cv_file_magic_cmd='$MAGIC_CMD'
1892 lt_cv_file_magic_test_file=
1893 lt_cv_deplibs_check_method='unknown'
1894 # Need to set the preceding variable on all platforms that support
1895 # interlibrary dependencies.
1896 # 'none' -- dependencies not supported.
1897 # `unknown' -- same as none, but documents that we really don't know.
1898 # 'pass_all' -- all dependencies passed with no checks.
1899 # 'test_compile' -- check by making test program.
1900 # 'file_magic [[regex]]' -- check by looking for files in library path
1901 # which responds to the $file_magic_cmd with a given egrep regex.
1902 # If you have `file' or equivalent on your system and you're not sure
1903 # whether `pass_all' will *always* work, you probably want this one.
1907 lt_cv_deplibs_check_method=pass_all
1911 lt_cv_deplibs_check_method=pass_all
1915 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
1916 lt_cv_file_magic_cmd='/usr/bin/file -L'
1917 lt_cv_file_magic_test_file=/shlib/libc.so
1920 cygwin* | mingw* | pw32*)
1921 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1922 lt_cv_file_magic_cmd='$OBJDUMP -f'
1925 darwin* | rhapsody*)
1926 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1927 lt_cv_file_magic_cmd='/usr/bin/file -L'
1929 rhapsody* | darwin1.[[012]])
1930 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
1933 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1939 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1942 # Not sure whether the presence of OpenBSD here was a mistake.
1943 # Let's accept both of them until this is cleared up.
1944 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
1945 lt_cv_file_magic_cmd=/usr/bin/file
1946 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1950 lt_cv_deplibs_check_method=pass_all
1955 lt_cv_deplibs_check_method=pass_all
1958 hpux10.20* | hpux11*)
1959 lt_cv_file_magic_cmd=/usr/bin/file
1960 if test "$host_cpu" = ia64; then
1961 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
1962 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1964 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
1965 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1969 irix5* | irix6* | nonstopux*)
1971 irix5* | nonstopux*)
1972 # this will be overridden with pass_all, but let us keep it just in case
1973 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1977 *-32|*"-32 ") libmagic=32-bit;;
1978 *-n32|*"-n32 ") libmagic=N32;;
1979 *-64|*"-64 ") libmagic=64-bit;;
1980 *) libmagic=never-match;;
1982 # this will be overridden with pass_all, but let us keep it just in case
1983 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
1986 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1987 lt_cv_deplibs_check_method=pass_all
1990 # This must be Linux ELF.
1993 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
1994 lt_cv_deplibs_check_method=pass_all ;;
1996 # glibc up to 2.1.1 does not perform some relocations on ARM
1997 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
1999 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2003 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2004 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2006 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2011 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2012 lt_cv_file_magic_cmd=/usr/bin/file
2013 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2017 lt_cv_deplibs_check_method=unknown
2021 lt_cv_file_magic_cmd=/usr/bin/file
2022 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2023 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2024 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2026 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2030 osf3* | osf4* | osf5*)
2031 # this will be overridden with pass_all, but let us keep it just in case
2032 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2033 lt_cv_file_magic_test_file=/shlib/libc.so
2034 lt_cv_deplibs_check_method=pass_all
2038 lt_cv_deplibs_check_method=pass_all
2042 lt_cv_deplibs_check_method=pass_all
2043 lt_cv_file_magic_test_file=/lib/libc.so
2046 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2047 case $host_vendor in
2049 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]]'
2050 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2053 lt_cv_deplibs_check_method=pass_all
2056 lt_cv_file_magic_cmd='/bin/file'
2057 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2060 lt_cv_file_magic_cmd='/bin/file'
2061 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2062 lt_cv_file_magic_test_file=/lib/libc.so
2065 lt_cv_deplibs_check_method=pass_all
2070 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2071 lt_cv_deplibs_check_method=pass_all
2075 file_magic_cmd=$lt_cv_file_magic_cmd
2076 deplibs_check_method=$lt_cv_deplibs_check_method
2077 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2078 ])# AC_DEPLIBS_CHECK_METHOD
2083 # find the path to a BSD-compatible name lister
2084 AC_DEFUN([AC_PROG_NM],
2085 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2086 [if test -n "$NM"; then
2087 # Let the user override the test.
2090 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2091 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2093 test -z "$ac_dir" && ac_dir=.
2094 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2095 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2096 # Check to see if the nm accepts a BSD-compat flag.
2097 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2098 # nm: unknown option "B" ignored
2099 # Tru64's nm complains that /dev/null is an invalid object file
2100 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2101 lt_cv_path_NM="$tmp_nm -B"
2103 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2104 lt_cv_path_NM="$tmp_nm -p"
2107 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2108 continue # so that we can try to find one that supports BSD flags
2113 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2121 # check for math library
2122 AC_DEFUN([AC_CHECK_LIBM],
2123 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2126 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2127 # These system don't have libm
2130 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2131 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2134 AC_CHECK_LIB(m, main, LIBM="-lm")
2140 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2141 # -----------------------------------
2142 # sets LIBLTDL to the link flags for the libltdl convenience library and
2143 # LTDLINCL to the include flags for the libltdl header and adds
2144 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2145 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2146 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2147 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2148 # '${top_srcdir}/' (note the single quotes!). If your package is not
2149 # flat and you're not using automake, define top_builddir and
2150 # top_srcdir appropriately in the Makefiles.
2151 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2152 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2153 case $enable_ltdl_convenience in
2154 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2155 "") enable_ltdl_convenience=yes
2156 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2158 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2159 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2160 # For backwards non-gettext consistent compatibility...
2162 ])# AC_LIBLTDL_CONVENIENCE
2165 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2166 # -----------------------------------
2167 # sets LIBLTDL to the link flags for the libltdl installable library and
2168 # LTDLINCL to the include flags for the libltdl header and adds
2169 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2170 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2171 # DIRECTORY is not provided and an installed libltdl is not found, it is
2172 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2173 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2174 # quotes!). If your package is not flat and you're not using automake,
2175 # define top_builddir and top_srcdir appropriately in the Makefiles.
2176 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2177 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2178 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2179 AC_CHECK_LIB(ltdl, main,
2180 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2181 [if test x"$enable_ltdl_install" = xno; then
2182 AC_MSG_WARN([libltdl not installed, but installation disabled])
2184 enable_ltdl_install=yes
2187 if test x"$enable_ltdl_install" = x"yes"; then
2188 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2189 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2190 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2192 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2196 # For backwards non-gettext consistent compatibility...
2198 ])# AC_LIBLTDL_INSTALLABLE
2203 # enable support for C++ libraries
2204 AC_DEFUN([AC_LIBTOOL_CXX],
2205 [AC_REQUIRE([_LT_AC_LANG_CXX])
2211 AC_DEFUN([_LT_AC_LANG_CXX],
2212 [AC_REQUIRE([AC_PROG_CXX])
2213 AC_REQUIRE([AC_PROG_CXXCPP])
2214 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
2220 # enable support for Fortran 77 libraries
2221 AC_DEFUN([AC_LIBTOOL_F77],
2222 [AC_REQUIRE([_LT_AC_LANG_F77])
2228 AC_DEFUN([_LT_AC_LANG_F77],
2229 [AC_REQUIRE([AC_PROG_F77])
2230 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
2236 # enable support for GCJ libraries
2237 AC_DEFUN([AC_LIBTOOL_GCJ],
2238 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2244 AC_DEFUN([_LT_AC_LANG_GCJ],
2245 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2246 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2247 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2248 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2249 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2250 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2251 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
2257 # enable support for Windows resource files
2258 AC_DEFUN([AC_LIBTOOL_RC],
2259 [AC_REQUIRE([AC_PROG_RC])
2260 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
2264 # AC_LIBTOOL_LANG_C_CONFIG
2265 # ------------------------
2266 # Ensure that the configuration vars for the C compiler are
2267 # suitably defined. Those variables are subsequently used by
2268 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2269 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2270 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2274 # Source file extension for C test sources.
2277 # Object file extension for compiled C test sources.
2279 _LT_AC_TAGVAR(objext, $1)=$objext
2281 # Code to be used in simple compile tests
2282 lt_simple_compile_test_code="int some_variable = 0;\n"
2284 # Code to be used in simple link tests
2285 lt_simple_link_test_code='main(){return(0);}\n'
2290 # Check for any special shared library compilation flags.
2292 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2293 if test "$GCC" = no; then
2296 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2300 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2301 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2302 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2304 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2305 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2311 # Check to make sure the static flag actually works.
2313 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2314 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2315 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2317 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2321 ## There is no encapsulation within the following macros, do not change
2322 ## the running order or otherwise move them around unless you know exactly
2323 ## what you are doing...
2324 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2325 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2326 AC_LIBTOOL_PROG_CC_C_O($1)
2327 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2328 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2329 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2330 AC_LIBTOOL_SYS_LIB_STRIP
2331 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2332 AC_LIBTOOL_DLOPEN_SELF($1)
2334 # Report which librarie types wil actually be built
2335 AC_MSG_CHECKING([if libtool supports shared libraries])
2336 AC_MSG_RESULT([$can_build_shared])
2338 AC_MSG_CHECKING([whether to build shared libraries])
2339 test "$can_build_shared" = "no" && enable_shared=no
2341 # On AIX, shared libraries and static libraries use the same namespace, and
2342 # are all built from PIC.
2345 test "$enable_shared" = yes && enable_static=no
2346 if test -n "$RANLIB"; then
2347 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2348 postinstall_cmds='$RANLIB $lib'
2353 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2354 test "$enable_shared" = yes && enable_static=no
2358 AC_MSG_RESULT([$enable_shared])
2360 AC_MSG_CHECKING([whether to build static libraries])
2361 # Make sure either enable_shared or enable_static is yes.
2362 test "$enable_shared" = yes || enable_static=yes
2363 AC_MSG_RESULT([$enable_static])
2365 AC_LIBTOOL_CONFIG($1)
2369 ])# AC_LIBTOOL_LANG_C_CONFIG
2372 # AC_LIBTOOL_LANG_CXX_CONFIG
2373 # --------------------------
2374 # Ensure that the configuration vars for the C compiler are
2375 # suitably defined. Those variables are subsequently used by
2376 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2377 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2378 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2380 AC_REQUIRE([AC_PROG_CXX])
2381 AC_REQUIRE([AC_PROG_CXXCPP])
2383 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2384 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2385 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2386 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2387 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2388 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2389 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2390 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2391 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2392 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2393 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2394 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2395 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2397 # Dependencies to place before and after the object being linked:
2398 _LT_AC_TAGVAR(predep_objects, $1)=
2399 _LT_AC_TAGVAR(postdep_objects, $1)=
2400 _LT_AC_TAGVAR(predeps, $1)=
2401 _LT_AC_TAGVAR(postdeps, $1)=
2402 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2404 # Source file extension for C test sources.
2407 # Object file extension for compiled C test sources.
2409 _LT_AC_TAGVAR(objext, $1)=$objext
2411 # Code to be used in simple compile tests
2412 lt_simple_compile_test_code="int some_variable = 0;\n"
2414 # Code to be used in simple link tests
2415 lt_simple_link_test_code='int main(int char *[]) { return(0); }\n'
2417 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2420 # Allow CC to be a program name with arguments.
2425 _LT_AC_TAGVAR(compiler, $1)=$CC
2426 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2428 # We don't want -fno-exception wen compiling C++ code, so set the
2429 # no_builtin_flag separately
2430 if test "$GXX" = yes; then
2431 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2433 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2436 if test "$GXX" = yes; then
2437 # Set up default GNU C++ configuration
2439 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2440 # archiving commands below assume that GNU ld is being used.
2441 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2442 egrep 'GNU ld' > /dev/null; then
2445 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2446 _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'
2448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2449 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2451 # If archive_cmds runs LD, not CC, wlarc should be empty
2452 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2453 # investigate it a little bit more. (MM)
2456 # ancient GNU ld didn't support --whole-archive et. al.
2457 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2458 egrep 'no-whole-archive' > /dev/null; then
2459 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2461 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2467 # A generic and very simple default shared library creation
2468 # command for GNU C++ for the case where it uses the native
2469 # linker, instead of GNU ld. If possible, this setting should
2470 # overridden to take advantage of the native linker features on
2471 # the platform it is being used on.
2472 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2475 # Commands to make compiler produce verbose output that lists
2476 # what "hidden" libraries, object files and flags are used when
2477 # linking a shared library.
2478 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2486 # PORTME: fill in a description of your system's C++ link characteristics
2487 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2488 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2491 # FIXME: insert proper C++ library support
2492 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2495 if test "$host_cpu" = ia64; then
2496 # On IA64, the linker does run time linking by default, so we don't
2497 # have to do anything special.
2498 aix_use_runtimelinking=no
2499 exp_sym_flag='-Bexport'
2502 aix_use_runtimelinking=no
2504 # Test if we are trying to use run time linking or normal
2505 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2506 # need to do runtime linking.
2507 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2508 for ld_flag in $LDFLAGS; do
2509 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2510 aix_use_runtimelinking=yes
2516 exp_sym_flag='-bexport'
2517 no_entry_flag='-bnoentry'
2520 # When large executables or shared objects are built, AIX ld can
2521 # have problems creating the table of contents. If linking a library
2522 # or program results in "error TOC overflow" add -mminimal-toc to
2523 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2524 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2526 _LT_AC_TAGVAR(archive_cmds, $1)=''
2527 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2528 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2529 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2531 if test "$GXX" = yes; then
2532 case $host_os in aix4.[012]|aix4.[012].*)
2533 # We only want to do this on AIX 4.2 and lower, the check
2534 # below for broken collect2 doesn't work under 4.3+
2535 collect2name=`${CC} -print-prog-name=collect2`
2536 if test -f "$collect2name" && \
2537 strings "$collect2name" | grep resolve_lib_name >/dev/null
2539 # We have reworked collect2
2540 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2542 # We have old collect2
2543 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2544 # It fails to find uninstalled libraries when the uninstalled
2545 # path is not listed in the libpath. Setting hardcode_minus_L
2546 # to unsupported forces relinking
2547 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2548 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2549 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2552 shared_flag='-shared'
2555 if test "$host_cpu" = ia64; then
2556 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2557 # chokes on -Wl,-G. The following line is correct:
2560 if test "$aix_use_runtimelinking" = yes; then
2561 shared_flag='${wl}-G'
2563 shared_flag='${wl}-bM:SRE'
2568 # It seems that -bexpall does not export symbols beginning with
2569 # underscore (_), so it is better to generate a list of symbols to export.
2570 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2571 if test "$aix_use_runtimelinking" = yes; then
2572 # Warning - without using the other runtime loading flags (-brtl),
2573 # -berok will link without error, but may produce a broken library.
2574 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2575 # Determine the default libpath from the value encoded in an empty executable.
2576 _LT_AC_SYS_LIBPATH_AIX
2577 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2579 _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"
2581 if test "$host_cpu" = ia64; then
2582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2583 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2584 _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"
2586 # Determine the default libpath from the value encoded in an empty executable.
2587 _LT_AC_SYS_LIBPATH_AIX
2588 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2589 # Warning - without using the other run time loading flags,
2590 # -berok will link without error, but may produce a broken library.
2591 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2592 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2593 # -bexpall does not export symbols beginning with underscore (_)
2594 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2595 # Exported symbols can be pulled into shared objects from archives
2596 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2597 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2598 # This is similar to how AIX traditionally builds it's shared libraries.
2599 _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'
2604 case $cc_basename in
2606 # FIXME: insert proper C++ library support
2607 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2613 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2614 # as there is no search path for DLLs.
2615 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2616 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2618 if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
2619 _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'
2620 _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'
2622 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2627 # FIXME: insert proper C++ library support
2628 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2632 case $cc_basename in
2634 # FIXME: insert proper C++ library support
2635 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2638 # Green Hills C++ Compiler
2639 # FIXME: insert proper C++ library support
2640 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2643 # FIXME: insert proper C++ library support
2644 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2649 # C++ shared libraries reported to be fairly broken before switch to ELF
2650 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2653 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2656 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2658 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2663 if test $with_gnu_ld = no; then
2664 if test "$host_cpu" = ia64; then
2665 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2667 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2668 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2669 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2672 if test "$host_cpu" = ia64; then
2673 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2674 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2676 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2678 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2679 # but as the default
2680 # location of the library.
2682 case $cc_basename in
2684 # FIXME: insert proper C++ library support
2685 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2690 _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'
2693 if test "$host_cpu" = ia64; then
2694 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2696 _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'
2700 # Commands to make compiler produce verbose output that lists
2701 # what "hidden" libraries, object files and flags are used when
2702 # linking a shared library.
2704 # There doesn't appear to be a way to prevent this compiler from
2705 # explicitly linking system object files so we need to strip them
2706 # from the output so that they don't get included in the library
2708 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2711 if test "$GXX" = yes; then
2712 if test $with_gnu_ld = no; then
2715 _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'
2718 if test "$host_cpu" = ia64; then
2719 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2721 _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'
2727 # FIXME: insert proper C++ library support
2728 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2734 case $cc_basename in
2737 _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'
2739 # Archives containing C++ object files must be created using
2740 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
2741 # necessary to make sure instantiated templates are included
2743 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
2746 if test "$GXX" = yes; then
2747 if test "$with_gnu_ld" = no; then
2748 _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'
2750 _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'
2753 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2756 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2757 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2760 case $cc_basename in
2762 # Kuck and Associates, Inc. (KAI) C++ Compiler
2764 # KCC will only create a shared library if the output file
2765 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2766 # to its proper name (with version) after linking.
2767 _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'
2768 _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'
2770 # Commands to make compiler produce verbose output that lists
2771 # what "hidden" libraries, object files and flags are used when
2772 # linking a shared library.
2774 # There doesn't appear to be a way to prevent this compiler from
2775 # explicitly linking system object files so we need to strip them
2776 # from the output so that they don't get included in the library
2778 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "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'
2780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2781 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2783 # Archives containing C++ object files must be created using
2784 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2785 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2789 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2790 _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'
2792 runpath_var=LD_RUN_PATH
2793 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2794 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2796 # Commands to make compiler produce verbose output that lists
2797 # what "hidden" libraries, object files and flags are used when
2798 # linking a shared library.
2800 # There doesn't appear to be a way to prevent this compiler from
2801 # explicitly linking system object files so we need to strip them
2802 # from the output so that they don't get included in the library
2804 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'
2809 # FIXME: insert proper C++ library support
2810 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2813 # FIXME: insert proper C++ library support
2814 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2817 case $cc_basename in
2819 # FIXME: insert proper C++ library support
2820 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2823 # FIXME: insert proper C++ library support
2824 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2829 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2830 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
2832 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2833 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2834 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2836 # Workaround some broken pre-1.5 toolchains
2837 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep conftest.$objext | sed -e "s:-lgcc -lc -lgcc::"'
2840 case $cc_basename in
2842 # Kuck and Associates, Inc. (KAI) C++ Compiler
2844 # KCC will only create a shared library if the output file
2845 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2846 # to its proper name (with version) after linking.
2847 _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'
2849 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2850 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2852 # Archives containing C++ object files must be created using
2853 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2854 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2858 # Rational C++ 2.4.1
2859 # FIXME: insert proper C++ library support
2860 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2863 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2864 _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'
2866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2867 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2869 # Commands to make compiler produce verbose output that lists
2870 # what "hidden" libraries, object files and flags are used when
2871 # linking a shared library.
2873 # There doesn't appear to be a way to prevent this compiler from
2874 # explicitly linking system object files so we need to strip them
2875 # from the output so that they don't get included in the library
2877 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'
2880 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2881 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2882 _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'
2884 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2885 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2887 # Commands to make compiler produce verbose output that lists
2888 # what "hidden" libraries, object files and flags are used when
2889 # linking a shared library.
2890 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2893 # FIXME: insert proper C++ library support
2894 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2900 case $cc_basename in
2902 # Kuck and Associates, Inc. (KAI) C++ Compiler
2904 # KCC will only create a shared library if the output file
2905 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2906 # to its proper name (with version) after linking.
2907 _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'
2909 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2910 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2912 # Archives containing C++ object files must be created using
2913 # the KAI C++ compiler.
2914 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
2917 # Rational C++ 2.4.1
2918 # FIXME: insert proper C++ library support
2919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2922 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2923 _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'
2924 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
2925 echo "-hidden">> $lib.exp~
2926 $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~
2929 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2930 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2932 # Commands to make compiler produce verbose output that lists
2933 # what "hidden" libraries, object files and flags are used when
2934 # linking a shared library.
2936 # There doesn't appear to be a way to prevent this compiler from
2937 # explicitly linking system object files so we need to strip them
2938 # from the output so that they don't get included in the library
2940 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'
2943 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2944 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2945 _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'
2947 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2948 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2950 # Commands to make compiler produce verbose output that lists
2951 # what "hidden" libraries, object files and flags are used when
2952 # linking a shared library.
2953 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2956 # FIXME: insert proper C++ library support
2957 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2963 # FIXME: insert proper C++ library support
2964 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2967 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2968 case $cc_basename in
2970 # FIXME: insert proper C++ library support
2971 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2974 # FIXME: insert proper C++ library support
2975 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2980 case $cc_basename in
2983 # FIXME: insert proper C++ library support
2984 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2988 # FIXME: insert proper C++ library support
2989 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2992 # FIXME: insert proper C++ library support
2993 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2998 case $cc_basename in
3000 # Sun C++ 4.2, 5.x and Centerline C++
3001 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3002 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3003 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3004 $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'
3006 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3007 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3009 solaris2.[0-5] | solaris2.[0-5].*) ;;
3011 # The C++ compiler is used as linker so we must use $wl
3012 # flag to pass the commands to the underlying system
3014 # Supported since Solaris 2.6 (maybe 2.5.1?)
3015 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3018 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3020 # Commands to make compiler produce verbose output that lists
3021 # what "hidden" libraries, object files and flags are used when
3022 # linking a shared library.
3024 # There doesn't appear to be a way to prevent this compiler from
3025 # explicitly linking system object files so we need to strip them
3026 # from the output so that they don't get included in the library
3028 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3030 # Archives containing C++ object files must be created using
3031 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3032 # necessary to make sure instantiated templates are included
3034 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3037 # Green Hills C++ Compiler
3038 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3040 # The C++ compiler must be used to create the archive.
3041 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3044 # GNU C++ compiler with Solaris linker
3045 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3046 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3047 if $CC --version | egrep -v '^2\.7' > /dev/null; then
3048 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3049 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3050 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3052 # Commands to make compiler produce verbose output that lists
3053 # what "hidden" libraries, object files and flags are used when
3054 # linking a shared library.
3055 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3057 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3059 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
3060 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3061 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
3063 # Commands to make compiler produce verbose output that lists
3064 # what "hidden" libraries, object files and flags are used when
3065 # linking a shared library.
3066 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
3069 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3074 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3075 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3078 case $cc_basename in
3080 # NonStop-UX NCC 3.20
3081 # FIXME: insert proper C++ library support
3082 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3085 # FIXME: insert proper C++ library support
3086 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3091 # FIXME: insert proper C++ library support
3092 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3095 # FIXME: insert proper C++ library support
3096 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3099 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3100 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3102 # Figure out "hidden" C++ library dependencies from verbose
3103 # compiler output whening linking a shared library.
3104 cat > conftest.$ac_ext <<EOF
3108 Foo (void) { a = 0; }
3115 if AC_TRY_EVAL(ac_compile); then
3116 # Parse the compiler output and extract the necessary
3117 # objects, libraries and library flags.
3119 # Sentinel used to keep track of whether or not we are before
3120 # the conftest object file.
3121 pre_test_object_deps_done=no
3123 # The `*' in the case matches for architectures that use `case' in
3124 # $output_verbose_cmd can trigger glob expansion during the loop
3125 # eval without this substitution.
3126 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3128 for p in `eval $output_verbose_link_cmd`; do
3132 # Some compilers place space between "-{L,R}" and the path.
3135 || test $p = "-R"; then
3142 if test "$pre_test_object_deps_done" = no; then
3145 # Internal compiler library paths should come after those
3146 # provided the user. The postdeps already come after the
3147 # user supplied libs so there is no need to process them.
3148 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3149 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3151 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3154 # The "-l" case would never come before the object being
3155 # linked, so don't bother handling this case.
3158 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3159 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3161 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3167 # This assumes that the test object file only shows up
3168 # once in the compiler output.
3169 if test "$p" = "conftest.$objext"; then
3170 pre_test_object_deps_done=yes
3174 if test "$pre_test_object_deps_done" = no; then
3175 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3176 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3178 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3181 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3182 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3184 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3189 *) ;; # Ignore the rest.
3197 echo "libtool.m4: error: problem compiling C++ test program"
3200 $rm -f confest.$objext
3202 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3203 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3204 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3207 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3208 _LT_AC_TAGVAR(LD, $1)="$LD"
3211 ## There is no encapsulation within the following macros, do not change
3212 ## the running order or otherwise move them around unless you know exactly
3213 ## what you are doing...
3214 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3215 AC_LIBTOOL_PROG_CC_C_O($1)
3216 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3217 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3218 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3219 AC_LIBTOOL_SYS_LIB_STRIP
3220 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3221 AC_LIBTOOL_DLOPEN_SELF($1)
3223 AC_LIBTOOL_CONFIG($1)
3227 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3230 # AC_LIBTOOL_LANG_F77_CONFIG
3231 # ------------------------
3232 # Ensure that the configuration vars for the C compiler are
3233 # suitably defined. Those variables are subsequently used by
3234 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3235 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3236 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3237 [AC_REQUIRE([AC_PROG_F77])
3238 AC_LANG_PUSH(Fortran 77)
3240 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3241 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3242 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3243 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3244 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3245 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3246 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3247 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3248 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3249 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3250 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3251 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3252 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3254 # Source file extension for f77 test sources.
3257 # Object file extension for compiled f77 test sources.
3259 _LT_AC_TAGVAR(objext, $1)=$objext
3261 # Code to be used in simple compile tests
3262 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3264 # Code to be used in simple link tests
3265 lt_simple_link_test_code=" program t\n end\n"
3267 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3270 # Allow CC to be a program name with arguments.
3275 _LT_AC_TAGVAR(compiler, $1)=$CC
3276 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3278 AC_MSG_CHECKING([if libtool supports shared libraries])
3279 AC_MSG_RESULT([$can_build_shared])
3281 AC_MSG_CHECKING([whether to build shared libraries])
3282 test "$can_build_shared" = "no" && enable_shared=no
3284 # On AIX, shared libraries and static libraries use the same namespace, and
3285 # are all built from PIC.
3288 test "$enable_shared" = yes && enable_static=no
3289 if test -n "$RANLIB"; then
3290 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3291 postinstall_cmds='$RANLIB $lib'
3295 test "$enable_shared" = yes && enable_static=no
3298 AC_MSG_RESULT([$enable_shared])
3300 AC_MSG_CHECKING([whether to build static libraries])
3301 # Make sure either enable_shared or enable_static is yes.
3302 test "$enable_shared" = yes || enable_static=yes
3303 AC_MSG_RESULT([$enable_static])
3305 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3307 _LT_AC_TAGVAR(GCC, $1)="$G77"
3308 _LT_AC_TAGVAR(LD, $1)="$LD"
3310 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3311 AC_LIBTOOL_PROG_CC_C_O($1)
3312 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3313 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3314 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3315 AC_LIBTOOL_SYS_LIB_STRIP
3316 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3318 AC_LIBTOOL_CONFIG($1)
3322 ])# AC_LIBTOOL_LANG_F77_CONFIG
3325 # AC_LIBTOOL_LANG_GCJ_CONFIG
3326 # --------------------------
3327 # Ensure that the configuration vars for the C compiler are
3328 # suitably defined. Those variables are subsequently used by
3329 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3330 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3331 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3334 # Source file extension for C test sources.
3337 # Object file extension for compiled C test sources.
3339 _LT_AC_TAGVAR(objext, $1)=$objext
3341 # Code to be used in simple compile tests
3342 lt_simple_compile_test_code="class foo {};"
3344 # Code to be used in simple link tests
3345 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
3347 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3350 # Allow CC to be a program name with arguments.
3355 _LT_AC_TAGVAR(compiler, $1)=$CC
3357 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3358 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3361 ## There is no encapsulation within the following macros, do not change
3362 ## the running order or otherwise move them around unless you know exactly
3363 ## what you are doing...
3364 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3365 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3366 AC_LIBTOOL_PROG_CC_C_O($1)
3367 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3368 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3369 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3370 AC_LIBTOOL_SYS_LIB_STRIP
3371 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3372 AC_LIBTOOL_DLOPEN_SELF($1)
3374 AC_LIBTOOL_CONFIG($1)
3378 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3381 # AC_LIBTOOL_LANG_RC_CONFIG
3382 # --------------------------
3383 # Ensure that the configuration vars for the Windows resource compiler are
3384 # suitably defined. Those variables are subsequently used by
3385 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3386 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3387 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3390 # Source file extension for RC test sources.
3393 # Object file extension for compiled RC test sources.
3395 _LT_AC_TAGVAR(objext, $1)=$objext
3397 # Code to be used in simple compile tests
3398 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3400 # Code to be used in simple link tests
3401 lt_simple_link_test_code="$lt_simple_compile_test_code"
3403 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3406 # Allow CC to be a program name with arguments.
3411 _LT_AC_TAGVAR(compiler, $1)=$CC
3412 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3414 AC_LIBTOOL_CONFIG($1)
3418 ])# AC_LIBTOOL_LANG_RC_CONFIG
3421 # AC_LIBTOOL_CONFIG([TAGNAME])
3422 # ----------------------------
3423 # If TAGNAME is not passed, then create an initial libtool script
3424 # with a default configuration from the untagged config vars. Otherwise
3425 # add code to config.status for appending the configuration named by
3426 # TAGNAME from the matching tagged config vars.
3427 AC_DEFUN([AC_LIBTOOL_CONFIG],
3428 [# The else clause should only fire when bootstrapping the
3429 # libtool distribution, otherwise you forgot to ship ltmain.sh
3430 # with your package, and you will get complaints that there are
3431 # no rules to generate ltmain.sh.
3432 if test -f "$ltmain"; then
3433 # Now quote all the things that may contain metacharacters while being
3434 # careful not to overquote the AC_SUBSTed values. We take copies of the
3435 # variables and quote the copies for generation of the libtool script.
3436 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
3437 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3438 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3439 deplibs_check_method reload_flag reload_cmds need_locks \
3440 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3441 lt_cv_sys_global_symbol_to_c_name_address \
3442 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3443 old_postinstall_cmds old_postuninstall_cmds \
3444 _LT_AC_TAGVAR(compiler, $1) \
3445 _LT_AC_TAGVAR(CC, $1) \
3446 _LT_AC_TAGVAR(LD, $1) \
3447 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3448 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3449 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3450 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3451 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3452 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3453 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3454 _LT_AC_TAGVAR(old_archive_cmds, $1) \
3455 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3456 _LT_AC_TAGVAR(predep_objects, $1) \
3457 _LT_AC_TAGVAR(postdep_objects, $1) \
3458 _LT_AC_TAGVAR(predeps, $1) \
3459 _LT_AC_TAGVAR(postdeps, $1) \
3460 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3461 _LT_AC_TAGVAR(archive_cmds, $1) \
3462 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3463 _LT_AC_TAGVAR(postinstall_cmds, $1) \
3464 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
3465 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3466 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
3467 _LT_AC_TAGVAR(no_undefined_flag, $1) \
3468 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3469 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3470 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3471 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3472 _LT_AC_TAGVAR(exclude_expsyms, $1) \
3473 _LT_AC_TAGVAR(include_expsyms, $1); do
3476 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
3477 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3478 _LT_AC_TAGVAR(archive_cmds, $1) | \
3479 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3480 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3481 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3482 extract_expsyms_cmds | reload_cmds | finish_cmds | \
3483 postinstall_cmds | postuninstall_cmds | \
3484 old_postinstall_cmds | old_postuninstall_cmds | \
3485 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3486 # Double-quote double-evaled strings.
3487 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3490 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3496 *'\[$]0 --fallback-echo"')
3497 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3502 [cfgfile="${ofile}T"
3503 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3505 AC_MSG_NOTICE([creating $ofile])],
3508 cat <<__EOF__ >> "$cfgfile"
3512 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3513 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3514 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3516 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3517 # Free Software Foundation, Inc.
3519 # This file is part of GNU Libtool:
3520 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3522 # This program is free software; you can redistribute it and/or modify
3523 # it under the terms of the GNU General Public License as published by
3524 # the Free Software Foundation; either version 2 of the License, or
3525 # (at your option) any later version.
3527 # This program is distributed in the hope that it will be useful, but
3528 # WITHOUT ANY WARRANTY; without even the implied warranty of
3529 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3530 # General Public License for more details.
3532 # You should have received a copy of the GNU General Public License
3533 # along with this program; if not, write to the Free Software
3534 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3536 # As a special exception to the GNU General Public License, if you
3537 # distribute this file as part of a program that contains a
3538 # configuration script generated by Autoconf, you may include it under
3539 # the same distribution terms that you use for the rest of that program.
3541 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3542 Xsed="sed -e s/^X//"
3544 # The HP-UX ksh and POSIX shell print the target directory to stdout
3546 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3548 # The names of the tagged configurations supported by this script.
3551 # ### BEGIN LIBTOOL CONFIG],
3552 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3554 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3556 # Shell to use when invoking shell scripts.
3559 # Whether or not to build shared libraries.
3560 build_libtool_libs=$enable_shared
3562 # Whether or not to build static libraries.
3563 build_old_libs=$enable_static
3565 # Whether or not to add -lc for building shared libraries.
3566 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3568 # Whether or not to optimize for fast installation.
3569 fast_install=$enable_fast_install
3572 host_alias=$host_alias
3575 # An echo program that does not interpret backslashes.
3580 AR_FLAGS=$lt_AR_FLAGS
3585 # A language-specific compiler.
3586 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3588 # Is the compiler the GNU C compiler?
3589 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3591 # The linker used to build libraries.
3592 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3594 # Whether we need hard or soft links.
3597 # A BSD-compatible nm program.
3600 # A sed program that does not truncate output.
3603 # A symbol stripping program
3606 # Used to examine libraries when file_magic_cmd begins "file"
3607 MAGIC_CMD=$MAGIC_CMD
3609 # Used on cygwin: DLL creation program.
3612 # Used on cygwin: object dumper.
3615 # Used on cygwin: assembler.
3618 # The name of the directory that contains temporary libtool files.
3621 # How to create reloadable object files.
3622 reload_flag=$lt_reload_flag
3623 reload_cmds=$lt_reload_cmds
3625 # How to pass a linker flag through the compiler.
3626 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3628 # Object file suffix (normally "o").
3631 # Old archive suffix (normally "a").
3634 # Executable file suffix (normally "").
3637 # Additional compiler flags for building library objects.
3638 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3641 # What is the maximum length of a command?
3642 max_cmd_len=$lt_cv_sys_max_cmd_len
3644 # Does compiler simultaneously support -c and -o options?
3645 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3647 # Must we lock files when doing compilation ?
3648 need_locks=$lt_need_locks
3650 # Do we need the lib prefix for modules?
3651 need_lib_prefix=$need_lib_prefix
3653 # Do we need a version for libraries?
3654 need_version=$need_version
3656 # Whether dlopen is supported.
3657 dlopen_support=$enable_dlopen
3659 # Whether dlopen of programs is supported.
3660 dlopen_self=$enable_dlopen_self
3662 # Whether dlopen of statically linked programs is supported.
3663 dlopen_self_static=$enable_dlopen_self_static
3665 # Compiler flag to prevent dynamic linking.
3666 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3668 # Compiler flag to turn off builtin functions.
3669 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3671 # Compiler flag to allow reflexive dlopens.
3672 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3674 # Compiler flag to generate shared objects directly from archives.
3675 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3677 # Compiler flag to generate thread-safe objects.
3678 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3680 # Library versioning type.
3681 version_type=$version_type
3683 # Format of library name prefix.
3684 libname_spec=$lt_libname_spec
3686 # List of archive names. First name is the real one, the rest are links.
3687 # The last name is the one that the linker finds with -lNAME.
3688 library_names_spec=$lt_library_names_spec
3690 # The coded name of the library, if different from the real name.
3691 soname_spec=$lt_soname_spec
3693 # Commands used to build and install an old-style archive.
3695 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3696 old_postinstall_cmds=$lt_old_postinstall_cmds
3697 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3699 # Create an old-style archive from a shared archive.
3700 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3702 # Create a temporary old-style archive to link instead of a shared archive.
3703 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3705 # Commands used to build and install a shared archive.
3706 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3707 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3708 postinstall_cmds=$lt_postinstall_cmds
3709 postuninstall_cmds=$lt_postuninstall_cmds
3711 # Commands to strip libraries.
3712 old_striplib=$lt_old_striplib
3713 striplib=$lt_striplib
3715 # Dependencies to place before the objects being linked to create a
3717 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3719 # Dependencies to place after the objects being linked to create a
3721 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3723 # Dependencies to place before the objects being linked to create a
3725 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3727 # Dependencies to place after the objects being linked to create a
3729 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3731 # The library search path used internally by the compiler when linking
3733 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3735 # Method to check whether dependent libraries are shared objects.
3736 deplibs_check_method=$lt_deplibs_check_method
3738 # Command to use when deplibs_check_method == file_magic.
3739 file_magic_cmd=$lt_file_magic_cmd
3741 # Flag that allows shared libraries with undefined symbols to be built.
3742 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3744 # Flag that forces no undefined symbols.
3745 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3747 # Commands used to finish a libtool library installation in a directory.
3748 finish_cmds=$lt_finish_cmds
3750 # Same as above, but a single script fragment to be evaled but not shown.
3751 finish_eval=$lt_finish_eval
3753 # Take the output of nm and produce a listing of raw symbols and C names.
3754 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3756 # Transform the output of nm in a proper C declaration
3757 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3759 # Transform the output of nm in a C name address pair
3760 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3762 # This is the shared library runtime path variable.
3763 runpath_var=$runpath_var
3765 # This is the shared library path variable.
3766 shlibpath_var=$shlibpath_var
3768 # Is shlibpath searched before the hard-coded library search path?
3769 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3771 # How to hardcode a shared library path into an executable.
3772 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3774 # Whether we should hardcode library paths into libraries.
3775 hardcode_into_libs=$hardcode_into_libs
3777 # Flag to hardcode \$libdir into a binary during linking.
3778 # This must work even if \$libdir does not exist.
3779 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3781 # Whether we need a single -rpath flag with a separated argument.
3782 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3784 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3786 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3788 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3790 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3792 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3793 # the resulting binary.
3794 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3796 # Variables whose values should be saved in libtool wrapper scripts and
3797 # restored at relink time.
3798 variables_saved_for_relink="$variables_saved_for_relink"
3800 # Whether libtool must link a program against all its dependency libraries.
3801 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3803 # Compile-time system search path for libraries
3804 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3806 # Run-time system search path for libraries
3807 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3809 # Fix the shell variable \$srcfile for the compiler.
3810 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3812 # Set to yes if exported symbols are required.
3813 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3815 # The commands to list exported symbols.
3816 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3818 # The commands to extract the exported symbol list from a shared archive.
3819 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3821 # Symbols that should not be listed in the preloaded symbols.
3822 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3824 # Symbols that must always be exported.
3825 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3828 [# ### END LIBTOOL CONFIG],
3829 [# ### END LIBTOOL TAG CONFIG: $tagname])
3836 cat <<\EOF >> "$cfgfile"
3838 # AIX sometimes has problems with the GCC collect2 program. For some
3839 # reason, if we set the COLLECT_NAMES environment variable, the problems
3840 # vanish in a puff of smoke.
3841 if test "X${COLLECT_NAMES+set}" != Xset; then
3843 export COLLECT_NAMES
3848 cygwin* | mingw* | pw32* | os2*)
3849 cat <<'EOF' >> "$cfgfile"
3850 # This is a source program that is used to create dlls on Windows
3851 # Don't remove nor modify the starting and closing comments
3853 # This is a source program that is used to create import libraries
3854 # on Windows for dlls which lack them. Don't remove nor modify the
3855 # starting and closing comments
3856 _LT_AC_FILE_IMPGEN_C
3861 # We use sed instead of cat because bash on DJGPP gets confused if
3862 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3863 # text mode, it properly converts lines to CR/LF. This bash problem
3864 # is reportedly fixed, but why not run on old versions too?
3865 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3867 mv -f "$cfgfile" "$ofile" || \
3868 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3872 # If there is no Makefile yet, we rely on a make rule to execute
3873 # `config.status --recheck' to rerun these tests and create the
3874 # libtool script then.
3875 test -f Makefile && make "$ltmain"
3877 ])# AC_LIBTOOL_CONFIG
3880 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3881 # -------------------------------------------
3882 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3883 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3885 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3887 if test "$GCC" = yes; then
3888 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3890 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3891 lt_cv_prog_compiler_rtti_exceptions,
3892 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
3893 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3895 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3898 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3899 # ---------------------------------
3900 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3901 [AC_REQUIRE([AC_CANONICAL_HOST])
3902 AC_REQUIRE([AC_PROG_NM])
3903 AC_REQUIRE([AC_OBJEXT])
3904 # Check for command to grab the raw symbol name followed by C symbol from nm.
3905 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3906 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3908 # These are sane defaults that work on at least a few old systems.
3909 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3911 # Character class describing NM global symbol codes.
3912 symcode='[[BCDEGRST]]'
3914 # Regexp to match symbols that can be accessed directly from C.
3915 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3917 # Transform the above into a raw symbol and a C symbol.
3918 symxfrm='\1 \2\3 \3'
3920 # Transform an extracted symbol line into a proper C declaration
3921 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3923 # Transform an extracted symbol line into symbol name and symbol address
3924 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'"
3926 # Define system-specific variables.
3931 cygwin* | mingw* | pw32*)
3932 symcode='[[ABCDGISTW]]'
3934 hpux*) # Its linker distinguishes data from code symbols
3935 if test "$host_cpu" = ia64; then
3936 symcode='[[ABCDEGRST]]'
3938 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3939 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'"
3942 symcode='[[BCDEGRST]]'
3945 symcode='[[BCDEGQRST]]'
3951 symcode='[[DFNSTU]]'
3955 # Handle CRLF in mingw tool chain
3959 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3963 # If we're using GNU nm, then use its standard symbol codes.
3964 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3965 symcode='[[ABCDGISTW]]'
3968 # Try without a prefix undercore, then with it.
3969 for ac_symprfx in "" "_"; do
3971 # Write the raw and C identifiers.
3972 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3974 # Check to see that the pipe works correctly.
3978 cat > conftest.$ac_ext <<EOF
3983 void nm_test_func(){}
3987 int main(){nm_test_var='a';nm_test_func();return(0);}
3990 if AC_TRY_EVAL(ac_compile); then
3991 # Now try to grab the symbols.
3993 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3994 # Try sorting and uniquifying the output.
3995 if sort "$nlist" | uniq > "$nlist"T; then
3996 mv -f "$nlist"T "$nlist"
4001 # Make sure that we snagged all the symbols we need.
4002 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4003 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4004 cat <<EOF > conftest.$ac_ext
4010 # Now generate the symbol file.
4011 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4013 cat <<EOF >> conftest.$ac_ext
4014 #if defined (__STDC__) && __STDC__
4015 # define lt_ptr_t void *
4017 # define lt_ptr_t char *
4021 /* The mapping between symbol names and symbols. */
4026 lt_preloaded_symbols[[]] =
4029 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4030 cat <<\EOF >> conftest.$ac_ext
4038 # Now try linking the two files.
4039 mv conftest.$ac_objext conftstm.$ac_objext
4040 lt_save_LIBS="$LIBS"
4041 lt_save_CFLAGS="$CFLAGS"
4042 LIBS="conftstm.$ac_objext"
4043 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4044 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4047 LIBS="$lt_save_LIBS"
4048 CFLAGS="$lt_save_CFLAGS"
4050 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4053 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4056 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4059 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4060 cat conftest.$ac_ext >&5
4062 rm -f conftest* conftst*
4064 # Do not use the global_symbol_pipe unless it works.
4065 if test "$pipe_works" = yes; then
4068 lt_cv_sys_global_symbol_pipe=
4072 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4073 lt_cv_sys_global_symbol_to_cdecl=
4075 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4076 AC_MSG_RESULT(failed)
4080 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4083 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4084 # ---------------------------------------
4085 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4086 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4087 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4088 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4090 AC_MSG_CHECKING([for $compiler option to produce PIC])
4092 # C++ specific cases for pic, static, wl, etc.
4093 if test "$GXX" = yes; then
4094 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4095 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4099 # All AIX code is PIC.
4100 if test "$host_cpu" = ia64; then
4101 # AIX 5 now supports IA64 processor
4102 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4106 # FIXME: we need at least 68020 code to build shared libraries, but
4107 # adding the `-m68020' flag to GCC prevents building anything better,
4109 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4111 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4112 # PIC is the default for these OSes.
4115 # This hack is so that the source file can tell whether it is being
4116 # built for inclusion in a dll (and should export symbols for example).
4117 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4119 darwin* | rhapsody*)
4120 # PIC is the default on this platform
4121 # Common symbols not allowed in MH_DYLIB files
4122 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4125 # DJGPP does not support shared libraries at all
4126 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4129 if test -d /usr/nec; then
4130 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4134 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4135 if test "$host_cpu" != ia64; then
4136 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4140 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4146 # All AIX code is PIC.
4147 if test "$host_cpu" = ia64; then
4148 # AIX 5 now supports IA64 processor
4149 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4151 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4155 case $cc_basename in
4157 # Green Hills C++ Compiler
4158 # _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"
4163 case $cc_basename in
4165 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4168 # Green Hills C++ Compiler
4169 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4176 # FreeBSD uses GNU C++
4178 hpux9* | hpux10* | hpux11*)
4179 case $cc_basename in
4181 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4182 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4183 if test "$host_cpu" != ia64; then
4184 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4188 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4189 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4190 if test "$host_cpu" != ia64; then
4191 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4198 irix5* | irix6* | nonstopux*)
4199 case $cc_basename in
4201 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4202 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4203 # CC pic flag -KPIC is the default.
4210 case $cc_basename in
4213 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4214 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4218 # Make sure the PIC flag is empty. It appears that all Alpha
4219 # Linux and Compaq Tru64 Unix objects are PIC.
4220 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4221 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4232 case $cc_basename in
4234 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4242 osf3* | osf4* | osf5*)
4243 case $cc_basename in
4245 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4248 # Rational C++ 2.4.1
4249 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4252 # Digital/Compaq C++
4253 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4254 # Make sure the PIC flag is empty. It appears that all Alpha
4255 # Linux and Compaq Tru64 Unix objects are PIC.
4256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4257 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4266 case $cc_basename in
4268 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4275 case $cc_basename in
4277 # Sun C++ 4.2, 5.x and Centerline C++
4278 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4279 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4280 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4283 # Green Hills C++ Compiler
4284 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4291 case $cc_basename in
4294 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4295 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4299 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4306 case $cc_basename in
4308 # NonStop-UX NCC 3.20
4309 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4320 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4326 if test "$GCC" = yes; then
4327 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4328 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4332 # All AIX code is PIC.
4333 if test "$host_cpu" = ia64; then
4334 # AIX 5 now supports IA64 processor
4335 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4340 # FIXME: we need at least 68020 code to build shared libraries, but
4341 # adding the `-m68020' flag to GCC prevents building anything better,
4343 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4346 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4347 # PIC is the default for these OSes.
4350 mingw* | pw32* | os2*)
4351 # This hack is so that the source file can tell whether it is being
4352 # built for inclusion in a dll (and should export symbols for example).
4353 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4356 darwin* | rhapsody*)
4357 # PIC is the default on this platform
4358 # Common symbols not allowed in MH_DYLIB files
4359 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4363 # Just because we use GCC doesn't mean we suddenly get shared libraries
4364 # on systems that don't support them.
4365 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4370 if test -d /usr/nec; then
4371 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4376 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4377 if test "$host_cpu" != ia64; then
4378 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4383 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4387 # PORTME Check for flag to pass linker flags through the system compiler.
4390 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4391 if test "$host_cpu" = ia64; then
4392 # AIX 5 now supports IA64 processor
4393 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4395 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4399 mingw* | pw32* | os2*)
4400 # This hack is so that the source file can tell whether it is being
4401 # built for inclusion in a dll (and should export symbols for example).
4402 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4405 hpux9* | hpux10* | hpux11*)
4406 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4407 if test "$host_cpu" != ia64; then
4408 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4410 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4411 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4414 irix5* | irix6* | nonstopux*)
4415 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4416 # PIC (with -KPIC) is the default.
4417 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4421 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4422 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4425 osf3* | osf4* | osf5*)
4426 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4427 # All OSF/1 code is PIC.
4428 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4432 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4433 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4437 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4438 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4439 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4443 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4444 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4445 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4448 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4449 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4450 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4451 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4455 if test -d /usr/nec ;then
4456 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4457 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4462 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4463 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4467 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4472 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4475 # Check to make sure the PIC flag actually works.
4477 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4478 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4479 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4480 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])], [],
4481 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4483 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4485 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4486 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4489 # For platforms which do not support PIC, -DPIC is meaningless:
4491 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4494 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[GCJ],[],[ -DPIC])"
4500 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4501 # ------------------------------------
4502 # See if the linker supports building shared libraries.
4503 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4504 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4506 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4509 # If we're using GNU nm, then we don't want the "-C" option.
4510 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4511 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4512 _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'
4514 _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'
4518 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4521 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4526 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4528 _LT_AC_TAGVAR(archive_cmds, $1)=
4529 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4530 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4531 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4532 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4533 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4534 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4535 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4537 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4538 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4539 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4540 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4541 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4542 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4543 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4544 # include_expsyms should be a list of space-separated symbols to be *always*
4545 # included in the symbol list
4546 _LT_AC_TAGVAR(include_expsyms, $1)=
4547 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4548 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4549 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4550 # as well as any symbol that contains `d'.
4551 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4552 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4553 # platforms (ab)use it in PIC code, but their linkers get confused if
4554 # the symbol is explicitly referenced. Since portable code cannot
4555 # rely on this symbol name, it's probably fine to never include it in
4556 # preloaded symbol tables.
4557 extract_expsyms_cmds=
4560 cygwin* | mingw* | pw32*)
4561 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4562 # When not using gcc, we currently assume that we are using
4563 # Microsoft Visual C++.
4564 if test "$GCC" != yes; then
4573 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4574 if test "$with_gnu_ld" = yes; then
4575 # If archive_cmds runs LD, not CC, wlarc should be empty
4578 # See if GNU ld supports shared libraries.
4580 aix3* | aix4* | aix5*)
4581 # On AIX/PPC, the GNU linker is very broken
4582 if test "$host_cpu" != ia64; then
4583 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4586 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4587 *** to be unable to reliably create shared libraries on AIX.
4588 *** Therefore, libtool is disabling shared libraries support. If you
4589 *** really care for shared libraries, you may want to modify your PATH
4590 *** so that a non-GNU linker is found, and then restart.
4597 _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)'
4598 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4599 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4601 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4602 # that the semantics of dynamic libraries on AmigaOS, at least up
4603 # to version 4, is to share data among multiple programs linked
4604 # with the same dynamic library. Since this doesn't match the
4605 # behavior of shared libraries on other platforms, we can't use
4607 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4611 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4612 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4613 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4614 # support --undefined. This deserves some investigation. FIXME
4615 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4617 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4622 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4623 # as there is no search path for DLLs.
4624 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4625 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4627 if $LD --help 2>&1 | egrep 'auto-import' > /dev/null; then
4628 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4629 _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'
4636 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4637 # no search path for DLLs.
4638 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4639 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4640 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4642 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4643 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4644 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4645 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4646 else $CC -o impgen impgen.c ; fi)~
4647 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4649 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4651 # FIXME: what about values for MSVC?
4652 dll_entry=__cygwin_dll_entry@12
4656 dll_entry=_DllMainCRTStartup@12
4660 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4662 # recent cygwin and mingw systems supply a stub DllMain which the user
4663 # can override, but on older systems we have to supply one (in ltdll.c)
4664 if test "x$lt_cv_need_dllmain" = "xyes"; then
4665 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4666 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
4667 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4673 # Extract the symbol export list from an `--export-all' def file,
4674 # then regenerate the def file from the symbol export list, so that
4675 # the compiled dll only exports the symbol export list.
4676 # Be careful not to strip the DATA tag left by newer dlltools.
4677 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4678 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4679 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4681 # If the export-symbols file already is a .def file (1st line
4682 # is EXPORTS), use it as is.
4683 # If DATA tags from a recent dlltool are present, honour them!
4684 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
4685 cp $export_symbols $output_objdir/$soname-def;
4687 echo EXPORTS > $output_objdir/$soname-def;
4689 cat $export_symbols | while read symbol; do
4692 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4693 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
4694 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4696 _lt_hint=`expr 1 + \$_lt_hint`;
4700 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4701 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
4702 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
4703 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
4704 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
4708 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4709 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4712 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4713 _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'
4718 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
4719 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4722 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4723 *** create shared libraries on Solaris systems. Therefore, libtool
4724 *** is disabling shared libraries support. We urge you to upgrade GNU
4725 *** binutils to release 2.9.1 or newer. Another option is to modify
4726 *** your PATH or compiler configuration so that the native linker is
4727 *** used, and then restart.
4730 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4731 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4732 _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'
4734 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4739 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4741 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4742 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4746 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4747 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4748 _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'
4750 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4755 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
4756 runpath_var=LD_RUN_PATH
4757 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4758 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4760 cygwin* | mingw* | pw32*)
4761 # dlltool doesn't understand --whole-archive et. al.
4762 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4765 # ancient GNU ld didn't support --whole-archive et. al.
4766 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4767 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4769 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4775 # PORTME fill in a description of your system's linker (not GNU ld)
4778 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4779 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4780 _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'
4781 # Note: this linker hardcodes the directories in LIBPATH if there
4782 # are no directories specified by -L.
4783 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4784 if test "$GCC" = yes && test -z "$link_static_flag"; then
4785 # Neither direct hardcoding nor static linking is supported with a
4787 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4792 if test "$host_cpu" = ia64; then
4793 # On IA64, the linker does run time linking by default, so we don't
4794 # have to do anything special.
4795 aix_use_runtimelinking=no
4796 exp_sym_flag='-Bexport'
4799 # If we're using GNU nm, then we don't want the "-C" option.
4800 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4801 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4802 _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'
4804 _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'
4806 aix_use_runtimelinking=no
4808 # Test if we are trying to use run time linking or normal
4809 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4810 # need to do runtime linking.
4811 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4812 for ld_flag in $LDFLAGS; do
4813 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4814 aix_use_runtimelinking=yes
4820 exp_sym_flag='-bexport'
4821 no_entry_flag='-bnoentry'
4824 # When large executables or shared objects are built, AIX ld can
4825 # have problems creating the table of contents. If linking a library
4826 # or program results in "error TOC overflow" add -mminimal-toc to
4827 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4828 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4830 _LT_AC_TAGVAR(archive_cmds, $1)=''
4831 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4832 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4833 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4835 if test "$GCC" = yes; then
4836 case $host_os in aix4.[012]|aix4.[012].*)
4837 # We only want to do this on AIX 4.2 and lower, the check
4838 # below for broken collect2 doesn't work under 4.3+
4839 collect2name=`${CC} -print-prog-name=collect2`
4840 if test -f "$collect2name" && \
4841 strings "$collect2name" | grep resolve_lib_name >/dev/null
4843 # We have reworked collect2
4844 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4846 # We have old collect2
4847 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4848 # It fails to find uninstalled libraries when the uninstalled
4849 # path is not listed in the libpath. Setting hardcode_minus_L
4850 # to unsupported forces relinking
4851 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4853 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4856 shared_flag='-shared'
4859 if test "$host_cpu" = ia64; then
4860 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4861 # chokes on -Wl,-G. The following line is correct:
4864 if test "$aix_use_runtimelinking" = yes; then
4865 shared_flag='${wl}-G'
4867 shared_flag='${wl}-bM:SRE'
4872 # It seems that -bexpall does not export symbols beginning with
4873 # underscore (_), so it is better to generate a list of symbols to export.
4874 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4875 if test "$aix_use_runtimelinking" = yes; then
4876 # Warning - without using the other runtime loading flags (-brtl),
4877 # -berok will link without error, but may produce a broken library.
4878 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4879 # Determine the default libpath from the value encoded in an empty executable.
4880 _LT_AC_SYS_LIBPATH_AIX
4881 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4882 _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"
4884 if test "$host_cpu" = ia64; then
4885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4886 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4887 _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"
4889 # Determine the default libpath from the value encoded in an empty executable.
4890 _LT_AC_SYS_LIBPATH_AIX
4891 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4892 # Warning - without using the other run time loading flags,
4893 # -berok will link without error, but may produce a broken library.
4894 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4895 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4896 # -bexpall does not export symbols beginning with underscore (_)
4897 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4898 # Exported symbols can be pulled into shared objects from archives
4899 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4900 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4901 # This is similar to how AIX traditionally builds it's shared libraries.
4902 _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'
4908 _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)'
4909 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4910 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4911 # see comment about different semantics on the GNU ld section
4912 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4916 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4919 cygwin* | mingw* | pw32*)
4920 # When not using gcc, we currently assume that we are using
4921 # Microsoft Visual C++.
4922 # hardcode_libdir_flag_spec is actually meaningless, as there is
4923 # no search path for DLLs.
4924 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4925 # Tell ltmain to make .lib files, not .a files.
4927 # FIXME: Setting linknames here is a bad hack.
4928 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4929 # The linker will automatically build a .lib file if we build a DLL.
4930 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4931 # FIXME: Should let the user specify the lib program.
4932 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4933 fix_srcfile_path='`cygpath -w "$srcfile"`'
4936 darwin* | rhapsody*)
4938 rhapsody* | darwin1.[[012]])
4939 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4942 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4946 # FIXME: Relying on posixy $() will cause problems for
4947 # cross-compilation, but unfortunately the echo tests do not
4948 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
4949 # `"' quotes if we put them in here... so don't!
4950 _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
4951 # We need to add '_' to the symbols in $export_symbols first
4952 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4953 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4954 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4955 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4959 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4960 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4961 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4965 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4968 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4969 # support. Future versions do this automatically, but an explicit c++rt0.o
4970 # does not break anything, and helps significantly (at the cost of a little
4973 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4974 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4975 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4976 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4979 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4981 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4982 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4983 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4984 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4987 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4989 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4990 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4991 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4992 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4995 hpux9* | hpux10* | hpux11*)
4996 if test "$GCC" = yes; then
4999 _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'
5002 if test "$host_cpu" = ia64; then
5003 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5005 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5012 _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'
5015 if test "$host_cpu" = ia64; then
5016 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5018 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5023 if test "$host_cpu" = ia64; then
5024 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5025 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5026 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5029 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5030 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5032 # hardcode_minus_L: Not really in the search PATH,
5033 # but as the default location of the library.
5034 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5035 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5038 irix5* | irix6* | nonstopux*)
5039 if test "$GCC" = yes; then
5040 _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'
5042 _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'
5044 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5045 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5046 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5050 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5051 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5053 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5055 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5056 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5057 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5061 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5062 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5063 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5064 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5065 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5069 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5070 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5071 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5072 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5073 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5074 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5077 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5078 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5079 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5083 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5090 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5091 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5092 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5093 _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'
5094 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5098 if test "$GCC" = yes; then
5099 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5100 _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'
5102 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5103 _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'
5105 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5106 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5109 osf4* | osf5*) # as osf3* with the addition of -msym flag
5110 if test "$GCC" = yes; then
5111 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5112 _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'
5113 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5115 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5116 _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'
5117 _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~
5118 $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'
5120 # Both c and cxx compiler support -rpath directly
5121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5123 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5127 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5128 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5129 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5130 runpath_var=LD_RUN_PATH
5131 hardcode_runpath_var=yes
5135 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5136 if test "$GCC" = yes; then
5137 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5138 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5139 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5141 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5142 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5143 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5145 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5146 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5148 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5149 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5150 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5152 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5156 if test "x$host_vendor" = xsequent; then
5157 # Use $CC to link under sequent, because it throws in some extra .o
5158 # files that make .init and .fini sections work.
5159 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5161 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5163 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5164 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5165 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5166 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5170 case $host_vendor in
5172 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5173 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5176 ## LD is ld it makes a PLAMLIB
5177 ## CC just makes a GrossModule.
5178 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5179 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5180 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5183 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5184 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5187 runpath_var='LD_RUN_PATH'
5188 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5192 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5193 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5194 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5198 if test -d /usr/nec; then
5199 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5200 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5201 runpath_var=LD_RUN_PATH
5202 hardcode_runpath_var=yes
5203 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5208 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5209 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5210 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5211 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5212 hardcode_runpath_var=yes
5213 runpath_var=LD_RUN_PATH
5216 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5217 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5218 if test "$GCC" = yes; then
5219 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5221 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5223 runpath_var='LD_RUN_PATH'
5224 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5228 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5229 # $CC -shared without GNU ld will not create a library from C++
5230 # object files and a static libstdc++, better avoid it by now
5231 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5232 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5233 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5234 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5235 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5236 runpath_var='LD_RUN_PATH'
5240 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5241 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5242 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5246 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5251 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5252 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5254 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5255 if test "$GCC" = yes; then
5256 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5260 # Do we need to explicitly link libc?
5262 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5263 if test "$enable_shared" = yes && test "$GCC" = yes; then
5264 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5266 # FIXME: we may have to deal with multi-command sequences.
5269 # Test whether the compiler implicitly links with -lc since on some
5270 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5271 # to ld, don't add -lc before -lgcc.
5272 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5274 echo 'static int dummy;' > conftest.$ac_ext
5276 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5279 libobjs=conftest.$ac_objext
5281 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5287 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5288 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5289 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5291 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5293 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5295 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5297 cat conftest.err 1>&5
5300 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5304 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5307 # _LT_AC_FILE_LTDLL_C
5308 # -------------------
5309 # Be careful that the start marker always follows a newline.
5310 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5311 # /* ltdll.c starts here */
5312 # #define WIN32_LEAN_AND_MEAN
5313 # #include <windows.h>
5314 # #undef WIN32_LEAN_AND_MEAN
5315 # #include <stdio.h>
5317 # #ifndef __CYGWIN__
5318 # # ifdef __CYGWIN32__
5319 # # define __CYGWIN__ __CYGWIN32__
5323 # #ifdef __cplusplus
5326 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5327 # #ifdef __cplusplus
5332 # #include <cygwin/cygwin_dll.h>
5333 # DECLARE_CYGWIN_DLL( DllMain );
5335 # HINSTANCE __hDllInstance_base;
5338 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5340 # __hDllInstance_base = hInst;
5343 # /* ltdll.c ends here */
5344 ])# _LT_AC_FILE_LTDLL_C
5347 # _LT_AC_FILE_IMPGEN_C
5348 # --------------------
5349 # Be careful that the start marker always follows a newline.
5350 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
5351 # /* impgen.c starts here */
5352 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5354 # This file is part of GNU libtool.
5356 # This program is free software; you can redistribute it and/or modify
5357 # it under the terms of the GNU General Public License as published by
5358 # the Free Software Foundation; either version 2 of the License, or
5359 # (at your option) any later version.
5361 # This program is distributed in the hope that it will be useful,
5362 # but WITHOUT ANY WARRANTY; without even the implied warranty of
5363 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5364 # GNU General Public License for more details.
5366 # You should have received a copy of the GNU General Public License
5367 # along with this program; if not, write to the Free Software
5368 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5371 # #include <stdio.h> /* for printf() */
5372 # #include <unistd.h> /* for open(), lseek(), read() */
5373 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5374 # #include <string.h> /* for strdup() */
5376 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5378 # #define O_BINARY 0
5381 # static unsigned int
5382 # pe_get16 (fd, offset)
5386 # unsigned char b[2];
5387 # lseek (fd, offset, SEEK_SET);
5389 # return b[0] + (b[1]<<8);
5392 # static unsigned int
5393 # pe_get32 (fd, offset)
5397 # unsigned char b[4];
5398 # lseek (fd, offset, SEEK_SET);
5400 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5403 # static unsigned int
5407 # unsigned char *b = ptr;
5408 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5417 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5418 # unsigned long export_rva, export_size, nsections, secptr, expptr;
5419 # unsigned long name_rvas, nexp;
5420 # unsigned char *expdata, *erva;
5421 # char *filename, *dll_name;
5423 # filename = argv[1];
5425 # dll = open(filename, O_RDONLY|O_BINARY);
5429 # dll_name = filename;
5431 # for (i=0; filename[i]; i++)
5432 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5433 # dll_name = filename + i +1;
5435 # pe_header_offset = pe_get32 (dll, 0x3c);
5436 # opthdr_ofs = pe_header_offset + 4 + 20;
5437 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
5439 # if (num_entries < 1) /* no exports */
5442 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
5443 # export_size = pe_get32 (dll, opthdr_ofs + 100);
5444 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5445 # secptr = (pe_header_offset + 4 + 20 +
5446 # pe_get16 (dll, pe_header_offset + 4 + 16));
5449 # for (i = 0; i < nsections; i++)
5452 # unsigned long secptr1 = secptr + 40 * i;
5453 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5454 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5455 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5456 # lseek(dll, secptr1, SEEK_SET);
5457 # read(dll, sname, 8);
5458 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
5460 # expptr = fptr + (export_rva - vaddr);
5461 # if (export_rva + export_size > vaddr + vsize)
5462 # export_size = vsize - (export_rva - vaddr);
5467 # expdata = (unsigned char*)malloc(export_size);
5468 # lseek (dll, expptr, SEEK_SET);
5469 # read (dll, expdata, export_size);
5470 # erva = expdata - export_rva;
5472 # nexp = pe_as32 (expdata+24);
5473 # name_rvas = pe_as32 (expdata+32);
5475 # printf ("EXPORTS\n");
5476 # for (i = 0; i<nexp; i++)
5478 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5479 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5484 # /* impgen.c ends here */
5485 ])# _LT_AC_FILE_IMPGEN_C
5487 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5488 # ---------------------------------
5489 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5493 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5494 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5495 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5496 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5497 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5498 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5499 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5501 # This is just to silence aclocal about the macro not being used
5502 ifelse([AC_DISABLE_FAST_INSTALL])
5504 AC_DEFUN([LT_AC_PROG_GCJ],
5505 [AC_CHECK_TOOL(GCJ, gcj, no)
5506 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5510 AC_DEFUN([LT_AC_PROG_RC],
5511 [AC_CHECK_TOOL(RC, windres, no)
5514 ############################################################
5515 # NOTE: This macro has been submitted for inclusion into #
5516 # GNU Autoconf as AC_PROG_SED. When it is available in #
5517 # a released version of Autoconf we should remove this #
5518 # macro and use it instead. #
5519 ############################################################
5522 # Check for a fully-functional sed program, that truncates
5523 # as few characters as possible. Prefer GNU sed if found.
5524 AC_DEFUN([LT_AC_PROG_SED],
5525 [AC_MSG_CHECKING([for a sed that does not truncate output])
5526 AC_CACHE_VAL(lt_cv_path_SED,
5527 [# Loop through the user's path and test for sed and gsed.
5528 # Then use that list of sed's as ones to test for truncation.
5529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 test -z "$as_dir" && as_dir=.
5534 for lt_ac_prog in sed gsed; do
5535 for ac_exec_ext in '' $ac_executable_extensions; do
5536 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5537 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5544 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5545 # along with /bin/sed that truncates output.
5546 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5547 test ! -f $lt_ac_sed && break
5548 cat /dev/null > conftest.in
5550 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5551 # Check for GNU sed and select it if it is found.
5552 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5553 lt_cv_path_SED=$lt_ac_sed
5557 cat conftest.in conftest.in >conftest.tmp
5558 mv conftest.tmp conftest.in
5559 cp conftest.in conftest.nl
5561 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5562 cmp -s conftest.out conftest.nl || break
5563 # 10000 chars as input seems more than enough
5564 test $lt_ac_count -gt 10 && break
5565 lt_ac_count=`expr $lt_ac_count + 1`
5566 if test $lt_ac_count -gt $lt_ac_max; then
5567 lt_ac_max=$lt_ac_count
5568 lt_cv_path_SED=$lt_ac_sed
5574 AC_MSG_RESULT([$SED])