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 45 AC_PROG_LIBTOOL
15 AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])
16 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
17 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
18 AC_PROVIDE_IFELSE([AC_PROG_CXX],
20 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
23 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
24 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
25 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
26 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
28 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
31 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
33 ifdef([A][M_PROG_GCJ],
34 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
37 AC_DEFUN(_AC_PROG_LIBTOOL,
38 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
39 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
40 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
42 # Save cache, so that ltconfig can load it
45 # Actually configure libtool. ac_aux_dir is where install-sh is found.
46 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
47 MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
48 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
49 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
50 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
51 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
52 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
53 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
54 || AC_MSG_ERROR([libtool configure failed])
56 # Reload cache, that may have been modified by ltconfig
59 # This can be used to rebuild libtool when needed
60 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
62 # Always use our own libtool.
63 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
66 # Redirect the config.log output again, so that the ltconfig log is not
67 # clobbered by the next message.
71 AC_DEFUN(AC_LIBTOOL_SETUP,
73 AC_REQUIRE([AC_ENABLE_SHARED])dnl
74 AC_REQUIRE([AC_ENABLE_STATIC])dnl
75 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
76 AC_REQUIRE([AC_CANONICAL_HOST])dnl
77 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
78 AC_REQUIRE([AC_PROG_CC])dnl
79 AC_REQUIRE([AC_PROG_LD])dnl
80 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
81 AC_REQUIRE([AC_PROG_NM])dnl
82 AC_REQUIRE([AC_PROG_LN_S])dnl
83 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
84 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
85 AC_REQUIRE([AC_OBJEXT])dnl
86 AC_REQUIRE([AC_EXEEXT])dnl
89 # Only perform the check for file, if the check method requires it
90 case "$deplibs_check_method" in
92 if test "$file_magic_cmd" = '${MAGIC}'; then
98 AC_CHECK_TOOL(RANLIB, ranlib, :)
99 AC_CHECK_TOOL(STRIP, strip, :)
101 # Check for any special flags to pass to ltconfig.
102 libtool_flags="--cache-file=$cache_file"
103 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
104 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
105 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
106 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
107 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
108 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
109 [libtool_flags="$libtool_flags --enable-dlopen"])
110 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
111 [libtool_flags="$libtool_flags --enable-win32-dll"])
112 AC_ARG_ENABLE(libtool-lock,
113 [ --disable-libtool-lock avoid locking (might break parallel builds)])
114 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
115 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
118 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
119 pic_mode="$withval", pic_mode=default)
120 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
121 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
123 # Some flags need to be propagated to the compiler or linker for good
127 # Find out which ABI we are using.
128 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
129 if AC_TRY_EVAL(ac_compile); then
130 case "`/usr/bin/file conftest.o`" in
146 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
147 SAVE_CFLAGS="$CFLAGS"
148 CFLAGS="$CFLAGS -belf"
149 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
152 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
154 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
155 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
156 CFLAGS="$SAVE_CFLAGS"
160 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
161 [*-*-cygwin* | *-*-mingw*)
162 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
163 AC_CHECK_TOOL(AS, as, false)
164 AC_CHECK_TOOL(OBJDUMP, objdump, false)
166 # recent cygwin and mingw systems supply a stub DllMain which the user
167 # can override, but on older systems we have to supply one
168 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
170 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
172 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
175 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
176 # old mingw systems require "-dll" to link a DLL, while more recent ones
178 SAVE_CFLAGS="$CFLAGS"
179 CFLAGS="$CFLAGS -mdll"
180 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
181 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
182 CFLAGS="$SAVE_CFLAGS" ;;
184 # cygwin systems need to pass --dll to the linker, and not link
185 # crt.o which will require a WinMain@16 definition.
186 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
193 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
194 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
196 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
197 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
199 # AC_ENABLE_SHARED - implement the --enable-shared flag
200 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
201 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
203 AC_DEFUN(AC_ENABLE_SHARED, [dnl
204 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
205 AC_ARG_ENABLE(shared,
206 changequote(<<, >>)dnl
207 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
209 [p=${PACKAGE-default}
211 yes) enable_shared=yes ;;
212 no) enable_shared=no ;;
215 # Look at the argument we got. We use all the common list separators.
216 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
217 for pkg in $enableval; do
218 if test "X$pkg" = "X$p"; then
225 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
228 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
229 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
230 AC_ENABLE_SHARED(no)])
232 # AC_ENABLE_STATIC - implement the --enable-static flag
233 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
234 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
236 AC_DEFUN(AC_ENABLE_STATIC, [dnl
237 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
238 AC_ARG_ENABLE(static,
239 changequote(<<, >>)dnl
240 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
242 [p=${PACKAGE-default}
244 yes) enable_static=yes ;;
245 no) enable_static=no ;;
248 # Look at the argument we got. We use all the common list separators.
249 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
250 for pkg in $enableval; do
251 if test "X$pkg" = "X$p"; then
258 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
261 # AC_DISABLE_STATIC - set the default static flag to --disable-static
262 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
263 AC_ENABLE_STATIC(no)])
266 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
267 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
268 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
270 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
271 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
272 AC_ARG_ENABLE(fast-install,
273 changequote(<<, >>)dnl
274 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
276 [p=${PACKAGE-default}
278 yes) enable_fast_install=yes ;;
279 no) enable_fast_install=no ;;
281 enable_fast_install=no
282 # Look at the argument we got. We use all the common list separators.
283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
284 for pkg in $enableval; do
285 if test "X$pkg" = "X$p"; then
286 enable_fast_install=yes
292 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
295 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
296 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
297 AC_ENABLE_FAST_INSTALL(no)])
299 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
300 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
301 # Where MODE is either `yes' or `no'. If omitted, it defaults to
303 AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
304 pic_mode=ifelse($#,1,$1,default)])
307 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
308 AC_DEFUN(AC_PATH_TOOL_PREFIX,
309 [AC_MSG_CHECKING([for $1])
310 AC_CACHE_VAL(lt_cv_path_MAGIC,
313 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
316 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
319 ac_save_MAGIC="$MAGIC"
320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
321 dnl $ac_dummy forces splitting on constant user-supplied paths.
322 dnl POSIX.2 word splitting is done only on the output of word expansions,
323 dnl not every word. This closes a longstanding sh security hole.
324 ac_dummy="ifelse([$2], , $PATH, [$2])"
325 for ac_dir in $ac_dummy; do
326 test -z "$ac_dir" && ac_dir=.
327 if test -f $ac_dir/$1; then
328 lt_cv_path_MAGIC="$ac_dir/$1"
329 if test -n "$file_magic_test_file"; then
330 case "$deplibs_check_method" in
332 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
333 MAGIC="$lt_cv_path_MAGIC"
334 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
335 egrep "$file_magic_regex" > /dev/null; then
340 *** Warning: the command libtool uses to detect shared libraries,
341 *** $file_magic_cmd, produces output that libtool cannot recognize.
342 *** The result is that libtool may fail to recognize shared libraries
343 *** as such. This will affect the creation of libtool libraries that
344 *** depend on shared libraries, but programs linked with such libtool
345 *** libraries will work regardless of this problem. Nevertheless, you
346 *** may want to report the problem to your system manager and/or to
347 *** bug-libtool@gnu.org
357 MAGIC="$ac_save_MAGIC"
360 MAGIC="$lt_cv_path_MAGIC"
361 if test -n "$MAGIC"; then
362 AC_MSG_RESULT($MAGIC)
369 # AC_PATH_MAGIC - find a file program which can recognise a shared library
370 AC_DEFUN(AC_PATH_MAGIC,
371 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
372 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
373 if test -z "$lt_cv_path_MAGIC"; then
374 if test -n "$ac_tool_prefix"; then
375 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
383 # AC_PROG_LD - find the path to the GNU or non-GNU linker
386 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
387 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
388 AC_REQUIRE([AC_PROG_CC])dnl
389 AC_REQUIRE([AC_CANONICAL_HOST])dnl
390 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
392 if test "$ac_cv_prog_gcc" = yes; then
393 # Check if gcc -print-prog-name=ld gives a path.
394 AC_MSG_CHECKING([for ld used by GCC])
397 # gcc leaves a trailing carriage return which upsets mingw
398 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
400 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
403 # Accept absolute paths.
405 [\\/]* | [A-Za-z]:[\\/]*)
406 re_direlt='/[^/][^/]*/\.\./'
408 # Canonicalize the path of ld
409 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
410 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
411 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
413 test -z "$LD" && LD="$ac_prog"
416 # If it fails, then pretend we aren't using GCC.
420 # If it is relative, then search for the first ld in PATH.
424 elif test "$with_gnu_ld" = yes; then
425 AC_MSG_CHECKING([for GNU ld])
427 AC_MSG_CHECKING([for non-GNU ld])
429 AC_CACHE_VAL(ac_cv_path_LD,
430 [if test -z "$LD"; then
431 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
432 for ac_dir in $PATH; do
433 test -z "$ac_dir" && ac_dir=.
434 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
435 ac_cv_path_LD="$ac_dir/$ac_prog"
436 # Check to see if the program is GNU ld. I'd rather use --version,
437 # but apparently some GNU ld's only accept -v.
438 # Break only if it was the GNU/non-GNU ld that we prefer.
439 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
440 test "$with_gnu_ld" != no && break
442 test "$with_gnu_ld" != yes && break
448 ac_cv_path_LD="$LD" # Let the user override the test with a path.
451 if test -n "$LD"; then
456 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
460 AC_DEFUN(AC_PROG_LD_GNU,
461 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
462 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
463 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
464 ac_cv_prog_gnu_ld=yes
468 with_gnu_ld=$ac_cv_prog_gnu_ld
471 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
472 # -- PORTME Some linkers may need a different reload flag.
473 AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
474 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
475 [lt_cv_ld_reload_flag='-r'])
476 reload_flag=$lt_cv_ld_reload_flag
477 test -n "$reload_flag" && reload_flag=" $reload_flag"
480 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
481 # -- PORTME fill in with the dynamic library characteristics
482 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
483 [AC_CACHE_CHECK([how to recognise dependant libraries],
484 lt_cv_deplibs_check_method,
485 [lt_cv_file_magic_cmd='${MAGIC}'
486 lt_cv_file_magic_test_file=
487 lt_cv_deplibs_check_method='unknown'
488 # Need to set the preceding variable on all platforms that support
489 # interlibrary dependencies.
490 # 'none' -- dependencies not supported.
491 # `unknown' -- same as none, but documents that we really don't know.
492 # 'pass_all' -- all dependencies passed with no checks.
493 # 'test_compile' -- check by making test program.
494 # 'file_magic [regex]' -- check by looking for files in library path
495 # which responds to the $file_magic_cmd with a given egrep regex.
496 # If you have `file' or equivalent on your system and you're not sure
497 # whether `pass_all' will *always* work, you probably want this one.
501 lt_cv_deplibs_check_method=pass_all
505 lt_cv_deplibs_check_method=pass_all
510 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
512 lt_cv_file_magic_cmd='/usr/bin/file -L'
513 lt_cv_file_magic_test_file=/shlib/libc.so
517 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
518 lt_cv_file_magic_cmd='${OBJDUMP} -f'
522 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
525 # Not sure whether the presence of OpenBSD here was a mistake.
526 # Let's accept both of them until this is cleared up.
528 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
530 lt_cv_file_magic_cmd=/usr/bin/file
531 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
535 lt_cv_deplibs_check_method=pass_all
540 lt_cv_deplibs_check_method=pass_all
544 # TODO: Does this work for hpux-11 too?
545 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
546 lt_cv_file_magic_cmd=/usr/bin/file
547 lt_cv_file_magic_test_file=/usr/lib/libc.sl
553 # this will be overridden with pass_all, but let us keep it just in case
554 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
558 *-32|*"-32 ") libmagic=32-bit;;
559 *-n32|*"-n32 ") libmagic=N32;;
560 *-64|*"-64 ") libmagic=64-bit;;
561 *) libmagic=never-match;;
563 # this will be overridden with pass_all, but let us keep it just in case
565 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
569 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
570 lt_cv_deplibs_check_method=pass_all
573 # This must be Linux ELF.
576 alpha* | i*86 | powerpc* | sparc* | ia64* )
577 lt_cv_deplibs_check_method=pass_all ;;
579 # glibc up to 2.1.1 does not perform some relocations on ARM
581 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
584 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
588 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
591 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
593 lt_cv_file_magic_cmd='/usr/bin/file -L'
594 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
598 osf3* | osf4* | osf5*)
599 # this will be overridden with pass_all, but let us keep it just in case
600 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
601 lt_cv_file_magic_test_file=/shlib/libc.so
602 lt_cv_deplibs_check_method=pass_all
606 lt_cv_deplibs_check_method=pass_all
610 lt_cv_deplibs_check_method=pass_all
611 lt_cv_file_magic_test_file=/lib/libc.so
614 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
615 case "$host_vendor" in
617 lt_cv_deplibs_check_method=pass_all
621 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]'
623 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
629 file_magic_cmd=$lt_cv_file_magic_cmd
630 deplibs_check_method=$lt_cv_deplibs_check_method
634 # AC_PROG_NM - find the path to a BSD-compatible name lister
636 [AC_MSG_CHECKING([for BSD-compatible nm])
637 AC_CACHE_VAL(ac_cv_path_NM,
638 [if test -n "$NM"; then
639 # Let the user override the test.
642 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
643 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
644 test -z "$ac_dir" && ac_dir=.
645 tmp_nm=$ac_dir/${ac_tool_prefix}nm
646 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
647 # Check to see if the nm accepts a BSD-compat flag.
648 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
649 # nm: unknown option "B" ignored
650 # Tru64's nm complains that /dev/null is an invalid object file
651 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
652 ac_cv_path_NM="$tmp_nm -B"
654 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
655 ac_cv_path_NM="$tmp_nm -p"
658 ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
659 continue # so that we can try to find one that supports BSD flags
664 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
670 # AC_CHECK_LIBM - check for math library
671 AC_DEFUN(AC_CHECK_LIBM,
672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
675 *-*-beos* | *-*-cygwin*)
676 # These system don't have libm
679 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
680 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
683 AC_CHECK_LIB(m, main, LIBM="-lm")
688 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
689 # the libltdl convenience library and INCLTDL to the include flags for
690 # the libltdl header and adds --enable-ltdl-convenience to the
691 # configure arguments. Note that LIBLTDL and INCLTDL are not
692 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
693 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
694 # with '${top_builddir}/' and INCLTDL will be prefixed with
695 # '${top_srcdir}/' (note the single quotes!). If your package is not
696 # flat and you're not using automake, define top_builddir and
697 # top_srcdir appropriately in the Makefiles.
698 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
699 case "$enable_ltdl_convenience" in
700 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
701 "") enable_ltdl_convenience=yes
702 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
704 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
705 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
708 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
709 # the libltdl installable library and INCLTDL to the include flags for
710 # the libltdl header and adds --enable-ltdl-install to the configure
711 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
712 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
713 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
714 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
715 # with '${top_srcdir}/' (note the single quotes!). If your package is
716 # not flat and you're not using automake, define top_builddir and
717 # top_srcdir appropriately in the Makefiles.
718 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
719 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
720 AC_CHECK_LIB(ltdl, main,
721 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
722 [if test x"$enable_ltdl_install" = xno; then
723 AC_MSG_WARN([libltdl not installed, but installation disabled])
725 enable_ltdl_install=yes
728 if test x"$enable_ltdl_install" = x"yes"; then
729 ac_configure_args="$ac_configure_args --enable-ltdl-install"
730 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
731 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
733 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
739 # If this macro is not defined by Autoconf, define it here.
740 ifdef([AC_PROVIDE_IFELSE],
742 [define([AC_PROVIDE_IFELSE],
743 [ifdef([AC_PROVIDE_$1],
746 # AC_LIBTOOL_CXX - enable support for C++ libraries
747 AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])
748 AC_DEFUN(_AC_LIBTOOL_CXX,
749 [AC_REQUIRE([AC_PROG_LIBTOOL])
750 AC_REQUIRE([AC_PROG_CXX])
751 AC_REQUIRE([AC_PROG_CXXCPP])
752 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
754 lt_save_CFLAGS="$CFLAGS"
755 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
756 dnl is set to the C++ compiler.
757 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
758 MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
759 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
760 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
761 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
762 deplibs_check_method="$deplibs_check_method" \
763 file_magic_cmd="$file_magic_cmd" \
764 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
765 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
766 || AC_MSG_ERROR([libtool tag configuration failed])
768 CFLAGS="$lt_save_CFLAGS"
770 # Redirect the config.log output again, so that the ltconfig log is not
771 # clobbered by the next message.
775 # AC_LIBTOOL_GCJ - enable support for GCJ libraries
776 AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
777 AC_DEFUN(_AC_LIBTOOL_GCJ,
778 [AC_REQUIRE([AC_PROG_LIBTOOL])
779 AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
780 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
781 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
782 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
783 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])
784 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
786 lt_save_CFLAGS="$CFLAGS"
787 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
788 dnl is set to the C++ compiler.
789 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \
790 MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
791 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
792 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
793 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
794 deplibs_check_method="$deplibs_check_method" \
795 file_magic_cmd="$file_magic_cmd" \
796 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
797 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
798 || AC_MSG_ERROR([libtool tag configuration failed])
800 CFLAGS="$lt_save_CFLAGS"
802 # Redirect the config.log output again, so that the ltconfig log is not
803 # clobbered by the next message.
808 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
809 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
810 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
811 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
812 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
813 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
814 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
816 dnl This is just to silence aclocal about the macro not being used
817 ifelse([AC_DISABLE_FAST_INSTALL])dnl
819 AC_DEFUN([LT_AC_PROG_GCJ],[
820 AC_CHECK_TOOL(GCJ, gcj, no)
821 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
825 # serial 1 AC_LIB_LTDL
827 AC_DEFUN(AC_LIB_LTDL,
829 AC_REQUIRE([AC_PROG_CC])dnl
830 AC_REQUIRE([AC_C_CONST])dnl
831 AC_REQUIRE([AC_C_INLINE])dnl
833 dnl AC_LIB_LTDL must perform all the checks necessary for compilation
834 dnl of the ltdl objects -- including compiler checks (above) and header
836 AC_REQUIRE([AC_HEADER_STDC])dnl
838 AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h)
839 AC_CHECK_HEADERS(string.h strings.h, break)
840 AC_CHECK_FUNCS(strchr index, break)
841 AC_CHECK_FUNCS(strrchr rindex, break)
842 AC_CHECK_FUNCS(strcmp)
844 AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl
845 AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl
846 AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl
847 AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl
848 AC_REQUIRE([AC_LTDL_OBJDIR])dnl
849 AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl
850 AC_REQUIRE([AC_LTDL_DLLIB])dnl
851 AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
854 AC_DEFUN(AC_LTDL_ENABLE_INSTALL,
855 [AC_ARG_ENABLE(ltdl-install,
856 [ --enable-ltdl-install install libltdl])
858 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
859 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
863 AC_DEFUN(AC_LTDL_SNARF_CONFIG,
864 [# Read the libtool configuration
866 ./libtool --config > conftest
871 AC_DEFUN(AC_LTDL_SHLIBEXT,
872 [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
873 AC_CACHE_CHECK([which extension is used for shared libraries],
874 libltdl_cv_shlibext, [dnl
877 for spec in $library_names_spec; do
881 echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
884 libltdl_cv_shlibext=`cat conftest`
887 if test -n "$libltdl_cv_shlibext"; then
888 AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
889 [Define to the extension used for shared libraries, say, ".so". ])
893 AC_DEFUN(AC_LTDL_SHLIBPATH,
894 [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
895 AC_CACHE_CHECK([which variable specifies run-time library path],
896 libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
897 if test -n "$libltdl_cv_shlibpath_var"; then
898 AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
899 [Define to the name of the environment variable that determines the dynamic library search path. ])
903 AC_DEFUN(AC_LTDL_SYSSEARCHPATH,
904 [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
905 AC_CACHE_CHECK([for the default library search path],
906 libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
907 if test -n "$libltdl_cv_sys_search_path"; then
909 *-*-mingw*) pathsep=";" ;;
913 for dir in $libltdl_cv_sys_search_path; do
914 if test -z "$sys_search_path"; then
915 sys_search_path="$dir"
917 sys_search_path="$sys_search_path$pathsep$dir"
920 AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
921 [Define to the system default library search path. ])
925 AC_DEFUN(AC_LTDL_OBJDIR,
926 [AC_CACHE_CHECK([for objdir],
927 libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
928 if test -n "$objdir"; then
931 rm -f .libs 2>/dev/null
932 mkdir .libs 2>/dev/null
933 if test -d .libs; then
934 libltdl_cv_objdir=.libs
936 # MS-DOS does not allow filenames that begin with a dot.
937 libltdl_cv_objdir=_libs
939 rmdir .libs 2>/dev/null
941 AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
942 [Define to the sub-directory in which libtool stores uninstalled libraries. ])
945 AC_DEFUN(AC_LTDL_DLPREOPEN,
946 [AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl
947 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
948 libltdl_cv_preloaded_symbols, [dnl
949 if test -n "$global_symbol_pipe"; then
950 libltdl_cv_preloaded_symbols=yes
952 libltdl_cv_preloaded_symbols=no
955 if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
956 AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
957 [Define if libtool can extract symbol lists from object files. ])
961 AC_DEFUN(AC_LTDL_DLLIB,
963 AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
964 [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"],
965 [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
966 [Define if you have the libdl library or equivalent.])],
967 [AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
968 [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"]
970 AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
971 [Define if you have the shl_load function.])],
972 [AC_CHECK_LIB(dld, shl_load,
973 [AC_DEFINE(HAVE_SHL_LOAD, 1,
974 [Define if you have the shl_load function.])
975 LIBADD_DL="$LIBADD_DL -ldld"])
977 AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1,
978 [Define if you have the GNU dld library.])dnl
979 test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
982 if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
984 LIBS="$LIBS $LIBADD_DL"
985 AC_CHECK_FUNCS(dlerror)
990 AC_DEFUN(AC_LTDL_GLOBAL_SYMBOL_PIPE,
991 [dnl Check for command to grab the raw symbol name followed
992 dnl by C symbol name from nm.
993 AC_REQUIRE([AC_CANONICAL_HOST])dnl
994 AC_REQUIRE([AC_PROG_NM])dnl
995 # Check for command to grab the raw symbol name followed by C symbol from nm.
996 AC_MSG_CHECKING([command to parse $NM output])
997 AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
998 [# These are sane defaults that work on at least a few old systems.
999 # {They come from Ultrix. What could be older than Ultrix?!! ;)}
1002 # Character class describing NM global symbol codes.
1003 ac_symcode='[BCDEGRST]'
1005 # Regexp to match symbols that can be accessed directly from C.
1006 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1008 # Transform the above into a raw symbol and a C symbol.
1009 ac_symxfrm='\1 \2\3 \3'
1011 # Transform an extracted symbol line into a proper C declaration
1012 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1014 # Define system-specific variables.
1020 ac_symcode='[ABCDGISTW]'
1023 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1026 ac_symcode='[BCDEGRST]'
1033 # If we're using GNU nm, then use its standard symbol codes.
1034 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1035 ac_symcode='[ABCDGISTW]'
1039 # Try without a prefix undercore, then with it.
1040 for ac_symprfx in "" "_"; do
1042 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
1044 # Check to see that the pipe works correctly.
1046 rm -f conftest.$ac_ext
1047 cat > conftest.$ac_ext <<EOF
1052 void nm_test_func(){}
1056 int main(){nm_test_var='a';nm_test_func;return 0;}
1059 if AC_TRY_EVAL(ac_compile); then
1060 # Now try to grab the symbols.
1061 ac_nlist=conftest.nm
1063 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
1065 # Try sorting and uniquifying the output.
1066 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
1067 mv -f "$ac_nlist"T "$ac_nlist"
1072 # Make sure that we snagged all the symbols we need.
1073 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
1074 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
1075 cat <<EOF > conftest.c
1081 # Now generate the symbol file.
1082 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
1084 cat <<EOF >> conftest.c
1085 #if defined (__STDC__) && __STDC__
1086 # define lt_ptr_t void *
1088 # define lt_ptr_t char *
1092 /* The mapping between symbol names and symbols. */
1098 lt_preloaded_symbols[] =
1102 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1103 cat <<\EOF >> conftest.c
1111 # Now try linking the two files.
1112 mv conftest.$ac_objext conftstm.$ac_objext
1113 ac_save_LIBS="$LIBS"
1114 ac_save_CFLAGS="$CFLAGS"
1115 LIBS="conftstm.$ac_objext"
1116 CFLAGS="$CFLAGS$no_builtin_flag"
1117 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1120 echo "configure: failed program was:" >&AC_FD_CC
1121 cat conftest.c >&AC_FD_CC
1123 LIBS="$ac_save_LIBS"
1124 CFLAGS="$ac_save_CFLAGS"
1126 echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
1129 echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
1132 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
1135 echo "$progname: failed program was:" >&AC_FD_CC
1136 cat conftest.c >&AC_FD_CC
1138 rm -rf conftest* conftst*
1140 # Do not use the global_symbol_pipe unless it works.
1141 if test "$ac_pipe_works" = yes; then
1142 if test x"$ac_symprfx" = x"_"; then
1143 ac_cv_sys_symbol_underscore=yes
1145 ac_cv_sys_symbol_underscore=no
1149 ac_cv_sys_global_symbol_pipe=
1155 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1158 AC_MSG_RESULT($ac_result)
1161 AC_DEFUN(AC_LTDL_SYMBOL_USCORE,
1162 [dnl does the compiler prefix global symbols with an underscore?
1163 AC_REQUIRE([AC_LTDL_GLOBAL_SYMBOL_PIPE])dnl
1164 AC_MSG_CHECKING([for _ prefix in compiled symbols])
1165 AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
1166 [ac_cv_sys_symbol_underscore=no
1167 cat > conftest.$ac_ext <<EOF
1168 void nm_test_func(){}
1169 int main(){nm_test_func;return 0;}
1171 if AC_TRY_EVAL(ac_compile); then
1172 # Now try to grab the symbols.
1173 ac_nlist=conftest.nm
1174 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
1175 # See whether the symbols have a leading underscore.
1176 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1177 ac_cv_sys_symbol_underscore=yes
1179 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1182 echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
1186 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
1189 echo "configure: failed program was:" >&AC_FD_CC
1190 cat conftest.c >&AC_FD_CC
1194 AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
1195 AC_LTDL_DLSYM_USCORE
1198 AC_DEFUN(AC_LTDL_DLSYM_USCORE,
1199 [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
1200 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
1201 if test x"$ac_cv_func_dlopen" = xyes ||
1202 test x"$ac_cv_lib_dl_dlopen" = xyes ; then
1203 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
1204 libltdl_cv_need_uscore, [dnl
1213 # define LTDL_GLOBAL RTLD_GLOBAL
1216 # define LTDL_GLOBAL DL_GLOBAL
1218 # define LTDL_GLOBAL 0
1222 /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
1223 find out it does not work in some platform. */
1224 #ifndef LTDL_LAZY_OR_NOW
1226 # define LTDL_LAZY_OR_NOW RTLD_LAZY
1229 # define LTDL_LAZY_OR_NOW DL_LAZY
1232 # define LTDL_LAZY_OR_NOW RTLD_NOW
1235 # define LTDL_LAZY_OR_NOW DL_NOW
1237 # define LTDL_LAZY_OR_NOW 0
1244 fnord() { int i=42;}
1245 main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
1246 if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
1247 if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); }
1248 ], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
1249 libltdl_cv_need_uscore=cross
1254 if test x"$libltdl_cv_need_uscore" = xyes; then
1255 AC_DEFINE(NEED_USCORE, 1,
1256 [Define if dlsym() requires a leading underscode in symbol names. ])
1260 # Define a conditional.
1262 AC_DEFUN(AM_CONDITIONAL,
1273 # Do all the work for Automake. This macro actually does too much --
1274 # some checks are only needed if your package does certain things.
1275 # But this isn't really a big deal.
1280 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
1282 AC_DEFUN(AM_INIT_AUTOMAKE,
1283 [AC_REQUIRE([AC_PROG_INSTALL])
1288 dnl test to see if srcdir already configured
1289 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1290 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1293 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1294 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
1295 AC_REQUIRE([AM_SANITY_CHECK])
1296 AC_REQUIRE([AC_ARG_PROGRAM])
1297 dnl FIXME This is truly gross.
1298 missing_dir=`cd $ac_aux_dir && pwd`
1299 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
1300 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
1301 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
1302 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
1303 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
1304 AC_REQUIRE([AC_PROG_MAKE_SET])])
1307 # Check to make sure that the build environment is sane.
1310 AC_DEFUN(AM_SANITY_CHECK,
1311 [AC_MSG_CHECKING([whether build environment is sane])
1314 echo timestamp > conftestfile
1315 # Do `set' in a subshell so we don't clobber the current shell's
1316 # arguments. Must try -L first in case configure is actually a
1317 # symlink; some systems play weird games with the mod time of symlinks
1318 # (eg FreeBSD returns the mod time of the symlink's containing
1321 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1322 if test "[$]*" = "X"; then
1324 set X `ls -t $srcdir/configure conftestfile`
1326 if test "[$]*" != "X $srcdir/configure conftestfile" \
1327 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1329 # If neither matched, then we have a broken ls. This can happen
1330 # if, for instance, CONFIG_SHELL is bash and it inherits a
1331 # broken ls alias from the environment. This has actually
1332 # happened. Such a system could not be considered "sane".
1333 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1334 alias in your environment])
1337 test "[$]2" = conftestfile
1343 AC_MSG_ERROR([newly created file is older than distributed files!
1344 Check your system clock])
1347 AC_MSG_RESULT(yes)])
1349 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1350 dnl The program must properly implement --version.
1351 AC_DEFUN(AM_MISSING_PROG,
1352 [AC_MSG_CHECKING(for working $2)
1353 # Run test in a subshell; some versions of sh will print an error if
1354 # an executable is not found, even if stderr is redirected.
1355 # Redirect stdin to placate older versions of autoconf. Sigh.
1356 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1358 AC_MSG_RESULT(found)
1361 AC_MSG_RESULT(missing)
1365 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1367 AC_DEFUN(AM_CONFIG_HEADER,
1369 AC_CONFIG_HEADER([$1])
1370 dnl When config.status generates a header, we must update the stamp-h file.
1371 dnl This file resides in the same directory as the config header
1372 dnl that is generated. We must strip everything past the first ":",
1373 dnl and everything past the last "/".
1374 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1375 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1376 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1378 for am_file in <<$1>>; do
1379 case " <<$>>CONFIG_HEADERS " in
1380 *" <<$>>am_file "*<<)>>
1381 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1384 am_indx=`expr "<<$>>am_indx" + 1`
1388 # Add --enable-maintainer-mode option to configure.
1393 AC_DEFUN(AM_MAINTAINER_MODE,
1394 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1395 dnl maintainer-mode is disabled by default
1396 AC_ARG_ENABLE(maintainer-mode,
1397 [ --enable-maintainer-mode enable make rules and dependencies not useful
1398 (and sometimes confusing) to the casual installer],
1399 USE_MAINTAINER_MODE=$enableval,
1400 USE_MAINTAINER_MODE=no)
1401 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1402 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1403 MAINT=$MAINTAINER_MODE_TRUE