1 dnl aclocal.m4 generated automatically by aclocal 1.4a
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.
13 # Like AC_CONFIG_HEADER, but automatically create stamp file.
15 AC_DEFUN(AM_CONFIG_HEADER,
17 AC_CONFIG_HEADER([$1])
18 dnl When config.status generates a header, we must update the stamp-h file.
19 dnl This file resides in the same directory as the config header
20 dnl that is generated. We must strip everything past the first ":",
21 dnl and everything past the last "/".
22 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
26 for am_file in <<$1>>; do
27 case " <<$>>CONFIG_HEADERS " in
28 *" <<$>>am_file "*<<)>>
29 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
32 am_indx=`expr "<<$>>am_indx" + 1`
36 # Do all the work for Automake. This macro actually does too much --
37 # some checks are only needed if your package does certain things.
38 # But this isn't really a big deal.
43 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
45 AC_DEFUN(AM_INIT_AUTOMAKE,
46 [AC_REQUIRE([AC_PROG_INSTALL])
47 dnl We require 2.13 because we rely on SHELL being computed by configure.
53 dnl test to see if srcdir already configured
54 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
55 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
58 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
59 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
60 AC_REQUIRE([AM_SANITY_CHECK])
61 AC_REQUIRE([AC_ARG_PROGRAM])
62 dnl FIXME This is truly gross.
63 missing_dir=`cd $ac_aux_dir && pwd`
64 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
65 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
66 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
67 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
68 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
69 dnl Set install_sh for make dist
70 install_sh="$missing_dir/install-sh"
71 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
73 dnl We check for tar when the user configures the end package.
74 dnl This is sad, since we only need this for "dist". However,
75 dnl there's no other good way to do it. We prefer GNU tar if
76 dnl we can find it. If we can't find a tar, it doesn't really matter.
77 AC_CHECK_PROGS(AMTAR, gnutar gtar tar)
79 if test -n "$AMTAR"; then
80 if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
86 AC_REQUIRE([AC_PROG_MAKE_SET])])
89 # Check to make sure that the build environment is sane.
92 AC_DEFUN(AM_SANITY_CHECK,
93 [AC_MSG_CHECKING([whether build environment is sane])
96 echo timestamp > conftestfile
97 # Do `set' in a subshell so we don't clobber the current shell's
98 # arguments. Must try -L first in case configure is actually a
99 # symlink; some systems play weird games with the mod time of symlinks
100 # (eg FreeBSD returns the mod time of the symlink's containing
103 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
104 if test "[$]*" = "X"; then
106 set X `ls -t $srcdir/configure conftestfile`
108 if test "[$]*" != "X $srcdir/configure conftestfile" \
109 && test "[$]*" != "X conftestfile $srcdir/configure"; then
111 # If neither matched, then we have a broken ls. This can happen
112 # if, for instance, CONFIG_SHELL is bash and it inherits a
113 # broken ls alias from the environment. This has actually
114 # happened. Such a system could not be considered "sane".
115 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
116 alias in your environment])
119 test "[$]2" = conftestfile
125 AC_MSG_ERROR([newly created file is older than distributed files!
126 Check your system clock])
131 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
132 dnl The program must properly implement --version.
133 AC_DEFUN(AM_MISSING_PROG,
134 [AC_MSG_CHECKING(for working $2)
135 # Run test in a subshell; some versions of sh will print an error if
136 # an executable is not found, even if stderr is redirected.
137 # Redirect stdin to placate older versions of autoconf. Sigh.
138 if ($2 --version) < /dev/null > /dev/null 2>&1; then
143 AC_MSG_RESULT(missing)
147 # Add --enable-maintainer-mode option to configure.
152 AC_DEFUN(AM_MAINTAINER_MODE,
153 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
154 dnl maintainer-mode is disabled by default
155 AC_ARG_ENABLE(maintainer-mode,
156 [ --enable-maintainer-mode enable make rules and dependencies not useful
157 (and sometimes confusing) to the casual installer],
158 USE_MAINTAINER_MODE=$enableval,
159 USE_MAINTAINER_MODE=no)
160 AC_MSG_RESULT($USE_MAINTAINER_MODE)
161 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
162 MAINT=$MAINTAINER_MODE_TRUE
167 # Define a conditional.
169 AC_DEFUN(AM_CONDITIONAL,
181 # serial 40 AC_PROG_LIBTOOL
182 AC_DEFUN(AC_PROG_LIBTOOL,
183 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
185 # Save cache, so that ltconfig can load it
188 # Actually configure libtool. ac_aux_dir is where install-sh is found.
189 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
190 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
191 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
192 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
193 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
194 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
195 || AC_MSG_ERROR([libtool configure failed])
197 # Reload cache, that may have been modified by ltconfig
200 # This can be used to rebuild libtool when needed
201 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
203 # Always use our own libtool.
204 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
207 # Redirect the config.log output again, so that the ltconfig log is not
208 # clobbered by the next message.
212 AC_DEFUN(AC_LIBTOOL_SETUP,
214 AC_REQUIRE([AC_ENABLE_SHARED])dnl
215 AC_REQUIRE([AC_ENABLE_STATIC])dnl
216 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
217 AC_REQUIRE([AC_CANONICAL_HOST])dnl
218 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
219 AC_REQUIRE([AC_PROG_RANLIB])dnl
220 AC_REQUIRE([AC_PROG_CC])dnl
221 AC_REQUIRE([AC_PROG_LD])dnl
222 AC_REQUIRE([AC_PROG_NM])dnl
223 AC_REQUIRE([AC_PROG_LN_S])dnl
226 # Check for any special flags to pass to ltconfig.
227 libtool_flags="--cache-file=$cache_file"
228 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
229 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
230 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
231 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
232 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
233 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
234 [libtool_flags="$libtool_flags --enable-dlopen"])
235 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
236 [libtool_flags="$libtool_flags --enable-win32-dll"])
237 AC_ARG_ENABLE(libtool-lock,
238 [ --disable-libtool-lock avoid locking (might break parallel builds)])
239 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
240 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
242 # Some flags need to be propagated to the compiler or linker for good
246 # Find out which ABI we are using.
247 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
248 if AC_TRY_EVAL(ac_compile); then
249 case "`/usr/bin/file conftest.o`" in
265 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
266 SAVE_CFLAGS="$CFLAGS"
267 CFLAGS="$CFLAGS -belf"
268 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
269 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
270 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
271 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
272 CFLAGS="$SAVE_CFLAGS"
276 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
277 [*-*-cygwin* | *-*-mingw*)
278 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
279 AC_CHECK_TOOL(AS, as, false)
280 AC_CHECK_TOOL(OBJDUMP, objdump, false)
286 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
287 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
289 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
290 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
292 # AC_ENABLE_SHARED - implement the --enable-shared flag
293 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
294 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
296 AC_DEFUN(AC_ENABLE_SHARED, [dnl
297 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
298 AC_ARG_ENABLE(shared,
299 changequote(<<, >>)dnl
300 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
302 [p=${PACKAGE-default}
304 yes) enable_shared=yes ;;
305 no) enable_shared=no ;;
308 # Look at the argument we got. We use all the common list separators.
309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
310 for pkg in $enableval; do
311 if test "X$pkg" = "X$p"; then
318 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
321 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
322 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
323 AC_ENABLE_SHARED(no)])
325 # AC_ENABLE_STATIC - implement the --enable-static flag
326 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
327 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
329 AC_DEFUN(AC_ENABLE_STATIC, [dnl
330 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
331 AC_ARG_ENABLE(static,
332 changequote(<<, >>)dnl
333 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
335 [p=${PACKAGE-default}
337 yes) enable_static=yes ;;
338 no) enable_static=no ;;
341 # Look at the argument we got. We use all the common list separators.
342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
343 for pkg in $enableval; do
344 if test "X$pkg" = "X$p"; then
351 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
354 # AC_DISABLE_STATIC - set the default static flag to --disable-static
355 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
356 AC_ENABLE_STATIC(no)])
359 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
360 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
361 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
363 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
364 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
365 AC_ARG_ENABLE(fast-install,
366 changequote(<<, >>)dnl
367 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
369 [p=${PACKAGE-default}
371 yes) enable_fast_install=yes ;;
372 no) enable_fast_install=no ;;
374 enable_fast_install=no
375 # Look at the argument we got. We use all the common list separators.
376 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
377 for pkg in $enableval; do
378 if test "X$pkg" = "X$p"; then
379 enable_fast_install=yes
385 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
388 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
389 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
390 AC_ENABLE_FAST_INSTALL(no)])
392 # AC_PROG_LD - find the path to the GNU or non-GNU linker
395 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
396 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
397 AC_REQUIRE([AC_PROG_CC])dnl
398 AC_REQUIRE([AC_CANONICAL_HOST])dnl
399 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
401 if test "$ac_cv_prog_gcc" = yes; then
402 # Check if gcc -print-prog-name=ld gives a path.
403 AC_MSG_CHECKING([for ld used by GCC])
404 ac_prog=`($CC -print-prog-name=ld) 2>&5`
406 # Accept absolute paths.
408 [\\/]* | [A-Za-z]:[\\/]*)
409 re_direlt='/[^/][^/]*/\.\./'
411 # Canonicalize the path of ld
412 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
413 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
414 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
416 test -z "$LD" && LD="$ac_prog"
419 # If it fails, then pretend we aren't using GCC.
423 # If it is relative, then search for the first ld in PATH.
427 elif test "$with_gnu_ld" = yes; then
428 AC_MSG_CHECKING([for GNU ld])
430 AC_MSG_CHECKING([for non-GNU ld])
432 AC_CACHE_VAL(ac_cv_path_LD,
433 [if test -z "$LD"; then
434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
435 for ac_dir in $PATH; do
436 test -z "$ac_dir" && ac_dir=.
437 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
438 ac_cv_path_LD="$ac_dir/$ac_prog"
439 # Check to see if the program is GNU ld. I'd rather use --version,
440 # but apparently some GNU ld's only accept -v.
441 # Break only if it was the GNU/non-GNU ld that we prefer.
442 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
443 test "$with_gnu_ld" != no && break
445 test "$with_gnu_ld" != yes && break
451 ac_cv_path_LD="$LD" # Let the user override the test with a path.
454 if test -n "$LD"; then
459 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
464 AC_DEFUN(AC_PROG_LD_GNU,
465 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
466 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
467 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
468 ac_cv_prog_gnu_ld=yes
474 # AC_PROG_NM - find the path to a BSD-compatible name lister
476 [AC_MSG_CHECKING([for BSD-compatible nm])
477 AC_CACHE_VAL(ac_cv_path_NM,
478 [if test -n "$NM"; then
479 # Let the user override the test.
482 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
483 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
484 test -z "$ac_dir" && ac_dir=.
485 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
486 # Check to see if the nm accepts a BSD-compat flag.
487 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
488 # nm: unknown option "B" ignored
489 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
490 ac_cv_path_NM="$ac_dir/nm -B"
492 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
493 ac_cv_path_NM="$ac_dir/nm -p"
496 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
497 continue # so that we can try to find one that supports BSD flags
502 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
509 # AC_CHECK_LIBM - check for math library
510 AC_DEFUN(AC_CHECK_LIBM,
511 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
514 *-*-beos* | *-*-cygwin*)
515 # These system don't have libm
518 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
519 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
522 AC_CHECK_LIB(m, main, LIBM="-lm")
527 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
528 # the libltdl convenience library, adds --enable-ltdl-convenience to
529 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
530 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
531 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
532 # '${top_builddir}/' (note the single quotes!) if your package is not
533 # flat, and, if you're not using automake, define top_builddir as
534 # appropriate in the Makefiles.
535 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
536 case "$enable_ltdl_convenience" in
537 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
538 "") enable_ltdl_convenience=yes
539 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
541 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
542 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
545 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
546 # the libltdl installable library, and adds --enable-ltdl-install to
547 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
548 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
549 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
550 # '${top_builddir}/' (note the single quotes!) if your package is not
551 # flat, and, if you're not using automake, define top_builddir as
552 # appropriate in the Makefiles.
553 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
554 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
555 AC_CHECK_LIB(ltdl, main,
556 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
557 [if test x"$enable_ltdl_install" = xno; then
558 AC_MSG_WARN([libltdl not installed, but installation disabled])
560 enable_ltdl_install=yes
563 if test x"$enable_ltdl_install" = x"yes"; then
564 ac_configure_args="$ac_configure_args --enable-ltdl-install"
565 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
566 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
568 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
575 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
576 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
577 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
578 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
579 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
580 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
581 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
583 dnl This is just to silence aclocal about the macro not being used
584 ifelse([AC_DISABLE_FAST_INSTALL])dnl