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 dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
15 dnl if the cache file is inconsistent with the current host,
16 dnl target and build system types, execute CMD or print a default
18 AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
19 AC_REQUIRE([AC_CANONICAL_SYSTEM])
20 AC_MSG_CHECKING([config.cache system type])
21 if { test x"${ac_cv_host_system_type+set}" = x"set" &&
22 test x"$ac_cv_host_system_type" != x"$host"; } ||
23 { test x"${ac_cv_build_system_type+set}" = x"set" &&
24 test x"$ac_cv_build_system_type" != x"$build"; } ||
25 { test x"${ac_cv_target_system_type+set}" = x"set" &&
26 test x"$ac_cv_target_system_type" != x"$target"; }; then
27 AC_MSG_RESULT([different])
29 [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
33 ac_cv_host_system_type="$host"
34 ac_cv_build_system_type="$build"
35 ac_cv_target_system_type="$target"
39 # Like AC_CONFIG_HEADER, but automatically create stamp file.
41 AC_DEFUN(AM_CONFIG_HEADER,
43 AC_CONFIG_HEADER([$1])
44 dnl When config.status generates a header, we must update the stamp-h file.
45 dnl This file resides in the same directory as the config header
46 dnl that is generated. We must strip everything past the first ":",
47 dnl and everything past the last "/".
48 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
49 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
50 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
52 for am_file in <<$1>>; do
53 case " <<$>>CONFIG_HEADERS " in
54 *" <<$>>am_file "*<<)>>
55 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
58 am_indx=`expr "<<$>>am_indx" + 1`
62 # Do all the work for Automake. This macro actually does too much --
63 # some checks are only needed if your package does certain things.
64 # But this isn't really a big deal.
69 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
71 AC_DEFUN(AM_INIT_AUTOMAKE,
72 [AC_REQUIRE([AC_PROG_INSTALL])
77 dnl test to see if srcdir already configured
78 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
79 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
82 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
83 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
84 AC_REQUIRE([AM_SANITY_CHECK])
85 AC_REQUIRE([AC_ARG_PROGRAM])
86 dnl FIXME This is truly gross.
87 missing_dir=`cd $ac_aux_dir && pwd`
88 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
89 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
90 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
91 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
92 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
93 AC_REQUIRE([AC_PROG_MAKE_SET])])
96 # Check to make sure that the build environment is sane.
99 AC_DEFUN(AM_SANITY_CHECK,
100 [AC_MSG_CHECKING([whether build environment is sane])
103 echo timestamp > conftestfile
104 # Do `set' in a subshell so we don't clobber the current shell's
105 # arguments. Must try -L first in case configure is actually a
106 # symlink; some systems play weird games with the mod time of symlinks
107 # (eg FreeBSD returns the mod time of the symlink's containing
110 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
111 if test "[$]*" = "X"; then
113 set X `ls -t $srcdir/configure conftestfile`
115 if test "[$]*" != "X $srcdir/configure conftestfile" \
116 && test "[$]*" != "X conftestfile $srcdir/configure"; then
118 # If neither matched, then we have a broken ls. This can happen
119 # if, for instance, CONFIG_SHELL is bash and it inherits a
120 # broken ls alias from the environment. This has actually
121 # happened. Such a system could not be considered "sane".
122 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
123 alias in your environment])
126 test "[$]2" = conftestfile
132 AC_MSG_ERROR([newly created file is older than distributed files!
133 Check your system clock])
138 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
139 dnl The program must properly implement --version.
140 AC_DEFUN(AM_MISSING_PROG,
141 [AC_MSG_CHECKING(for working $2)
142 # Run test in a subshell; some versions of sh will print an error if
143 # an executable is not found, even if stderr is redirected.
144 # Redirect stdin to placate older versions of autoconf. Sigh.
145 if ($2 --version) < /dev/null > /dev/null 2>&1; then
150 AC_MSG_RESULT(missing)
155 # serial 40 AC_PROG_LIBTOOL
156 AC_DEFUN(AC_PROG_LIBTOOL,
157 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
159 # Save cache, so that ltconfig can load it
162 # Actually configure libtool. ac_aux_dir is where install-sh is found.
163 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
164 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
165 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
166 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
167 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
168 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
169 || AC_MSG_ERROR([libtool configure failed])
171 # Reload cache, that may have been modified by ltconfig
174 # This can be used to rebuild libtool when needed
175 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
177 # Always use our own libtool.
178 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
181 # Redirect the config.log output again, so that the ltconfig log is not
182 # clobbered by the next message.
186 AC_DEFUN(AC_LIBTOOL_SETUP,
188 AC_REQUIRE([AC_ENABLE_SHARED])dnl
189 AC_REQUIRE([AC_ENABLE_STATIC])dnl
190 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
191 AC_REQUIRE([AC_CANONICAL_HOST])dnl
192 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
193 AC_REQUIRE([AC_PROG_RANLIB])dnl
194 AC_REQUIRE([AC_PROG_CC])dnl
195 AC_REQUIRE([AC_PROG_LD])dnl
196 AC_REQUIRE([AC_PROG_NM])dnl
197 AC_REQUIRE([AC_PROG_LN_S])dnl
201 NONE) lt_target="$host" ;;
202 *) lt_target="$target" ;;
205 # Check for any special flags to pass to ltconfig.
207 # the following will cause an existing older ltconfig to fail, so
208 # we ignore this at the expense of the cache file... Checking this
209 # will just take longer ... bummer!
210 #libtool_flags="--cache-file=$cache_file"
212 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
213 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
214 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
215 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
216 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
217 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
218 [libtool_flags="$libtool_flags --enable-dlopen"])
219 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
220 [libtool_flags="$libtool_flags --enable-win32-dll"])
221 AC_ARG_ENABLE(libtool-lock,
222 [ --disable-libtool-lock avoid locking (might break parallel builds)])
223 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
224 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
226 # Some flags need to be propagated to the compiler or linker for good
230 # Find out which ABI we are using.
231 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
232 if AC_TRY_EVAL(ac_compile); then
233 case "`/usr/bin/file conftest.o`" in
249 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
250 SAVE_CFLAGS="$CFLAGS"
251 CFLAGS="$CFLAGS -belf"
252 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
253 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
254 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
255 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
256 CFLAGS="$SAVE_CFLAGS"
260 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
261 [*-*-cygwin* | *-*-mingw*)
262 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
263 AC_CHECK_TOOL(AS, as, false)
264 AC_CHECK_TOOL(OBJDUMP, objdump, false)
270 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
271 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
273 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
274 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
276 # AC_ENABLE_SHARED - implement the --enable-shared flag
277 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
278 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
280 AC_DEFUN(AC_ENABLE_SHARED, [dnl
281 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
282 AC_ARG_ENABLE(shared,
283 changequote(<<, >>)dnl
284 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
286 [p=${PACKAGE-default}
288 yes) enable_shared=yes ;;
289 no) enable_shared=no ;;
292 # Look at the argument we got. We use all the common list separators.
293 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
294 for pkg in $enableval; do
295 if test "X$pkg" = "X$p"; then
302 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
305 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
306 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
307 AC_ENABLE_SHARED(no)])
309 # AC_ENABLE_STATIC - implement the --enable-static flag
310 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
311 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
313 AC_DEFUN(AC_ENABLE_STATIC, [dnl
314 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
315 AC_ARG_ENABLE(static,
316 changequote(<<, >>)dnl
317 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
319 [p=${PACKAGE-default}
321 yes) enable_static=yes ;;
322 no) enable_static=no ;;
325 # Look at the argument we got. We use all the common list separators.
326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
327 for pkg in $enableval; do
328 if test "X$pkg" = "X$p"; then
335 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
338 # AC_DISABLE_STATIC - set the default static flag to --disable-static
339 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
340 AC_ENABLE_STATIC(no)])
343 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
344 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
345 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
347 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
348 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
349 AC_ARG_ENABLE(fast-install,
350 changequote(<<, >>)dnl
351 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
353 [p=${PACKAGE-default}
355 yes) enable_fast_install=yes ;;
356 no) enable_fast_install=no ;;
358 enable_fast_install=no
359 # Look at the argument we got. We use all the common list separators.
360 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
361 for pkg in $enableval; do
362 if test "X$pkg" = "X$p"; then
363 enable_fast_install=yes
369 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
372 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
373 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
374 AC_ENABLE_FAST_INSTALL(no)])
376 # AC_PROG_LD - find the path to the GNU or non-GNU linker
379 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
380 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
381 AC_REQUIRE([AC_PROG_CC])dnl
382 AC_REQUIRE([AC_CANONICAL_HOST])dnl
383 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
385 if test "$ac_cv_prog_gcc" = yes; then
386 # Check if gcc -print-prog-name=ld gives a path.
387 AC_MSG_CHECKING([for ld used by GCC])
388 ac_prog=`($CC -print-prog-name=ld) 2>&5`
390 # Accept absolute paths.
392 [\\/]* | [A-Za-z]:[\\/]*)
393 re_direlt='/[^/][^/]*/\.\./'
395 # Canonicalize the path of ld
396 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
397 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
398 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
400 test -z "$LD" && LD="$ac_prog"
403 # If it fails, then pretend we aren't using GCC.
407 # If it is relative, then search for the first ld in PATH.
411 elif test "$with_gnu_ld" = yes; then
412 AC_MSG_CHECKING([for GNU ld])
414 AC_MSG_CHECKING([for non-GNU ld])
416 AC_CACHE_VAL(ac_cv_path_LD,
417 [if test -z "$LD"; then
418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
419 for ac_dir in $PATH; do
420 test -z "$ac_dir" && ac_dir=.
421 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
422 ac_cv_path_LD="$ac_dir/$ac_prog"
423 # Check to see if the program is GNU ld. I'd rather use --version,
424 # but apparently some GNU ld's only accept -v.
425 # Break only if it was the GNU/non-GNU ld that we prefer.
426 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
427 test "$with_gnu_ld" != no && break
429 test "$with_gnu_ld" != yes && break
435 ac_cv_path_LD="$LD" # Let the user override the test with a path.
438 if test -n "$LD"; then
443 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
447 AC_DEFUN(AC_PROG_LD_GNU,
448 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
449 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
450 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
451 ac_cv_prog_gnu_ld=yes
457 # AC_PROG_NM - find the path to a BSD-compatible name lister
459 [AC_MSG_CHECKING([for BSD-compatible nm])
460 AC_CACHE_VAL(ac_cv_path_NM,
461 [if test -n "$NM"; then
462 # Let the user override the test.
465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
466 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
467 test -z "$ac_dir" && ac_dir=.
468 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
469 # Check to see if the nm accepts a BSD-compat flag.
470 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
471 # nm: unknown option "B" ignored
472 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
473 ac_cv_path_NM="$ac_dir/nm -B"
475 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
476 ac_cv_path_NM="$ac_dir/nm -p"
479 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
480 continue # so that we can try to find one that supports BSD flags
485 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
491 # AC_CHECK_LIBM - check for math library
492 AC_DEFUN(AC_CHECK_LIBM,
493 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
496 *-*-beos* | *-*-cygwin*)
497 # These system don't have libm
500 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
501 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
504 AC_CHECK_LIB(m, main, LIBM="-lm")
509 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
510 # the libltdl convenience library and INCLTDL to the include flags for
511 # the libltdl header and adds --enable-ltdl-convenience to the
512 # configure arguments. Note that LIBLTDL and INCLTDL are not
513 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
514 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
515 # with '${top_builddir}/' and INCLTDL will be prefixed with
516 # '${top_srcdir}/' (note the single quotes!). If your package is not
517 # flat and you're not using automake, define top_builddir and
518 # top_srcdir appropriately 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='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
526 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
529 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
530 # the libltdl installable library and INCLTDL to the include flags for
531 # the libltdl header and adds --enable-ltdl-install to the configure
532 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
533 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
534 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
535 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
536 # with '${top_srcdir}/' (note the single quotes!). If your package is
537 # not flat and you're not using automake, define top_builddir and
538 # top_srcdir appropriately in the Makefiles.
539 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
540 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
541 AC_CHECK_LIB(ltdl, main,
542 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
543 [if test x"$enable_ltdl_install" = xno; then
544 AC_MSG_WARN([libltdl not installed, but installation disabled])
546 enable_ltdl_install=yes
549 if test x"$enable_ltdl_install" = x"yes"; then
550 ac_configure_args="$ac_configure_args --enable-ltdl-install"
551 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
552 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
554 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
561 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
562 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
563 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
564 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
565 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
566 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
567 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
569 dnl This is just to silence aclocal about the macro not being used
570 ifelse([AC_DISABLE_FAST_INSTALL])dnl