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 # serial 40 AC_PROG_LIBTOOL
40 AC_DEFUN(AC_PROG_LIBTOOL,
41 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
43 # Save cache, so that ltconfig can load it
46 # Actually configure libtool. ac_aux_dir is where install-sh is found.
47 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
48 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
49 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
50 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
51 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
52 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
53 || AC_MSG_ERROR([libtool configure failed])
55 # Reload cache, that may have been modified by ltconfig
58 # This can be used to rebuild libtool when needed
59 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
61 # Always use our own libtool.
62 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
65 # Redirect the config.log output again, so that the ltconfig log is not
66 # clobbered by the next message.
70 AC_DEFUN(AC_LIBTOOL_SETUP,
72 AC_REQUIRE([AC_ENABLE_SHARED])dnl
73 AC_REQUIRE([AC_ENABLE_STATIC])dnl
74 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
75 AC_REQUIRE([AC_CANONICAL_HOST])dnl
76 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
77 AC_REQUIRE([AC_PROG_RANLIB])dnl
78 AC_REQUIRE([AC_PROG_CC])dnl
79 AC_REQUIRE([AC_PROG_LD])dnl
80 AC_REQUIRE([AC_PROG_NM])dnl
81 AC_REQUIRE([AC_PROG_LN_S])dnl
85 NONE) lt_target="$host" ;;
86 *) lt_target="$target" ;;
89 # Check for any special flags to pass to ltconfig.
90 libtool_flags="--cache-file=$cache_file"
91 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
92 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
93 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
94 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
95 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
96 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
97 [libtool_flags="$libtool_flags --enable-dlopen"])
98 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
99 [libtool_flags="$libtool_flags --enable-win32-dll"])
100 AC_ARG_ENABLE(libtool-lock,
101 [ --disable-libtool-lock avoid locking (might break parallel builds)])
102 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
103 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
105 # Some flags need to be propagated to the compiler or linker for good
109 # Find out which ABI we are using.
110 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
111 if AC_TRY_EVAL(ac_compile); then
112 case "`/usr/bin/file conftest.o`" in
128 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
129 SAVE_CFLAGS="$CFLAGS"
130 CFLAGS="$CFLAGS -belf"
131 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
132 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
133 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
134 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
135 CFLAGS="$SAVE_CFLAGS"
139 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
140 [*-*-cygwin* | *-*-mingw*)
141 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
142 AC_CHECK_TOOL(AS, as, false)
143 AC_CHECK_TOOL(OBJDUMP, objdump, false)
149 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
150 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
152 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
153 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
155 # AC_ENABLE_SHARED - implement the --enable-shared flag
156 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
157 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
159 AC_DEFUN(AC_ENABLE_SHARED, [dnl
160 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
161 AC_ARG_ENABLE(shared,
162 changequote(<<, >>)dnl
163 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
165 [p=${PACKAGE-default}
167 yes) enable_shared=yes ;;
168 no) enable_shared=no ;;
171 # Look at the argument we got. We use all the common list separators.
172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
173 for pkg in $enableval; do
174 if test "X$pkg" = "X$p"; then
181 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
184 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
185 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
186 AC_ENABLE_SHARED(no)])
188 # AC_ENABLE_STATIC - implement the --enable-static flag
189 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
190 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
192 AC_DEFUN(AC_ENABLE_STATIC, [dnl
193 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
194 AC_ARG_ENABLE(static,
195 changequote(<<, >>)dnl
196 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
198 [p=${PACKAGE-default}
200 yes) enable_static=yes ;;
201 no) enable_static=no ;;
204 # Look at the argument we got. We use all the common list separators.
205 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
206 for pkg in $enableval; do
207 if test "X$pkg" = "X$p"; then
214 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
217 # AC_DISABLE_STATIC - set the default static flag to --disable-static
218 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
219 AC_ENABLE_STATIC(no)])
222 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
223 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
224 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
226 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
227 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
228 AC_ARG_ENABLE(fast-install,
229 changequote(<<, >>)dnl
230 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
232 [p=${PACKAGE-default}
234 yes) enable_fast_install=yes ;;
235 no) enable_fast_install=no ;;
237 enable_fast_install=no
238 # Look at the argument we got. We use all the common list separators.
239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
240 for pkg in $enableval; do
241 if test "X$pkg" = "X$p"; then
242 enable_fast_install=yes
248 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
251 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
252 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
253 AC_ENABLE_FAST_INSTALL(no)])
255 # AC_PROG_LD - find the path to the GNU or non-GNU linker
258 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
259 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
260 AC_REQUIRE([AC_PROG_CC])dnl
261 AC_REQUIRE([AC_CANONICAL_HOST])dnl
262 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
264 if test "$ac_cv_prog_gcc" = yes; then
265 # Check if gcc -print-prog-name=ld gives a path.
266 AC_MSG_CHECKING([for ld used by GCC])
267 ac_prog=`($CC -print-prog-name=ld) 2>&5`
269 # Accept absolute paths.
271 [\\/]* | [A-Za-z]:[\\/]*)
272 re_direlt='/[^/][^/]*/\.\./'
274 # Canonicalize the path of ld
275 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
276 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
277 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
279 test -z "$LD" && LD="$ac_prog"
282 # If it fails, then pretend we aren't using GCC.
286 # If it is relative, then search for the first ld in PATH.
290 elif test "$with_gnu_ld" = yes; then
291 AC_MSG_CHECKING([for GNU ld])
293 AC_MSG_CHECKING([for non-GNU ld])
295 AC_CACHE_VAL(ac_cv_path_LD,
296 [if test -z "$LD"; then
297 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
298 for ac_dir in $PATH; do
299 test -z "$ac_dir" && ac_dir=.
300 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
301 ac_cv_path_LD="$ac_dir/$ac_prog"
302 # Check to see if the program is GNU ld. I'd rather use --version,
303 # but apparently some GNU ld's only accept -v.
304 # Break only if it was the GNU/non-GNU ld that we prefer.
305 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
306 test "$with_gnu_ld" != no && break
308 test "$with_gnu_ld" != yes && break
314 ac_cv_path_LD="$LD" # Let the user override the test with a path.
317 if test -n "$LD"; then
322 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
326 AC_DEFUN(AC_PROG_LD_GNU,
327 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
328 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
329 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
330 ac_cv_prog_gnu_ld=yes
336 # AC_PROG_NM - find the path to a BSD-compatible name lister
338 [AC_MSG_CHECKING([for BSD-compatible nm])
339 AC_CACHE_VAL(ac_cv_path_NM,
340 [if test -n "$NM"; then
341 # Let the user override the test.
344 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
345 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
346 test -z "$ac_dir" && ac_dir=.
347 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
348 # Check to see if the nm accepts a BSD-compat flag.
349 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
350 # nm: unknown option "B" ignored
351 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
352 ac_cv_path_NM="$ac_dir/nm -B"
354 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
355 ac_cv_path_NM="$ac_dir/nm -p"
358 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
359 continue # so that we can try to find one that supports BSD flags
364 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
370 # AC_CHECK_LIBM - check for math library
371 AC_DEFUN(AC_CHECK_LIBM,
372 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
375 *-*-beos* | *-*-cygwin*)
376 # These system don't have libm
379 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
380 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
383 AC_CHECK_LIB(m, main, LIBM="-lm")
388 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
389 # the libltdl convenience library, adds --enable-ltdl-convenience to
390 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
391 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
392 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
393 # '${top_builddir}/' (note the single quotes!) if your package is not
394 # flat, and, if you're not using automake, define top_builddir as
395 # appropriate in the Makefiles.
396 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
397 case "$enable_ltdl_convenience" in
398 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
399 "") enable_ltdl_convenience=yes
400 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
402 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
403 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
406 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
407 # the libltdl installable library, and adds --enable-ltdl-install to
408 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
409 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
410 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
411 # '${top_builddir}/' (note the single quotes!) if your package is not
412 # flat, and, if you're not using automake, define top_builddir as
413 # appropriate in the Makefiles.
414 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
415 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
416 AC_CHECK_LIB(ltdl, main,
417 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
418 [if test x"$enable_ltdl_install" = xno; then
419 AC_MSG_WARN([libltdl not installed, but installation disabled])
421 enable_ltdl_install=yes
424 if test x"$enable_ltdl_install" = x"yes"; then
425 ac_configure_args="$ac_configure_args --enable-ltdl-install"
426 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
427 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
429 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
436 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
437 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
438 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
439 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
440 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
441 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
442 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
444 dnl This is just to silence aclocal about the macro not being used
445 ifelse([AC_DISABLE_FAST_INSTALL])dnl
447 # Like AC_CONFIG_HEADER, but automatically create stamp file.
449 AC_DEFUN(AM_CONFIG_HEADER,
451 AC_CONFIG_HEADER([$1])
452 dnl When config.status generates a header, we must update the stamp-h file.
453 dnl This file resides in the same directory as the config header
454 dnl that is generated. We must strip everything past the first ":",
455 dnl and everything past the last "/".
456 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
457 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
458 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
460 for am_file in <<$1>>; do
461 case " <<$>>CONFIG_HEADERS " in
462 *" <<$>>am_file "*<<)>>
463 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
466 am_indx=`expr "<<$>>am_indx" + 1`
470 # Do all the work for Automake. This macro actually does too much --
471 # some checks are only needed if your package does certain things.
472 # But this isn't really a big deal.
477 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
479 AC_DEFUN(AM_INIT_AUTOMAKE,
480 [AC_REQUIRE([AC_PROG_INSTALL])
485 dnl test to see if srcdir already configured
486 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
487 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
490 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
491 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
492 AC_REQUIRE([AM_SANITY_CHECK])
493 AC_REQUIRE([AC_ARG_PROGRAM])
494 dnl FIXME This is truly gross.
495 missing_dir=`cd $ac_aux_dir && pwd`
496 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
497 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
498 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
499 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
500 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
501 AC_REQUIRE([AC_PROG_MAKE_SET])])
504 # Check to make sure that the build environment is sane.
507 AC_DEFUN(AM_SANITY_CHECK,
508 [AC_MSG_CHECKING([whether build environment is sane])
511 echo timestamp > conftestfile
512 # Do `set' in a subshell so we don't clobber the current shell's
513 # arguments. Must try -L first in case configure is actually a
514 # symlink; some systems play weird games with the mod time of symlinks
515 # (eg FreeBSD returns the mod time of the symlink's containing
518 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
519 if test "[$]*" = "X"; then
521 set X `ls -t $srcdir/configure conftestfile`
523 if test "[$]*" != "X $srcdir/configure conftestfile" \
524 && test "[$]*" != "X conftestfile $srcdir/configure"; then
526 # If neither matched, then we have a broken ls. This can happen
527 # if, for instance, CONFIG_SHELL is bash and it inherits a
528 # broken ls alias from the environment. This has actually
529 # happened. Such a system could not be considered "sane".
530 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
531 alias in your environment])
534 test "[$]2" = conftestfile
540 AC_MSG_ERROR([newly created file is older than distributed files!
541 Check your system clock])
546 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
547 dnl The program must properly implement --version.
548 AC_DEFUN(AM_MISSING_PROG,
549 [AC_MSG_CHECKING(for working $2)
550 # Run test in a subshell; some versions of sh will print an error if
551 # an executable is not found, even if stderr is redirected.
552 # Redirect stdin to placate older versions of autoconf. Sigh.
553 if ($2 --version) < /dev/null > /dev/null 2>&1; then
558 AC_MSG_RESULT(missing)