1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
14 # serial 46 AC_PROG_LIBTOOL
15 AC_DEFUN([AC_PROG_LIBTOOL],
16 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
17 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
18 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
19 AC_PROVIDE_IFELSE([AC_PROG_CXX],
21 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
24 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
25 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
26 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
27 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
29 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
31 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
34 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
36 ifdef([A][M_PROG_GCJ],
37 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
39 ifdef([LT_AC_PROG_GCJ],
40 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
43 AC_DEFUN([_AC_PROG_LIBTOOL],
44 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
45 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
46 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
48 # Save cache, so that ltconfig can load it
51 # Actually configure libtool. ac_aux_dir is where install-sh is found.
52 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
53 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
54 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
55 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
56 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
57 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
58 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
59 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
60 || AC_MSG_ERROR([libtool configure failed])
62 # Reload cache, that may have been modified by ltconfig
65 # This can be used to rebuild libtool when needed
66 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
68 # Always use our own libtool.
69 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
72 # Redirect the config.log output again, so that the ltconfig log is not
73 # clobbered by the next message.
77 AC_DEFUN([AC_LIBTOOL_SETUP],
79 AC_REQUIRE([AC_ENABLE_SHARED])dnl
80 AC_REQUIRE([AC_ENABLE_STATIC])dnl
81 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
82 AC_REQUIRE([AC_CANONICAL_HOST])dnl
83 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
84 AC_REQUIRE([AC_PROG_CC])dnl
85 AC_REQUIRE([AC_PROG_LD])dnl
86 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
87 AC_REQUIRE([AC_PROG_NM])dnl
88 AC_REQUIRE([AC_PROG_LN_S])dnl
89 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
90 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
91 AC_REQUIRE([AC_OBJEXT])dnl
92 AC_REQUIRE([AC_EXEEXT])dnl
95 # Only perform the check for file, if the check method requires it
96 case $deplibs_check_method in
98 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
104 AC_CHECK_TOOL(RANLIB, ranlib, :)
105 AC_CHECK_TOOL(STRIP, strip, :)
107 # Check for any special flags to pass to ltconfig.
108 libtool_flags="--cache-file=$cache_file"
109 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
110 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
111 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
112 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
113 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
114 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
115 [libtool_flags="$libtool_flags --enable-dlopen"])
116 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
117 [libtool_flags="$libtool_flags --enable-win32-dll"])
118 AC_ARG_ENABLE(libtool-lock,
119 [ --disable-libtool-lock avoid locking (might break parallel builds)])
120 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
121 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
124 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
125 pic_mode="$withval", pic_mode=default)
126 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
127 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
129 # Some flags need to be propagated to the compiler or linker for good
133 # Find out which ABI we are using.
134 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
135 if AC_TRY_EVAL(ac_compile); then
136 case `/usr/bin/file conftest.$ac_objext` in
152 # Find out which ABI we are using.
153 echo 'int i;' > conftest.$ac_ext
154 if AC_TRY_EVAL(ac_compile); then
155 case "`/usr/bin/file conftest.o`" in
167 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
168 # Find out which ABI we are using.
169 echo 'int i;' > conftest.$ac_ext
170 if AC_TRY_EVAL(ac_compile); then
171 case "`/usr/bin/file conftest.o`" in
175 LD="${LD-ld} -m elf_i386"
178 LD="${LD-ld} -m elf32ppclinux"
181 LD="${LD-ld} -m elf_s390"
184 LD="${LD-ld} -m elf32_sparc"
191 LD="${LD-ld} -m elf_x86_64"
193 ppc*-*linux*|powerpc*-*linux*)
194 LD="${LD-ld} -m elf64ppc"
197 LD="${LD-ld} -m elf64_s390"
200 LD="${LD-ld} -m elf64_sparc"
210 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
211 SAVE_CFLAGS="$CFLAGS"
212 CFLAGS="$CFLAGS -belf"
213 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
216 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
218 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
219 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
220 CFLAGS="$SAVE_CFLAGS"
224 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
225 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
226 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
227 AC_CHECK_TOOL(AS, as, false)
228 AC_CHECK_TOOL(OBJDUMP, objdump, false)
230 # recent cygwin and mingw systems supply a stub DllMain which the user
231 # can override, but on older systems we have to supply one
232 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
234 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
236 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
239 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
240 # old mingw systems require "-dll" to link a DLL, while more recent ones
242 SAVE_CFLAGS="$CFLAGS"
243 CFLAGS="$CFLAGS -mdll"
244 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
245 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
246 CFLAGS="$SAVE_CFLAGS" ;;
247 *-*-cygwin* | *-*-pw32*)
248 # cygwin systems need to pass --dll to the linker, and not link
249 # crt.o which will require a WinMain@16 definition.
250 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
257 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
258 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
260 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
261 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
263 # AC_ENABLE_SHARED - implement the --enable-shared flag
264 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
265 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
267 AC_DEFUN([AC_ENABLE_SHARED],
268 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
269 AC_ARG_ENABLE(shared,
270 changequote(<<, >>)dnl
271 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
273 [p=${PACKAGE-default}
275 yes) enable_shared=yes ;;
276 no) enable_shared=no ;;
279 # Look at the argument we got. We use all the common list separators.
280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
281 for pkg in $enableval; do
282 if test "X$pkg" = "X$p"; then
289 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
292 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
293 AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
294 AC_ENABLE_SHARED(no)])
296 # AC_ENABLE_STATIC - implement the --enable-static flag
297 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
298 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
300 AC_DEFUN([AC_ENABLE_STATIC],
301 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
302 AC_ARG_ENABLE(static,
303 changequote(<<, >>)dnl
304 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
306 [p=${PACKAGE-default}
308 yes) enable_static=yes ;;
309 no) enable_static=no ;;
312 # Look at the argument we got. We use all the common list separators.
313 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
314 for pkg in $enableval; do
315 if test "X$pkg" = "X$p"; then
322 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
325 # AC_DISABLE_STATIC - set the default static flag to --disable-static
326 AC_DEFUN([AC_DISABLE_STATIC],
327 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
328 AC_ENABLE_STATIC(no)])
331 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
332 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
333 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
335 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
336 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
337 AC_ARG_ENABLE(fast-install,
338 changequote(<<, >>)dnl
339 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
341 [p=${PACKAGE-default}
343 yes) enable_fast_install=yes ;;
344 no) enable_fast_install=no ;;
346 enable_fast_install=no
347 # Look at the argument we got. We use all the common list separators.
348 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
349 for pkg in $enableval; do
350 if test "X$pkg" = "X$p"; then
351 enable_fast_install=yes
357 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
360 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
361 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
362 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
363 AC_ENABLE_FAST_INSTALL(no)])
365 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
366 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
367 # Where MODE is either `yes' or `no'. If omitted, it defaults to
369 AC_DEFUN([AC_LIBTOOL_PICMODE],
370 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
371 pic_mode=ifelse($#,1,$1,default)])
374 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
375 AC_DEFUN([AC_PATH_TOOL_PREFIX],
376 [AC_MSG_CHECKING([for $1])
377 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
380 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
383 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
386 ac_save_MAGIC_CMD="$MAGIC_CMD"
387 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
388 dnl $ac_dummy forces splitting on constant user-supplied paths.
389 dnl POSIX.2 word splitting is done only on the output of word expansions,
390 dnl not every word. This closes a longstanding sh security hole.
391 ac_dummy="ifelse([$2], , $PATH, [$2])"
392 for ac_dir in $ac_dummy; do
393 test -z "$ac_dir" && ac_dir=.
394 if test -f $ac_dir/$1; then
395 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
396 if test -n "$file_magic_test_file"; then
397 case $deplibs_check_method in
399 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
400 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
401 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
402 egrep "$file_magic_regex" > /dev/null; then
407 *** Warning: the command libtool uses to detect shared libraries,
408 *** $file_magic_cmd, produces output that libtool cannot recognize.
409 *** The result is that libtool may fail to recognize shared libraries
410 *** as such. This will affect the creation of libtool libraries that
411 *** depend on shared libraries, but programs linked with such libtool
412 *** libraries will work regardless of this problem. Nevertheless, you
413 *** may want to report the problem to your system manager and/or to
414 *** bug-libtool@gnu.org
424 MAGIC_CMD="$ac_save_MAGIC_CMD"
427 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
428 if test -n "$MAGIC_CMD"; then
429 AC_MSG_RESULT($MAGIC_CMD)
436 # AC_PATH_MAGIC - find a file program which can recognise a shared library
437 AC_DEFUN([AC_PATH_MAGIC],
438 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
439 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
440 if test -z "$lt_cv_path_MAGIC_CMD"; then
441 if test -n "$ac_tool_prefix"; then
442 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
450 # AC_PROG_LD - find the path to the GNU or non-GNU linker
451 AC_DEFUN([AC_PROG_LD],
453 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
454 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
455 AC_REQUIRE([AC_PROG_CC])dnl
456 AC_REQUIRE([AC_CANONICAL_HOST])dnl
457 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
459 if test "$GCC" = yes; then
460 # Check if gcc -print-prog-name=ld gives a path.
461 AC_MSG_CHECKING([for ld used by GCC])
464 # gcc leaves a trailing carriage return which upsets mingw
465 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
467 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
470 # Accept absolute paths.
471 [[\\/]* | [A-Za-z]:[\\/]*)]
472 re_direlt=['/[^/][^/]*/\.\./']
473 # Canonicalize the path of ld
474 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
475 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
476 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
478 test -z "$LD" && LD="$ac_prog"
481 # If it fails, then pretend we aren't using GCC.
485 # If it is relative, then search for the first ld in PATH.
489 elif test "$with_gnu_ld" = yes; then
490 AC_MSG_CHECKING([for GNU ld])
492 AC_MSG_CHECKING([for non-GNU ld])
494 AC_CACHE_VAL(lt_cv_path_LD,
495 [if test -z "$LD"; then
496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
497 for ac_dir in $PATH; do
498 test -z "$ac_dir" && ac_dir=.
499 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
500 lt_cv_path_LD="$ac_dir/$ac_prog"
501 # Check to see if the program is GNU ld. I'd rather use --version,
502 # but apparently some GNU ld's only accept -v.
503 # Break only if it was the GNU/non-GNU ld that we prefer.
504 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
505 test "$with_gnu_ld" != no && break
507 test "$with_gnu_ld" != yes && break
513 lt_cv_path_LD="$LD" # Let the user override the test with a path.
516 if test -n "$LD"; then
521 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
525 AC_DEFUN([AC_PROG_LD_GNU],
526 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
527 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
528 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
529 lt_cv_prog_gnu_ld=yes
533 with_gnu_ld=$lt_cv_prog_gnu_ld
536 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
537 # -- PORTME Some linkers may need a different reload flag.
538 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
539 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
540 [lt_cv_ld_reload_flag='-r'])
541 reload_flag=$lt_cv_ld_reload_flag
542 test -n "$reload_flag" && reload_flag=" $reload_flag"
545 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
546 # -- PORTME fill in with the dynamic library characteristics
547 # Don't cache this sucker.
548 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
549 [AC_MSG_CHECKING([how to recognise dependant libraries])
550 lt_cv_file_magic_cmd='$MAGIC_CMD'
551 lt_cv_file_magic_test_file=
552 lt_cv_deplibs_check_method='unknown'
553 # Need to set the preceding variable on all platforms that support
554 # interlibrary dependencies.
555 # 'none' -- dependencies not supported.
556 # `unknown' -- same as none, but documents that we really don't know.
557 # 'pass_all' -- all dependencies passed with no checks.
558 # 'test_compile' -- check by making test program.
559 # 'file_magic [regex]' -- check by looking for files in library path
560 # which responds to the $file_magic_cmd with a given egrep regex.
561 # If you have `file' or equivalent on your system and you're not sure
562 # whether `pass_all' will *always* work, you probably want this one.
566 lt_cv_deplibs_check_method=pass_all
570 lt_cv_deplibs_check_method=pass_all
574 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
575 lt_cv_file_magic_cmd='/usr/bin/file -L'
576 lt_cv_file_magic_test_file=/shlib/libc.so
579 cygwin* | mingw* |pw32*)
580 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
581 lt_cv_file_magic_cmd='$OBJDUMP -f'
585 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
586 lt_cv_file_magic_cmd='/usr/bin/file -L'
588 rhapsody* | darwin1.[012])
589 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
592 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
598 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
601 # Not sure whether the presence of OpenBSD here was a mistake.
602 # Let's accept both of them until this is cleared up.
603 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
604 lt_cv_file_magic_cmd=/usr/bin/file
605 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
609 lt_cv_deplibs_check_method=pass_all
614 lt_cv_deplibs_check_method=pass_all
620 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
621 lt_cv_file_magic_cmd=/usr/bin/file
622 lt_cv_file_magic_test_file=/usr/lib/libc.sl
625 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
626 lt_cv_file_magic_cmd=/usr/bin/file
627 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
635 # this will be overridden with pass_all, but let us keep it just in case
636 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
640 *-32|*"-32 ") libmagic=32-bit;;
641 *-n32|*"-n32 ") libmagic=N32;;
642 *-64|*"-64 ") libmagic=64-bit;;
643 *) libmagic=never-match;;
645 # this will be overridden with pass_all, but let us keep it just in case
646 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
649 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
650 lt_cv_deplibs_check_method=pass_all
653 # This must be Linux ELF.
656 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | x86_64*)
657 lt_cv_deplibs_check_method=pass_all ;;
658 # NB 2003-06-03: According to Alexandre Oliva, x86_64 should not be
659 # in this list. However, it works around a libtool problem that
660 # wrongly excludes -ldl/-lpthread from the libmudflap(th) dependencies.
662 # glibc up to 2.1.1 does not perform some relocations on ARM
663 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
665 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
669 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
670 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
672 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
677 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
678 lt_cv_file_magic_cmd=/usr/bin/file
679 lt_cv_file_magic_test_file=/usr/lib/libnls.so
682 osf3* | osf4* | osf5*)
683 # this will be overridden with pass_all, but let us keep it just in case
684 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
685 lt_cv_file_magic_test_file=/shlib/libc.so
686 lt_cv_deplibs_check_method=pass_all
690 lt_cv_deplibs_check_method=pass_all
694 lt_cv_deplibs_check_method=pass_all
695 lt_cv_file_magic_test_file=/lib/libc.so
698 [sysv5uw[78]* | sysv4*uw2*)]
699 lt_cv_deplibs_check_method=pass_all
702 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
705 lt_cv_deplibs_check_method=pass_all
708 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]']
709 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
714 file_magic_cmd=$lt_cv_file_magic_cmd
715 deplibs_check_method=$lt_cv_deplibs_check_method
716 # NB: See above NB ... this is to make sure that the overriden
717 # local libtool variant doesn't pollute the upstream cache
718 unset lt_cv_file_magic_cmd
719 unset lt_cv_deplibs_check_method
720 AC_MSG_RESULT($deplibs_check_method)
724 # AC_PROG_NM - find the path to a BSD-compatible name lister
725 AC_DEFUN([AC_PROG_NM],
726 [AC_MSG_CHECKING([for BSD-compatible nm])
727 AC_CACHE_VAL(lt_cv_path_NM,
728 [if test -n "$NM"; then
729 # Let the user override the test.
732 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
733 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
734 test -z "$ac_dir" && ac_dir=.
735 tmp_nm=$ac_dir/${ac_tool_prefix}nm
736 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
737 # Check to see if the nm accepts a BSD-compat flag.
738 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
739 # nm: unknown option "B" ignored
740 # Tru64's nm complains that /dev/null is an invalid object file
741 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
742 lt_cv_path_NM="$tmp_nm -B"
744 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
745 lt_cv_path_NM="$tmp_nm -p"
748 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
749 continue # so that we can try to find one that supports BSD flags
754 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
760 # AC_CHECK_LIBM - check for math library
761 AC_DEFUN([AC_CHECK_LIBM],
762 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
765 *-*-beos* | *-*-cygwin* | *-*-pw32*)
766 # These system don't have libm
769 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
770 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
773 AC_CHECK_LIB(m, main, LIBM="-lm")
778 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
779 # the libltdl convenience library and INCLTDL to the include flags for
780 # the libltdl header and adds --enable-ltdl-convenience to the
781 # configure arguments. Note that LIBLTDL and INCLTDL are not
782 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
783 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
784 # with '${top_builddir}/' and INCLTDL will be prefixed with
785 # '${top_srcdir}/' (note the single quotes!). If your package is not
786 # flat and you're not using automake, define top_builddir and
787 # top_srcdir appropriately in the Makefiles.
788 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
789 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
790 case $enable_ltdl_convenience in
791 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
792 "") enable_ltdl_convenience=yes
793 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
795 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
796 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
799 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
800 # the libltdl installable library and INCLTDL to the include flags for
801 # the libltdl header and adds --enable-ltdl-install to the configure
802 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
803 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
804 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
805 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
806 # with '${top_srcdir}/' (note the single quotes!). If your package is
807 # not flat and you're not using automake, define top_builddir and
808 # top_srcdir appropriately in the Makefiles.
809 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
810 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
811 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
812 AC_CHECK_LIB(ltdl, main,
813 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
814 [if test x"$enable_ltdl_install" = xno; then
815 AC_MSG_WARN([libltdl not installed, but installation disabled])
817 enable_ltdl_install=yes
820 if test x"$enable_ltdl_install" = x"yes"; then
821 ac_configure_args="$ac_configure_args --enable-ltdl-install"
822 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
823 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
825 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
831 # If this macro is not defined by Autoconf, define it here.
832 ifdef([AC_PROVIDE_IFELSE],
834 [define([AC_PROVIDE_IFELSE],
835 [ifdef([AC_PROVIDE_$1],
838 # AC_LIBTOOL_CXX - enable support for C++ libraries
839 AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
841 AC_DEFUN([_AC_LIBTOOL_CXX],
842 [AC_REQUIRE([AC_PROG_CXX])
843 AC_REQUIRE([AC_PROG_CXXCPP])
844 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
846 lt_save_CFLAGS="$CFLAGS"
847 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
848 dnl is set to the C++ compiler.
849 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
850 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
851 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
852 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
853 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
854 deplibs_check_method="$deplibs_check_method" \
855 file_magic_cmd="$file_magic_cmd" \
856 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
857 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
858 || AC_MSG_ERROR([libtool tag configuration failed])
860 CFLAGS="$lt_save_CFLAGS"
862 # Redirect the config.log output again, so that the ltconfig log is not
863 # clobbered by the next message.
867 # AC_LIBTOOL_GCJ - enable support for GCJ libraries
868 AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
870 AC_DEFUN([_AC_LIBTOOL_GCJ],
871 [AC_REQUIRE([AC_PROG_LIBTOOL])
872 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
873 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
874 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
875 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
876 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
877 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
878 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
880 lt_save_CFLAGS="$CFLAGS"
881 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
882 dnl is set to the C++ compiler.
883 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
884 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
885 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
886 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
887 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
888 deplibs_check_method="$deplibs_check_method" \
889 file_magic_cmd="$file_magic_cmd" \
890 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
891 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
892 || AC_MSG_ERROR([libtool tag configuration failed])
894 CFLAGS="$lt_save_CFLAGS"
896 # Redirect the config.log output again, so that the ltconfig log is not
897 # clobbered by the next message.
902 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
903 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
904 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
905 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
906 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
907 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
908 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
910 dnl This is just to silence aclocal about the macro not being used
911 ifelse([AC_DISABLE_FAST_INSTALL])dnl
913 AC_DEFUN([LT_AC_PROG_GCJ],
914 [AC_CHECK_TOOL(GCJ, gcj, no)
915 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
919 # Do all the work for Automake. This macro actually does too much --
920 # some checks are only needed if your package does certain things.
921 # But this isn't really a big deal.
926 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
928 AC_DEFUN(AM_INIT_AUTOMAKE,
929 [AC_REQUIRE([AC_PROG_INSTALL])
934 dnl test to see if srcdir already configured
935 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
936 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
939 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
940 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
941 AC_REQUIRE([AM_SANITY_CHECK])
942 AC_REQUIRE([AC_ARG_PROGRAM])
943 dnl FIXME This is truly gross.
944 missing_dir=`cd $ac_aux_dir && pwd`
945 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
946 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
947 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
948 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
949 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
950 AC_REQUIRE([AC_PROG_MAKE_SET])])
953 # Check to make sure that the build environment is sane.
956 AC_DEFUN(AM_SANITY_CHECK,
957 [AC_MSG_CHECKING([whether build environment is sane])
960 echo timestamp > conftestfile
961 # Do `set' in a subshell so we don't clobber the current shell's
962 # arguments. Must try -L first in case configure is actually a
963 # symlink; some systems play weird games with the mod time of symlinks
964 # (eg FreeBSD returns the mod time of the symlink's containing
967 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
968 if test "[$]*" = "X"; then
970 set X `ls -t $srcdir/configure conftestfile`
972 if test "[$]*" != "X $srcdir/configure conftestfile" \
973 && test "[$]*" != "X conftestfile $srcdir/configure"; then
975 # If neither matched, then we have a broken ls. This can happen
976 # if, for instance, CONFIG_SHELL is bash and it inherits a
977 # broken ls alias from the environment. This has actually
978 # happened. Such a system could not be considered "sane".
979 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
980 alias in your environment])
983 test "[$]2" = conftestfile
989 AC_MSG_ERROR([newly created file is older than distributed files!
990 Check your system clock])
995 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
996 dnl The program must properly implement --version.
997 AC_DEFUN(AM_MISSING_PROG,
998 [AC_MSG_CHECKING(for working $2)
999 # Run test in a subshell; some versions of sh will print an error if
1000 # an executable is not found, even if stderr is redirected.
1001 # Redirect stdin to placate older versions of autoconf. Sigh.
1002 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1004 AC_MSG_RESULT(found)
1007 AC_MSG_RESULT(missing)
1011 # Add --enable-maintainer-mode option to configure.
1016 AC_DEFUN(AM_MAINTAINER_MODE,
1017 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1018 dnl maintainer-mode is disabled by default
1019 AC_ARG_ENABLE(maintainer-mode,
1020 [ --enable-maintainer-mode enable make rules and dependencies not useful
1021 (and sometimes confusing) to the casual installer],
1022 USE_MAINTAINER_MODE=$enableval,
1023 USE_MAINTAINER_MODE=no)
1024 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1025 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1026 MAINT=$MAINTAINER_MODE_TRUE
1031 # Define a conditional.
1033 AC_DEFUN(AM_CONDITIONAL,
1044 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1046 AC_DEFUN(AM_CONFIG_HEADER,
1048 AC_CONFIG_HEADER([$1])
1049 dnl When config.status generates a header, we must update the stamp-h file.
1050 dnl This file resides in the same directory as the config header
1051 dnl that is generated. We must strip everything past the first ":",
1052 dnl and everything past the last "/".
1053 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1054 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1055 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1057 for am_file in <<$1>>; do
1058 case " <<$>>CONFIG_HEADERS " in
1059 *" <<$>>am_file "*<<)>>
1060 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1063 am_indx=`expr "<<$>>am_indx" + 1`