1 # generated automatically by aclocal 1.7.9 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
15 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
16 dnl This file is free software, distributed under the terms of the GNU
17 dnl General Public License. As a special exception to the GNU General
18 dnl Public License, this file may be distributed as part of a program
19 dnl that contains a configuration script generated by Autoconf, under
20 dnl the same distribution terms as the rest of that program.
22 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
26 AC_DEFUN([CL_AS_UNDERSCORE],
27 [AC_BEFORE([$0], [CL_GLOBAL_CONSTRUCTORS])
28 m4_pattern_allow([^AS_UNDERSCORE$])
29 AC_CACHE_CHECK(for underscore in external names, cl_cv_prog_as_underscore, [
30 cat > conftest.c <<EOF
34 int foo() { return 0; }
36 # look for the assembly language name in the .s file
37 AC_TRY_COMMAND(${CC-cc} -S conftest.c) >/dev/null 2>&1
38 if grep _foo conftest.s >/dev/null ; then
39 cl_cv_prog_as_underscore=yes
41 cl_cv_prog_as_underscore=no
45 if test $cl_cv_prog_as_underscore = yes; then
47 AC_DEFINE(ASM_UNDERSCORE,,[symbols are prefixed by an underscore in assembly language])
51 AC_SUBST(AS_UNDERSCORE)dnl
54 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
55 dnl This file is free software, distributed under the terms of the GNU
56 dnl General Public License. As a special exception to the GNU General
57 dnl Public License, this file may be distributed as part of a program
58 dnl that contains a configuration script generated by Autoconf, under
59 dnl the same distribution terms as the rest of that program.
61 dnl From Bruno Haible, Marcus Daniels.
65 AC_DEFUN([CL_GLOBAL_CONSTRUCTORS],
66 [AC_REQUIRE([CL_AS_UNDERSCORE])dnl
67 if test -n "$GCC"; then
68 AC_CACHE_CHECK(for the global constructors function prefix,
69 cl_cv_cplusplus_ctorprefix, [
70 cat > conftest.cc << EOF
71 struct foo { foo (); };
74 # look for the assembly language name in the .s file
75 AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -S conftest.cc) >/dev/null 2>&1
76 if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
77 cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
79 if grep '_GLOBAL_\.I\.foobar' conftest.s >/dev/null ; then
80 cl_cv_cplusplus_ctorprefix='_GLOBAL_.I.'
82 if grep '_GLOBAL__I_foobar' conftest.s >/dev/null ; then
83 cl_cv_cplusplus_ctorprefix='_GLOBAL__I_'
85 cl_cv_cplusplus_ctorprefix=unknown
91 if test "$cl_cv_cplusplus_ctorprefix" '!=' unknown; then
92 ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
93 AC_DEFINE_UNQUOTED(CL_GLOBAL_CONSTRUCTOR_PREFIX,$ac_value)
94 AC_CACHE_CHECK(for the global destructors function prefix,
95 cl_cv_cplusplus_dtorprefix, [
96 cat > conftest.cc << EOF
97 struct foo { foo (); ~ foo (); };
100 # look for the assembly language name in the .s file
101 AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -S conftest.cc) >/dev/null 2>&1
102 if grep '_GLOBAL_\$D\$foobar' conftest.s >/dev/null ; then
103 cl_cv_cplusplus_dtorprefix='_GLOBAL_$D$'
105 if grep '_GLOBAL_\.D\.foobar' conftest.s >/dev/null ; then
106 cl_cv_cplusplus_dtorprefix='_GLOBAL_.D.'
108 if grep '_GLOBAL__D_foobar' conftest.s >/dev/null ; then
109 cl_cv_cplusplus_dtorprefix='_GLOBAL__D_'
111 cl_cv_cplusplus_dtorprefix=none
117 if test "$cl_cv_cplusplus_dtorprefix" '!=' none; then
118 ac_value='"'"$cl_cv_cplusplus_ctorprefix"'"'
119 AC_DEFINE_UNQUOTED(CL_GLOBAL_DESTRUCTOR_PREFIX,$ac_value)
121 dnl Check whether the global constructors/destructors functions are file-scope
122 dnl only by default. This is the case in egcs-1.1.2 or newer.
123 AC_CACHE_CHECK(whether the global constructors function need to be exported,
124 cl_cv_cplusplus_ctorexport, [
125 cat > conftest1.cc << EOF
126 struct foo { foo (); };
129 cat > conftest2.cc << EOF
130 #include "confdefs.h"
131 #ifdef ASM_UNDERSCORE
132 #define ASM_UNDERSCORE_PREFIX "_"
134 #define ASM_UNDERSCORE_PREFIX ""
136 struct foo { foo (); };
138 extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
139 int main() { ctor(); return 0; }
141 if AC_TRY_COMMAND(${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5) >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
142 cl_cv_cplusplus_ctorexport=no
144 cl_cv_cplusplus_ctorexport=yes
148 if test "$cl_cv_cplusplus_ctorexport" = yes; then
149 AC_DEFINE(CL_NEED_GLOBALIZE_CTORDTOR)
155 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
156 dnl This file is free software, distributed under the terms of the GNU
157 dnl General Public License. As a special exception to the GNU General
158 dnl Public License, this file may be distributed as part of a program
159 dnl that contains a configuration script generated by Autoconf, under
160 dnl the same distribution terms as the rest of that program.
162 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
166 dnl without AC_MSG_...: with AC_MSG_... and caching:
167 dnl AC_TRY_CPP CL_CPP_CHECK
168 dnl AC_TRY_COMPILE CL_COMPILE_CHECK
169 dnl AC_TRY_LINK CL_LINK_CHECK
170 dnl AC_TRY_RUN CL_RUN_CHECK - would require cross-compiling support
172 dnl AC_TRY_CPP(INCLUDES,
173 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
174 dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
176 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
177 dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
178 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
179 dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
180 dnl INCLUDES, FUNCTION-BODY,
181 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
183 AC_DEFUN([CL_CPP_CHECK],
184 [AC_MSG_CHECKING(for $1)
186 AC_TRY_CPP([$3], $2=yes, $2=no)
189 if test [$]$2 = yes; then
190 ifelse([$4], , :, [$4])
191 ifelse([$5], , , [else
197 AC_DEFUN([CL_COMPILE_CHECK],
198 [AC_MSG_CHECKING(for $1)
200 AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
203 if test [$]$2 = yes; then
204 ifelse([$5], , :, [$5])
205 ifelse([$6], , , [else
211 AC_DEFUN([CL_LINK_CHECK],
212 [AC_MSG_CHECKING(for $1)
214 AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
217 if test [$]$2 = yes; then
218 ifelse([$5], , :, [$5])
219 ifelse([$6], , , [else
225 dnl CL_SILENT(ACTION)
226 dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
227 AC_DEFUN([CL_SILENT],
228 [pushdef([AC_MSG_CHECKING],[:])dnl
229 pushdef([AC_CHECKING],[:])dnl
230 pushdef([AC_MSG_RESULT],[:])dnl
232 popdef([AC_MSG_RESULT])dnl
233 popdef([AC_CHECKING])dnl
234 popdef([AC_MSG_CHECKING])dnl
237 dnl Expands to the "extern ..." prefix used for system declarations.
239 AC_DEFUN([AC_LANG_EXTERN],
246 AC_DEFUN([CL_CC_WORKS],
247 [AC_CACHE_CHECK(whether CC works at all, cl_cv_prog_cc_works, [
250 AC_TRY_RUN([int main() { exit(0); }],
251 cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no,
252 AC_TRY_LINK([], [], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no))
255 case "$cl_cv_prog_cc_works" in
256 *no) echo "Installation or configuration problem: C compiler cannot create executables."; exit 1;;
261 AC_DEFUN([CL_CONFIG_SUBDIRS],
262 [dnl No AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
263 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])
264 AC_CONFIG_SUBDIRS([$1])dnl
267 AC_DEFUN([CL_CANONICAL_HOST],
268 [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS])
269 dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it.
270 ac_aux_dir=${srcdir}/$1
271 dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
272 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
273 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
274 dnl We have defined $ac_aux_dir.
275 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
276 dnl In autoconf-2.52, a single AC_CANONICAL_HOST has the effect of inserting
277 dnl the code of AC_CANONICAL_BUILD *before* CL_CANONICAL_HOST, i.e. before
278 dnl ac_aux_dir has been set. To work around this, we list AC_CANONICAL_BUILD
284 AC_DEFUN([CL_CANONICAL_HOST_CPU],
285 [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
291 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
294 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
300 c1 | c2 | c32 | c34 | c38 | c4 )
308 AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
310 [#if defined(_MIPS_SZLONG)
311 #if (_MIPS_SZLONG == 64)
312 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
316 ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
318 if test $cl_cv_host_mips64 = yes; then
322 dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
323 dnl still generates 32-bit code.
325 AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
327 [#if defined(__sparcv9) || defined(__arch64__)
330 ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
332 if test $cl_cv_host_sparc64 = yes; then
339 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
340 cat >> confdefs.h <<EOF
341 #ifndef __${host_cpu}__
342 #define __${host_cpu}__ 1
347 AC_DEFUN([CL_CANONICAL_HOST_CPU_FOR_FFCALL],
348 [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
354 alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
357 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
363 c1 | c2 | c32 | c34 | c38 | c4 )
371 AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
373 [#if defined(_MIPS_SZLONG)
374 #if (_MIPS_SZLONG == 64)
375 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
379 ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
381 if test $cl_cv_host_mips64 = yes; then
384 AC_CACHE_CHECK([for MIPS with n32 ABI], cl_cv_host_mipsn32, [
385 dnl Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU
386 dnl identification (-mips[12] or -mips[34]). But -n32 is commonly used together
387 dnl with -mips3, and it's easier to test the CPU identification.
392 ], cl_cv_host_mipsn32=yes, cl_cv_host_mipsn32=no)
394 if test $cl_cv_host_mipsn32 = yes; then
399 dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
400 dnl still generates 32-bit code.
402 AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
404 [#if defined(__sparcv9) || defined(__arch64__)
407 ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
409 if test $cl_cv_host_sparc64 = yes; then
416 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
417 cat >> confdefs.h <<EOF
418 #ifndef __${host_cpu}__
419 #define __${host_cpu}__ 1
424 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
426 # serial 46 AC_PROG_LIBTOOL
428 AC_DEFUN([AC_PROG_LIBTOOL],
429 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
431 # This can be used to rebuild libtool when needed
432 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
434 # Always use our own libtool.
435 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
438 # Prevent multiple expansion
439 define([AC_PROG_LIBTOOL], [])
442 AC_DEFUN([AC_LIBTOOL_SETUP],
444 AC_REQUIRE([AC_ENABLE_SHARED])dnl
445 AC_REQUIRE([AC_ENABLE_STATIC])dnl
446 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
447 AC_REQUIRE([AC_CANONICAL_HOST])dnl
448 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
449 AC_REQUIRE([AC_PROG_CC])dnl
450 AC_REQUIRE([AC_PROG_LD])dnl
451 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
452 AC_REQUIRE([AC_PROG_NM])dnl
453 AC_REQUIRE([LT_AC_PROG_SED])dnl
455 AC_REQUIRE([AC_PROG_LN_S])dnl
456 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
457 AC_REQUIRE([AC_OBJEXT])dnl
458 AC_REQUIRE([AC_EXEEXT])dnl
461 _LT_AC_PROG_ECHO_BACKSLASH
462 # Only perform the check for file, if the check method requires it
463 case $deplibs_check_method in
465 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
471 AC_CHECK_TOOL(RANLIB, ranlib, :)
472 AC_CHECK_TOOL(STRIP, strip, :)
474 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
475 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
476 enable_win32_dll=yes, enable_win32_dll=no)
478 AC_ARG_ENABLE(libtool-lock,
479 [ --disable-libtool-lock avoid locking (might break parallel builds)])
480 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
482 # Some flags need to be propagated to the compiler or linker for good
486 # Find out which ABI we are using.
487 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
488 if AC_TRY_EVAL(ac_compile); then
489 case `/usr/bin/file conftest.$ac_objext` in
505 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
506 SAVE_CFLAGS="$CFLAGS"
507 CFLAGS="$CFLAGS -belf"
508 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
511 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
513 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
514 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
515 CFLAGS="$SAVE_CFLAGS"
519 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
520 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
521 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
522 AC_CHECK_TOOL(AS, as, false)
523 AC_CHECK_TOOL(OBJDUMP, objdump, false)
525 # recent cygwin and mingw systems supply a stub DllMain which the user
526 # can override, but on older systems we have to supply one
527 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
529 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
531 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
534 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
535 # old mingw systems require "-dll" to link a DLL, while more recent ones
537 SAVE_CFLAGS="$CFLAGS"
538 CFLAGS="$CFLAGS -mdll"
539 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
540 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
541 CFLAGS="$SAVE_CFLAGS" ;;
542 *-*-cygwin* | *-*-pw32*)
543 # cygwin systems need to pass --dll to the linker, and not link
544 # crt.o which will require a WinMain@16 definition.
545 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
555 # AC_LIBTOOL_HEADER_ASSERT
556 # ------------------------
557 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
558 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
559 [lt_cv_func_assert_works],
562 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
563 case `$CC --version 2>/dev/null` in
564 [[12]].*) lt_cv_func_assert_works=no ;;
565 *) lt_cv_func_assert_works=yes ;;
571 if test "x$lt_cv_func_assert_works" = xyes; then
572 AC_CHECK_HEADERS(assert.h)
574 ])# AC_LIBTOOL_HEADER_ASSERT
577 # --------------------
578 AC_DEFUN([_LT_AC_CHECK_DLFCN],
579 [AC_CHECK_HEADERS(dlfcn.h)
580 ])# _LT_AC_CHECK_DLFCN
582 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
583 # ---------------------------------
584 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
585 [AC_REQUIRE([AC_CANONICAL_HOST])
586 AC_REQUIRE([AC_PROG_NM])
587 AC_REQUIRE([AC_OBJEXT])
588 # Check for command to grab the raw symbol name followed by C symbol from nm.
589 AC_MSG_CHECKING([command to parse $NM output])
590 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
592 # These are sane defaults that work on at least a few old systems.
593 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
595 # Character class describing NM global symbol codes.
596 symcode='[[BCDEGRST]]'
598 # Regexp to match symbols that can be accessed directly from C.
599 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
601 # Transform the above into a raw symbol and a C symbol.
604 # Transform an extracted symbol line into a proper C declaration
605 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
607 # Transform an extracted symbol line into symbol name and symbol address
608 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'"
610 # Define system-specific variables.
615 cygwin* | mingw* | pw32*)
616 symcode='[[ABCDGISTW]]'
618 hpux*) # Its linker distinguishes data from code symbols
619 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
620 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'"
623 symcode='[[BCDEGRST]]'
626 symcode='[[BCDEGQRST]]'
636 # Handle CRLF in mingw tool chain
640 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
644 # If we're using GNU nm, then use its standard symbol codes.
645 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
646 symcode='[[ABCDGISTW]]'
649 # Try without a prefix undercore, then with it.
650 for ac_symprfx in "" "_"; do
652 # Write the raw and C identifiers.
653 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
655 # Check to see that the pipe works correctly.
658 cat > conftest.$ac_ext <<EOF
663 void nm_test_func(){}
667 int main(){nm_test_var='a';nm_test_func();return(0);}
670 if AC_TRY_EVAL(ac_compile); then
671 # Now try to grab the symbols.
673 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
674 # Try sorting and uniquifying the output.
675 if sort "$nlist" | uniq > "$nlist"T; then
676 mv -f "$nlist"T "$nlist"
681 # Make sure that we snagged all the symbols we need.
682 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
683 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
684 cat <<EOF > conftest.$ac_ext
690 # Now generate the symbol file.
691 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
693 cat <<EOF >> conftest.$ac_ext
694 #if defined (__STDC__) && __STDC__
695 # define lt_ptr void *
697 # define lt_ptr char *
701 /* The mapping between symbol names and symbols. */
706 lt_preloaded_symbols[[]] =
709 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
710 cat <<\EOF >> conftest.$ac_ext
718 # Now try linking the two files.
719 mv conftest.$ac_objext conftstm.$ac_objext
721 save_CFLAGS="$CFLAGS"
722 LIBS="conftstm.$ac_objext"
723 CFLAGS="$CFLAGS$no_builtin_flag"
724 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
728 CFLAGS="$save_CFLAGS"
730 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
733 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
736 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
739 echo "$progname: failed program was:" >&AC_FD_CC
740 cat conftest.$ac_ext >&5
742 rm -f conftest* conftst*
744 # Do not use the global_symbol_pipe unless it works.
745 if test "$pipe_works" = yes; then
748 lt_cv_sys_global_symbol_pipe=
752 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
753 if test -z "$lt_cv_sys_global_symbol_pipe"; then
754 global_symbol_to_cdecl=
755 global_symbol_to_c_name_address=
757 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
758 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
760 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
762 AC_MSG_RESULT(failed)
766 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
768 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
769 # ---------------------------------
770 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
771 [# Find the correct PATH separator. Usually this is `:', but
772 # DJGPP uses `;' like DOS.
773 if test "X${PATH_SEPARATOR+set}" != Xset; then
774 UNAME=${UNAME-`uname 2>/dev/null`}
776 *-DOS) lt_cv_sys_path_separator=';' ;;
777 *) lt_cv_sys_path_separator=':' ;;
779 PATH_SEPARATOR=$lt_cv_sys_path_separator
781 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
783 # _LT_AC_PROG_ECHO_BACKSLASH
784 # --------------------------
785 # Add some code to the start of the generated configure script which
786 # will find an echo command which doesn't interpret backslashes.
787 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
788 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
789 [AC_DIVERT_PUSH(NOTICE)])
790 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
792 # Check that we are running under the correct shell.
793 SHELL=${CONFIG_SHELL-/bin/sh}
797 # Remove one level of quotation (which was required for Make).
798 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
803 if test "X[$]1" = X--no-reexec; then
804 # Discard the --no-reexec flag, and continue.
806 elif test "X[$]1" = X--fallback-echo; then
807 # Avoid inline document here, it may be left over
809 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
810 # Yippee, $echo works!
813 # Restart under the correct shell.
814 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
817 if test "X[$]1" = X--fallback-echo; then
818 # used as fallback echo
826 # The HP-UX ksh and POSIX shell print the target directory to stdout
828 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
830 if test -z "$ECHO"; then
831 if test "X${echo_test_string+set}" != Xset; then
832 # find a string as large as possible, as long as the shell can cope with it
833 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
834 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
835 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
836 echo_test_string="`eval $cmd`" &&
837 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
844 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
845 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
846 test "X$echo_testing_string" = "X$echo_test_string"; then
849 # The Solaris, AIX, and Digital Unix default echo programs unquote
850 # backslashes. This makes it impossible to quote backslashes using
851 # echo "$something" | sed 's/\\/\\\\/g'
853 # So, first we look for a working echo in the user's PATH.
855 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
856 for dir in $PATH /usr/ucb; do
857 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
858 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
859 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
860 test "X$echo_testing_string" = "X$echo_test_string"; then
867 if test "X$echo" = Xecho; then
868 # We didn't find a better echo, so look for alternatives.
869 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
870 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
871 test "X$echo_testing_string" = "X$echo_test_string"; then
872 # This shell has a builtin print -r that does the trick.
874 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
875 test "X$CONFIG_SHELL" != X/bin/ksh; then
876 # If we have ksh, try running configure again with it.
877 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
878 export ORIGINAL_CONFIG_SHELL
879 CONFIG_SHELL=/bin/ksh
881 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
885 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
886 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
887 test "X$echo_testing_string" = "X$echo_test_string"; then
890 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
891 test "X$echo_testing_string" = 'X\t' &&
892 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
893 test "X$echo_testing_string" = "X$echo_test_string"; then
894 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
896 SHELL="$CONFIG_SHELL"
898 echo="$CONFIG_SHELL [$]0 --fallback-echo"
899 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
900 test "X$echo_testing_string" = 'X\t' &&
901 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
902 test "X$echo_testing_string" = "X$echo_test_string"; then
903 echo="$CONFIG_SHELL [$]0 --fallback-echo"
905 # maybe with a smaller string...
908 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
909 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
916 if test "$prev" != 'sed 50q "[$]0"'; then
917 echo_test_string=`eval $prev`
918 export echo_test_string
919 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
921 # Oops. We lost completely, so just stick with echo.
930 # Copy echo and quote the copy suitably for passing to libtool from
931 # the Makefile, instead of quoting the original, which is used later.
933 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
934 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
939 ])# _LT_AC_PROG_ECHO_BACKSLASH
941 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
942 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
943 # ------------------------------------------------------------------
944 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
945 [if test "$cross_compiling" = yes; then :
948 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
949 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
950 lt_status=$lt_dlunknown
951 cat > conftest.$ac_ext <<EOF
952 [#line __oline__ "configure"
953 #include "confdefs.h"
962 # define LT_DLGLOBAL RTLD_GLOBAL
965 # define LT_DLGLOBAL DL_GLOBAL
967 # define LT_DLGLOBAL 0
971 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
972 find out it does not work in some platform. */
973 #ifndef LT_DLLAZY_OR_NOW
975 # define LT_DLLAZY_OR_NOW RTLD_LAZY
978 # define LT_DLLAZY_OR_NOW DL_LAZY
981 # define LT_DLLAZY_OR_NOW RTLD_NOW
984 # define LT_DLLAZY_OR_NOW DL_NOW
986 # define LT_DLLAZY_OR_NOW 0
994 extern "C" void exit (int);
997 void fnord() { int i=42;}
1000 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1001 int status = $lt_dlunknown;
1005 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1006 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1007 /* dlclose (self); */
1013 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1014 (./conftest; exit; ) 2>/dev/null
1017 x$lt_dlno_uscore) $1 ;;
1018 x$lt_dlneed_uscore) $2 ;;
1019 x$lt_unknown|x*) $3 ;;
1022 # compilation failed
1027 ])# _LT_AC_TRY_DLOPEN_SELF
1029 # AC_LIBTOOL_DLOPEN_SELF
1030 # -------------------
1031 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1032 [if test "x$enable_dlopen" != xyes; then
1033 enable_dlopen=unknown
1034 enable_dlopen_self=unknown
1035 enable_dlopen_self_static=unknown
1042 lt_cv_dlopen="load_add_on"
1044 lt_cv_dlopen_self=yes
1047 cygwin* | mingw* | pw32*)
1048 lt_cv_dlopen="LoadLibrary"
1053 AC_CHECK_FUNC([shl_load],
1054 [lt_cv_dlopen="shl_load"],
1055 [AC_CHECK_LIB([dld], [shl_load],
1056 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1057 [AC_CHECK_FUNC([dlopen],
1058 [lt_cv_dlopen="dlopen"],
1059 [AC_CHECK_LIB([dl], [dlopen],
1060 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1061 [AC_CHECK_LIB([svld], [dlopen],
1062 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1063 [AC_CHECK_LIB([dld], [dld_link],
1064 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1073 if test "x$lt_cv_dlopen" != xno; then
1079 case $lt_cv_dlopen in
1081 save_CPPFLAGS="$CPPFLAGS"
1082 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1083 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1085 save_LDFLAGS="$LDFLAGS"
1086 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1089 LIBS="$lt_cv_dlopen_libs $LIBS"
1091 AC_CACHE_CHECK([whether a program can dlopen itself],
1092 lt_cv_dlopen_self, [dnl
1093 _LT_AC_TRY_DLOPEN_SELF(
1094 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1095 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1098 if test "x$lt_cv_dlopen_self" = xyes; then
1099 LDFLAGS="$LDFLAGS $link_static_flag"
1100 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1101 lt_cv_dlopen_self_static, [dnl
1102 _LT_AC_TRY_DLOPEN_SELF(
1103 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1104 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1108 CPPFLAGS="$save_CPPFLAGS"
1109 LDFLAGS="$save_LDFLAGS"
1114 case $lt_cv_dlopen_self in
1115 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1116 *) enable_dlopen_self=unknown ;;
1119 case $lt_cv_dlopen_self_static in
1120 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1121 *) enable_dlopen_self_static=unknown ;;
1124 ])# AC_LIBTOOL_DLOPEN_SELF
1126 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1127 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1128 # Sed substitution that helps us do robust quoting. It backslashifies
1129 # metacharacters that are still active within double-quoted strings.
1130 Xsed='sed -e s/^X//'
1131 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1133 # Same as above, but do not quote variable references.
1134 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1136 # Sed substitution to delay expansion of an escaped shell variable in a
1137 # double_quote_subst'ed string.
1138 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1144 default_ofile=libtool
1145 can_build_shared=yes
1147 # All known linkers require a `.a' archive for static linking (except M$VC,
1148 # which needs '.lib').
1150 ltmain="$ac_aux_dir/ltmain.sh"
1151 ofile="$default_ofile"
1152 with_gnu_ld="$lt_cv_prog_gnu_ld"
1153 need_locks="$enable_libtool_lock"
1156 old_CFLAGS="$CFLAGS"
1158 # Set sane defaults for various variables
1159 test -z "$AR" && AR=ar
1160 test -z "$AR_FLAGS" && AR_FLAGS=cru
1161 test -z "$AS" && AS=as
1162 test -z "$CC" && CC=cc
1163 test -z "$DLLTOOL" && DLLTOOL=dlltool
1164 test -z "$LD" && LD=ld
1165 test -z "$LN_S" && LN_S="ln -s"
1166 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1167 test -z "$NM" && NM=nm
1168 test -z "$OBJDUMP" && OBJDUMP=objdump
1169 test -z "$RANLIB" && RANLIB=:
1170 test -z "$STRIP" && STRIP=:
1171 test -z "$ac_objext" && ac_objext=o
1173 if test x"$host" != x"$build"; then
1174 ac_tool_prefix=${host_alias}-
1179 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1182 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1187 # AIX sometimes has problems with the GCC collect2 program. For some
1188 # reason, if we set the COLLECT_NAMES environment variable, the problems
1189 # vanish in a puff of smoke.
1190 if test "X${COLLECT_NAMES+set}" != Xset; then
1192 export COLLECT_NAMES
1197 # Determine commands to create old-style static archives.
1198 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1199 old_postinstall_cmds='chmod 644 $oldlib'
1200 old_postuninstall_cmds=
1202 if test -n "$RANLIB"; then
1205 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1208 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1211 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1214 # Allow CC to be a program name with arguments.
1218 AC_MSG_CHECKING([for objdir])
1219 rm -f .libs 2>/dev/null
1220 mkdir .libs 2>/dev/null
1221 if test -d .libs; then
1224 # MS-DOS does not allow filenames that begin with a dot.
1227 rmdir .libs 2>/dev/null
1228 AC_MSG_RESULT($objdir)
1232 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1233 pic_mode="$withval", pic_mode=default)
1234 test -z "$pic_mode" && pic_mode=default
1236 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1237 # in isolation, and that seeing it set (from the cache) indicates that
1238 # the associated values are set (in the cache) correctly too.
1239 AC_MSG_CHECKING([for $compiler option to produce PIC])
1240 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1241 [ lt_cv_prog_cc_pic=
1242 lt_cv_prog_cc_shlib=
1244 lt_cv_prog_cc_static=
1245 lt_cv_prog_cc_no_builtin=
1246 lt_cv_prog_cc_can_build_shared=$can_build_shared
1248 if test "$GCC" = yes; then
1249 lt_cv_prog_cc_wl='-Wl,'
1250 lt_cv_prog_cc_static='-static'
1254 # Below there is a dirty hack to force normal static linking with -ldl
1255 # The problem is because libdl dynamically linked with both libc and
1256 # libC (AIX C++ library), which obviously doesn't included in libraries
1257 # list by gcc. This cause undefined symbols with -static flags.
1258 # This hack allows C programs to be linked with "-static -ldl", but
1259 # not sure about C++ programs.
1260 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1263 # FIXME: we need at least 68020 code to build shared libraries, but
1264 # adding the `-m68020' flag to GCC prevents building anything better,
1266 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1268 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1269 # PIC is the default for these OSes.
1271 darwin* | rhapsody*)
1272 # PIC is the default on this platform
1273 # Common symbols not allowed in MH_DYLIB files
1274 lt_cv_prog_cc_pic='-fno-common'
1276 cygwin* | mingw* | pw32* | os2*)
1277 # This hack is so that the source file can tell whether it is being
1278 # built for inclusion in a dll (and should export symbols for example).
1279 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1282 if test -d /usr/nec; then
1283 lt_cv_prog_cc_pic=-Kconform_pic
1287 lt_cv_prog_cc_pic='-fPIC'
1291 # PORTME Check for PIC flags for the system compiler.
1293 aix3* | aix4* | aix5*)
1294 lt_cv_prog_cc_wl='-Wl,'
1295 # All AIX code is PIC.
1296 if test "$host_cpu" = ia64; then
1297 # AIX 5 now supports IA64 processor
1298 lt_cv_prog_cc_static='-Bstatic'
1300 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1304 hpux9* | hpux10* | hpux11*)
1305 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1306 lt_cv_prog_cc_wl='-Wl,'
1307 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1308 lt_cv_prog_cc_pic='+Z'
1311 irix5* | irix6* | nonstopux*)
1312 lt_cv_prog_cc_wl='-Wl,'
1313 lt_cv_prog_cc_static='-non_shared'
1314 # PIC (with -KPIC) is the default.
1317 cygwin* | mingw* | pw32* | os2*)
1318 # This hack is so that the source file can tell whether it is being
1319 # built for inclusion in a dll (and should export symbols for example).
1320 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1324 lt_cv_prog_cc_pic='-KPIC'
1325 lt_cv_prog_cc_static='-Bstatic'
1328 osf3* | osf4* | osf5*)
1329 # All OSF/1 code is PIC.
1330 lt_cv_prog_cc_wl='-Wl,'
1331 lt_cv_prog_cc_static='-non_shared'
1335 lt_cv_prog_cc_pic='-Kpic'
1336 lt_cv_prog_cc_static='-dn'
1337 lt_cv_prog_cc_shlib='-belf'
1341 lt_cv_prog_cc_pic='-KPIC'
1342 lt_cv_prog_cc_static='-Bstatic'
1343 lt_cv_prog_cc_wl='-Wl,'
1347 lt_cv_prog_cc_pic='-PIC'
1348 lt_cv_prog_cc_static='-Bstatic'
1349 lt_cv_prog_cc_wl='-Qoption ld '
1352 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1353 lt_cv_prog_cc_pic='-KPIC'
1354 lt_cv_prog_cc_static='-Bstatic'
1355 lt_cv_prog_cc_wl='-Wl,'
1359 lt_cv_prog_cc_pic='-pic'
1360 lt_cv_prog_cc_static='-Bstatic'
1364 if test -d /usr/nec ;then
1365 lt_cv_prog_cc_pic='-Kconform_pic'
1366 lt_cv_prog_cc_static='-Bstatic'
1371 lt_cv_prog_cc_can_build_shared=no
1376 if test -z "$lt_cv_prog_cc_pic"; then
1377 AC_MSG_RESULT([none])
1379 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1381 # Check to make sure the pic_flag actually works.
1382 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1383 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1384 save_CFLAGS="$CFLAGS"
1385 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1386 AC_TRY_COMPILE([], [], [dnl
1388 hpux9* | hpux10* | hpux11*)
1389 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1390 # they create non-PIC objects. So, if there were any warnings, we
1391 # assume that PIC is not supported.
1392 if test -s conftest.err; then
1393 lt_cv_prog_cc_pic_works=no
1395 lt_cv_prog_cc_pic_works=yes
1399 lt_cv_prog_cc_pic_works=yes
1403 lt_cv_prog_cc_pic_works=no
1405 CFLAGS="$save_CFLAGS"
1408 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1410 lt_cv_prog_cc_can_build_shared=no
1412 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1415 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1418 # Check for any special shared library compilation flags.
1419 if test -n "$lt_cv_prog_cc_shlib"; then
1420 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1421 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1423 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1424 lt_cv_prog_cc_can_build_shared=no
1428 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1429 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1430 lt_cv_prog_cc_static_works=no
1431 save_LDFLAGS="$LDFLAGS"
1432 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1433 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1434 LDFLAGS="$save_LDFLAGS"
1437 # Belt *and* braces to stop my trousers falling down:
1438 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1439 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1441 pic_flag="$lt_cv_prog_cc_pic"
1442 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1443 wl="$lt_cv_prog_cc_wl"
1444 link_static_flag="$lt_cv_prog_cc_static"
1445 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1446 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1449 # Check to see if options -o and -c are simultaneously supported by compiler
1450 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1451 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1452 $rm -r conftest 2>/dev/null
1455 echo "int some_variable = 0;" > conftest.$ac_ext
1457 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1458 # that will create temporary files in the current directory regardless of
1459 # the output directory. Thus, making CWD read-only will cause this test
1460 # to fail, enabling locking or at least warning the user not to do parallel
1463 save_CFLAGS="$CFLAGS"
1464 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1466 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1467 # The compiler can only warn and ignore the option if not recognized
1468 # So say no if there are warnings
1469 if test -s out/conftest.err; then
1470 lt_cv_compiler_c_o=no
1472 lt_cv_compiler_c_o=yes
1475 # Append any errors to the config.log.
1476 cat out/conftest.err 1>&AC_FD_CC
1477 lt_cv_compiler_c_o=no
1479 CFLAGS="$save_CFLAGS"
1485 $rm -r conftest 2>/dev/null
1487 compiler_c_o=$lt_cv_compiler_c_o
1488 AC_MSG_RESULT([$compiler_c_o])
1490 if test x"$compiler_c_o" = x"yes"; then
1491 # Check to see if we can write to a .lo
1492 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1493 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1494 lt_cv_compiler_o_lo=no
1495 save_CFLAGS="$CFLAGS"
1496 CFLAGS="$CFLAGS -c -o conftest.lo"
1497 save_objext="$ac_objext"
1499 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1500 # The compiler can only warn and ignore the option if not recognized
1501 # So say no if there are warnings
1502 if test -s conftest.err; then
1503 lt_cv_compiler_o_lo=no
1505 lt_cv_compiler_o_lo=yes
1508 ac_objext="$save_objext"
1509 CFLAGS="$save_CFLAGS"
1511 compiler_o_lo=$lt_cv_compiler_o_lo
1512 AC_MSG_RESULT([$compiler_o_lo])
1517 # Check to see if we can do hard links to lock some files if needed
1518 hard_links="nottested"
1519 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1520 # do not overwrite the value of need_locks provided by the user
1521 AC_MSG_CHECKING([if we can lock with hard links])
1524 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1526 ln conftest.a conftest.b 2>&5 || hard_links=no
1527 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1528 AC_MSG_RESULT([$hard_links])
1529 if test "$hard_links" = no; then
1530 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1537 if test "$GCC" = yes; then
1538 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1539 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1540 echo "int some_variable = 0;" > conftest.$ac_ext
1541 save_CFLAGS="$CFLAGS"
1542 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1543 compiler_rtti_exceptions=no
1544 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1545 # The compiler can only warn and ignore the option if not recognized
1546 # So say no if there are warnings
1547 if test -s conftest.err; then
1548 compiler_rtti_exceptions=no
1550 compiler_rtti_exceptions=yes
1553 CFLAGS="$save_CFLAGS"
1554 AC_MSG_RESULT([$compiler_rtti_exceptions])
1556 if test "$compiler_rtti_exceptions" = "yes"; then
1557 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1559 no_builtin_flag=' -fno-builtin'
1563 # See if the linker supports building shared libraries.
1564 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1566 allow_undefined_flag=
1568 need_lib_prefix=unknown
1569 need_version=unknown
1570 # when you set need_version to no, make sure it does not cause -set_version
1571 # flags to be left without arguments
1573 archive_expsym_cmds=
1574 old_archive_from_new_cmds=
1575 old_archive_from_expsyms_cmds=
1576 export_dynamic_flag_spec=
1577 whole_archive_flag_spec=
1578 thread_safe_flag_spec=
1579 hardcode_into_libs=no
1580 hardcode_libdir_flag_spec=
1581 hardcode_libdir_separator=
1584 hardcode_shlibpath_var=unsupported
1586 link_all_deplibs=unknown
1587 always_export_symbols=no
1588 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1589 # include_expsyms should be a list of space-separated symbols to be *always*
1590 # included in the symbol list
1592 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1593 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1594 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1595 # as well as any symbol that contains `d'.
1596 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1597 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1598 # platforms (ab)use it in PIC code, but their linkers get confused if
1599 # the symbol is explicitly referenced. Since portable code cannot
1600 # rely on this symbol name, it's probably fine to never include it in
1601 # preloaded symbol tables.
1602 extract_expsyms_cmds=
1605 cygwin* | mingw* | pw32*)
1606 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1607 # When not using gcc, we currently assume that we are using
1608 # Microsoft Visual C++.
1609 if test "$GCC" != yes; then
1619 if test "$with_gnu_ld" = yes; then
1620 # If archive_cmds runs LD, not CC, wlarc should be empty
1623 # See if GNU ld supports shared libraries.
1625 aix3* | aix4* | aix5*)
1626 # On AIX, the GNU linker is very broken
1627 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1631 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1632 *** to be unable to reliably create shared libraries on AIX.
1633 *** Therefore, libtool is disabling shared libraries support. If you
1634 *** really care for shared libraries, you may want to modify your PATH
1635 *** so that a non-GNU linker is found, and then restart.
1641 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)'
1642 hardcode_libdir_flag_spec='-L$libdir'
1643 hardcode_minus_L=yes
1645 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1646 # that the semantics of dynamic libraries on AmigaOS, at least up
1647 # to version 4, is to share data among multiple programs linked
1648 # with the same dynamic library. Since this doesn't match the
1649 # behavior of shared libraries on other platforms, we can use
1655 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1656 allow_undefined_flag=unsupported
1657 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1658 # support --undefined. This deserves some investigation. FIXME
1659 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1665 cygwin* | mingw* | pw32*)
1666 # hardcode_libdir_flag_spec is actually meaningless, as there is
1667 # no search path for DLLs.
1668 hardcode_libdir_flag_spec='-L$libdir'
1669 allow_undefined_flag=unsupported
1670 always_export_symbols=yes
1672 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1673 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1674 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1675 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1676 else $CC -o impgen impgen.c ; fi)~
1677 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1679 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1681 # cygwin and mingw dlls have different entry points and sets of symbols
1683 # FIXME: what about values for MSVC?
1684 dll_entry=__cygwin_dll_entry@12
1685 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1689 dll_entry=_DllMainCRTStartup@12
1690 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1694 # mingw and cygwin differ, and it's simplest to just exclude the union
1695 # of the two symbol sets.
1696 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1698 # recent cygwin and mingw systems supply a stub DllMain which the user
1699 # can override, but on older systems we have to supply one (in ltdll.c)
1700 if test "x$lt_cv_need_dllmain" = "xyes"; then
1701 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1702 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~
1703 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1709 # Extract the symbol export list from an `--export-all' def file,
1710 # then regenerate the def file from the symbol export list, so that
1711 # the compiled dll only exports the symbol export list.
1712 # Be careful not to strip the DATA tag left be newer dlltools.
1713 export_symbols_cmds="$ltdll_cmds"'
1714 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1715 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1717 # If the export-symbols file already is a .def file (1st line
1718 # is EXPORTS), use it as is.
1719 # If DATA tags from a recent dlltool are present, honour them!
1720 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1721 cp $export_symbols $output_objdir/$soname-def;
1723 echo EXPORTS > $output_objdir/$soname-def;
1725 cat $export_symbols | while read symbol; do
1728 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1729 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1730 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1732 _lt_hint=`expr 1 + \$_lt_hint`;
1736 $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~
1737 $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~
1738 $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~
1739 $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~
1740 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1744 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1745 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1748 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1749 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1754 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1758 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1759 *** create shared libraries on Solaris systems. Therefore, libtool
1760 *** is disabling shared libraries support. We urge you to upgrade GNU
1761 *** binutils to release 2.9.1 or newer. Another option is to modify
1762 *** your PATH or compiler configuration so that the native linker is
1763 *** used, and then restart.
1766 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1767 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1768 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1775 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1778 hardcode_shlibpath_var=no
1782 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1783 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1784 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1791 if test "$ld_shlibs" = yes; then
1792 runpath_var=LD_RUN_PATH
1793 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1794 export_dynamic_flag_spec='${wl}--export-dynamic'
1796 cygwin* | mingw* | pw32*)
1797 # dlltool doesn't understand --whole-archive et. al.
1798 whole_archive_flag_spec=
1801 # ancient GNU ld didn't support --whole-archive et. al.
1802 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1803 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1805 whole_archive_flag_spec=
1811 # PORTME fill in a description of your system's linker (not GNU ld)
1814 allow_undefined_flag=unsupported
1815 always_export_symbols=yes
1816 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'
1817 # Note: this linker hardcodes the directories in LIBPATH if there
1818 # are no directories specified by -L.
1819 hardcode_minus_L=yes
1820 if test "$GCC" = yes && test -z "$link_static_flag"; then
1821 # Neither direct hardcoding nor static linking is supported with a
1823 hardcode_direct=unsupported
1828 if test "$host_cpu" = ia64; then
1829 # On IA64, the linker does run time linking by default, so we don't
1830 # have to do anything special.
1831 aix_use_runtimelinking=no
1832 exp_sym_flag='-Bexport'
1835 aix_use_runtimelinking=no
1837 # Test if we are trying to use run time linking or normal
1838 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1839 # need to do runtime linking.
1840 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1841 for ld_flag in $LDFLAGS; do
1844 aix_use_runtimelinking=yes
1851 exp_sym_flag='-bexport'
1852 no_entry_flag='-bnoentry'
1855 # When large executables or shared objects are built, AIX ld can
1856 # have problems creating the table of contents. If linking a library
1857 # or program results in "error TOC overflow" add -mminimal-toc to
1858 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1859 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1863 hardcode_libdir_separator=':'
1864 if test "$GCC" = yes; then
1865 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1866 collect2name=`${CC} -print-prog-name=collect2`
1867 if test -f "$collect2name" && \
1868 strings "$collect2name" | grep resolve_lib_name >/dev/null
1870 # We have reworked collect2
1873 # We have old collect2
1874 hardcode_direct=unsupported
1875 # It fails to find uninstalled libraries when the uninstalled
1876 # path is not listed in the libpath. Setting hardcode_minus_L
1877 # to unsupported forces relinking
1878 hardcode_minus_L=yes
1879 hardcode_libdir_flag_spec='-L$libdir'
1880 hardcode_libdir_separator=
1884 shared_flag='-shared'
1887 if test "$host_cpu" = ia64; then
1888 shared_flag='${wl}-G'
1890 if test "$aix_use_runtimelinking" = yes; then
1891 shared_flag='${wl}-G'
1893 shared_flag='${wl}-bM:SRE'
1898 # It seems that -bexpall can do strange things, so it is better to
1899 # generate a list of symbols to export.
1900 always_export_symbols=yes
1901 if test "$aix_use_runtimelinking" = yes; then
1902 # Warning - without using the other runtime loading flags (-brtl),
1903 # -berok will link without error, but may produce a broken library.
1904 allow_undefined_flag='-berok'
1905 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1906 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"
1908 if test "$host_cpu" = ia64; then
1909 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1910 allow_undefined_flag="-z nodefs"
1911 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"
1913 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1914 # Warning - without using the other run time loading flags,
1915 # -berok will link without error, but may produce a broken library.
1916 allow_undefined_flag='${wl}-berok'
1917 # This is a bit strange, but is similar to how AIX traditionally builds
1918 # it's shared libraries.
1919 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'
1925 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)'
1926 hardcode_libdir_flag_spec='-L$libdir'
1927 hardcode_minus_L=yes
1928 # see comment about different semantics on the GNU ld section
1932 cygwin* | mingw* | pw32*)
1933 # When not using gcc, we currently assume that we are using
1934 # Microsoft Visual C++.
1935 # hardcode_libdir_flag_spec is actually meaningless, as there is
1936 # no search path for DLLs.
1937 hardcode_libdir_flag_spec=' '
1938 allow_undefined_flag=unsupported
1939 # Tell ltmain to make .lib files, not .a files.
1941 # FIXME: Setting linknames here is a bad hack.
1942 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1943 # The linker will automatically build a .lib file if we build a DLL.
1944 old_archive_from_new_cmds='true'
1945 # FIXME: Should let the user specify the lib program.
1946 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1947 fix_srcfile_path='`cygpath -w "$srcfile"`'
1950 darwin* | rhapsody*)
1952 rhapsody* | darwin1.[[012]])
1953 allow_undefined_flag='-undefined suppress'
1956 allow_undefined_flag='-flat_namespace -undefined suppress'
1959 # FIXME: Relying on posixy $() will cause problems for
1960 # cross-compilation, but unfortunately the echo tests do not
1961 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
1962 # `"' quotes if we put them in here... so don't!
1963 archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
1964 # We need to add '_' to the symbols in $export_symbols first
1965 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1967 hardcode_shlibpath_var=no
1968 whole_archive_flag_spec='-all_load $convenience'
1975 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1976 # support. Future versions do this automatically, but an explicit c++rt0.o
1977 # does not break anything, and helps significantly (at the cost of a little
1980 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1981 hardcode_libdir_flag_spec='-R$libdir'
1983 hardcode_shlibpath_var=no
1986 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1988 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1990 hardcode_minus_L=yes
1991 hardcode_shlibpath_var=no
1994 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1996 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1997 hardcode_libdir_flag_spec='-R$libdir'
1999 hardcode_shlibpath_var=no
2002 hpux9* | hpux10* | hpux11*)
2004 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' ;;
2005 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2007 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2008 hardcode_libdir_separator=:
2010 hardcode_minus_L=yes # Not in the search PATH, but as the default
2011 # location of the library.
2012 export_dynamic_flag_spec='${wl}-E'
2015 irix5* | irix6* | nonstopux*)
2016 if test "$GCC" = yes; then
2017 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'
2018 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2020 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'
2021 hardcode_libdir_flag_spec='-rpath $libdir'
2023 hardcode_libdir_separator=:
2024 link_all_deplibs=yes
2028 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2029 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2031 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2033 hardcode_libdir_flag_spec='-R$libdir'
2035 hardcode_shlibpath_var=no
2039 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2041 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2042 hardcode_libdir_separator=:
2043 hardcode_shlibpath_var=no
2048 hardcode_shlibpath_var=no
2049 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2050 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2051 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2052 export_dynamic_flag_spec='${wl}-E'
2055 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2056 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2057 hardcode_libdir_flag_spec='-R$libdir'
2060 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2061 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2068 hardcode_libdir_flag_spec='-L$libdir'
2069 hardcode_minus_L=yes
2070 allow_undefined_flag=unsupported
2071 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'
2072 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2076 if test "$GCC" = yes; then
2077 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2078 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'
2080 allow_undefined_flag=' -expect_unresolved \*'
2081 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'
2083 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2084 hardcode_libdir_separator=:
2087 osf4* | osf5*) # as osf3* with the addition of -msym flag
2088 if test "$GCC" = yes; then
2089 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2090 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'
2091 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2093 allow_undefined_flag=' -expect_unresolved \*'
2094 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'
2095 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2096 $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'
2098 #Both c and cxx compiler support -rpath directly
2099 hardcode_libdir_flag_spec='-rpath $libdir'
2101 hardcode_libdir_separator=:
2105 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2106 hardcode_shlibpath_var=no
2107 runpath_var=LD_RUN_PATH
2108 hardcode_runpath_var=yes
2109 export_dynamic_flag_spec='${wl}-Bexport'
2113 # gcc --version < 3.0 without binutils cannot create self contained
2114 # shared libraries reliably, requiring libgcc.a to resolve some of
2115 # the object symbols generated in some cases. Libraries that use
2116 # assert need libgcc.a to resolve __eprintf, for example. Linking
2117 # a copy of libgcc.a into every shared library to guarantee resolving
2118 # such symbols causes other problems: According to Tim Van Holder
2119 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2120 # (to the application) exception stack for one thing.
2121 no_undefined_flag=' -z defs'
2122 if test "$GCC" = yes; then
2123 case `$CC --version 2>/dev/null` in
2127 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2128 *** create self contained shared libraries on Solaris systems, without
2129 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2130 *** -no-undefined support, which will at least allow you to build shared
2131 *** libraries. However, you may find that when you link such libraries
2132 *** into an application without using GCC, you have to manually add
2133 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2134 *** upgrade to a newer version of GCC. Another option is to rebuild your
2135 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2142 # $CC -shared without GNU ld will not create a library from C++
2143 # object files and a static libstdc++, better avoid it by now
2144 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2145 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2146 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2147 hardcode_libdir_flag_spec='-R$libdir'
2148 hardcode_shlibpath_var=no
2150 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2151 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2152 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2154 link_all_deplibs=yes
2158 if test "x$host_vendor" = xsequent; then
2159 # Use $CC to link under sequent, because it throws in some extra .o
2160 # files that make .init and .fini sections work.
2161 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2163 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2165 hardcode_libdir_flag_spec='-L$libdir'
2167 hardcode_minus_L=yes
2168 hardcode_shlibpath_var=no
2172 case $host_vendor in
2174 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2175 hardcode_direct=yes # is this really true???
2178 ## LD is ld it makes a PLAMLIB
2179 ## CC just makes a GrossModule.
2180 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2181 reload_cmds='$CC -r -o $output$reload_objs'
2185 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2186 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2189 runpath_var='LD_RUN_PATH'
2190 hardcode_shlibpath_var=no
2194 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2195 hardcode_shlibpath_var=no
2196 export_dynamic_flag_spec='-Bexport'
2200 no_undefined_flag=' -z text'
2201 # $CC -shared without GNU ld will not create a library from C++
2202 # object files and a static libstdc++, better avoid it by now
2203 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2204 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2205 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2206 hardcode_libdir_flag_spec=
2207 hardcode_shlibpath_var=no
2208 runpath_var='LD_RUN_PATH'
2212 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2213 hardcode_libdir_flag_spec='-L$libdir'
2214 hardcode_shlibpath_var=no
2218 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2219 hardcode_libdir_flag_spec='-L$libdir'
2220 hardcode_shlibpath_var=no
2224 if test -d /usr/nec; then
2225 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2226 hardcode_shlibpath_var=no
2227 runpath_var=LD_RUN_PATH
2228 hardcode_runpath_var=yes
2234 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2237 hardcode_shlibpath_var=no
2238 hardcode_runpath_var=yes
2239 runpath_var=LD_RUN_PATH
2242 sysv5uw7* | unixware7*)
2243 no_undefined_flag='${wl}-z ${wl}text'
2244 if test "$GCC" = yes; then
2245 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2247 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2249 runpath_var='LD_RUN_PATH'
2250 hardcode_shlibpath_var=no
2258 AC_MSG_RESULT([$ld_shlibs])
2259 test "$ld_shlibs" = no && can_build_shared=no
2261 # Check hardcoding attributes.
2262 AC_MSG_CHECKING([how to hardcode library paths into programs])
2264 if test -n "$hardcode_libdir_flag_spec" || \
2265 test -n "$runpath_var"; then
2267 # We can hardcode non-existant directories.
2268 if test "$hardcode_direct" != no &&
2269 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2270 # have to relink, otherwise we might link with an installed library
2271 # when we should be linking with a yet-to-be-installed one
2272 ## test "$hardcode_shlibpath_var" != no &&
2273 test "$hardcode_minus_L" != no; then
2274 # Linking always hardcodes the temporary library directory.
2275 hardcode_action=relink
2277 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2278 hardcode_action=immediate
2281 # We cannot hardcode anything, or else we can only hardcode existing
2283 hardcode_action=unsupported
2285 AC_MSG_RESULT([$hardcode_action])
2289 AC_MSG_CHECKING([whether stripping libraries is possible])
2290 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2291 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2292 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2293 AC_MSG_RESULT([yes])
2298 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2299 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2301 # PORTME Fill in your ld.so characteristics
2302 AC_MSG_CHECKING([dynamic linker characteristics])
2304 libname_spec='lib$name'
2311 shlibpath_overrides_runpath=unknown
2313 dynamic_linker="$host_os ld.so"
2314 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2315 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2320 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2321 shlibpath_var=LIBPATH
2323 # AIX has no versioning support, so we append a major version to the name.
2324 soname_spec='${libname}${release}.so$major'
2331 hardcode_into_libs=yes
2332 if test "$host_cpu" = ia64; then
2333 # AIX 5 supports IA64
2334 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2335 shlibpath_var=LD_LIBRARY_PATH
2337 # With GCC up to 2.95.x, collect2 would create an import file
2338 # for dependence libraries. The import file would start with
2339 # the line `#! .'. This would cause the generated library to
2340 # depend on `.', always an invalid library. This was fixed in
2341 # development snapshots of GCC prior to 3.0.
2343 aix4 | aix4.[[01]] | aix4.[[01]].*)
2344 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2346 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2353 # AIX (on Power*) has no versioning support, so currently we can
2354 # not hardcode correct soname into executable. Probably we can
2355 # add versioning support to collect2, so additional links can
2356 # be useful in future.
2357 if test "$aix_use_runtimelinking" = yes; then
2358 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2359 # instead of lib<name>.a to let people know that these are not
2360 # typical AIX shared libraries.
2361 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2363 # We preserve .a as extension for shared libraries through AIX4.2
2364 # and later when we are not doing run time linking.
2365 library_names_spec='${libname}${release}.a $libname.a'
2366 soname_spec='${libname}${release}.so$major'
2368 shlibpath_var=LIBPATH
2370 hardcode_into_libs=yes
2374 library_names_spec='$libname.ixlibrary $libname.a'
2375 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2376 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'
2380 library_names_spec='${libname}.so'
2381 dynamic_linker="$host_os ld.so"
2382 shlibpath_var=LIBRARY_PATH
2388 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2389 soname_spec='${libname}${release}.so$major'
2390 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2391 shlibpath_var=LD_LIBRARY_PATH
2392 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2393 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2394 export_dynamic_flag_spec=-rdynamic
2395 # the default ld.so.conf also contains /usr/contrib/lib and
2396 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2397 # libtool to hard-code these into programs
2400 cygwin* | mingw* | pw32*)
2401 version_type=windows
2404 case $GCC,$host_os in
2406 library_names_spec='$libname.dll.a'
2407 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2408 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2409 dldir=$destdir/`dirname \$dlpath`~
2410 test -d \$dldir || mkdir -p \$dldir~
2411 $install_prog .libs/$dlname \$dldir/$dlname'
2412 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2413 dlpath=$dir/\$dldll~
2417 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2418 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2421 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2424 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2427 dynamic_linker='Win32 ld.exe'
2428 # FIXME: first we should search . and the directory the executable is in
2432 darwin* | rhapsody*)
2433 dynamic_linker="$host_os dyld"
2437 # FIXME: Relying on posixy $() will cause problems for
2438 # cross-compilation, but unfortunately the echo tests do not
2439 # yet detect zsh echo's removal of \ escapes.
2440 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)'
2441 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2442 shlibpath_overrides_runpath=yes
2443 shlibpath_var=DYLD_LIBRARY_PATH
2451 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2452 version_type=freebsd-$objformat
2453 case $version_type in
2455 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2460 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2464 shlibpath_var=LD_LIBRARY_PATH
2467 shlibpath_overrides_runpath=yes
2470 shlibpath_overrides_runpath=no
2471 hardcode_into_libs=yes
2480 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2481 soname_spec='${libname}${release}.so$major'
2482 shlibpath_var=LD_LIBRARY_PATH
2483 hardcode_into_libs=yes
2486 hpux9* | hpux10* | hpux11*)
2487 # Give a soname corresponding to the major version so that dld.sl refuses to
2488 # link against other versions.
2489 dynamic_linker="$host_os dld.sl"
2493 shlibpath_var=SHLIB_PATH
2494 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2495 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2496 soname_spec='${libname}${release}.sl$major'
2497 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2498 postinstall_cmds='chmod 555 $lib'
2501 irix5* | irix6* | nonstopux*)
2503 nonstopux*) version_type=nonstopux ;;
2504 *) version_type=irix ;;
2508 soname_spec='${libname}${release}.so$major'
2509 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2511 irix5* | nonstopux*)
2515 case $LD in # libtool.m4 will add one of these switches to LD
2516 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2517 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2518 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2519 *) libsuff= shlibsuff= libmagic=never-match;;
2523 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2524 shlibpath_overrides_runpath=no
2525 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2526 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2529 # No shared lib support for Linux oldld, aout, or coff.
2530 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2534 # This must be Linux ELF.
2539 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2540 soname_spec='${libname}${release}.so$major'
2541 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2542 shlibpath_var=LD_LIBRARY_PATH
2543 shlibpath_overrides_runpath=no
2544 # This implies no fast_install, which is unacceptable.
2545 # Some rework will be needed to allow for fast_install
2546 # before this can be enabled.
2547 hardcode_into_libs=yes
2549 # We used to test for /lib/ld.so.1 and disable shared libraries on
2550 # powerpc, because MkLinux only supported shared libraries with the
2551 # GNU dynamic linker. Since this was broken with cross compilers,
2552 # most powerpc-linux boxes support dynamic linking these days and
2553 # people can always --disable-shared, the test was removed, and we
2554 # assume the GNU/Linux dynamic linker is in use.
2555 dynamic_linker='GNU/Linux ld.so'
2562 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2563 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2564 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2565 dynamic_linker='NetBSD (a.out) ld.so'
2567 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2568 soname_spec='${libname}${release}.so$major'
2569 dynamic_linker='NetBSD ld.elf_so'
2571 shlibpath_var=LD_LIBRARY_PATH
2572 shlibpath_overrides_runpath=yes
2573 hardcode_into_libs=yes
2578 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2579 shlibpath_var=LD_LIBRARY_PATH
2580 shlibpath_overrides_runpath=yes
2587 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2589 openbsd2.[[89]] | openbsd2.[[89]].*)
2590 shlibpath_overrides_runpath=no
2593 shlibpath_overrides_runpath=yes
2597 shlibpath_overrides_runpath=yes
2599 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2600 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2601 shlibpath_var=LD_LIBRARY_PATH
2605 libname_spec='$name'
2607 library_names_spec='$libname.dll $libname.a'
2608 dynamic_linker='OS/2 ld.exe'
2609 shlibpath_var=LIBPATH
2612 osf3* | osf4* | osf5*)
2615 soname_spec='${libname}${release}.so$major'
2616 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2617 shlibpath_var=LD_LIBRARY_PATH
2618 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2619 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2620 hardcode_into_libs=yes
2625 soname_spec='${libname}${release}.so$major'
2626 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2627 shlibpath_var=LD_LIBRARY_PATH
2634 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2635 soname_spec='${libname}${release}.so$major'
2636 shlibpath_var=LD_LIBRARY_PATH
2637 shlibpath_overrides_runpath=yes
2638 hardcode_into_libs=yes
2639 # ldd complains unless libraries are executable
2640 postinstall_cmds='chmod +x $lib'
2645 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2646 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2647 shlibpath_var=LD_LIBRARY_PATH
2648 shlibpath_overrides_runpath=yes
2649 if test "$with_gnu_ld" = yes; then
2655 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2657 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2658 soname_spec='${libname}${release}.so$major'
2659 shlibpath_var=LD_LIBRARY_PATH
2660 case $host_vendor in
2662 shlibpath_overrides_runpath=no
2664 export_dynamic_flag_spec='${wl}-Blargedynsym'
2665 runpath_var=LD_RUN_PATH
2673 shlibpath_overrides_runpath=no
2674 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2681 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2682 soname_spec='${libname}${release}.so$major'
2683 shlibpath_var=LD_LIBRARY_PATH
2690 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2691 soname_spec='${libname}${release}.so$major'
2692 shlibpath_var=LD_LIBRARY_PATH
2696 if test -d /usr/nec ;then
2698 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2699 soname_spec='$libname.so.$major'
2700 shlibpath_var=LD_LIBRARY_PATH
2708 AC_MSG_RESULT([$dynamic_linker])
2709 test "$dynamic_linker" = no && can_build_shared=no
2711 # Report the final consequences.
2712 AC_MSG_CHECKING([if libtool supports shared libraries])
2713 AC_MSG_RESULT([$can_build_shared])
2715 AC_MSG_CHECKING([whether to build shared libraries])
2716 test "$can_build_shared" = "no" && enable_shared=no
2718 # On AIX, shared libraries and static libraries use the same namespace, and
2719 # are all built from PIC.
2722 test "$enable_shared" = yes && enable_static=no
2723 if test -n "$RANLIB"; then
2724 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2725 postinstall_cmds='$RANLIB $lib'
2730 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2731 test "$enable_shared" = yes && enable_static=no
2735 AC_MSG_RESULT([$enable_shared])
2737 AC_MSG_CHECKING([whether to build static libraries])
2738 # Make sure either enable_shared or enable_static is yes.
2739 test "$enable_shared" = yes || enable_static=yes
2740 AC_MSG_RESULT([$enable_static])
2742 if test "$hardcode_action" = relink; then
2743 # Fast installation is not supported
2744 enable_fast_install=no
2745 elif test "$shlibpath_overrides_runpath" = yes ||
2746 test "$enable_shared" = no; then
2747 # Fast installation is not necessary
2748 enable_fast_install=needless
2751 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2752 if test "$GCC" = yes; then
2753 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2756 AC_LIBTOOL_DLOPEN_SELF
2758 if test "$enable_shared" = yes && test "$GCC" = yes; then
2759 case $archive_cmds in
2761 # FIXME: we may have to deal with multi-command sequences.
2764 # Test whether the compiler implicitly links with -lc since on some
2765 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2766 # to ld, don't add -lc before -lgcc.
2767 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2768 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2770 echo 'static int dummy;' > conftest.$ac_ext
2772 if AC_TRY_EVAL(ac_compile); then
2775 libobjs=conftest.$ac_objext
2777 wl=$lt_cv_prog_cc_wl
2783 save_allow_undefined_flag=$allow_undefined_flag
2784 allow_undefined_flag=
2785 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2787 lt_cv_archive_cmds_need_lc=no
2789 lt_cv_archive_cmds_need_lc=yes
2791 allow_undefined_flag=$save_allow_undefined_flag
2793 cat conftest.err 1>&5
2795 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2799 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2801 # The second clause should only fire when bootstrapping the
2802 # libtool distribution, otherwise you forgot to ship ltmain.sh
2803 # with your package, and you will get complaints that there are
2804 # no rules to generate ltmain.sh.
2805 if test -f "$ltmain"; then
2808 # If there is no Makefile yet, we rely on a make rule to execute
2809 # `config.status --recheck' to rerun these tests and create the
2810 # libtool script then.
2811 test -f Makefile && make "$ltmain"
2814 if test -f "$ltmain"; then
2815 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2818 echo creating $ofile
2820 # Now quote all the things that may contain metacharacters while being
2821 # careful not to overquote the AC_SUBSTed values. We take copies of the
2822 # variables and quote the copies for generation of the libtool script.
2823 for var in echo old_CC old_CFLAGS SED \
2824 AR AR_FLAGS CC LD LN_S NM SHELL \
2825 reload_flag reload_cmds wl \
2826 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2827 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2828 library_names_spec soname_spec \
2829 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2830 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2831 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2832 old_striplib striplib file_magic_cmd export_symbols_cmds \
2833 deplibs_check_method allow_undefined_flag no_undefined_flag \
2834 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2835 global_symbol_to_c_name_address \
2836 hardcode_libdir_flag_spec hardcode_libdir_separator \
2837 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2838 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2841 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2842 old_postinstall_cmds | old_postuninstall_cmds | \
2843 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2844 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2845 postinstall_cmds | postuninstall_cmds | \
2846 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2847 # Double-quote double-evaled strings.
2848 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2851 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2856 cat <<__EOF__ > "${ofile}T"
2859 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2860 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2861 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2863 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2864 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2866 # This program is free software; you can redistribute it and/or modify
2867 # it under the terms of the GNU General Public License as published by
2868 # the Free Software Foundation; either version 2 of the License, or
2869 # (at your option) any later version.
2871 # This program is distributed in the hope that it will be useful, but
2872 # WITHOUT ANY WARRANTY; without even the implied warranty of
2873 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2874 # General Public License for more details.
2876 # You should have received a copy of the GNU General Public License
2877 # along with this program; if not, write to the Free Software
2878 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2880 # As a special exception to the GNU General Public License, if you
2881 # distribute this file as part of a program that contains a
2882 # configuration script generated by Autoconf, you may include it under
2883 # the same distribution terms that you use for the rest of that program.
2885 # A sed that does not truncate output.
2888 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2889 Xsed="${SED} -e s/^X//"
2891 # The HP-UX ksh and POSIX shell print the target directory to stdout
2893 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2895 # ### BEGIN LIBTOOL CONFIG
2897 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2899 # Shell to use when invoking shell scripts.
2902 # Whether or not to build shared libraries.
2903 build_libtool_libs=$enable_shared
2905 # Whether or not to build static libraries.
2906 build_old_libs=$enable_static
2908 # Whether or not to add -lc for building shared libraries.
2909 build_libtool_need_lc=$need_lc
2911 # Whether or not to optimize for fast installation.
2912 fast_install=$enable_fast_install
2915 host_alias=$host_alias
2918 # An echo program that does not interpret backslashes.
2923 AR_FLAGS=$lt_AR_FLAGS
2925 # The default C compiler.
2928 # Is the compiler the GNU C compiler?
2931 # The linker used to build libraries.
2934 # Whether we need hard or soft links.
2937 # A BSD-compatible nm program.
2940 # A symbol stripping program
2943 # Used to examine libraries when file_magic_cmd begins "file"
2944 MAGIC_CMD=$MAGIC_CMD
2946 # Used on cygwin: DLL creation program.
2949 # Used on cygwin: object dumper.
2952 # Used on cygwin: assembler.
2955 # The name of the directory that contains temporary libtool files.
2958 # How to create reloadable object files.
2959 reload_flag=$lt_reload_flag
2960 reload_cmds=$lt_reload_cmds
2962 # How to pass a linker flag through the compiler.
2965 # Object file suffix (normally "o").
2968 # Old archive suffix (normally "a").
2971 # Executable file suffix (normally "").
2974 # Additional compiler flags for building library objects.
2975 pic_flag=$lt_pic_flag
2978 # Does compiler simultaneously support -c and -o options?
2979 compiler_c_o=$lt_compiler_c_o
2981 # Can we write directly to a .lo ?
2982 compiler_o_lo=$lt_compiler_o_lo
2984 # Must we lock files when doing compilation ?
2985 need_locks=$lt_need_locks
2987 # Do we need the lib prefix for modules?
2988 need_lib_prefix=$need_lib_prefix
2990 # Do we need a version for libraries?
2991 need_version=$need_version
2993 # Whether dlopen is supported.
2994 dlopen_support=$enable_dlopen
2996 # Whether dlopen of programs is supported.
2997 dlopen_self=$enable_dlopen_self
2999 # Whether dlopen of statically linked programs is supported.
3000 dlopen_self_static=$enable_dlopen_self_static
3002 # Compiler flag to prevent dynamic linking.
3003 link_static_flag=$lt_link_static_flag
3005 # Compiler flag to turn off builtin functions.
3006 no_builtin_flag=$lt_no_builtin_flag
3008 # Compiler flag to allow reflexive dlopens.
3009 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3011 # Compiler flag to generate shared objects directly from archives.
3012 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3014 # Compiler flag to generate thread-safe objects.
3015 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3017 # Library versioning type.
3018 version_type=$version_type
3020 # Format of library name prefix.
3021 libname_spec=$lt_libname_spec
3023 # List of archive names. First name is the real one, the rest are links.
3024 # The last name is the one that the linker finds with -lNAME.
3025 library_names_spec=$lt_library_names_spec
3027 # The coded name of the library, if different from the real name.
3028 soname_spec=$lt_soname_spec
3030 # Commands used to build and install an old-style archive.
3032 old_archive_cmds=$lt_old_archive_cmds
3033 old_postinstall_cmds=$lt_old_postinstall_cmds
3034 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3036 # Create an old-style archive from a shared archive.
3037 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3039 # Create a temporary old-style archive to link instead of a shared archive.
3040 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3042 # Commands used to build and install a shared archive.
3043 archive_cmds=$lt_archive_cmds
3044 archive_expsym_cmds=$lt_archive_expsym_cmds
3045 postinstall_cmds=$lt_postinstall_cmds
3046 postuninstall_cmds=$lt_postuninstall_cmds
3048 # Commands to strip libraries.
3049 old_striplib=$lt_old_striplib
3050 striplib=$lt_striplib
3052 # Method to check whether dependent libraries are shared objects.
3053 deplibs_check_method=$lt_deplibs_check_method
3055 # Command to use when deplibs_check_method == file_magic.
3056 file_magic_cmd=$lt_file_magic_cmd
3058 # Flag that allows shared libraries with undefined symbols to be built.
3059 allow_undefined_flag=$lt_allow_undefined_flag
3061 # Flag that forces no undefined symbols.
3062 no_undefined_flag=$lt_no_undefined_flag
3064 # Commands used to finish a libtool library installation in a directory.
3065 finish_cmds=$lt_finish_cmds
3067 # Same as above, but a single script fragment to be evaled but not shown.
3068 finish_eval=$lt_finish_eval
3070 # Take the output of nm and produce a listing of raw symbols and C names.
3071 global_symbol_pipe=$lt_global_symbol_pipe
3073 # Transform the output of nm in a proper C declaration
3074 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3076 # Transform the output of nm in a C name address pair
3077 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3079 # This is the shared library runtime path variable.
3080 runpath_var=$runpath_var
3082 # This is the shared library path variable.
3083 shlibpath_var=$shlibpath_var
3085 # Is shlibpath searched before the hard-coded library search path?
3086 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3088 # How to hardcode a shared library path into an executable.
3089 hardcode_action=$hardcode_action
3091 # Whether we should hardcode library paths into libraries.
3092 hardcode_into_libs=$hardcode_into_libs
3094 # Flag to hardcode \$libdir into a binary during linking.
3095 # This must work even if \$libdir does not exist.
3096 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3098 # Whether we need a single -rpath flag with a separated argument.
3099 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3101 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3103 hardcode_direct=$hardcode_direct
3105 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3107 hardcode_minus_L=$hardcode_minus_L
3109 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3110 # the resulting binary.
3111 hardcode_shlibpath_var=$hardcode_shlibpath_var
3113 # Variables whose values should be saved in libtool wrapper scripts and
3114 # restored at relink time.
3115 variables_saved_for_relink="$variables_saved_for_relink"
3117 # Whether libtool must link a program against all its dependency libraries.
3118 link_all_deplibs=$link_all_deplibs
3120 # Compile-time system search path for libraries
3121 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3123 # Run-time system search path for libraries
3124 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3126 # Fix the shell variable \$srcfile for the compiler.
3127 fix_srcfile_path="$fix_srcfile_path"
3129 # Set to yes if exported symbols are required.
3130 always_export_symbols=$always_export_symbols
3132 # The commands to list exported symbols.
3133 export_symbols_cmds=$lt_export_symbols_cmds
3135 # The commands to extract the exported symbol list from a shared archive.
3136 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3138 # Symbols that should not be listed in the preloaded symbols.
3139 exclude_expsyms=$lt_exclude_expsyms
3141 # Symbols that must always be exported.
3142 include_expsyms=$lt_include_expsyms
3144 # ### END LIBTOOL CONFIG
3150 cat <<\EOF >> "${ofile}T"
3152 # AIX sometimes has problems with the GCC collect2 program. For some
3153 # reason, if we set the COLLECT_NAMES environment variable, the problems
3154 # vanish in a puff of smoke.
3155 if test "X${COLLECT_NAMES+set}" != Xset; then
3157 export COLLECT_NAMES
3164 cygwin* | mingw* | pw32* | os2*)
3165 cat <<'EOF' >> "${ofile}T"
3166 # This is a source program that is used to create dlls on Windows
3167 # Don't remove nor modify the starting and closing comments
3168 # /* ltdll.c starts here */
3169 # #define WIN32_LEAN_AND_MEAN
3170 # #include <windows.h>
3171 # #undef WIN32_LEAN_AND_MEAN
3172 # #include <stdio.h>
3174 # #ifndef __CYGWIN__
3175 # # ifdef __CYGWIN32__
3176 # # define __CYGWIN__ __CYGWIN32__
3180 # #ifdef __cplusplus
3183 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3184 # #ifdef __cplusplus
3189 # #include <cygwin/cygwin_dll.h>
3190 # DECLARE_CYGWIN_DLL( DllMain );
3192 # HINSTANCE __hDllInstance_base;
3195 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3197 # __hDllInstance_base = hInst;
3200 # /* ltdll.c ends here */
3201 # This is a source program that is used to create import libraries
3202 # on Windows for dlls which lack them. Don't remove nor modify the
3203 # starting and closing comments
3204 # /* impgen.c starts here */
3205 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3207 # This file is part of GNU libtool.
3209 # This program is free software; you can redistribute it and/or modify
3210 # it under the terms of the GNU General Public License as published by
3211 # the Free Software Foundation; either version 2 of the License, or
3212 # (at your option) any later version.
3214 # This program is distributed in the hope that it will be useful,
3215 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3216 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3217 # GNU General Public License for more details.
3219 # You should have received a copy of the GNU General Public License
3220 # along with this program; if not, write to the Free Software
3221 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3224 # #include <stdio.h> /* for printf() */
3225 # #include <unistd.h> /* for open(), lseek(), read() */
3226 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3227 # #include <string.h> /* for strdup() */
3229 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3231 # #define O_BINARY 0
3234 # static unsigned int
3235 # pe_get16 (fd, offset)
3239 # unsigned char b[2];
3240 # lseek (fd, offset, SEEK_SET);
3242 # return b[0] + (b[1]<<8);
3245 # static unsigned int
3246 # pe_get32 (fd, offset)
3250 # unsigned char b[4];
3251 # lseek (fd, offset, SEEK_SET);
3253 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3256 # static unsigned int
3260 # unsigned char *b = ptr;
3261 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3270 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3271 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3272 # unsigned long name_rvas, nexp;
3273 # unsigned char *expdata, *erva;
3274 # char *filename, *dll_name;
3276 # filename = argv[1];
3278 # dll = open(filename, O_RDONLY|O_BINARY);
3282 # dll_name = filename;
3284 # for (i=0; filename[i]; i++)
3285 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3286 # dll_name = filename + i +1;
3288 # pe_header_offset = pe_get32 (dll, 0x3c);
3289 # opthdr_ofs = pe_header_offset + 4 + 20;
3290 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3292 # if (num_entries < 1) /* no exports */
3295 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3296 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3297 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3298 # secptr = (pe_header_offset + 4 + 20 +
3299 # pe_get16 (dll, pe_header_offset + 4 + 16));
3302 # for (i = 0; i < nsections; i++)
3305 # unsigned long secptr1 = secptr + 40 * i;
3306 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3307 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3308 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3309 # lseek(dll, secptr1, SEEK_SET);
3310 # read(dll, sname, 8);
3311 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3313 # expptr = fptr + (export_rva - vaddr);
3314 # if (export_rva + export_size > vaddr + vsize)
3315 # export_size = vsize - (export_rva - vaddr);
3320 # expdata = (unsigned char*)malloc(export_size);
3321 # lseek (dll, expptr, SEEK_SET);
3322 # read (dll, expdata, export_size);
3323 # erva = expdata - export_rva;
3325 # nexp = pe_as32 (expdata+24);
3326 # name_rvas = pe_as32 (expdata+32);
3328 # printf ("EXPORTS\n");
3329 # for (i = 0; i<nexp; i++)
3331 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3332 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3337 # /* impgen.c ends here */
3343 # We use sed instead of cat because bash on DJGPP gets confused if
3344 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3345 # text mode, it properly converts lines to CR/LF. This bash problem
3346 # is reportedly fixed, but why not run on old versions too?
3347 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3349 mv -f "${ofile}T" "$ofile" || \
3350 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3354 ])# _LT_AC_LTCONFIG_HACK
3356 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3357 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3359 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3360 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3362 # AC_ENABLE_SHARED - implement the --enable-shared flag
3363 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3364 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3366 AC_DEFUN([AC_ENABLE_SHARED],
3367 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3368 AC_ARG_ENABLE(shared,
3369 changequote(<<, >>)dnl
3370 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3371 changequote([, ])dnl
3372 [p=${PACKAGE-default}
3374 yes) enable_shared=yes ;;
3375 no) enable_shared=no ;;
3378 # Look at the argument we got. We use all the common list separators.
3379 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3380 for pkg in $enableval; do
3381 if test "X$pkg" = "X$p"; then
3388 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3391 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3392 AC_DEFUN([AC_DISABLE_SHARED],
3393 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3394 AC_ENABLE_SHARED(no)])
3396 # AC_ENABLE_STATIC - implement the --enable-static flag
3397 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3398 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3400 AC_DEFUN([AC_ENABLE_STATIC],
3401 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3402 AC_ARG_ENABLE(static,
3403 changequote(<<, >>)dnl
3404 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3405 changequote([, ])dnl
3406 [p=${PACKAGE-default}
3408 yes) enable_static=yes ;;
3409 no) enable_static=no ;;
3412 # Look at the argument we got. We use all the common list separators.
3413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3414 for pkg in $enableval; do
3415 if test "X$pkg" = "X$p"; then
3422 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3425 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3426 AC_DEFUN([AC_DISABLE_STATIC],
3427 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3428 AC_ENABLE_STATIC(no)])
3431 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3432 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3433 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3435 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3436 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3437 AC_ARG_ENABLE(fast-install,
3438 changequote(<<, >>)dnl
3439 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3440 changequote([, ])dnl
3441 [p=${PACKAGE-default}
3443 yes) enable_fast_install=yes ;;
3444 no) enable_fast_install=no ;;
3446 enable_fast_install=no
3447 # Look at the argument we got. We use all the common list separators.
3448 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3449 for pkg in $enableval; do
3450 if test "X$pkg" = "X$p"; then
3451 enable_fast_install=yes
3457 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3460 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3461 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3462 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3463 AC_ENABLE_FAST_INSTALL(no)])
3465 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3466 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3467 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3469 AC_DEFUN([AC_LIBTOOL_PICMODE],
3470 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3471 pic_mode=ifelse($#,1,$1,default)])
3474 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3475 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3476 [AC_MSG_CHECKING([for $1])
3477 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3480 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3483 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3486 ac_save_MAGIC_CMD="$MAGIC_CMD"
3487 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3488 dnl $ac_dummy forces splitting on constant user-supplied paths.
3489 dnl POSIX.2 word splitting is done only on the output of word expansions,
3490 dnl not every word. This closes a longstanding sh security hole.
3491 ac_dummy="ifelse([$2], , $PATH, [$2])"
3492 for ac_dir in $ac_dummy; do
3493 test -z "$ac_dir" && ac_dir=.
3494 if test -f $ac_dir/$1; then
3495 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3496 if test -n "$file_magic_test_file"; then
3497 case $deplibs_check_method in
3499 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3500 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3501 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3502 egrep "$file_magic_regex" > /dev/null; then
3507 *** Warning: the command libtool uses to detect shared libraries,
3508 *** $file_magic_cmd, produces output that libtool cannot recognize.
3509 *** The result is that libtool may fail to recognize shared libraries
3510 *** as such. This will affect the creation of libtool libraries that
3511 *** depend on shared libraries, but programs linked with such libtool
3512 *** libraries will work regardless of this problem. Nevertheless, you
3513 *** may want to report the problem to your system manager and/or to
3514 *** bug-libtool@gnu.org
3524 MAGIC_CMD="$ac_save_MAGIC_CMD"
3527 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3528 if test -n "$MAGIC_CMD"; then
3529 AC_MSG_RESULT($MAGIC_CMD)
3536 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3537 AC_DEFUN([AC_PATH_MAGIC],
3538 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3539 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3540 if test -z "$lt_cv_path_MAGIC_CMD"; then
3541 if test -n "$ac_tool_prefix"; then
3542 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3550 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3551 AC_DEFUN([AC_PROG_LD],
3552 [AC_ARG_WITH(gnu-ld,
3553 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3554 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3555 AC_REQUIRE([AC_PROG_CC])dnl
3556 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3557 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3558 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3560 if test "$GCC" = yes; then
3561 # Check if gcc -print-prog-name=ld gives a path.
3562 AC_MSG_CHECKING([for ld used by GCC])
3565 # gcc leaves a trailing carriage return which upsets mingw
3566 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3568 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3571 # Accept absolute paths.
3572 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3573 re_direlt='/[[^/]][[^/]]*/\.\./'
3574 # Canonicalize the path of ld
3575 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3576 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3577 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3579 test -z "$LD" && LD="$ac_prog"
3582 # If it fails, then pretend we aren't using GCC.
3586 # If it is relative, then search for the first ld in PATH.
3590 elif test "$with_gnu_ld" = yes; then
3591 AC_MSG_CHECKING([for GNU ld])
3593 AC_MSG_CHECKING([for non-GNU ld])
3595 AC_CACHE_VAL(lt_cv_path_LD,
3596 [if test -z "$LD"; then
3597 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3598 for ac_dir in $PATH; do
3599 test -z "$ac_dir" && ac_dir=.
3600 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3601 lt_cv_path_LD="$ac_dir/$ac_prog"
3602 # Check to see if the program is GNU ld. I'd rather use --version,
3603 # but apparently some GNU ld's only accept -v.
3604 # Break only if it was the GNU/non-GNU ld that we prefer.
3605 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3606 test "$with_gnu_ld" != no && break
3608 test "$with_gnu_ld" != yes && break
3614 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3617 if test -n "$LD"; then
3622 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3627 AC_DEFUN([AC_PROG_LD_GNU],
3628 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3629 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3630 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3631 lt_cv_prog_gnu_ld=yes
3633 lt_cv_prog_gnu_ld=no
3635 with_gnu_ld=$lt_cv_prog_gnu_ld
3638 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3639 # -- PORTME Some linkers may need a different reload flag.
3640 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3641 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3642 [lt_cv_ld_reload_flag='-r'])
3643 reload_flag=$lt_cv_ld_reload_flag
3644 test -n "$reload_flag" && reload_flag=" $reload_flag"
3647 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3648 # -- PORTME fill in with the dynamic library characteristics
3649 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3650 [AC_CACHE_CHECK([how to recognise dependent libraries],
3651 lt_cv_deplibs_check_method,
3652 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3653 lt_cv_file_magic_test_file=
3654 lt_cv_deplibs_check_method='unknown'
3655 # Need to set the preceding variable on all platforms that support
3656 # interlibrary dependencies.
3657 # 'none' -- dependencies not supported.
3658 # `unknown' -- same as none, but documents that we really don't know.
3659 # 'pass_all' -- all dependencies passed with no checks.
3660 # 'test_compile' -- check by making test program.
3661 # 'file_magic [[regex]]' -- check by looking for files in library path
3662 # which responds to the $file_magic_cmd with a given egrep regex.
3663 # If you have `file' or equivalent on your system and you're not sure
3664 # whether `pass_all' will *always* work, you probably want this one.
3668 lt_cv_deplibs_check_method=pass_all
3672 lt_cv_deplibs_check_method=pass_all
3676 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3677 lt_cv_file_magic_cmd='/usr/bin/file -L'
3678 lt_cv_file_magic_test_file=/shlib/libc.so
3681 cygwin* | mingw* | pw32*)
3682 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3683 lt_cv_file_magic_cmd='$OBJDUMP -f'
3686 darwin* | rhapsody*)
3687 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3688 lt_cv_file_magic_cmd='/usr/bin/file -L'
3690 rhapsody* | darwin1.[[012]])
3691 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3694 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3700 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3703 # Not sure whether the presence of OpenBSD here was a mistake.
3704 # Let's accept both of them until this is cleared up.
3705 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3706 lt_cv_file_magic_cmd=/usr/bin/file
3707 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3711 lt_cv_deplibs_check_method=pass_all
3716 lt_cv_deplibs_check_method=pass_all
3720 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3721 lt_cv_file_magic_cmd=/usr/bin/file
3722 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3725 irix5* | irix6* | nonstopux*)
3727 irix5* | nonstopux*)
3728 # this will be overridden with pass_all, but let us keep it just in case
3729 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3733 *-32|*"-32 ") libmagic=32-bit;;
3734 *-n32|*"-n32 ") libmagic=N32;;
3735 *-64|*"-64 ") libmagic=64-bit;;
3736 *) libmagic=never-match;;
3738 # this will be overridden with pass_all, but let us keep it just in case
3739 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3742 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3743 lt_cv_deplibs_check_method=pass_all
3746 # This must be Linux ELF.
3749 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3750 lt_cv_deplibs_check_method=pass_all ;;
3752 # glibc up to 2.1.1 does not perform some relocations on ARM
3753 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3755 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3759 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3760 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3762 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3767 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3768 lt_cv_file_magic_cmd=/usr/bin/file
3769 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3773 lt_cv_file_magic_cmd=/usr/bin/file
3774 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3775 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3776 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3778 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3782 osf3* | osf4* | osf5*)
3783 # this will be overridden with pass_all, but let us keep it just in case
3784 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3785 lt_cv_file_magic_test_file=/shlib/libc.so
3786 lt_cv_deplibs_check_method=pass_all
3790 lt_cv_deplibs_check_method=pass_all
3794 lt_cv_deplibs_check_method=pass_all
3795 lt_cv_file_magic_test_file=/lib/libc.so
3798 sysv5uw[[78]]* | sysv4*uw2*)
3799 lt_cv_deplibs_check_method=pass_all
3802 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3803 case $host_vendor in
3805 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]]'
3806 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3809 lt_cv_deplibs_check_method=pass_all
3812 lt_cv_file_magic_cmd='/bin/file'
3813 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3816 lt_cv_file_magic_cmd='/bin/file'
3817 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3818 lt_cv_file_magic_test_file=/lib/libc.so
3821 lt_cv_deplibs_check_method=pass_all
3827 file_magic_cmd=$lt_cv_file_magic_cmd
3828 deplibs_check_method=$lt_cv_deplibs_check_method
3832 # AC_PROG_NM - find the path to a BSD-compatible name lister
3833 AC_DEFUN([AC_PROG_NM],
3834 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3835 AC_MSG_CHECKING([for BSD-compatible nm])
3836 AC_CACHE_VAL(lt_cv_path_NM,
3837 [if test -n "$NM"; then
3838 # Let the user override the test.
3841 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3842 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3843 test -z "$ac_dir" && ac_dir=.
3844 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3845 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3846 # Check to see if the nm accepts a BSD-compat flag.
3847 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3848 # nm: unknown option "B" ignored
3849 # Tru64's nm complains that /dev/null is an invalid object file
3850 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3851 lt_cv_path_NM="$tmp_nm -B"
3853 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3854 lt_cv_path_NM="$tmp_nm -p"
3857 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3858 continue # so that we can try to find one that supports BSD flags
3863 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3866 AC_MSG_RESULT([$NM])
3869 # AC_CHECK_LIBM - check for math library
3870 AC_DEFUN([AC_CHECK_LIBM],
3871 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3874 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3875 # These system don't have libm
3878 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3879 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3882 AC_CHECK_LIB(m, main, LIBM="-lm")
3887 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3888 # the libltdl convenience library and LTDLINCL to the include flags for
3889 # the libltdl header and adds --enable-ltdl-convenience to the
3890 # configure arguments. Note that LIBLTDL and LTDLINCL are not
3891 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3892 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3893 # with '${top_builddir}/' and LTDLINCL will be prefixed with
3894 # '${top_srcdir}/' (note the single quotes!). If your package is not
3895 # flat and you're not using automake, define top_builddir and
3896 # top_srcdir appropriately in the Makefiles.
3897 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3898 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3899 case $enable_ltdl_convenience in
3900 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3901 "") enable_ltdl_convenience=yes
3902 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3904 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3905 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3906 # For backwards non-gettext consistent compatibility...
3910 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3911 # the libltdl installable library and LTDLINCL to the include flags for
3912 # the libltdl header and adds --enable-ltdl-install to the configure
3913 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3914 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3915 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3916 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3917 # with '${top_srcdir}/' (note the single quotes!). If your package is
3918 # not flat and you're not using automake, define top_builddir and
3919 # top_srcdir appropriately in the Makefiles.
3920 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3921 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3922 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3923 AC_CHECK_LIB(ltdl, main,
3924 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3925 [if test x"$enable_ltdl_install" = xno; then
3926 AC_MSG_WARN([libltdl not installed, but installation disabled])
3928 enable_ltdl_install=yes
3931 if test x"$enable_ltdl_install" = x"yes"; then
3932 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3933 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3934 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3936 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3940 # For backwards non-gettext consistent compatibility...
3945 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3946 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3947 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3948 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3949 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3950 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3951 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3953 # This is just to silence aclocal about the macro not being used
3954 ifelse([AC_DISABLE_FAST_INSTALL])
3956 # NOTE: This macro has been submitted for inclusion into #
3957 # GNU Autoconf as AC_PROG_SED. When it is available in #
3958 # a released version of Autoconf we should remove this #
3959 # macro and use it instead. #
3962 # Check for a fully-functional sed program, that truncates
3963 # as few characters as possible. Prefer GNU sed if found.
3964 AC_DEFUN([LT_AC_PROG_SED],
3965 [AC_MSG_CHECKING([for a sed that does not truncate output])
3966 AC_CACHE_VAL(lt_cv_path_SED,
3967 [# Loop through the user's path and test for sed and gsed.
3968 # Then use that list of sed's as ones to test for truncation.
3969 as_executable_p="test -f"
3970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3974 test -z "$as_dir" && as_dir=.
3975 for ac_prog in sed gsed; do
3976 for ac_exec_ext in '' $ac_executable_extensions; do
3977 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3978 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3984 # Create a temporary directory, and hook for its removal unless debugging.
3987 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3988 trap '{ (exit 1); exit 1; }' 1 2 13 15
3991 # Create a (secure) tmp directory for tmp files.
3994 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3995 test -n "$tmp" && test -d "$tmp"
3998 tmp=$TMPDIR/sed$$-$RANDOM
3999 (umask 077 && mkdir $tmp)
4002 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4003 { (exit 1); exit 1; }
4007 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4008 # along with /bin/sed that truncates output.
4009 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4010 test ! -f ${_sed} && break
4011 cat /dev/null > "$tmp/sed.in"
4013 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4014 # Check for GNU sed and select it if it is found.
4015 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4016 lt_cv_path_SED=${_sed}
4020 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4021 mv "$tmp/sed.tmp" "$tmp/sed.in"
4022 cp "$tmp/sed.in" "$tmp/sed.nl"
4023 echo >>"$tmp/sed.nl"
4024 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4025 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4026 # 40000 chars as input seems more than enough
4027 test $_count -gt 10 && break
4028 _count=`expr $_count + 1`
4029 if test $_count -gt $_max; then
4031 lt_cv_path_SED=$_sed
4037 if test "X$SED" != "X"; then
4042 AC_MSG_RESULT([$SED])
4045 dnl -*- Autoconf -*-
4046 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4047 dnl This file is free software, distributed under the terms of the GNU
4048 dnl General Public License. As a special exception to the GNU General
4049 dnl Public License, this file may be distributed as part of a program
4050 dnl that contains a configuration script generated by Autoconf, under
4051 dnl the same distribution terms as the rest of that program.
4053 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4057 AC_DEFUN([CL_LONGLONG],
4058 [AC_CACHE_CHECK(for long long type, cl_cv_c_longlong, [
4059 AC_TRY_RUN([int main()
4061 /* long longs don't work right with gcc-2.7.2 on m68k */
4062 /* long longs don't work right with gcc-2.7.2 on rs6000: avcall/tests.c gets
4064 #if defined(__m68k__) || (defined(_IBMR2) || defined(__powerpc))
4065 #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
4069 { long x = 944938507; long y = 737962842; long z = 162359677;
4070 exit(!(((long long) x)*((long long) y)>>32 == z));
4073 cl_cv_c_longlong=yes, cl_cv_c_longlong=no,
4074 dnl When cross-compiling, don't assume anything.
4075 cl_cv_c_longlong="guessing no")
4077 case "$cl_cv_c_longlong" in
4078 *yes) AC_DEFINE(HAVE_LONGLONG,,[compiler supports the `long long' type]) ;;
4083 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
4084 dnl This file is free software, distributed under the terms of the GNU
4085 dnl General Public License. As a special exception to the GNU General
4086 dnl Public License, this file may be distributed as part of a program
4087 dnl that contains a configuration script generated by Autoconf, under
4088 dnl the same distribution terms as the rest of that program.
4090 dnl From Bruno Haible, Marcus Daniels.
4094 AC_DEFUN([CL_LONGDOUBLE],
4095 [AC_CACHE_CHECK(for long double type, cl_cv_c_longdouble, [
4096 AC_TRY_RUN([int main()
4097 { long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }],
4098 cl_cv_c_longdouble=yes, cl_cv_c_longdouble=no,
4099 dnl When cross-compiling, don't assume anything.
4100 cl_cv_c_longdouble="guessing no")
4102 case "$cl_cv_c_longdouble" in
4103 *yes) AC_DEFINE(HAVE_LONGDOUBLE) ;;
4108 dnl -*- Autoconf -*-
4109 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4110 dnl This file is free software, distributed under the terms of the GNU
4111 dnl General Public License. As a special exception to the GNU General
4112 dnl Public License, this file may be distributed as part of a program
4113 dnl that contains a configuration script generated by Autoconf, under
4114 dnl the same distribution terms as the rest of that program.
4116 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4120 AC_DEFUN([CL_ALLOCA],
4121 [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4122 # for constant arguments. Useless!
4123 CL_LINK_CHECK(working alloca.h, cl_cv_header_alloca_h,
4124 [#include <alloca.h>], [char *p = (char *) alloca(2 * sizeof(int));],
4125 AC_DEFINE(HAVE_ALLOCA_H,,[have <alloca.h> and it should be used (not Ultrix)]))
4126 decl="#ifdef __GNUC__
4127 #define alloca __builtin_alloca
4131 #define alloca _alloca
4133 #ifdef HAVE_ALLOCA_H
4147 CL_LINK_CHECK([alloca], cl_cv_func_alloca,
4148 $decl, [char *p = (char *) alloca(1);],
4149 , [alloca_missing=1])dnl
4150 if test -n "$alloca_missing"; then
4151 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4152 # that cause trouble. Some versions do not even contain alloca or
4153 # contain a buggy version. If you still want to use their alloca,
4154 # use ar to extract alloca.o from them instead of compiling alloca.c.
4155 ALLOCA=alloca.${ac_objext}
4156 AC_DEFINE(NO_ALLOCA,,[need to link with an external alloca.o when using alloca()])
4161 dnl -*- Autoconf -*-
4162 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4163 dnl This file is free software, distributed under the terms of the GNU
4164 dnl General Public License. As a special exception to the GNU General
4165 dnl Public License, this file may be distributed as part of a program
4166 dnl that contains a configuration script generated by Autoconf, under
4167 dnl the same distribution terms as the rest of that program.
4169 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4173 AC_DEFUN([CL_FPU_CONTROL],
4174 [dnl Check for Linux with <fpu_control.h> and fpu_control_t or __setfpucw().
4175 dnl glibc versions since October 1998 define fpu_control_t. Earlier versions
4176 dnl define and declare __setfpucw(). Very early Linux libc versions have none,
4177 dnl and __fpu_control is of type `unsigned short'.
4178 CL_COMPILE_CHECK([fpu_control_t], cl_cv_type_fpu_control_t,
4179 [#include <fpu_control.h>], [fpu_control_t x;],
4180 AC_DEFINE(HAVE_FPU_CONTROL_T,,[have <fpu_control.h> and it defines the fpu_control_t type]))
4181 CL_COMPILE_CHECK([__setfpucw], cl_cv_func_setfpucw,
4182 [#include <fpu_control.h>], [__setfpucw(_FPU_IEEE);],
4183 AC_DEFINE(HAVE_SETFPUCW,,[have <fpu_control.h> and it declares the __setfpucw() function]))
4186 dnl -*- Autoconf -*-
4187 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4188 dnl This file is free software, distributed under the terms of the GNU
4189 dnl General Public License. As a special exception to the GNU General
4190 dnl Public License, this file may be distributed as part of a program
4191 dnl that contains a configuration script generated by Autoconf, under
4192 dnl the same distribution terms as the rest of that program.
4194 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4198 AC_DEFUN([CL_GETTIMEOFDAY],
4199 [AC_BEFORE([$0], [CL_TIMES_CLOCK])
4200 AC_CHECK_FUNCS(gettimeofday)dnl
4201 if test $ac_cv_func_gettimeofday = yes; then
4202 dnl HAVE_GETTIMEOFDAY is defined
4203 CL_PROTO([gettimeofday], [
4205 #include <sys/types.h>
4206 #include <sys/time.h>
4207 ], [int gettimeofday (struct timeval * tp, struct timezone * tzp);],
4208 [int gettimeofday();],
4209 cl_cv_proto_gettimeofday_dots=no
4210 cl_cv_proto_gettimeofday_arg2="struct timezone *",
4212 #include <sys/types.h>
4213 #include <sys/time.h>
4214 ], [int gettimeofday (struct timeval * tp, void * tzp);],
4215 [int gettimeofday();],
4216 cl_cv_proto_gettimeofday_dots=no
4217 cl_cv_proto_gettimeofday_arg2="void *",
4218 cl_cv_proto_gettimeofday_dots=yes
4219 cl_cv_proto_gettimeofday_arg2="..."))
4220 ], [extern int gettimeofday (struct timeval *, $cl_cv_proto_gettimeofday_arg2);])
4221 if test $cl_cv_proto_gettimeofday_dots = yes; then
4222 AC_DEFINE(GETTIMEOFDAY_DOTS,,[declaration of gettimeofday() needs dots])
4224 AC_DEFINE_UNQUOTED(GETTIMEOFDAY_TZP_T,$cl_cv_proto_gettimeofday_arg2,[type of `tzp' in gettimeofday() declaration])
4229 dnl -*- Autoconf -*-
4230 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4231 dnl This file is free software, distributed under the terms of the GNU
4232 dnl General Public License. As a special exception to the GNU General
4233 dnl Public License, this file may be distributed as part of a program
4234 dnl that contains a configuration script generated by Autoconf, under
4235 dnl the same distribution terms as the rest of that program.
4237 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4241 AC_DEFUN([CL_TIMES_CLOCK],
4242 [AC_REQUIRE([CL_GETTIMEOFDAY])dnl
4243 if test $ac_cv_func_gettimeofday = no; then
4244 AC_CHECK_FUNC(times, , no_times=1)dnl
4245 if test -z "$no_times"; then
4246 AC_CACHE_CHECK(for times return value, cl_cv_func_times_return, [
4248 #include <sys/types.h>
4249 #include <time.h> /* needed for CLK_TCK */
4251 #include <sys/time.h> /* needed for CLK_TCK on SYSV PTX */
4253 #include <sys/times.h>
4255 { struct tms buffer;
4259 result1 = times(&buffer);
4260 if ((result1 == (clock_t)0) || (result1 == (clock_t)(-1))) exit(1);
4262 result2 = times(&buffer);
4263 if ((result2 == (clock_t)0) || (result2 == (clock_t)(-1))) exit(1);
4264 ticks = result2 - result1;
4265 exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
4266 }], cl_cv_func_times_return=yes, cl_cv_func_times_return=no,
4267 dnl When cross-compiling, don't assume anything.
4268 cl_cv_func_times_return="guessing no")
4270 case "$cl_cv_func_times_return" in
4271 *yes) AC_DEFINE(HAVE_TIMES_CLOCK,,[have the times() function and it returns the real time, but do not have the gettimeofday() or ftime() function]) ;;
4278 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
4279 dnl This file is free software, distributed under the terms of the GNU
4280 dnl General Public License. As a special exception to the GNU General
4281 dnl Public License, this file may be distributed as part of a program
4282 dnl that contains a configuration script generated by Autoconf, under
4283 dnl the same distribution terms as the rest of that program.
4285 dnl From Bruno Haible, Marcus Daniels.
4289 dnl CL_PROTO(IDENTIFIER, ACTION-IF-NOT-FOUND, FINAL-PROTOTYPE)
4290 AC_DEFUN([CL_PROTO],
4291 [AC_MSG_CHECKING([for $1 declaration])
4292 AC_CACHE_VAL(cl_cv_proto_[$1], [$2
4293 cl_cv_proto_$1="$3"])
4294 cl_cv_proto_$1=`echo "[$]cl_cv_proto_$1" | tr -s ' ' | sed -e 's/( /(/'`
4295 AC_MSG_RESULT([$]{ac_t:-
4299 dnl CL_PROTO_RET(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID, TYPE-IF-OK, TYPE-IF-FAILS)
4300 AC_DEFUN([CL_PROTO_RET],
4301 [AC_TRY_COMPILE([$1]
4303 [#if defined(__STDC__) || defined(__cplusplus)
4308 ], [], $4="$5", $4="$6")
4311 dnl CL_PROTO_TRY(INCLUDES, ANSI-DECL, TRAD-DECL, ACTION-IF-OK, ACTION-IF-FAILS)
4312 AC_DEFUN([CL_PROTO_TRY],
4313 [AC_TRY_COMPILE([$1]
4315 [#if defined(__STDC__) || defined(__cplusplus)
4323 dnl CL_PROTO_CONST(INCLUDES, ANSI-DECL, TRAD-DECL, CACHE-ID)
4324 AC_DEFUN([CL_PROTO_CONST],
4325 [CL_PROTO_TRY([$1], [$2], [$3], $4="", $4="const")]
4328 dnl -*- Autoconf -*-
4329 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4330 dnl This file is free software, distributed under the terms of the GNU
4331 dnl General Public License. As a special exception to the GNU General
4332 dnl Public License, this file may be distributed as part of a program
4333 dnl that contains a configuration script generated by Autoconf, under
4334 dnl the same distribution terms as the rest of that program.
4336 dnl From Bruno Haible, Marcus Daniels, Sam Steingold, Peter Burwood, Sam Steingold.
4340 AC_DEFUN([CL_RUSAGE],
4341 [AC_CHECK_HEADERS(sys/resource.h sys/times.h)dnl
4342 if test $ac_cv_header_sys_resource_h = yes; then
4343 dnl HAVE_SYS_RESOURCE_H defined
4344 CL_LINK_CHECK([getrusage], cl_cv_func_getrusage,
4345 [#include <sys/types.h> /* NetBSD 1.0 needs this */
4346 #include <sys/time.h>
4347 #include <sys/resource.h>],
4348 [struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;])dnl
4349 if test $cl_cv_func_getrusage = yes; then
4350 CL_PROTO([getrusage], [
4353 #ifdef HAVE_UNISTD_H
4356 #include <sys/types.h> /* NetBSD 1.0 needs this */
4357 #include <sys/time.h>
4358 #include <sys/resource.h>
4360 [int getrusage (int who, struct rusage * rusage);],
4362 [cl_cv_proto_getrusage_arg1="int"],
4363 [cl_cv_proto_getrusage_arg1="enum __rusage_who"])
4364 ], [extern int getrusage ($cl_cv_proto_getrusage_arg1, struct rusage *);])dnl
4365 AC_CACHE_CHECK(whether getrusage works, cl_cv_func_getrusage_works, [
4368 #include <sys/types.h> /* NetBSD 1.0 needs this */
4369 #include <sys/time.h>
4370 #include <time.h> /* for time(2) */
4371 #include <sys/resource.h>
4374 struct rusage used, prev;
4375 time_t end = time(NULL)+2;
4378 if ((count = getrusage(RUSAGE_SELF, &prev))) {
4379 /* getrusage is defined but does not do anything. */
4380 /*fprintf(stderr,"getrusage failed: return=%d\n",count);*/
4383 while (time(NULL) < end) {
4385 getrusage(RUSAGE_SELF, &used);
4386 if ((used.ru_utime.tv_usec != prev.ru_utime.tv_usec)
4387 || (used.ru_utime.tv_sec != prev.ru_utime.tv_sec)
4388 || (used.ru_stime.tv_usec != prev.ru_stime.tv_usec)
4389 || (used.ru_stime.tv_sec != prev.ru_stime.tv_sec)) {
4390 /*fprintf(stderr,"success after %d runs\n",count);*/
4394 /* getrusage is defined but does not work. */
4395 /*fprintf(stderr,"failure after %d runs\n",count);*/
4398 cl_cv_func_getrusage_works=yes,
4399 cl_cv_func_getrusage_works=no,
4400 dnl When cross-compiling, don't assume anything.
4401 cl_cv_func_getrusage_works="guessing no")])
4403 if test $cl_cv_func_getrusage_works = yes; then
4404 AC_DEFINE(HAVE_GETRUSAGE,,[have <sys/time.h>, the getrusage() function, the struct rusage type, and <sys/resource.h> defines RUSAGE_SELF])
4405 AC_DEFINE_UNQUOTED(RUSAGE_WHO_T,$cl_cv_proto_getrusage_arg1,[type of `who' in getrusage() declaration])
4410 dnl -*- Autoconf -*-
4411 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4412 dnl This file is free software, distributed under the terms of the GNU
4413 dnl General Public License. As a special exception to the GNU General
4414 dnl Public License, this file may be distributed as part of a program
4415 dnl that contains a configuration script generated by Autoconf, under
4416 dnl the same distribution terms as the rest of that program.
4418 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4422 AC_DEFUN([CL_PERROR],
4423 [AC_MSG_CHECKING(for perror declaration)
4424 AC_CACHE_VAL(cl_cv_proto_perror, [
4426 /* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
4427 declare it at all. */
4430 ]AC_LANG_EXTERN[double perror ();], [],
4431 cl_cv_proto_perror=no, cl_cv_proto_perror=yes)
4433 AC_MSG_RESULT([$cl_cv_proto_perror])
4434 if test $cl_cv_proto_perror = yes; then
4435 AC_DEFINE(HAVE_PERROR_DECL,,[<errno.h> or <stdio.h> contains a declaration for perror()])
4439 dnl -*- Autoconf -*-
4440 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4441 dnl This file is free software, distributed under the terms of the GNU
4442 dnl General Public License. As a special exception to the GNU General
4443 dnl Public License, this file may be distributed as part of a program
4444 dnl that contains a configuration script generated by Autoconf, under
4445 dnl the same distribution terms as the rest of that program.
4447 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
4451 AC_DEFUN([CL_MACHINE],
4452 [AC_REQUIRE([AC_PROG_CC])dnl
4453 AC_REQUIRE([AC_C_CHAR_UNSIGNED])dnl
4454 cl_machine_file_c=$2
4455 cl_machine_file_h=$3
4456 if test $cross_compiling = no; then
4457 if test -z "$[$4]"; then
4458 AC_CHECKING(for [$1])
4459 cat > conftest.$ac_ext <<EOF
4460 #include "confdefs.h"
4462 cat "$cl_machine_file_c" >> conftest.$ac_ext
4464 if test $ac_cv_prog_gcc = yes; then
4465 # gcc -O (gcc version <= 2.3.2) crashes when compiling long long shifts for
4466 # target 80386. Strip "-O".
4467 CC=`echo "$CC " | sed -e 's/-O //g'`
4469 AC_TRY_EVAL(ac_link)
4471 if test -s conftest; then
4472 echo "creating $cl_machine_file_h"
4473 ./conftest > conftest.h
4474 if cmp -s "$cl_machine_file_h" conftest.h 2>/dev/null; then
4475 # The file exists and we would not be changing it
4478 rm -f "$cl_machine_file_h"
4479 mv conftest.h "$cl_machine_file_h"
4483 echo "creation of $cl_machine_file_h failed"
4488 echo "cross-compiling - cannot create $cl_machine_file_h"
4492 dnl -*- Autoconf -*-
4493 dnl Copyright (C) 1993-2003 Free Software Foundation, Inc.
4494 dnl This file is free software, distributed under the terms of the GNU
4495 dnl General Public License. As a special exception to the GNU General
4496 dnl Public License, this file may be distributed as part of a program
4497 dnl that contains a configuration script generated by Autoconf, under
4498 dnl the same distribution terms as the rest of that program.
4500 dnl From Richard B. Kreckel.
4504 dnl Is the gmp header file new enough? (should be implemented with an argument)
4505 AC_DEFUN([CL_GMP_H_VERSION],
4506 [AC_CACHE_CHECK([for recent enough gmp.h], cl_cv_new_gmp_h, [
4507 AC_TRY_CPP([#include <gmp.h>
4508 #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
4509 #error "ancient gmp.h"
4511 cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no")
4514 dnl Does libgmp provide some functionality introduced in version 3.0?
4515 AC_DEFUN([CL_GMP_CHECK],
4516 [AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
4519 AC_TRY_LINK([#include <gmp.h>],[mpn_divexact_by3(0,0,0)],
4520 cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no")
4522 if test x"$cl_cv_new_libgmp" = xyes; then
4527 dnl What is sizeof(mp_limb_t)? (It has to match sizeof(uintD) later.)
4528 AC_DEFUN([CL_GMP_SET_UINTD],
4529 [AC_CACHE_CHECK([how large gmp demands uintD to be], cl_cv_gmp_set_uintd, [
4530 AC_TRY_RUN([#include <stdio.h>
4533 FILE *f=fopen("conftestval", "w");
4534 if (!f) return(255);
4535 if (sizeof(mp_limb_t) > sizeof(long))
4536 fprintf(f, "long long");
4537 else if (sizeof(mp_limb_t) == sizeof(long))
4539 else if (sizeof(mp_limb_t) == sizeof(int))
4541 else return(sizeof(mp_limb_t));
4542 #if defined(__GMP_BITS_PER_MP_LIMB)
4543 /* Is there a nail in a limb? */
4544 if (8*sizeof(mp_limb_t)!=__GMP_BITS_PER_MP_LIMB)
4548 }], cl_cv_gmp_set_uintd=`cat conftestval`
4549 cl_gmp_demands="GMP_DEMANDS_UINTD_`echo ${cl_cv_gmp_set_uintd} | sed -e 'y/ gilnot/_GILNOT/'`",
4550 gmp_retval="$ac_status"
4551 if test x$gmp_retval = "x255"; then AC_MSG_ERROR([error opening output file.]); fi
4552 if test x$gmp_retval = "x254"; then AC_MSG_ERROR([nails in MP limbs are unsupported.]); fi
4553 AC_MSG_ERROR([Don't know which C-type has sizeof $gmp_retval.]),
4554 AC_MSG_ERROR([cross-compiling - cannot determine]))
4556 AC_DEFINE_UNQUOTED($cl_gmp_demands)