1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2 ## Copyright 1996-2001, 2015 Free Software Foundation, Inc.
3 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
24 # serial 47 AC_PROG_LIBTOOL
28 AC_DEFUN([AC_PROG_LIBTOOL],
29 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
30 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
31 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
32 AC_PROVIDE_IFELSE([AC_PROG_CXX],
34 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
37 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
38 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
39 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
40 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
42 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
44 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
47 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
48 ifdef([A][M_PROG_GCJ],
49 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
50 ifdef([LT_AC_PROG_GCJ],
51 [define([LT_AC_PROG_GCJ],
52 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
58 AC_DEFUN([_AC_PROG_LIBTOOL],
59 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
60 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
61 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
63 # This can be used to rebuild libtool when needed
64 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
66 # Always use our own libtool.
67 LIBTOOL='$(SHELL) $(top_builddir)/libtool --silent'
70 # Prevent multiple expansion
71 define([AC_PROG_LIBTOOL], [])
77 AC_DEFUN([AC_LIBTOOL_SETUP],
79 AC_REQUIRE([AC_ENABLE_SHARED])dnl
80 AC_REQUIRE([AC_ENABLE_STATIC])dnl
81 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
82 AC_REQUIRE([AC_CANONICAL_HOST])dnl
83 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
84 AC_REQUIRE([AC_PROG_CC])dnl
85 AC_REQUIRE([AC_PROG_LD])dnl
86 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
87 AC_REQUIRE([AC_PROG_NM])dnl
88 AC_REQUIRE([LT_AC_PROG_SED])dnl
90 AC_REQUIRE([AC_PROG_LN_S])dnl
91 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
92 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
93 AC_REQUIRE([AC_OBJEXT])dnl
94 AC_REQUIRE([AC_EXEEXT])dnl
97 AC_LIBTOOL_SYS_MAX_CMD_LEN
98 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
101 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
102 _LT_AC_PROG_ECHO_BACKSLASH
106 # AIX sometimes has problems with the GCC collect2 program. For some
107 # reason, if we set the COLLECT_NAMES environment variable, the problems
108 # vanish in a puff of smoke.
109 if test "X${COLLECT_NAMES+set}" != Xset; then
116 # Sed substitution that helps us do robust quoting. It backslashifies
117 # metacharacters that are still active within double-quoted strings.
119 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
121 # Same as above, but do not quote variable references.
122 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
124 # Sed substitution to delay expansion of an escaped shell variable in a
125 # double_quote_subst'ed string.
126 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
128 # Sed substitution to avoid accidental globbing in evaled expressions
129 no_glob_subst='s/\*/\\\*/g'
135 default_ofile=libtool
138 # All known linkers require a `.a' archive for static linking (except M$VC,
139 # which needs '.lib').
141 ltmain="$ac_aux_dir/ltmain.sh"
142 ofile="$default_ofile"
143 with_gnu_ld="$lt_cv_prog_gnu_ld"
145 AC_CHECK_TOOL(RANLIB, ranlib, :)
146 AC_CHECK_TOOL(STRIP, strip, :)
151 # Set sane defaults for various variables
152 test -z "$AR" && AR=ar
153 test -z "$AR_FLAGS" && AR_FLAGS=cru
154 test -z "$AS" && AS=as
155 test -z "$CC" && CC=cc
156 test -z "$LTCC" && LTCC=$CC
157 test -z "$DLLTOOL" && DLLTOOL=dlltool
158 test -z "$LD" && LD=ld
159 test -z "$LN_S" && LN_S="ln -s"
160 test -z "$MAGIC_CMD" && MAGIC_CMD=file
161 test -z "$NM" && NM=nm
162 test -z "$SED" && SED=sed
163 test -z "$OBJDUMP" && OBJDUMP=objdump
164 test -z "$RANLIB" && RANLIB=:
165 test -z "$STRIP" && STRIP=:
166 test -z "$ac_objext" && ac_objext=o
168 # Determine commands to create old-style static archives.
169 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
170 old_postinstall_cmds='chmod 644 $oldlib'
171 old_postuninstall_cmds=
173 if test -n "$RANLIB"; then
176 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
179 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
182 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
185 # Only perform the check for file, if the check method requires it
186 case $deplibs_check_method in
188 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
194 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
195 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
196 enable_win32_dll=yes, enable_win32_dll=no)
198 AC_ARG_ENABLE([libtool-lock],
199 [AC_HELP_STRING([--disable-libtool-lock],
200 [avoid locking (might break parallel builds)])])
201 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
204 [AC_HELP_STRING([--with-pic],
205 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
206 [pic_mode="$withval"],
208 test -z "$pic_mode" && pic_mode=default
210 # Use C for the default configuration in the libtool script
212 AC_LIBTOOL_LANG_C_CONFIG
217 # _LT_AC_SYS_COMPILER
218 # -------------------
219 AC_DEFUN([_LT_AC_SYS_COMPILER],
220 [AC_REQUIRE([AC_PROG_CC])dnl
222 # If no C compiler was specified, use CC.
225 # Allow CC to be a program name with arguments.
228 ])# _LT_AC_SYS_COMPILER
231 # _LT_AC_SYS_LIBPATH_AIX
232 # ----------------------
233 # Links a minimal program and checks the executable
234 # for the system default hardcoded library path. In most cases,
235 # this is /usr/lib:/lib, but when the MPI compilers are used
236 # the location of the communication and MPI libs are included too.
237 # If we don't find anything, use the default library path according
238 # to the aix ld manual.
239 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
240 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
241 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
243 # Check for a 64-bit object if we didn't find anything.
244 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; }
246 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
247 ])# _LT_AC_SYS_LIBPATH_AIX
250 # _LT_AC_PROG_ECHO_BACKSLASH
251 # --------------------------
252 # Add some code to the start of the generated configure script which
253 # will find an echo command which doesn't interpret backslashes.
254 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
255 [ifdef([AC_DIVERSION_NOTICE],
256 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
257 [AC_DIVERT_PUSH(NOTICE)])
259 # Check that we are running under the correct shell.
260 SHELL=${CONFIG_SHELL-/bin/sh}
264 # Remove one level of quotation (which was required for Make).
265 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
270 if test "X[$]1" = X--no-reexec; then
271 # Discard the --no-reexec flag, and continue.
273 elif test "X[$]1" = X--fallback-echo; then
274 # Avoid inline document here, it may be left over
276 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
277 # Yippee, $echo works!
280 # Restart under the correct shell.
281 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
284 if test "X[$]1" = X--fallback-echo; then
285 # used as fallback echo
293 # The HP-UX ksh and POSIX shell print the target directory to stdout
295 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
297 if test -z "$ECHO"; then
298 if test "X${echo_test_string+set}" != Xset; then
299 # find a string as large as possible, as long as the shell can cope with it
300 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
301 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
302 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
303 echo_test_string="`eval $cmd`" &&
304 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
311 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
312 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
313 test "X$echo_testing_string" = "X$echo_test_string"; then
316 # The Solaris, AIX, and Digital Unix default echo programs unquote
317 # backslashes. This makes it impossible to quote backslashes using
318 # echo "$something" | sed 's/\\/\\\\/g'
320 # So, first we look for a working echo in the user's PATH.
322 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
323 for dir in $PATH /usr/ucb; do
325 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
326 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
327 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
328 test "X$echo_testing_string" = "X$echo_test_string"; then
335 if test "X$echo" = Xecho; then
336 # We didn't find a better echo, so look for alternatives.
337 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
338 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
339 test "X$echo_testing_string" = "X$echo_test_string"; then
340 # This shell has a builtin print -r that does the trick.
342 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
343 test "X$CONFIG_SHELL" != X/bin/ksh; then
344 # If we have ksh, try running configure again with it.
345 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
346 export ORIGINAL_CONFIG_SHELL
347 CONFIG_SHELL=/bin/ksh
349 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
353 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
354 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
355 test "X$echo_testing_string" = "X$echo_test_string"; then
358 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
359 test "X$echo_testing_string" = 'X\t' &&
360 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
361 test "X$echo_testing_string" = "X$echo_test_string"; then
362 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
364 SHELL="$CONFIG_SHELL"
366 echo="$CONFIG_SHELL [$]0 --fallback-echo"
367 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
368 test "X$echo_testing_string" = 'X\t' &&
369 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
370 test "X$echo_testing_string" = "X$echo_test_string"; then
371 echo="$CONFIG_SHELL [$]0 --fallback-echo"
373 # maybe with a smaller string...
376 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
377 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
384 if test "$prev" != 'sed 50q "[$]0"'; then
385 echo_test_string=`eval $prev`
386 export echo_test_string
387 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
389 # Oops. We lost completely, so just stick with echo.
398 # Copy echo and quote the copy suitably for passing to libtool from
399 # the Makefile, instead of quoting the original, which is used later.
401 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
402 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
407 ])# _LT_AC_PROG_ECHO_BACKSLASH
412 AC_DEFUN([_LT_AC_LOCK],
413 [AC_ARG_ENABLE([libtool-lock],
414 [AC_HELP_STRING([--disable-libtool-lock],
415 [avoid locking (might break parallel builds)])])
416 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
418 # Some flags need to be propagated to the compiler or linker for good
422 # Find out which ABI we are using.
423 echo 'int i;' > conftest.$ac_ext
424 if AC_TRY_EVAL(ac_compile); then
425 case `/usr/bin/file conftest.$ac_objext` in
437 # Find out which ABI we are using.
438 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
439 if AC_TRY_EVAL(ac_compile); then
440 case `/usr/bin/file conftest.$ac_objext` in
456 # Test if the compiler is 64bit
457 echo 'int i;' > conftest.$ac_ext
458 if AC_TRY_EVAL(ac_compile); then
459 case `/usr/bin/file conftest.$ac_objext` in
472 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
473 SAVE_CFLAGS="$CFLAGS"
474 CFLAGS="$CFLAGS -belf"
475 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
477 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
479 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
480 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
481 CFLAGS="$SAVE_CFLAGS"
484 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
485 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
486 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
487 AC_CHECK_TOOL(AS, as, false)
488 AC_CHECK_TOOL(OBJDUMP, objdump, false)
490 # recent cygwin and mingw systems supply a stub DllMain which the user
491 # can override, but on older systems we have to supply one
492 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
494 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
496 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
499 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
500 # old mingw systems require "-dll" to link a DLL, while more recent ones
502 SAVE_CFLAGS="$CFLAGS"
503 CFLAGS="$CFLAGS -mdll"
504 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
505 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
506 CFLAGS="$SAVE_CFLAGS" ;;
507 *-*-cygwin* | *-*-pw32*)
508 # cygwin systems need to pass --dll to the linker, and not link
509 # crt.o which will require a WinMain@16 definition.
510 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
516 need_locks="$enable_libtool_lock"
521 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
522 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
523 # ----------------------------------------------------------------
524 # Check whether the given compiler option works
525 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
526 [AC_CACHE_CHECK([$1], [$2],
528 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
529 save_CFLAGS="$CFLAGS"
531 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
532 if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
533 # The compiler can only warn and ignore the option if not recognized
534 # So say no if there are warnings
535 if test -s conftest.err; then
536 # Append any errors to the config.log.
537 cat conftest.err 1>&AS_MESSAGE_LOG_FD
543 CFLAGS="$save_CFLAGS"
546 if test x"[$]$2" = xyes; then
547 ifelse([$5], , :, [$5])
549 ifelse([$6], , :, [$6])
551 ])# AC_LIBTOOL_COMPILER_OPTION
554 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
555 # [ACTION-SUCCESS], [ACTION-FAILURE])
556 # ------------------------------------------------------------
557 # Check whether the given compiler option works
558 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
559 [AC_CACHE_CHECK([$1], [$2],
561 save_LDFLAGS="$LDFLAGS"
562 LDFLAGS="$LDFLAGS $3"
563 echo "$lt_simple_link_test_code" > conftest.$ac_ext
564 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
565 # The compiler can only warn and ignore the option if not recognized
566 # So say no if there are warnings
567 if test -s conftest.err; then
568 # Append any errors to the config.log.
569 cat conftest.err 1>&AS_MESSAGE_LOG_FD
575 LDFLAGS="$save_LDFLAGS"
578 if test x"[$]$2" = xyes; then
579 ifelse([$4], , :, [$4])
581 ifelse([$5], , :, [$5])
583 ])# AC_LIBTOOL_LINKER_OPTION
586 # AC_LIBTOOL_SYS_MAX_CMD_LEN
587 # --------------------------
588 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
589 [# find the maximum length of command line arguments
590 AC_MSG_CHECKING([the maximum length of command line arguments])
591 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
597 # On DJGPP, this test can blow up pretty badly due to problems in libc
598 # (any single argument exceeding 2000 bytes causes a buffer overrun
599 # during glob expansion). Even if it were fixed, the result of this
600 # check would be larger than it should be.
601 lt_cv_sys_max_cmd_len=12288; # 12K is about right
605 # Under GNU Hurd, this test is not required because there is
606 # no limit to the length of command line arguments.
607 # Libtool will interpret -1 as no limit whatsoever
608 lt_cv_sys_max_cmd_len=-1;
612 # If test is not a shell built-in, we'll probably end up computing a
613 # maximum length that is only half of the actual maximum length, but
615 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
616 = "XX$testring") >/dev/null 2>&1 &&
617 new_result=`expr "X$testring" : ".*" 2>&1` &&
618 lt_cv_sys_max_cmd_len=$new_result &&
619 test $i != 17 # 1/2 MB should be enough
622 testring=$testring$testring
625 # Add a significant safety factor because C++ compilers can tack on massive
626 # amounts of additional arguments before passing them to the linker.
627 # It appears as though 1/2 is a usable value.
628 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
632 if test -n $lt_cv_sys_max_cmd_len ; then
633 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
637 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
641 # --------------------
642 AC_DEFUN([_LT_AC_CHECK_DLFCN],
643 [AC_CHECK_HEADERS(dlfcn.h)dnl
644 ])# _LT_AC_CHECK_DLFCN
647 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
648 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
649 # ------------------------------------------------------------------
650 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
651 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
652 if test "$cross_compiling" = yes; then :
655 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
656 lt_status=$lt_dlunknown
657 cat > conftest.$ac_ext <<EOF
658 [#line __oline__ "configure"
659 #include "confdefs.h"
668 # define LT_DLGLOBAL RTLD_GLOBAL
671 # define LT_DLGLOBAL DL_GLOBAL
673 # define LT_DLGLOBAL 0
677 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
678 find out it does not work in some platform. */
679 #ifndef LT_DLLAZY_OR_NOW
681 # define LT_DLLAZY_OR_NOW RTLD_LAZY
684 # define LT_DLLAZY_OR_NOW DL_LAZY
687 # define LT_DLLAZY_OR_NOW RTLD_NOW
690 # define LT_DLLAZY_OR_NOW DL_NOW
692 # define LT_DLLAZY_OR_NOW 0
700 extern "C" void exit (int);
703 void fnord() { int i=42;}
706 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
707 int status = $lt_dlunknown;
711 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
712 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
713 /* dlclose (self); */
719 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
720 (./conftest; exit; ) 2>/dev/null
723 x$lt_dlno_uscore) $1 ;;
724 x$lt_dlneed_uscore) $2 ;;
725 x$lt_unknown|x*) $3 ;;
733 ])# _LT_AC_TRY_DLOPEN_SELF
736 # AC_LIBTOOL_DLOPEN_SELF
737 # -------------------
738 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
739 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
740 if test "x$enable_dlopen" != xyes; then
741 enable_dlopen=unknown
742 enable_dlopen_self=unknown
743 enable_dlopen_self_static=unknown
750 lt_cv_dlopen="load_add_on"
752 lt_cv_dlopen_self=yes
755 cygwin* | mingw* | pw32*)
756 lt_cv_dlopen="LoadLibrary"
761 AC_CHECK_FUNC([shl_load],
762 [lt_cv_dlopen="shl_load"],
763 [AC_CHECK_LIB([dld], [shl_load],
764 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
765 [AC_CHECK_FUNC([dlopen],
766 [lt_cv_dlopen="dlopen"],
767 [AC_CHECK_LIB([dl], [dlopen],
768 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
769 [AC_CHECK_LIB([svld], [dlopen],
770 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
771 [AC_CHECK_LIB([dld], [dld_link],
772 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
781 if test "x$lt_cv_dlopen" != xno; then
787 case $lt_cv_dlopen in
789 save_CPPFLAGS="$CPPFLAGS"
790 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
792 save_LDFLAGS="$LDFLAGS"
793 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
796 LIBS="$lt_cv_dlopen_libs $LIBS"
798 AC_CACHE_CHECK([whether a program can dlopen itself],
799 lt_cv_dlopen_self, [dnl
800 _LT_AC_TRY_DLOPEN_SELF(
801 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
802 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
805 if test "x$lt_cv_dlopen_self" = xyes; then
806 LDFLAGS="$LDFLAGS $link_static_flag"
807 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
808 lt_cv_dlopen_self_static, [dnl
809 _LT_AC_TRY_DLOPEN_SELF(
810 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
811 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
815 CPPFLAGS="$save_CPPFLAGS"
816 LDFLAGS="$save_LDFLAGS"
821 case $lt_cv_dlopen_self in
822 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
823 *) enable_dlopen_self=unknown ;;
826 case $lt_cv_dlopen_self_static in
827 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
828 *) enable_dlopen_self_static=unknown ;;
831 ])# AC_LIBTOOL_DLOPEN_SELF
834 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
835 # ---------------------------------
836 # Check to see if options -c and -o are simultaneously supported by compiler
837 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
838 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
839 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
840 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
841 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
842 $rm -r conftest 2>/dev/null
846 ifelse([$1],[],[save_CFLAGS="$CFLAGS"
847 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
848 [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
849 CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
850 [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
851 GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
852 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
854 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
855 # that will create temporary files in the current directory regardless of
856 # the output directory. Thus, making CWD read-only will cause this test
857 # to fail, enabling locking or at least warning the user not to do parallel
861 if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
863 # The compiler can only warn and ignore the option if not recognized
864 # So say no if there are warnings
865 if test -s out/conftest.err; then
866 # Append any errors to the config.log.
867 cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
869 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
872 ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
873 [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
874 [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
882 ])# AC_LIBTOOL_PROG_CC_C_O
885 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
886 # -----------------------------------------
887 # Check to see if we can do hard links to lock some files if needed
888 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
889 [AC_REQUIRE([_LT_AC_LOCK])dnl
891 hard_links="nottested"
892 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
893 # do not overwrite the value of need_locks provided by the user
894 AC_MSG_CHECKING([if we can lock with hard links])
897 ln conftest.a conftest.b 2>/dev/null && hard_links=no
899 ln conftest.a conftest.b 2>&5 || hard_links=no
900 ln conftest.a conftest.b 2>/dev/null && hard_links=no
901 AC_MSG_RESULT([$hard_links])
902 if test "$hard_links" = no; then
903 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
909 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
914 AC_DEFUN([AC_LIBTOOL_OBJDIR],
915 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
916 [rm -f .libs 2>/dev/null
917 mkdir .libs 2>/dev/null
918 if test -d .libs; then
921 # MS-DOS does not allow filenames that begin with a dot.
924 rmdir .libs 2>/dev/null])
926 ])# AC_LIBTOOL_OBJDIR
929 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
930 # ----------------------------------------------
931 # Check hardcoding attributes.
932 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
933 [AC_MSG_CHECKING([how to hardcode library paths into programs])
934 _LT_AC_TAGVAR(hardcode_action, $1)=
935 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
936 test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
938 # We can hardcode non-existant directories.
939 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
940 # If the only mechanism to avoid hardcoding is shlibpath_var, we
941 # have to relink, otherwise we might link with an installed library
942 # when we should be linking with a yet-to-be-installed one
943 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
944 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
945 # Linking always hardcodes the temporary library directory.
946 _LT_AC_TAGVAR(hardcode_action, $1)=relink
948 # We can link without hardcoding, and we can hardcode nonexisting dirs.
949 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
952 # We cannot hardcode anything, or else we can only hardcode existing
954 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
956 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
958 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
959 # Fast installation is not supported
960 enable_fast_install=no
961 elif test "$shlibpath_overrides_runpath" = yes ||
962 test "$enable_shared" = no; then
963 # Fast installation is not necessary
964 enable_fast_install=needless
966 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
969 # AC_LIBTOOL_SYS_LIB_STRIP
970 # ------------------------
971 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
974 AC_MSG_CHECKING([whether stripping libraries is possible])
975 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
976 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
977 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
982 ])# AC_LIBTOOL_SYS_LIB_STRIP
985 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
986 # -----------------------------
987 # PORTME Fill in your ld.so characteristics
988 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
989 [AC_MSG_CHECKING([dynamic linker characteristics])
991 libname_spec='lib$name'
998 shlibpath_overrides_runpath=unknown
1000 dynamic_linker="$host_os ld.so"
1001 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1002 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1003 need_lib_prefix=unknown
1004 hardcode_into_libs=no
1006 # when you set need_version to no, make sure it does not cause -set_version
1007 # flags to be left without arguments
1008 need_version=unknown
1013 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1014 shlibpath_var=LIBPATH
1016 # AIX 3 has no versioning support, so we append a major version to the name.
1017 soname_spec='${libname}${release}.so$major'
1022 if test "$host_cpu" = ia64; then
1023 # AIX 5 supports IA64
1024 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
1025 shlibpath_var=LD_LIBRARY_PATH
1027 # With GCC up to 2.95.x, collect2 would create an import file
1028 # for dependence libraries. The import file would start with
1029 # the line `#! .'. This would cause the generated library to
1030 # depend on `.', always an invalid library. This was fixed in
1031 # development snapshots of GCC prior to 3.0.
1033 aix4 | aix4.[[01]] | aix4.[[01]].*)
1034 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1036 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1043 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1044 # soname into executable. Probably we can add versioning support to
1045 # collect2, so additional links can be useful in future.
1046 if test "$aix_use_runtimelinking" = yes; then
1047 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1048 # instead of lib<name>.a to let people know that these are not
1049 # typical AIX shared libraries.
1050 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1052 # We preserve .a as extension for shared libraries through AIX4.2
1053 # and later when we are not doing run time linking.
1054 library_names_spec='${libname}${release}.a $libname.a'
1055 soname_spec='${libname}${release}.so$major'
1057 shlibpath_var=LIBPATH
1062 library_names_spec='$libname.ixlibrary $libname.a'
1063 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1064 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'
1068 library_names_spec='${libname}.so'
1069 dynamic_linker="$host_os ld.so"
1070 shlibpath_var=LIBRARY_PATH
1076 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1077 soname_spec='${libname}${release}.so$major'
1078 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1079 shlibpath_var=LD_LIBRARY_PATH
1080 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1081 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1082 # the default ld.so.conf also contains /usr/contrib/lib and
1083 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1084 # libtool to hard-code these into programs
1087 cygwin* | mingw* | pw32*)
1088 version_type=windows
1091 case $GCC,$host_os in
1093 library_names_spec='$libname.dll.a'
1094 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1095 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1096 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
1097 dldir=$destdir/`dirname \$dlpath`~
1098 test -d \$dldir || mkdir -p \$dldir~
1099 $install_prog .libs/$dlname \$dldir/$dlname'
1100 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
1101 dlpath=$dir/\$dldll~
1105 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
1106 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
1107 if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
1108 # It is most probably a Windows format PATH printed by
1109 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1110 # path with ; separators, and with drive letters. We can handle the
1111 # drive letters (cygwin fileutils understands them), so leave them,
1112 # especially as we might pass files found there to a mingw objdump,
1113 # which wouldn't understand a cygwinified path. Ahh.
1114 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
1116 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e "s/$PATH_SEPARATOR/ /g"`
1120 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
1123 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
1126 dynamic_linker='Win32 ld.exe'
1127 # FIXME: first we should search . and the directory the executable is in
1131 darwin* | rhapsody*)
1132 dynamic_linker="$host_os dyld"
1136 # FIXME: Relying on posixy $() will cause problems for
1137 # cross-compilation, but unfortunately the echo tests do not
1138 # yet detect zsh echo's removal of \ escapes.
1139 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)'
1140 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
1141 shlibpath_overrides_runpath=yes
1142 shlibpath_var=DYLD_LIBRARY_PATH
1149 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1150 soname_spec='${libname}${release}.so$major'
1151 shlibpath_var=LD_LIBRARY_PATH
1159 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1160 version_type=freebsd-$objformat
1161 case $version_type in
1163 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1168 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1172 shlibpath_var=LD_LIBRARY_PATH
1175 shlibpath_overrides_runpath=yes
1177 freebsd3.[01]* | freebsdelf3.[01]*)
1178 shlibpath_overrides_runpath=yes
1179 hardcode_into_libs=yes
1182 shlibpath_overrides_runpath=no
1183 hardcode_into_libs=yes
1192 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1193 soname_spec='${libname}${release}.so$major'
1194 shlibpath_var=LD_LIBRARY_PATH
1195 hardcode_into_libs=yes
1198 hpux9* | hpux10* | hpux11*)
1199 # Give a soname corresponding to the major version so that dld.sl refuses to
1200 # link against other versions.
1204 if test "$host_cpu" = ia64; then
1205 hardcode_into_libs=yes
1206 dynamic_linker="$host_os dld.so"
1207 shlibpath_var=LD_LIBRARY_PATH
1208 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1209 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1210 soname_spec='${libname}${release}.so$major'
1211 if test "X$HPUX_IA64_MODE" = X32; then
1212 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1214 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1216 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1218 dynamic_linker="$host_os dld.sl"
1219 shlibpath_var=SHLIB_PATH
1220 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1221 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1222 soname_spec='${libname}${release}.sl$major'
1224 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1225 postinstall_cmds='chmod 555 $lib'
1228 irix5* | irix6* | nonstopux*)
1230 nonstopux*) version_type=nonstopux ;;
1231 *) version_type=irix ;;
1235 soname_spec='${libname}${release}.so$major'
1236 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1238 irix5* | nonstopux*)
1242 case $LD in # libtool.m4 will add one of these switches to LD
1243 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1244 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1245 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1246 *) libsuff= shlibsuff= libmagic=never-match;;
1250 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1251 shlibpath_overrides_runpath=no
1252 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1253 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1256 # No shared lib support for Linux oldld, aout, or coff.
1257 linux*oldld* | linux*aout* | linux*coff*)
1261 # This must be Linux ELF.
1266 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1267 soname_spec='${libname}${release}.so$major'
1268 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1270 if test "x$LINUX_64_MODE" = x64; then
1271 # Some platforms are per default 64-bit, so there's no /lib64
1272 if test -d /lib64; then
1276 shlibpath_var=LD_LIBRARY_PATH
1277 shlibpath_overrides_runpath=no
1278 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
1279 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1280 # This implies no fast_install, which is unacceptable.
1281 # Some rework will be needed to allow for fast_install
1282 # before this can be enabled.
1283 hardcode_into_libs=yes
1285 # We used to test for /lib/ld.so.1 and disable shared libraries on
1286 # powerpc, because MkLinux only supported shared libraries with the
1287 # GNU dynamic linker. Since this was broken with cross compilers,
1288 # most powerpc-linux boxes support dynamic linking these days and
1289 # people can always --disable-shared, the test was removed, and we
1290 # assume the GNU/Linux dynamic linker is in use.
1291 dynamic_linker='GNU/Linux ld.so'
1298 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1299 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1300 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1301 dynamic_linker='NetBSD (a.out) ld.so'
1303 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1304 soname_spec='${libname}${release}.so$major'
1305 dynamic_linker='NetBSD ld.elf_so'
1307 shlibpath_var=LD_LIBRARY_PATH
1308 shlibpath_overrides_runpath=yes
1309 hardcode_into_libs=yes
1314 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1315 shlibpath_var=LD_LIBRARY_PATH
1316 shlibpath_overrides_runpath=yes
1323 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1324 soname_spec='${libname}${release}.so$major'
1325 shlibpath_var=LD_LIBRARY_PATH
1326 shlibpath_overrides_runpath=yes
1333 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1334 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1335 shlibpath_var=LD_LIBRARY_PATH
1336 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1338 openbsd2.[[89]] | openbsd2.[[89]].*)
1339 shlibpath_overrides_runpath=no
1342 shlibpath_overrides_runpath=yes
1346 shlibpath_overrides_runpath=yes
1351 libname_spec='$name'
1353 library_names_spec='$libname.dll $libname.a'
1354 dynamic_linker='OS/2 ld.exe'
1355 shlibpath_var=LIBPATH
1358 osf3* | osf4* | osf5*)
1362 soname_spec='${libname}${release}.so'
1363 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1364 shlibpath_var=LD_LIBRARY_PATH
1365 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1366 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1371 soname_spec='${libname}${release}.so$major'
1372 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1373 shlibpath_var=LD_LIBRARY_PATH
1380 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1381 soname_spec='${libname}${release}.so$major'
1382 shlibpath_var=LD_LIBRARY_PATH
1383 shlibpath_overrides_runpath=yes
1384 hardcode_into_libs=yes
1385 # ldd complains unless libraries are executable
1386 postinstall_cmds='chmod +x $lib'
1391 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1392 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1393 shlibpath_var=LD_LIBRARY_PATH
1394 shlibpath_overrides_runpath=yes
1395 if test "$with_gnu_ld" = yes; then
1401 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1403 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1404 soname_spec='${libname}${release}.so$major'
1405 shlibpath_var=LD_LIBRARY_PATH
1406 case $host_vendor in
1408 shlibpath_overrides_runpath=no
1413 shlibpath_overrides_runpath=no
1414 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1420 if test -d /usr/nec ;then
1422 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
1423 soname_spec='$libname.so.$major'
1424 shlibpath_var=LD_LIBRARY_PATH
1430 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1431 soname_spec='${libname}${release}.so$major'
1432 shlibpath_var=LD_LIBRARY_PATH
1439 AC_MSG_RESULT([$dynamic_linker])
1440 test "$dynamic_linker" = no && can_build_shared=no
1441 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1446 AC_DEFUN([_LT_AC_TAGCONFIG],
1447 [AC_ARG_WITH([tags],
1448 [AC_HELP_STRING([--with-tags=TAGS],
1449 [include additional configurations @<:@CXX,GCJ@:>@])],
1450 [tagnames="$withval"],
1453 mingw*|cygwin*) tagnames="$tagnames,RC" ;;
1456 if test -f "$ltmain" && test -n "$tagnames"; then
1457 if test ! -f "${ofile}"; then
1458 AC_MSG_WARN([output file `$ofile' does not exist])
1461 if test -z "$LTCC"; then
1462 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1463 if test -z "$LTCC"; then
1464 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1466 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1470 # Extract list of available tagged configurations in $ofile.
1471 # Note that this assumes the entire list is on one line.
1472 available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1474 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1475 for tagname in $tagnames; do
1477 # Check whether tagname contains only valid characters
1478 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1480 *) AC_MSG_ERROR([invalid tag name: $tagname])
1484 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1486 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1489 # Update the list of available tags.
1490 if test -n "$tagname"; then
1491 echo appending configuration tag \"$tagname\" to $ofile
1495 AC_LIBTOOL_LANG_CXX_CONFIG
1499 AC_LIBTOOL_LANG_GCJ_CONFIG
1503 AC_LIBTOOL_LANG_RC_CONFIG
1507 AC_MSG_ERROR([Unsupported tag name: $tagname])
1511 # Append the new tag name to the list of available tags.
1512 available_tags="$available_tags $tagname"
1517 # Now substitute the updated list of available tags.
1518 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1519 mv "${ofile}T" "$ofile"
1523 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1526 ])# _LT_AC_TAGCONFIG
1531 # enable checks for dlopen support
1532 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1533 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1534 ])# AC_LIBTOOL_DLOPEN
1537 # AC_LIBTOOL_WIN32_DLL
1538 # --------------------
1539 # declare package support for building win32 dll's
1540 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1541 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1542 ])# AC_LIBTOOL_WIN32_DLL
1545 # AC_ENABLE_SHARED([DEFAULT])
1546 # ---------------------------
1547 # implement the --enable-shared flag
1548 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1549 AC_DEFUN([AC_ENABLE_SHARED],
1550 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1551 AC_ARG_ENABLE([shared],
1552 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1553 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1554 [p=${PACKAGE-default}
1556 yes) enable_shared=yes ;;
1557 no) enable_shared=no ;;
1560 # Look at the argument we got. We use all the common list separators.
1561 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1562 for pkg in $enableval; do
1564 if test "X$pkg" = "X$p"; then
1571 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1572 ])# AC_ENABLE_SHARED
1577 #- set the default shared flag to --disable-shared
1578 AC_DEFUN([AC_DISABLE_SHARED],
1579 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1580 AC_ENABLE_SHARED(no)
1581 ])# AC_DISABLE_SHARED
1584 # AC_ENABLE_STATIC([DEFAULT])
1585 # ---------------------------
1586 # implement the --enable-static flag
1587 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1588 AC_DEFUN([AC_ENABLE_STATIC],
1589 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1590 AC_ARG_ENABLE([static],
1591 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1592 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1593 [p=${PACKAGE-default}
1595 yes) enable_static=yes ;;
1596 no) enable_static=no ;;
1599 # Look at the argument we got. We use all the common list separators.
1600 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1601 for pkg in $enableval; do
1603 if test "X$pkg" = "X$p"; then
1610 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1611 ])# AC_ENABLE_STATIC
1616 # set the default static flag to --disable-static
1617 AC_DEFUN([AC_DISABLE_STATIC],
1618 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1619 AC_ENABLE_STATIC(no)
1620 ])# AC_DISABLE_STATIC
1623 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1624 # ---------------------------------
1625 # implement the --enable-fast-install flag
1626 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1627 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1628 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1629 AC_ARG_ENABLE([fast-install],
1630 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1631 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1632 [p=${PACKAGE-default}
1634 yes) enable_fast_install=yes ;;
1635 no) enable_fast_install=no ;;
1637 enable_fast_install=no
1638 # Look at the argument we got. We use all the common list separators.
1639 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1640 for pkg in $enableval; do
1642 if test "X$pkg" = "X$p"; then
1643 enable_fast_install=yes
1649 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1650 ])# AC_ENABLE_FAST_INSTALL
1653 # AC_DISABLE_FAST_INSTALL
1654 # -----------------------
1655 # set the default to --disable-fast-install
1656 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1657 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1658 AC_ENABLE_FAST_INSTALL(no)
1659 ])# AC_DISABLE_FAST_INSTALL
1662 # AC_LIBTOOL_PICMODE([MODE])
1663 # --------------------------
1664 # implement the --with-pic flag
1665 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1666 AC_DEFUN([AC_LIBTOOL_PICMODE],
1667 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1668 pic_mode=ifelse($#,1,$1,default)
1669 ])# AC_LIBTOOL_PICMODE
1672 # AC_PATH_TOOL_PREFIX
1673 # -------------------
1674 # find a file program which can recognise shared library
1675 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1676 [AC_MSG_CHECKING([for $1])
1677 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1679 [[\\/*] | ?:[\\/]*])
1680 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1683 lt_save_MAGIC_CMD="$MAGIC_CMD"
1684 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1685 dnl $ac_dummy forces splitting on constant user-supplied paths.
1686 dnl POSIX.2 word splitting is done only on the output of word expansions,
1687 dnl not every word. This closes a longstanding sh security hole.
1688 ac_dummy="ifelse([$2], , $PATH, [$2])"
1689 for ac_dir in $ac_dummy; do
1691 test -z "$ac_dir" && ac_dir=.
1692 if test -f $ac_dir/$1; then
1693 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1694 if test -n "$file_magic_test_file"; then
1695 case $deplibs_check_method in
1697 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1698 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1699 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1700 egrep "$file_magic_regex" > /dev/null; then
1705 *** Warning: the command libtool uses to detect shared libraries,
1706 *** $file_magic_cmd, produces output that libtool cannot recognize.
1707 *** The result is that libtool may fail to recognize shared libraries
1708 *** as such. This will affect the creation of libtool libraries that
1709 *** depend on shared libraries, but programs linked with such libtool
1710 *** libraries will work regardless of this problem. Nevertheless, you
1711 *** may want to report the problem to your system manager and/or to
1712 *** bug-libtool@gnu.org
1722 MAGIC_CMD="$lt_save_MAGIC_CMD"
1725 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1726 if test -n "$MAGIC_CMD"; then
1727 AC_MSG_RESULT($MAGIC_CMD)
1731 ])# AC_PATH_TOOL_PREFIX
1736 # find a file program which can recognise a shared library
1737 AC_DEFUN([AC_PATH_MAGIC],
1738 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1739 if test -z "$lt_cv_path_MAGIC_CMD"; then
1740 if test -n "$ac_tool_prefix"; then
1741 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1751 # find the path to the GNU or non-GNU linker
1752 AC_DEFUN([AC_PROG_LD],
1753 [AC_ARG_WITH([gnu-ld],
1754 [AC_HELP_STRING([--with-gnu-ld],
1755 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1756 [test "$withval" = no || with_gnu_ld=yes],
1758 AC_REQUIRE([AC_PROG_CC])dnl
1759 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1760 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1762 if test "$GCC" = yes; then
1763 # Check if gcc -print-prog-name=ld gives a path.
1764 AC_MSG_CHECKING([for ld used by GCC])
1767 # gcc leaves a trailing carriage return which upsets mingw
1768 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1770 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1773 # Accept absolute paths.
1774 [[\\/]]* | ?:[[\\/]]*)
1775 re_direlt='/[[^/]][[^/]]*/\.\./'
1776 # Canonicalize the path of ld
1777 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1778 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1779 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1781 test -z "$LD" && LD="$ac_prog"
1784 # If it fails, then pretend we aren't using GCC.
1788 # If it is relative, then search for the first ld in PATH.
1792 elif test "$with_gnu_ld" = yes; then
1793 AC_MSG_CHECKING([for GNU ld])
1795 AC_MSG_CHECKING([for non-GNU ld])
1797 AC_CACHE_VAL(lt_cv_path_LD,
1798 [if test -z "$LD"; then
1799 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1800 for ac_dir in $PATH; do
1802 test -z "$ac_dir" && ac_dir=.
1803 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1804 lt_cv_path_LD="$ac_dir/$ac_prog"
1805 # Check to see if the program is GNU ld. I'd rather use --version,
1806 # but apparently some GNU ld's only accept -v.
1807 # Break only if it was the GNU/non-GNU ld that we prefer.
1808 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1809 test "$with_gnu_ld" != no && break
1811 test "$with_gnu_ld" != yes && break
1817 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1820 if test -n "$LD"; then
1825 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1832 AC_DEFUN([AC_PROG_LD_GNU],
1833 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1834 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1835 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1836 lt_cv_prog_gnu_ld=yes
1838 lt_cv_prog_gnu_ld=no
1840 with_gnu_ld=$lt_cv_prog_gnu_ld
1844 # AC_PROG_LD_RELOAD_FLAG
1845 # ----------------------
1846 # find reload flag for linker
1847 # -- PORTME Some linkers may need a different reload flag.
1848 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
1849 [AC_CACHE_CHECK([for $LD option to reload object files],
1850 lt_cv_ld_reload_flag,
1851 [lt_cv_ld_reload_flag='-r'])
1852 reload_flag=$lt_cv_ld_reload_flag
1853 case $reload_flag in
1855 *) reload_flag=" $reload_flag" ;;
1857 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1858 ])# AC_PROG_LD_RELOAD_FLAG
1861 # AC_DEPLIBS_CHECK_METHOD
1862 # -----------------------
1863 # how to check for library dependencies
1864 # -- PORTME fill in with the dynamic library characteristics
1865 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1866 [AC_CACHE_CHECK([how to recognise dependant libraries],
1867 lt_cv_deplibs_check_method,
1868 [lt_cv_file_magic_cmd='$MAGIC_CMD'
1869 lt_cv_file_magic_test_file=
1870 lt_cv_deplibs_check_method='unknown'
1871 # Need to set the preceding variable on all platforms that support
1872 # interlibrary dependencies.
1873 # 'none' -- dependencies not supported.
1874 # `unknown' -- same as none, but documents that we really don't know.
1875 # 'pass_all' -- all dependencies passed with no checks.
1876 # 'test_compile' -- check by making test program.
1877 # 'file_magic [[regex]]' -- check by looking for files in library path
1878 # which responds to the $file_magic_cmd with a given egrep regex.
1879 # If you have `file' or equivalent on your system and you're not sure
1880 # whether `pass_all' will *always* work, you probably want this one.
1884 lt_cv_deplibs_check_method=pass_all
1888 lt_cv_deplibs_check_method=pass_all
1892 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
1893 lt_cv_file_magic_cmd='/usr/bin/file -L'
1894 lt_cv_file_magic_test_file=/shlib/libc.so
1897 cygwin* | mingw* | pw32*)
1898 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1899 lt_cv_file_magic_cmd='$OBJDUMP -f'
1902 darwin* | rhapsody*)
1903 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1904 lt_cv_file_magic_cmd='/usr/bin/file -L'
1906 rhapsody* | darwin1.[[012]])
1907 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
1910 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1916 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1919 # Not sure whether the presence of OpenBSD here was a mistake.
1920 # Let's accept both of them until this is cleared up.
1921 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
1922 lt_cv_file_magic_cmd=/usr/bin/file
1923 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1927 lt_cv_deplibs_check_method=pass_all
1932 lt_cv_deplibs_check_method=pass_all
1935 hpux10.20* | hpux11*)
1936 lt_cv_file_magic_cmd=/usr/bin/file
1937 if test "$host_cpu" = ia64; then
1938 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
1939 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1941 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
1942 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1946 irix5* | irix6* | nonstopux*)
1948 irix5* | nonstopux*)
1949 # this will be overridden with pass_all, but let us keep it just in case
1950 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1954 *-32|*"-32 ") libmagic=32-bit;;
1955 *-n32|*"-n32 ") libmagic=N32;;
1956 *-64|*"-64 ") libmagic=64-bit;;
1957 *) libmagic=never-match;;
1959 # this will be overridden with pass_all, but let us keep it just in case
1960 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
1963 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1964 lt_cv_deplibs_check_method=pass_all
1967 # This must be Linux ELF.
1970 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64* )
1971 lt_cv_deplibs_check_method=pass_all ;;
1972 # the debian people say, arm and glibc 2.3.1 works for them with pass_all
1974 lt_cv_deplibs_check_method=pass_all ;;
1976 # glibc up to 2.1.1 does not perform some relocations on ARM
1977 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
1979 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1983 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1984 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
1986 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
1991 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
1992 lt_cv_file_magic_cmd=/usr/bin/file
1993 lt_cv_file_magic_test_file=/usr/lib/libnls.so
1997 lt_cv_deplibs_check_method=unknown
2001 lt_cv_file_magic_cmd=/usr/bin/file
2002 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2003 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2004 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2006 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2010 osf3* | osf4* | osf5*)
2011 # this will be overridden with pass_all, but let us keep it just in case
2012 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2013 lt_cv_file_magic_test_file=/shlib/libc.so
2014 lt_cv_deplibs_check_method=pass_all
2018 lt_cv_deplibs_check_method=pass_all
2022 lt_cv_deplibs_check_method=pass_all
2023 lt_cv_file_magic_test_file=/lib/libc.so
2026 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2027 case $host_vendor in
2029 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]]'
2030 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2033 lt_cv_deplibs_check_method=pass_all
2036 lt_cv_file_magic_cmd='/bin/file'
2037 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2040 lt_cv_file_magic_cmd='/bin/file'
2041 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2042 lt_cv_file_magic_test_file=/lib/libc.so
2047 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2048 lt_cv_deplibs_check_method=pass_all
2052 file_magic_cmd=$lt_cv_file_magic_cmd
2053 deplibs_check_method=$lt_cv_deplibs_check_method
2054 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2055 ])# AC_DEPLIBS_CHECK_METHOD
2060 # find the path to a BSD-compatible name lister
2061 AC_DEFUN([AC_PROG_NM],
2062 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2063 [if test -n "$NM"; then
2064 # Let the user override the test.
2067 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2068 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2070 test -z "$ac_dir" && ac_dir=.
2071 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2072 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2073 # Check to see if the nm accepts a BSD-compat flag.
2074 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2075 # nm: unknown option "B" ignored
2076 # Tru64's nm complains that /dev/null is an invalid object file
2077 if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
2078 lt_cv_path_NM="$tmp_nm -B"
2080 elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
2081 lt_cv_path_NM="$tmp_nm -p"
2084 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2085 continue # so that we can try to find one that supports BSD flags
2090 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2098 # check for math library
2099 AC_DEFUN([AC_CHECK_LIBM],
2100 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2103 *-*-beos* | *-*-cygwin* | *-*-pw32*)
2104 # These system don't have libm
2107 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2108 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
2111 AC_CHECK_LIB(m, main, LIBM="-lm")
2117 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2118 # -----------------------------------
2119 # sets LIBLTDL to the link flags for the libltdl convenience library and
2120 # LTDLINCL to the include flags for the libltdl header and adds
2121 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2122 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2123 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2124 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2125 # '${top_srcdir}/' (note the single quotes!). If your package is not
2126 # flat and you're not using automake, define top_builddir and
2127 # top_srcdir appropriately in the Makefiles.
2128 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2129 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2130 case $enable_ltdl_convenience in
2131 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2132 "") enable_ltdl_convenience=yes
2133 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2135 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2136 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2137 # For backwards non-gettext consistent compatibility...
2139 ])# AC_LIBLTDL_CONVENIENCE
2142 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2143 # -----------------------------------
2144 # sets LIBLTDL to the link flags for the libltdl installable library and
2145 # LTDLINCL to the include flags for the libltdl header and adds
2146 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2147 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2148 # DIRECTORY is not provided and an installed libltdl is not found, it is
2149 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2150 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2151 # quotes!). If your package is not flat and you're not using automake,
2152 # define top_builddir and top_srcdir appropriately in the Makefiles.
2153 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2154 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2155 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2156 AC_CHECK_LIB(ltdl, main,
2157 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2158 [if test x"$enable_ltdl_install" = xno; then
2159 AC_MSG_WARN([libltdl not installed, but installation disabled])
2161 enable_ltdl_install=yes
2164 if test x"$enable_ltdl_install" = x"yes"; then
2165 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2166 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2167 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2169 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2173 # For backwards non-gettext consistent compatibility...
2175 ])# AC_LIBLTDL_INSTALLABLE
2178 # If this macro is not defined by Autoconf, define it here.
2179 ifdef([AC_PROVIDE_IFELSE],
2181 [define([AC_PROVIDE_IFELSE],
2182 [ifdef([AC_PROVIDE_$1],
2188 # enable support for C++ libraries
2189 AC_DEFUN([AC_LIBTOOL_CXX],
2190 [AC_REQUIRE([_LT_AC_LANG_CXX])
2196 AC_DEFUN([_LT_AC_LANG_CXX],
2197 [AC_REQUIRE([AC_PROG_CXX])
2198 AC_REQUIRE([AC_PROG_CXXCPP])
2204 # enable support for GCJ libraries
2205 AC_DEFUN([AC_LIBTOOL_GCJ],
2206 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2212 AC_DEFUN([_LT_AC_LANG_GCJ],
2213 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2214 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2215 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2216 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2217 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2218 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2224 # enable support for Windows resource files
2225 AC_DEFUN([AC_LIBTOOL_RC],
2226 [AC_REQUIRE([AC_PROG_RC])
2230 # AC_LIBTOOL_LANG_C_CONFIG
2231 # ------------------------
2232 # Ensure that the configuration vars for the C compiler are
2233 # suitably defined. Those variables are subsequently used by
2234 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2235 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2236 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2240 # Source file extension for C test sources.
2243 # Object file extension for compiled C test sources.
2245 _LT_AC_TAGVAR(objext, $1)=$objext
2247 # Code to be used in simple compile tests
2248 lt_simple_compile_test_code="int some_variable = 0;"
2250 # Code to be used in simple link tests
2251 lt_simple_link_test_code='main(){return(0);}'
2256 # Check for any special shared library compilation flags.
2258 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2259 if test "$GCC" = no; then
2262 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2266 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2267 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2268 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2270 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2271 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2277 # Check to make sure the static flag actually works.
2279 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2280 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2281 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2283 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2287 ## There is no encapsulation within the following macros, do not change
2288 ## the running order or otherwise move them around unless you know exactly
2289 ## what you are doing...
2290 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2291 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2292 AC_LIBTOOL_PROG_CC_C_O($1)
2293 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2294 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2295 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2296 AC_LIBTOOL_SYS_LIB_STRIP
2297 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2298 AC_LIBTOOL_DLOPEN_SELF($1)
2300 # Report which librarie types wil actually be built
2301 AC_MSG_CHECKING([if libtool supports shared libraries])
2302 AC_MSG_RESULT([$can_build_shared])
2304 AC_MSG_CHECKING([whether to build shared libraries])
2305 test "$can_build_shared" = "no" && enable_shared=no
2307 # On AIX, shared libraries and static libraries use the same namespace, and
2308 # are all built from PIC.
2311 test "$enable_shared" = yes && enable_static=no
2312 if test -n "$RANLIB"; then
2313 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2314 postinstall_cmds='$RANLIB $lib'
2319 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2320 test "$enable_shared" = yes && enable_static=no
2324 AC_MSG_RESULT([$enable_shared])
2326 AC_MSG_CHECKING([whether to build static libraries])
2327 # Make sure either enable_shared or enable_static is yes.
2328 test "$enable_shared" = yes || enable_static=yes
2329 AC_MSG_RESULT([$enable_static])
2331 AC_LIBTOOL_CONFIG($1)
2335 ])# AC_LIBTOOL_LANG_C_CONFIG
2338 # AC_LIBTOOL_LANG_CXX_CONFIG
2339 # --------------------------
2340 # Ensure that the configuration vars for the C compiler are
2341 # suitably defined. Those variables are subsequently used by
2342 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2343 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2344 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2346 AC_REQUIRE([AC_PROG_CXX])
2347 AC_REQUIRE([AC_PROG_CXXCPP])
2349 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2350 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2351 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2352 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2353 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2354 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2355 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2356 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2357 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2358 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2359 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2360 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2361 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2363 # Dependencies to place before and after the object being linked:
2364 _LT_AC_TAGVAR(predep_objects, $1)=
2365 _LT_AC_TAGVAR(postdep_objects, $1)=
2366 _LT_AC_TAGVAR(predeps, $1)=
2367 _LT_AC_TAGVAR(postdeps, $1)=
2368 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2370 # Source file extension for C test sources.
2373 # Object file extension for compiled C test sources.
2375 _LT_AC_TAGVAR(objext, $1)=$objext
2377 # Code to be used in simple compile tests
2378 lt_simple_compile_test_code="int some_variable = 0;"
2380 # Code to be used in simple link tests
2381 lt_simple_link_test_code='int main(int char *[]) { return(0); }'
2383 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2386 # Allow CC to be a program name with arguments.
2391 _LT_AC_TAGVAR(compiler, $1)=$CC
2392 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2394 # We don't want -fno-exception wen compiling C++ code, so set the
2395 # no_builtin_flag separately
2396 if test "$GXX" = yes; then
2397 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2399 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2402 if test "$GXX" = yes; then
2403 # Set up default GNU C++ configuration
2405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2406 # archiving commands below assume that GNU ld is being used.
2407 if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
2408 egrep 'GNU ld' > /dev/null; then
2411 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2412 _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'
2414 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2415 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2417 # If archive_cmds runs LD, not CC, wlarc should be empty
2418 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2419 # investigate it a little bit more. (MM)
2422 # ancient GNU ld didn't support --whole-archive et. al.
2423 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2424 egrep 'no-whole-archive' > /dev/null; then
2425 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2427 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2433 # A generic and very simple default shared library creation
2434 # command for GNU C++ for the case where it uses the native
2435 # linker, instead of GNU ld. If possible, this setting should
2436 # overridden to take advantage of the native linker features on
2437 # the platform it is being used on.
2438 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2441 # Commands to make compiler produce verbose output that lists
2442 # what "hidden" libraries, object files and flags are used when
2443 # linking a shared library.
2444 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2452 # PORTME: fill in a description of your system's C++ link characteristics
2453 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2454 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2457 # FIXME: insert proper C++ library support
2458 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2461 if test "$host_cpu" = ia64; then
2462 # On IA64, the linker does run time linking by default, so we don't
2463 # have to do anything special.
2464 aix_use_runtimelinking=no
2465 exp_sym_flag='-Bexport'
2468 # KDE requires run time linking. Make it the default.
2469 aix_use_runtimelinking=yes
2470 exp_sym_flag='-bexport'
2471 no_entry_flag='-bnoentry'
2474 # When large executables or shared objects are built, AIX ld can
2475 # have problems creating the table of contents. If linking a library
2476 # or program results in "error TOC overflow" add -mminimal-toc to
2477 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2478 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2480 _LT_AC_TAGVAR(archive_cmds, $1)=''
2481 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2482 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2483 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2485 if test "$GXX" = yes; then
2486 case $host_os in aix4.[012]|aix4.[012].*)
2487 # We only want to do this on AIX 4.2 and lower, the check
2488 # below for broken collect2 doesn't work under 4.3+
2489 collect2name=`${CC} -print-prog-name=collect2`
2490 if test -f "$collect2name" && \
2491 strings "$collect2name" | grep resolve_lib_name >/dev/null
2493 # We have reworked collect2
2494 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2496 # We have old collect2
2497 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2498 # It fails to find uninstalled libraries when the uninstalled
2499 # path is not listed in the libpath. Setting hardcode_minus_L
2500 # to unsupported forces relinking
2501 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2502 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2503 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2506 shared_flag='-shared'
2509 if test "$host_cpu" = ia64; then
2510 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2511 # chokes on -Wl,-G. The following line is correct:
2514 if test "$aix_use_runtimelinking" = yes; then
2515 shared_flag='-qmkshrobj ${wl}-G'
2517 shared_flag='-qmkshrobj'
2522 # Let the compiler handle the export list.
2523 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2524 if test "$aix_use_runtimelinking" = yes; then
2525 # Warning - without using the other runtime loading flags (-brtl),
2526 # -berok will link without error, but may produce a broken library.
2527 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2528 # Determine the default libpath from the value encoded in an empty executable.
2529 _LT_AC_SYS_LIBPATH_AIX
2530 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2532 _LT_AC_TAGVAR(archive_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` '" $shared_flag"
2533 _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}$exp_sym_flag:\$export_symbols $shared_flag"
2535 if test "$host_cpu" = ia64; then
2536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2537 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2538 _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"
2540 # Determine the default libpath from the value encoded in an empty executable.
2541 _LT_AC_SYS_LIBPATH_AIX
2542 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2543 # Warning - without using the other run time loading flags,
2544 # -berok will link without error, but may produce a broken library.
2545 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2546 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2547 # -bexpall does not export symbols beginning with underscore (_)
2548 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2549 # Exported symbols can be pulled into shared objects from archives
2550 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2551 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2552 # This is similar to how AIX traditionally builds it's shared libraries.
2553 _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'
2558 case $cc_basename in
2560 # FIXME: insert proper C++ library support
2561 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2566 case $cc_basename in
2568 # FIXME: insert proper C++ library support
2569 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2572 # Green Hills C++ Compiler
2573 # FIXME: insert proper C++ library support
2574 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2577 # FIXME: insert proper C++ library support
2578 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2583 # C++ shared libraries reported to be fairly broken before switch to ELF
2584 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2587 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2590 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2592 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2597 if test $with_gnu_ld = no; then
2598 if test "$host_cpu" = ia64; then
2599 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2602 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2603 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2606 if test "$host_cpu" = ia64; then
2607 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2608 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2610 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2612 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2613 # but as the default
2614 # location of the library.
2616 case $cc_basename in
2618 # FIXME: insert proper C++ library support
2619 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2624 _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'
2627 if test "$host_cpu" = ia64; then
2628 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2630 _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'
2634 # Commands to make compiler produce verbose output that lists
2635 # what "hidden" libraries, object files and flags are used when
2636 # linking a shared library.
2638 # There doesn't appear to be a way to prevent this compiler from
2639 # explicitly linking system object files so we need to strip them
2640 # from the output so that they don't get included in the library
2642 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'
2645 if test "$GXX" = yes; then
2646 if test $with_gnu_ld = no; then
2649 _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'
2652 if test "$host_cpu" = ia64; then
2653 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
2655 _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'
2661 # FIXME: insert proper C++ library support
2662 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2668 case $cc_basename in
2671 _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'
2673 # Archives containing C++ object files must be created using
2674 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
2675 # necessary to make sure instantiated templates are included
2677 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
2680 if test "$GXX" = yes; then
2681 if test "$with_gnu_ld" = no; then
2682 _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'
2684 _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'
2687 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2690 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2691 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2694 case $cc_basename in
2696 # Kuck and Associates, Inc. (KAI) C++ Compiler
2698 # KCC will only create a shared library if the output file
2699 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2700 # to its proper name (with version) after linking.
2701 _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'
2702 _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'
2704 # Commands to make compiler produce verbose output that lists
2705 # what "hidden" libraries, object files and flags are used when
2706 # linking a shared library.
2708 # There doesn't appear to be a way to prevent this compiler from
2709 # explicitly linking system object files so we need to strip them
2710 # from the output so that they don't get included in the library
2712 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'
2714 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
2715 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2717 # Archives containing C++ object files must be created using
2718 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2719 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2723 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2724 _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'
2726 runpath_var=LD_RUN_PATH
2727 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2728 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2730 # Commands to make compiler produce verbose output that lists
2731 # what "hidden" libraries, object files and flags are used when
2732 # linking a shared library.
2734 # There doesn't appear to be a way to prevent this compiler from
2735 # explicitly linking system object files so we need to strip them
2736 # from the output so that they don't get included in the library
2738 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'
2743 # FIXME: insert proper C++ library support
2744 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2747 # FIXME: insert proper C++ library support
2748 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2751 case $cc_basename in
2753 # FIXME: insert proper C++ library support
2754 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2757 # FIXME: insert proper C++ library support
2758 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2763 # NetBSD uses g++ - do we need to do anything?
2766 case $cc_basename in
2768 # Kuck and Associates, Inc. (KAI) C++ Compiler
2770 # KCC will only create a shared library if the output file
2771 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2772 # to its proper name (with version) after linking.
2773 _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'
2775 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2776 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2778 # Archives containing C++ object files must be created using
2779 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
2780 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
2784 # Rational C++ 2.4.1
2785 # FIXME: insert proper C++ library support
2786 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2789 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2790 _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'
2792 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2793 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2795 # Commands to make compiler produce verbose output that lists
2796 # what "hidden" libraries, object files and flags are used when
2797 # linking a shared library.
2799 # There doesn't appear to be a way to prevent this compiler from
2800 # explicitly linking system object files so we need to strip them
2801 # from the output so that they don't get included in the library
2803 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'
2806 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2807 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2808 _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'
2810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2811 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2813 # Commands to make compiler produce verbose output that lists
2814 # what "hidden" libraries, object files and flags are used when
2815 # linking a shared library.
2816 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2819 # FIXME: insert proper C++ library support
2820 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2826 case $cc_basename in
2828 # Kuck and Associates, Inc. (KAI) C++ Compiler
2830 # KCC will only create a shared library if the output file
2831 # ends with ".so" (or ".sl" for HP-UX), so rename the library
2832 # to its proper name (with version) after linking.
2833 _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'
2835 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
2836 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2838 # Archives containing C++ object files must be created using
2839 # the KAI C++ compiler.
2840 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
2843 # Rational C++ 2.4.1
2844 # FIXME: insert proper C++ library support
2845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2848 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
2849 _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'
2850 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
2851 echo "-hidden">> $lib.exp~
2852 $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~
2855 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
2856 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2858 # Commands to make compiler produce verbose output that lists
2859 # what "hidden" libraries, object files and flags are used when
2860 # linking a shared library.
2862 # There doesn't appear to be a way to prevent this compiler from
2863 # explicitly linking system object files so we need to strip them
2864 # from the output so that they don't get included in the library
2866 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'
2869 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2870 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
2871 _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'
2873 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
2874 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2876 # Commands to make compiler produce verbose output that lists
2877 # what "hidden" libraries, object files and flags are used when
2878 # linking a shared library.
2879 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
2882 # FIXME: insert proper C++ library support
2883 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2889 # FIXME: insert proper C++ library support
2890 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2893 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2894 case $cc_basename in
2896 # FIXME: insert proper C++ library support
2897 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2900 # FIXME: insert proper C++ library support
2901 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2906 case $cc_basename in
2909 # FIXME: insert proper C++ library support
2910 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2914 # FIXME: insert proper C++ library support
2915 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2918 # FIXME: insert proper C++ library support
2919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2924 case $cc_basename in
2926 # Sun C++ 4.2, 5.x and Centerline C++
2927 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
2928 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
2929 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2930 $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'
2932 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
2933 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2935 solaris2.[0-5] | solaris2.[0-5].*) ;;
2937 # The C++ compiler is used as linker so we must use $wl
2938 # flag to pass the commands to the underlying system
2940 # Supported since Solaris 2.6 (maybe 2.5.1?)
2941 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
2944 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2946 # Commands to make compiler produce verbose output that lists
2947 # what "hidden" libraries, object files and flags are used when
2948 # linking a shared library.
2950 # There doesn't appear to be a way to prevent this compiler from
2951 # explicitly linking system object files so we need to strip them
2952 # from the output so that they don't get included in the library
2954 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'
2956 # Archives containing C++ object files must be created using
2957 # "CC -xar", where "CC" is the Sun C++ compiler. This is
2958 # necessary to make sure instantiated templates are included
2960 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
2963 # Green Hills C++ Compiler
2964 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
2966 # The C++ compiler must be used to create the archive.
2967 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
2970 # GNU C++ compiler with Solaris linker
2971 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
2972 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
2973 if $CC --version | egrep -v '^2\.7' > /dev/null; then
2974 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2975 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2976 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
2978 # Commands to make compiler produce verbose output that lists
2979 # what "hidden" libraries, object files and flags are used when
2980 # linking a shared library.
2981 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
2983 # g++ 2.7 appears to require `-G' NOT `-shared' on this
2985 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
2986 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2987 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
2989 # Commands to make compiler produce verbose output that lists
2990 # what "hidden" libraries, object files and flags are used when
2991 # linking a shared library.
2992 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
2995 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3000 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3001 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3004 case $cc_basename in
3006 # NonStop-UX NCC 3.20
3007 # FIXME: insert proper C++ library support
3008 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3011 # FIXME: insert proper C++ library support
3012 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3017 # FIXME: insert proper C++ library support
3018 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3021 # FIXME: insert proper C++ library support
3022 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3025 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3026 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3028 # Figure out "hidden" C++ library dependencies from verbose
3029 # compiler output whening linking a shared library.
3030 cat > conftest.$ac_ext <<EOF
3034 Foo (void) { a = 0; }
3041 if AC_TRY_EVAL(ac_compile); then
3042 # Parse the compiler output and extract the necessary
3043 # objects, libraries and library flags.
3045 # Sentinel used to keep track of whether or not we are before
3046 # the conftest object file.
3047 pre_test_object_deps_done=no
3049 # The `*' in the case matches for architectures that use `case' in
3050 # $output_verbose_cmd can trigger glob expansion during the loop
3051 # eval without this substitution.
3052 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3054 for p in `eval $output_verbose_link_cmd`; do
3058 # Some compilers place space between "-{L,R}" and the path.
3061 || test $p = "-R"; then
3068 if test "$pre_test_object_deps_done" = no; then
3071 # Internal compiler library paths should come after those
3072 # provided the user. The postdeps already come after the
3073 # user supplied libs so there is no need to process them.
3074 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3075 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3077 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3080 # The "-l" case would never come before the object being
3081 # linked, so don't bother handling this case.
3084 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3085 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3087 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3092 *.$objext|*.$libext)
3093 # This assumes that the test object file only shows up
3094 # once in the compiler output.
3095 if test "$p" = "conftest.$objext"; then
3096 pre_test_object_deps_done=yes
3100 if test "$pre_test_object_deps_done" = no; then
3101 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3102 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3104 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3107 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3108 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3110 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3115 *) ;; # Ignore the rest.
3123 echo "libtool.m4: error: problem compiling C++ test program"
3126 $rm -f confest.$objext
3128 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3129 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3130 *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
3133 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3134 _LT_AC_TAGVAR(LD, $1)="$LD"
3137 ## There is no encapsulation within the following macros, do not change
3138 ## the running order or otherwise move them around unless you know exactly
3139 ## what you are doing...
3140 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3141 AC_LIBTOOL_PROG_CC_C_O($1)
3142 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3143 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3144 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3145 AC_LIBTOOL_SYS_LIB_STRIP
3146 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3147 AC_LIBTOOL_DLOPEN_SELF($1)
3149 AC_LIBTOOL_CONFIG($1)
3153 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3156 # AC_LIBTOOL_LANG_GCJ_CONFIG
3157 # --------------------------
3158 # Ensure that the configuration vars for the C compiler are
3159 # suitably defined. Those variables are subsequently used by
3160 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3161 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3162 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3165 # Source file extension for C test sources.
3168 # Object file extension for compiled C test sources.
3170 _LT_AC_TAGVAR(objext, $1)=$objext
3172 # Code to be used in simple compile tests
3173 lt_simple_compile_test_code="class foo {}"
3175 # Code to be used in simple link tests
3176 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
3178 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3181 # Allow CC to be a program name with arguments.
3186 _LT_AC_TAGVAR(compiler, $1)=$CC
3188 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3189 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3192 ## There is no encapsulation within the following macros, do not change
3193 ## the running order or otherwise move them around unless you know exactly
3194 ## what you are doing...
3195 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3196 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3197 AC_LIBTOOL_PROG_CC_C_O($1)
3198 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3199 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3200 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3201 AC_LIBTOOL_SYS_LIB_STRIP
3202 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3203 AC_LIBTOOL_DLOPEN_SELF($1)
3205 AC_LIBTOOL_CONFIG($1)
3209 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3212 # AC_LIBTOOL_LANG_RC_CONFIG
3213 # --------------------------
3214 # Ensure that the configuration vars for the Windows resource compiler are
3215 # suitably defined. Those variables are subsequently used by
3216 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3217 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3218 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3221 # Source file extension for RC test sources.
3224 # Object file extension for compiled RC test sources.
3226 _LT_AC_TAGVAR(objext, $1)=$objext
3228 # Code to be used in simple compile tests
3229 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
3231 # Code to be used in simple link tests
3232 lt_simple_link_test_code="$lt_simple_compile_test_code"
3234 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3237 # Allow CC to be a program name with arguments.
3242 _LT_AC_TAGVAR(compiler, $1)=$CC
3243 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3245 AC_LIBTOOL_CONFIG($1)
3249 ])# AC_LIBTOOL_LANG_RC_CONFIG
3252 # AC_LIBTOOL_CONFIG([TAGNAME])
3253 # ----------------------------
3254 # If TAGNAME is not passed, then create an initial libtool script
3255 # with a default configuration from the untagged config vars. Otherwise
3256 # add code to config.status for appending the configuration named by
3257 # TAGNAME from the matching tagged config vars.
3258 AC_DEFUN([AC_LIBTOOL_CONFIG],
3259 [# The else clause should only fire when bootstrapping the
3260 # libtool distribution, otherwise you forgot to ship ltmain.sh
3261 # with your package, and you will get complaints that there are
3262 # no rules to generate ltmain.sh.
3263 if test -f "$ltmain"; then
3264 # Now quote all the things that may contain metacharacters while being
3265 # careful not to overquote the AC_SUBSTed values. We take copies of the
3266 # variables and quote the copies for generation of the libtool script.
3267 for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SED SHELL \
3268 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3269 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3270 deplibs_check_method reload_flag reload_cmds need_locks \
3271 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
3272 lt_cv_sys_global_symbol_to_c_name_address \
3273 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3274 old_postinstall_cmds old_postuninstall_cmds \
3275 _LT_AC_TAGVAR(compiler, $1) \
3276 _LT_AC_TAGVAR(CC, $1) \
3277 _LT_AC_TAGVAR(LD, $1) \
3278 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
3279 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
3280 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
3281 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
3282 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
3283 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
3284 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
3285 _LT_AC_TAGVAR(old_archive_cmds, $1) \
3286 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
3287 _LT_AC_TAGVAR(predep_objects, $1) \
3288 _LT_AC_TAGVAR(postdep_objects, $1) \
3289 _LT_AC_TAGVAR(predeps, $1) \
3290 _LT_AC_TAGVAR(postdeps, $1) \
3291 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
3292 _LT_AC_TAGVAR(archive_cmds, $1) \
3293 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
3294 _LT_AC_TAGVAR(postinstall_cmds, $1) \
3295 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
3296 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
3297 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
3298 _LT_AC_TAGVAR(no_undefined_flag, $1) \
3299 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
3300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
3301 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
3302 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
3303 _LT_AC_TAGVAR(exclude_expsyms, $1) \
3304 _LT_AC_TAGVAR(include_expsyms, $1); do
3307 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
3308 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
3309 _LT_AC_TAGVAR(archive_cmds, $1) | \
3310 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
3311 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
3312 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
3313 extract_expsyms_cmds | reload_cmds | finish_cmds | \
3314 postinstall_cmds | postuninstall_cmds | \
3315 old_postinstall_cmds | old_postuninstall_cmds | \
3316 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3317 # Double-quote double-evaled strings.
3318 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3321 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3327 *'\[$]0 --fallback-echo"')
3328 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
3333 [cfgfile="${ofile}T"
3334 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
3336 AC_MSG_NOTICE([creating $ofile])],
3339 cat <<__EOF__ >> "$cfgfile"
3343 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3344 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3345 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3347 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3348 # Free Software Foundation, Inc.
3350 # This file is part of GNU Libtool:
3351 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3353 # This program is free software; you can redistribute it and/or modify
3354 # it under the terms of the GNU General Public License as published by
3355 # the Free Software Foundation; either version 2 of the License, or
3356 # (at your option) any later version.
3358 # This program is distributed in the hope that it will be useful, but
3359 # WITHOUT ANY WARRANTY; without even the implied warranty of
3360 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3361 # General Public License for more details.
3363 # You should have received a copy of the GNU General Public License
3364 # along with this program; if not, write to the Free Software
3365 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3367 # As a special exception to the GNU General Public License, if you
3368 # distribute this file as part of a program that contains a
3369 # configuration script generated by Autoconf, you may include it under
3370 # the same distribution terms that you use for the rest of that program.
3372 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3373 Xsed="sed -e s/^X//"
3375 # The HP-UX ksh and POSIX shell print the target directory to stdout
3377 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3379 # The names of the tagged configurations supported by this script.
3382 # ### BEGIN LIBTOOL CONFIG],
3383 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
3385 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3387 # Shell to use when invoking shell scripts.
3390 # Whether or not to build shared libraries.
3391 build_libtool_libs=$enable_shared
3393 # Whether or not to build static libraries.
3394 build_old_libs=$enable_static
3396 # Whether or not to add -lc for building shared libraries.
3397 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
3399 # Whether or not to optimize for fast installation.
3400 fast_install=$enable_fast_install
3403 host_alias=$host_alias
3406 # An echo program that does not interpret backslashes.
3411 AR_FLAGS=$lt_AR_FLAGS
3416 # A language-specific compiler.
3417 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
3419 # Is the compiler the GNU C compiler?
3420 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
3422 # The linker used to build libraries.
3423 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
3425 # Whether we need hard or soft links.
3428 # A BSD-compatible nm program.
3431 # A sed program that does not truncate output.
3434 # A symbol stripping program
3437 # Used to examine libraries when file_magic_cmd begins "file"
3438 MAGIC_CMD=$MAGIC_CMD
3440 # Used on cygwin: DLL creation program.
3443 # Used on cygwin: object dumper.
3446 # Used on cygwin: assembler.
3449 # The name of the directory that contains temporary libtool files.
3452 # How to create reloadable object files.
3453 reload_flag=$lt_reload_flag
3454 reload_cmds=$lt_reload_cmds
3456 # How to pass a linker flag through the compiler.
3457 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
3459 # Object file suffix (normally "o").
3462 # Old archive suffix (normally "a").
3465 # Executable file suffix (normally "").
3468 # Additional compiler flags for building library objects.
3469 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
3472 # What is the maximum length of a command?
3473 max_cmd_len=$lt_cv_sys_max_cmd_len
3475 # Does compiler simultaneously support -c and -o options?
3476 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
3478 # Must we lock files when doing compilation ?
3479 need_locks=$lt_need_locks
3481 # Do we need the lib prefix for modules?
3482 need_lib_prefix=$need_lib_prefix
3484 # Do we need a version for libraries?
3485 need_version=$need_version
3487 # Whether dlopen is supported.
3488 dlopen_support=$enable_dlopen
3490 # Whether dlopen of programs is supported.
3491 dlopen_self=$enable_dlopen_self
3493 # Whether dlopen of statically linked programs is supported.
3494 dlopen_self_static=$enable_dlopen_self_static
3496 # Compiler flag to prevent dynamic linking.
3497 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
3499 # Compiler flag to turn off builtin functions.
3500 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
3502 # Compiler flag to allow reflexive dlopens.
3503 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
3505 # Compiler flag to generate shared objects directly from archives.
3506 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
3508 # Compiler flag to generate thread-safe objects.
3509 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
3511 # Library versioning type.
3512 version_type=$version_type
3514 # Format of library name prefix.
3515 libname_spec=$lt_libname_spec
3517 # List of archive names. First name is the real one, the rest are links.
3518 # The last name is the one that the linker finds with -lNAME.
3519 library_names_spec=$lt_library_names_spec
3521 # The coded name of the library, if different from the real name.
3522 soname_spec=$lt_soname_spec
3524 # Commands used to build and install an old-style archive.
3526 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
3527 old_postinstall_cmds=$lt_old_postinstall_cmds
3528 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3530 # Create an old-style archive from a shared archive.
3531 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
3533 # Create a temporary old-style archive to link instead of a shared archive.
3534 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
3536 # Commands used to build and install a shared archive.
3537 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
3538 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
3539 postinstall_cmds=$lt_postinstall_cmds
3540 postuninstall_cmds=$lt_postuninstall_cmds
3542 # Commands to strip libraries.
3543 old_striplib=$lt_old_striplib
3544 striplib=$lt_striplib
3546 # Dependencies to place before the objects being linked to create a
3548 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
3550 # Dependencies to place after the objects being linked to create a
3552 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
3554 # Dependencies to place before the objects being linked to create a
3556 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
3558 # Dependencies to place after the objects being linked to create a
3560 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
3562 # The library search path used internally by the compiler when linking
3564 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
3566 # Method to check whether dependent libraries are shared objects.
3567 deplibs_check_method=$lt_deplibs_check_method
3569 # Command to use when deplibs_check_method == file_magic.
3570 file_magic_cmd=$lt_file_magic_cmd
3572 # Flag that allows shared libraries with undefined symbols to be built.
3573 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
3575 # Flag that forces no undefined symbols.
3576 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
3578 # Commands used to finish a libtool library installation in a directory.
3579 finish_cmds=$lt_finish_cmds
3581 # Same as above, but a single script fragment to be evaled but not shown.
3582 finish_eval=$lt_finish_eval
3584 # Take the output of nm and produce a listing of raw symbols and C names.
3585 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
3587 # Transform the output of nm in a proper C declaration
3588 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
3590 # Transform the output of nm in a C name address pair
3591 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
3593 # This is the shared library runtime path variable.
3594 runpath_var=$runpath_var
3596 # This is the shared library path variable.
3597 shlibpath_var=$shlibpath_var
3599 # Is shlibpath searched before the hard-coded library search path?
3600 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3602 # How to hardcode a shared library path into an executable.
3603 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
3605 # Whether we should hardcode library paths into libraries.
3606 hardcode_into_libs=$hardcode_into_libs
3608 # Flag to hardcode \$libdir into a binary during linking.
3609 # This must work even if \$libdir does not exist.
3610 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
3612 # Whether we need a single -rpath flag with a separated argument.
3613 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
3615 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3617 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
3619 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3621 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
3623 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3624 # the resulting binary.
3625 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
3627 # Variables whose values should be saved in libtool wrapper scripts and
3628 # restored at relink time.
3629 variables_saved_for_relink="$variables_saved_for_relink"
3631 # Whether libtool must link a program against all its dependency libraries.
3632 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
3634 # Compile-time system search path for libraries
3635 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3637 # Run-time system search path for libraries
3638 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3640 # Fix the shell variable \$srcfile for the compiler.
3641 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
3643 # Set to yes if exported symbols are required.
3644 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
3646 # The commands to list exported symbols.
3647 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
3649 # The commands to extract the exported symbol list from a shared archive.
3650 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3652 # Symbols that should not be listed in the preloaded symbols.
3653 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
3655 # Symbols that must always be exported.
3656 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
3659 [# ### END LIBTOOL CONFIG],
3660 [# ### END LIBTOOL TAG CONFIG: $tagname])
3667 cat <<\EOF >> "$cfgfile"
3669 # AIX sometimes has problems with the GCC collect2 program. For some
3670 # reason, if we set the COLLECT_NAMES environment variable, the problems
3671 # vanish in a puff of smoke.
3672 if test "X${COLLECT_NAMES+set}" != Xset; then
3674 export COLLECT_NAMES
3679 cygwin* | mingw* | pw32* | os2*)
3680 cat <<'EOF' >> "$cfgfile"
3681 # This is a source program that is used to create dlls on Windows
3682 # Don't remove nor modify the starting and closing comments
3684 # This is a source program that is used to create import libraries
3685 # on Windows for dlls which lack them. Don't remove nor modify the
3686 # starting and closing comments
3687 _LT_AC_FILE_IMPGEN_C
3692 # We use sed instead of cat because bash on DJGPP gets confused if
3693 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3694 # text mode, it properly converts lines to CR/LF. This bash problem
3695 # is reportedly fixed, but why not run on old versions too?
3696 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
3698 mv -f "$cfgfile" "$ofile" || \
3699 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3703 # If there is no Makefile yet, we rely on a make rule to execute
3704 # `config.status --recheck' to rerun these tests and create the
3705 # libtool script then.
3706 test -f Makefile && make "$ltmain"
3708 ])# AC_LIBTOOL_CONFIG
3711 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
3712 # -------------------------------------------
3713 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
3714 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3716 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3718 if test "$GCC" = yes; then
3719 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3721 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3722 lt_cv_prog_compiler_rtti_exceptions,
3723 [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
3724 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3726 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
3729 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3730 # ---------------------------------
3731 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
3732 [AC_REQUIRE([AC_CANONICAL_HOST])
3733 AC_REQUIRE([AC_PROG_NM])
3734 AC_REQUIRE([AC_OBJEXT])
3735 # Check for command to grab the raw symbol name followed by C symbol from nm.
3736 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3737 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3739 # These are sane defaults that work on at least a few old systems.
3740 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3742 # Character class describing NM global symbol codes.
3743 symcode='[[BCDEGRST]]'
3745 # Regexp to match symbols that can be accessed directly from C.
3746 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3748 # Transform the above into a raw symbol and a C symbol.
3749 symxfrm='\1 \2\3 \3'
3751 # Transform an extracted symbol line into a proper C declaration
3752 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
3754 # Transform an extracted symbol line into symbol name and symbol address
3755 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'"
3757 # Define system-specific variables.
3762 cygwin* | mingw* | pw32*)
3763 symcode='[[ABCDGISTW]]'
3765 hpux*) # Its linker distinguishes data from code symbols
3766 if test "$host_cpu" = ia64; then
3767 symcode='[[ABCDEGRST]]'
3769 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3770 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'"
3773 symcode='[[BCDEGRST]]'
3779 symcode='[[DFNSTU]]'
3783 # Handle CRLF in mingw tool chain
3787 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3791 # If we're using GNU nm, then use its standard symbol codes.
3792 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3793 symcode='[[ABCDGISTW]]'
3796 # Try without a prefix undercore, then with it.
3797 for ac_symprfx in "" "_"; do
3799 # Write the raw and C identifiers.
3800 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3802 # Check to see that the pipe works correctly.
3806 cat > conftest.$ac_ext <<EOF
3811 void nm_test_func(){}
3815 int main(){nm_test_var='a';nm_test_func();return(0);}
3818 if AC_TRY_EVAL(ac_compile); then
3819 # Now try to grab the symbols.
3821 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3822 # Try sorting and uniquifying the output.
3823 if sort "$nlist" | uniq > "$nlist"T; then
3824 mv -f "$nlist"T "$nlist"
3829 # Make sure that we snagged all the symbols we need.
3830 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3831 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3832 cat <<EOF > conftest.$ac_ext
3838 # Now generate the symbol file.
3839 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
3841 cat <<EOF >> conftest.$ac_ext
3842 #if defined (__STDC__) && __STDC__
3843 # define lt_ptr_t void *
3845 # define lt_ptr_t char *
3849 /* The mapping between symbol names and symbols. */
3854 lt_preloaded_symbols[[]] =
3857 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
3858 cat <<\EOF >> conftest.$ac_ext
3866 # Now try linking the two files.
3867 mv conftest.$ac_objext conftstm.$ac_objext
3868 lt_save_LIBS="$LIBS"
3869 lt_save_CFLAGS="$CFLAGS"
3870 LIBS="conftstm.$ac_objext"
3871 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3872 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3875 LIBS="$lt_save_LIBS"
3876 CFLAGS="$lt_save_CFLAGS"
3878 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3881 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3884 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3887 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3888 cat conftest.$ac_ext >&5
3890 rm -f conftest* conftst*
3892 # Do not use the global_symbol_pipe unless it works.
3893 if test "$pipe_works" = yes; then
3896 lt_cv_sys_global_symbol_pipe=
3900 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3901 lt_cv_sys_global_symbol_to_cdecl=
3903 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3904 AC_MSG_RESULT(failed)
3908 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3911 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3912 # ---------------------------------------
3913 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3914 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3915 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3916 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3918 AC_MSG_CHECKING([for $compiler option to produce PIC])
3920 # C++ specific cases for pic, static, wl, etc.
3921 if test "$GXX" = yes; then
3922 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3923 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3927 # All AIX code is PIC.
3928 if test "$host_cpu" = ia64; then
3929 # AIX 5 now supports IA64 processor
3930 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3934 # FIXME: we need at least 68020 code to build shared libraries, but
3935 # adding the `-m68020' flag to GCC prevents building anything better,
3937 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3939 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3940 # PIC is the default for these OSes.
3942 cygwin* | mingw* | os2*)
3943 # This hack is so that the source file can tell whether it is being
3944 # built for inclusion in a dll (and should export symbols for example).
3945 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3947 darwin* | rhapsody*)
3948 # PIC is the default on this platform
3949 # Common symbols not allowed in MH_DYLIB files
3950 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3953 # DJGPP does not support shared libraries at all
3954 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3957 if test -d /usr/nec; then
3958 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3962 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
3963 if test "$host_cpu" != ia64; then
3964 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3968 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3974 # All AIX code is PIC.
3975 if test "$host_cpu" = ia64; then
3976 # AIX 5 now supports IA64 processor
3977 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3979 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3983 case $cc_basename in
3985 # Green Hills C++ Compiler
3986 # _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"
3991 case $cc_basename in
3993 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3996 # Green Hills C++ Compiler
3997 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4004 # FreeBSD uses GNU C++
4006 hpux9* | hpux10* | hpux11*)
4007 case $cc_basename in
4009 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4011 if test "$host_cpu" != ia64; then
4012 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4016 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4017 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4018 if test "$host_cpu" != ia64; then
4019 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4026 irix5* | irix6* | nonstopux*)
4027 case $cc_basename in
4029 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4030 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4031 # CC pic flag -KPIC is the default.
4038 case $cc_basename in
4041 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4042 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4046 # Make sure the PIC flag is empty. It appears that all Alpha
4047 # Linux and Compaq Tru64 Unix objects are PIC.
4048 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4049 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4060 case $cc_basename in
4062 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4070 osf3* | osf4* | osf5*)
4071 case $cc_basename in
4073 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4076 # Rational C++ 2.4.1
4077 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4080 # Digital/Compaq C++
4081 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4082 # Make sure the PIC flag is empty. It appears that all Alpha
4083 # Linux and Compaq Tru64 Unix objects are PIC.
4084 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4085 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4094 case $cc_basename in
4096 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4103 case $cc_basename in
4105 # Sun C++ 4.2, 5.x and Centerline C++
4106 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4107 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4108 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4111 # Green Hills C++ Compiler
4112 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4119 case $cc_basename in
4122 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4123 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4127 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4134 case $cc_basename in
4136 # NonStop-UX NCC 3.20
4137 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4148 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4154 if test "$GCC" = yes; then
4155 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4156 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4160 # All AIX code is PIC.
4161 if test "$host_cpu" = ia64; then
4162 # AIX 5 now supports IA64 processor
4163 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4168 # FIXME: we need at least 68020 code to build shared libraries, but
4169 # adding the `-m68020' flag to GCC prevents building anything better,
4171 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4174 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4175 # PIC is the default for these OSes.
4178 cygwin* | mingw* | pw32* | os2*)
4179 # This hack is so that the source file can tell whether it is being
4180 # built for inclusion in a dll (and should export symbols for example).
4181 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4184 darwin* | rhapsody*)
4185 # PIC is the default on this platform
4186 # Common symbols not allowed in MH_DYLIB files
4187 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4191 # Just because we use GCC doesn't mean we suddenly get shared libraries
4192 # on systems that don't support them.
4193 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4198 if test -d /usr/nec; then
4199 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4204 # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
4205 if test "$host_cpu" != ia64; then
4206 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4211 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4215 # PORTME Check for flag to pass linker flags through the system compiler.
4218 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4219 if test "$host_cpu" = ia64; then
4220 # AIX 5 now supports IA64 processor
4221 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4223 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4227 cygwin* | mingw* | pw32* | os2*)
4228 # This hack is so that the source file can tell whether it is being
4229 # built for inclusion in a dll (and should export symbols for example).
4230 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4233 hpux9* | hpux10* | hpux11*)
4234 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4235 if test "$host_cpu" != ia64; then
4236 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4238 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4239 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4242 irix5* | irix6* | nonstopux*)
4243 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4244 # PIC (with -KPIC) is the default.
4245 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4249 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4250 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4253 osf3* | osf4* | osf5*)
4254 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4255 # All OSF/1 code is PIC.
4256 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4260 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4261 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4265 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4266 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4267 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4271 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4272 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4273 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4276 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4277 if test "x$host_vendor" = xsni; then
4278 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
4280 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4282 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4283 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4287 if test -d /usr/nec ;then
4288 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4289 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
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_can_build_shared, $1)=no
4304 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
4307 # Check to make sure the PIC flag actually works.
4309 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
4310 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
4311 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
4312 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
4313 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
4315 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4317 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4318 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4321 # For platforms which do not support PIC, -DPIC is meaningless:
4323 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4326 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
4332 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
4333 # ------------------------------------
4334 # See if the linker supports building shared libraries.
4335 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
4336 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4338 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4341 # If we're using GNU nm, then we don't want the "-C" option.
4342 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4343 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4344 _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'
4346 _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'
4349 cygwin* | mingw* | pw32*)
4350 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4353 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4358 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4360 _LT_AC_TAGVAR(archive_cmds, $1)=
4361 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
4362 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4363 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
4364 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4365 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4366 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4367 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
4368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4369 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4370 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4371 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4372 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4373 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4374 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4375 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
4376 # include_expsyms should be a list of space-separated symbols to be *always*
4377 # included in the symbol list
4378 _LT_AC_TAGVAR(include_expsyms, $1)=
4379 # exclude_expsyms can be an egrep regular expression of symbols to exclude
4380 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4381 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4382 # as well as any symbol that contains `d'.
4383 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4384 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4385 # platforms (ab)use it in PIC code, but their linkers get confused if
4386 # the symbol is explicitly referenced. Since portable code cannot
4387 # rely on this symbol name, it's probably fine to never include it in
4388 # preloaded symbol tables.
4389 extract_expsyms_cmds=
4392 cygwin* | mingw* | pw32*)
4393 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4394 # When not using gcc, we currently assume that we are using
4395 # Microsoft Visual C++.
4396 if test "$GCC" != yes; then
4405 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4406 if test "$with_gnu_ld" = yes; then
4407 # If archive_cmds runs LD, not CC, wlarc should be empty
4410 # See if GNU ld supports shared libraries.
4412 aix3* | aix4* | aix5*)
4413 # On AIX/PPC, the GNU linker is very broken
4414 if test "$host_cpu" != ia64; then
4415 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4418 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4419 *** to be unable to reliably create shared libraries on AIX.
4420 *** Therefore, libtool is disabling shared libraries support. If you
4421 *** really care for shared libraries, you may want to modify your PATH
4422 *** so that a non-GNU linker is found, and then restart.
4429 _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)'
4430 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4431 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4433 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4434 # that the semantics of dynamic libraries on AmigaOS, at least up
4435 # to version 4, is to share data among multiple programs linked
4436 # with the same dynamic library. Since this doesn't match the
4437 # behavior of shared libraries on other platforms, we can't use
4439 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4443 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4444 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4445 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4446 # support --undefined. This deserves some investigation. FIXME
4447 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4449 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4453 cygwin* | mingw* | pw32*)
4454 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
4455 # no search path for DLLs.
4456 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4457 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4458 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4460 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
4461 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
4462 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
4463 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
4464 else $CC -o impgen impgen.c ; fi)~
4465 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
4467 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
4469 # cygwin and mingw dlls have different entry points and sets of symbols
4471 # FIXME: what about values for MSVC?
4472 dll_entry=__cygwin_dll_entry@12
4473 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
4477 dll_entry=_DllMainCRTStartup@12
4478 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
4482 # mingw and cygwin differ, and it's simplest to just exclude the union
4483 # of the two symbol sets.
4484 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
4486 # recent cygwin and mingw systems supply a stub DllMain which the user
4487 # can override, but on older systems we have to supply one (in ltdll.c)
4488 if test "x$lt_cv_need_dllmain" = "xyes"; then
4489 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
4490 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~
4491 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
4497 # Extract the symbol export list from an `--export-all' def file,
4498 # then regenerate the def file from the symbol export list, so that
4499 # the compiled dll only exports the symbol export list.
4500 # Be careful not to strip the DATA tag left by newer dlltools.
4501 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
4502 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
4503 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
4505 # If the export-symbols file already is a .def file (1st line
4506 # is EXPORTS), use it as is.
4507 # If DATA tags from a recent dlltool are present, honour them!
4508 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
4509 cp $export_symbols $output_objdir/$soname-def;
4511 echo EXPORTS > $output_objdir/$soname-def;
4513 cat $export_symbols | while read symbol; do
4516 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
4517 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
4519 _lt_hint=`expr 1 + \$_lt_hint`;
4523 $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~
4524 $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~
4525 $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~
4526 $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~
4527 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
4531 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4532 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4535 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536 _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'
4541 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
4542 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4545 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4546 *** create shared libraries on Solaris systems. Therefore, libtool
4547 *** is disabling shared libraries support. We urge you to upgrade GNU
4548 *** binutils to release 2.9.1 or newer. Another option is to modify
4549 *** your PATH or compiler configuration so that the native linker is
4550 *** used, and then restart.
4553 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4554 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4555 _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'
4557 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4562 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4564 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4565 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4569 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
4570 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4571 _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'
4573 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4578 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
4579 runpath_var=LD_RUN_PATH
4580 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4581 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4583 cygwin* | mingw* | pw32*)
4584 # dlltool doesn't understand --whole-archive et. al.
4585 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4588 # ancient GNU ld didn't support --whole-archive et. al.
4589 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
4590 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4592 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4598 # PORTME fill in a description of your system's linker (not GNU ld)
4601 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4602 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4603 _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'
4604 # Note: this linker hardcodes the directories in LIBPATH if there
4605 # are no directories specified by -L.
4606 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4607 if test "$GCC" = yes && test -z "$link_static_flag"; then
4608 # Neither direct hardcoding nor static linking is supported with a
4610 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4615 if test "$host_cpu" = ia64; then
4616 # On IA64, the linker does run time linking by default, so we don't
4617 # have to do anything special.
4618 aix_use_runtimelinking=no
4619 exp_sym_flag='-Bexport'
4622 # If we're using GNU nm, then we don't want the "-C" option.
4623 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4624 if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
4625 _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'
4627 _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'
4630 # KDE requires run time linking. Make it the default.
4631 aix_use_runtimelinking=yes
4632 exp_sym_flag='-bexport'
4633 no_entry_flag='-bnoentry'
4636 # When large executables or shared objects are built, AIX ld can
4637 # have problems creating the table of contents. If linking a library
4638 # or program results in "error TOC overflow" add -mminimal-toc to
4639 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4640 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4642 _LT_AC_TAGVAR(archive_cmds, $1)=''
4643 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4644 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4645 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4647 if test "$GCC" = yes; then
4648 case $host_os in aix4.[012]|aix4.[012].*)
4649 # We only want to do this on AIX 4.2 and lower, the check
4650 # below for broken collect2 doesn't work under 4.3+
4651 collect2name=`${CC} -print-prog-name=collect2`
4652 if test -f "$collect2name" && \
4653 strings "$collect2name" | grep resolve_lib_name >/dev/null
4655 # We have reworked collect2
4656 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4658 # We have old collect2
4659 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4660 # It fails to find uninstalled libraries when the uninstalled
4661 # path is not listed in the libpath. Setting hardcode_minus_L
4662 # to unsupported forces relinking
4663 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4664 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4665 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4668 shared_flag='-shared'
4671 if test "$host_cpu" = ia64; then
4672 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4673 # chokes on -Wl,-G. The following line is correct:
4676 if test "$aix_use_runtimelinking" = yes; then
4677 shared_flag='-qmkshrobj ${wl}-G'
4679 shared_flag='-qmkshrobj'
4684 # Let the compiler handle the export list.
4685 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4686 if test "$aix_use_runtimelinking" = yes; then
4687 # Warning - without using the other runtime loading flags (-brtl),
4688 # -berok will link without error, but may produce a broken library.
4689 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4690 # Determine the default libpath from the value encoded in an empty executable.
4691 _LT_AC_SYS_LIBPATH_AIX
4692 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4693 _LT_AC_TAGVAR(archive_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` '" $shared_flag"
4694 _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}$exp_sym_flag:\$export_symbols $shared_flag"
4696 if test "$host_cpu" = ia64; then
4697 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4698 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4699 _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"
4701 # Determine the default libpath from the value encoded in an empty executable.
4702 _LT_AC_SYS_LIBPATH_AIX
4703 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4704 # Warning - without using the other run time loading flags,
4705 # -berok will link without error, but may produce a broken library.
4706 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4707 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4708 # -bexpall does not export symbols beginning with underscore (_)
4709 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4710 # Exported symbols can be pulled into shared objects from archives
4711 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4712 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4713 # This is similar to how AIX traditionally builds it's shared libraries.
4714 _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'
4720 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4721 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4723 # see comment about different semantics on the GNU ld section
4724 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4728 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4731 cygwin* | mingw* | pw32*)
4732 # When not using gcc, we currently assume that we are using
4733 # Microsoft Visual C++.
4734 # hardcode_libdir_flag_spec is actually meaningless, as there is
4735 # no search path for DLLs.
4736 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4737 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4738 # Tell ltmain to make .lib files, not .a files.
4740 # FIXME: Setting linknames here is a bad hack.
4741 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4742 # The linker will automatically build a .lib file if we build a DLL.
4743 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
4744 # FIXME: Should let the user specify the lib program.
4745 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4746 fix_srcfile_path='`cygpath -w "$srcfile"`'
4749 darwin* | rhapsody*)
4751 rhapsody* | darwin1.[[012]])
4752 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4755 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4759 # FIXME: Relying on posixy $() will cause problems for
4760 # cross-compilation, but unfortunately the echo tests do not
4761 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
4762 # `"' quotes if we put them in here... so don't!
4763 _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'
4764 # We need to add '_' to the symbols in $export_symbols first
4765 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
4766 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4767 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4768 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4772 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4773 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4774 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4778 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4781 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4782 # support. Future versions do this automatically, but an explicit c++rt0.o
4783 # does not break anything, and helps significantly (at the cost of a little
4786 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4788 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4789 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4792 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4794 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4795 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4796 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4797 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4800 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4802 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4803 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4804 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4805 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4808 hpux9* | hpux10* | hpux11*)
4809 if test "$GCC" = yes; then
4812 _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'
4815 if test "$host_cpu" = ia64; then
4816 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4818 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4825 _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'
4828 if test "$host_cpu" = ia64; then
4829 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4831 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4836 if test "$host_cpu" = ia64; then
4837 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4838 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4839 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4841 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4842 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4843 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4845 # hardcode_minus_L: Not really in the search PATH,
4846 # but as the default location of the library.
4847 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4848 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4851 irix5* | irix6* | nonstopux*)
4852 if test "$GCC" = yes; then
4853 _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'
4855 _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'
4857 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4858 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4859 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4863 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4864 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4866 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4868 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4870 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4874 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4876 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4878 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4882 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4883 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4885 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4886 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4887 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4888 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4891 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4892 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4896 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
4897 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4904 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4905 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4906 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4907 _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'
4908 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4912 if test "$GCC" = yes; then
4913 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4914 _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'
4916 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4917 _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'
4919 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4920 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4923 osf4* | osf5*) # as osf3* with the addition of -msym flag
4924 if test "$GCC" = yes; then
4925 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4926 _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'
4927 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4930 _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'
4931 _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~
4932 $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'
4934 # Both c and cxx compiler support -rpath directly
4935 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4937 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4941 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4942 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4943 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4944 runpath_var=LD_RUN_PATH
4945 hardcode_runpath_var=yes
4949 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4950 if test "$GCC" = yes; then
4951 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4952 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4953 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4955 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4956 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4957 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4959 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4960 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4962 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4963 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
4964 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4966 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4970 if test "x$host_vendor" = xsequent; then
4971 # Use $CC to link under sequent, because it throws in some extra .o
4972 # files that make .init and .fini sections work.
4973 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4975 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4978 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4979 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4980 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4984 if test "x$host_vendor" = xsni; then
4985 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
4986 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4988 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4989 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4991 runpath_var='LD_RUN_PATH'
4992 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4996 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4997 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4998 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5002 if test -d /usr/nec; then
5003 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5004 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5005 runpath_var=LD_RUN_PATH
5006 hardcode_runpath_var=yes
5007 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5012 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5013 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5014 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5015 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5016 hardcode_runpath_var=yes
5017 runpath_var=LD_RUN_PATH
5020 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5021 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5022 if test "$GCC" = yes; then
5023 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5025 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5027 runpath_var='LD_RUN_PATH'
5028 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5032 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5033 # $CC -shared without GNU ld will not create a library from C++
5034 # object files and a static libstdc++, better avoid it by now
5035 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5036 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5037 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5038 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5039 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5040 runpath_var='LD_RUN_PATH'
5044 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5045 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5046 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5050 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5055 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5056 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5058 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5059 if test "$GCC" = yes; then
5060 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5064 # Do we need to explicitly link libc?
5066 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5067 if test "$enable_shared" = yes && test "$GCC" = yes; then
5068 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5070 # FIXME: we may have to deal with multi-command sequences.
5073 # Test whether the compiler implicitly links with -lc since on some
5074 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5075 # to ld, don't add -lc before -lgcc.
5076 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5078 echo 'static int dummy;' > conftest.$ac_ext
5080 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5083 libobjs=conftest.$ac_objext
5085 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5091 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5092 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5093 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5095 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5097 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5099 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5101 cat conftest.err 1>&5
5104 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5108 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5111 # _LT_AC_FILE_LTDLL_C
5112 # -------------------
5113 # Be careful that the start marker always follows a newline.
5114 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5115 # /* ltdll.c starts here */
5116 # #define WIN32_LEAN_AND_MEAN
5117 # #include <windows.h>
5118 # #undef WIN32_LEAN_AND_MEAN
5119 # #include <stdio.h>
5121 # #ifndef __CYGWIN__
5122 # # ifdef __CYGWIN32__
5123 # # define __CYGWIN__ __CYGWIN32__
5127 # #ifdef __cplusplus
5130 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5131 # #ifdef __cplusplus
5136 # #include <cygwin/cygwin_dll.h>
5137 # DECLARE_CYGWIN_DLL( DllMain );
5139 # HINSTANCE __hDllInstance_base;
5142 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5144 # __hDllInstance_base = hInst;
5147 # /* ltdll.c ends here */
5148 ])# _LT_AC_FILE_LTDLL_C
5151 # _LT_AC_FILE_IMPGEN_C
5152 # --------------------
5153 # Be careful that the start marker always follows a newline.
5154 AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
5155 # /* impgen.c starts here */
5156 # /* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
5158 # This file is part of GNU libtool.
5160 # This program is free software; you can redistribute it and/or modify
5161 # it under the terms of the GNU General Public License as published by
5162 # the Free Software Foundation; either version 2 of the License, or
5163 # (at your option) any later version.
5165 # This program is distributed in the hope that it will be useful,
5166 # but WITHOUT ANY WARRANTY; without even the implied warranty of
5167 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5168 # GNU General Public License for more details.
5170 # You should have received a copy of the GNU General Public License
5171 # along with this program; if not, write to the Free Software
5172 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5175 # #include <stdio.h> /* for printf() */
5176 # #include <unistd.h> /* for open(), lseek(), read() */
5177 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
5178 # #include <string.h> /* for strdup() */
5180 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
5182 # #define O_BINARY 0
5185 # static unsigned int
5186 # pe_get16 (fd, offset)
5190 # unsigned char b[2];
5191 # lseek (fd, offset, SEEK_SET);
5193 # return b[0] + (b[1]<<8);
5196 # static unsigned int
5197 # pe_get32 (fd, offset)
5201 # unsigned char b[4];
5202 # lseek (fd, offset, SEEK_SET);
5204 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5207 # static unsigned int
5211 # unsigned char *b = ptr;
5212 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
5221 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
5222 # unsigned long export_rva, export_size, nsections, secptr, expptr;
5223 # unsigned long name_rvas, nexp;
5224 # unsigned char *expdata, *erva;
5225 # char *filename, *dll_name;
5227 # filename = argv[1];
5229 # dll = open(filename, O_RDONLY|O_BINARY);
5233 # dll_name = filename;
5235 # for (i=0; filename[i]; i++)
5236 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
5237 # dll_name = filename + i +1;
5239 # pe_header_offset = pe_get32 (dll, 0x3c);
5240 # opthdr_ofs = pe_header_offset + 4 + 20;
5241 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
5243 # if (num_entries < 1) /* no exports */
5246 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
5247 # export_size = pe_get32 (dll, opthdr_ofs + 100);
5248 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
5249 # secptr = (pe_header_offset + 4 + 20 +
5250 # pe_get16 (dll, pe_header_offset + 4 + 16));
5253 # for (i = 0; i < nsections; i++)
5256 # unsigned long secptr1 = secptr + 40 * i;
5257 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
5258 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
5259 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
5260 # lseek(dll, secptr1, SEEK_SET);
5261 # read(dll, sname, 8);
5262 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
5264 # expptr = fptr + (export_rva - vaddr);
5265 # if (export_rva + export_size > vaddr + vsize)
5266 # export_size = vsize - (export_rva - vaddr);
5271 # expdata = (unsigned char*)malloc(export_size);
5272 # lseek (dll, expptr, SEEK_SET);
5273 # read (dll, expdata, export_size);
5274 # erva = expdata - export_rva;
5276 # nexp = pe_as32 (expdata+24);
5277 # name_rvas = pe_as32 (expdata+32);
5279 # printf ("EXPORTS\n");
5280 # for (i = 0; i<nexp; i++)
5282 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
5283 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
5288 # /* impgen.c ends here */
5289 ])# _LT_AC_FILE_IMPGEN_C
5291 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5292 # ---------------------------------
5293 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5297 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5298 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5299 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5300 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5301 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5302 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5303 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5305 # This is just to silence aclocal about the macro not being used
5306 ifelse([AC_DISABLE_FAST_INSTALL])
5308 AC_DEFUN([LT_AC_PROG_GCJ],
5309 [AC_CHECK_TOOL(GCJ, gcj, no)
5310 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5314 AC_DEFUN([LT_AC_PROG_RC],
5315 [AC_CHECK_TOOL(RC, windres, no)
5318 ############################################################
5319 # NOTE: This macro has been submitted for inclusion into #
5320 # GNU Autoconf as AC_PROG_SED. When it is available in #
5321 # a released version of Autoconf we should remove this #
5322 # macro and use it instead. #
5323 ############################################################
5326 # Check for a fully-functional sed program, that truncates
5327 # as few characters as possible. Prefer GNU sed if found.
5328 AC_DEFUN([LT_AC_PROG_SED],
5329 [AC_MSG_CHECKING([for a sed that does not truncate output])
5330 AC_CACHE_VAL(lt_cv_path_SED,
5331 [# Loop through the user's path and test for sed and gsed.
5332 # Then use that list of sed's as ones to test for truncation.
5333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5337 test -z "$as_dir" && as_dir=.
5338 for ac_prog in sed gsed; do
5339 for ac_exec_ext in '' $ac_executable_extensions; do
5340 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
5341 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
5347 # Create a temporary directory, and hook for its removal unless debugging.
5350 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5351 trap '{ (exit 1); exit 1; }' 1 2 13 15
5354 # Create a (secure) tmp directory for tmp files.
5357 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
5358 test -n "$tmp" && test -d "$tmp"
5361 tmp=$TMPDIR/sed$$-$RANDOM
5362 (umask 077 && mkdir $tmp)
5365 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
5366 { (exit 1); exit 1; }
5370 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5371 # along with /bin/sed that truncates output.
5372 for _sed in $_sed_list /usr/xpg4/bin/sed; do
5373 test ! -f ${_sed} && break
5374 cat /dev/null > "$tmp/sed.in"
5376 echo $ECHO_N "0123456789$ECHO_C" >"$tmp/sed.in"
5377 # Check for GNU sed and select it if it is found.
5378 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
5379 lt_cv_path_SED=${_sed}
5383 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
5384 mv "$tmp/sed.tmp" "$tmp/sed.in"
5385 cp "$tmp/sed.in" "$tmp/sed.nl"
5386 echo >>"$tmp/sed.nl"
5387 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
5388 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
5389 # 10000 chars as input seems more than enough
5390 test $_count -gt 10 && break
5391 _count=`expr $_count + 1`
5392 if test $_count -gt $_max; then
5394 lt_cv_path_SED=$_sed
5400 AC_MSG_RESULT([$SED])