1 AC_DEFUN(AM_C_PROTOTYPES,
2 [AC_REQUIRE([AM_PROG_CC_STDC])
3 AC_BEFORE([$0], [AC_C_INLINE])
4 AC_MSG_CHECKING([for function prototypes])
5 if test "$am_cv_prog_cc_stdc" != no; then
11 U=_ ANSI2KNR=./ansi2knr
12 # Ensure some checks needed by ansi2knr itself.
14 AC_CHECK_HEADERS(string.h)
23 # @defmac AC_PROG_CC_STDC
24 # @maindex PROG_CC_STDC
26 # If the C compiler in not in ANSI C mode by default, try to add an option
27 # to output variable @code{CC} to make it so. This macro tries various
28 # options that select ANSI C on some system or another. It considers the
29 # compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
30 # handles function prototypes correctly.
32 # If you use this macro, you should check after calling it whether the C
33 # compiler has been set to accept ANSI C; if not, the shell variable
34 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
35 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
36 # program @code{ansi2knr}, which comes with Ghostscript.
39 AC_DEFUN(AM_PROG_CC_STDC,
40 [AC_REQUIRE([AC_PROG_CC])
41 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
42 AC_CACHE_VAL(am_cv_prog_cc_stdc,
43 [am_cv_prog_cc_stdc=no
45 # Don't try gcc -ansi; that turns off useful extensions and
46 # breaks some systems' header files.
48 # Ultrix and OSF/1 -std1
49 # HP-UX -Aa -D_HPUX_SOURCE
50 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
52 CC="$ac_save_CC $ac_arg"
54 [#if !defined(__STDC__)
57 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
59 # include <sys/types.h>
60 # include <sys/stat.h>
63 int test (int i, double x);
64 struct s1 {int (*f) (int a);};
65 struct s2 {int (*f) (double a);};],
66 [am_cv_prog_cc_stdc="$ac_arg"; break])
70 AC_MSG_RESULT($am_cv_prog_cc_stdc)
71 case "x$am_cv_prog_cc_stdc" in
73 *) CC="$CC $am_cv_prog_cc_stdc" ;;
77 AC_DEFUN(WGET_STRUCT_UTIMBUF,
78 [AC_MSG_CHECKING(for struct utimbuf)
79 if test x"$ac_cv_header_utime_h" = xyes; then
80 AC_EGREP_CPP([struct[ ]+utimbuf],
82 [AC_DEFINE(HAVE_STRUCT_UTIMBUF)
90 # This code originates from Ulrich Drepper's AM_WITH_NLS.
92 AC_DEFUN(WGET_WITH_NLS,
93 [AC_MSG_CHECKING([whether NLS is requested])
94 dnl Default is enabled NLS
96 [ --disable-nls do not use Native Language Support],
97 HAVE_NLS=$enableval, HAVE_NLS=yes)
98 AC_MSG_RESULT($HAVE_NLS)
100 dnl If something goes wrong, we may still decide not to use NLS.
101 dnl For this reason, defer AC_SUBST'ing HAVE_NLS until the very
104 if test x"$HAVE_NLS" = xyes; then
105 AC_MSG_RESULT("language catalogs: $ALL_LINGUAS")
106 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
107 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
108 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
109 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
111 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
116 dnl Test whether we really found GNU xgettext.
117 if test "$XGETTEXT" != ":"; then
118 dnl If it is no GNU xgettext we define it as : so that the
119 dnl Makefiles still can work.
120 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
124 [found xgettext programs is not GNU xgettext; ignore it])
129 AC_CHECK_HEADERS(locale.h libintl.h)
131 AC_CHECK_FUNCS(gettext, [], [
132 AC_CHECK_LIB(intl, gettext, [
133 dnl gettext is in libintl; announce the fact manually.
135 AC_DEFINE(HAVE_GETTEXT)
138 [gettext not found; disabling NLS])
143 dnl These rules are solely for the distribution goal. While doing this
144 dnl we only have to keep exactly one list of the available catalogs
146 for lang in $ALL_LINGUAS; do
147 GMOFILES="$GMOFILES $lang.gmo"
148 POFILES="$POFILES $lang.po"
150 dnl Construct list of names of catalog files to be constructed.
151 for lang in $ALL_LINGUAS; do
152 CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
155 dnl Make all variables we use known to autoconf.
158 AC_SUBST(DATADIRNAME)
165 dnl Some independently maintained files, such as po/Makefile.in,
166 dnl use `USE_NLS', so support it.
169 if test "x$HAVE_NLS" = xyes; then
174 dnl Generate list of files to be processed by xgettext which will
175 dnl be included in po/Makefile.
177 dnl This is not strictly an Autoconf macro, because it is run from
178 dnl within `config.status' rather than from within configure. This
179 dnl is why special rules must be applied for it.
180 AC_DEFUN(WGET_PROCESS_PO,
181 [srcdir=$ac_given_srcdir # Advanced autoconf hackery
182 dnl I wonder what the following several lines do...
183 if test "x$srcdir" != "x."; then
184 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
185 posrcprefix="$srcdir/"
187 posrcprefix="../$srcdir/"
193 dnl Use `echo' rather than AC_MSG_RESULT, because this is run from
195 echo "generating po/POTFILES from $srcdir/po/POTFILES.in"
196 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," \
197 -e "\$s/\(.*\) \\\\/\1/" \
198 < $srcdir/po/POTFILES.in > po/POTFILES
199 echo "creating po/Makefile"
200 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
203 # Search path for a program which passes the given test.
204 # Ulrich Drepper <drepper@cygnus.com>, 1996.
206 # This file may be copied and used freely without restrictions. It
207 # can be used in projects which are not available under the GNU Public
208 # License but which still want to provide support for the GNU gettext
209 # functionality. Please note that the actual code is *not* freely
214 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
215 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
216 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
217 [# Extract the first word of "$2", so it can be a program name with args.
218 set dummy $2; ac_word=[$]2
219 AC_MSG_CHECKING([for $ac_word])
220 AC_CACHE_VAL(ac_cv_path_$1,
223 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
227 for ac_dir in ifelse([$5], , $PATH, [$5]); do
228 test -z "$ac_dir" && ac_dir=.
229 if test -f $ac_dir/$ac_word; then
231 ac_cv_path_$1="$ac_dir/$ac_word"
237 dnl If no 4th arg is given, leave the cache variable unset,
238 dnl so AC_PATH_PROGS will keep looking.
239 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
244 if test -n "[$]$1"; then
253 # We embed libtool.m4 from libtool distribution.
255 # -- embedded libtool.m4 begins here --
257 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
258 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
259 ## Free Software Foundation, Inc.
260 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
262 ## This program is free software; you can redistribute it and/or modify
263 ## it under the terms of the GNU General Public License as published by
264 ## the Free Software Foundation; either version 2 of the License, or
265 ## (at your option) any later version.
267 ## This program is distributed in the hope that it will be useful, but
268 ## WITHOUT ANY WARRANTY; without even the implied warranty of
269 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
270 ## General Public License for more details.
272 ## You should have received a copy of the GNU General Public License
273 ## along with this program; if not, write to the Free Software
274 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
276 ## As a special exception to the GNU General Public License, if you
277 ## distribute this file as part of a program that contains a
278 ## configuration script generated by Autoconf, you may include it under
279 ## the same distribution terms that you use for the rest of that program.
281 # serial 46 AC_PROG_LIBTOOL
282 AC_DEFUN([AC_PROG_LIBTOOL],
283 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
285 # This can be used to rebuild libtool when needed
286 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
288 # Always use our own libtool.
289 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
292 # Prevent multiple expansion
293 define([AC_PROG_LIBTOOL], [])
296 AC_DEFUN([AC_LIBTOOL_SETUP],
298 AC_REQUIRE([AC_ENABLE_SHARED])dnl
299 AC_REQUIRE([AC_ENABLE_STATIC])dnl
300 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
301 AC_REQUIRE([AC_CANONICAL_HOST])dnl
302 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
303 AC_REQUIRE([AC_PROG_CC])dnl
304 AC_REQUIRE([AC_PROG_LD])dnl
305 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
306 AC_REQUIRE([AC_PROG_NM])dnl
307 AC_REQUIRE([AC_PROG_LN_S])dnl
308 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
309 AC_REQUIRE([AC_OBJEXT])dnl
310 AC_REQUIRE([AC_EXEEXT])dnl
313 _LT_AC_PROG_ECHO_BACKSLASH
314 # Only perform the check for file, if the check method requires it
315 case $deplibs_check_method in
317 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
323 AC_CHECK_TOOL(RANLIB, ranlib, :)
324 AC_CHECK_TOOL(STRIP, strip, :)
326 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
327 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
328 enable_win32_dll=yes, enable_win32_dll=no)
330 AC_ARG_ENABLE(libtool-lock,
331 [ --disable-libtool-lock avoid locking (might break parallel builds)])
332 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
334 # Some flags need to be propagated to the compiler or linker for good
338 # Find out which ABI we are using.
339 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
340 if AC_TRY_EVAL(ac_compile); then
341 case `/usr/bin/file conftest.$ac_objext` in
357 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
358 SAVE_CFLAGS="$CFLAGS"
359 CFLAGS="$CFLAGS -belf"
360 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
363 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
365 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
366 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
367 CFLAGS="$SAVE_CFLAGS"
371 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
372 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
373 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
374 AC_CHECK_TOOL(AS, as, false)
375 AC_CHECK_TOOL(OBJDUMP, objdump, false)
377 # recent cygwin and mingw systems supply a stub DllMain which the user
378 # can override, but on older systems we have to supply one
379 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
381 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
383 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
386 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
387 # old mingw systems require "-dll" to link a DLL, while more recent ones
389 SAVE_CFLAGS="$CFLAGS"
390 CFLAGS="$CFLAGS -mdll"
391 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
392 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
393 CFLAGS="$SAVE_CFLAGS" ;;
394 *-*-cygwin* | *-*-pw32*)
395 # cygwin systems need to pass --dll to the linker, and not link
396 # crt.o which will require a WinMain@16 definition.
397 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
408 # --------------------
409 AC_DEFUN(_LT_AC_CHECK_DLFCN,
410 [AC_CHECK_HEADERS(dlfcn.h)
411 ])# _LT_AC_CHECK_DLFCN
413 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
414 # ---------------------------------
415 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
416 [AC_REQUIRE([AC_CANONICAL_HOST])
417 AC_REQUIRE([AC_PROG_NM])
418 AC_REQUIRE([AC_OBJEXT])
419 # Check for command to grab the raw symbol name followed by C symbol from nm.
420 AC_MSG_CHECKING([command to parse $NM output])
421 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
423 # These are sane defaults that work on at least a few old systems.
424 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
426 # Character class describing NM global symbol codes.
427 [symcode='[BCDEGRST]']
429 # Regexp to match symbols that can be accessed directly from C.
430 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
432 # Transform the above into a raw symbol and a C symbol.
435 # Transform an extracted symbol line into a proper C declaration
436 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
438 # Define system-specific variables.
443 cygwin* | mingw* | pw32*)
444 [symcode='[ABCDGISTW]']
446 hpux*) # Its linker distinguishes data from code symbols
447 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
450 [symcode='[BCDEGRST]']
460 # Handle CRLF in mingw tool chain
464 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
468 # If we're using GNU nm, then use its standard symbol codes.
469 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
470 [symcode='[ABCDGISTW]']
473 # Try without a prefix undercore, then with it.
474 for ac_symprfx in "" "_"; do
476 # Write the raw and C identifiers.
477 [lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
479 # Check to see that the pipe works correctly.
482 cat > conftest.$ac_ext <<EOF
487 void nm_test_func(){}
491 int main(){nm_test_var='a';nm_test_func();return(0);}
494 if AC_TRY_EVAL(ac_compile); then
495 # Now try to grab the symbols.
497 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
498 # Try sorting and uniquifying the output.
499 if sort "$nlist" | uniq > "$nlist"T; then
500 mv -f "$nlist"T "$nlist"
505 # Make sure that we snagged all the symbols we need.
506 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
507 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
508 cat <<EOF > conftest.$ac_ext
514 # Now generate the symbol file.
515 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
517 cat <<EOF >> conftest.$ac_ext
518 #if defined (__STDC__) && __STDC__
519 # define lt_ptr_t void *
521 # define lt_ptr_t char *
525 /* The mapping between symbol names and symbols. */
530 [lt_preloaded_symbols[] =]
533 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
534 cat <<\EOF >> conftest.$ac_ext
542 # Now try linking the two files.
543 mv conftest.$ac_objext conftstm.$ac_objext
545 save_CFLAGS="$CFLAGS"
546 LIBS="conftstm.$ac_objext"
547 CFLAGS="$CFLAGS$no_builtin_flag"
548 if AC_TRY_EVAL(ac_link) && test -s conftest; then
552 CFLAGS="$save_CFLAGS"
554 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
557 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
560 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
563 echo "$progname: failed program was:" >&AC_FD_CC
564 cat conftest.$ac_ext >&5
566 rm -f conftest* conftst*
568 # Do not use the global_symbol_pipe unless it works.
569 if test "$pipe_works" = yes; then
572 lt_cv_sys_global_symbol_pipe=
576 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
577 if test -z "$lt_cv_sys_global_symbol_pipe"; then
578 global_symbol_to_cdecl=
580 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
582 if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then
583 AC_MSG_RESULT(failed)
587 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
589 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
590 # ---------------------------------
591 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
592 [# Find the correct PATH separator. Usually this is `:', but
593 # DJGPP uses `;' like DOS.
594 if test "X${PATH_SEPARATOR+set}" != Xset; then
595 UNAME=${UNAME-`uname 2>/dev/null`}
597 *-DOS) lt_cv_sys_path_separator=';' ;;
598 *) lt_cv_sys_path_separator=':' ;;
601 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
603 # _LT_AC_PROG_ECHO_BACKSLASH
604 # --------------------------
605 # Add some code to the start of the generated configure script which
606 # will find an echo command which doesn;t interpret backslashes.
607 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
608 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
609 [AC_DIVERT_PUSH(NOTICE)])
610 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
612 # Check that we are running under the correct shell.
613 SHELL=${CONFIG_SHELL-/bin/sh}
617 # Remove one level of quotation (which was required for Make).
618 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
623 if test "X[$]1" = X--no-reexec; then
624 # Discard the --no-reexec flag, and continue.
626 elif test "X[$]1" = X--fallback-echo; then
627 # Avoid inline document here, it may be left over
629 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
630 # Yippee, $echo works!
633 # Restart under the correct shell.
634 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
637 if test "X[$]1" = X--fallback-echo; then
638 # used as fallback echo
646 # The HP-UX ksh and POSIX shell print the target directory to stdout
648 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
650 if test -z "$ECHO"; then
651 if test "X${echo_test_string+set}" != Xset; then
652 # find a string as large as possible, as long as the shell can cope with it
653 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
654 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
655 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
656 echo_test_string="`eval $cmd`" &&
657 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
664 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
665 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
666 test "X$echo_testing_string" = "X$echo_test_string"; then
669 # The Solaris, AIX, and Digital Unix default echo programs unquote
670 # backslashes. This makes it impossible to quote backslashes using
671 # echo "$something" | sed 's/\\/\\\\/g'
673 # So, first we look for a working echo in the user's PATH.
675 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
676 for dir in $PATH /usr/ucb; do
677 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
678 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
679 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
680 test "X$echo_testing_string" = "X$echo_test_string"; then
687 if test "X$echo" = Xecho; then
688 # We didn't find a better echo, so look for alternatives.
689 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
690 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
691 test "X$echo_testing_string" = "X$echo_test_string"; then
692 # This shell has a builtin print -r that does the trick.
694 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
695 test "X$CONFIG_SHELL" != X/bin/ksh; then
696 # If we have ksh, try running configure again with it.
697 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
698 export ORIGINAL_CONFIG_SHELL
699 CONFIG_SHELL=/bin/ksh
701 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
705 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
706 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
707 test "X$echo_testing_string" = "X$echo_test_string"; then
710 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
711 test "X$echo_testing_string" = 'X\t' &&
712 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
713 test "X$echo_testing_string" = "X$echo_test_string"; then
714 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
716 SHELL="$CONFIG_SHELL"
718 echo="$CONFIG_SHELL [$]0 --fallback-echo"
719 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
720 test "X$echo_testing_string" = 'X\t' &&
721 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
722 test "X$echo_testing_string" = "X$echo_test_string"; then
723 echo="$CONFIG_SHELL [$]0 --fallback-echo"
725 # maybe with a smaller string...
728 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
729 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
736 if test "$prev" != 'sed 50q "[$]0"'; then
737 echo_test_string=`eval $prev`
738 export echo_test_string
739 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
741 # Oops. We lost completely, so just stick with echo.
750 # Copy echo and quote the copy suitably for passing to libtool from
751 # the Makefile, instead of quoting the original, which is used later.
753 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
754 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
759 ])# _LT_AC_PROG_ECHO_BACKSLASH
761 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
762 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
763 # ------------------------------------------------------------------
764 AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF,
765 [if test "$cross_compiling" = yes; then :
768 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
769 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
770 lt_status=$lt_dlunknown
771 cat > conftest.$ac_ext <<EOF
772 [#line __oline__ "configure"
773 #include "confdefs.h"
782 # define LT_DLGLOBAL RTLD_GLOBAL
785 # define LT_DLGLOBAL DL_GLOBAL
787 # define LT_DLGLOBAL 0
791 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
792 find out it does not work in some platform. */
793 #ifndef LT_DLLAZY_OR_NOW
795 # define LT_DLLAZY_OR_NOW RTLD_LAZY
798 # define LT_DLLAZY_OR_NOW DL_LAZY
801 # define LT_DLLAZY_OR_NOW RTLD_NOW
804 # define LT_DLLAZY_OR_NOW DL_NOW
806 # define LT_DLLAZY_OR_NOW 0
814 extern "C" void exit (int);
817 void fnord() { int i=42;}
820 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
821 int status = $lt_dlunknown;
825 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
826 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
827 /* dlclose (self); */
833 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
834 (./conftest; exit; ) 2>/dev/null
837 x$lt_dlno_uscore) $1 ;;
838 x$lt_dlneed_uscore) $2 ;;
839 x$lt_unknown|x*) $3 ;;
847 ])# _LT_AC_TRY_DLOPEN_SELF
849 # AC_LIBTOOL_DLOPEN_SELF
850 # -------------------
851 AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF,
852 [if test "x$enable_dlopen" != xyes; then
853 enable_dlopen=unknown
854 enable_dlopen_self=unknown
855 enable_dlopen_self_static=unknown
862 lt_cv_dlopen="load_add_on"
864 lt_cv_dlopen_self=yes
867 cygwin* | mingw* | pw32*)
868 lt_cv_dlopen="LoadLibrary"
873 AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
874 [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
875 [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
876 [AC_CHECK_LIB(svld, dlopen,
877 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
878 [AC_CHECK_LIB(dld, shl_load,
879 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
887 if test "x$lt_cv_dlopen" != xno; then
893 case $lt_cv_dlopen in
895 save_CPPFLAGS="$CPPFLAGS"
896 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
897 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
899 save_LDFLAGS="$LDFLAGS"
900 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
903 LIBS="$lt_cv_dlopen_libs $LIBS"
905 AC_CACHE_CHECK([whether a program can dlopen itself],
906 lt_cv_dlopen_self, [dnl
907 _LT_AC_TRY_DLOPEN_SELF(
908 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
909 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
912 if test "x$lt_cv_dlopen_self" = xyes; then
913 LDFLAGS="$LDFLAGS $link_static_flag"
914 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
915 lt_cv_dlopen_self_static, [dnl
916 _LT_AC_TRY_DLOPEN_SELF(
917 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
918 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
922 CPPFLAGS="$save_CPPFLAGS"
923 LDFLAGS="$save_LDFLAGS"
928 case $lt_cv_dlopen_self in
929 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
930 *) enable_dlopen_self=unknown ;;
933 case $lt_cv_dlopen_self_static in
934 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
935 *) enable_dlopen_self_static=unknown ;;
938 ])# AC_LIBTOOL_DLOPEN_SELF
940 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
941 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
942 # Sed substitution that helps us do robust quoting. It backslashifies
943 # metacharacters that are still active within double-quoted strings.
945 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
947 # Same as above, but do not quote variable references.
948 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
950 # Sed substitution to delay expansion of an escaped shell variable in a
951 # double_quote_subst'ed string.
952 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
958 default_ofile=libtool
961 # All known linkers require a `.a' archive for static linking (except M$VC,
962 # which needs '.lib').
964 ltmain="$ac_aux_dir/ltmain.sh"
965 ofile="$default_ofile"
966 with_gnu_ld="$lt_cv_prog_gnu_ld"
967 need_locks="$enable_libtool_lock"
972 # Set sane defaults for various variables
973 test -z "$AR" && AR=ar
974 test -z "$AR_FLAGS" && AR_FLAGS=cru
975 test -z "$AS" && AS=as
976 test -z "$CC" && CC=cc
977 test -z "$DLLTOOL" && DLLTOOL=dlltool
978 test -z "$LD" && LD=ld
979 test -z "$LN_S" && LN_S="ln -s"
980 test -z "$MAGIC_CMD" && MAGIC_CMD=file
981 test -z "$NM" && NM=nm
982 test -z "$OBJDUMP" && OBJDUMP=objdump
983 test -z "$RANLIB" && RANLIB=:
984 test -z "$STRIP" && STRIP=:
985 test -z "$ac_objext" && ac_objext=o
987 if test x"$host" != x"$build"; then
988 ac_tool_prefix=${host_alias}-
993 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
996 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1001 # AIX sometimes has problems with the GCC collect2 program. For some
1002 # reason, if we set the COLLECT_NAMES environment variable, the problems
1003 # vanish in a puff of smoke.
1004 if test "X${COLLECT_NAMES+set}" != Xset; then
1006 export COLLECT_NAMES
1011 # Determine commands to create old-style static archives.
1012 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1013 old_postinstall_cmds='chmod 644 $oldlib'
1014 old_postuninstall_cmds=
1016 if test -n "$RANLIB"; then
1017 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1018 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1021 # Allow CC to be a program name with arguments.
1025 ## FIXME: this should be a separate macro
1027 AC_MSG_CHECKING([for objdir])
1028 rm -f .libs 2>/dev/null
1029 mkdir .libs 2>/dev/null
1030 if test -d .libs; then
1033 # MS-DOS does not allow filenames that begin with a dot.
1036 rmdir .libs 2>/dev/null
1037 AC_MSG_RESULT($objdir)
1042 ## FIXME: this should be a separate macro
1045 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1046 pic_mode="$withval", pic_mode=default)
1047 test -z "$pic_mode" && pic_mode=default
1049 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1050 # in isolation, and that seeing it set (from the cache) indicates that
1051 # the associated values are set (in the cache) correctly too.
1052 AC_MSG_CHECKING([for $compiler option to produce PIC])
1053 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1054 [ lt_cv_prog_cc_pic=
1055 lt_cv_prog_cc_shlib=
1057 lt_cv_prog_cc_static=
1058 lt_cv_prog_cc_no_builtin=
1059 lt_cv_prog_cc_can_build_shared=$can_build_shared
1061 if test "$GCC" = yes; then
1062 lt_cv_prog_cc_wl='-Wl,'
1063 lt_cv_prog_cc_static='-static'
1067 # Below there is a dirty hack to force normal static linking with -ldl
1068 # The problem is because libdl dynamically linked with both libc and
1069 # libC (AIX C++ library), which obviously doesn't included in libraries
1070 # list by gcc. This cause undefined symbols with -static flags.
1071 # This hack allows C programs to be linked with "-static -ldl", but
1072 # we not sure about C++ programs.
1073 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1076 # FIXME: we need at least 68020 code to build shared libraries, but
1077 # adding the `-m68020' flag to GCC prevents building anything better,
1079 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1081 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1082 # PIC is the default for these OSes.
1084 darwin* | rhapsody*)
1085 # PIC is the default on this platform
1086 # Common symbols not allowed in MH_DYLIB files
1087 lt_cv_prog_cc_pic='-fno-common'
1089 cygwin* | mingw* | pw32* | os2*)
1090 # This hack is so that the source file can tell whether it is being
1091 # built for inclusion in a dll (and should export symbols for example).
1092 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1095 if test -d /usr/nec; then
1096 lt_cv_prog_cc_pic=-Kconform_pic
1100 lt_cv_prog_cc_pic='-fPIC'
1104 # PORTME Check for PIC flags for the system compiler.
1106 aix3* | aix4* | aix5*)
1107 # All AIX code is PIC.
1108 if test "$host_cpu" = ia64; then
1109 # AIX 5 now supports IA64 processor
1110 lt_cv_prog_cc_static='-Bstatic'
1111 lt_cv_prog_cc_wl='-Wl,'
1113 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1117 hpux9* | hpux10* | hpux11*)
1118 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1119 lt_cv_prog_cc_wl='-Wl,'
1120 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1121 lt_cv_prog_cc_pic='+Z'
1125 lt_cv_prog_cc_wl='-Wl,'
1126 lt_cv_prog_cc_static='-non_shared'
1127 # PIC (with -KPIC) is the default.
1130 cygwin* | mingw* | pw32* | os2*)
1131 # This hack is so that the source file can tell whether it is being
1132 # built for inclusion in a dll (and should export symbols for example).
1133 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1137 lt_cv_prog_cc_pic='-KPIC'
1138 lt_cv_prog_cc_static='-Bstatic'
1141 osf3* | osf4* | osf5*)
1142 # All OSF/1 code is PIC.
1143 lt_cv_prog_cc_wl='-Wl,'
1144 lt_cv_prog_cc_static='-non_shared'
1148 lt_cv_prog_cc_pic='-Kpic'
1149 lt_cv_prog_cc_static='-dn'
1150 lt_cv_prog_cc_shlib='-belf'
1154 lt_cv_prog_cc_pic='-KPIC'
1155 lt_cv_prog_cc_static='-Bstatic'
1156 lt_cv_prog_cc_wl='-Wl,'
1160 lt_cv_prog_cc_pic='-PIC'
1161 lt_cv_prog_cc_static='-Bstatic'
1162 lt_cv_prog_cc_wl='-Qoption ld '
1165 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1166 lt_cv_prog_cc_pic='-KPIC'
1167 lt_cv_prog_cc_static='-Bstatic'
1168 if test "x$host_vendor" = xsni; then
1169 lt_cv_prog_cc_wl='-LD'
1171 lt_cv_prog_cc_wl='-Wl,'
1176 lt_cv_prog_cc_pic='-pic'
1177 lt_cv_prog_cc_static='-Bstatic'
1181 if test -d /usr/nec ;then
1182 lt_cv_prog_cc_pic='-Kconform_pic'
1183 lt_cv_prog_cc_static='-Bstatic'
1188 lt_cv_prog_cc_can_build_shared=no
1193 if test -z "$lt_cv_prog_cc_pic"; then
1194 AC_MSG_RESULT([none])
1196 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1198 # Check to make sure the pic_flag actually works.
1199 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1200 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1201 save_CFLAGS="$CFLAGS"
1202 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1203 AC_TRY_COMPILE([], [], [dnl
1205 hpux9* | hpux10* | hpux11*)
1206 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1207 # they create non-PIC objects. So, if there were any warnings, we
1208 # assume that PIC is not supported.
1209 if test -s conftest.err; then
1210 lt_cv_prog_cc_pic_works=no
1212 lt_cv_prog_cc_pic_works=yes
1216 lt_cv_prog_cc_pic_works=yes
1220 lt_cv_prog_cc_pic_works=no
1222 CFLAGS="$save_CFLAGS"
1225 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1227 lt_cv_prog_cc_can_build_shared=no
1229 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1232 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1237 # Check for any special shared library compilation flags.
1238 if test -n "$lt_cv_prog_cc_shlib"; then
1239 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1240 if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then :
1242 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1243 lt_cv_prog_cc_can_build_shared=no
1247 ## FIXME: this should be a separate macro
1249 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1250 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1251 lt_cv_prog_cc_static_works=no
1252 save_LDFLAGS="$LDFLAGS"
1253 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1254 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1255 LDFLAGS="$save_LDFLAGS"
1258 # Belt *and* braces to stop my trousers falling down:
1259 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1260 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1262 pic_flag="$lt_cv_prog_cc_pic"
1263 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1264 wl="$lt_cv_prog_cc_wl"
1265 link_static_flag="$lt_cv_prog_cc_static"
1266 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1267 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1272 ## FIXME: this should be a separate macro
1274 # Check to see if options -o and -c are simultaneously supported by compiler
1275 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1276 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1277 $rm -r conftest 2>/dev/null
1280 echo "int some_variable = 0;" > conftest.$ac_ext
1282 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1283 # that will create temporary files in the current directory regardless of
1284 # the output directory. Thus, making CWD read-only will cause this test
1285 # to fail, enabling locking or at least warning the user not to do parallel
1288 save_CFLAGS="$CFLAGS"
1289 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1291 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1292 # The compiler can only warn and ignore the option if not recognized
1293 # So say no if there are warnings
1294 if test -s out/conftest.err; then
1295 lt_cv_compiler_c_o=no
1297 lt_cv_compiler_c_o=yes
1300 # Append any errors to the config.log.
1301 cat out/conftest.err 1>&AC_FD_CC
1302 lt_cv_compiler_c_o=no
1304 CFLAGS="$save_CFLAGS"
1310 $rm -r conftest 2>/dev/null
1312 compiler_c_o=$lt_cv_compiler_c_o
1313 AC_MSG_RESULT([$compiler_c_o])
1315 if test x"$compiler_c_o" = x"yes"; then
1316 # Check to see if we can write to a .lo
1317 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1318 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1319 lt_cv_compiler_o_lo=no
1320 save_CFLAGS="$CFLAGS"
1321 CFLAGS="$CFLAGS -c -o conftest.lo"
1322 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1323 # The compiler can only warn and ignore the option if not recognized
1324 # So say no if there are warnings
1325 if test -s conftest.err; then
1326 lt_cv_compiler_o_lo=no
1328 lt_cv_compiler_o_lo=yes
1331 CFLAGS="$save_CFLAGS"
1333 compiler_o_lo=$lt_cv_compiler_o_lo
1334 AC_MSG_RESULT([$compiler_c_lo])
1341 ## FIXME: this should be a separate macro
1343 # Check to see if we can do hard links to lock some files if needed
1344 hard_links="nottested"
1345 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1346 # do not overwrite the value of need_locks provided by the user
1347 AC_MSG_CHECKING([if we can lock with hard links])
1350 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1352 ln conftest.a conftest.b 2>&5 || hard_links=no
1353 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1354 AC_MSG_RESULT([$hard_links])
1355 if test "$hard_links" = no; then
1356 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1365 ## FIXME: this should be a separate macro
1367 if test "$GCC" = yes; then
1368 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1369 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1370 echo "int some_variable = 0;" > conftest.$ac_ext
1371 save_CFLAGS="$CFLAGS"
1372 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1373 compiler_rtti_exceptions=no
1374 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1375 # The compiler can only warn and ignore the option if not recognized
1376 # So say no if there are warnings
1377 if test -s conftest.err; then
1378 compiler_rtti_exceptions=no
1380 compiler_rtti_exceptions=yes
1383 CFLAGS="$save_CFLAGS"
1384 AC_MSG_RESULT([$compiler_rtti_exceptions])
1386 if test "$compiler_rtti_exceptions" = "yes"; then
1387 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1389 no_builtin_flag=' -fno-builtin'
1395 ## FIXME: this should be a separate macro
1397 # See if the linker supports building shared libraries.
1398 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1400 allow_undefined_flag=
1402 need_lib_prefix=unknown
1403 need_version=unknown
1404 # when you set need_version to no, make sure it does not cause -set_version
1405 # flags to be left without arguments
1407 archive_expsym_cmds=
1408 old_archive_from_new_cmds=
1409 old_archive_from_expsyms_cmds=
1410 export_dynamic_flag_spec=
1411 whole_archive_flag_spec=
1412 thread_safe_flag_spec=
1413 hardcode_into_libs=no
1414 hardcode_libdir_flag_spec=
1415 hardcode_libdir_separator=
1418 hardcode_shlibpath_var=unsupported
1420 link_all_deplibs=unknown
1421 always_export_symbols=no
1422 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1423 # include_expsyms should be a list of space-separated symbols to be *always*
1424 # included in the symbol list
1426 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1427 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1428 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1429 # as well as any symbol that contains `d'.
1430 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1431 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1432 # platforms (ab)use it in PIC code, but their linkers get confused if
1433 # the symbol is explicitly referenced. Since portable code cannot
1434 # rely on this symbol name, it's probably fine to never include it in
1435 # preloaded symbol tables.
1436 extract_expsyms_cmds=
1439 cygwin* | mingw* | pw32* )
1440 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1441 # When not using gcc, we currently assume that we are using
1442 # Microsoft Visual C++.
1443 if test "$GCC" != yes; then
1451 if test "$with_gnu_ld" = yes; then
1452 # If archive_cmds runs LD, not CC, wlarc should be empty
1455 # See if GNU ld supports shared libraries.
1457 aix3* | aix4* | aix5*)
1458 # On AIX, the GNU linker is very broken
1459 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1463 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1464 *** to be unable to reliably create shared libraries on AIX.
1465 *** Therefore, libtool is disabling shared libraries support. If you
1466 *** really care for shared libraries, you may want to modify your PATH
1467 *** so that a non-GNU linker is found, and then restart.
1473 archive_cmds='$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)'
1474 hardcode_libdir_flag_spec='-L$libdir'
1475 hardcode_minus_L=yes
1477 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1478 # that the semantics of dynamic libraries on AmigaOS, at least up
1479 # to version 4, is to share data among multiple programs linked
1480 # with the same dynamic library. Since this doesn't match the
1481 # behavior of shared libraries on other platforms, we can use
1487 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1488 allow_undefined_flag=unsupported
1489 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1490 # support --undefined. This deserves some investigation. FIXME
1491 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1497 cygwin* | mingw* | pw32*)
1498 # hardcode_libdir_flag_spec is actually meaningless, as there is
1499 # no search path for DLLs.
1500 hardcode_libdir_flag_spec='-L$libdir'
1501 allow_undefined_flag=unsupported
1502 always_export_symbols=yes
1504 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1505 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1506 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1507 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1508 else $CC -o impgen impgen.c ; fi)~
1509 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1511 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1513 # cygwin and mingw dlls have different entry points and sets of symbols
1515 # FIXME: what about values for MSVC?
1516 dll_entry=__cygwin_dll_entry@12
1517 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1521 dll_entry=_DllMainCRTStartup@12
1522 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1526 # mingw and cygwin differ, and it's simplest to just exclude the union
1527 # of the two symbol sets.
1528 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1530 # recent cygwin and mingw systems supply a stub DllMain which the user
1531 # can override, but on older systems we have to supply one (in ltdll.c)
1532 if test "x$lt_cv_need_dllmain" = "xyes"; then
1533 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1534 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~
1535 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1541 # Extract the symbol export list from an `--export-all' def file,
1542 # then regenerate the def file from the symbol export list, so that
1543 # the compiled dll only exports the symbol export list.
1544 # Be careful not to strip the DATA tag left be newer dlltools.
1545 export_symbols_cmds="$ltdll_cmds"'
1546 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1547 [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
1549 # If the export-symbols file already is a .def file (1st line
1550 # is EXPORTS), use it as is.
1551 # If DATA tags from a recent dlltool are present, honour them!
1552 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1553 cp $export_symbols $output_objdir/$soname-def;
1555 echo EXPORTS > $output_objdir/$soname-def;
1557 cat $export_symbols | while read symbol; do
1560 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1561 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1563 _lt_hint=`expr 1 + \$_lt_hint`;
1567 $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~
1568 $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~
1569 $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~
1570 $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~
1571 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1575 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1576 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1579 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1580 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1585 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1589 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1590 *** create shared libraries on Solaris systems. Therefore, libtool
1591 *** is disabling shared libraries support. We urge you to upgrade GNU
1592 *** binutils to release 2.9.1 or newer. Another option is to modify
1593 *** your PATH or compiler configuration so that the native linker is
1594 *** used, and then restart.
1597 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1598 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1599 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1606 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1609 hardcode_shlibpath_var=no
1613 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1614 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1615 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1622 if test "$ld_shlibs" = yes; then
1623 runpath_var=LD_RUN_PATH
1624 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1625 export_dynamic_flag_spec='${wl}--export-dynamic'
1627 cygwin* | mingw* | pw32*)
1628 # dlltool doesn't understand --whole-archive et. al.
1629 whole_archive_flag_spec=
1632 # ancient GNU ld didn't support --whole-archive et. al.
1633 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1634 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1636 whole_archive_flag_spec=
1642 # PORTME fill in a description of your system's linker (not GNU ld)
1645 allow_undefined_flag=unsupported
1646 always_export_symbols=yes
1647 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
1648 # Note: this linker hardcodes the directories in LIBPATH if there
1649 # are no directories specified by -L.
1650 hardcode_minus_L=yes
1651 if test "$GCC" = yes && test -z "$link_static_flag"; then
1652 # Neither direct hardcoding nor static linking is supported with a
1654 hardcode_direct=unsupported
1659 # When large executables or shared objects are built, AIX ld can
1660 # have problems creating the table of contents. If linking a library
1661 # or program results in "error TOC overflow" add -mminimal-toc to
1662 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1663 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1666 hardcode_libdir_separator=':'
1667 if test "$GCC" = yes; then
1668 collect2name=`${CC} -print-prog-name=collect2`
1669 if test -f "$collect2name" && \
1670 strings "$collect2name" | grep resolve_lib_name >/dev/null
1672 # We have reworked collect2
1675 # We have old collect2
1676 hardcode_direct=unsupported
1677 # It fails to find uninstalled libraries when the uninstalled
1678 # path is not listed in the libpath. Setting hardcode_minus_L
1679 # to unsupported forces relinking
1680 hardcode_minus_L=yes
1681 hardcode_libdir_flag_spec='-L$libdir'
1682 hardcode_libdir_separator=
1684 shared_flag='-shared'
1686 if test "$host_cpu" = ia64; then
1689 shared_flag='${wl}-bM:SRE'
1694 if test "$host_cpu" = ia64; then
1695 # On IA64, the linker does run time linking by default, so we don't
1696 # have to do anything special.
1697 aix_use_runtimelinking=no
1698 exp_sym_flag='-Bexport'
1701 # Test if we are trying to use run time linking, or normal AIX style linking.
1702 # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
1703 aix_use_runtimelinking=no
1704 for ld_flag in $LDFLAGS; do
1705 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
1706 aix_use_runtimelinking=yes
1710 exp_sym_flag='-bexport'
1711 no_entry_flag='-bnoentry'
1713 # It seems that -bexpall can do strange things, so it is better to
1714 # generate a list of symbols to export.
1715 always_export_symbols=yes
1716 if test "$aix_use_runtimelinking" = yes; then
1717 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1718 allow_undefined_flag=' -Wl,-G'
1719 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1721 if test "$host_cpu" = ia64; then
1722 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1723 allow_undefined_flag="-znodefs"
1724 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
1726 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1727 # Warning - without using the other run time loading flags, -berok will
1728 # link without error, but may produce a broken library.
1729 allow_undefined_flag='${wl}-berok"
1730 # This is a bit strange, but is similar to how AIX traditionally builds
1731 # it's shared libraries.
1732 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
1738 archive_cmds='$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)'
1739 hardcode_libdir_flag_spec='-L$libdir'
1740 hardcode_minus_L=yes
1741 # see comment about different semantics on the GNU ld section
1745 cygwin* | mingw* | pw32*)
1746 # When not using gcc, we currently assume that we are using
1747 # Microsoft Visual C++.
1748 # hardcode_libdir_flag_spec is actually meaningless, as there is
1749 # no search path for DLLs.
1750 hardcode_libdir_flag_spec=' '
1751 allow_undefined_flag=unsupported
1752 # Tell ltmain to make .lib files, not .a files.
1754 # FIXME: Setting linknames here is a bad hack.
1755 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1756 # The linker will automatically build a .lib file if we build a DLL.
1757 old_archive_from_new_cmds='true'
1758 # FIXME: Should let the user specify the lib program.
1759 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1760 fix_srcfile_path='`cygpath -w "$srcfile"`'
1763 darwin* | rhapsody*)
1764 allow_undefined_flag='-undefined suppress'
1765 # FIXME: Relying on posixy $() will cause problems for
1766 # cross-compilation, but unfortunately the echo tests do not
1767 # yet detect zsh echo's removal of \ escapes.
1768 archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
1769 # We need to add '_' to the symbols in $export_symbols first
1770 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1772 hardcode_shlibpath_var=no
1773 whole_archive_flag_spec='-all_load $convenience'
1780 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1781 # support. Future versions do this automatically, but an explicit c++rt0.o
1782 # does not break anything, and helps significantly (at the cost of a little
1785 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1786 hardcode_libdir_flag_spec='-R$libdir'
1788 hardcode_shlibpath_var=no
1791 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1793 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1795 hardcode_minus_L=yes
1796 hardcode_shlibpath_var=no
1799 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1801 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1802 hardcode_libdir_flag_spec='-R$libdir'
1804 hardcode_shlibpath_var=no
1807 hpux9* | hpux10* | hpux11*)
1809 hpux9*) archive_cmds='$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' ;;
1810 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1812 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1813 hardcode_libdir_separator=:
1815 hardcode_minus_L=yes # Not in the search PATH, but as the default
1816 # location of the library.
1817 export_dynamic_flag_spec='${wl}-E'
1821 if test "$GCC" = yes; then
1822 archive_cmds='$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'
1824 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
1826 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1827 hardcode_libdir_separator=:
1828 link_all_deplibs=yes
1832 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1833 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1835 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1837 hardcode_libdir_flag_spec='-R$libdir'
1839 hardcode_shlibpath_var=no
1843 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1845 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1846 hardcode_libdir_separator=:
1847 hardcode_shlibpath_var=no
1851 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1852 hardcode_libdir_flag_spec='-R$libdir'
1854 hardcode_shlibpath_var=no
1858 hardcode_libdir_flag_spec='-L$libdir'
1859 hardcode_minus_L=yes
1860 allow_undefined_flag=unsupported
1861 archive_cmds='$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'
1862 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1866 if test "$GCC" = yes; then
1867 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1868 archive_cmds='$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'
1870 allow_undefined_flag=' -expect_unresolved \*'
1871 archive_cmds='$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'
1873 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1874 hardcode_libdir_separator=:
1877 osf4* | osf5*) # as osf3* with the addition of -msym flag
1878 if test "$GCC" = yes; then
1879 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1880 archive_cmds='$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'
1881 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1883 allow_undefined_flag=' -expect_unresolved \*'
1884 archive_cmds='$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'
1885 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1886 $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'
1888 #Both c and cxx compiler support -rpath directly
1889 hardcode_libdir_flag_spec='-rpath $libdir'
1891 hardcode_libdir_separator=:
1895 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1896 hardcode_shlibpath_var=no
1897 runpath_var=LD_RUN_PATH
1898 hardcode_runpath_var=yes
1902 no_undefined_flag=' -z defs'
1903 # $CC -shared without GNU ld will not create a library from C++
1904 # object files and a static libstdc++, better avoid it by now
1905 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1906 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1907 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1908 hardcode_libdir_flag_spec='-R$libdir'
1909 hardcode_shlibpath_var=no
1911 [solaris2.[0-5] | solaris2.[0-5].*]) ;;
1912 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1913 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1915 link_all_deplibs=yes
1919 if test "x$host_vendor" = xsequent; then
1920 # Use $CC to link under sequent, because it throws in some extra .o
1921 # files that make .init and .fini sections work.
1922 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1924 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1926 hardcode_libdir_flag_spec='-L$libdir'
1928 hardcode_minus_L=yes
1929 hardcode_shlibpath_var=no
1933 if test "x$host_vendor" = xsno; then
1934 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
1935 hardcode_direct=yes # is this really true???
1937 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1938 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1940 runpath_var='LD_RUN_PATH'
1941 hardcode_shlibpath_var=no
1945 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1946 hardcode_shlibpath_var=no
1947 export_dynamic_flag_spec='-Bexport'
1951 no_undefined_flag=' -z text'
1952 # $CC -shared without GNU ld will not create a library from C++
1953 # object files and a static libstdc++, better avoid it by now
1954 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1955 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1956 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1957 hardcode_libdir_flag_spec=
1958 hardcode_shlibpath_var=no
1959 runpath_var='LD_RUN_PATH'
1963 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1964 hardcode_libdir_flag_spec='-L$libdir'
1965 hardcode_shlibpath_var=no
1969 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1970 hardcode_libdir_flag_spec='-L$libdir'
1971 hardcode_shlibpath_var=no
1975 if test -d /usr/nec; then
1976 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1977 hardcode_shlibpath_var=no
1978 runpath_var=LD_RUN_PATH
1979 hardcode_runpath_var=yes
1985 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1988 hardcode_shlibpath_var=no
1989 hardcode_runpath_var=yes
1990 runpath_var=LD_RUN_PATH
1993 sysv5uw7* | unixware7*)
1994 no_undefined_flag='${wl}-z ${wl}text'
1995 if test "$GCC" = yes; then
1996 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
1998 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2000 runpath_var='LD_RUN_PATH'
2001 hardcode_shlibpath_var=no
2009 AC_MSG_RESULT([$ld_shlibs])
2010 test "$ld_shlibs" = no && can_build_shared=no
2014 ## FIXME: this should be a separate macro
2016 # Check hardcoding attributes.
2017 AC_MSG_CHECKING([how to hardcode library paths into programs])
2019 if test -n "$hardcode_libdir_flag_spec" || \
2020 test -n "$runpath_var"; then
2022 # We can hardcode non-existant directories.
2023 if test "$hardcode_direct" != no &&
2024 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2025 # have to relink, otherwise we might link with an installed library
2026 # when we should be linking with a yet-to-be-installed one
2027 ## test "$hardcode_shlibpath_var" != no &&
2028 test "$hardcode_minus_L" != no; then
2029 # Linking always hardcodes the temporary library directory.
2030 hardcode_action=relink
2032 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2033 hardcode_action=immediate
2036 # We cannot hardcode anything, or else we can only hardcode existing
2038 hardcode_action=unsupported
2040 AC_MSG_RESULT([$hardcode_action])
2044 ## FIXME: this should be a separate macro
2048 AC_MSG_CHECKING([whether stripping libraries is possible])
2049 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2050 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2051 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2052 AC_MSG_RESULT([yes])
2059 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2060 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2062 ## FIXME: this should be a separate macro
2064 # PORTME Fill in your ld.so characteristics
2065 AC_MSG_CHECKING([dynamic linker characteristics])
2067 libname_spec='lib$name'
2074 shlibpath_overrides_runpath=unknown
2076 dynamic_linker="$host_os ld.so"
2077 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2078 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2083 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2084 shlibpath_var=LIBPATH
2086 # AIX has no versioning support, so we append a major version to the name.
2087 soname_spec='${libname}${release}.so$major'
2092 if test "$host_cpu" = ia64; then
2093 # AIX 5 supports IA64
2094 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2095 shlibpath_var=LD_LIBRARY_PATH
2097 # With GCC up to 2.95.x, collect2 would create an import file
2098 # for dependence libraries. The import file would start with
2099 # the line `#! .'. This would cause the generated library to
2100 # depend on `.', always an invalid library. This was fixed in
2101 # development snapshots of GCC prior to 3.0.
2103 [ aix4 | aix4.[01] | aix4.[01].*)]
2104 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2106 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2113 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2114 # soname into executable. Probably we can add versioning support to
2115 # collect2, so additional links can be useful in future.
2116 if test "$aix_use_runtimelinking" = yes; then
2117 # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
2118 # lib<name>.a to let people know that these are not typical AIX shared libraries.
2119 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2121 # We preserve .a as extension for shared libraries through AIX4.2
2122 # and later when we are not doing run time linking.
2123 library_names_spec='${libname}${release}.a $libname.a'
2124 soname_spec='${libname}${release}.so$major'
2126 shlibpath_var=LIBPATH
2127 deplibs_check_method=pass_all
2132 library_names_spec='$libname.ixlibrary $libname.a'
2133 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2134 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'
2138 library_names_spec='${libname}.so'
2139 dynamic_linker="$host_os ld.so"
2140 shlibpath_var=LIBRARY_PATH
2146 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2147 soname_spec='${libname}${release}.so$major'
2148 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2149 shlibpath_var=LD_LIBRARY_PATH
2150 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2151 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2152 export_dynamic_flag_spec=-rdynamic
2153 # the default ld.so.conf also contains /usr/contrib/lib and
2154 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2155 # libtool to hard-code these into programs
2158 cygwin* | mingw* | pw32*)
2159 version_type=windows
2162 case $GCC,$host_os in
2164 library_names_spec='$libname.dll.a'
2165 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2166 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2167 dldir=$destdir/`dirname \$dlpath`~
2168 test -d \$dldir || mkdir -p \$dldir~
2169 $install_prog .libs/$dlname \$dldir/$dlname'
2170 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2171 dlpath=$dir/\$dldll~
2175 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
2176 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2179 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2182 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
2185 dynamic_linker='Win32 ld.exe'
2186 # FIXME: first we should search . and the directory the executable is in
2190 darwin* | rhapsody*)
2191 dynamic_linker="$host_os dyld"
2195 # FIXME: Relying on posixy $() will cause problems for
2196 # cross-compilation, but unfortunately the echo tests do not
2197 # yet detect zsh echo's removal of \ escapes.
2198 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)'
2199 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2200 shlibpath_overrides_runpath=yes
2201 shlibpath_var=DYLD_LIBRARY_PATH
2209 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2210 version_type=freebsd-$objformat
2211 case $version_type in
2213 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2218 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2222 shlibpath_var=LD_LIBRARY_PATH
2225 shlibpath_overrides_runpath=yes
2228 shlibpath_overrides_runpath=no
2229 hardcode_into_libs=yes
2238 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2239 soname_spec='${libname}${release}.so$major'
2240 shlibpath_var=LD_LIBRARY_PATH
2241 hardcode_into_libs=yes
2244 hpux9* | hpux10* | hpux11*)
2245 # Give a soname corresponding to the major version so that dld.sl refuses to
2246 # link against other versions.
2247 dynamic_linker="$host_os dld.sl"
2251 shlibpath_var=SHLIB_PATH
2252 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2253 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2254 soname_spec='${libname}${release}.sl$major'
2255 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2256 postinstall_cmds='chmod 555 $lib'
2263 soname_spec='${libname}${release}.so$major'
2264 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2270 case $LD in # libtool.m4 will add one of these switches to LD
2271 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2272 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2273 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2274 *) libsuff= shlibsuff= libmagic=never-match;;
2278 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2279 shlibpath_overrides_runpath=no
2280 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2281 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2284 # No shared lib support for Linux oldld, aout, or coff.
2285 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2289 # This must be Linux ELF.
2294 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2295 soname_spec='${libname}${release}.so$major'
2296 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2297 shlibpath_var=LD_LIBRARY_PATH
2298 shlibpath_overrides_runpath=no
2299 # This implies no fast_install, which is unacceptable.
2300 # Some rework will be needed to allow for fast_install
2301 # before this can be enabled.
2302 hardcode_into_libs=yes
2304 # We used to test for /lib/ld.so.1 and disable shared libraries on
2305 # powerpc, because MkLinux only supported shared libraries with the
2306 # GNU dynamic linker. Since this was broken with cross compilers,
2307 # most powerpc-linux boxes support dynamic linking these days and
2308 # people can always --disable-shared, the test was removed, and we
2309 # assume the GNU/Linux dynamic linker is in use.
2310 dynamic_linker='GNU/Linux ld.so'
2317 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2318 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2319 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2320 dynamic_linker='NetBSD (a.out) ld.so'
2322 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2323 soname_spec='${libname}${release}.so$major'
2324 dynamic_linker='NetBSD ld.elf_so'
2326 shlibpath_var=LD_LIBRARY_PATH
2327 shlibpath_overrides_runpath=yes
2328 hardcode_into_libs=yes
2333 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2334 shlibpath_var=LD_LIBRARY_PATH
2335 shlibpath_overrides_runpath=yes
2340 if test "$with_gnu_ld" = yes; then
2344 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2345 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2346 shlibpath_var=LD_LIBRARY_PATH
2350 libname_spec='$name'
2352 library_names_spec='$libname.dll $libname.a'
2353 dynamic_linker='OS/2 ld.exe'
2354 shlibpath_var=LIBPATH
2357 osf3* | osf4* | osf5*)
2360 soname_spec='${libname}${release}.so'
2361 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2362 shlibpath_var=LD_LIBRARY_PATH
2363 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2364 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2369 soname_spec='${libname}${release}.so$major'
2370 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2371 shlibpath_var=LD_LIBRARY_PATH
2378 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2379 soname_spec='${libname}${release}.so$major'
2380 shlibpath_var=LD_LIBRARY_PATH
2381 shlibpath_overrides_runpath=yes
2382 hardcode_into_libs=yes
2383 # ldd complains unless libraries are executable
2384 postinstall_cmds='chmod +x $lib'
2389 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2390 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2391 shlibpath_var=LD_LIBRARY_PATH
2392 shlibpath_overrides_runpath=yes
2393 if test "$with_gnu_ld" = yes; then
2399 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2401 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2402 soname_spec='${libname}${release}.so$major'
2403 shlibpath_var=LD_LIBRARY_PATH
2404 case $host_vendor in
2406 shlibpath_overrides_runpath=no
2411 shlibpath_overrides_runpath=no
2412 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2419 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2420 soname_spec='${libname}${release}.so$major'
2421 shlibpath_var=LD_LIBRARY_PATH
2428 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2429 soname_spec='${libname}${release}.so$major'
2430 shlibpath_var=LD_LIBRARY_PATH
2434 if test -d /usr/nec ;then
2436 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2437 soname_spec='$libname.so.$major'
2438 shlibpath_var=LD_LIBRARY_PATH
2446 AC_MSG_RESULT([$dynamic_linker])
2447 test "$dynamic_linker" = no && can_build_shared=no
2451 ## FIXME: this should be a separate macro
2453 # Report the final consequences.
2454 AC_MSG_CHECKING([if libtool supports shared libraries])
2455 AC_MSG_RESULT([$can_build_shared])
2459 if test "$hardcode_action" = relink; then
2460 # Fast installation is not supported
2461 enable_fast_install=no
2462 elif test "$shlibpath_overrides_runpath" = yes ||
2463 test "$enable_shared" = no; then
2464 # Fast installation is not necessary
2465 enable_fast_install=needless
2468 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2469 if test "$GCC" = yes; then
2470 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2473 AC_LIBTOOL_DLOPEN_SELF
2475 ## FIXME: this should be a separate macro
2477 if test "$enable_shared" = yes && test "$GCC" = yes; then
2478 case $archive_cmds in
2480 # FIXME: we may have to deal with multi-command sequences.
2483 # Test whether the compiler implicitly links with -lc since on some
2484 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2485 # to ld, don't add -lc before -lgcc.
2486 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2487 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2489 echo 'static int dummy;' > conftest.$ac_ext
2491 if AC_TRY_EVAL(ac_compile); then
2494 libobjs=conftest.$ac_objext
2496 wl=$lt_cv_prog_cc_wl
2502 save_allow_undefined_flag=$allow_undefined_flag
2503 allow_undefined_flag=
2504 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2506 lt_cv_archive_cmds_need_lc=no
2508 lt_cv_archive_cmds_need_lc=yes
2510 allow_undefined_flag=$save_allow_undefined_flag
2512 cat conftest.err 1>&5
2514 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2518 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2522 ## FIXME: this should be a separate macro
2524 # The second clause should only fire when bootstrapping the
2525 # libtool distribution, otherwise you forgot to ship ltmain.sh
2526 # with your package, and you will get complaints that there are
2527 # no rules to generate ltmain.sh.
2528 if test -f "$ltmain"; then
2531 # If there is no Makefile yet, we rely on a make rule to execute
2532 # `config.status --recheck' to rerun these tests and create the
2533 # libtool script then.
2534 test -f Makefile && make "$ltmain"
2537 if test -f "$ltmain"; then
2538 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2541 echo creating $ofile
2543 # Now quote all the things that may contain metacharacters while being
2544 # careful not to overquote the AC_SUBSTed values. We take copies of the
2545 # variables and quote the copies for generation of the libtool script.
2546 for var in echo old_CC old_CFLAGS \
2547 AR AR_FLAGS CC LD LN_S NM SHELL \
2548 reload_flag reload_cmds wl \
2549 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2550 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2551 library_names_spec soname_spec \
2552 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2553 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2554 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2555 old_striplib striplib file_magic_cmd export_symbols_cmds \
2556 deplibs_check_method allow_undefined_flag no_undefined_flag \
2557 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2558 hardcode_libdir_flag_spec hardcode_libdir_separator \
2559 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2560 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2563 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2564 old_postinstall_cmds | old_postuninstall_cmds | \
2565 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2566 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2567 postinstall_cmds | postuninstall_cmds | \
2568 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2569 # Double-quote double-evaled strings.
2570 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2573 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2578 cat <<__EOF__ > "${ofile}T"
2581 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2582 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2583 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2585 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2586 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2588 # This program is free software; you can redistribute it and/or modify
2589 # it under the terms of the GNU General Public License as published by
2590 # the Free Software Foundation; either version 2 of the License, or
2591 # (at your option) any later version.
2593 # This program is distributed in the hope that it will be useful, but
2594 # WITHOUT ANY WARRANTY; without even the implied warranty of
2595 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2596 # General Public License for more details.
2598 # You should have received a copy of the GNU General Public License
2599 # along with this program; if not, write to the Free Software
2600 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2602 # As a special exception to the GNU General Public License, if you
2603 # distribute this file as part of a program that contains a
2604 # configuration script generated by Autoconf, you may include it under
2605 # the same distribution terms that you use for the rest of that program.
2607 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2608 Xsed="sed -e s/^X//"
2610 # The HP-UX ksh and POSIX shell print the target directory to stdout
2612 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2614 # ### BEGIN LIBTOOL CONFIG
2616 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2618 # Shell to use when invoking shell scripts.
2621 # Whether or not to build shared libraries.
2622 build_libtool_libs=$enable_shared
2624 # Whether or not to add -lc for building shared libraries.
2625 build_libtool_need_lc=$need_lc
2627 # Whether or not to build static libraries.
2628 build_old_libs=$enable_static
2630 # Whether or not to optimize for fast installation.
2631 fast_install=$enable_fast_install
2634 host_alias=$host_alias
2637 # An echo program that does not interpret backslashes.
2642 AR_FLAGS=$lt_AR_FLAGS
2644 # The default C compiler.
2647 # Is the compiler the GNU C compiler?
2650 # The linker used to build libraries.
2653 # Whether we need hard or soft links.
2656 # A BSD-compatible nm program.
2659 # A symbol stripping program
2662 # Used to examine libraries when file_magic_cmd begins "file"
2663 MAGIC_CMD=$MAGIC_CMD
2665 # Used on cygwin: DLL creation program.
2668 # Used on cygwin: object dumper.
2671 # Used on cygwin: assembler.
2674 # The name of the directory that contains temporary libtool files.
2677 # How to create reloadable object files.
2678 reload_flag=$lt_reload_flag
2679 reload_cmds=$lt_reload_cmds
2681 # How to pass a linker flag through the compiler.
2684 # Object file suffix (normally "o").
2687 # Old archive suffix (normally "a").
2690 # Executable file suffix (normally "").
2693 # Additional compiler flags for building library objects.
2694 pic_flag=$lt_pic_flag
2697 # Does compiler simultaneously support -c and -o options?
2698 compiler_c_o=$lt_compiler_c_o
2700 # Can we write directly to a .lo ?
2701 compiler_o_lo=$lt_compiler_o_lo
2703 # Must we lock files when doing compilation ?
2704 need_locks=$lt_need_locks
2706 # Do we need the lib prefix for modules?
2707 need_lib_prefix=$need_lib_prefix
2709 # Do we need a version for libraries?
2710 need_version=$need_version
2712 # Whether dlopen is supported.
2713 dlopen_support=$enable_dlopen
2715 # Whether dlopen of programs is supported.
2716 dlopen_self=$enable_dlopen_self
2718 # Whether dlopen of statically linked programs is supported.
2719 dlopen_self_static=$enable_dlopen_self_static
2721 # Compiler flag to prevent dynamic linking.
2722 link_static_flag=$lt_link_static_flag
2724 # Compiler flag to turn off builtin functions.
2725 no_builtin_flag=$lt_no_builtin_flag
2727 # Compiler flag to allow reflexive dlopens.
2728 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2730 # Compiler flag to generate shared objects directly from archives.
2731 whole_archive_flag_spec=$lt_whole_archive_flag_spec
2733 # Compiler flag to generate thread-safe objects.
2734 thread_safe_flag_spec=$lt_thread_safe_flag_spec
2736 # Library versioning type.
2737 version_type=$version_type
2739 # Format of library name prefix.
2740 libname_spec=$lt_libname_spec
2742 # List of archive names. First name is the real one, the rest are links.
2743 # The last name is the one that the linker finds with -lNAME.
2744 library_names_spec=$lt_library_names_spec
2746 # The coded name of the library, if different from the real name.
2747 soname_spec=$lt_soname_spec
2749 # Commands used to build and install an old-style archive.
2751 old_archive_cmds=$lt_old_archive_cmds
2752 old_postinstall_cmds=$lt_old_postinstall_cmds
2753 old_postuninstall_cmds=$lt_old_postuninstall_cmds
2755 # Create an old-style archive from a shared archive.
2756 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
2758 # Create a temporary old-style archive to link instead of a shared archive.
2759 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
2761 # Commands used to build and install a shared archive.
2762 archive_cmds=$lt_archive_cmds
2763 archive_expsym_cmds=$lt_archive_expsym_cmds
2764 postinstall_cmds=$lt_postinstall_cmds
2765 postuninstall_cmds=$lt_postuninstall_cmds
2767 # Commands to strip libraries.
2768 old_striplib=$lt_old_striplib
2769 striplib=$lt_striplib
2771 # Method to check whether dependent libraries are shared objects.
2772 deplibs_check_method=$lt_deplibs_check_method
2774 # Command to use when deplibs_check_method == file_magic.
2775 file_magic_cmd=$lt_file_magic_cmd
2777 # Flag that allows shared libraries with undefined symbols to be built.
2778 allow_undefined_flag=$lt_allow_undefined_flag
2780 # Flag that forces no undefined symbols.
2781 no_undefined_flag=$lt_no_undefined_flag
2783 # Commands used to finish a libtool library installation in a directory.
2784 finish_cmds=$lt_finish_cmds
2786 # Same as above, but a single script fragment to be evaled but not shown.
2787 finish_eval=$lt_finish_eval
2789 # Take the output of nm and produce a listing of raw symbols and C names.
2790 global_symbol_pipe=$lt_global_symbol_pipe
2792 # Transform the output of nm in a proper C declaration
2793 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
2795 # This is the shared library runtime path variable.
2796 runpath_var=$runpath_var
2798 # This is the shared library path variable.
2799 shlibpath_var=$shlibpath_var
2801 # Is shlibpath searched before the hard-coded library search path?
2802 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2804 # How to hardcode a shared library path into an executable.
2805 hardcode_action=$hardcode_action
2807 # Whether we should hardcode library paths into libraries.
2808 hardcode_into_libs=$hardcode_into_libs
2810 # Flag to hardcode \$libdir into a binary during linking.
2811 # This must work even if \$libdir does not exist.
2812 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
2814 # Whether we need a single -rpath flag with a separated argument.
2815 hardcode_libdir_separator=$lt_hardcode_libdir_separator
2817 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2819 hardcode_direct=$hardcode_direct
2821 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2823 hardcode_minus_L=$hardcode_minus_L
2825 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2826 # the resulting binary.
2827 hardcode_shlibpath_var=$hardcode_shlibpath_var
2829 # Variables whose values should be saved in libtool wrapper scripts and
2830 # restored at relink time.
2831 variables_saved_for_relink="$variables_saved_for_relink"
2833 # Whether libtool must link a program against all its dependency libraries.
2834 link_all_deplibs=$link_all_deplibs
2836 # Compile-time system search path for libraries
2837 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
2839 # Run-time system search path for libraries
2840 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
2842 # Fix the shell variable \$srcfile for the compiler.
2843 fix_srcfile_path="$fix_srcfile_path"
2845 # Set to yes if exported symbols are required.
2846 always_export_symbols=$always_export_symbols
2848 # The commands to list exported symbols.
2849 export_symbols_cmds=$lt_export_symbols_cmds
2851 # The commands to extract the exported symbol list from a shared archive.
2852 extract_expsyms_cmds=$lt_extract_expsyms_cmds
2854 # Symbols that should not be listed in the preloaded symbols.
2855 exclude_expsyms=$lt_exclude_expsyms
2857 # Symbols that must always be exported.
2858 include_expsyms=$lt_include_expsyms
2860 # ### END LIBTOOL CONFIG
2866 cat <<\EOF >> "${ofile}T"
2868 # AIX sometimes has problems with the GCC collect2 program. For some
2869 # reason, if we set the COLLECT_NAMES environment variable, the problems
2870 # vanish in a puff of smoke.
2871 if test "X${COLLECT_NAMES+set}" != Xset; then
2873 export COLLECT_NAMES
2880 cygwin* | mingw* | pw32* | os2*)
2881 cat <<'EOF' >> "${ofile}T"
2882 # This is a source program that is used to create dlls on Windows
2883 # Don't remove nor modify the starting and closing comments
2884 # /* ltdll.c starts here */
2885 # #define WIN32_LEAN_AND_MEAN
2886 # #include <windows.h>
2887 # #undef WIN32_LEAN_AND_MEAN
2888 # #include <stdio.h>
2890 # #ifndef __CYGWIN__
2891 # # ifdef __CYGWIN32__
2892 # # define __CYGWIN__ __CYGWIN32__
2896 # #ifdef __cplusplus
2899 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2900 # #ifdef __cplusplus
2905 # #include <cygwin/cygwin_dll.h>
2906 # DECLARE_CYGWIN_DLL( DllMain );
2908 # HINSTANCE __hDllInstance_base;
2911 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2913 # __hDllInstance_base = hInst;
2916 # /* ltdll.c ends here */
2917 # This is a source program that is used to create import libraries
2918 # on Windows for dlls which lack them. Don't remove nor modify the
2919 # starting and closing comments
2920 # /* impgen.c starts here */
2921 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2923 # This file is part of GNU libtool.
2925 # This program is free software; you can redistribute it and/or modify
2926 # it under the terms of the GNU General Public License as published by
2927 # the Free Software Foundation; either version 2 of the License, or
2928 # (at your option) any later version.
2930 # This program is distributed in the hope that it will be useful,
2931 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2932 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2933 # GNU General Public License for more details.
2935 # You should have received a copy of the GNU General Public License
2936 # along with this program; if not, write to the Free Software
2937 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2940 # #include <stdio.h> /* for printf() */
2941 # #include <unistd.h> /* for open(), lseek(), read() */
2942 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2943 # #include <string.h> /* for strdup() */
2945 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
2947 # #define O_BINARY 0
2950 # static unsigned int
2951 # pe_get16 (fd, offset)
2955 # unsigned char b[2];
2956 # lseek (fd, offset, SEEK_SET);
2958 # return b[0] + (b[1]<<8);
2961 # static unsigned int
2962 # pe_get32 (fd, offset)
2966 # unsigned char b[4];
2967 # lseek (fd, offset, SEEK_SET);
2969 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2972 # static unsigned int
2976 # unsigned char *b = ptr;
2977 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2986 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2987 # unsigned long export_rva, export_size, nsections, secptr, expptr;
2988 # unsigned long name_rvas, nexp;
2989 # unsigned char *expdata, *erva;
2990 # char *filename, *dll_name;
2992 # filename = argv[1];
2994 # dll = open(filename, O_RDONLY|O_BINARY);
2998 # dll_name = filename;
3000 # for (i=0; filename[i]; i++)
3001 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3002 # dll_name = filename + i +1;
3004 # pe_header_offset = pe_get32 (dll, 0x3c);
3005 # opthdr_ofs = pe_header_offset + 4 + 20;
3006 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3008 # if (num_entries < 1) /* no exports */
3011 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3012 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3013 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3014 # secptr = (pe_header_offset + 4 + 20 +
3015 # pe_get16 (dll, pe_header_offset + 4 + 16));
3018 # for (i = 0; i < nsections; i++)
3021 # unsigned long secptr1 = secptr + 40 * i;
3022 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3023 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3024 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3025 # lseek(dll, secptr1, SEEK_SET);
3026 # read(dll, sname, 8);
3027 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3029 # expptr = fptr + (export_rva - vaddr);
3030 # if (export_rva + export_size > vaddr + vsize)
3031 # export_size = vsize - (export_rva - vaddr);
3036 # expdata = (unsigned char*)malloc(export_size);
3037 # lseek (dll, expptr, SEEK_SET);
3038 # read (dll, expdata, export_size);
3039 # erva = expdata - export_rva;
3041 # nexp = pe_as32 (expdata+24);
3042 # name_rvas = pe_as32 (expdata+32);
3044 # printf ("EXPORTS\n");
3045 # for (i = 0; i<nexp; i++)
3047 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3048 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3053 # /* impgen.c ends here */
3059 # We use sed instead of cat because bash on DJGPP gets confused if
3060 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3061 # text mode, it properly converts lines to CR/LF. This bash problem
3062 # is reportedly fixed, but why not run on old versions too?
3063 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3065 mv -f "${ofile}T" "$ofile" || \
3066 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3072 ])# _LT_AC_LTCONFIG_HACK
3074 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3075 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3077 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3078 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3080 # AC_ENABLE_SHARED - implement the --enable-shared flag
3081 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3082 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3084 AC_DEFUN([AC_ENABLE_SHARED],
3085 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3086 AC_ARG_ENABLE(shared,
3087 changequote(<<, >>)dnl
3088 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3089 changequote([, ])dnl
3090 [p=${PACKAGE-default}
3092 yes) enable_shared=yes ;;
3093 no) enable_shared=no ;;
3096 # Look at the argument we got. We use all the common list separators.
3097 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3098 for pkg in $enableval; do
3099 if test "X$pkg" = "X$p"; then
3106 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3109 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3110 AC_DEFUN([AC_DISABLE_SHARED],
3111 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3112 AC_ENABLE_SHARED(no)])
3114 # AC_ENABLE_STATIC - implement the --enable-static flag
3115 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3116 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3118 AC_DEFUN([AC_ENABLE_STATIC],
3119 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3120 AC_ARG_ENABLE(static,
3121 changequote(<<, >>)dnl
3122 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3123 changequote([, ])dnl
3124 [p=${PACKAGE-default}
3126 yes) enable_static=yes ;;
3127 no) enable_static=no ;;
3130 # Look at the argument we got. We use all the common list separators.
3131 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3132 for pkg in $enableval; do
3133 if test "X$pkg" = "X$p"; then
3140 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3143 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3144 AC_DEFUN([AC_DISABLE_STATIC],
3145 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3146 AC_ENABLE_STATIC(no)])
3149 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3150 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3151 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3153 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3154 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3155 AC_ARG_ENABLE(fast-install,
3156 changequote(<<, >>)dnl
3157 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3158 changequote([, ])dnl
3159 [p=${PACKAGE-default}
3161 yes) enable_fast_install=yes ;;
3162 no) enable_fast_install=no ;;
3164 enable_fast_install=no
3165 # Look at the argument we got. We use all the common list separators.
3166 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3167 for pkg in $enableval; do
3168 if test "X$pkg" = "X$p"; then
3169 enable_fast_install=yes
3175 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3178 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3179 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3180 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3181 AC_ENABLE_FAST_INSTALL(no)])
3183 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3184 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3185 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3187 AC_DEFUN([AC_LIBTOOL_PICMODE],
3188 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3189 pic_mode=ifelse($#,1,$1,default)])
3192 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3193 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3194 [AC_MSG_CHECKING([for $1])
3195 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3198 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3201 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3204 ac_save_MAGIC_CMD="$MAGIC_CMD"
3205 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3206 dnl $ac_dummy forces splitting on constant user-supplied paths.
3207 dnl POSIX.2 word splitting is done only on the output of word expansions,
3208 dnl not every word. This closes a longstanding sh security hole.
3209 ac_dummy="ifelse([$2], , $PATH, [$2])"
3210 for ac_dir in $ac_dummy; do
3211 test -z "$ac_dir" && ac_dir=.
3212 if test -f $ac_dir/$1; then
3213 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3214 if test -n "$file_magic_test_file"; then
3215 case $deplibs_check_method in
3217 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3218 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3219 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3220 egrep "$file_magic_regex" > /dev/null; then
3225 *** Warning: the command libtool uses to detect shared libraries,
3226 *** $file_magic_cmd, produces output that libtool cannot recognize.
3227 *** The result is that libtool may fail to recognize shared libraries
3228 *** as such. This will affect the creation of libtool libraries that
3229 *** depend on shared libraries, but programs linked with such libtool
3230 *** libraries will work regardless of this problem. Nevertheless, you
3231 *** may want to report the problem to your system manager and/or to
3232 *** bug-libtool@gnu.org
3242 MAGIC_CMD="$ac_save_MAGIC_CMD"
3245 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3246 if test -n "$MAGIC_CMD"; then
3247 AC_MSG_RESULT($MAGIC_CMD)
3254 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3255 AC_DEFUN([AC_PATH_MAGIC],
3256 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3257 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3258 if test -z "$lt_cv_path_MAGIC_CMD"; then
3259 if test -n "$ac_tool_prefix"; then
3260 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3268 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3269 AC_DEFUN([AC_PROG_LD],
3270 [AC_ARG_WITH(gnu-ld,
3271 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3272 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3273 AC_REQUIRE([AC_PROG_CC])dnl
3274 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3275 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3277 if test "$GCC" = yes; then
3278 # Check if gcc -print-prog-name=ld gives a path.
3279 AC_MSG_CHECKING([for ld used by GCC])
3282 # gcc leaves a trailing carriage return which upsets mingw
3283 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3285 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3288 # Accept absolute paths.
3289 [[\\/]* | [A-Za-z]:[\\/]*)]
3290 [re_direlt='/[^/][^/]*/\.\./']
3291 # Canonicalize the path of ld
3292 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3293 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3294 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3296 test -z "$LD" && LD="$ac_prog"
3299 # If it fails, then pretend we aren't using GCC.
3303 # If it is relative, then search for the first ld in PATH.
3307 elif test "$with_gnu_ld" = yes; then
3308 AC_MSG_CHECKING([for GNU ld])
3310 AC_MSG_CHECKING([for non-GNU ld])
3312 AC_CACHE_VAL(lt_cv_path_LD,
3313 [if test -z "$LD"; then
3314 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3315 for ac_dir in $PATH; do
3316 test -z "$ac_dir" && ac_dir=.
3317 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3318 lt_cv_path_LD="$ac_dir/$ac_prog"
3319 # Check to see if the program is GNU ld. I'd rather use --version,
3320 # but apparently some GNU ld's only accept -v.
3321 # Break only if it was the GNU/non-GNU ld that we prefer.
3322 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3323 test "$with_gnu_ld" != no && break
3325 test "$with_gnu_ld" != yes && break
3331 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3334 if test -n "$LD"; then
3339 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3344 AC_DEFUN([AC_PROG_LD_GNU],
3345 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3346 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3347 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3348 lt_cv_prog_gnu_ld=yes
3350 lt_cv_prog_gnu_ld=no
3352 with_gnu_ld=$lt_cv_prog_gnu_ld
3355 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3356 # -- PORTME Some linkers may need a different reload flag.
3357 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3358 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3359 [lt_cv_ld_reload_flag='-r'])
3360 reload_flag=$lt_cv_ld_reload_flag
3361 test -n "$reload_flag" && reload_flag=" $reload_flag"
3364 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3365 # -- PORTME fill in with the dynamic library characteristics
3366 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3367 [AC_CACHE_CHECK([how to recognise dependant libraries],
3368 lt_cv_deplibs_check_method,
3369 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3370 lt_cv_file_magic_test_file=
3371 lt_cv_deplibs_check_method='unknown'
3372 # Need to set the preceding variable on all platforms that support
3373 # interlibrary dependencies.
3374 # 'none' -- dependencies not supported.
3375 # `unknown' -- same as none, but documents that we really don't know.
3376 # 'pass_all' -- all dependencies passed with no checks.
3377 # 'test_compile' -- check by making test program.
3378 # ['file_magic [regex]'] -- check by looking for files in library path
3379 # which responds to the $file_magic_cmd with a given egrep regex.
3380 # If you have `file' or equivalent on your system and you're not sure
3381 # whether `pass_all' will *always* work, you probably want this one.
3385 lt_cv_deplibs_check_method=pass_all
3389 lt_cv_deplibs_check_method=pass_all
3393 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
3394 lt_cv_file_magic_cmd='/usr/bin/file -L'
3395 lt_cv_file_magic_test_file=/shlib/libc.so
3398 cygwin* | mingw* | pw32*)
3399 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3400 lt_cv_file_magic_cmd='$OBJDUMP -f'
3403 darwin* | rhapsody*)
3404 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3405 lt_cv_file_magic_cmd='/usr/bin/file -L'
3407 rhapsody* | darwin1.[012])
3408 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3411 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3417 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3420 # Not sure whether the presence of OpenBSD here was a mistake.
3421 # Let's accept both of them until this is cleared up.
3422 [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
3423 lt_cv_file_magic_cmd=/usr/bin/file
3424 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3428 lt_cv_deplibs_check_method=pass_all
3433 lt_cv_deplibs_check_method=pass_all
3437 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
3438 lt_cv_file_magic_cmd=/usr/bin/file
3439 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3445 # this will be overridden with pass_all, but let us keep it just in case
3446 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3450 *-32|*"-32 ") libmagic=32-bit;;
3451 *-n32|*"-n32 ") libmagic=N32;;
3452 *-64|*"-64 ") libmagic=64-bit;;
3453 *) libmagic=never-match;;
3455 # this will be overridden with pass_all, but let us keep it just in case
3456 [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
3459 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3460 lt_cv_deplibs_check_method=pass_all
3463 # This must be Linux ELF.
3466 alpha* | i*86 | powerpc* | sparc* | ia64* )
3467 lt_cv_deplibs_check_method=pass_all ;;
3469 # glibc up to 2.1.1 does not perform some relocations on ARM
3470 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
3472 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3476 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3477 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
3479 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
3484 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
3485 lt_cv_file_magic_cmd=/usr/bin/file
3486 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3489 osf3* | osf4* | osf5*)
3490 # this will be overridden with pass_all, but let us keep it just in case
3491 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3492 lt_cv_file_magic_test_file=/shlib/libc.so
3493 lt_cv_deplibs_check_method=pass_all
3497 lt_cv_deplibs_check_method=pass_all
3501 lt_cv_deplibs_check_method=pass_all
3502 lt_cv_file_magic_test_file=/lib/libc.so
3505 [sysv5uw[78]* | sysv4*uw2*)]
3506 lt_cv_deplibs_check_method=pass_all
3509 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3510 case $host_vendor in
3512 [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]']
3513 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3516 lt_cv_deplibs_check_method=pass_all
3519 lt_cv_file_magic_cmd='/bin/file'
3520 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
3523 lt_cv_file_magic_cmd='/bin/file'
3524 [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
3525 lt_cv_file_magic_test_file=/lib/libc.so
3531 file_magic_cmd=$lt_cv_file_magic_cmd
3532 deplibs_check_method=$lt_cv_deplibs_check_method
3536 # AC_PROG_NM - find the path to a BSD-compatible name lister
3537 AC_DEFUN([AC_PROG_NM],
3538 [AC_MSG_CHECKING([for BSD-compatible nm])
3539 AC_CACHE_VAL(lt_cv_path_NM,
3540 [if test -n "$NM"; then
3541 # Let the user override the test.
3544 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3545 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3546 test -z "$ac_dir" && ac_dir=.
3547 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3548 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3549 # Check to see if the nm accepts a BSD-compat flag.
3550 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3551 # nm: unknown option "B" ignored
3552 # Tru64's nm complains that /dev/null is an invalid object file
3553 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3554 lt_cv_path_NM="$tmp_nm -B"
3556 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3557 lt_cv_path_NM="$tmp_nm -p"
3560 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3561 continue # so that we can try to find one that supports BSD flags
3566 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3569 AC_MSG_RESULT([$NM])
3572 # AC_CHECK_LIBM - check for math library
3573 AC_DEFUN([AC_CHECK_LIBM],
3574 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3577 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3578 # These system don't have libm
3581 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3582 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3585 AC_CHECK_LIB(m, main, LIBM="-lm")
3590 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3591 # the libltdl convenience library and INCLTDL to the include flags for
3592 # the libltdl header and adds --enable-ltdl-convenience to the
3593 # configure arguments. Note that LIBLTDL and INCLTDL are not
3594 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3595 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3596 # with '${top_builddir}/' and INCLTDL will be prefixed with
3597 # '${top_srcdir}/' (note the single quotes!). If your package is not
3598 # flat and you're not using automake, define top_builddir and
3599 # top_srcdir appropriately in the Makefiles.
3600 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3601 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3602 case $enable_ltdl_convenience in
3603 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3604 "") enable_ltdl_convenience=yes
3605 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3607 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3608 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3611 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3612 # the libltdl installable library and INCLTDL to the include flags for
3613 # the libltdl header and adds --enable-ltdl-install to the configure
3614 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
3615 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3616 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3617 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
3618 # with '${top_srcdir}/' (note the single quotes!). If your package is
3619 # not flat and you're not using automake, define top_builddir and
3620 # top_srcdir appropriately in the Makefiles.
3621 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3622 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3623 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3624 AC_CHECK_LIB(ltdl, main,
3625 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3626 [if test x"$enable_ltdl_install" = xno; then
3627 AC_MSG_WARN([libltdl not installed, but installation disabled])
3629 enable_ltdl_install=yes
3632 if test x"$enable_ltdl_install" = x"yes"; then
3633 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3634 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3635 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3637 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3644 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3645 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3646 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3647 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3648 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3649 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3650 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3652 # This is just to silence aclocal about the macro not being used
3653 ifelse([AC_DISABLE_FAST_INSTALL])
3655 # -- embedded libtool.m4 ends here --