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.
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])
51 dnl test to see if srcdir already configured
52 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
53 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
56 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
57 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
58 AC_REQUIRE([AM_SANITY_CHECK])
59 AC_REQUIRE([AC_ARG_PROGRAM])
60 dnl FIXME This is truly gross.
61 missing_dir=`cd $ac_aux_dir && pwd`
62 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
63 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
64 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
65 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
66 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
67 AC_REQUIRE([AC_PROG_MAKE_SET])])
70 # Check to make sure that the build environment is sane.
73 AC_DEFUN(AM_SANITY_CHECK,
74 [AC_MSG_CHECKING([whether build environment is sane])
77 echo timestamp > conftestfile
78 # Do `set' in a subshell so we don't clobber the current shell's
79 # arguments. Must try -L first in case configure is actually a
80 # symlink; some systems play weird games with the mod time of symlinks
81 # (eg FreeBSD returns the mod time of the symlink's containing
84 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
85 if test "[$]*" = "X"; then
87 set X `ls -t $srcdir/configure conftestfile`
89 if test "[$]*" != "X $srcdir/configure conftestfile" \
90 && test "[$]*" != "X conftestfile $srcdir/configure"; then
92 # If neither matched, then we have a broken ls. This can happen
93 # if, for instance, CONFIG_SHELL is bash and it inherits a
94 # broken ls alias from the environment. This has actually
95 # happened. Such a system could not be considered "sane".
96 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
97 alias in your environment])
100 test "[$]2" = conftestfile
106 AC_MSG_ERROR([newly created file is older than distributed files!
107 Check your system clock])
112 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
113 dnl The program must properly implement --version.
114 AC_DEFUN(AM_MISSING_PROG,
115 [AC_MSG_CHECKING(for working $2)
116 # Run test in a subshell; some versions of sh will print an error if
117 # an executable is not found, even if stderr is redirected.
118 # Redirect stdin to placate older versions of autoconf. Sigh.
119 if ($2 --version) < /dev/null > /dev/null 2>&1; then
124 AC_MSG_RESULT(missing)
128 # Add --enable-maintainer-mode option to configure.
133 AC_DEFUN(AM_MAINTAINER_MODE,
134 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
135 dnl maintainer-mode is disabled by default
136 AC_ARG_ENABLE(maintainer-mode,
137 [ --enable-maintainer-mode enable make rules and dependencies not useful
138 (and sometimes confusing) to the casual installer],
139 USE_MAINTAINER_MODE=$enableval,
140 USE_MAINTAINER_MODE=no)
141 AC_MSG_RESULT($USE_MAINTAINER_MODE)
142 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
143 MAINT=$MAINTAINER_MODE_TRUE
148 # Define a conditional.
150 AC_DEFUN(AM_CONDITIONAL,
162 # serial 40 AC_PROG_LIBTOOL
163 AC_DEFUN(AC_PROG_LIBTOOL,
164 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
166 # Save cache, so that ltconfig can load it
169 # Actually configure libtool. ac_aux_dir is where install-sh is found.
170 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
171 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
172 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
173 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
174 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
175 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
176 || AC_MSG_ERROR([libtool configure failed])
178 # Reload cache, that may have been modified by ltconfig
181 # This can be used to rebuild libtool when needed
182 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
184 # Always use our own libtool.
185 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
188 # Redirect the config.log output again, so that the ltconfig log is not
189 # clobbered by the next message.
193 AC_DEFUN(AC_LIBTOOL_SETUP,
195 AC_REQUIRE([AC_ENABLE_SHARED])dnl
196 AC_REQUIRE([AC_ENABLE_STATIC])dnl
197 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
198 AC_REQUIRE([AC_CANONICAL_HOST])dnl
199 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
200 AC_REQUIRE([AC_PROG_RANLIB])dnl
201 AC_REQUIRE([AC_PROG_CC])dnl
202 AC_REQUIRE([AC_PROG_LD])dnl
203 AC_REQUIRE([AC_PROG_NM])dnl
204 AC_REQUIRE([AC_PROG_LN_S])dnl
208 NONE) lt_target="$host" ;;
209 *) lt_target="$target" ;;
212 # Check for any special flags to pass to ltconfig.
213 libtool_flags="--cache-file=$cache_file"
214 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
215 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
216 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
217 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
218 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
219 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
220 [libtool_flags="$libtool_flags --enable-dlopen"])
221 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
222 [libtool_flags="$libtool_flags --enable-win32-dll"])
223 AC_ARG_ENABLE(libtool-lock,
224 [ --disable-libtool-lock avoid locking (might break parallel builds)])
225 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
226 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
228 # Some flags need to be propagated to the compiler or linker for good
232 # Find out which ABI we are using.
233 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
234 if AC_TRY_EVAL(ac_compile); then
235 case "`/usr/bin/file conftest.o`" in
251 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
252 SAVE_CFLAGS="$CFLAGS"
253 CFLAGS="$CFLAGS -belf"
254 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
255 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
256 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
257 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
258 CFLAGS="$SAVE_CFLAGS"
262 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
263 [*-*-cygwin* | *-*-mingw*)
264 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
265 AC_CHECK_TOOL(AS, as, false)
266 AC_CHECK_TOOL(OBJDUMP, objdump, false)
272 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
273 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
275 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
276 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
278 # AC_ENABLE_SHARED - implement the --enable-shared flag
279 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
280 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
282 AC_DEFUN(AC_ENABLE_SHARED, [dnl
283 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
284 AC_ARG_ENABLE(shared,
285 changequote(<<, >>)dnl
286 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
288 [p=${PACKAGE-default}
290 yes) enable_shared=yes ;;
291 no) enable_shared=no ;;
294 # Look at the argument we got. We use all the common list separators.
295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
296 for pkg in $enableval; do
297 if test "X$pkg" = "X$p"; then
304 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
307 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
308 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
309 AC_ENABLE_SHARED(no)])
311 # AC_ENABLE_STATIC - implement the --enable-static flag
312 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
313 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
315 AC_DEFUN(AC_ENABLE_STATIC, [dnl
316 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
317 AC_ARG_ENABLE(static,
318 changequote(<<, >>)dnl
319 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
321 [p=${PACKAGE-default}
323 yes) enable_static=yes ;;
324 no) enable_static=no ;;
327 # Look at the argument we got. We use all the common list separators.
328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
329 for pkg in $enableval; do
330 if test "X$pkg" = "X$p"; then
337 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
340 # AC_DISABLE_STATIC - set the default static flag to --disable-static
341 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
342 AC_ENABLE_STATIC(no)])
345 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
346 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
347 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
349 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
350 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
351 AC_ARG_ENABLE(fast-install,
352 changequote(<<, >>)dnl
353 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
355 [p=${PACKAGE-default}
357 yes) enable_fast_install=yes ;;
358 no) enable_fast_install=no ;;
360 enable_fast_install=no
361 # Look at the argument we got. We use all the common list separators.
362 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
363 for pkg in $enableval; do
364 if test "X$pkg" = "X$p"; then
365 enable_fast_install=yes
371 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
374 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
375 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
376 AC_ENABLE_FAST_INSTALL(no)])
378 # AC_PROG_LD - find the path to the GNU or non-GNU linker
381 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
382 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
383 AC_REQUIRE([AC_PROG_CC])dnl
384 AC_REQUIRE([AC_CANONICAL_HOST])dnl
385 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
387 if test "$ac_cv_prog_gcc" = yes; then
388 # Check if gcc -print-prog-name=ld gives a path.
389 AC_MSG_CHECKING([for ld used by GCC])
390 ac_prog=`($CC -print-prog-name=ld) 2>&5`
392 # Accept absolute paths.
394 [\\/]* | [A-Za-z]:[\\/]*)
395 re_direlt='/[^/][^/]*/\.\./'
397 # Canonicalize the path of ld
398 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
399 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
400 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
402 test -z "$LD" && LD="$ac_prog"
405 # If it fails, then pretend we aren't using GCC.
409 # If it is relative, then search for the first ld in PATH.
413 elif test "$with_gnu_ld" = yes; then
414 AC_MSG_CHECKING([for GNU ld])
416 AC_MSG_CHECKING([for non-GNU ld])
418 AC_CACHE_VAL(ac_cv_path_LD,
419 [if test -z "$LD"; then
420 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
421 for ac_dir in $PATH; do
422 test -z "$ac_dir" && ac_dir=.
423 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
424 ac_cv_path_LD="$ac_dir/$ac_prog"
425 # Check to see if the program is GNU ld. I'd rather use --version,
426 # but apparently some GNU ld's only accept -v.
427 # Break only if it was the GNU/non-GNU ld that we prefer.
428 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
429 test "$with_gnu_ld" != no && break
431 test "$with_gnu_ld" != yes && break
437 ac_cv_path_LD="$LD" # Let the user override the test with a path.
440 if test -n "$LD"; then
445 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
449 AC_DEFUN(AC_PROG_LD_GNU,
450 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
451 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
452 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
453 ac_cv_prog_gnu_ld=yes
459 # AC_PROG_NM - find the path to a BSD-compatible name lister
461 [AC_MSG_CHECKING([for BSD-compatible nm])
462 AC_CACHE_VAL(ac_cv_path_NM,
463 [if test -n "$NM"; then
464 # Let the user override the test.
467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
468 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
469 test -z "$ac_dir" && ac_dir=.
470 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
471 # Check to see if the nm accepts a BSD-compat flag.
472 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
473 # nm: unknown option "B" ignored
474 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
475 ac_cv_path_NM="$ac_dir/nm -B"
477 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
478 ac_cv_path_NM="$ac_dir/nm -p"
481 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
482 continue # so that we can try to find one that supports BSD flags
487 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
493 # AC_CHECK_LIBM - check for math library
494 AC_DEFUN(AC_CHECK_LIBM,
495 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
498 *-*-beos* | *-*-cygwin*)
499 # These system don't have libm
502 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
503 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
506 AC_CHECK_LIB(m, main, LIBM="-lm")
511 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
512 # the libltdl convenience library, adds --enable-ltdl-convenience to
513 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
514 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
515 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
516 # '${top_builddir}/' (note the single quotes!) if your package is not
517 # flat, and, if you're not using automake, define top_builddir as
518 # appropriate in the Makefiles.
519 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
520 case "$enable_ltdl_convenience" in
521 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
522 "") enable_ltdl_convenience=yes
523 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
525 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
526 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
529 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
530 # the libltdl installable library, and adds --enable-ltdl-install to
531 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
532 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
533 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
534 # '${top_builddir}/' (note the single quotes!) if your package is not
535 # flat, and, if you're not using automake, define top_builddir as
536 # appropriate in the Makefiles.
537 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
538 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
539 AC_CHECK_LIB(ltdl, main,
540 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
541 [if test x"$enable_ltdl_install" = xno; then
542 AC_MSG_WARN([libltdl not installed, but installation disabled])
544 enable_ltdl_install=yes
547 if test x"$enable_ltdl_install" = x"yes"; then
548 ac_configure_args="$ac_configure_args --enable-ltdl-install"
549 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
550 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
552 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
559 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
560 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
561 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
562 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
563 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
564 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
565 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
567 dnl This is just to silence aclocal about the macro not being used
568 ifelse([AC_DISABLE_FAST_INSTALL])dnl