1 # autoconf/aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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
14 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
15 dnl This file is free software, distributed under the terms of the GNU
16 dnl General Public License. As a special exception to the GNU General
17 dnl Public License, this file may be distributed as part of a program
18 dnl that contains a configuration script generated by Autoconf, under
19 dnl the same distribution terms as the rest of that program.
21 dnl From Bruno Haible, Marcus Daniels.
25 AC_DEFUN([CL_PROG_RANLIB],
26 [AC_CHECK_PROG(RANLIB, ranlib, ranlib, true)])
28 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
29 dnl This file is free software, distributed under the terms of the GNU
30 dnl General Public License. As a special exception to the GNU General
31 dnl Public License, this file may be distributed as part of a program
32 dnl that contains a configuration script generated by Autoconf, under
33 dnl the same distribution terms as the rest of that program.
35 dnl From Bruno Haible, Marcus Daniels.
39 AC_DEFUN([CL_PROG_CP],
40 [AC_CACHE_CHECK(how to copy files, cl_cv_prog_cp, [
41 echo "blabla" > conftest.x
42 err=`/bin/sh -c "cp -p conftest.x conftest.y 2>&1"`
43 if test -z "$err"; then
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_PROG_LN],
66 [AC_REQUIRE([CL_PROG_CP])dnl
67 AC_CACHE_CHECK(how to make hard links, cl_cv_prog_LN, [
68 rm -f conftestdata conftestfile
69 echo data > conftestfile
70 if ln conftestfile conftestdata 2>/dev/null; then
73 cl_cv_prog_LN="$cl_cv_prog_cp"
75 rm -f conftestdata conftestfile
81 AC_DEFUN([CL_PROG_LN_S],
82 [AC_REQUIRE([CL_PROG_LN])dnl
83 dnl Make a symlink if possible; otherwise try a hard link. On filesystems
84 dnl which support neither symlink nor hard link, use a plain copy.
85 AC_MSG_CHECKING(whether ln -s works)
86 AC_CACHE_VAL(cl_cv_prog_LN_S, [
88 if ln -s X conftestdata 2>/dev/null; then
89 cl_cv_prog_LN_S="ln -s"
91 cl_cv_prog_LN_S="$cl_cv_prog_LN"
95 if test "$cl_cv_prog_LN_S" = "ln -s"; then
100 LN_S="$cl_cv_prog_LN_S"
104 AC_DEFUN([CL_PROG_HLN],
105 [AC_REQUIRE([CL_PROG_LN_S])dnl
106 dnl SVR4 "ln" makes hard links to symbolic links, instead of resolving the
107 dnl symbolic link. To avoid this, use the "hln" program.
108 AC_CACHE_CHECK(how to make hard links to symlinks, cl_cv_prog_hln, [
110 if test "$cl_cv_prog_LN_S" = "ln -s"; then
111 echo "blabla" > conftest.x
112 ln -s conftest.x conftest.y
113 ln conftest.y conftest.z 2>&AC_FD_CC
115 if cat conftest.z > /dev/null 2>&1 ; then
119 # conftest.z is a symbolic link to the non-existent conftest.x
123 # If there are no symbolic links, the problem cannot occur.
128 HLN="$cl_cv_prog_hln"
132 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
133 dnl This file is free software, distributed under the terms of the GNU
134 dnl General Public License. As a special exception to the GNU General
135 dnl Public License, this file may be distributed as part of a program
136 dnl that contains a configuration script generated by Autoconf, under
137 dnl the same distribution terms as the rest of that program.
139 dnl From Bruno Haible, Marcus Daniels, Sam Steingold.
143 dnl without AC_MSG_...: with AC_MSG_... and caching:
144 dnl AC_TRY_CPP CL_CPP_CHECK
145 dnl AC_TRY_COMPILE CL_COMPILE_CHECK
146 dnl AC_TRY_LINK CL_LINK_CHECK
147 dnl AC_TRY_RUN CL_RUN_CHECK - would require cross-compiling support
149 dnl AC_TRY_CPP(INCLUDES,
150 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
151 dnl CL_CPP_CHECK(ECHO-TEXT, CACHE-ID,
153 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
154 dnl AC_TRY_xxx(INCLUDES, FUNCTION-BODY,
155 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
156 dnl CL_xxx_CHECK(ECHO-TEXT, CACHE-ID,
157 dnl INCLUDES, FUNCTION-BODY,
158 dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
160 AC_DEFUN([CL_CPP_CHECK],
161 [AC_MSG_CHECKING(for $1)
163 AC_TRY_CPP([$3], $2=yes, $2=no)
166 if test [$]$2 = yes; then
167 ifelse([$4], , :, [$4])
168 ifelse([$5], , , [else
174 AC_DEFUN([CL_COMPILE_CHECK],
175 [AC_MSG_CHECKING(for $1)
177 AC_TRY_COMPILE([$3],[$4], $2=yes, $2=no)
180 if test [$]$2 = yes; then
181 ifelse([$5], , :, [$5])
182 ifelse([$6], , , [else
188 AC_DEFUN([CL_LINK_CHECK],
189 [AC_MSG_CHECKING(for $1)
191 AC_TRY_LINK([$3],[$4], $2=yes, $2=no)
194 if test [$]$2 = yes; then
195 ifelse([$5], , :, [$5])
196 ifelse([$6], , , [else
202 dnl CL_SILENT(ACTION)
203 dnl performs ACTION, with AC_MSG_CHECKING and AC_MSG_RESULT being defined away.
204 AC_DEFUN([CL_SILENT],
205 [pushdef([AC_MSG_CHECKING],[:])dnl
206 pushdef([AC_CHECKING],[:])dnl
207 pushdef([AC_MSG_RESULT],[:])dnl
209 popdef([AC_MSG_RESULT])dnl
210 popdef([AC_CHECKING])dnl
211 popdef([AC_MSG_CHECKING])dnl
214 dnl Expands to the "extern ..." prefix used for system declarations.
216 AC_DEFUN([AC_LANG_EXTERN],
223 AC_DEFUN([CL_CC_WORKS],
224 [AC_CACHE_CHECK(whether CC works at all, cl_cv_prog_cc_works, [
227 AC_TRY_RUN([int main() { exit(0); }],
228 cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no,
229 AC_TRY_LINK([], [], cl_cv_prog_cc_works=yes, cl_cv_prog_cc_works=no))
232 case "$cl_cv_prog_cc_works" in
233 *no) echo "Installation or configuration problem: C compiler cannot create executables."; exit 1;;
238 AC_DEFUN([CL_CONFIG_SUBDIRS],
239 [dnl No AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
240 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])
241 AC_CONFIG_SUBDIRS([$1])dnl
244 AC_DEFUN([CL_CANONICAL_HOST],
245 [AC_REQUIRE([AC_PROG_CC]) dnl Actually: AC_REQUIRE([CL_CC_WORKS])
246 dnl Set ac_aux_dir before the cache check, because AM_PROG_LIBTOOL needs it.
247 ac_aux_dir=${srcdir}/$1
248 dnl A substitute for AC_CONFIG_AUX_DIR_DEFAULT, so we don't need install.sh.
249 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
250 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
251 dnl We have defined $ac_aux_dir.
252 AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
253 dnl In autoconf-2.52, a single AC_CANONICAL_HOST has the effect of inserting
254 dnl the code of AC_CANONICAL_BUILD *before* CL_CANONICAL_HOST, i.e. before
255 dnl ac_aux_dir has been set. To work around this, we list AC_CANONICAL_BUILD
261 AC_DEFUN([CL_CANONICAL_HOST_CPU],
262 [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
268 alphaev[4-7] | alphaev56 | alphapca5[67] | alphaev6[78] )
271 hppa1.0 | hppa1.1 | hppa2.0* )
277 c1 | c2 | c32 | c34 | c38 | c4 )
285 AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
287 [#if defined(_MIPS_SZLONG)
288 #if (_MIPS_SZLONG == 64)
289 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
293 ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
295 if test $cl_cv_host_mips64 = yes; then
299 dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
300 dnl still generates 32-bit code.
302 AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
304 [#if defined(__sparcv9) || defined(__arch64__)
307 ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
309 if test $cl_cv_host_sparc64 = yes; then
316 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
317 cat >> confdefs.h <<EOF
318 #ifndef __${host_cpu}__
319 #define __${host_cpu}__ 1
324 AC_DEFUN([CL_CANONICAL_HOST_CPU_FOR_FFCALL],
325 [AC_REQUIRE([CL_CANONICAL_HOST])AC_REQUIRE([AC_PROG_CC])
331 alphaev[4-7] | alphaev56 | alphapca5[67] | alphaev6[78] )
334 hppa1.0 | hppa1.1 | hppa2.0* )
340 c1 | c2 | c32 | c34 | c38 | c4 )
348 AC_CACHE_CHECK([for 64-bit MIPS], cl_cv_host_mips64, [
350 [#if defined(_MIPS_SZLONG)
351 #if (_MIPS_SZLONG == 64)
352 /* We should also check for (_MIPS_SZPTR == 64), but gcc keeps this at 32. */
356 ], cl_cv_host_mips64=yes, cl_cv_host_mips64=no)
358 if test $cl_cv_host_mips64 = yes; then
361 AC_CACHE_CHECK([for MIPS with n32 ABI], cl_cv_host_mipsn32, [
362 dnl Strictly speaking, the MIPS ABI (-32 or -n32) is independent from the CPU
363 dnl identification (-mips[12] or -mips[34]). But -n32 is commonly used together
364 dnl with -mips3, and it's easier to test the CPU identification.
369 ], cl_cv_host_mipsn32=yes, cl_cv_host_mipsn32=no)
371 if test $cl_cv_host_mipsn32 = yes; then
376 dnl UltraSPARCs running Linux have `uname -m` = "sparc64", but the C compiler
377 dnl still generates 32-bit code.
379 AC_CACHE_CHECK([for 64-bit SPARC], cl_cv_host_sparc64, [
381 [#if defined(__sparcv9) || defined(__arch64__)
384 ], cl_cv_host_sparc64=yes, cl_cv_host_sparc64=no)
386 if test $cl_cv_host_sparc64 = yes; then
393 dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this
394 cat >> confdefs.h <<EOF
395 #ifndef __${host_cpu}__
396 #define __${host_cpu}__ 1
401 # isc-posix.m4 serial 2 (gettext-0.11.2)
402 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
403 dnl This file is free software, distributed under the terms of the GNU
404 dnl General Public License. As a special exception to the GNU General
405 dnl Public License, this file may be distributed as part of a program
406 dnl that contains a configuration script generated by Autoconf, under
407 dnl the same distribution terms as the rest of that program.
409 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
411 # This test replaces the one in autoconf.
412 # Currently this macro should have the same name as the autoconf macro
413 # because gettext's gettext.m4 (distributed in the automake package)
414 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
415 # give these diagnostics:
416 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
417 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
419 undefine([AC_ISC_POSIX])
421 AC_DEFUN([AC_ISC_POSIX],
423 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
424 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
428 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
430 # The next line was added by Bruno Haible 2001-06-08.
431 builtin([undefine],[symbols])
433 # serial 46 AC_PROG_LIBTOOL
435 AC_DEFUN([AC_PROG_LIBTOOL],
436 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
438 # This can be used to rebuild libtool when needed
439 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
441 # Always use our own libtool.
442 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
445 # Prevent multiple expansion
446 define([AC_PROG_LIBTOOL], [])
449 AC_DEFUN([AC_LIBTOOL_SETUP],
451 AC_REQUIRE([AC_ENABLE_SHARED])dnl
452 AC_REQUIRE([AC_ENABLE_STATIC])dnl
453 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
454 AC_REQUIRE([CL_CANONICAL_HOST])dnl
455 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
456 AC_REQUIRE([AC_PROG_CC])dnl
457 AC_REQUIRE([AC_PROG_LD])dnl
458 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
459 AC_REQUIRE([AC_PROG_NM])dnl
460 AC_REQUIRE([CL_PROG_LN_S])dnl
461 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
462 AC_REQUIRE([AC_OBJEXT])dnl
463 AC_REQUIRE([AC_EXEEXT])dnl
466 _LT_AC_PROG_ECHO_BACKSLASH
467 # Only perform the check for file, if the check method requires it
468 case $deplibs_check_method in
470 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
476 AC_CHECK_TOOL(RANLIB, ranlib, :)
477 AC_CHECK_TOOL(STRIP, strip, :)
479 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
480 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
481 enable_win32_dll=yes, enable_win32_dll=no)
483 AC_ARG_ENABLE(libtool-lock,
484 [ --disable-libtool-lock avoid locking (might break parallel builds)])
485 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
487 # Some flags need to be propagated to the compiler or linker for good
491 # Find out which ABI we are using.
492 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
493 if AC_TRY_EVAL(ac_compile); then
494 case `/usr/bin/file conftest.$ac_objext` in
510 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
511 SAVE_CFLAGS="$CFLAGS"
512 CFLAGS="$CFLAGS -belf"
513 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
516 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
518 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
519 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
520 CFLAGS="$SAVE_CFLAGS"
524 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
525 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
526 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
527 AC_CHECK_TOOL(AS, as, false)
528 AC_CHECK_TOOL(OBJDUMP, objdump, false)
530 # recent cygwin and mingw systems supply a stub DllMain which the user
531 # can override, but on older systems we have to supply one
532 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
534 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
536 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
539 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
540 # old mingw systems require "-dll" to link a DLL, while more recent ones
542 SAVE_CFLAGS="$CFLAGS"
543 CFLAGS="$CFLAGS -mdll"
544 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
545 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
546 CFLAGS="$SAVE_CFLAGS" ;;
547 *-*-cygwin* | *-*-pw32*)
548 # cygwin systems need to pass --dll to the linker, and not link
549 # crt.o which will require a WinMain@16 definition.
550 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
560 # AC_LIBTOOL_HEADER_ASSERT
561 # ------------------------
562 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
563 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
564 [lt_cv_func_assert_works],
567 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
568 case `$CC --version 2>/dev/null` in
569 [[12]].*) lt_cv_func_assert_works=no ;;
570 *) lt_cv_func_assert_works=yes ;;
576 if test "x$lt_cv_func_assert_works" = xyes; then
577 AC_CHECK_HEADERS(assert.h)
579 ])# AC_LIBTOOL_HEADER_ASSERT
582 # --------------------
583 AC_DEFUN([_LT_AC_CHECK_DLFCN],
584 [AC_CHECK_HEADERS(dlfcn.h)
585 ])# _LT_AC_CHECK_DLFCN
587 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
588 # ---------------------------------
589 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
590 [AC_REQUIRE([CL_CANONICAL_HOST])
591 AC_REQUIRE([AC_PROG_NM])
592 AC_REQUIRE([AC_OBJEXT])
593 # Check for command to grab the raw symbol name followed by C symbol from nm.
594 AC_MSG_CHECKING([command to parse $NM output])
595 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
597 # These are sane defaults that work on at least a few old systems.
598 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
600 # Character class describing NM global symbol codes.
601 symcode='[[BCDEGRST]]'
603 # Regexp to match symbols that can be accessed directly from C.
604 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
606 # Transform the above into a raw symbol and a C symbol.
609 # Transform an extracted symbol line into a proper C declaration
610 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
612 # Transform an extracted symbol line into symbol name and symbol address
613 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'"
615 # Define system-specific variables.
620 cygwin* | mingw* | pw32*)
621 symcode='[[ABCDGISTW]]'
623 hpux*) # Its linker distinguishes data from code symbols
624 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
625 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'"
628 symcode='[[BCDEGRST]]'
638 # Handle CRLF in mingw tool chain
642 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
646 # If we're using GNU nm, then use its standard symbol codes.
647 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
648 symcode='[[ABCDGISTW]]'
651 # Try without a prefix undercore, then with it.
652 for ac_symprfx in "" "_"; do
654 # Write the raw and C identifiers.
655 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
657 # Check to see that the pipe works correctly.
660 cat > conftest.$ac_ext <<EOF
665 void nm_test_func(){}
669 int main(){nm_test_var='a';nm_test_func();return(0);}
672 if AC_TRY_EVAL(ac_compile); then
673 # Now try to grab the symbols.
675 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
676 # Try sorting and uniquifying the output.
677 if sort "$nlist" | uniq > "$nlist"T; then
678 mv -f "$nlist"T "$nlist"
683 # Make sure that we snagged all the symbols we need.
684 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
685 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
686 cat <<EOF > conftest.$ac_ext
692 # Now generate the symbol file.
693 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
695 cat <<EOF >> conftest.$ac_ext
696 #if defined (__STDC__) && __STDC__
697 # define lt_ptr void *
699 # define lt_ptr char *
703 /* The mapping between symbol names and symbols. */
708 lt_preloaded_symbols[[]] =
711 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
712 cat <<\EOF >> conftest.$ac_ext
720 # Now try linking the two files.
721 mv conftest.$ac_objext conftstm.$ac_objext
723 save_CFLAGS="$CFLAGS"
724 LIBS="conftstm.$ac_objext"
725 CFLAGS="$CFLAGS$no_builtin_flag"
726 if AC_TRY_EVAL(ac_link) && test -s conftest; then
730 CFLAGS="$save_CFLAGS"
732 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
735 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
738 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
741 echo "$progname: failed program was:" >&AC_FD_CC
742 cat conftest.$ac_ext >&5
744 rm -f conftest* conftst*
746 # Do not use the global_symbol_pipe unless it works.
747 if test "$pipe_works" = yes; then
750 lt_cv_sys_global_symbol_pipe=
754 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
755 if test -z "$lt_cv_sys_global_symbol_pipe"; then
756 global_symbol_to_cdecl=
757 global_symbol_to_c_name_address=
759 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
760 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
762 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
764 AC_MSG_RESULT(failed)
768 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
770 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
771 # ---------------------------------
772 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
773 [# Find the correct PATH separator. Usually this is `:', but
774 # DJGPP uses `;' like DOS.
775 if test "X${PATH_SEPARATOR+set}" != Xset; then
776 UNAME=${UNAME-`uname 2>/dev/null`}
778 *-DOS) lt_cv_sys_path_separator=';' ;;
779 *) lt_cv_sys_path_separator=':' ;;
781 PATH_SEPARATOR=$lt_cv_sys_path_separator
783 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
785 # _LT_AC_PROG_ECHO_BACKSLASH
786 # --------------------------
787 # Add some code to the start of the generated configure script which
788 # will find an echo command which doesn't interpret backslashes.
789 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
790 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
791 [AC_DIVERT_PUSH(NOTICE)])
792 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
794 # Check that we are running under the correct shell.
795 SHELL=${CONFIG_SHELL-/bin/sh}
799 # Remove one level of quotation (which was required for Make).
800 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
805 if test "X[$]1" = X--no-reexec; then
806 # Discard the --no-reexec flag, and continue.
808 elif test "X[$]1" = X--fallback-echo; then
809 # Avoid inline document here, it may be left over
811 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
812 # Yippee, $echo works!
815 # Restart under the correct shell.
816 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
819 if test "X[$]1" = X--fallback-echo; then
820 # used as fallback echo
828 # The HP-UX ksh and POSIX shell print the target directory to stdout
830 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
832 if test -z "$ECHO"; then
833 if test "X${echo_test_string+set}" != Xset; then
834 # find a string as large as possible, as long as the shell can cope with it
835 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
836 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
837 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
838 echo_test_string="`eval $cmd`" &&
839 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
846 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
847 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
848 test "X$echo_testing_string" = "X$echo_test_string"; then
851 # The Solaris, AIX, and Digital Unix default echo programs unquote
852 # backslashes. This makes it impossible to quote backslashes using
853 # echo "$something" | sed 's/\\/\\\\/g'
855 # So, first we look for a working echo in the user's PATH.
857 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
858 for dir in $PATH /usr/ucb; do
859 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
860 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
861 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
862 test "X$echo_testing_string" = "X$echo_test_string"; then
869 if test "X$echo" = Xecho; then
870 # We didn't find a better echo, so look for alternatives.
871 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
872 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
873 test "X$echo_testing_string" = "X$echo_test_string"; then
874 # This shell has a builtin print -r that does the trick.
876 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
877 test "X$CONFIG_SHELL" != X/bin/ksh; then
878 # If we have ksh, try running configure again with it.
879 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
880 export ORIGINAL_CONFIG_SHELL
881 CONFIG_SHELL=/bin/ksh
883 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
887 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
888 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
889 test "X$echo_testing_string" = "X$echo_test_string"; then
892 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
893 test "X$echo_testing_string" = 'X\t' &&
894 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
895 test "X$echo_testing_string" = "X$echo_test_string"; then
896 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
898 SHELL="$CONFIG_SHELL"
900 echo="$CONFIG_SHELL [$]0 --fallback-echo"
901 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
902 test "X$echo_testing_string" = 'X\t' &&
903 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
904 test "X$echo_testing_string" = "X$echo_test_string"; then
905 echo="$CONFIG_SHELL [$]0 --fallback-echo"
907 # maybe with a smaller string...
910 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
911 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
918 if test "$prev" != 'sed 50q "[$]0"'; then
919 echo_test_string=`eval $prev`
920 export echo_test_string
921 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
923 # Oops. We lost completely, so just stick with echo.
932 # Copy echo and quote the copy suitably for passing to libtool from
933 # the Makefile, instead of quoting the original, which is used later.
935 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
936 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
941 ])# _LT_AC_PROG_ECHO_BACKSLASH
943 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
944 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
945 # ------------------------------------------------------------------
946 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
947 [if test "$cross_compiling" = yes; then :
950 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
951 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
952 lt_status=$lt_dlunknown
953 cat > conftest.$ac_ext <<EOF
954 [#line __oline__ "configure"
955 #include "confdefs.h"
964 # define LT_DLGLOBAL RTLD_GLOBAL
967 # define LT_DLGLOBAL DL_GLOBAL
969 # define LT_DLGLOBAL 0
973 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
974 find out it does not work in some platform. */
975 #ifndef LT_DLLAZY_OR_NOW
977 # define LT_DLLAZY_OR_NOW RTLD_LAZY
980 # define LT_DLLAZY_OR_NOW DL_LAZY
983 # define LT_DLLAZY_OR_NOW RTLD_NOW
986 # define LT_DLLAZY_OR_NOW DL_NOW
988 # define LT_DLLAZY_OR_NOW 0
996 extern "C" void exit (int);
999 void fnord() { int i=42;}
1002 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1003 int status = $lt_dlunknown;
1007 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1008 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1009 /* dlclose (self); */
1015 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1016 (./conftest; exit; ) 2>/dev/null
1019 x$lt_dlno_uscore) $1 ;;
1020 x$lt_dlneed_uscore) $2 ;;
1021 x$lt_unknown|x*) $3 ;;
1024 # compilation failed
1029 ])# _LT_AC_TRY_DLOPEN_SELF
1031 # AC_LIBTOOL_DLOPEN_SELF
1032 # -------------------
1033 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1034 [if test "x$enable_dlopen" != xyes; then
1035 enable_dlopen=unknown
1036 enable_dlopen_self=unknown
1037 enable_dlopen_self_static=unknown
1044 lt_cv_dlopen="load_add_on"
1046 lt_cv_dlopen_self=yes
1049 cygwin* | mingw* | pw32*)
1050 lt_cv_dlopen="LoadLibrary"
1055 AC_CHECK_FUNC([shl_load],
1056 [lt_cv_dlopen="shl_load"],
1057 [AC_CHECK_LIB([dld], [shl_load],
1058 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1059 [AC_CHECK_FUNC([dlopen],
1060 [lt_cv_dlopen="dlopen"],
1061 [AC_CHECK_LIB([dl], [dlopen],
1062 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1063 [AC_CHECK_LIB([svld], [dlopen],
1064 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1065 [AC_CHECK_LIB([dld], [dld_link],
1066 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1075 if test "x$lt_cv_dlopen" != xno; then
1081 case $lt_cv_dlopen in
1083 save_CPPFLAGS="$CPPFLAGS"
1084 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1085 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1087 save_LDFLAGS="$LDFLAGS"
1088 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1091 LIBS="$lt_cv_dlopen_libs $LIBS"
1093 AC_CACHE_CHECK([whether a program can dlopen itself],
1094 lt_cv_dlopen_self, [dnl
1095 _LT_AC_TRY_DLOPEN_SELF(
1096 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1097 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1100 if test "x$lt_cv_dlopen_self" = xyes; then
1101 LDFLAGS="$LDFLAGS $link_static_flag"
1102 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1103 lt_cv_dlopen_self_static, [dnl
1104 _LT_AC_TRY_DLOPEN_SELF(
1105 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1106 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1110 CPPFLAGS="$save_CPPFLAGS"
1111 LDFLAGS="$save_LDFLAGS"
1116 case $lt_cv_dlopen_self in
1117 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1118 *) enable_dlopen_self=unknown ;;
1121 case $lt_cv_dlopen_self_static in
1122 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1123 *) enable_dlopen_self_static=unknown ;;
1126 ])# AC_LIBTOOL_DLOPEN_SELF
1128 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1129 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1130 # Sed substitution that helps us do robust quoting. It backslashifies
1131 # metacharacters that are still active within double-quoted strings.
1132 Xsed='sed -e s/^X//'
1133 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1135 # Same as above, but do not quote variable references.
1136 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1138 # Sed substitution to delay expansion of an escaped shell variable in a
1139 # double_quote_subst'ed string.
1140 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1146 default_ofile=libtool
1147 can_build_shared=yes
1149 # All known linkers require a `.a' archive for static linking (except M$VC,
1150 # which needs '.lib').
1152 ltmain="$ac_aux_dir/ltmain.sh"
1153 ofile="$default_ofile"
1154 with_gnu_ld="$lt_cv_prog_gnu_ld"
1155 need_locks="$enable_libtool_lock"
1158 old_CFLAGS="$CFLAGS"
1160 # Set sane defaults for various variables
1161 test -z "$AR" && AR=ar
1162 test -z "$AR_FLAGS" && AR_FLAGS=cru
1163 test -z "$AS" && AS=as
1164 test -z "$CC" && CC=cc
1165 test -z "$DLLTOOL" && DLLTOOL=dlltool
1166 test -z "$LD" && LD=ld
1167 test -z "$LN_S" && LN_S="ln -s"
1168 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1169 test -z "$NM" && NM=nm
1170 test -z "$OBJDUMP" && OBJDUMP=objdump
1171 test -z "$RANLIB" && RANLIB=:
1172 test -z "$STRIP" && STRIP=:
1173 test -z "$ac_objext" && ac_objext=o
1175 if test x"$host" != x"$build"; then
1176 ac_tool_prefix=${host_alias}-
1181 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1184 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1189 # AIX sometimes has problems with the GCC collect2 program. For some
1190 # reason, if we set the COLLECT_NAMES environment variable, the problems
1191 # vanish in a puff of smoke.
1192 if test "X${COLLECT_NAMES+set}" != Xset; then
1194 export COLLECT_NAMES
1199 # Determine commands to create old-style static archives.
1200 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1201 old_postinstall_cmds='chmod 644 $oldlib'
1202 old_postuninstall_cmds=
1204 if test -n "$RANLIB"; then
1207 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1210 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1213 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1216 # Allow CC to be a program name with arguments.
1220 AC_MSG_CHECKING([for objdir])
1221 rm -f .libs 2>/dev/null
1222 mkdir .libs 2>/dev/null
1223 if test -d .libs; then
1226 # MS-DOS does not allow filenames that begin with a dot.
1229 rmdir .libs 2>/dev/null
1230 AC_MSG_RESULT($objdir)
1234 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1235 pic_mode="$withval", pic_mode=default)
1236 test -z "$pic_mode" && pic_mode=default
1238 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1239 # in isolation, and that seeing it set (from the cache) indicates that
1240 # the associated values are set (in the cache) correctly too.
1241 AC_MSG_CHECKING([for $compiler option to produce PIC])
1242 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1243 [ lt_cv_prog_cc_pic=
1244 lt_cv_prog_cc_shlib=
1246 lt_cv_prog_cc_static=
1247 lt_cv_prog_cc_no_builtin=
1248 lt_cv_prog_cc_can_build_shared=$can_build_shared
1250 if test "$GCC" = yes; then
1251 lt_cv_prog_cc_wl='-Wl,'
1252 lt_cv_prog_cc_static='-static'
1256 # Below there is a dirty hack to force normal static linking with -ldl
1257 # The problem is because libdl dynamically linked with both libc and
1258 # libC (AIX C++ library), which obviously doesn't included in libraries
1259 # list by gcc. This cause undefined symbols with -static flags.
1260 # This hack allows C programs to be linked with "-static -ldl", but
1261 # not sure about C++ programs.
1262 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1265 # FIXME: we need at least 68020 code to build shared libraries, but
1266 # adding the `-m68020' flag to GCC prevents building anything better,
1268 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1270 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1271 # PIC is the default for these OSes.
1273 darwin* | rhapsody*)
1274 # PIC is the default on this platform
1275 # Common symbols not allowed in MH_DYLIB files
1276 lt_cv_prog_cc_pic='-fno-common'
1278 cygwin* | mingw* | pw32* | os2*)
1279 # This hack is so that the source file can tell whether it is being
1280 # built for inclusion in a dll (and should export symbols for example).
1281 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1284 if test -d /usr/nec; then
1285 lt_cv_prog_cc_pic=-Kconform_pic
1289 lt_cv_prog_cc_pic='-fPIC'
1293 # PORTME Check for PIC flags for the system compiler.
1295 aix3* | aix4* | aix5*)
1296 lt_cv_prog_cc_wl='-Wl,'
1297 # All AIX code is PIC.
1298 if test "$host_cpu" = ia64; then
1299 # AIX 5 now supports IA64 processor
1300 lt_cv_prog_cc_static='-Bstatic'
1302 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1306 hpux9* | hpux10* | hpux11*)
1307 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1308 lt_cv_prog_cc_wl='-Wl,'
1309 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1310 lt_cv_prog_cc_pic='+Z'
1314 lt_cv_prog_cc_wl='-Wl,'
1315 lt_cv_prog_cc_static='-non_shared'
1316 # PIC (with -KPIC) is the default.
1320 echo '__INTEL_COMPILER' > conftest.$ac_ext
1321 if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
1323 lt_cv_prog_cc_can_build_shared=no
1326 lt_cv_prog_cc_pic='-KPIC'
1327 lt_cv_prog_cc_static='-static'
1328 lt_cv_prog_cc_wl='-Qoption,ld,'
1332 cygwin* | mingw* | pw32* | os2*)
1333 # This hack is so that the source file can tell whether it is being
1334 # built for inclusion in a dll (and should export symbols for example).
1335 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1339 lt_cv_prog_cc_pic='-KPIC'
1340 lt_cv_prog_cc_static='-Bstatic'
1343 osf3* | osf4* | osf5*)
1344 # All OSF/1 code is PIC.
1345 lt_cv_prog_cc_wl='-Wl,'
1346 lt_cv_prog_cc_static='-non_shared'
1350 lt_cv_prog_cc_pic='-Kpic'
1351 lt_cv_prog_cc_static='-dn'
1352 lt_cv_prog_cc_shlib='-belf'
1356 lt_cv_prog_cc_pic='-KPIC'
1357 lt_cv_prog_cc_static='-Bstatic'
1358 lt_cv_prog_cc_wl='-Wl,'
1362 lt_cv_prog_cc_pic='-PIC'
1363 lt_cv_prog_cc_static='-Bstatic'
1364 lt_cv_prog_cc_wl='-Qoption ld '
1367 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1368 lt_cv_prog_cc_pic='-KPIC'
1369 lt_cv_prog_cc_static='-Bstatic'
1370 if test "x$host_vendor" = xsni; then
1371 lt_cv_prog_cc_wl='-LD'
1373 lt_cv_prog_cc_wl='-Wl,'
1378 lt_cv_prog_cc_pic='-pic'
1379 lt_cv_prog_cc_static='-Bstatic'
1383 if test -d /usr/nec ;then
1384 lt_cv_prog_cc_pic='-Kconform_pic'
1385 lt_cv_prog_cc_static='-Bstatic'
1390 lt_cv_prog_cc_can_build_shared=no
1395 if test -z "$lt_cv_prog_cc_pic"; then
1396 AC_MSG_RESULT([none])
1398 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1400 # Check to make sure the pic_flag actually works.
1401 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1402 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1403 save_CFLAGS="$CFLAGS"
1404 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1405 AC_TRY_COMPILE([], [], [dnl
1407 hpux9* | hpux10* | hpux11*)
1408 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1409 # they create non-PIC objects. So, if there were any warnings, we
1410 # assume that PIC is not supported.
1411 if test -s conftest.err; then
1412 lt_cv_prog_cc_pic_works=no
1414 lt_cv_prog_cc_pic_works=yes
1418 lt_cv_prog_cc_pic_works=yes
1422 lt_cv_prog_cc_pic_works=no
1424 CFLAGS="$save_CFLAGS"
1427 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1429 lt_cv_prog_cc_can_build_shared=no
1431 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1434 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1437 # Check for any special shared library compilation flags.
1438 if test -n "$lt_cv_prog_cc_shlib"; then
1439 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1440 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1442 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1443 lt_cv_prog_cc_can_build_shared=no
1447 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1448 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1449 lt_cv_prog_cc_static_works=no
1450 save_LDFLAGS="$LDFLAGS"
1451 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1452 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1453 LDFLAGS="$save_LDFLAGS"
1456 # Belt *and* braces to stop my trousers falling down:
1457 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1458 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1460 pic_flag="$lt_cv_prog_cc_pic"
1461 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1462 wl="$lt_cv_prog_cc_wl"
1463 link_static_flag="$lt_cv_prog_cc_static"
1464 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1465 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1468 # Check to see if options -o and -c are simultaneously supported by compiler
1469 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1470 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1471 $rm -r conftest 2>/dev/null
1474 echo "int some_variable = 0;" > conftest.$ac_ext
1476 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1477 # that will create temporary files in the current directory regardless of
1478 # the output directory. Thus, making CWD read-only will cause this test
1479 # to fail, enabling locking or at least warning the user not to do parallel
1482 save_CFLAGS="$CFLAGS"
1483 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1485 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1486 # The compiler can only warn and ignore the option if not recognized
1487 # So say no if there are warnings
1488 if test -s out/conftest.err; then
1489 lt_cv_compiler_c_o=no
1491 lt_cv_compiler_c_o=yes
1494 # Append any errors to the config.log.
1495 cat out/conftest.err 1>&AC_FD_CC
1496 lt_cv_compiler_c_o=no
1498 CFLAGS="$save_CFLAGS"
1504 $rm -r conftest 2>/dev/null
1506 compiler_c_o=$lt_cv_compiler_c_o
1507 AC_MSG_RESULT([$compiler_c_o])
1509 if test x"$compiler_c_o" = x"yes"; then
1510 # Check to see if we can write to a .lo
1511 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1512 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1513 lt_cv_compiler_o_lo=no
1514 save_CFLAGS="$CFLAGS"
1515 CFLAGS="$CFLAGS -c -o conftest.lo"
1516 save_objext="$ac_objext"
1518 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1519 # The compiler can only warn and ignore the option if not recognized
1520 # So say no if there are warnings
1521 if test -s conftest.err; then
1522 lt_cv_compiler_o_lo=no
1524 lt_cv_compiler_o_lo=yes
1527 ac_objext="$save_objext"
1528 CFLAGS="$save_CFLAGS"
1530 compiler_o_lo=$lt_cv_compiler_o_lo
1531 AC_MSG_RESULT([$compiler_o_lo])
1536 # Check to see if we can do hard links to lock some files if needed
1537 hard_links="nottested"
1538 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1539 # do not overwrite the value of need_locks provided by the user
1540 AC_MSG_CHECKING([if we can lock with hard links])
1543 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1545 ln conftest.a conftest.b 2>&5 || hard_links=no
1546 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1547 AC_MSG_RESULT([$hard_links])
1548 if test "$hard_links" = no; then
1549 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1556 if test "$GCC" = yes; then
1557 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1558 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1559 echo "int some_variable = 0;" > conftest.$ac_ext
1560 save_CFLAGS="$CFLAGS"
1561 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1562 compiler_rtti_exceptions=no
1563 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1564 # The compiler can only warn and ignore the option if not recognized
1565 # So say no if there are warnings
1566 if test -s conftest.err; then
1567 compiler_rtti_exceptions=no
1569 compiler_rtti_exceptions=yes
1572 CFLAGS="$save_CFLAGS"
1573 AC_MSG_RESULT([$compiler_rtti_exceptions])
1575 if test "$compiler_rtti_exceptions" = "yes"; then
1576 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1578 no_builtin_flag=' -fno-builtin'
1582 # See if the linker supports building shared libraries.
1583 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1585 allow_undefined_flag=
1587 need_lib_prefix=unknown
1588 need_version=unknown
1589 # when you set need_version to no, make sure it does not cause -set_version
1590 # flags to be left without arguments
1592 archive_expsym_cmds=
1593 old_archive_from_new_cmds=
1594 old_archive_from_expsyms_cmds=
1595 export_dynamic_flag_spec=
1596 whole_archive_flag_spec=
1597 thread_safe_flag_spec=
1598 hardcode_into_libs=no
1599 hardcode_libdir_flag_spec=
1600 hardcode_libdir_separator=
1603 hardcode_shlibpath_var=unsupported
1605 link_all_deplibs=unknown
1606 always_export_symbols=no
1607 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1608 # include_expsyms should be a list of space-separated symbols to be *always*
1609 # included in the symbol list
1611 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1612 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1613 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1614 # as well as any symbol that contains `d'.
1615 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1616 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1617 # platforms (ab)use it in PIC code, but their linkers get confused if
1618 # the symbol is explicitly referenced. Since portable code cannot
1619 # rely on this symbol name, it's probably fine to never include it in
1620 # preloaded symbol tables.
1621 extract_expsyms_cmds=
1624 cygwin* | mingw* | pw32*)
1625 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1626 # When not using gcc, we currently assume that we are using
1627 # Microsoft Visual C++.
1628 if test "$GCC" != yes; then
1638 if test "$with_gnu_ld" = yes; then
1639 # If archive_cmds runs LD, not CC, wlarc should be empty
1642 # See if GNU ld supports shared libraries.
1644 aix3* | aix4* | aix5*)
1645 # On AIX, the GNU linker is very broken
1646 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1650 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1651 *** to be unable to reliably create shared libraries on AIX.
1652 *** Therefore, libtool is disabling shared libraries support. If you
1653 *** really care for shared libraries, you may want to modify your PATH
1654 *** so that a non-GNU linker is found, and then restart.
1660 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)'
1661 hardcode_libdir_flag_spec='-L$libdir'
1662 hardcode_minus_L=yes
1664 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1665 # that the semantics of dynamic libraries on AmigaOS, at least up
1666 # to version 4, is to share data among multiple programs linked
1667 # with the same dynamic library. Since this doesn't match the
1668 # behavior of shared libraries on other platforms, we can use
1674 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1675 allow_undefined_flag=unsupported
1676 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1677 # support --undefined. This deserves some investigation. FIXME
1678 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1684 cygwin* | mingw* | pw32*)
1685 # hardcode_libdir_flag_spec is actually meaningless, as there is
1686 # no search path for DLLs.
1687 hardcode_libdir_flag_spec='-L$libdir'
1688 allow_undefined_flag=unsupported
1689 always_export_symbols=yes
1691 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1692 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1693 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1694 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1695 else $CC -o impgen impgen.c ; fi)~
1696 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1698 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1700 # cygwin and mingw dlls have different entry points and sets of symbols
1702 # FIXME: what about values for MSVC?
1703 dll_entry=__cygwin_dll_entry@12
1704 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1708 dll_entry=_DllMainCRTStartup@12
1709 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1713 # mingw and cygwin differ, and it's simplest to just exclude the union
1714 # of the two symbol sets.
1715 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1717 # recent cygwin and mingw systems supply a stub DllMain which the user
1718 # can override, but on older systems we have to supply one (in ltdll.c)
1719 if test "x$lt_cv_need_dllmain" = "xyes"; then
1720 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1721 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~
1722 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1728 # Extract the symbol export list from an `--export-all' def file,
1729 # then regenerate the def file from the symbol export list, so that
1730 # the compiled dll only exports the symbol export list.
1731 # Be careful not to strip the DATA tag left be newer dlltools.
1732 export_symbols_cmds="$ltdll_cmds"'
1733 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1734 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1736 # If the export-symbols file already is a .def file (1st line
1737 # is EXPORTS), use it as is.
1738 # If DATA tags from a recent dlltool are present, honour them!
1739 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1740 cp $export_symbols $output_objdir/$soname-def;
1742 echo EXPORTS > $output_objdir/$soname-def;
1744 cat $export_symbols | while read symbol; do
1747 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1748 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1750 _lt_hint=`expr 1 + \$_lt_hint`;
1754 $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~
1755 $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~
1756 $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~
1757 $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~
1758 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1762 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1763 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1766 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1767 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1772 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1776 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1777 *** create shared libraries on Solaris systems. Therefore, libtool
1778 *** is disabling shared libraries support. We urge you to upgrade GNU
1779 *** binutils to release 2.9.1 or newer. Another option is to modify
1780 *** your PATH or compiler configuration so that the native linker is
1781 *** used, and then restart.
1784 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1785 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1786 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1793 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1796 hardcode_shlibpath_var=no
1800 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1801 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1802 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1809 if test "$ld_shlibs" = yes; then
1810 runpath_var=LD_RUN_PATH
1811 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1812 export_dynamic_flag_spec='${wl}--export-dynamic'
1814 cygwin* | mingw* | pw32*)
1815 # dlltool doesn't understand --whole-archive et. al.
1816 whole_archive_flag_spec=
1819 # ancient GNU ld didn't support --whole-archive et. al.
1820 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1821 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1823 whole_archive_flag_spec=
1829 # PORTME fill in a description of your system's linker (not GNU ld)
1832 allow_undefined_flag=unsupported
1833 always_export_symbols=yes
1834 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'
1835 # Note: this linker hardcodes the directories in LIBPATH if there
1836 # are no directories specified by -L.
1837 hardcode_minus_L=yes
1838 if test "$GCC" = yes && test -z "$link_static_flag"; then
1839 # Neither direct hardcoding nor static linking is supported with a
1841 hardcode_direct=unsupported
1846 if test "$host_cpu" = ia64; then
1847 # On IA64, the linker does run time linking by default, so we don't
1848 # have to do anything special.
1849 aix_use_runtimelinking=no
1850 exp_sym_flag='-Bexport'
1853 aix_use_runtimelinking=no
1855 # Test if we are trying to use run time linking or normal
1856 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1857 # need to do runtime linking.
1858 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1859 for ld_flag in $LDFLAGS; do
1860 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1861 aix_use_runtimelinking=yes
1867 exp_sym_flag='-bexport'
1868 no_entry_flag='-bnoentry'
1871 # When large executables or shared objects are built, AIX ld can
1872 # have problems creating the table of contents. If linking a library
1873 # or program results in "error TOC overflow" add -mminimal-toc to
1874 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1875 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1879 hardcode_libdir_separator=':'
1880 if test "$GCC" = yes; then
1881 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1882 collect2name=`${CC} -print-prog-name=collect2`
1883 if test -f "$collect2name" && \
1884 strings "$collect2name" | grep resolve_lib_name >/dev/null
1886 # We have reworked collect2
1889 # We have old collect2
1890 hardcode_direct=unsupported
1891 # It fails to find uninstalled libraries when the uninstalled
1892 # path is not listed in the libpath. Setting hardcode_minus_L
1893 # to unsupported forces relinking
1894 hardcode_minus_L=yes
1895 hardcode_libdir_flag_spec='-L$libdir'
1896 hardcode_libdir_separator=
1900 shared_flag='-shared'
1903 if test "$host_cpu" = ia64; then
1904 shared_flag='${wl}-G'
1906 if test "$aix_use_runtimelinking" = yes; then
1907 shared_flag='${wl}-G'
1909 shared_flag='${wl}-bM:SRE'
1914 # It seems that -bexpall can do strange things, so it is better to
1915 # generate a list of symbols to export.
1916 always_export_symbols=yes
1917 if test "$aix_use_runtimelinking" = yes; then
1918 # Warning - without using the other runtime loading flags (-brtl),
1919 # -berok will link without error, but may produce a broken library.
1920 allow_undefined_flag='-berok'
1921 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1922 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"
1924 if test "$host_cpu" = ia64; then
1925 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1926 allow_undefined_flag="-z nodefs"
1927 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"
1929 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1930 # Warning - without using the other run time loading flags,
1931 # -berok will link without error, but may produce a broken library.
1932 allow_undefined_flag='${wl}-berok'
1933 # This is a bit strange, but is similar to how AIX traditionally builds
1934 # it's shared libraries.
1935 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'
1941 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)'
1942 hardcode_libdir_flag_spec='-L$libdir'
1943 hardcode_minus_L=yes
1944 # see comment about different semantics on the GNU ld section
1948 cygwin* | mingw* | pw32*)
1949 # When not using gcc, we currently assume that we are using
1950 # Microsoft Visual C++.
1951 # hardcode_libdir_flag_spec is actually meaningless, as there is
1952 # no search path for DLLs.
1953 hardcode_libdir_flag_spec=' '
1954 allow_undefined_flag=unsupported
1955 # Tell ltmain to make .lib files, not .a files.
1957 # FIXME: Setting linknames here is a bad hack.
1958 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1959 # The linker will automatically build a .lib file if we build a DLL.
1960 old_archive_from_new_cmds='true'
1961 # FIXME: Should let the user specify the lib program.
1962 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1963 fix_srcfile_path='`cygpath -w "$srcfile"`'
1966 darwin* | rhapsody*)
1968 rhapsody* | darwin1.[[012]])
1969 allow_undefined_flag='-undefined suppress'
1972 allow_undefined_flag='-flat_namespace -undefined suppress'
1975 # FIXME: Relying on posixy $() will cause problems for
1976 # cross-compilation, but unfortunately the echo tests do not
1977 # yet detect zsh echo's removal of \ escapes.
1978 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
1979 # We need to add '_' to the symbols in $export_symbols first
1980 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1982 hardcode_shlibpath_var=no
1983 whole_archive_flag_spec='-all_load $convenience'
1990 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1991 # support. Future versions do this automatically, but an explicit c++rt0.o
1992 # does not break anything, and helps significantly (at the cost of a little
1995 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1996 hardcode_libdir_flag_spec='-R$libdir'
1998 hardcode_shlibpath_var=no
2001 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2003 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2005 hardcode_minus_L=yes
2006 hardcode_shlibpath_var=no
2009 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2011 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2012 hardcode_libdir_flag_spec='-R$libdir'
2014 hardcode_shlibpath_var=no
2017 hpux9* | hpux10* | hpux11*)
2019 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' ;;
2020 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2022 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2023 hardcode_libdir_separator=:
2025 hardcode_minus_L=yes # Not in the search PATH, but as the default
2026 # location of the library.
2027 export_dynamic_flag_spec='${wl}-E'
2031 if test "$GCC" = yes; then
2032 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'
2034 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'
2036 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2037 hardcode_libdir_separator=:
2038 link_all_deplibs=yes
2042 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2043 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2045 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2047 hardcode_libdir_flag_spec='-R$libdir'
2049 hardcode_shlibpath_var=no
2053 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2055 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2056 hardcode_libdir_separator=:
2057 hardcode_shlibpath_var=no
2062 hardcode_shlibpath_var=no
2063 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2064 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2065 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2066 export_dynamic_flag_spec='${wl}-E'
2069 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2070 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2071 hardcode_libdir_flag_spec='-R$libdir'
2074 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2075 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2082 hardcode_libdir_flag_spec='-L$libdir'
2083 hardcode_minus_L=yes
2084 allow_undefined_flag=unsupported
2085 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'
2086 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2090 if test "$GCC" = yes; then
2091 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2092 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'
2094 allow_undefined_flag=' -expect_unresolved \*'
2095 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'
2097 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2098 hardcode_libdir_separator=:
2101 osf4* | osf5*) # as osf3* with the addition of -msym flag
2102 if test "$GCC" = yes; then
2103 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2104 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'
2105 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2107 allow_undefined_flag=' -expect_unresolved \*'
2108 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'
2109 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2110 $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'
2112 #Both c and cxx compiler support -rpath directly
2113 hardcode_libdir_flag_spec='-rpath $libdir'
2115 hardcode_libdir_separator=:
2119 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2120 hardcode_shlibpath_var=no
2121 runpath_var=LD_RUN_PATH
2122 hardcode_runpath_var=yes
2123 export_dynamic_flag_spec='${wl}-Bexport'
2127 # gcc --version < 3.0 without binutils cannot create self contained
2128 # shared libraries reliably, requiring libgcc.a to resolve some of
2129 # the object symbols generated in some cases. Libraries that use
2130 # assert need libgcc.a to resolve __eprintf, for example. Linking
2131 # a copy of libgcc.a into every shared library to guarantee resolving
2132 # such symbols causes other problems: According to Tim Van Holder
2133 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2134 # (to the application) exception stack for one thing.
2135 no_undefined_flag=' -z defs'
2136 if test "$GCC" = yes; then
2137 case `$CC --version 2>/dev/null` in
2141 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2142 *** create self contained shared libraries on Solaris systems, without
2143 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2144 *** -no-undefined support, which will at least allow you to build shared
2145 *** libraries. However, you may find that when you link such libraries
2146 *** into an application without using GCC, you have to manually add
2147 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2148 *** upgrade to a newer version of GCC. Another option is to rebuild your
2149 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2156 # $CC -shared without GNU ld will not create a library from C++
2157 # object files and a static libstdc++, better avoid it by now
2158 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2159 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2160 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2161 hardcode_libdir_flag_spec='-R$libdir'
2162 hardcode_shlibpath_var=no
2164 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2165 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2166 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2168 link_all_deplibs=yes
2172 if test "x$host_vendor" = xsequent; then
2173 # Use $CC to link under sequent, because it throws in some extra .o
2174 # files that make .init and .fini sections work.
2175 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2177 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2179 hardcode_libdir_flag_spec='-L$libdir'
2181 hardcode_minus_L=yes
2182 hardcode_shlibpath_var=no
2186 if test "x$host_vendor" = xsno; then
2187 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2188 hardcode_direct=yes # is this really true???
2190 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2191 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2193 runpath_var='LD_RUN_PATH'
2194 hardcode_shlibpath_var=no
2198 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2199 hardcode_shlibpath_var=no
2200 export_dynamic_flag_spec='-Bexport'
2204 no_undefined_flag=' -z text'
2205 # $CC -shared without GNU ld will not create a library from C++
2206 # object files and a static libstdc++, better avoid it by now
2207 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2208 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2209 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2210 hardcode_libdir_flag_spec=
2211 hardcode_shlibpath_var=no
2212 runpath_var='LD_RUN_PATH'
2216 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2217 hardcode_libdir_flag_spec='-L$libdir'
2218 hardcode_shlibpath_var=no
2222 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2223 hardcode_libdir_flag_spec='-L$libdir'
2224 hardcode_shlibpath_var=no
2228 if test -d /usr/nec; then
2229 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2230 hardcode_shlibpath_var=no
2231 runpath_var=LD_RUN_PATH
2232 hardcode_runpath_var=yes
2238 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2241 hardcode_shlibpath_var=no
2242 hardcode_runpath_var=yes
2243 runpath_var=LD_RUN_PATH
2246 sysv5uw7* | unixware7*)
2247 no_undefined_flag='${wl}-z ${wl}text'
2248 if test "$GCC" = yes; then
2249 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2251 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2253 runpath_var='LD_RUN_PATH'
2254 hardcode_shlibpath_var=no
2262 AC_MSG_RESULT([$ld_shlibs])
2263 test "$ld_shlibs" = no && can_build_shared=no
2265 # Check hardcoding attributes.
2266 AC_MSG_CHECKING([how to hardcode library paths into programs])
2268 if test -n "$hardcode_libdir_flag_spec" || \
2269 test -n "$runpath_var"; then
2271 # We can hardcode non-existant directories.
2272 if test "$hardcode_direct" != no &&
2273 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2274 # have to relink, otherwise we might link with an installed library
2275 # when we should be linking with a yet-to-be-installed one
2276 ## test "$hardcode_shlibpath_var" != no &&
2277 test "$hardcode_minus_L" != no; then
2278 # Linking always hardcodes the temporary library directory.
2279 hardcode_action=relink
2281 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2282 hardcode_action=immediate
2285 # We cannot hardcode anything, or else we can only hardcode existing
2287 hardcode_action=unsupported
2289 AC_MSG_RESULT([$hardcode_action])
2293 AC_MSG_CHECKING([whether stripping libraries is possible])
2294 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2295 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2296 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2297 AC_MSG_RESULT([yes])
2302 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2303 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2305 # PORTME Fill in your ld.so characteristics
2306 AC_MSG_CHECKING([dynamic linker characteristics])
2308 libname_spec='lib$name'
2315 shlibpath_overrides_runpath=unknown
2317 dynamic_linker="$host_os ld.so"
2318 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2319 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2324 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2325 shlibpath_var=LIBPATH
2327 # AIX has no versioning support, so we append a major version to the name.
2328 soname_spec='${libname}${release}.so$major'
2333 if test "$host_cpu" = ia64; then
2334 # AIX 5 supports IA64
2335 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2336 shlibpath_var=LD_LIBRARY_PATH
2338 # With GCC up to 2.95.x, collect2 would create an import file
2339 # for dependence libraries. The import file would start with
2340 # the line `#! .'. This would cause the generated library to
2341 # depend on `.', always an invalid library. This was fixed in
2342 # development snapshots of GCC prior to 3.0.
2344 aix4 | aix4.[[01]] | aix4.[[01]].*)
2345 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2347 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2354 # AIX (on Power*) has no versioning support, so currently we can
2355 # not hardcode correct soname into executable. Probably we can
2356 # add versioning support to collect2, so additional links can
2357 # be useful in future.
2358 if test "$aix_use_runtimelinking" = yes; then
2359 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2360 # instead of lib<name>.a to let people know that these are not
2361 # typical AIX shared libraries.
2362 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2364 # We preserve .a as extension for shared libraries through AIX4.2
2365 # and later when we are not doing run time linking.
2366 library_names_spec='${libname}${release}.a $libname.a'
2367 soname_spec='${libname}${release}.so$major'
2369 shlibpath_var=LIBPATH
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"`
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'
2505 soname_spec='${libname}${release}.so$major'
2506 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2512 case $LD in # libtool.m4 will add one of these switches to LD
2513 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2514 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2515 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2516 *) libsuff= shlibsuff= libmagic=never-match;;
2520 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2521 shlibpath_overrides_runpath=no
2522 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2523 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2526 # No shared lib support for Linux oldld, aout, or coff.
2527 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2531 # This must be Linux ELF.
2536 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2537 soname_spec='${libname}${release}.so$major'
2538 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2539 shlibpath_var=LD_LIBRARY_PATH
2540 shlibpath_overrides_runpath=no
2541 # This implies no fast_install, which is unacceptable.
2542 # Some rework will be needed to allow for fast_install
2543 # before this can be enabled.
2544 hardcode_into_libs=yes
2546 # We used to test for /lib/ld.so.1 and disable shared libraries on
2547 # powerpc, because MkLinux only supported shared libraries with the
2548 # GNU dynamic linker. Since this was broken with cross compilers,
2549 # most powerpc-linux boxes support dynamic linking these days and
2550 # people can always --disable-shared, the test was removed, and we
2551 # assume the GNU/Linux dynamic linker is in use.
2552 dynamic_linker='GNU/Linux ld.so'
2559 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2560 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2561 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2562 dynamic_linker='NetBSD (a.out) ld.so'
2564 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2565 soname_spec='${libname}${release}.so$major'
2566 dynamic_linker='NetBSD ld.elf_so'
2568 shlibpath_var=LD_LIBRARY_PATH
2569 shlibpath_overrides_runpath=yes
2570 hardcode_into_libs=yes
2575 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2576 shlibpath_var=LD_LIBRARY_PATH
2577 shlibpath_overrides_runpath=yes
2584 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2586 openbsd2.[[89]] | openbsd2.[[89]].*)
2587 shlibpath_overrides_runpath=no
2590 shlibpath_overrides_runpath=yes
2594 shlibpath_overrides_runpath=yes
2596 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2597 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2598 shlibpath_var=LD_LIBRARY_PATH
2602 libname_spec='$name'
2604 library_names_spec='$libname.dll $libname.a'
2605 dynamic_linker='OS/2 ld.exe'
2606 shlibpath_var=LIBPATH
2609 osf3* | osf4* | osf5*)
2612 soname_spec='${libname}${release}.so'
2613 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2614 shlibpath_var=LD_LIBRARY_PATH
2615 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2616 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2621 soname_spec='${libname}${release}.so$major'
2622 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2623 shlibpath_var=LD_LIBRARY_PATH
2630 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2631 soname_spec='${libname}${release}.so$major'
2632 shlibpath_var=LD_LIBRARY_PATH
2633 shlibpath_overrides_runpath=yes
2634 hardcode_into_libs=yes
2635 # ldd complains unless libraries are executable
2636 postinstall_cmds='chmod +x $lib'
2641 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2642 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2643 shlibpath_var=LD_LIBRARY_PATH
2644 shlibpath_overrides_runpath=yes
2645 if test "$with_gnu_ld" = yes; then
2651 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2653 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2654 soname_spec='${libname}${release}.so$major'
2655 shlibpath_var=LD_LIBRARY_PATH
2656 case $host_vendor in
2658 shlibpath_overrides_runpath=no
2663 shlibpath_overrides_runpath=no
2664 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2671 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2672 soname_spec='${libname}${release}.so$major'
2673 shlibpath_var=LD_LIBRARY_PATH
2680 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2681 soname_spec='${libname}${release}.so$major'
2682 shlibpath_var=LD_LIBRARY_PATH
2686 if test -d /usr/nec ;then
2688 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2689 soname_spec='$libname.so.$major'
2690 shlibpath_var=LD_LIBRARY_PATH
2698 AC_MSG_RESULT([$dynamic_linker])
2699 test "$dynamic_linker" = no && can_build_shared=no
2701 # Report the final consequences.
2702 AC_MSG_CHECKING([if libtool supports shared libraries])
2703 AC_MSG_RESULT([$can_build_shared])
2705 AC_MSG_CHECKING([whether to build shared libraries])
2706 test "$can_build_shared" = "no" && enable_shared=no
2708 # On AIX, shared libraries and static libraries use the same namespace, and
2709 # are all built from PIC.
2712 test "$enable_shared" = yes && enable_static=no
2713 if test -n "$RANLIB"; then
2714 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2715 postinstall_cmds='$RANLIB $lib'
2720 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2721 test "$enable_shared" = yes && enable_static=no
2725 AC_MSG_RESULT([$enable_shared])
2727 AC_MSG_CHECKING([whether to build static libraries])
2728 # Make sure either enable_shared or enable_static is yes.
2729 test "$enable_shared" = yes || enable_static=yes
2730 AC_MSG_RESULT([$enable_static])
2732 if test "$hardcode_action" = relink; then
2733 # Fast installation is not supported
2734 enable_fast_install=no
2735 elif test "$shlibpath_overrides_runpath" = yes ||
2736 test "$enable_shared" = no; then
2737 # Fast installation is not necessary
2738 enable_fast_install=needless
2741 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2742 if test "$GCC" = yes; then
2743 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2746 AC_LIBTOOL_DLOPEN_SELF
2748 if test "$enable_shared" = yes && test "$GCC" = yes; then
2749 case $archive_cmds in
2751 # FIXME: we may have to deal with multi-command sequences.
2754 # Test whether the compiler implicitly links with -lc since on some
2755 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2756 # to ld, don't add -lc before -lgcc.
2757 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2758 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2760 echo 'static int dummy;' > conftest.$ac_ext
2762 if AC_TRY_EVAL(ac_compile); then
2765 libobjs=conftest.$ac_objext
2767 wl=$lt_cv_prog_cc_wl
2773 save_allow_undefined_flag=$allow_undefined_flag
2774 allow_undefined_flag=
2775 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2777 lt_cv_archive_cmds_need_lc=no
2779 lt_cv_archive_cmds_need_lc=yes
2781 allow_undefined_flag=$save_allow_undefined_flag
2783 cat conftest.err 1>&5
2787 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2791 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2793 # The second clause should only fire when bootstrapping the
2794 # libtool distribution, otherwise you forgot to ship ltmain.sh
2795 # with your package, and you will get complaints that there are
2796 # no rules to generate ltmain.sh.
2797 if test -f "$ltmain"; then
2800 # If there is no Makefile yet, we rely on a make rule to execute
2801 # `config.status --recheck' to rerun these tests and create the
2802 # libtool script then.
2803 test -f Makefile && make "$ltmain"
2806 if test -f "$ltmain"; then
2807 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2810 echo creating $ofile
2812 # Now quote all the things that may contain metacharacters while being
2813 # careful not to overquote the AC_SUBSTed values. We take copies of the
2814 # variables and quote the copies for generation of the libtool script.
2815 for var in echo old_CC old_CFLAGS \
2816 AR AR_FLAGS CC LD LN_S NM SHELL \
2817 reload_flag reload_cmds wl \
2818 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2819 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2820 library_names_spec soname_spec \
2821 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2822 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2823 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2824 old_striplib striplib file_magic_cmd export_symbols_cmds \
2825 deplibs_check_method allow_undefined_flag no_undefined_flag \
2826 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2827 global_symbol_to_c_name_address \
2828 hardcode_libdir_flag_spec hardcode_libdir_separator \
2829 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2830 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2833 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2834 old_postinstall_cmds | old_postuninstall_cmds | \
2835 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2836 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2837 postinstall_cmds | postuninstall_cmds | \
2838 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2839 # Double-quote double-evaled strings.
2840 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2843 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2848 cat <<__EOF__ > "${ofile}T"
2851 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2852 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2853 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2855 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2856 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2858 # This program is free software; you can redistribute it and/or modify
2859 # it under the terms of the GNU General Public License as published by
2860 # the Free Software Foundation; either version 2 of the License, or
2861 # (at your option) any later version.
2863 # This program is distributed in the hope that it will be useful, but
2864 # WITHOUT ANY WARRANTY; without even the implied warranty of
2865 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2866 # General Public License for more details.
2868 # You should have received a copy of the GNU General Public License
2869 # along with this program; if not, write to the Free Software
2870 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2872 # As a special exception to the GNU General Public License, if you
2873 # distribute this file as part of a program that contains a
2874 # configuration script generated by Autoconf, you may include it under
2875 # the same distribution terms that you use for the rest of that program.
2877 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2878 Xsed="sed -e s/^X//"
2880 # The HP-UX ksh and POSIX shell print the target directory to stdout
2882 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2884 # ### BEGIN LIBTOOL CONFIG
2886 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2888 # Shell to use when invoking shell scripts.
2891 # Whether or not to build shared libraries.
2892 build_libtool_libs=$enable_shared
2894 # Whether or not to build static libraries.
2895 build_old_libs=$enable_static
2897 # Whether or not to add -lc for building shared libraries.
2898 build_libtool_need_lc=$need_lc
2900 # Whether or not to optimize for fast installation.
2901 fast_install=$enable_fast_install
2904 host_alias=$host_alias
2907 # An echo program that does not interpret backslashes.
2912 AR_FLAGS=$lt_AR_FLAGS
2914 # The default C compiler.
2917 # Is the compiler the GNU C compiler?
2920 # The linker used to build libraries.
2923 # Whether we need hard or soft links.
2926 # A BSD-compatible nm program.
2929 # A symbol stripping program
2932 # Used to examine libraries when file_magic_cmd begins "file"
2933 MAGIC_CMD=$MAGIC_CMD
2935 # Used on cygwin: DLL creation program.
2938 # Used on cygwin: object dumper.
2941 # Used on cygwin: assembler.
2944 # The name of the directory that contains temporary libtool files.
2947 # How to create reloadable object files.
2948 reload_flag=$lt_reload_flag
2949 reload_cmds=$lt_reload_cmds
2951 # How to pass a linker flag through the compiler.
2954 # Object file suffix (normally "o").
2957 # Old archive suffix (normally "a").
2960 # Executable file suffix (normally "").
2963 # Additional compiler flags for building library objects.
2964 pic_flag=$lt_pic_flag
2967 # Does compiler simultaneously support -c and -o options?
2968 compiler_c_o=$lt_compiler_c_o
2970 # Can we write directly to a .lo ?
2971 compiler_o_lo=$lt_compiler_o_lo
2973 # Must we lock files when doing compilation ?
2974 need_locks=$lt_need_locks
2976 # Do we need the lib prefix for modules?
2977 need_lib_prefix=$need_lib_prefix
2979 # Do we need a version for libraries?
2980 need_version=$need_version
2982 # Whether dlopen is supported.
2983 dlopen_support=$enable_dlopen
2985 # Whether dlopen of programs is supported.
2986 dlopen_self=$enable_dlopen_self
2988 # Whether dlopen of statically linked programs is supported.
2989 dlopen_self_static=$enable_dlopen_self_static
2991 # Compiler flag to prevent dynamic linking.
2992 link_static_flag=$lt_link_static_flag
2994 # Compiler flag to turn off builtin functions.
2995 no_builtin_flag=$lt_no_builtin_flag
2997 # Compiler flag to allow reflexive dlopens.
2998 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3000 # Compiler flag to generate shared objects directly from archives.
3001 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3003 # Compiler flag to generate thread-safe objects.
3004 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3006 # Library versioning type.
3007 version_type=$version_type
3009 # Format of library name prefix.
3010 libname_spec=$lt_libname_spec
3012 # List of archive names. First name is the real one, the rest are links.
3013 # The last name is the one that the linker finds with -lNAME.
3014 library_names_spec=$lt_library_names_spec
3016 # The coded name of the library, if different from the real name.
3017 soname_spec=$lt_soname_spec
3019 # Commands used to build and install an old-style archive.
3021 old_archive_cmds=$lt_old_archive_cmds
3022 old_postinstall_cmds=$lt_old_postinstall_cmds
3023 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3025 # Create an old-style archive from a shared archive.
3026 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3028 # Create a temporary old-style archive to link instead of a shared archive.
3029 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3031 # Commands used to build and install a shared archive.
3032 archive_cmds=$lt_archive_cmds
3033 archive_expsym_cmds=$lt_archive_expsym_cmds
3034 postinstall_cmds=$lt_postinstall_cmds
3035 postuninstall_cmds=$lt_postuninstall_cmds
3037 # Commands to strip libraries.
3038 old_striplib=$lt_old_striplib
3039 striplib=$lt_striplib
3041 # Method to check whether dependent libraries are shared objects.
3042 deplibs_check_method=$lt_deplibs_check_method
3044 # Command to use when deplibs_check_method == file_magic.
3045 file_magic_cmd=$lt_file_magic_cmd
3047 # Flag that allows shared libraries with undefined symbols to be built.
3048 allow_undefined_flag=$lt_allow_undefined_flag
3050 # Flag that forces no undefined symbols.
3051 no_undefined_flag=$lt_no_undefined_flag
3053 # Commands used to finish a libtool library installation in a directory.
3054 finish_cmds=$lt_finish_cmds
3056 # Same as above, but a single script fragment to be evaled but not shown.
3057 finish_eval=$lt_finish_eval
3059 # Take the output of nm and produce a listing of raw symbols and C names.
3060 global_symbol_pipe=$lt_global_symbol_pipe
3062 # Transform the output of nm in a proper C declaration
3063 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3065 # Transform the output of nm in a C name address pair
3066 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3068 # This is the shared library runtime path variable.
3069 runpath_var=$runpath_var
3071 # This is the shared library path variable.
3072 shlibpath_var=$shlibpath_var
3074 # Is shlibpath searched before the hard-coded library search path?
3075 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3077 # How to hardcode a shared library path into an executable.
3078 hardcode_action=$hardcode_action
3080 # Whether we should hardcode library paths into libraries.
3081 hardcode_into_libs=$hardcode_into_libs
3083 # Flag to hardcode \$libdir into a binary during linking.
3084 # This must work even if \$libdir does not exist.
3085 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3087 # Whether we need a single -rpath flag with a separated argument.
3088 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3090 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3092 hardcode_direct=$hardcode_direct
3094 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3096 hardcode_minus_L=$hardcode_minus_L
3098 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3099 # the resulting binary.
3100 hardcode_shlibpath_var=$hardcode_shlibpath_var
3102 # Variables whose values should be saved in libtool wrapper scripts and
3103 # restored at relink time.
3104 variables_saved_for_relink="$variables_saved_for_relink"
3106 # Whether libtool must link a program against all its dependency libraries.
3107 link_all_deplibs=$link_all_deplibs
3109 # Compile-time system search path for libraries
3110 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3112 # Run-time system search path for libraries
3113 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3115 # Fix the shell variable \$srcfile for the compiler.
3116 fix_srcfile_path="$fix_srcfile_path"
3118 # Set to yes if exported symbols are required.
3119 always_export_symbols=$always_export_symbols
3121 # The commands to list exported symbols.
3122 export_symbols_cmds=$lt_export_symbols_cmds
3124 # The commands to extract the exported symbol list from a shared archive.
3125 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3127 # Symbols that should not be listed in the preloaded symbols.
3128 exclude_expsyms=$lt_exclude_expsyms
3130 # Symbols that must always be exported.
3131 include_expsyms=$lt_include_expsyms
3133 # ### END LIBTOOL CONFIG
3139 cat <<\EOF >> "${ofile}T"
3141 # AIX sometimes has problems with the GCC collect2 program. For some
3142 # reason, if we set the COLLECT_NAMES environment variable, the problems
3143 # vanish in a puff of smoke.
3144 if test "X${COLLECT_NAMES+set}" != Xset; then
3146 export COLLECT_NAMES
3153 cygwin* | mingw* | pw32* | os2*)
3154 cat <<'EOF' >> "${ofile}T"
3155 # This is a source program that is used to create dlls on Windows
3156 # Don't remove nor modify the starting and closing comments
3157 # /* ltdll.c starts here */
3158 # #define WIN32_LEAN_AND_MEAN
3159 # #include <windows.h>
3160 # #undef WIN32_LEAN_AND_MEAN
3161 # #include <stdio.h>
3163 # #ifndef __CYGWIN__
3164 # # ifdef __CYGWIN32__
3165 # # define __CYGWIN__ __CYGWIN32__
3169 # #ifdef __cplusplus
3172 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3173 # #ifdef __cplusplus
3178 # #include <cygwin/cygwin_dll.h>
3179 # DECLARE_CYGWIN_DLL( DllMain );
3181 # HINSTANCE __hDllInstance_base;
3184 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3186 # __hDllInstance_base = hInst;
3189 # /* ltdll.c ends here */
3190 # This is a source program that is used to create import libraries
3191 # on Windows for dlls which lack them. Don't remove nor modify the
3192 # starting and closing comments
3193 # /* impgen.c starts here */
3194 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3196 # This file is part of GNU libtool.
3198 # This program is free software; you can redistribute it and/or modify
3199 # it under the terms of the GNU General Public License as published by
3200 # the Free Software Foundation; either version 2 of the License, or
3201 # (at your option) any later version.
3203 # This program is distributed in the hope that it will be useful,
3204 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3205 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3206 # GNU General Public License for more details.
3208 # You should have received a copy of the GNU General Public License
3209 # along with this program; if not, write to the Free Software
3210 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3213 # #include <stdio.h> /* for printf() */
3214 # #include <unistd.h> /* for open(), lseek(), read() */
3215 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3216 # #include <string.h> /* for strdup() */
3218 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3220 # #define O_BINARY 0
3223 # static unsigned int
3224 # pe_get16 (fd, offset)
3228 # unsigned char b[2];
3229 # lseek (fd, offset, SEEK_SET);
3231 # return b[0] + (b[1]<<8);
3234 # static unsigned int
3235 # pe_get32 (fd, offset)
3239 # unsigned char b[4];
3240 # lseek (fd, offset, SEEK_SET);
3242 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3245 # static unsigned int
3249 # unsigned char *b = ptr;
3250 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3259 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3260 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3261 # unsigned long name_rvas, nexp;
3262 # unsigned char *expdata, *erva;
3263 # char *filename, *dll_name;
3265 # filename = argv[1];
3267 # dll = open(filename, O_RDONLY|O_BINARY);
3271 # dll_name = filename;
3273 # for (i=0; filename[i]; i++)
3274 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3275 # dll_name = filename + i +1;
3277 # pe_header_offset = pe_get32 (dll, 0x3c);
3278 # opthdr_ofs = pe_header_offset + 4 + 20;
3279 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3281 # if (num_entries < 1) /* no exports */
3284 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3285 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3286 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3287 # secptr = (pe_header_offset + 4 + 20 +
3288 # pe_get16 (dll, pe_header_offset + 4 + 16));
3291 # for (i = 0; i < nsections; i++)
3294 # unsigned long secptr1 = secptr + 40 * i;
3295 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3296 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3297 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3298 # lseek(dll, secptr1, SEEK_SET);
3299 # read(dll, sname, 8);
3300 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3302 # expptr = fptr + (export_rva - vaddr);
3303 # if (export_rva + export_size > vaddr + vsize)
3304 # export_size = vsize - (export_rva - vaddr);
3309 # expdata = (unsigned char*)malloc(export_size);
3310 # lseek (dll, expptr, SEEK_SET);
3311 # read (dll, expdata, export_size);
3312 # erva = expdata - export_rva;
3314 # nexp = pe_as32 (expdata+24);
3315 # name_rvas = pe_as32 (expdata+32);
3317 # printf ("EXPORTS\n");
3318 # for (i = 0; i<nexp; i++)
3320 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3321 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3326 # /* impgen.c ends here */
3332 # We use sed instead of cat because bash on DJGPP gets confused if
3333 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3334 # text mode, it properly converts lines to CR/LF. This bash problem
3335 # is reportedly fixed, but why not run on old versions too?
3336 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3338 mv -f "${ofile}T" "$ofile" || \
3339 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3343 ])# _LT_AC_LTCONFIG_HACK
3345 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3346 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3348 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3349 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3351 # AC_ENABLE_SHARED - implement the --enable-shared flag
3352 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3353 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3355 AC_DEFUN([AC_ENABLE_SHARED],
3356 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3357 AC_ARG_ENABLE(shared,
3358 changequote(<<, >>)dnl
3359 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3360 changequote([, ])dnl
3361 [p=${PACKAGE-default}
3363 yes) enable_shared=yes ;;
3364 no) enable_shared=no ;;
3367 # Look at the argument we got. We use all the common list separators.
3368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3369 for pkg in $enableval; do
3370 if test "X$pkg" = "X$p"; then
3377 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3380 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3381 AC_DEFUN([AC_DISABLE_SHARED],
3382 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3383 AC_ENABLE_SHARED(no)])
3385 # AC_ENABLE_STATIC - implement the --enable-static flag
3386 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3387 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3389 AC_DEFUN([AC_ENABLE_STATIC],
3390 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3391 AC_ARG_ENABLE(static,
3392 changequote(<<, >>)dnl
3393 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3394 changequote([, ])dnl
3395 [p=${PACKAGE-default}
3397 yes) enable_static=yes ;;
3398 no) enable_static=no ;;
3401 # Look at the argument we got. We use all the common list separators.
3402 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3403 for pkg in $enableval; do
3404 if test "X$pkg" = "X$p"; then
3411 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3414 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3415 AC_DEFUN([AC_DISABLE_STATIC],
3416 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3417 AC_ENABLE_STATIC(no)])
3420 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3421 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3422 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3424 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3425 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3426 AC_ARG_ENABLE(fast-install,
3427 changequote(<<, >>)dnl
3428 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3429 changequote([, ])dnl
3430 [p=${PACKAGE-default}
3432 yes) enable_fast_install=yes ;;
3433 no) enable_fast_install=no ;;
3435 enable_fast_install=no
3436 # Look at the argument we got. We use all the common list separators.
3437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3438 for pkg in $enableval; do
3439 if test "X$pkg" = "X$p"; then
3440 enable_fast_install=yes
3446 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3449 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3450 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3451 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3452 AC_ENABLE_FAST_INSTALL(no)])
3454 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3455 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3456 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3458 AC_DEFUN([AC_LIBTOOL_PICMODE],
3459 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3460 pic_mode=ifelse($#,1,$1,default)])
3463 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3464 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3465 [AC_MSG_CHECKING([for $1])
3466 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3469 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3472 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3475 ac_save_MAGIC_CMD="$MAGIC_CMD"
3476 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3477 dnl $ac_dummy forces splitting on constant user-supplied paths.
3478 dnl POSIX.2 word splitting is done only on the output of word expansions,
3479 dnl not every word. This closes a longstanding sh security hole.
3480 ac_dummy="ifelse([$2], , $PATH, [$2])"
3481 for ac_dir in $ac_dummy; do
3482 test -z "$ac_dir" && ac_dir=.
3483 if test -f $ac_dir/$1; then
3484 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3485 if test -n "$file_magic_test_file"; then
3486 case $deplibs_check_method in
3488 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3489 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3490 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3491 egrep "$file_magic_regex" > /dev/null; then
3496 *** Warning: the command libtool uses to detect shared libraries,
3497 *** $file_magic_cmd, produces output that libtool cannot recognize.
3498 *** The result is that libtool may fail to recognize shared libraries
3499 *** as such. This will affect the creation of libtool libraries that
3500 *** depend on shared libraries, but programs linked with such libtool
3501 *** libraries will work regardless of this problem. Nevertheless, you
3502 *** may want to report the problem to your system manager and/or to
3503 *** bug-libtool@gnu.org
3513 MAGIC_CMD="$ac_save_MAGIC_CMD"
3516 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3517 if test -n "$MAGIC_CMD"; then
3518 AC_MSG_RESULT($MAGIC_CMD)
3525 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3526 AC_DEFUN([AC_PATH_MAGIC],
3527 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3528 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3529 if test -z "$lt_cv_path_MAGIC_CMD"; then
3530 if test -n "$ac_tool_prefix"; then
3531 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3539 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3540 AC_DEFUN([AC_PROG_LD],
3541 [AC_ARG_WITH(gnu-ld,
3542 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3543 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3544 AC_REQUIRE([AC_PROG_CC])dnl
3545 AC_REQUIRE([CL_CANONICAL_HOST])dnl
3546 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3547 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3549 if test "$GCC" = yes; then
3550 # Check if gcc -print-prog-name=ld gives a path.
3551 AC_MSG_CHECKING([for ld used by GCC])
3554 # gcc leaves a trailing carriage return which upsets mingw
3555 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3557 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3560 # Accept absolute paths.
3561 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3562 re_direlt='/[[^/]][[^/]]*/\.\./'
3563 # Canonicalize the path of ld
3564 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3565 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3566 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3568 test -z "$LD" && LD="$ac_prog"
3571 # If it fails, then pretend we aren't using GCC.
3575 # If it is relative, then search for the first ld in PATH.
3579 elif test "$with_gnu_ld" = yes; then
3580 AC_MSG_CHECKING([for GNU ld])
3582 AC_MSG_CHECKING([for non-GNU ld])
3584 AC_CACHE_VAL(lt_cv_path_LD,
3585 [if test -z "$LD"; then
3586 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3587 for ac_dir in $PATH; do
3588 test -z "$ac_dir" && ac_dir=.
3589 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3590 lt_cv_path_LD="$ac_dir/$ac_prog"
3591 # Check to see if the program is GNU ld. I'd rather use --version,
3592 # but apparently some GNU ld's only accept -v.
3593 # Break only if it was the GNU/non-GNU ld that we prefer.
3594 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3595 test "$with_gnu_ld" != no && break
3597 test "$with_gnu_ld" != yes && break
3603 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3606 if test -n "$LD"; then
3611 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3616 AC_DEFUN([AC_PROG_LD_GNU],
3617 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3618 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3619 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3620 lt_cv_prog_gnu_ld=yes
3622 lt_cv_prog_gnu_ld=no
3624 with_gnu_ld=$lt_cv_prog_gnu_ld
3627 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3628 # -- PORTME Some linkers may need a different reload flag.
3629 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3630 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3631 [lt_cv_ld_reload_flag='-r'])
3632 reload_flag=$lt_cv_ld_reload_flag
3633 test -n "$reload_flag" && reload_flag=" $reload_flag"
3636 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3637 # -- PORTME fill in with the dynamic library characteristics
3638 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3639 [AC_CACHE_CHECK([how to recognise dependant libraries],
3640 lt_cv_deplibs_check_method,
3641 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3642 lt_cv_file_magic_test_file=
3643 lt_cv_deplibs_check_method='unknown'
3644 # Need to set the preceding variable on all platforms that support
3645 # interlibrary dependencies.
3646 # 'none' -- dependencies not supported.
3647 # `unknown' -- same as none, but documents that we really don't know.
3648 # 'pass_all' -- all dependencies passed with no checks.
3649 # 'test_compile' -- check by making test program.
3650 # 'file_magic [[regex]]' -- check by looking for files in library path
3651 # which responds to the $file_magic_cmd with a given egrep regex.
3652 # If you have `file' or equivalent on your system and you're not sure
3653 # whether `pass_all' will *always* work, you probably want this one.
3657 lt_cv_deplibs_check_method=pass_all
3661 lt_cv_deplibs_check_method=pass_all
3665 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3666 lt_cv_file_magic_cmd='/usr/bin/file -L'
3667 lt_cv_file_magic_test_file=/shlib/libc.so
3670 cygwin* | mingw* | pw32*)
3671 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3672 lt_cv_file_magic_cmd='$OBJDUMP -f'
3675 darwin* | rhapsody*)
3676 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3677 lt_cv_file_magic_cmd='/usr/bin/file -L'
3679 rhapsody* | darwin1.[[012]])
3680 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3683 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3689 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3692 # Not sure whether the presence of OpenBSD here was a mistake.
3693 # Let's accept both of them until this is cleared up.
3694 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3695 lt_cv_file_magic_cmd=/usr/bin/file
3696 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3700 lt_cv_deplibs_check_method=pass_all
3705 lt_cv_deplibs_check_method=pass_all
3709 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3710 lt_cv_file_magic_cmd=/usr/bin/file
3711 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3717 # this will be overridden with pass_all, but let us keep it just in case
3718 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3722 *-32|*"-32 ") libmagic=32-bit;;
3723 *-n32|*"-n32 ") libmagic=N32;;
3724 *-64|*"-64 ") libmagic=64-bit;;
3725 *) libmagic=never-match;;
3727 # this will be overridden with pass_all, but let us keep it just in case
3728 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3731 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3732 lt_cv_deplibs_check_method=pass_all
3735 # This must be Linux ELF.
3738 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3739 lt_cv_deplibs_check_method=pass_all ;;
3741 # glibc up to 2.1.1 does not perform some relocations on ARM
3742 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3744 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3748 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3749 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3751 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3756 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3757 lt_cv_file_magic_cmd=/usr/bin/file
3758 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3762 lt_cv_file_magic_cmd=/usr/bin/file
3763 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3764 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3765 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3767 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3771 osf3* | osf4* | osf5*)
3772 # this will be overridden with pass_all, but let us keep it just in case
3773 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3774 lt_cv_file_magic_test_file=/shlib/libc.so
3775 lt_cv_deplibs_check_method=pass_all
3779 lt_cv_deplibs_check_method=pass_all
3783 lt_cv_deplibs_check_method=pass_all
3784 lt_cv_file_magic_test_file=/lib/libc.so
3787 sysv5uw[[78]]* | sysv4*uw2*)
3788 lt_cv_deplibs_check_method=pass_all
3791 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3792 case $host_vendor in
3794 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]]'
3795 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3798 lt_cv_deplibs_check_method=pass_all
3801 lt_cv_file_magic_cmd='/bin/file'
3802 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3805 lt_cv_file_magic_cmd='/bin/file'
3806 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3807 lt_cv_file_magic_test_file=/lib/libc.so
3813 file_magic_cmd=$lt_cv_file_magic_cmd
3814 deplibs_check_method=$lt_cv_deplibs_check_method
3818 # AC_PROG_NM - find the path to a BSD-compatible name lister
3819 AC_DEFUN([AC_PROG_NM],
3820 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3821 AC_MSG_CHECKING([for BSD-compatible nm])
3822 AC_CACHE_VAL(lt_cv_path_NM,
3823 [if test -n "$NM"; then
3824 # Let the user override the test.
3827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3828 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3829 test -z "$ac_dir" && ac_dir=.
3830 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3831 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3832 # Check to see if the nm accepts a BSD-compat flag.
3833 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3834 # nm: unknown option "B" ignored
3835 # Tru64's nm complains that /dev/null is an invalid object file
3836 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3837 lt_cv_path_NM="$tmp_nm -B"
3839 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3840 lt_cv_path_NM="$tmp_nm -p"
3843 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3844 continue # so that we can try to find one that supports BSD flags
3849 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3852 AC_MSG_RESULT([$NM])
3855 # AC_CHECK_LIBM - check for math library
3856 AC_DEFUN([AC_CHECK_LIBM],
3857 [AC_REQUIRE([CL_CANONICAL_HOST])dnl
3860 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3861 # These system don't have libm
3864 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3865 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3868 AC_CHECK_LIB(m, main, LIBM="-lm")
3873 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3874 # the libltdl convenience library and INCLTDL to the include flags for
3875 # the libltdl header and adds --enable-ltdl-convenience to the
3876 # configure arguments. Note that LIBLTDL and INCLTDL are not
3877 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3878 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3879 # with '${top_builddir}/' and INCLTDL will be prefixed with
3880 # '${top_srcdir}/' (note the single quotes!). If your package is not
3881 # flat and you're not using automake, define top_builddir and
3882 # top_srcdir appropriately in the Makefiles.
3883 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3884 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3885 case $enable_ltdl_convenience in
3886 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3887 "") enable_ltdl_convenience=yes
3888 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3890 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3891 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3894 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3895 # the libltdl installable library and INCLTDL to the include flags for
3896 # the libltdl header and adds --enable-ltdl-install to the configure
3897 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
3898 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3899 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3900 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
3901 # with '${top_srcdir}/' (note the single quotes!). If your package is
3902 # not flat and you're not using automake, define top_builddir and
3903 # top_srcdir appropriately in the Makefiles.
3904 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3905 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3906 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3907 AC_CHECK_LIB(ltdl, main,
3908 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3909 [if test x"$enable_ltdl_install" = xno; then
3910 AC_MSG_WARN([libltdl not installed, but installation disabled])
3912 enable_ltdl_install=yes
3915 if test x"$enable_ltdl_install" = x"yes"; then
3916 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3917 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3918 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3920 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3927 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3928 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3929 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3930 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3931 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3932 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3933 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3935 # This is just to silence aclocal about the macro not being used
3936 ifelse([AC_DISABLE_FAST_INSTALL])
3938 # iconv.m4 serial AM3 (gettext-0.11)
3939 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3940 dnl This file is free software, distributed under the terms of the GNU
3941 dnl General Public License. As a special exception to the GNU General
3942 dnl Public License, this file may be distributed as part of a program
3943 dnl that contains a configuration script generated by Autoconf, under
3944 dnl the same distribution terms as the rest of that program.
3946 dnl From Bruno Haible.
3948 AC_DEFUN([AM_ICONV_LINK],
3950 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
3951 dnl those with the standalone portable GNU libiconv installed).
3953 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
3954 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
3955 AC_REQUIRE([AC_LIB_RPATH])
3957 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
3959 AC_LIB_LINKFLAGS_BODY([iconv])
3961 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
3962 dnl because if the user has installed libiconv and not disabled its use
3963 dnl via --without-libiconv-prefix, he wants to use it. The first
3964 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
3965 am_save_CPPFLAGS="$CPPFLAGS"
3966 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
3968 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
3969 am_cv_func_iconv="no, consider installing GNU libiconv"
3971 AC_TRY_LINK([#include <stdlib.h>
3972 #include <iconv.h>],
3973 [iconv_t cd = iconv_open("","");
3974 iconv(cd,NULL,NULL,NULL,NULL);
3976 am_cv_func_iconv=yes)
3977 if test "$am_cv_func_iconv" != yes; then
3978 am_save_LIBS="$LIBS"
3979 LIBS="$LIBS $LIBICONV"
3980 AC_TRY_LINK([#include <stdlib.h>
3981 #include <iconv.h>],
3982 [iconv_t cd = iconv_open("","");
3983 iconv(cd,NULL,NULL,NULL,NULL);
3986 am_cv_func_iconv=yes)
3987 LIBS="$am_save_LIBS"
3990 if test "$am_cv_func_iconv" = yes; then
3991 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
3993 if test "$am_cv_lib_iconv" = yes; then
3994 AC_MSG_CHECKING([how to link with libiconv])
3995 AC_MSG_RESULT([$LIBICONV])
3997 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
3999 CPPFLAGS="$am_save_CPPFLAGS"
4004 AC_SUBST(LTLIBICONV)
4007 AC_DEFUN([AM_ICONV],
4009 AC_REQUIRE([AM_ICONV_LINK])
4010 if test "$am_cv_func_iconv" = yes; then
4011 AC_MSG_CHECKING([for iconv declaration])
4012 AC_CACHE_VAL(am_cv_proto_iconv, [
4020 #if defined(__STDC__) || defined(__cplusplus)
4021 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4025 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
4026 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
4027 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4028 AC_MSG_RESULT([$]{ac_t:-
4029 }[$]am_cv_proto_iconv)
4030 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
4031 [Define as const if the declaration of iconv() needs const.])
4035 # lib-prefix.m4 serial 1 (gettext-0.11)
4036 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4037 dnl This file is free software, distributed under the terms of the GNU
4038 dnl General Public License. As a special exception to the GNU General
4039 dnl Public License, this file may be distributed as part of a program
4040 dnl that contains a configuration script generated by Autoconf, under
4041 dnl the same distribution terms as the rest of that program.
4043 dnl From Bruno Haible.
4045 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
4046 dnl to access previously installed libraries. The basic assumption is that
4047 dnl a user will want packages to use other packages he previously installed
4048 dnl with the same --prefix option.
4049 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
4050 dnl libraries, but is otherwise very convenient.
4051 AC_DEFUN([AC_LIB_PREFIX],
4053 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
4054 AC_REQUIRE([AC_PROG_CC])
4055 AC_REQUIRE([AC_CANONICAL_HOST])
4056 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4057 dnl By default, look in $includedir and $libdir.
4059 AC_LIB_WITH_FINAL_PREFIX([
4060 eval additional_includedir=\"$includedir\"
4061 eval additional_libdir=\"$libdir\"
4063 AC_ARG_WITH([lib-prefix],
4064 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
4065 --without-lib-prefix don't search for libraries in includedir and libdir],
4067 if test "X$withval" = "Xno"; then
4070 if test "X$withval" = "X"; then
4071 AC_LIB_WITH_FINAL_PREFIX([
4072 eval additional_includedir=\"$includedir\"
4073 eval additional_libdir=\"$libdir\"
4076 additional_includedir="$withval/include"
4077 additional_libdir="$withval/lib"
4081 if test $use_additional = yes; then
4082 dnl Potentially add $additional_includedir to $CPPFLAGS.
4083 dnl But don't add it
4084 dnl 1. if it's the standard /usr/include,
4085 dnl 2. if it's already present in $CPPFLAGS,
4086 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
4087 dnl 4. if it doesn't exist as a directory.
4088 if test "X$additional_includedir" != "X/usr/include"; then
4090 for x in $CPPFLAGS; do
4091 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4092 if test "X$x" = "X-I$additional_includedir"; then
4097 if test -z "$haveit"; then
4098 if test "X$additional_includedir" = "X/usr/local/include"; then
4099 if test -n "$GCC"; then
4101 linux*) haveit=yes;;
4105 if test -z "$haveit"; then
4106 if test -d "$additional_includedir"; then
4107 dnl Really add $additional_includedir to $CPPFLAGS.
4108 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
4113 dnl Potentially add $additional_libdir to $LDFLAGS.
4114 dnl But don't add it
4115 dnl 1. if it's the standard /usr/lib,
4116 dnl 2. if it's already present in $LDFLAGS,
4117 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
4118 dnl 4. if it doesn't exist as a directory.
4119 if test "X$additional_libdir" != "X/usr/lib"; then
4121 for x in $LDFLAGS; do
4122 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4123 if test "X$x" = "X-L$additional_libdir"; then
4128 if test -z "$haveit"; then
4129 if test "X$additional_libdir" = "X/usr/local/lib"; then
4130 if test -n "$GCC"; then
4132 linux*) haveit=yes;;
4136 if test -z "$haveit"; then
4137 if test -d "$additional_libdir"; then
4138 dnl Really add $additional_libdir to $LDFLAGS.
4139 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
4147 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
4148 dnl acl_final_exec_prefix, containing the values to which $prefix and
4149 dnl $exec_prefix will expand at the end of the configure script.
4150 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
4152 dnl Unfortunately, prefix and exec_prefix get only finally determined
4153 dnl at the end of configure.
4154 if test "X$prefix" = "XNONE"; then
4155 acl_final_prefix="$ac_default_prefix"
4157 acl_final_prefix="$prefix"
4159 if test "X$exec_prefix" = "XNONE"; then
4160 acl_final_exec_prefix='${prefix}'
4162 acl_final_exec_prefix="$exec_prefix"
4164 acl_save_prefix="$prefix"
4165 prefix="$acl_final_prefix"
4166 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
4167 prefix="$acl_save_prefix"
4170 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
4171 dnl variables prefix and exec_prefix bound to the values they will have
4172 dnl at the end of the configure script.
4173 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
4175 acl_save_prefix="$prefix"
4176 prefix="$acl_final_prefix"
4177 acl_save_exec_prefix="$exec_prefix"
4178 exec_prefix="$acl_final_exec_prefix"
4180 exec_prefix="$acl_save_exec_prefix"
4181 prefix="$acl_save_prefix"
4184 # lib-link.m4 serial 2 (gettext-0.11.2)
4185 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
4186 dnl This file is free software, distributed under the terms of the GNU
4187 dnl General Public License. As a special exception to the GNU General
4188 dnl Public License, this file may be distributed as part of a program
4189 dnl that contains a configuration script generated by Autoconf, under
4190 dnl the same distribution terms as the rest of that program.
4192 dnl From Bruno Haible.
4194 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
4195 dnl the libraries corresponding to explicit and implicit dependencies.
4196 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
4197 dnl augments the CPPFLAGS variable.
4198 AC_DEFUN([AC_LIB_LINKFLAGS],
4200 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4201 AC_REQUIRE([AC_LIB_RPATH])
4202 define([Name],[translit([$1],[./-], [___])])
4203 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4204 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4205 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
4206 AC_LIB_LINKFLAGS_BODY([$1], [$2])
4207 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
4208 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
4209 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
4211 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
4212 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
4213 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
4214 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4216 AC_SUBST([LTLIB]NAME)
4217 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
4218 dnl results of this search when this library appears as a dependency.
4224 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
4225 dnl searches for libname and the libraries corresponding to explicit and
4226 dnl implicit dependencies, together with the specified include files and
4227 dnl the ability to compile and link the specified testcode. If found, it
4228 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
4229 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
4230 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
4231 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
4232 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
4234 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4235 AC_REQUIRE([AC_LIB_RPATH])
4236 define([Name],[translit([$1],[./-], [___])])
4237 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4238 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4240 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
4242 AC_LIB_LINKFLAGS_BODY([$1], [$2])
4244 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
4245 dnl because if the user has installed lib[]Name and not disabled its use
4246 dnl via --without-lib[]Name-prefix, he wants to use it.
4247 ac_save_CPPFLAGS="$CPPFLAGS"
4248 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
4250 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
4251 ac_save_LIBS="$LIBS"
4252 LIBS="$LIBS $LIB[]NAME"
4253 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
4254 LIBS="$ac_save_LIBS"
4256 if test "$ac_cv_lib[]Name" = yes; then
4258 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
4259 AC_MSG_CHECKING([how to link with lib[]$1])
4260 AC_MSG_RESULT([$LIB[]NAME])
4263 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
4264 dnl $INC[]NAME either.
4265 CPPFLAGS="$ac_save_CPPFLAGS"
4269 AC_SUBST([HAVE_LIB]NAME)
4271 AC_SUBST([LTLIB]NAME)
4276 dnl Determine the platform dependent parameters needed to use rpath:
4277 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
4278 dnl hardcode_direct, hardcode_minus_L,
4279 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
4280 AC_DEFUN([AC_LIB_RPATH],
4282 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
4283 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
4284 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
4285 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
4286 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
4287 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
4288 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
4294 libext="$acl_cv_libext"
4295 shlibext="$acl_cv_shlibext"
4296 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
4297 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
4298 hardcode_direct="$acl_cv_hardcode_direct"
4299 hardcode_minus_L="$acl_cv_hardcode_minus_L"
4300 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
4301 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
4304 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
4305 dnl the libraries corresponding to explicit and implicit dependencies.
4306 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
4307 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
4309 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
4310 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
4311 dnl By default, look in $includedir and $libdir.
4313 AC_LIB_WITH_FINAL_PREFIX([
4314 eval additional_includedir=\"$includedir\"
4315 eval additional_libdir=\"$libdir\"
4317 AC_ARG_WITH([lib$1-prefix],
4318 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
4319 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
4321 if test "X$withval" = "Xno"; then
4324 if test "X$withval" = "X"; then
4325 AC_LIB_WITH_FINAL_PREFIX([
4326 eval additional_includedir=\"$includedir\"
4327 eval additional_libdir=\"$libdir\"
4330 additional_includedir="$withval/include"
4331 additional_libdir="$withval/lib"
4335 dnl Search the library and its dependencies in $additional_libdir and
4336 dnl $LDFLAGS. Using breadth-first-seach.
4342 names_already_handled=
4343 names_next_round='$1 $2'
4344 while test -n "$names_next_round"; do
4345 names_this_round="$names_next_round"
4347 for name in $names_this_round; do
4349 for n in $names_already_handled; do
4350 if test "$n" = "$name"; then
4355 if test -z "$already_handled"; then
4356 names_already_handled="$names_already_handled $name"
4357 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
4358 dnl or AC_LIB_HAVE_LINKFLAGS call.
4359 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
4360 eval value=\"\$HAVE_LIB$uppername\"
4361 if test -n "$value"; then
4362 if test "$value" = yes; then
4363 eval value=\"\$LIB$uppername\"
4364 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
4365 eval value=\"\$LTLIB$uppername\"
4366 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
4368 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
4369 dnl that this library doesn't exist. So just drop it.
4373 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
4374 dnl and the already constructed $LIBNAME/$LTLIBNAME.
4379 if test $use_additional = yes; then
4380 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
4381 found_dir="$additional_libdir"
4382 found_so="$additional_libdir/lib$name.$shlibext"
4383 if test -f "$additional_libdir/lib$name.la"; then
4384 found_la="$additional_libdir/lib$name.la"
4387 if test -f "$additional_libdir/lib$name.$libext"; then
4388 found_dir="$additional_libdir"
4389 found_a="$additional_libdir/lib$name.$libext"
4390 if test -f "$additional_libdir/lib$name.la"; then
4391 found_la="$additional_libdir/lib$name.la"
4396 if test "X$found_dir" = "X"; then
4397 for x in $LDFLAGS $LTLIB[]NAME; do
4398 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4401 dir=`echo "X$x" | sed -e 's/^X-L//'`
4402 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
4404 found_so="$dir/lib$name.$shlibext"
4405 if test -f "$dir/lib$name.la"; then
4406 found_la="$dir/lib$name.la"
4409 if test -f "$dir/lib$name.$libext"; then
4411 found_a="$dir/lib$name.$libext"
4412 if test -f "$dir/lib$name.la"; then
4413 found_la="$dir/lib$name.la"
4419 if test "X$found_dir" != "X"; then
4424 if test "X$found_dir" != "X"; then
4425 dnl Found the library.
4426 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
4427 if test "X$found_so" != "X"; then
4428 dnl Linking with a shared library. We attempt to hardcode its
4429 dnl directory into the executable's runpath, unless it's the
4430 dnl standard /usr/lib.
4431 if test "X$found_dir" = "X/usr/lib"; then
4432 dnl No hardcoding is needed.
4433 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4435 dnl Use an explicit option to hardcode DIR into the resulting
4437 dnl Potentially add DIR to ltrpathdirs.
4438 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
4440 for x in $ltrpathdirs; do
4441 if test "X$x" = "X$found_dir"; then
4446 if test -z "$haveit"; then
4447 ltrpathdirs="$ltrpathdirs $found_dir"
4449 dnl The hardcoding into $LIBNAME is system dependent.
4450 if test "$hardcode_direct" = yes; then
4451 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
4452 dnl resulting binary.
4453 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4455 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
4456 dnl Use an explicit option to hardcode DIR into the resulting
4458 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4459 dnl Potentially add DIR to rpathdirs.
4460 dnl The rpathdirs will be appended to $LIBNAME at the end.
4462 for x in $rpathdirs; do
4463 if test "X$x" = "X$found_dir"; then
4468 if test -z "$haveit"; then
4469 rpathdirs="$rpathdirs $found_dir"
4472 dnl Rely on "-L$found_dir".
4473 dnl But don't add it if it's already contained in the LDFLAGS
4474 dnl or the already constructed $LIBNAME
4476 for x in $LDFLAGS $LIB[]NAME; do
4477 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4478 if test "X$x" = "X-L$found_dir"; then
4483 if test -z "$haveit"; then
4484 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
4486 if test "$hardcode_minus_L" != no; then
4487 dnl FIXME: Not sure whether we should use
4488 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
4490 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4492 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
4493 dnl here, because this doesn't fit in flags passed to the
4494 dnl compiler. So give up. No hardcoding. This affects only
4495 dnl very old systems.
4496 dnl FIXME: Not sure whether we should use
4497 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
4499 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
4505 if test "X$found_a" != "X"; then
4506 dnl Linking with a static library.
4507 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
4509 dnl We shouldn't come here, but anyway it's good to have a
4511 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
4514 dnl Assume the include files are nearby.
4515 additional_includedir=
4516 case "$found_dir" in
4518 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
4519 additional_includedir="$basedir/include"
4522 if test "X$additional_includedir" != "X"; then
4523 dnl Potentially add $additional_includedir to $INCNAME.
4524 dnl But don't add it
4525 dnl 1. if it's the standard /usr/include,
4526 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
4527 dnl 3. if it's already present in $CPPFLAGS or the already
4528 dnl constructed $INCNAME,
4529 dnl 4. if it doesn't exist as a directory.
4530 if test "X$additional_includedir" != "X/usr/include"; then
4532 if test "X$additional_includedir" = "X/usr/local/include"; then
4533 if test -n "$GCC"; then
4535 linux*) haveit=yes;;
4539 if test -z "$haveit"; then
4540 for x in $CPPFLAGS $INC[]NAME; do
4541 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4542 if test "X$x" = "X-I$additional_includedir"; then
4547 if test -z "$haveit"; then
4548 if test -d "$additional_includedir"; then
4549 dnl Really add $additional_includedir to $INCNAME.
4550 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
4556 dnl Look for dependencies.
4557 if test -n "$found_la"; then
4558 dnl Read the .la file. It defines the variables
4559 dnl dlname, library_names, old_library, dependency_libs, current,
4560 dnl age, revision, installed, dlopen, dlpreopen, libdir.
4561 save_libdir="$libdir"
4563 */* | *\\*) . "$found_la" ;;
4564 *) . "./$found_la" ;;
4566 libdir="$save_libdir"
4567 dnl We use only dependency_libs.
4568 for dep in $dependency_libs; do
4571 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
4572 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
4573 dnl But don't add it
4574 dnl 1. if it's the standard /usr/lib,
4575 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
4576 dnl 3. if it's already present in $LDFLAGS or the already
4577 dnl constructed $LIBNAME,
4578 dnl 4. if it doesn't exist as a directory.
4579 if test "X$additional_libdir" != "X/usr/lib"; then
4581 if test "X$additional_libdir" = "X/usr/local/lib"; then
4582 if test -n "$GCC"; then
4584 linux*) haveit=yes;;
4588 if test -z "$haveit"; then
4590 for x in $LDFLAGS $LIB[]NAME; do
4591 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4592 if test "X$x" = "X-L$additional_libdir"; then
4597 if test -z "$haveit"; then
4598 if test -d "$additional_libdir"; then
4599 dnl Really add $additional_libdir to $LIBNAME.
4600 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
4604 for x in $LDFLAGS $LTLIB[]NAME; do
4605 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4606 if test "X$x" = "X-L$additional_libdir"; then
4611 if test -z "$haveit"; then
4612 if test -d "$additional_libdir"; then
4613 dnl Really add $additional_libdir to $LTLIBNAME.
4614 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
4621 dir=`echo "X$dep" | sed -e 's/^X-R//'`
4622 dnl Potentially add DIR to rpathdirs.
4623 dnl The rpathdirs will be appended to $LIBNAME at the end.
4625 for x in $rpathdirs; do
4626 if test "X$x" = "X$dir"; then
4631 if test -z "$haveit"; then
4632 rpathdirs="$rpathdirs $dir"
4634 dnl Potentially add DIR to ltrpathdirs.
4635 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
4637 for x in $ltrpathdirs; do
4638 if test "X$x" = "X$dir"; then
4643 if test -z "$haveit"; then
4644 ltrpathdirs="$ltrpathdirs $dir"
4648 dnl Handle this in the next round.
4649 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
4652 dnl Handle this in the next round. Throw away the .la's
4653 dnl directory; it is already contained in a preceding -L
4655 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
4658 dnl Most likely an immediate library name.
4659 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
4660 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
4666 dnl Didn't find the library; assume it is in the system directories
4667 dnl known to the linker and runtime loader. (All the system
4668 dnl directories known to the linker should also be known to the
4669 dnl runtime loader, otherwise the system is severely misconfigured.)
4670 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
4671 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
4677 if test "X$rpathdirs" != "X"; then
4678 if test -n "$hardcode_libdir_separator"; then
4679 dnl Weird platform: only the last -rpath option counts, the user must
4680 dnl pass all path elements in one option. We can arrange that for a
4681 dnl single library, but not when more than one $LIBNAMEs are used.
4683 for found_dir in $rpathdirs; do
4684 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
4686 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
4687 acl_save_libdir="$libdir"
4689 eval flag=\"$hardcode_libdir_flag_spec\"
4690 libdir="$acl_save_libdir"
4691 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
4693 dnl The -rpath options are cumulative.
4694 for found_dir in $rpathdirs; do
4695 acl_save_libdir="$libdir"
4697 eval flag=\"$hardcode_libdir_flag_spec\"
4698 libdir="$acl_save_libdir"
4699 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
4703 if test "X$ltrpathdirs" != "X"; then
4704 dnl When using libtool, the option that works for both libraries and
4705 dnl executables is -R. The -R options are cumulative.
4706 for found_dir in $ltrpathdirs; do
4707 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
4712 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
4713 dnl unless already present in VAR.
4714 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
4715 dnl contains two or three consecutive elements that belong together.
4716 AC_DEFUN([AC_LIB_APPENDTOVAR],
4718 for element in [$2]; do
4721 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4722 if test "X$x" = "X$element"; then
4727 if test -z "$haveit"; then
4728 [$1]="${[$1]}${[$1]:+ }$element"
4733 # lib-ld.m4 serial 1 (gettext-0.11)
4734 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
4735 dnl This file is free software, distributed under the terms of the GNU
4736 dnl General Public License. As a special exception to the GNU General
4737 dnl Public License, this file may be distributed as part of a program
4738 dnl that contains a configuration script generated by Autoconf, under
4739 dnl the same distribution terms as the rest of that program.
4741 dnl Subroutines of libtool.m4,
4742 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
4743 dnl with libtool.m4.
4745 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
4746 AC_DEFUN([AC_LIB_PROG_LD_GNU],
4747 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
4748 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4749 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4750 acl_cv_prog_gnu_ld=yes
4752 acl_cv_prog_gnu_ld=no
4754 with_gnu_ld=$acl_cv_prog_gnu_ld
4757 dnl From libtool-1.4. Sets the variable LD.
4758 AC_DEFUN([AC_LIB_PROG_LD],
4759 [AC_ARG_WITH(gnu-ld,
4760 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4761 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4762 AC_REQUIRE([AC_PROG_CC])dnl
4763 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4765 if test "$GCC" = yes; then
4766 # Check if gcc -print-prog-name=ld gives a path.
4767 AC_MSG_CHECKING([for ld used by GCC])
4770 # gcc leaves a trailing carriage return which upsets mingw
4771 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4773 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4776 # Accept absolute paths.
4777 [[\\/]* | [A-Za-z]:[\\/]*)]
4778 [re_direlt='/[^/][^/]*/\.\./']
4779 # Canonicalize the path of ld
4780 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4781 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4782 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4784 test -z "$LD" && LD="$ac_prog"
4787 # If it fails, then pretend we aren't using GCC.
4791 # If it is relative, then search for the first ld in PATH.
4795 elif test "$with_gnu_ld" = yes; then
4796 AC_MSG_CHECKING([for GNU ld])
4798 AC_MSG_CHECKING([for non-GNU ld])
4800 AC_CACHE_VAL(acl_cv_path_LD,
4801 [if test -z "$LD"; then
4802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4803 for ac_dir in $PATH; do
4804 test -z "$ac_dir" && ac_dir=.
4805 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4806 acl_cv_path_LD="$ac_dir/$ac_prog"
4807 # Check to see if the program is GNU ld. I'd rather use --version,
4808 # but apparently some GNU ld's only accept -v.
4809 # Break only if it was the GNU/non-GNU ld that we prefer.
4810 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4811 test "$with_gnu_ld" != no && break
4813 test "$with_gnu_ld" != yes && break
4819 acl_cv_path_LD="$LD" # Let the user override the test with a path.
4821 LD="$acl_cv_path_LD"
4822 if test -n "$LD"; then
4827 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4831 # gettext.m4 serial 14 (gettext-0.11.2)
4832 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
4833 dnl This file is free software, distributed under the terms of the GNU
4834 dnl General Public License. As a special exception to the GNU General
4835 dnl Public License, this file may be distributed as part of a program
4836 dnl that contains a configuration script generated by Autoconf, under
4837 dnl the same distribution terms as the rest of that program.
4839 dnl This file can can be used in projects which are not available under
4840 dnl the GNU General Public License or the GNU Library General Public
4841 dnl License but which still want to provide support for the GNU gettext
4843 dnl Please note that the actual code of the GNU gettext library is covered
4844 dnl by the GNU Library General Public License, and the rest of the GNU
4845 dnl gettext package package is covered by the GNU General Public License.
4846 dnl They are *not* in the public domain.
4849 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
4850 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
4852 dnl Macro to add for using GNU gettext.
4854 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
4855 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
4856 dnl default (if it is not specified or empty) is 'no-libtool'.
4857 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
4858 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
4859 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
4860 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
4861 dnl depending on --{enable,disable}-{shared,static} and on the presence of
4862 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
4863 dnl $(top_builddir)/intl/libintl.a will be created.
4864 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
4865 dnl implementations (in libc or libintl) without the ngettext() function
4866 dnl will be ignored.
4867 dnl INTLDIR is used to find the intl libraries. If empty,
4868 dnl the value `$(top_builddir)/intl/' is used.
4870 dnl The result of the configuration is one of three cases:
4871 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
4873 dnl Catalog format: GNU --> install in $(datadir)
4874 dnl Catalog extension: .mo after installation, .gmo in source tree
4875 dnl 2) GNU gettext has been found in the system's C library.
4876 dnl Catalog format: GNU --> install in $(datadir)
4877 dnl Catalog extension: .mo after installation, .gmo in source tree
4878 dnl 3) No internationalization, always use English msgid.
4879 dnl Catalog format: none
4880 dnl Catalog extension: none
4881 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
4882 dnl The use of .gmo is historical (it was needed to avoid overwriting the
4883 dnl GNU format catalogs when building on a platform with an X/Open gettext),
4884 dnl but we keep it in order not to force irrelevant filename changes on the
4887 AC_DEFUN([AM_GNU_GETTEXT],
4889 dnl Argument checking.
4890 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
4891 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
4893 ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
4894 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
4896 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
4897 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
4899 AC_REQUIRE([AM_PO_SUBDIRS])dnl
4900 ifelse(gt_included_intl, yes, [
4901 AC_REQUIRE([AM_INTL_SUBDIR])dnl
4904 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
4905 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4906 AC_REQUIRE([AC_LIB_RPATH])
4908 AC_MSG_CHECKING([whether NLS is requested])
4909 dnl Default is enabled NLS
4911 [ --disable-nls do not use Native Language Support],
4912 USE_NLS=$enableval, USE_NLS=yes)
4913 AC_MSG_RESULT($USE_NLS)
4916 ifelse(gt_included_intl, yes, [
4917 BUILD_INCLUDED_LIBINTL=no
4918 USE_INCLUDED_LIBINTL=no
4924 dnl If we use NLS figure out what method
4925 if test "$USE_NLS" = "yes"; then
4926 gt_use_preinstalled_gnugettext=no
4927 ifelse(gt_included_intl, yes, [
4928 AC_MSG_CHECKING([whether included gettext is requested])
4929 AC_ARG_WITH(included-gettext,
4930 [ --with-included-gettext use the GNU gettext library included here],
4931 nls_cv_force_use_gnu_gettext=$withval,
4932 nls_cv_force_use_gnu_gettext=no)
4933 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
4935 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
4936 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
4938 dnl User does not insist on using GNU NLS library. Figure out what
4939 dnl to use. If GNU gettext is available we use this. Else we have
4940 dnl to fall back to GNU NLS library.
4942 dnl Add a version number to the cache macros.
4943 define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
4944 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
4945 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
4947 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
4948 [AC_TRY_LINK([#include <libintl.h>
4949 extern int _nl_msg_cat_cntr;
4950 extern int *_nl_domain_bindings;],
4951 [bindtextdomain ("", "");
4952 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
4953 gt_cv_func_gnugettext_libc=yes,
4954 gt_cv_func_gnugettext_libc=no)])
4956 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
4957 dnl Sometimes libintl requires libiconv, so first search for libiconv.
4958 ifelse(gt_included_intl, yes, , [
4961 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
4962 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
4963 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
4964 dnl even if libiconv doesn't exist.
4965 AC_LIB_LINKFLAGS_BODY([intl])
4966 AC_CACHE_CHECK([for GNU gettext in libintl],
4967 gt_cv_func_gnugettext_libintl,
4968 [gt_save_CPPFLAGS="$CPPFLAGS"
4969 CPPFLAGS="$CPPFLAGS $INCINTL"
4970 gt_save_LIBS="$LIBS"
4971 LIBS="$LIBS $LIBINTL"
4972 dnl Now see whether libintl exists and does not depend on libiconv.
4973 AC_TRY_LINK([#include <libintl.h>
4974 extern int _nl_msg_cat_cntr;
4979 const char *_nl_expand_alias ();],
4980 [bindtextdomain ("", "");
4981 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
4982 gt_cv_func_gnugettext_libintl=yes,
4983 gt_cv_func_gnugettext_libintl=no)
4984 dnl Now see whether libintl exists and depends on libiconv.
4985 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
4986 LIBS="$LIBS $LIBICONV"
4987 AC_TRY_LINK([#include <libintl.h>
4988 extern int _nl_msg_cat_cntr;
4993 const char *_nl_expand_alias ();],
4994 [bindtextdomain ("", "");
4995 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
4996 [LIBINTL="$LIBINTL $LIBICONV"
4997 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
4998 gt_cv_func_gnugettext_libintl=yes
5001 CPPFLAGS="$gt_save_CPPFLAGS"
5002 LIBS="$gt_save_LIBS"])
5005 dnl If an already present or preinstalled GNU gettext() is found,
5006 dnl use it. But if this macro is used in GNU gettext, and GNU
5007 dnl gettext is already preinstalled in libintl, we update this
5008 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
5009 if test "$gt_cv_func_gnugettext_libc" = "yes" \
5010 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
5011 && test "$PACKAGE" != gettext; }; then
5012 gt_use_preinstalled_gnugettext=yes
5014 dnl Reset the values set by searching for libintl.
5020 ifelse(gt_included_intl, yes, [
5021 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
5022 dnl GNU gettext is not found in the C library.
5023 dnl Fall back on included GNU gettext library.
5024 nls_cv_use_gnu_gettext=yes
5028 if test "$nls_cv_use_gnu_gettext" = "yes"; then
5029 dnl Mark actions used to generate GNU NLS library.
5030 INTLOBJS="\$(GETTOBJS)"
5031 BUILD_INCLUDED_LIBINTL=yes
5032 USE_INCLUDED_LIBINTL=yes
5033 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
5034 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
5035 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
5038 if test "$gt_use_preinstalled_gnugettext" = "yes" \
5039 || test "$nls_cv_use_gnu_gettext" = "yes"; then
5040 dnl Mark actions to use GNU gettext tools.
5045 if test "$gt_use_preinstalled_gnugettext" = "yes" \
5046 || test "$nls_cv_use_gnu_gettext" = "yes"; then
5047 AC_DEFINE(ENABLE_NLS, 1,
5048 [Define to 1 if translation of program messages to the user's native language
5055 if test "$USE_NLS" = "yes"; then
5057 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
5058 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
5059 AC_MSG_CHECKING([how to link with libintl])
5060 AC_MSG_RESULT([$LIBINTL])
5061 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
5064 dnl For backward compatibility. Some packages may be using this.
5065 AC_DEFINE(HAVE_GETTEXT, 1,
5066 [Define if the GNU gettext() function is already present or preinstalled.])
5067 AC_DEFINE(HAVE_DCGETTEXT, 1,
5068 [Define if the GNU dcgettext() function is already present or preinstalled.])
5071 dnl We need to process the po/ directory.
5075 ifelse(gt_included_intl, yes, [
5076 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
5077 dnl to 'yes' because some of the testsuite requires it.
5078 if test "$PACKAGE" = gettext; then
5079 BUILD_INCLUDED_LIBINTL=yes
5082 dnl Make all variables we use known to autoconf.
5083 AC_SUBST(BUILD_INCLUDED_LIBINTL)
5084 AC_SUBST(USE_INCLUDED_LIBINTL)
5088 dnl For backward compatibility. Some configure.ins may be using this.
5090 nls_cv_header_libgt=
5092 dnl For backward compatibility. Some Makefiles may be using this.
5094 AC_SUBST(DATADIRNAME)
5096 dnl For backward compatibility. Some Makefiles may be using this.
5098 AC_SUBST(INSTOBJEXT)
5100 dnl For backward compatibility. Some Makefiles may be using this.
5104 dnl Enable libtool support if the surrounding package wishes it.
5105 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
5106 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
5109 dnl For backward compatibility. Some Makefiles may be using this.
5113 dnl Make all documented variables known to autoconf.
5120 dnl Checks for all prerequisites of the po subdirectory,
5121 dnl except for USE_NLS.
5122 AC_DEFUN([AM_PO_SUBDIRS],
5124 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5125 AC_REQUIRE([AC_PROG_INSTALL])dnl
5126 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
5128 dnl Perform the following tests also if --disable-nls has been given,
5129 dnl because they are needed for "make dist" to work.
5131 dnl Search for GNU msgfmt in the PATH.
5132 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
5133 dnl The second test excludes FreeBSD msgfmt.
5134 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5135 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
5136 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
5138 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5140 dnl Search for GNU xgettext 0.11 or newer in the PATH.
5141 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
5142 dnl The second test excludes FreeBSD xgettext.
5143 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5144 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
5145 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
5147 dnl Remove leftover from FreeBSD xgettext call.
5150 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
5151 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
5152 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
5154 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5155 dnl Test whether we really found GNU msgfmt.
5156 if test "$GMSGFMT" != ":"; then
5157 dnl If it is no GNU msgfmt we define it as : so that the
5158 dnl Makefiles still can work.
5159 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
5160 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
5163 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
5165 [found $GMSGFMT program is not GNU msgfmt; ignore it])
5170 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5171 dnl Test whether we really found GNU xgettext.
5172 if test "$XGETTEXT" != ":"; then
5173 dnl If it is no GNU xgettext we define it as : so that the
5174 dnl Makefiles still can work.
5175 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
5176 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
5180 [found xgettext program is not GNU xgettext; ignore it])
5183 dnl Remove leftover from FreeBSD xgettext call.
5187 AC_OUTPUT_COMMANDS([
5188 for ac_file in $CONFIG_FILES; do
5189 # Support "outfile[:infile[:infile...]]"
5191 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5193 # PO directories have a Makefile.in generated from Makefile.in.in.
5194 case "$ac_file" in */Makefile.in)
5195 # Adjust a relative srcdir.
5196 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
5197 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
5198 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
5199 # In autoconf-2.13 it is called $ac_given_srcdir.
5200 # In autoconf-2.50 it is called $srcdir.
5201 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
5202 case "$ac_given_srcdir" in
5203 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
5204 /*) top_srcdir="$ac_given_srcdir" ;;
5205 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
5207 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
5208 rm -f "$ac_dir/POTFILES"
5209 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
5210 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
5211 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
5212 # on $ac_dir but don't depend on user-specified configuration
5214 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
5215 # The LINGUAS file contains the set of available languages.
5216 if test -n "$ALL_LINGUAS"; then
5217 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
5219 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
5220 # Hide the ALL_LINGUAS assigment from automake.
5221 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
5223 case "$ac_given_srcdir" in
5225 *) srcdirpre='$(srcdir)/' ;;
5231 for lang in $ALL_LINGUAS; do
5232 POFILES="$POFILES $srcdirpre$lang.po"
5233 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
5234 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
5235 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
5237 # CATALOGS depends on both $ac_dir and the user's LINGUAS
5238 # environment variable.
5240 if test -n "$ALL_LINGUAS"; then
5241 for presentlang in $ALL_LINGUAS; do
5243 if test "%UNSET%" != "$LINGUAS"; then
5244 desiredlanguages="$LINGUAS"
5246 desiredlanguages="$ALL_LINGUAS"
5248 for desiredlang in $desiredlanguages; do
5249 # Use the presentlang catalog if desiredlang is
5250 # a. equal to presentlang, or
5251 # b. a variant of presentlang (because in this case,
5252 # presentlang can be used as a fallback for messages
5253 # which are not translated in the desiredlang catalog).
5254 case "$desiredlang" in
5255 "$presentlang"*) useit=yes;;
5258 if test $useit = yes; then
5259 INST_LINGUAS="$INST_LINGUAS $presentlang"
5264 if test -n "$INST_LINGUAS"; then
5265 for lang in $INST_LINGUAS; do
5266 CATALOGS="$CATALOGS $lang.gmo"
5269 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
5270 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
5271 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
5272 if test -f "$f"; then
5274 *.orig | *.bak | *~) ;;
5275 *) cat "$f" >> "$ac_dir/Makefile" ;;
5283 [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
5284 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
5286 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
5287 # Capture the value of LINGUAS because we need it to compute CATALOGS.
5288 LINGUAS="${LINGUAS-%UNSET%}"
5293 dnl Checks for all prerequisites of the intl subdirectory,
5294 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
5295 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
5296 AC_DEFUN([AM_INTL_SUBDIR],
5298 AC_REQUIRE([AC_PROG_INSTALL])dnl
5299 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
5300 AC_REQUIRE([AC_PROG_CC])dnl
5301 AC_REQUIRE([AC_CANONICAL_HOST])dnl
5302 AC_REQUIRE([AC_PROG_RANLIB])dnl
5303 AC_REQUIRE([AC_ISC_POSIX])dnl
5304 AC_REQUIRE([AC_HEADER_STDC])dnl
5305 AC_REQUIRE([AC_C_CONST])dnl
5306 AC_REQUIRE([AC_C_INLINE])dnl
5307 AC_REQUIRE([AC_TYPE_OFF_T])dnl
5308 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
5309 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
5310 AC_REQUIRE([AC_FUNC_MMAP])dnl
5311 AC_REQUIRE([jm_GLIBC21])dnl
5313 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5314 stdlib.h string.h unistd.h sys/param.h])
5315 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
5316 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
5317 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
5323 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
5324 dnl because plural.y uses bison specific features. It requires at least
5325 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
5327 dnl bison is only needed for the maintainer (who touches plural.y). But in
5328 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
5329 dnl the rule in general Makefile. Now, some people carelessly touch the
5330 dnl files or have a broken "make" program, hence the plural.c rule will
5331 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
5332 dnl present or too old.
5333 AC_CHECK_PROGS([INTLBISON], [bison])
5334 if test -z "$INTLBISON"; then
5337 dnl Found it, now check the version.
5338 AC_MSG_CHECKING([version of bison])
5339 changequote(<<,>>)dnl
5340 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
5341 case $ac_prog_version in
5342 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
5343 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
5345 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
5346 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
5348 AC_MSG_RESULT([$ac_prog_version])
5350 if test $ac_verc_fail = yes; then
5356 AC_DEFUN([AM_MKINSTALLDIRS],
5358 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
5359 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
5360 dnl Try to locate is.
5362 if test -n "$ac_aux_dir"; then
5363 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5365 if test -z "$MKINSTALLDIRS"; then
5366 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5368 AC_SUBST(MKINSTALLDIRS)
5371 # progtest.m4 serial 2 (gettext-0.10.40)
5372 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
5373 dnl This file is free software, distributed under the terms of the GNU
5374 dnl General Public License. As a special exception to the GNU General
5375 dnl Public License, this file may be distributed as part of a program
5376 dnl that contains a configuration script generated by Autoconf, under
5377 dnl the same distribution terms as the rest of that program.
5379 dnl This file can can be used in projects which are not available under
5380 dnl the GNU General Public License or the GNU Library General Public
5381 dnl License but which still want to provide support for the GNU gettext
5383 dnl Please note that the actual code of the GNU gettext library is covered
5384 dnl by the GNU Library General Public License, and the rest of the GNU
5385 dnl gettext package package is covered by the GNU General Public License.
5386 dnl They are *not* in the public domain.
5389 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
5391 # Search path for a program which passes the given test.
5393 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
5394 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
5395 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
5396 [# Extract the first word of "$2", so it can be a program name with args.
5397 set dummy $2; ac_word=[$]2
5398 AC_MSG_CHECKING([for $ac_word])
5399 AC_CACHE_VAL(ac_cv_path_$1,
5402 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
5405 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5406 for ac_dir in ifelse([$5], , $PATH, [$5]); do
5407 test -z "$ac_dir" && ac_dir=.
5408 if test -f $ac_dir/$ac_word; then
5410 ac_cv_path_$1="$ac_dir/$ac_word"
5416 dnl If no 4th arg is given, leave the cache variable unset,
5417 dnl so AC_PATH_PROGS will keep looking.
5418 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
5423 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
5424 AC_MSG_RESULT([$]$1)
5431 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
5432 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5433 dnl This file is free software, distributed under the terms of the GNU
5434 dnl General Public License. As a special exception to the GNU General
5435 dnl Public License, this file may be distributed as part of a program
5436 dnl that contains a configuration script generated by Autoconf, under
5437 dnl the same distribution terms as the rest of that program.
5439 # Test for the GNU C Library, version 2.1 or newer.
5440 # From Bruno Haible.
5442 AC_DEFUN([jm_GLIBC21],
5444 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5445 ac_cv_gnu_library_2_1,
5446 [AC_EGREP_CPP([Lucky GNU user],
5448 #include <features.h>
5449 #ifdef __GNU_LIBRARY__
5450 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5455 ac_cv_gnu_library_2_1=yes,
5456 ac_cv_gnu_library_2_1=no)
5460 GLIBC21="$ac_cv_gnu_library_2_1"
5464 # codeset.m4 serial AM1 (gettext-0.10.40)
5465 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5466 dnl This file is free software, distributed under the terms of the GNU
5467 dnl General Public License. As a special exception to the GNU General
5468 dnl Public License, this file may be distributed as part of a program
5469 dnl that contains a configuration script generated by Autoconf, under
5470 dnl the same distribution terms as the rest of that program.
5472 dnl From Bruno Haible.
5474 AC_DEFUN([AM_LANGINFO_CODESET],
5476 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
5477 [AC_TRY_LINK([#include <langinfo.h>],
5478 [char* cs = nl_langinfo(CODESET);],
5479 am_cv_langinfo_codeset=yes,
5480 am_cv_langinfo_codeset=no)
5482 if test $am_cv_langinfo_codeset = yes; then
5483 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
5484 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
5488 # lcmessage.m4 serial 2 (gettext-0.10.40)
5489 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5490 dnl This file is free software, distributed under the terms of the GNU
5491 dnl General Public License. As a special exception to the GNU General
5492 dnl Public License, this file may be distributed as part of a program
5493 dnl that contains a configuration script generated by Autoconf, under
5494 dnl the same distribution terms as the rest of that program.
5496 dnl This file can can be used in projects which are not available under
5497 dnl the GNU General Public License or the GNU Library General Public
5498 dnl License but which still want to provide support for the GNU gettext
5500 dnl Please note that the actual code of the GNU gettext library is covered
5501 dnl by the GNU Library General Public License, and the rest of the GNU
5502 dnl gettext package package is covered by the GNU General Public License.
5503 dnl They are *not* in the public domain.
5506 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
5508 # Check whether LC_MESSAGES is available in <locale.h>.
5510 AC_DEFUN([AM_LC_MESSAGES],
5511 [if test $ac_cv_header_locale_h = yes; then
5512 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
5513 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
5514 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
5515 if test $am_cv_val_LC_MESSAGES = yes; then
5516 AC_DEFINE(HAVE_LC_MESSAGES, 1,
5517 [Define if your <locale.h> file defines LC_MESSAGES.])
5521 # mbstate_t.m4 serial 9 (fileutils-4.1.3)
5522 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5523 dnl This file is free software, distributed under the terms of the GNU
5524 dnl General Public License. As a special exception to the GNU General
5525 dnl Public License, this file may be distributed as part of a program
5526 dnl that contains a configuration script generated by Autoconf, under
5527 dnl the same distribution terms as the rest of that program.
5531 # BeOS 5 has <wchar.h> but does not define mbstate_t,
5532 # so you can't declare an object of that type.
5533 # Check for this incompatibility with Standard C.
5535 # Include stdlib.h first, because otherwise this test would fail on Linux
5536 # (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
5537 # a syntax error in wchar.h due to the use of undefined __int32_t.
5539 AC_DEFUN([AC_MBSTATE_T],
5541 AC_CHECK_HEADERS(stdlib.h)
5543 AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
5546 # include <stdlib.h>
5548 #include <wchar.h>],
5549 [mbstate_t x; return sizeof x;],
5550 ac_cv_type_mbstate_t=yes,
5551 ac_cv_type_mbstate_t=no)])
5552 if test $ac_cv_type_mbstate_t = no; then
5553 AC_DEFINE(mbstate_t, int,
5554 [Define to a type if <wchar.h> does not define.])
5561 # The EILSEQ errno value ought to be defined in <errno.h>, according to
5562 # ISO C 99 and POSIX. But some systems (like SunOS 4) don't define it,
5563 # and some systems (like BSD/OS) define it in <wchar.h> not <errno.h>.
5565 # Define EILSEQ as a C macro and as a substituted macro in such a way that
5566 # 1. on all systems, after inclusion of <errno.h>, EILSEQ is usable,
5567 # 2. on systems where EILSEQ is defined elsewhere, we use the same numeric
5570 AC_DEFUN([AC_EILSEQ],
5572 AC_REQUIRE([AC_PROG_CC])dnl
5574 dnl Check for any extra headers that could define EILSEQ.
5575 AC_CHECK_HEADERS(wchar.h)
5577 AC_CACHE_CHECK([for EILSEQ], ac_cv_decl_EILSEQ, [
5584 if test -n "$have_eilseq"; then
5585 dnl EILSEQ exists in <errno.h>. Don't need to define EILSEQ ourselves.
5586 ac_cv_decl_EILSEQ=yes
5597 if test -n "$have_eilseq"; then
5598 dnl EILSEQ exists in some other system header.
5599 dnl Define it to the same value.
5600 _AC_COMPUTE_INT([EILSEQ], ac_cv_decl_EILSEQ, [
5605 /* The following two lines are a workaround against an autoconf-2.52 bug. */
5610 dnl EILSEQ isn't defined by the system. Define EILSEQ ourselves, but
5611 dnl don't define it as EINVAL, because iconv() callers want to
5612 dnl distinguish EINVAL and EILSEQ.
5613 ac_cv_decl_EILSEQ=ENOENT
5617 if test "$ac_cv_decl_EILSEQ" != yes; then
5618 AC_DEFINE_UNQUOTED([EILSEQ], [$ac_cv_decl_EILSEQ],
5619 [Define as good substitute value for EILSEQ.])
5620 EILSEQ="$ac_cv_decl_EILSEQ"
5625 dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
5626 dnl This file is free software, distributed under the terms of the GNU
5627 dnl General Public License. As a special exception to the GNU General
5628 dnl Public License, this file may be distributed as part of a program
5629 dnl that contains a configuration script generated by Autoconf, under
5630 dnl the same distribution terms as the rest of that program.
5632 dnl From Bruno Haible, Marcus Daniels.
5636 AC_DEFUN([CL_WORDS_LITTLEENDIAN],
5637 [AC_CACHE_CHECK(byte ordering, cl_cv_sys_endian, [
5638 AC_TRY_RUN([int main () {
5639 /* Are we little or big endian? From Harbison&Steele. */
5643 char c[sizeof (long)];
5648 cl_cv_sys_endian="big endian",
5649 cl_cv_sys_endian="little endian",
5650 : # must guess the endianness
5652 if test -z "$cl_cv_sys_endian"; then
5653 AC_EGREP_CPP(yes,[#if defined(m68k) || defined(__m68k__) || defined(mc68000) || defined(mc68020) || defined(__mc68020__) || defined(sparc) || defined(__sparc__) || defined(MIPSEB) || defined(__MIPSEB__) || defined(hppa) || defined(__hppa) || defined(m88000) || defined(__m88k__)
5656 ], cl_cv_sys_endian="big endian")
5658 if test -z "$cl_cv_sys_endian"; then
5659 AC_EGREP_CPP(yes,[#if defined(i386) || defined(__i386) || defined(__i386__) || defined(_I386) || defined(MIPSEL) || defined(__MIPSEL__) || defined(__alpha)
5662 ], cl_cv_sys_endian="little endian")
5664 if test -z "$cl_cv_sys_endian"; then
5665 cl_cv_sys_endian="guessing little endian"
5668 case "$cl_cv_sys_endian" in
5669 *little*) AC_DEFINE(WORDS_LITTLEENDIAN) ;;