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,
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
283 AC_DEFUN([AC_PROG_LIBTOOL],
284 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
286 # This can be used to rebuild libtool when needed
287 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
289 # Always use our own libtool.
290 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
293 # Prevent multiple expansion
294 define([AC_PROG_LIBTOOL], [])
297 AC_DEFUN([AC_LIBTOOL_SETUP],
299 AC_REQUIRE([AC_ENABLE_SHARED])dnl
300 AC_REQUIRE([AC_ENABLE_STATIC])dnl
301 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
302 AC_REQUIRE([AC_CANONICAL_HOST])dnl
303 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
304 AC_REQUIRE([AC_PROG_CC])dnl
305 AC_REQUIRE([AC_PROG_LD])dnl
306 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
307 AC_REQUIRE([AC_PROG_NM])dnl
308 AC_REQUIRE([AC_PROG_LN_S])dnl
309 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
310 AC_REQUIRE([AC_OBJEXT])dnl
311 AC_REQUIRE([AC_EXEEXT])dnl
314 _LT_AC_PROG_ECHO_BACKSLASH
315 # Only perform the check for file, if the check method requires it
316 case $deplibs_check_method in
318 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
324 AC_CHECK_TOOL(RANLIB, ranlib, :)
325 AC_CHECK_TOOL(STRIP, strip, :)
327 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
328 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
329 enable_win32_dll=yes, enable_win32_dll=no)
331 AC_ARG_ENABLE(libtool-lock,
332 [ --disable-libtool-lock avoid locking (might break parallel builds)])
333 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
335 # Some flags need to be propagated to the compiler or linker for good
339 # Find out which ABI we are using.
340 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
341 if AC_TRY_EVAL(ac_compile); then
342 case `/usr/bin/file conftest.$ac_objext` in
358 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
359 SAVE_CFLAGS="$CFLAGS"
360 CFLAGS="$CFLAGS -belf"
361 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
364 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
366 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
367 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
368 CFLAGS="$SAVE_CFLAGS"
372 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
373 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
374 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
375 AC_CHECK_TOOL(AS, as, false)
376 AC_CHECK_TOOL(OBJDUMP, objdump, false)
378 # recent cygwin and mingw systems supply a stub DllMain which the user
379 # can override, but on older systems we have to supply one
380 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
382 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
384 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
387 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
388 # old mingw systems require "-dll" to link a DLL, while more recent ones
390 SAVE_CFLAGS="$CFLAGS"
391 CFLAGS="$CFLAGS -mdll"
392 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
393 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
394 CFLAGS="$SAVE_CFLAGS" ;;
395 *-*-cygwin* | *-*-pw32*)
396 # cygwin systems need to pass --dll to the linker, and not link
397 # crt.o which will require a WinMain@16 definition.
398 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
408 # AC_LIBTOOL_HEADER_ASSERT
409 # ------------------------
410 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
411 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
412 [lt_cv_func_assert_works],
415 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
416 case `$CC --version 2>/dev/null` in
417 [[12]].*) lt_cv_func_assert_works=no ;;
418 *) lt_cv_func_assert_works=yes ;;
424 if test "x$lt_cv_func_assert_works" = xyes; then
425 AC_CHECK_HEADERS(assert.h)
427 ])# AC_LIBTOOL_HEADER_ASSERT
430 # --------------------
431 AC_DEFUN([_LT_AC_CHECK_DLFCN],
432 [AC_CHECK_HEADERS(dlfcn.h)
433 ])# _LT_AC_CHECK_DLFCN
435 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
436 # ---------------------------------
437 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
438 [AC_REQUIRE([AC_CANONICAL_HOST])
439 AC_REQUIRE([AC_PROG_NM])
440 AC_REQUIRE([AC_OBJEXT])
441 # Check for command to grab the raw symbol name followed by C symbol from nm.
442 AC_MSG_CHECKING([command to parse $NM output])
443 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
445 # These are sane defaults that work on at least a few old systems.
446 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
448 # Character class describing NM global symbol codes.
449 symcode='[[BCDEGRST]]'
451 # Regexp to match symbols that can be accessed directly from C.
452 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
454 # Transform the above into a raw symbol and a C symbol.
457 # Transform an extracted symbol line into a proper C declaration
458 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
460 # Transform an extracted symbol line into symbol name and symbol address
461 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
463 # Define system-specific variables.
468 cygwin* | mingw* | pw32*)
469 symcode='[[ABCDGISTW]]'
471 hpux*) # Its linker distinguishes data from code symbols
472 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
473 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
476 symcode='[[BCDEGRST]]'
486 # Handle CRLF in mingw tool chain
490 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
494 # If we're using GNU nm, then use its standard symbol codes.
495 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
496 symcode='[[ABCDGISTW]]'
499 # Try without a prefix undercore, then with it.
500 for ac_symprfx in "" "_"; do
502 # Write the raw and C identifiers.
503 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
505 # Check to see that the pipe works correctly.
508 cat > conftest.$ac_ext <<EOF
513 void nm_test_func(){}
517 int main(){nm_test_var='a';nm_test_func();return(0);}
520 if AC_TRY_EVAL(ac_compile); then
521 # Now try to grab the symbols.
523 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
524 # Try sorting and uniquifying the output.
525 if sort "$nlist" | uniq > "$nlist"T; then
526 mv -f "$nlist"T "$nlist"
531 # Make sure that we snagged all the symbols we need.
532 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
533 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
534 cat <<EOF > conftest.$ac_ext
540 # Now generate the symbol file.
541 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
543 cat <<EOF >> conftest.$ac_ext
544 #if defined (__STDC__) && __STDC__
545 # define lt_ptr void *
547 # define lt_ptr char *
551 /* The mapping between symbol names and symbols. */
556 lt_preloaded_symbols[[]] =
559 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
560 cat <<\EOF >> conftest.$ac_ext
568 # Now try linking the two files.
569 mv conftest.$ac_objext conftstm.$ac_objext
571 save_CFLAGS="$CFLAGS"
572 LIBS="conftstm.$ac_objext"
573 CFLAGS="$CFLAGS$no_builtin_flag"
574 if AC_TRY_EVAL(ac_link) && test -s conftest; then
578 CFLAGS="$save_CFLAGS"
580 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
583 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
586 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
589 echo "$progname: failed program was:" >&AC_FD_CC
590 cat conftest.$ac_ext >&5
592 rm -f conftest* conftst*
594 # Do not use the global_symbol_pipe unless it works.
595 if test "$pipe_works" = yes; then
598 lt_cv_sys_global_symbol_pipe=
602 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
603 if test -z "$lt_cv_sys_global_symbol_pipe"; then
604 global_symbol_to_cdecl=
605 global_symbol_to_c_name_address=
607 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
608 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
610 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
612 AC_MSG_RESULT(failed)
616 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
618 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
619 # ---------------------------------
620 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
621 [# Find the correct PATH separator. Usually this is `:', but
622 # DJGPP uses `;' like DOS.
623 if test "X${PATH_SEPARATOR+set}" != Xset; then
624 UNAME=${UNAME-`uname 2>/dev/null`}
626 *-DOS) lt_cv_sys_path_separator=';' ;;
627 *) lt_cv_sys_path_separator=':' ;;
629 PATH_SEPARATOR=$lt_cv_sys_path_separator
631 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
633 # _LT_AC_PROG_ECHO_BACKSLASH
634 # --------------------------
635 # Add some code to the start of the generated configure script which
636 # will find an echo command which doesn't interpret backslashes.
637 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
638 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
639 [AC_DIVERT_PUSH(NOTICE)])
640 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
642 # Check that we are running under the correct shell.
643 SHELL=${CONFIG_SHELL-/bin/sh}
647 # Remove one level of quotation (which was required for Make).
648 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
653 if test "X[$]1" = X--no-reexec; then
654 # Discard the --no-reexec flag, and continue.
656 elif test "X[$]1" = X--fallback-echo; then
657 # Avoid inline document here, it may be left over
659 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
660 # Yippee, $echo works!
663 # Restart under the correct shell.
664 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
667 if test "X[$]1" = X--fallback-echo; then
668 # used as fallback echo
676 # The HP-UX ksh and POSIX shell print the target directory to stdout
678 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
680 if test -z "$ECHO"; then
681 if test "X${echo_test_string+set}" != Xset; then
682 # find a string as large as possible, as long as the shell can cope with it
683 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
684 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
685 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
686 echo_test_string="`eval $cmd`" &&
687 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
694 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
695 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
696 test "X$echo_testing_string" = "X$echo_test_string"; then
699 # The Solaris, AIX, and Digital Unix default echo programs unquote
700 # backslashes. This makes it impossible to quote backslashes using
701 # echo "$something" | sed 's/\\/\\\\/g'
703 # So, first we look for a working echo in the user's PATH.
705 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
706 for dir in $PATH /usr/ucb; do
707 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
708 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
709 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
710 test "X$echo_testing_string" = "X$echo_test_string"; then
717 if test "X$echo" = Xecho; then
718 # We didn't find a better echo, so look for alternatives.
719 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
720 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
721 test "X$echo_testing_string" = "X$echo_test_string"; then
722 # This shell has a builtin print -r that does the trick.
724 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
725 test "X$CONFIG_SHELL" != X/bin/ksh; then
726 # If we have ksh, try running configure again with it.
727 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
728 export ORIGINAL_CONFIG_SHELL
729 CONFIG_SHELL=/bin/ksh
731 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
735 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
736 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
737 test "X$echo_testing_string" = "X$echo_test_string"; then
740 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
741 test "X$echo_testing_string" = 'X\t' &&
742 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
743 test "X$echo_testing_string" = "X$echo_test_string"; then
744 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
746 SHELL="$CONFIG_SHELL"
748 echo="$CONFIG_SHELL [$]0 --fallback-echo"
749 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
750 test "X$echo_testing_string" = 'X\t' &&
751 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
752 test "X$echo_testing_string" = "X$echo_test_string"; then
753 echo="$CONFIG_SHELL [$]0 --fallback-echo"
755 # maybe with a smaller string...
758 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
759 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
766 if test "$prev" != 'sed 50q "[$]0"'; then
767 echo_test_string=`eval $prev`
768 export echo_test_string
769 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
771 # Oops. We lost completely, so just stick with echo.
780 # Copy echo and quote the copy suitably for passing to libtool from
781 # the Makefile, instead of quoting the original, which is used later.
783 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
784 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
789 ])# _LT_AC_PROG_ECHO_BACKSLASH
791 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
792 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
793 # ------------------------------------------------------------------
794 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
795 [if test "$cross_compiling" = yes; then :
798 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
799 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
800 lt_status=$lt_dlunknown
801 cat > conftest.$ac_ext <<EOF
802 [#line __oline__ "configure"
803 #include "confdefs.h"
812 # define LT_DLGLOBAL RTLD_GLOBAL
815 # define LT_DLGLOBAL DL_GLOBAL
817 # define LT_DLGLOBAL 0
821 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
822 find out it does not work in some platform. */
823 #ifndef LT_DLLAZY_OR_NOW
825 # define LT_DLLAZY_OR_NOW RTLD_LAZY
828 # define LT_DLLAZY_OR_NOW DL_LAZY
831 # define LT_DLLAZY_OR_NOW RTLD_NOW
834 # define LT_DLLAZY_OR_NOW DL_NOW
836 # define LT_DLLAZY_OR_NOW 0
844 extern "C" void exit (int);
847 void fnord() { int i=42;}
850 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
851 int status = $lt_dlunknown;
855 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
856 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
857 /* dlclose (self); */
863 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
864 (./conftest; exit; ) 2>/dev/null
867 x$lt_dlno_uscore) $1 ;;
868 x$lt_dlneed_uscore) $2 ;;
869 x$lt_unknown|x*) $3 ;;
877 ])# _LT_AC_TRY_DLOPEN_SELF
879 # AC_LIBTOOL_DLOPEN_SELF
880 # -------------------
881 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
882 [if test "x$enable_dlopen" != xyes; then
883 enable_dlopen=unknown
884 enable_dlopen_self=unknown
885 enable_dlopen_self_static=unknown
892 lt_cv_dlopen="load_add_on"
894 lt_cv_dlopen_self=yes
897 cygwin* | mingw* | pw32*)
898 lt_cv_dlopen="LoadLibrary"
903 AC_CHECK_FUNC([shl_load],
904 [lt_cv_dlopen="shl_load"],
905 [AC_CHECK_LIB([dld], [shl_load],
906 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
907 [AC_CHECK_FUNC([dlopen],
908 [lt_cv_dlopen="dlopen"],
909 [AC_CHECK_LIB([dl], [dlopen],
910 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
911 [AC_CHECK_LIB([svld], [dlopen],
912 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
913 [AC_CHECK_LIB([dld], [dld_link],
914 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
923 if test "x$lt_cv_dlopen" != xno; then
929 case $lt_cv_dlopen in
931 save_CPPFLAGS="$CPPFLAGS"
932 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
933 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
935 save_LDFLAGS="$LDFLAGS"
936 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
939 LIBS="$lt_cv_dlopen_libs $LIBS"
941 AC_CACHE_CHECK([whether a program can dlopen itself],
942 lt_cv_dlopen_self, [dnl
943 _LT_AC_TRY_DLOPEN_SELF(
944 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
945 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
948 if test "x$lt_cv_dlopen_self" = xyes; then
949 LDFLAGS="$LDFLAGS $link_static_flag"
950 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
951 lt_cv_dlopen_self_static, [dnl
952 _LT_AC_TRY_DLOPEN_SELF(
953 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
954 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
958 CPPFLAGS="$save_CPPFLAGS"
959 LDFLAGS="$save_LDFLAGS"
964 case $lt_cv_dlopen_self in
965 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
966 *) enable_dlopen_self=unknown ;;
969 case $lt_cv_dlopen_self_static in
970 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
971 *) enable_dlopen_self_static=unknown ;;
974 ])# AC_LIBTOOL_DLOPEN_SELF
976 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
977 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
978 # Sed substitution that helps us do robust quoting. It backslashifies
979 # metacharacters that are still active within double-quoted strings.
981 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
983 # Same as above, but do not quote variable references.
984 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
986 # Sed substitution to delay expansion of an escaped shell variable in a
987 # double_quote_subst'ed string.
988 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
994 default_ofile=libtool
997 # All known linkers require a `.a' archive for static linking (except M$VC,
998 # which needs '.lib').
1000 ltmain="$ac_aux_dir/ltmain.sh"
1001 ofile="$default_ofile"
1002 with_gnu_ld="$lt_cv_prog_gnu_ld"
1003 need_locks="$enable_libtool_lock"
1006 old_CFLAGS="$CFLAGS"
1008 # Set sane defaults for various variables
1009 test -z "$AR" && AR=ar
1010 test -z "$AR_FLAGS" && AR_FLAGS=cru
1011 test -z "$AS" && AS=as
1012 test -z "$CC" && CC=cc
1013 test -z "$DLLTOOL" && DLLTOOL=dlltool
1014 test -z "$LD" && LD=ld
1015 test -z "$LN_S" && LN_S="ln -s"
1016 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1017 test -z "$NM" && NM=nm
1018 test -z "$OBJDUMP" && OBJDUMP=objdump
1019 test -z "$RANLIB" && RANLIB=:
1020 test -z "$STRIP" && STRIP=:
1021 test -z "$ac_objext" && ac_objext=o
1023 if test x"$host" != x"$build"; then
1024 ac_tool_prefix=${host_alias}-
1029 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1032 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1037 # AIX sometimes has problems with the GCC collect2 program. For some
1038 # reason, if we set the COLLECT_NAMES environment variable, the problems
1039 # vanish in a puff of smoke.
1040 if test "X${COLLECT_NAMES+set}" != Xset; then
1042 export COLLECT_NAMES
1047 # Determine commands to create old-style static archives.
1048 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1049 old_postinstall_cmds='chmod 644 $oldlib'
1050 old_postuninstall_cmds=
1052 if test -n "$RANLIB"; then
1055 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1058 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1061 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1064 # Allow CC to be a program name with arguments.
1068 ## FIXME: this should be a separate macro
1070 AC_MSG_CHECKING([for objdir])
1071 rm -f .libs 2>/dev/null
1072 mkdir .libs 2>/dev/null
1073 if test -d .libs; then
1076 # MS-DOS does not allow filenames that begin with a dot.
1079 rmdir .libs 2>/dev/null
1080 AC_MSG_RESULT($objdir)
1085 ## FIXME: this should be a separate macro
1088 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1089 pic_mode="$withval", pic_mode=default)
1090 test -z "$pic_mode" && pic_mode=default
1092 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1093 # in isolation, and that seeing it set (from the cache) indicates that
1094 # the associated values are set (in the cache) correctly too.
1095 AC_MSG_CHECKING([for $compiler option to produce PIC])
1096 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1097 [ lt_cv_prog_cc_pic=
1098 lt_cv_prog_cc_shlib=
1100 lt_cv_prog_cc_static=
1101 lt_cv_prog_cc_no_builtin=
1102 lt_cv_prog_cc_can_build_shared=$can_build_shared
1104 if test "$GCC" = yes; then
1105 lt_cv_prog_cc_wl='-Wl,'
1106 lt_cv_prog_cc_static='-static'
1110 # Below there is a dirty hack to force normal static linking with -ldl
1111 # The problem is because libdl dynamically linked with both libc and
1112 # libC (AIX C++ library), which obviously doesn't included in libraries
1113 # list by gcc. This cause undefined symbols with -static flags.
1114 # This hack allows C programs to be linked with "-static -ldl", but
1115 # not sure about C++ programs.
1116 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1119 # FIXME: we need at least 68020 code to build shared libraries, but
1120 # adding the `-m68020' flag to GCC prevents building anything better,
1122 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1124 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1125 # PIC is the default for these OSes.
1127 darwin* | rhapsody*)
1128 # PIC is the default on this platform
1129 # Common symbols not allowed in MH_DYLIB files
1130 lt_cv_prog_cc_pic='-fno-common'
1132 cygwin* | mingw* | pw32* | os2*)
1133 # This hack is so that the source file can tell whether it is being
1134 # built for inclusion in a dll (and should export symbols for example).
1135 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1138 if test -d /usr/nec; then
1139 lt_cv_prog_cc_pic=-Kconform_pic
1143 lt_cv_prog_cc_pic='-fPIC'
1147 # PORTME Check for PIC flags for the system compiler.
1149 aix3* | aix4* | aix5*)
1150 lt_cv_prog_cc_wl='-Wl,'
1151 # All AIX code is PIC.
1152 if test "$host_cpu" = ia64; then
1153 # AIX 5 now supports IA64 processor
1154 lt_cv_prog_cc_static='-Bstatic'
1156 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1160 hpux9* | hpux10* | hpux11*)
1161 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1162 lt_cv_prog_cc_wl='-Wl,'
1163 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1164 lt_cv_prog_cc_pic='+Z'
1168 lt_cv_prog_cc_wl='-Wl,'
1169 lt_cv_prog_cc_static='-non_shared'
1170 # PIC (with -KPIC) is the default.
1173 cygwin* | mingw* | pw32* | os2*)
1174 # This hack is so that the source file can tell whether it is being
1175 # built for inclusion in a dll (and should export symbols for example).
1176 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1180 lt_cv_prog_cc_pic='-KPIC'
1181 lt_cv_prog_cc_static='-Bstatic'
1184 osf3* | osf4* | osf5*)
1185 # All OSF/1 code is PIC.
1186 lt_cv_prog_cc_wl='-Wl,'
1187 lt_cv_prog_cc_static='-non_shared'
1191 lt_cv_prog_cc_pic='-Kpic'
1192 lt_cv_prog_cc_static='-dn'
1193 lt_cv_prog_cc_shlib='-belf'
1197 lt_cv_prog_cc_pic='-KPIC'
1198 lt_cv_prog_cc_static='-Bstatic'
1199 lt_cv_prog_cc_wl='-Wl,'
1203 lt_cv_prog_cc_pic='-PIC'
1204 lt_cv_prog_cc_static='-Bstatic'
1205 lt_cv_prog_cc_wl='-Qoption ld '
1208 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1209 lt_cv_prog_cc_pic='-KPIC'
1210 lt_cv_prog_cc_static='-Bstatic'
1211 if test "x$host_vendor" = xsni; then
1212 lt_cv_prog_cc_wl='-LD'
1214 lt_cv_prog_cc_wl='-Wl,'
1219 lt_cv_prog_cc_pic='-pic'
1220 lt_cv_prog_cc_static='-Bstatic'
1224 if test -d /usr/nec ;then
1225 lt_cv_prog_cc_pic='-Kconform_pic'
1226 lt_cv_prog_cc_static='-Bstatic'
1231 lt_cv_prog_cc_can_build_shared=no
1236 if test -z "$lt_cv_prog_cc_pic"; then
1237 AC_MSG_RESULT([none])
1239 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1241 # Check to make sure the pic_flag actually works.
1242 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1243 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1244 save_CFLAGS="$CFLAGS"
1245 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1246 AC_TRY_COMPILE([], [], [dnl
1248 hpux9* | hpux10* | hpux11*)
1249 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1250 # they create non-PIC objects. So, if there were any warnings, we
1251 # assume that PIC is not supported.
1252 if test -s conftest.err; then
1253 lt_cv_prog_cc_pic_works=no
1255 lt_cv_prog_cc_pic_works=yes
1259 lt_cv_prog_cc_pic_works=yes
1263 lt_cv_prog_cc_pic_works=no
1265 CFLAGS="$save_CFLAGS"
1268 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1270 lt_cv_prog_cc_can_build_shared=no
1272 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1275 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1280 # Check for any special shared library compilation flags.
1281 if test -n "$lt_cv_prog_cc_shlib"; then
1282 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1283 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1285 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1286 lt_cv_prog_cc_can_build_shared=no
1290 ## FIXME: this should be a separate macro
1292 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1293 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1294 lt_cv_prog_cc_static_works=no
1295 save_LDFLAGS="$LDFLAGS"
1296 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1297 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1298 LDFLAGS="$save_LDFLAGS"
1301 # Belt *and* braces to stop my trousers falling down:
1302 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1303 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1305 pic_flag="$lt_cv_prog_cc_pic"
1306 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1307 wl="$lt_cv_prog_cc_wl"
1308 link_static_flag="$lt_cv_prog_cc_static"
1309 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1310 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1315 ## FIXME: this should be a separate macro
1317 # Check to see if options -o and -c are simultaneously supported by compiler
1318 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1319 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1320 $rm -r conftest 2>/dev/null
1323 echo "int some_variable = 0;" > conftest.$ac_ext
1325 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1326 # that will create temporary files in the current directory regardless of
1327 # the output directory. Thus, making CWD read-only will cause this test
1328 # to fail, enabling locking or at least warning the user not to do parallel
1331 save_CFLAGS="$CFLAGS"
1332 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1334 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1335 # The compiler can only warn and ignore the option if not recognized
1336 # So say no if there are warnings
1337 if test -s out/conftest.err; then
1338 lt_cv_compiler_c_o=no
1340 lt_cv_compiler_c_o=yes
1343 # Append any errors to the config.log.
1344 cat out/conftest.err 1>&AC_FD_CC
1345 lt_cv_compiler_c_o=no
1347 CFLAGS="$save_CFLAGS"
1353 $rm -r conftest 2>/dev/null
1355 compiler_c_o=$lt_cv_compiler_c_o
1356 AC_MSG_RESULT([$compiler_c_o])
1358 if test x"$compiler_c_o" = x"yes"; then
1359 # Check to see if we can write to a .lo
1360 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1361 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1362 lt_cv_compiler_o_lo=no
1363 save_CFLAGS="$CFLAGS"
1364 CFLAGS="$CFLAGS -c -o conftest.lo"
1365 save_objext="$ac_objext"
1367 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1368 # The compiler can only warn and ignore the option if not recognized
1369 # So say no if there are warnings
1370 if test -s conftest.err; then
1371 lt_cv_compiler_o_lo=no
1373 lt_cv_compiler_o_lo=yes
1376 ac_objext="$save_objext"
1377 CFLAGS="$save_CFLAGS"
1379 compiler_o_lo=$lt_cv_compiler_o_lo
1380 AC_MSG_RESULT([$compiler_o_lo])
1387 ## FIXME: this should be a separate macro
1389 # Check to see if we can do hard links to lock some files if needed
1390 hard_links="nottested"
1391 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1392 # do not overwrite the value of need_locks provided by the user
1393 AC_MSG_CHECKING([if we can lock with hard links])
1396 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1398 ln conftest.a conftest.b 2>&5 || hard_links=no
1399 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1400 AC_MSG_RESULT([$hard_links])
1401 if test "$hard_links" = no; then
1402 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1411 ## FIXME: this should be a separate macro
1413 if test "$GCC" = yes; then
1414 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1415 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1416 echo "int some_variable = 0;" > conftest.$ac_ext
1417 save_CFLAGS="$CFLAGS"
1418 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1419 compiler_rtti_exceptions=no
1420 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1421 # The compiler can only warn and ignore the option if not recognized
1422 # So say no if there are warnings
1423 if test -s conftest.err; then
1424 compiler_rtti_exceptions=no
1426 compiler_rtti_exceptions=yes
1429 CFLAGS="$save_CFLAGS"
1430 AC_MSG_RESULT([$compiler_rtti_exceptions])
1432 if test "$compiler_rtti_exceptions" = "yes"; then
1433 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1435 no_builtin_flag=' -fno-builtin'
1441 ## FIXME: this should be a separate macro
1443 # See if the linker supports building shared libraries.
1444 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1446 allow_undefined_flag=
1448 need_lib_prefix=unknown
1449 need_version=unknown
1450 # when you set need_version to no, make sure it does not cause -set_version
1451 # flags to be left without arguments
1453 archive_expsym_cmds=
1454 old_archive_from_new_cmds=
1455 old_archive_from_expsyms_cmds=
1456 export_dynamic_flag_spec=
1457 whole_archive_flag_spec=
1458 thread_safe_flag_spec=
1459 hardcode_into_libs=no
1460 hardcode_libdir_flag_spec=
1461 hardcode_libdir_separator=
1464 hardcode_shlibpath_var=unsupported
1466 link_all_deplibs=unknown
1467 always_export_symbols=no
1468 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1469 # include_expsyms should be a list of space-separated symbols to be *always*
1470 # included in the symbol list
1472 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1473 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1474 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1475 # as well as any symbol that contains `d'.
1476 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1477 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1478 # platforms (ab)use it in PIC code, but their linkers get confused if
1479 # the symbol is explicitly referenced. Since portable code cannot
1480 # rely on this symbol name, it's probably fine to never include it in
1481 # preloaded symbol tables.
1482 extract_expsyms_cmds=
1485 cygwin* | mingw* | pw32*)
1486 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1487 # When not using gcc, we currently assume that we are using
1488 # Microsoft Visual C++.
1489 if test "$GCC" != yes; then
1499 if test "$with_gnu_ld" = yes; then
1500 # If archive_cmds runs LD, not CC, wlarc should be empty
1503 # See if GNU ld supports shared libraries.
1505 aix3* | aix4* | aix5*)
1506 # On AIX, the GNU linker is very broken
1507 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1511 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1512 *** to be unable to reliably create shared libraries on AIX.
1513 *** Therefore, libtool is disabling shared libraries support. If you
1514 *** really care for shared libraries, you may want to modify your PATH
1515 *** so that a non-GNU linker is found, and then restart.
1521 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)'
1522 hardcode_libdir_flag_spec='-L$libdir'
1523 hardcode_minus_L=yes
1525 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1526 # that the semantics of dynamic libraries on AmigaOS, at least up
1527 # to version 4, is to share data among multiple programs linked
1528 # with the same dynamic library. Since this doesn't match the
1529 # behavior of shared libraries on other platforms, we can use
1535 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1536 allow_undefined_flag=unsupported
1537 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1538 # support --undefined. This deserves some investigation. FIXME
1539 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1545 cygwin* | mingw* | pw32*)
1546 # hardcode_libdir_flag_spec is actually meaningless, as there is
1547 # no search path for DLLs.
1548 hardcode_libdir_flag_spec='-L$libdir'
1549 allow_undefined_flag=unsupported
1550 always_export_symbols=yes
1552 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1553 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1554 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1555 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1556 else $CC -o impgen impgen.c ; fi)~
1557 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1559 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1561 # cygwin and mingw dlls have different entry points and sets of symbols
1563 # FIXME: what about values for MSVC?
1564 dll_entry=__cygwin_dll_entry@12
1565 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1569 dll_entry=_DllMainCRTStartup@12
1570 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1574 # mingw and cygwin differ, and it's simplest to just exclude the union
1575 # of the two symbol sets.
1576 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1578 # recent cygwin and mingw systems supply a stub DllMain which the user
1579 # can override, but on older systems we have to supply one (in ltdll.c)
1580 if test "x$lt_cv_need_dllmain" = "xyes"; then
1581 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1582 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~
1583 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1589 # Extract the symbol export list from an `--export-all' def file,
1590 # then regenerate the def file from the symbol export list, so that
1591 # the compiled dll only exports the symbol export list.
1592 # Be careful not to strip the DATA tag left be newer dlltools.
1593 export_symbols_cmds="$ltdll_cmds"'
1594 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1595 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1597 # If the export-symbols file already is a .def file (1st line
1598 # is EXPORTS), use it as is.
1599 # If DATA tags from a recent dlltool are present, honour them!
1600 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1601 cp $export_symbols $output_objdir/$soname-def;
1603 echo EXPORTS > $output_objdir/$soname-def;
1605 cat $export_symbols | while read symbol; do
1608 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1609 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1611 _lt_hint=`expr 1 + \$_lt_hint`;
1615 $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~
1616 $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~
1617 $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~
1618 $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~
1619 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1623 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1624 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1627 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1628 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1633 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1637 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1638 *** create shared libraries on Solaris systems. Therefore, libtool
1639 *** is disabling shared libraries support. We urge you to upgrade GNU
1640 *** binutils to release 2.9.1 or newer. Another option is to modify
1641 *** your PATH or compiler configuration so that the native linker is
1642 *** used, and then restart.
1645 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1646 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1647 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1654 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1657 hardcode_shlibpath_var=no
1661 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1662 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1663 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1670 if test "$ld_shlibs" = yes; then
1671 runpath_var=LD_RUN_PATH
1672 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1673 export_dynamic_flag_spec='${wl}--export-dynamic'
1675 cygwin* | mingw* | pw32*)
1676 # dlltool doesn't understand --whole-archive et. al.
1677 whole_archive_flag_spec=
1680 # ancient GNU ld didn't support --whole-archive et. al.
1681 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1682 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1684 whole_archive_flag_spec=
1690 # PORTME fill in a description of your system's linker (not GNU ld)
1693 allow_undefined_flag=unsupported
1694 always_export_symbols=yes
1695 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'
1696 # Note: this linker hardcodes the directories in LIBPATH if there
1697 # are no directories specified by -L.
1698 hardcode_minus_L=yes
1699 if test "$GCC" = yes && test -z "$link_static_flag"; then
1700 # Neither direct hardcoding nor static linking is supported with a
1702 hardcode_direct=unsupported
1707 if test "$host_cpu" = ia64; then
1708 # On IA64, the linker does run time linking by default, so we don't
1709 # have to do anything special.
1710 aix_use_runtimelinking=no
1711 exp_sym_flag='-Bexport'
1714 aix_use_runtimelinking=no
1716 # Test if we are trying to use run time linking or normal
1717 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1718 # need to do runtime linking.
1719 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1720 for ld_flag in $LDFLAGS; do
1721 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1722 aix_use_runtimelinking=yes
1728 exp_sym_flag='-bexport'
1729 no_entry_flag='-bnoentry'
1732 # When large executables or shared objects are built, AIX ld can
1733 # have problems creating the table of contents. If linking a library
1734 # or program results in "error TOC overflow" add -mminimal-toc to
1735 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1736 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1740 hardcode_libdir_separator=':'
1741 if test "$GCC" = yes; then
1742 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1743 collect2name=`${CC} -print-prog-name=collect2`
1744 if test -f "$collect2name" && \
1745 strings "$collect2name" | grep resolve_lib_name >/dev/null
1747 # We have reworked collect2
1750 # We have old collect2
1751 hardcode_direct=unsupported
1752 # It fails to find uninstalled libraries when the uninstalled
1753 # path is not listed in the libpath. Setting hardcode_minus_L
1754 # to unsupported forces relinking
1755 hardcode_minus_L=yes
1756 hardcode_libdir_flag_spec='-L$libdir'
1757 hardcode_libdir_separator=
1761 shared_flag='-shared'
1764 if test "$host_cpu" = ia64; then
1765 shared_flag='${wl}-G'
1767 if test "$aix_use_runtimelinking" = yes; then
1768 shared_flag='${wl}-G'
1770 shared_flag='${wl}-bM:SRE'
1775 # It seems that -bexpall can do strange things, so it is better to
1776 # generate a list of symbols to export.
1777 always_export_symbols=yes
1778 if test "$aix_use_runtimelinking" = yes; then
1779 # Warning - without using the other runtime loading flags (-brtl),
1780 # -berok will link without error, but may produce a broken library.
1781 allow_undefined_flag='-berok'
1782 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1783 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
1785 if test "$host_cpu" = ia64; then
1786 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1787 allow_undefined_flag="-z nodefs"
1788 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"
1790 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1791 # Warning - without using the other run time loading flags,
1792 # -berok will link without error, but may produce a broken library.
1793 allow_undefined_flag='${wl}-berok'
1794 # This is a bit strange, but is similar to how AIX traditionally builds
1795 # it's shared libraries.
1796 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'
1802 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)'
1803 hardcode_libdir_flag_spec='-L$libdir'
1804 hardcode_minus_L=yes
1805 # see comment about different semantics on the GNU ld section
1809 cygwin* | mingw* | pw32*)
1810 # When not using gcc, we currently assume that we are using
1811 # Microsoft Visual C++.
1812 # hardcode_libdir_flag_spec is actually meaningless, as there is
1813 # no search path for DLLs.
1814 hardcode_libdir_flag_spec=' '
1815 allow_undefined_flag=unsupported
1816 # Tell ltmain to make .lib files, not .a files.
1818 # FIXME: Setting linknames here is a bad hack.
1819 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1820 # The linker will automatically build a .lib file if we build a DLL.
1821 old_archive_from_new_cmds='true'
1822 # FIXME: Should let the user specify the lib program.
1823 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1824 fix_srcfile_path='`cygpath -w "$srcfile"`'
1827 darwin* | rhapsody*)
1829 rhapsody* | darwin1.[[012]])
1830 allow_undefined_flag='-undefined suppress'
1833 allow_undefined_flag='-flat_namespace -undefined suppress'
1836 # FIXME: Relying on posixy $() will cause problems for
1837 # cross-compilation, but unfortunately the echo tests do not
1838 # yet detect zsh echo's removal of \ escapes.
1839 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
1840 # We need to add '_' to the symbols in $export_symbols first
1841 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1843 hardcode_shlibpath_var=no
1844 whole_archive_flag_spec='-all_load $convenience'
1851 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1852 # support. Future versions do this automatically, but an explicit c++rt0.o
1853 # does not break anything, and helps significantly (at the cost of a little
1856 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1857 hardcode_libdir_flag_spec='-R$libdir'
1859 hardcode_shlibpath_var=no
1862 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1864 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1866 hardcode_minus_L=yes
1867 hardcode_shlibpath_var=no
1870 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1872 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1873 hardcode_libdir_flag_spec='-R$libdir'
1875 hardcode_shlibpath_var=no
1878 hpux9* | hpux10* | hpux11*)
1880 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' ;;
1881 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1883 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1884 hardcode_libdir_separator=:
1886 hardcode_minus_L=yes # Not in the search PATH, but as the default
1887 # location of the library.
1888 export_dynamic_flag_spec='${wl}-E'
1892 if test "$GCC" = yes; then
1893 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'
1895 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'
1897 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1898 hardcode_libdir_separator=:
1899 link_all_deplibs=yes
1903 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1904 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1906 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1908 hardcode_libdir_flag_spec='-R$libdir'
1910 hardcode_shlibpath_var=no
1914 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1916 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1917 hardcode_libdir_separator=:
1918 hardcode_shlibpath_var=no
1923 hardcode_shlibpath_var=no
1924 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1925 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
1926 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1927 export_dynamic_flag_spec='${wl}-E'
1930 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
1931 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1932 hardcode_libdir_flag_spec='-R$libdir'
1935 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
1936 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1943 hardcode_libdir_flag_spec='-L$libdir'
1944 hardcode_minus_L=yes
1945 allow_undefined_flag=unsupported
1946 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'
1947 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1951 if test "$GCC" = yes; then
1952 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1953 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'
1955 allow_undefined_flag=' -expect_unresolved \*'
1956 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'
1958 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1959 hardcode_libdir_separator=:
1962 osf4* | osf5*) # as osf3* with the addition of -msym flag
1963 if test "$GCC" = yes; then
1964 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1965 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'
1966 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1968 allow_undefined_flag=' -expect_unresolved \*'
1969 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'
1970 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1971 $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'
1973 #Both c and cxx compiler support -rpath directly
1974 hardcode_libdir_flag_spec='-rpath $libdir'
1976 hardcode_libdir_separator=:
1980 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1981 hardcode_shlibpath_var=no
1982 runpath_var=LD_RUN_PATH
1983 hardcode_runpath_var=yes
1984 export_dynamic_flag_spec='${wl}-Bexport'
1988 # gcc --version < 3.0 without binutils cannot create self contained
1989 # shared libraries reliably, requiring libgcc.a to resolve some of
1990 # the object symbols generated in some cases. Libraries that use
1991 # assert need libgcc.a to resolve __eprintf, for example. Linking
1992 # a copy of libgcc.a into every shared library to guarantee resolving
1993 # such symbols causes other problems: According to Tim Van Holder
1994 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
1995 # (to the application) exception stack for one thing.
1996 no_undefined_flag=' -z defs'
1997 if test "$GCC" = yes; then
1998 case `$CC --version 2>/dev/null` in
2002 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2003 *** create self contained shared libraries on Solaris systems, without
2004 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2005 *** -no-undefined support, which will at least allow you to build shared
2006 *** libraries. However, you may find that when you link such libraries
2007 *** into an application without using GCC, you have to manually add
2008 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2009 *** upgrade to a newer version of GCC. Another option is to rebuild your
2010 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2017 # $CC -shared without GNU ld will not create a library from C++
2018 # object files and a static libstdc++, better avoid it by now
2019 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2020 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2021 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2022 hardcode_libdir_flag_spec='-R$libdir'
2023 hardcode_shlibpath_var=no
2025 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2026 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2027 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2029 link_all_deplibs=yes
2033 if test "x$host_vendor" = xsequent; then
2034 # Use $CC to link under sequent, because it throws in some extra .o
2035 # files that make .init and .fini sections work.
2036 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2038 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2040 hardcode_libdir_flag_spec='-L$libdir'
2042 hardcode_minus_L=yes
2043 hardcode_shlibpath_var=no
2047 if test "x$host_vendor" = xsno; then
2048 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2049 hardcode_direct=yes # is this really true???
2051 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2052 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2054 runpath_var='LD_RUN_PATH'
2055 hardcode_shlibpath_var=no
2059 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2060 hardcode_shlibpath_var=no
2061 export_dynamic_flag_spec='-Bexport'
2065 no_undefined_flag=' -z text'
2066 # $CC -shared without GNU ld will not create a library from C++
2067 # object files and a static libstdc++, better avoid it by now
2068 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2069 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2070 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2071 hardcode_libdir_flag_spec=
2072 hardcode_shlibpath_var=no
2073 runpath_var='LD_RUN_PATH'
2077 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2078 hardcode_libdir_flag_spec='-L$libdir'
2079 hardcode_shlibpath_var=no
2083 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2084 hardcode_libdir_flag_spec='-L$libdir'
2085 hardcode_shlibpath_var=no
2089 if test -d /usr/nec; then
2090 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2091 hardcode_shlibpath_var=no
2092 runpath_var=LD_RUN_PATH
2093 hardcode_runpath_var=yes
2099 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2102 hardcode_shlibpath_var=no
2103 hardcode_runpath_var=yes
2104 runpath_var=LD_RUN_PATH
2107 sysv5uw7* | unixware7*)
2108 no_undefined_flag='${wl}-z ${wl}text'
2109 if test "$GCC" = yes; then
2110 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2112 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2114 runpath_var='LD_RUN_PATH'
2115 hardcode_shlibpath_var=no
2123 AC_MSG_RESULT([$ld_shlibs])
2124 test "$ld_shlibs" = no && can_build_shared=no
2128 ## FIXME: this should be a separate macro
2130 # Check hardcoding attributes.
2131 AC_MSG_CHECKING([how to hardcode library paths into programs])
2133 if test -n "$hardcode_libdir_flag_spec" || \
2134 test -n "$runpath_var"; then
2136 # We can hardcode non-existant directories.
2137 if test "$hardcode_direct" != no &&
2138 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2139 # have to relink, otherwise we might link with an installed library
2140 # when we should be linking with a yet-to-be-installed one
2141 ## test "$hardcode_shlibpath_var" != no &&
2142 test "$hardcode_minus_L" != no; then
2143 # Linking always hardcodes the temporary library directory.
2144 hardcode_action=relink
2146 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2147 hardcode_action=immediate
2150 # We cannot hardcode anything, or else we can only hardcode existing
2152 hardcode_action=unsupported
2154 AC_MSG_RESULT([$hardcode_action])
2158 ## FIXME: this should be a separate macro
2162 AC_MSG_CHECKING([whether stripping libraries is possible])
2163 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2164 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2165 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2166 AC_MSG_RESULT([yes])
2173 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2174 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2176 ## FIXME: this should be a separate macro
2178 # PORTME Fill in your ld.so characteristics
2179 AC_MSG_CHECKING([dynamic linker characteristics])
2181 libname_spec='lib$name'
2188 shlibpath_overrides_runpath=unknown
2190 dynamic_linker="$host_os ld.so"
2191 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2192 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2197 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2198 shlibpath_var=LIBPATH
2200 # AIX has no versioning support, so we append a major version to the name.
2201 soname_spec='${libname}${release}.so$major'
2206 if test "$host_cpu" = ia64; then
2207 # AIX 5 supports IA64
2208 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2209 shlibpath_var=LD_LIBRARY_PATH
2211 # With GCC up to 2.95.x, collect2 would create an import file
2212 # for dependence libraries. The import file would start with
2213 # the line `#! .'. This would cause the generated library to
2214 # depend on `.', always an invalid library. This was fixed in
2215 # development snapshots of GCC prior to 3.0.
2217 aix4 | aix4.[[01]] | aix4.[[01]].*)
2218 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2220 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2227 # AIX (on Power*) has no versioning support, so currently we can
2228 # not hardcode correct soname into executable. Probably we can
2229 # add versioning support to collect2, so additional links can
2230 # be useful in future.
2231 if test "$aix_use_runtimelinking" = yes; then
2232 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2233 # instead of lib<name>.a to let people know that these are not
2234 # typical AIX shared libraries.
2235 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2237 # We preserve .a as extension for shared libraries through AIX4.2
2238 # and later when we are not doing run time linking.
2239 library_names_spec='${libname}${release}.a $libname.a'
2240 soname_spec='${libname}${release}.so$major'
2242 shlibpath_var=LIBPATH
2247 library_names_spec='$libname.ixlibrary $libname.a'
2248 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2249 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'
2253 library_names_spec='${libname}.so'
2254 dynamic_linker="$host_os ld.so"
2255 shlibpath_var=LIBRARY_PATH
2261 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2262 soname_spec='${libname}${release}.so$major'
2263 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2264 shlibpath_var=LD_LIBRARY_PATH
2265 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2266 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2267 export_dynamic_flag_spec=-rdynamic
2268 # the default ld.so.conf also contains /usr/contrib/lib and
2269 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2270 # libtool to hard-code these into programs
2273 cygwin* | mingw* | pw32*)
2274 version_type=windows
2277 case $GCC,$host_os in
2279 library_names_spec='$libname.dll.a'
2280 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2281 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2282 dldir=$destdir/`dirname \$dlpath`~
2283 test -d \$dldir || mkdir -p \$dldir~
2284 $install_prog .libs/$dlname \$dldir/$dlname'
2285 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2286 dlpath=$dir/\$dldll~
2290 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2291 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2294 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2297 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2300 dynamic_linker='Win32 ld.exe'
2301 # FIXME: first we should search . and the directory the executable is in
2305 darwin* | rhapsody*)
2306 dynamic_linker="$host_os dyld"
2310 # FIXME: Relying on posixy $() will cause problems for
2311 # cross-compilation, but unfortunately the echo tests do not
2312 # yet detect zsh echo's removal of \ escapes.
2313 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)'
2314 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2315 shlibpath_overrides_runpath=yes
2316 shlibpath_var=DYLD_LIBRARY_PATH
2324 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2325 version_type=freebsd-$objformat
2326 case $version_type in
2328 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2333 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2337 shlibpath_var=LD_LIBRARY_PATH
2340 shlibpath_overrides_runpath=yes
2343 shlibpath_overrides_runpath=no
2344 hardcode_into_libs=yes
2353 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2354 soname_spec='${libname}${release}.so$major'
2355 shlibpath_var=LD_LIBRARY_PATH
2356 hardcode_into_libs=yes
2359 hpux9* | hpux10* | hpux11*)
2360 # Give a soname corresponding to the major version so that dld.sl refuses to
2361 # link against other versions.
2362 dynamic_linker="$host_os dld.sl"
2366 shlibpath_var=SHLIB_PATH
2367 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2368 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2369 soname_spec='${libname}${release}.sl$major'
2370 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2371 postinstall_cmds='chmod 555 $lib'
2378 soname_spec='${libname}${release}.so$major'
2379 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2385 case $LD in # libtool.m4 will add one of these switches to LD
2386 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2387 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2388 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2389 *) libsuff= shlibsuff= libmagic=never-match;;
2393 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2394 shlibpath_overrides_runpath=no
2395 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2396 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2399 # No shared lib support for Linux oldld, aout, or coff.
2400 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2404 # This must be Linux ELF.
2409 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2410 soname_spec='${libname}${release}.so$major'
2411 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2412 shlibpath_var=LD_LIBRARY_PATH
2413 shlibpath_overrides_runpath=no
2414 # This implies no fast_install, which is unacceptable.
2415 # Some rework will be needed to allow for fast_install
2416 # before this can be enabled.
2417 hardcode_into_libs=yes
2419 # We used to test for /lib/ld.so.1 and disable shared libraries on
2420 # powerpc, because MkLinux only supported shared libraries with the
2421 # GNU dynamic linker. Since this was broken with cross compilers,
2422 # most powerpc-linux boxes support dynamic linking these days and
2423 # people can always --disable-shared, the test was removed, and we
2424 # assume the GNU/Linux dynamic linker is in use.
2425 dynamic_linker='GNU/Linux ld.so'
2432 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2433 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2434 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2435 dynamic_linker='NetBSD (a.out) ld.so'
2437 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2438 soname_spec='${libname}${release}.so$major'
2439 dynamic_linker='NetBSD ld.elf_so'
2441 shlibpath_var=LD_LIBRARY_PATH
2442 shlibpath_overrides_runpath=yes
2443 hardcode_into_libs=yes
2448 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2449 shlibpath_var=LD_LIBRARY_PATH
2450 shlibpath_overrides_runpath=yes
2457 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2459 openbsd2.[[89]] | openbsd2.[[89]].*)
2460 shlibpath_overrides_runpath=no
2463 shlibpath_overrides_runpath=yes
2467 shlibpath_overrides_runpath=yes
2469 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2470 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2471 shlibpath_var=LD_LIBRARY_PATH
2475 libname_spec='$name'
2477 library_names_spec='$libname.dll $libname.a'
2478 dynamic_linker='OS/2 ld.exe'
2479 shlibpath_var=LIBPATH
2482 osf3* | osf4* | osf5*)
2485 soname_spec='${libname}${release}.so'
2486 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2487 shlibpath_var=LD_LIBRARY_PATH
2488 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2489 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2494 soname_spec='${libname}${release}.so$major'
2495 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2496 shlibpath_var=LD_LIBRARY_PATH
2503 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2504 soname_spec='${libname}${release}.so$major'
2505 shlibpath_var=LD_LIBRARY_PATH
2506 shlibpath_overrides_runpath=yes
2507 hardcode_into_libs=yes
2508 # ldd complains unless libraries are executable
2509 postinstall_cmds='chmod +x $lib'
2514 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2515 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2516 shlibpath_var=LD_LIBRARY_PATH
2517 shlibpath_overrides_runpath=yes
2518 if test "$with_gnu_ld" = yes; then
2524 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2526 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2527 soname_spec='${libname}${release}.so$major'
2528 shlibpath_var=LD_LIBRARY_PATH
2529 case $host_vendor in
2531 shlibpath_overrides_runpath=no
2536 shlibpath_overrides_runpath=no
2537 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2544 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2545 soname_spec='${libname}${release}.so$major'
2546 shlibpath_var=LD_LIBRARY_PATH
2553 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2554 soname_spec='${libname}${release}.so$major'
2555 shlibpath_var=LD_LIBRARY_PATH
2559 if test -d /usr/nec ;then
2561 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2562 soname_spec='$libname.so.$major'
2563 shlibpath_var=LD_LIBRARY_PATH
2571 AC_MSG_RESULT([$dynamic_linker])
2572 test "$dynamic_linker" = no && can_build_shared=no
2576 ## FIXME: this should be a separate macro
2578 # Report the final consequences.
2579 AC_MSG_CHECKING([if libtool supports shared libraries])
2580 AC_MSG_RESULT([$can_build_shared])
2584 ## FIXME: this should be a separate macro
2586 AC_MSG_CHECKING([whether to build shared libraries])
2587 test "$can_build_shared" = "no" && enable_shared=no
2589 # On AIX, shared libraries and static libraries use the same namespace, and
2590 # are all built from PIC.
2593 test "$enable_shared" = yes && enable_static=no
2594 if test -n "$RANLIB"; then
2595 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2596 postinstall_cmds='$RANLIB $lib'
2601 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2602 test "$enable_shared" = yes && enable_static=no
2606 AC_MSG_RESULT([$enable_shared])
2610 ## FIXME: this should be a separate macro
2612 AC_MSG_CHECKING([whether to build static libraries])
2613 # Make sure either enable_shared or enable_static is yes.
2614 test "$enable_shared" = yes || enable_static=yes
2615 AC_MSG_RESULT([$enable_static])
2619 if test "$hardcode_action" = relink; then
2620 # Fast installation is not supported
2621 enable_fast_install=no
2622 elif test "$shlibpath_overrides_runpath" = yes ||
2623 test "$enable_shared" = no; then
2624 # Fast installation is not necessary
2625 enable_fast_install=needless
2628 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2629 if test "$GCC" = yes; then
2630 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2633 AC_LIBTOOL_DLOPEN_SELF
2635 ## FIXME: this should be a separate macro
2637 if test "$enable_shared" = yes && test "$GCC" = yes; then
2638 case $archive_cmds in
2640 # FIXME: we may have to deal with multi-command sequences.
2643 # Test whether the compiler implicitly links with -lc since on some
2644 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2645 # to ld, don't add -lc before -lgcc.
2646 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2647 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2649 echo 'static int dummy;' > conftest.$ac_ext
2651 if AC_TRY_EVAL(ac_compile); then
2654 libobjs=conftest.$ac_objext
2656 wl=$lt_cv_prog_cc_wl
2662 save_allow_undefined_flag=$allow_undefined_flag
2663 allow_undefined_flag=
2664 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2666 lt_cv_archive_cmds_need_lc=no
2668 lt_cv_archive_cmds_need_lc=yes
2670 allow_undefined_flag=$save_allow_undefined_flag
2672 cat conftest.err 1>&5
2674 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2678 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2682 ## FIXME: this should be a separate macro
2684 # The second clause should only fire when bootstrapping the
2685 # libtool distribution, otherwise you forgot to ship ltmain.sh
2686 # with your package, and you will get complaints that there are
2687 # no rules to generate ltmain.sh.
2688 if test -f "$ltmain"; then
2691 # If there is no Makefile yet, we rely on a make rule to execute
2692 # `config.status --recheck' to rerun these tests and create the
2693 # libtool script then.
2694 test -f Makefile && make "$ltmain"
2697 if test -f "$ltmain"; then
2698 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2701 echo creating $ofile
2703 # Now quote all the things that may contain metacharacters while being
2704 # careful not to overquote the AC_SUBSTed values. We take copies of the
2705 # variables and quote the copies for generation of the libtool script.
2706 for var in echo old_CC old_CFLAGS \
2707 AR AR_FLAGS CC LD LN_S NM SHELL \
2708 reload_flag reload_cmds wl \
2709 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2710 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2711 library_names_spec soname_spec \
2712 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2713 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2714 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2715 old_striplib striplib file_magic_cmd export_symbols_cmds \
2716 deplibs_check_method allow_undefined_flag no_undefined_flag \
2717 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2718 global_symbol_to_c_name_address \
2719 hardcode_libdir_flag_spec hardcode_libdir_separator \
2720 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2721 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2724 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2725 old_postinstall_cmds | old_postuninstall_cmds | \
2726 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2727 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2728 postinstall_cmds | postuninstall_cmds | \
2729 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2730 # Double-quote double-evaled strings.
2731 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2734 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2739 cat <<__EOF__ > "${ofile}T"
2742 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2743 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2744 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2746 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2747 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2749 # This program is free software; you can redistribute it and/or modify
2750 # it under the terms of the GNU General Public License as published by
2751 # the Free Software Foundation; either version 2 of the License, or
2752 # (at your option) any later version.
2754 # This program is distributed in the hope that it will be useful, but
2755 # WITHOUT ANY WARRANTY; without even the implied warranty of
2756 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2757 # General Public License for more details.
2759 # You should have received a copy of the GNU General Public License
2760 # along with this program; if not, write to the Free Software
2761 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2763 # As a special exception to the GNU General Public License, if you
2764 # distribute this file as part of a program that contains a
2765 # configuration script generated by Autoconf, you may include it under
2766 # the same distribution terms that you use for the rest of that program.
2768 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2769 Xsed="sed -e s/^X//"
2771 # The HP-UX ksh and POSIX shell print the target directory to stdout
2773 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2775 # ### BEGIN LIBTOOL CONFIG
2777 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2779 # Shell to use when invoking shell scripts.
2782 # Whether or not to build shared libraries.
2783 build_libtool_libs=$enable_shared
2785 # Whether or not to build static libraries.
2786 build_old_libs=$enable_static
2788 # Whether or not to add -lc for building shared libraries.
2789 build_libtool_need_lc=$need_lc
2791 # Whether or not to optimize for fast installation.
2792 fast_install=$enable_fast_install
2795 host_alias=$host_alias
2798 # An echo program that does not interpret backslashes.
2803 AR_FLAGS=$lt_AR_FLAGS
2805 # The default C compiler.
2808 # Is the compiler the GNU C compiler?
2811 # The linker used to build libraries.
2814 # Whether we need hard or soft links.
2817 # A BSD-compatible nm program.
2820 # A symbol stripping program
2823 # Used to examine libraries when file_magic_cmd begins "file"
2824 MAGIC_CMD=$MAGIC_CMD
2826 # Used on cygwin: DLL creation program.
2829 # Used on cygwin: object dumper.
2832 # Used on cygwin: assembler.
2835 # The name of the directory that contains temporary libtool files.
2838 # How to create reloadable object files.
2839 reload_flag=$lt_reload_flag
2840 reload_cmds=$lt_reload_cmds
2842 # How to pass a linker flag through the compiler.
2845 # Object file suffix (normally "o").
2848 # Old archive suffix (normally "a").
2851 # Executable file suffix (normally "").
2854 # Additional compiler flags for building library objects.
2855 pic_flag=$lt_pic_flag
2858 # Does compiler simultaneously support -c and -o options?
2859 compiler_c_o=$lt_compiler_c_o
2861 # Can we write directly to a .lo ?
2862 compiler_o_lo=$lt_compiler_o_lo
2864 # Must we lock files when doing compilation ?
2865 need_locks=$lt_need_locks
2867 # Do we need the lib prefix for modules?
2868 need_lib_prefix=$need_lib_prefix
2870 # Do we need a version for libraries?
2871 need_version=$need_version
2873 # Whether dlopen is supported.
2874 dlopen_support=$enable_dlopen
2876 # Whether dlopen of programs is supported.
2877 dlopen_self=$enable_dlopen_self
2879 # Whether dlopen of statically linked programs is supported.
2880 dlopen_self_static=$enable_dlopen_self_static
2882 # Compiler flag to prevent dynamic linking.
2883 link_static_flag=$lt_link_static_flag
2885 # Compiler flag to turn off builtin functions.
2886 no_builtin_flag=$lt_no_builtin_flag
2888 # Compiler flag to allow reflexive dlopens.
2889 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2891 # Compiler flag to generate shared objects directly from archives.
2892 whole_archive_flag_spec=$lt_whole_archive_flag_spec
2894 # Compiler flag to generate thread-safe objects.
2895 thread_safe_flag_spec=$lt_thread_safe_flag_spec
2897 # Library versioning type.
2898 version_type=$version_type
2900 # Format of library name prefix.
2901 libname_spec=$lt_libname_spec
2903 # List of archive names. First name is the real one, the rest are links.
2904 # The last name is the one that the linker finds with -lNAME.
2905 library_names_spec=$lt_library_names_spec
2907 # The coded name of the library, if different from the real name.
2908 soname_spec=$lt_soname_spec
2910 # Commands used to build and install an old-style archive.
2912 old_archive_cmds=$lt_old_archive_cmds
2913 old_postinstall_cmds=$lt_old_postinstall_cmds
2914 old_postuninstall_cmds=$lt_old_postuninstall_cmds
2916 # Create an old-style archive from a shared archive.
2917 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
2919 # Create a temporary old-style archive to link instead of a shared archive.
2920 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
2922 # Commands used to build and install a shared archive.
2923 archive_cmds=$lt_archive_cmds
2924 archive_expsym_cmds=$lt_archive_expsym_cmds
2925 postinstall_cmds=$lt_postinstall_cmds
2926 postuninstall_cmds=$lt_postuninstall_cmds
2928 # Commands to strip libraries.
2929 old_striplib=$lt_old_striplib
2930 striplib=$lt_striplib
2932 # Method to check whether dependent libraries are shared objects.
2933 deplibs_check_method=$lt_deplibs_check_method
2935 # Command to use when deplibs_check_method == file_magic.
2936 file_magic_cmd=$lt_file_magic_cmd
2938 # Flag that allows shared libraries with undefined symbols to be built.
2939 allow_undefined_flag=$lt_allow_undefined_flag
2941 # Flag that forces no undefined symbols.
2942 no_undefined_flag=$lt_no_undefined_flag
2944 # Commands used to finish a libtool library installation in a directory.
2945 finish_cmds=$lt_finish_cmds
2947 # Same as above, but a single script fragment to be evaled but not shown.
2948 finish_eval=$lt_finish_eval
2950 # Take the output of nm and produce a listing of raw symbols and C names.
2951 global_symbol_pipe=$lt_global_symbol_pipe
2953 # Transform the output of nm in a proper C declaration
2954 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
2956 # Transform the output of nm in a C name address pair
2957 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
2959 # This is the shared library runtime path variable.
2960 runpath_var=$runpath_var
2962 # This is the shared library path variable.
2963 shlibpath_var=$shlibpath_var
2965 # Is shlibpath searched before the hard-coded library search path?
2966 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2968 # How to hardcode a shared library path into an executable.
2969 hardcode_action=$hardcode_action
2971 # Whether we should hardcode library paths into libraries.
2972 hardcode_into_libs=$hardcode_into_libs
2974 # Flag to hardcode \$libdir into a binary during linking.
2975 # This must work even if \$libdir does not exist.
2976 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
2978 # Whether we need a single -rpath flag with a separated argument.
2979 hardcode_libdir_separator=$lt_hardcode_libdir_separator
2981 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2983 hardcode_direct=$hardcode_direct
2985 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2987 hardcode_minus_L=$hardcode_minus_L
2989 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2990 # the resulting binary.
2991 hardcode_shlibpath_var=$hardcode_shlibpath_var
2993 # Variables whose values should be saved in libtool wrapper scripts and
2994 # restored at relink time.
2995 variables_saved_for_relink="$variables_saved_for_relink"
2997 # Whether libtool must link a program against all its dependency libraries.
2998 link_all_deplibs=$link_all_deplibs
3000 # Compile-time system search path for libraries
3001 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3003 # Run-time system search path for libraries
3004 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3006 # Fix the shell variable \$srcfile for the compiler.
3007 fix_srcfile_path="$fix_srcfile_path"
3009 # Set to yes if exported symbols are required.
3010 always_export_symbols=$always_export_symbols
3012 # The commands to list exported symbols.
3013 export_symbols_cmds=$lt_export_symbols_cmds
3015 # The commands to extract the exported symbol list from a shared archive.
3016 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3018 # Symbols that should not be listed in the preloaded symbols.
3019 exclude_expsyms=$lt_exclude_expsyms
3021 # Symbols that must always be exported.
3022 include_expsyms=$lt_include_expsyms
3024 # ### END LIBTOOL CONFIG
3030 cat <<\EOF >> "${ofile}T"
3032 # AIX sometimes has problems with the GCC collect2 program. For some
3033 # reason, if we set the COLLECT_NAMES environment variable, the problems
3034 # vanish in a puff of smoke.
3035 if test "X${COLLECT_NAMES+set}" != Xset; then
3037 export COLLECT_NAMES
3044 cygwin* | mingw* | pw32* | os2*)
3045 cat <<'EOF' >> "${ofile}T"
3046 # This is a source program that is used to create dlls on Windows
3047 # Don't remove nor modify the starting and closing comments
3048 # /* ltdll.c starts here */
3049 # #define WIN32_LEAN_AND_MEAN
3050 # #include <windows.h>
3051 # #undef WIN32_LEAN_AND_MEAN
3052 # #include <stdio.h>
3054 # #ifndef __CYGWIN__
3055 # # ifdef __CYGWIN32__
3056 # # define __CYGWIN__ __CYGWIN32__
3060 # #ifdef __cplusplus
3063 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3064 # #ifdef __cplusplus
3069 # #include <cygwin/cygwin_dll.h>
3070 # DECLARE_CYGWIN_DLL( DllMain );
3072 # HINSTANCE __hDllInstance_base;
3075 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3077 # __hDllInstance_base = hInst;
3080 # /* ltdll.c ends here */
3081 # This is a source program that is used to create import libraries
3082 # on Windows for dlls which lack them. Don't remove nor modify the
3083 # starting and closing comments
3084 # /* impgen.c starts here */
3085 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3087 # This file is part of GNU libtool.
3089 # This program is free software; you can redistribute it and/or modify
3090 # it under the terms of the GNU General Public License as published by
3091 # the Free Software Foundation; either version 2 of the License, or
3092 # (at your option) any later version.
3094 # This program is distributed in the hope that it will be useful,
3095 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3096 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3097 # GNU General Public License for more details.
3099 # You should have received a copy of the GNU General Public License
3100 # along with this program; if not, write to the Free Software
3101 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3104 # #include <stdio.h> /* for printf() */
3105 # #include <unistd.h> /* for open(), lseek(), read() */
3106 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3107 # #include <string.h> /* for strdup() */
3109 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3111 # #define O_BINARY 0
3114 # static unsigned int
3115 # pe_get16 (fd, offset)
3119 # unsigned char b[2];
3120 # lseek (fd, offset, SEEK_SET);
3122 # return b[0] + (b[1]<<8);
3125 # static unsigned int
3126 # pe_get32 (fd, offset)
3130 # unsigned char b[4];
3131 # lseek (fd, offset, SEEK_SET);
3133 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3136 # static unsigned int
3140 # unsigned char *b = ptr;
3141 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3150 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3151 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3152 # unsigned long name_rvas, nexp;
3153 # unsigned char *expdata, *erva;
3154 # char *filename, *dll_name;
3156 # filename = argv[1];
3158 # dll = open(filename, O_RDONLY|O_BINARY);
3162 # dll_name = filename;
3164 # for (i=0; filename[i]; i++)
3165 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3166 # dll_name = filename + i +1;
3168 # pe_header_offset = pe_get32 (dll, 0x3c);
3169 # opthdr_ofs = pe_header_offset + 4 + 20;
3170 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3172 # if (num_entries < 1) /* no exports */
3175 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3176 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3177 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3178 # secptr = (pe_header_offset + 4 + 20 +
3179 # pe_get16 (dll, pe_header_offset + 4 + 16));
3182 # for (i = 0; i < nsections; i++)
3185 # unsigned long secptr1 = secptr + 40 * i;
3186 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3187 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3188 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3189 # lseek(dll, secptr1, SEEK_SET);
3190 # read(dll, sname, 8);
3191 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3193 # expptr = fptr + (export_rva - vaddr);
3194 # if (export_rva + export_size > vaddr + vsize)
3195 # export_size = vsize - (export_rva - vaddr);
3200 # expdata = (unsigned char*)malloc(export_size);
3201 # lseek (dll, expptr, SEEK_SET);
3202 # read (dll, expdata, export_size);
3203 # erva = expdata - export_rva;
3205 # nexp = pe_as32 (expdata+24);
3206 # name_rvas = pe_as32 (expdata+32);
3208 # printf ("EXPORTS\n");
3209 # for (i = 0; i<nexp; i++)
3211 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3212 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3217 # /* impgen.c ends here */
3223 # We use sed instead of cat because bash on DJGPP gets confused if
3224 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3225 # text mode, it properly converts lines to CR/LF. This bash problem
3226 # is reportedly fixed, but why not run on old versions too?
3227 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3229 mv -f "${ofile}T" "$ofile" || \
3230 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3236 ])# _LT_AC_LTCONFIG_HACK
3238 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3239 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3241 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3242 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3244 # AC_ENABLE_SHARED - implement the --enable-shared flag
3245 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3246 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3248 AC_DEFUN([AC_ENABLE_SHARED],
3249 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3250 AC_ARG_ENABLE(shared,
3251 changequote(<<, >>)dnl
3252 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3253 changequote([, ])dnl
3254 [p=${PACKAGE-default}
3256 yes) enable_shared=yes ;;
3257 no) enable_shared=no ;;
3260 # Look at the argument we got. We use all the common list separators.
3261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3262 for pkg in $enableval; do
3263 if test "X$pkg" = "X$p"; then
3270 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3273 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3274 AC_DEFUN([AC_DISABLE_SHARED],
3275 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3276 AC_ENABLE_SHARED(no)])
3278 # AC_ENABLE_STATIC - implement the --enable-static flag
3279 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3280 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3282 AC_DEFUN([AC_ENABLE_STATIC],
3283 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3284 AC_ARG_ENABLE(static,
3285 changequote(<<, >>)dnl
3286 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3287 changequote([, ])dnl
3288 [p=${PACKAGE-default}
3290 yes) enable_static=yes ;;
3291 no) enable_static=no ;;
3294 # Look at the argument we got. We use all the common list separators.
3295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3296 for pkg in $enableval; do
3297 if test "X$pkg" = "X$p"; then
3304 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3307 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3308 AC_DEFUN([AC_DISABLE_STATIC],
3309 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3310 AC_ENABLE_STATIC(no)])
3313 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3314 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3315 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3317 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3318 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3319 AC_ARG_ENABLE(fast-install,
3320 changequote(<<, >>)dnl
3321 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3322 changequote([, ])dnl
3323 [p=${PACKAGE-default}
3325 yes) enable_fast_install=yes ;;
3326 no) enable_fast_install=no ;;
3328 enable_fast_install=no
3329 # Look at the argument we got. We use all the common list separators.
3330 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3331 for pkg in $enableval; do
3332 if test "X$pkg" = "X$p"; then
3333 enable_fast_install=yes
3339 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3342 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3343 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3344 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3345 AC_ENABLE_FAST_INSTALL(no)])
3347 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3348 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3349 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3351 AC_DEFUN([AC_LIBTOOL_PICMODE],
3352 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3353 pic_mode=ifelse($#,1,$1,default)])
3356 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3357 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3358 [AC_MSG_CHECKING([for $1])
3359 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3362 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3365 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3368 ac_save_MAGIC_CMD="$MAGIC_CMD"
3369 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3370 dnl $ac_dummy forces splitting on constant user-supplied paths.
3371 dnl POSIX.2 word splitting is done only on the output of word expansions,
3372 dnl not every word. This closes a longstanding sh security hole.
3373 ac_dummy="ifelse([$2], , $PATH, [$2])"
3374 for ac_dir in $ac_dummy; do
3375 test -z "$ac_dir" && ac_dir=.
3376 if test -f $ac_dir/$1; then
3377 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3378 if test -n "$file_magic_test_file"; then
3379 case $deplibs_check_method in
3381 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3382 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3383 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3384 egrep "$file_magic_regex" > /dev/null; then
3389 *** Warning: the command libtool uses to detect shared libraries,
3390 *** $file_magic_cmd, produces output that libtool cannot recognize.
3391 *** The result is that libtool may fail to recognize shared libraries
3392 *** as such. This will affect the creation of libtool libraries that
3393 *** depend on shared libraries, but programs linked with such libtool
3394 *** libraries will work regardless of this problem. Nevertheless, you
3395 *** may want to report the problem to your system manager and/or to
3396 *** bug-libtool@gnu.org
3406 MAGIC_CMD="$ac_save_MAGIC_CMD"
3409 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3410 if test -n "$MAGIC_CMD"; then
3411 AC_MSG_RESULT($MAGIC_CMD)
3418 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3419 AC_DEFUN([AC_PATH_MAGIC],
3420 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3421 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3422 if test -z "$lt_cv_path_MAGIC_CMD"; then
3423 if test -n "$ac_tool_prefix"; then
3424 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3432 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3433 AC_DEFUN([AC_PROG_LD],
3434 [AC_ARG_WITH(gnu-ld,
3435 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3436 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3437 AC_REQUIRE([AC_PROG_CC])dnl
3438 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3439 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3440 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3442 if test "$GCC" = yes; then
3443 # Check if gcc -print-prog-name=ld gives a path.
3444 AC_MSG_CHECKING([for ld used by GCC])
3447 # gcc leaves a trailing carriage return which upsets mingw
3448 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3450 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3453 # Accept absolute paths.
3454 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3455 re_direlt='/[[^/]][[^/]]*/\.\./'
3456 # Canonicalize the path of ld
3457 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3458 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3459 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3461 test -z "$LD" && LD="$ac_prog"
3464 # If it fails, then pretend we aren't using GCC.
3468 # If it is relative, then search for the first ld in PATH.
3472 elif test "$with_gnu_ld" = yes; then
3473 AC_MSG_CHECKING([for GNU ld])
3475 AC_MSG_CHECKING([for non-GNU ld])
3477 AC_CACHE_VAL(lt_cv_path_LD,
3478 [if test -z "$LD"; then
3479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3480 for ac_dir in $PATH; do
3481 test -z "$ac_dir" && ac_dir=.
3482 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3483 lt_cv_path_LD="$ac_dir/$ac_prog"
3484 # Check to see if the program is GNU ld. I'd rather use --version,
3485 # but apparently some GNU ld's only accept -v.
3486 # Break only if it was the GNU/non-GNU ld that we prefer.
3487 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3488 test "$with_gnu_ld" != no && break
3490 test "$with_gnu_ld" != yes && break
3496 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3499 if test -n "$LD"; then
3504 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3509 AC_DEFUN([AC_PROG_LD_GNU],
3510 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3511 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3512 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3513 lt_cv_prog_gnu_ld=yes
3515 lt_cv_prog_gnu_ld=no
3517 with_gnu_ld=$lt_cv_prog_gnu_ld
3520 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3521 # -- PORTME Some linkers may need a different reload flag.
3522 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3523 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3524 [lt_cv_ld_reload_flag='-r'])
3525 reload_flag=$lt_cv_ld_reload_flag
3526 test -n "$reload_flag" && reload_flag=" $reload_flag"
3529 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3530 # -- PORTME fill in with the dynamic library characteristics
3531 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3532 [AC_CACHE_CHECK([how to recognise dependant libraries],
3533 lt_cv_deplibs_check_method,
3534 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3535 lt_cv_file_magic_test_file=
3536 lt_cv_deplibs_check_method='unknown'
3537 # Need to set the preceding variable on all platforms that support
3538 # interlibrary dependencies.
3539 # 'none' -- dependencies not supported.
3540 # `unknown' -- same as none, but documents that we really don't know.
3541 # 'pass_all' -- all dependencies passed with no checks.
3542 # 'test_compile' -- check by making test program.
3543 # 'file_magic [[regex]]' -- check by looking for files in library path
3544 # which responds to the $file_magic_cmd with a given egrep regex.
3545 # If you have `file' or equivalent on your system and you're not sure
3546 # whether `pass_all' will *always* work, you probably want this one.
3550 lt_cv_deplibs_check_method=pass_all
3554 lt_cv_deplibs_check_method=pass_all
3558 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3559 lt_cv_file_magic_cmd='/usr/bin/file -L'
3560 lt_cv_file_magic_test_file=/shlib/libc.so
3563 cygwin* | mingw* | pw32*)
3564 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3565 lt_cv_file_magic_cmd='$OBJDUMP -f'
3568 darwin* | rhapsody*)
3569 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3570 lt_cv_file_magic_cmd='/usr/bin/file -L'
3572 rhapsody* | darwin1.[[012]])
3573 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3576 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3582 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3585 # Not sure whether the presence of OpenBSD here was a mistake.
3586 # Let's accept both of them until this is cleared up.
3587 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3588 lt_cv_file_magic_cmd=/usr/bin/file
3589 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3593 lt_cv_deplibs_check_method=pass_all
3598 lt_cv_deplibs_check_method=pass_all
3602 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3603 lt_cv_file_magic_cmd=/usr/bin/file
3604 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3610 # this will be overridden with pass_all, but let us keep it just in case
3611 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3615 *-32|*"-32 ") libmagic=32-bit;;
3616 *-n32|*"-n32 ") libmagic=N32;;
3617 *-64|*"-64 ") libmagic=64-bit;;
3618 *) libmagic=never-match;;
3620 # this will be overridden with pass_all, but let us keep it just in case
3621 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3624 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3625 lt_cv_deplibs_check_method=pass_all
3628 # This must be Linux ELF.
3631 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3632 lt_cv_deplibs_check_method=pass_all ;;
3634 # glibc up to 2.1.1 does not perform some relocations on ARM
3635 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3637 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3641 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3642 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3644 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3649 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3650 lt_cv_file_magic_cmd=/usr/bin/file
3651 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3655 lt_cv_file_magic_cmd=/usr/bin/file
3656 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3657 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3658 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3660 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3664 osf3* | osf4* | osf5*)
3665 # this will be overridden with pass_all, but let us keep it just in case
3666 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3667 lt_cv_file_magic_test_file=/shlib/libc.so
3668 lt_cv_deplibs_check_method=pass_all
3672 lt_cv_deplibs_check_method=pass_all
3676 lt_cv_deplibs_check_method=pass_all
3677 lt_cv_file_magic_test_file=/lib/libc.so
3680 sysv5uw[[78]]* | sysv4*uw2*)
3681 lt_cv_deplibs_check_method=pass_all
3684 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3685 case $host_vendor in
3687 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]]'
3688 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3691 lt_cv_deplibs_check_method=pass_all
3694 lt_cv_file_magic_cmd='/bin/file'
3695 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3698 lt_cv_file_magic_cmd='/bin/file'
3699 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3700 lt_cv_file_magic_test_file=/lib/libc.so
3706 file_magic_cmd=$lt_cv_file_magic_cmd
3707 deplibs_check_method=$lt_cv_deplibs_check_method
3711 # AC_PROG_NM - find the path to a BSD-compatible name lister
3712 AC_DEFUN([AC_PROG_NM],
3713 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3714 AC_MSG_CHECKING([for BSD-compatible nm])
3715 AC_CACHE_VAL(lt_cv_path_NM,
3716 [if test -n "$NM"; then
3717 # Let the user override the test.
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3721 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3722 test -z "$ac_dir" && ac_dir=.
3723 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3724 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3725 # Check to see if the nm accepts a BSD-compat flag.
3726 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3727 # nm: unknown option "B" ignored
3728 # Tru64's nm complains that /dev/null is an invalid object file
3729 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3730 lt_cv_path_NM="$tmp_nm -B"
3732 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3733 lt_cv_path_NM="$tmp_nm -p"
3736 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3737 continue # so that we can try to find one that supports BSD flags
3742 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3745 AC_MSG_RESULT([$NM])
3748 # AC_CHECK_LIBM - check for math library
3749 AC_DEFUN([AC_CHECK_LIBM],
3750 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3753 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3754 # These system don't have libm
3757 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3758 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3761 AC_CHECK_LIB(m, main, LIBM="-lm")
3766 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3767 # the libltdl convenience library and INCLTDL to the include flags for
3768 # the libltdl header and adds --enable-ltdl-convenience to the
3769 # configure arguments. Note that LIBLTDL and INCLTDL are not
3770 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3771 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3772 # with '${top_builddir}/' and INCLTDL will be prefixed with
3773 # '${top_srcdir}/' (note the single quotes!). If your package is not
3774 # flat and you're not using automake, define top_builddir and
3775 # top_srcdir appropriately in the Makefiles.
3776 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3777 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3778 case $enable_ltdl_convenience in
3779 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3780 "") enable_ltdl_convenience=yes
3781 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3783 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3784 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3787 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3788 # the libltdl installable library and INCLTDL to the include flags for
3789 # the libltdl header and adds --enable-ltdl-install to the configure
3790 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
3791 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3792 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3793 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
3794 # with '${top_srcdir}/' (note the single quotes!). If your package is
3795 # not flat and you're not using automake, define top_builddir and
3796 # top_srcdir appropriately in the Makefiles.
3797 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3798 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3799 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3800 AC_CHECK_LIB(ltdl, main,
3801 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3802 [if test x"$enable_ltdl_install" = xno; then
3803 AC_MSG_WARN([libltdl not installed, but installation disabled])
3805 enable_ltdl_install=yes
3808 if test x"$enable_ltdl_install" = x"yes"; then
3809 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3810 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3811 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3813 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3820 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3821 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3822 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3823 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3824 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3825 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3826 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3828 # This is just to silence aclocal about the macro not being used
3829 ifelse([AC_DISABLE_FAST_INSTALL])
3831 # -- embedded libtool.m4 ends here --