1 # aclocal.m4 generated automatically by aclocal 1.4e
3 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 AC_DEFUN(hs_ULONG_CONST,
15 [ AC_EGREP_CPP(Circus,
16 [#define ACAT(a,b)a ## b
18 ], AC_DEFINE([ULONG_CONST(a)], [a ## UL]),
20 [#define RCAT(a,b)a/**/b
22 ], AC_DEFINE([ULONG_CONST(a)], [a/**/L]),
23 AC_MSG_ERROR([How do we create an unsigned long constant?])))])
24 dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
26 dnl This macro defines (with AC_DEFINE) VARNAME to the expansion of the DIR
27 dnl variable, taking care of fixing up ${prefix} and such.
29 dnl Note that the 3 argument form is only supported with autoconf 2.13 and
30 dnl later (i.e. only where AC_DEFINE supports 3 arguments).
34 dnl AC_DEFINE_DIR(DATADIR, datadir)
35 dnl AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
37 dnl @version $Id: acinclude.m4,v 1.3 2000/08/04 03:26:22 stenn Exp $
38 dnl @author Alexandre Oliva <oliva@lsd.ic.unicamp.br>
40 AC_DEFUN(AC_DEFINE_DIR, [
42 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
43 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
47 AC_DEFINE_UNQUOTED($1, "$ac_expanded"),
48 AC_DEFINE_UNQUOTED($1, "$ac_expanded", $3))
51 # Like AC_CONFIG_HEADER, but automatically create stamp file.
55 # When config.status generates a header, we must update the stamp-h file.
56 # This file resides in the same directory as the config header
57 # that is generated. We must strip everything past the first ":",
58 # and everything past the last "/".
62 AC_DEFUN([AM_CONFIG_HEADER],
63 [AC_CONFIG_HEADER([$1])
65 ifelse(patsubst([$1], [[^ ]], []),
67 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
68 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),
71 case " $CONFIG_HEADERS " in
73 echo timestamp > `echo $am_file | sed 's%:.*%%;s%[^/]*$%%'`stamp-h$am_indx
76 am_indx=\`expr \$am_indx + 1\`
80 # Do all the work for Automake. This macro actually does too much --
81 # some checks are only needed if your package does certain things.
82 # But this isn't really a big deal.
86 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
87 # written in clear, in which case automake, when reading aclocal.m4,
88 # will think it sees a *use*, and therefore will trigger all it's
89 # C support machinery. Also note that it means that autoscan, seeing
90 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
93 # We require 2.13 because we rely on SHELL being computed by configure.
96 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
97 # -----------------------------------------------------------
98 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
99 # The purpose of this macro is to provide the user with a means to
100 # check macros which are provided without letting her know how the
101 # information is coded.
102 # If this macro is not defined by Autoconf, define it here.
103 ifdef([AC_PROVIDE_IFELSE],
105 [define([AC_PROVIDE_IFELSE],
106 [ifdef([AC_PROVIDE_$1],
110 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
111 # ----------------------------------------------
112 AC_DEFUN([AM_INIT_AUTOMAKE],
113 [AC_REQUIRE([AC_PROG_INSTALL])dnl
114 # test to see if srcdir already configured
115 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
116 test -f $srcdir/config.status; then
117 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
120 # Define the identity of the package.
126 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
127 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
129 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
130 # the ones we care about.
131 ifdef([m4_pattern_allow],
132 [m4_pattern_allow([^AM_(C|CPP|CXX|OBJC|F|R|GCJ)FLAGS])])dnl
134 # Some tools Automake needs.
135 AC_REQUIRE([AM_SANITY_CHECK])dnl
136 AC_REQUIRE([AC_ARG_PROGRAM])dnl
137 AM_MISSING_PROG(ACLOCAL, aclocal)
138 AM_MISSING_PROG(AUTOCONF, autoconf)
139 AM_MISSING_PROG(AUTOMAKE, automake)
140 AM_MISSING_PROG(AUTOHEADER, autoheader)
141 AM_MISSING_PROG(MAKEINFO, makeinfo)
142 AM_MISSING_PROG(AMTAR, tar)
143 AM_MISSING_INSTALL_SH
144 AM_PROG_INSTALL_STRIP
145 # We need awk for the "check" target. The system "awk" is bad on
147 AC_REQUIRE([AC_PROG_AWK])dnl
148 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
149 AC_REQUIRE([AM_DEP_TRACK])dnl
150 AC_REQUIRE([AM_SET_DEPDIR])dnl
151 AC_PROVIDE_IFELSE([AC_PROG_][CC],
152 [AM_DEPENDENCIES(CC)],
153 [define([AC_PROG_][CC],
154 defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
155 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
156 [AM_DEPENDENCIES(CXX)],
157 [define([AC_PROG_][CXX],
158 defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
162 # Check to make sure that the build environment is sane.
169 AC_DEFUN([AM_SANITY_CHECK],
170 [AC_MSG_CHECKING([whether build environment is sane])
173 echo timestamp > conftest.file
174 # Do `set' in a subshell so we don't clobber the current shell's
175 # arguments. Must try -L first in case configure is actually a
176 # symlink; some systems play weird games with the mod time of symlinks
177 # (eg FreeBSD returns the mod time of the symlink's containing
180 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
181 if test "$[*]" = "X"; then
183 set X `ls -t $srcdir/configure conftest.file`
185 if test "$[*]" != "X $srcdir/configure conftest.file" \
186 && test "$[*]" != "X conftest.file $srcdir/configure"; then
188 # If neither matched, then we have a broken ls. This can happen
189 # if, for instance, CONFIG_SHELL is bash and it inherits a
190 # broken ls alias from the environment. This has actually
191 # happened. Such a system could not be considered "sane".
192 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
193 alias in your environment])
196 test "$[2]" = conftest.file
202 AC_MSG_ERROR([newly created file is older than distributed files!
203 Check your system clock])
211 # AM_MISSING_PROG(NAME, PROGRAM)
212 # ------------------------------
213 AC_DEFUN([AM_MISSING_PROG],
214 [AC_REQUIRE([AM_MISSING_HAS_RUN])
215 $1=${$1-"${am_missing_run}$2"}
219 # AM_MISSING_INSTALL_SH
220 # ---------------------
221 # Like AM_MISSING_PROG, but only looks for install-sh.
222 AC_DEFUN([AM_MISSING_INSTALL_SH],
223 [AC_REQUIRE([AM_MISSING_HAS_RUN])
224 if test -z "$install_sh"; then
225 for install_sh in "$ac_aux_dir/install-sh" \
226 "$ac_aux_dir/install.sh" \
227 "${am_missing_run}${ac_auxdir}/install-sh";
229 test -f "$install_sh" && break
231 # FIXME: an evil hack: we remove the SHELL invocation from
232 # install_sh because automake adds it back in. Sigh.
233 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
235 AC_SUBST(install_sh)])
240 # Define MISSING if not defined so far and test if it supports --run.
241 # If it does, set am_missing_run to use it, otherwise, to nothing.
242 AC_DEFUN([AM_MISSING_HAS_RUN],
243 [test x"${MISSING+set}" = xset ||
244 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
245 # Use eval to expand $SHELL
246 if eval "$MISSING --run :"; then
247 am_missing_run="$MISSING --run "
251 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
257 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
258 # $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'.
259 # Of course, Automake must honor this variable whenever it call a tool
260 # from the auxiliary directory. The problem is that $srcdir (hence
261 # $ac_aux_dir) can be either an absolute path or a path relative to
262 # $top_srcdir or absolute, this depends on how configure is run. This
263 # is pretty anoying since it makes $ac_aux_dir quite unusable in
264 # subdirectories: on the top source directory, any form will work
265 # fine, but in subdirectories relative pat needs to be adapted.
266 # - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
267 # relative, but fail if $srcdir is absolute
268 # - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
269 # absolute, and success on relative paths.
271 # Consequently, we define and use $am_aux_dir, the "always absolute"
272 # version of $ac_aux_dir.
274 AC_DEFUN([AM_AUX_DIR_EXPAND], [
275 # expand $ac_aux_dir to an absolute path
276 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
279 # One issue with vendor `install' (even GNU) is that you can't
280 # specify the program used to strip binaries. This is especially
281 # annoying in cross=compiling environments, where the build's strip
282 # is unlikely to handle the host's binaries.
283 # Fortunately install-sh will honor a STRIPPROG variable, so if we ever
284 # need to use a non standard strip, we just have to make sure we use
285 # install-sh with the STRIPPROG variable set.
286 AC_DEFUN([AM_PROG_INSTALL_STRIP],
287 [AC_REQUIRE([AM_MISSING_INSTALL_SH])
288 dnl Don't test for $cross_compiling = yes, it might be `maybe'...
289 # We'd like to do this but we can't because it will unconditionally
290 # require config.guess. One way would be if autoconf had the capability
291 # to let us compile in this code only when config.guess was already
293 #if test "$cross_compiling" != no; then
294 # # since we are cross-compiling, we need to check for a suitable `strip'
296 # if test -z "$STRIP"; then
297 # AC_MSG_WARN([strip missing, install-strip will not strip binaries])
301 # If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
302 # instruct install-strip to use install-sh and the given $STRIP program.
303 # Otherwise, just use ${INSTALL}: the idea is to use the vendor install
304 # as much as possible, because it's faster.
305 if test -z "$STRIP"; then
306 # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
307 # and the double dolard below is there to make sure that ${INSTALL}
308 # is substitued in the sub-makes, not at the top-level; this is
309 # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
311 INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
312 INSTALL_STRIP_PROGRAM_ENV=''
314 _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
315 INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
316 INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
319 AC_SUBST([INSTALL_STRIP_PROGRAM])
320 AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
322 #AC_DEFUN([AM_PROG_STRIP],
323 #[# Check for `strip', unless the installer
324 # has set the STRIP environment variable.
325 # Note: don't explicitly check for -z "$STRIP" here because
326 # that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
327 # this macro, and anyway it doesn't have an effect anyway.
328 #AC_CHECK_TOOL([STRIP],[strip])
333 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
334 # written in clear, in which case automake, when reading aclocal.m4,
335 # will think it sees a *use*, and therefore will trigger all it's
336 # C support machinery. Also note that it means that autoscan, seeing
337 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
339 # AM_DEPENDENCIES(NAME)
340 # ---------------------
341 # See how the compiler implements dependency checking.
342 # NAME is "CC", "CXX" or "OBJC".
343 # We try a few techniques and use that to set a single cache variable.
344 AC_DEFUN([AM_DEPENDENCIES],
345 [AC_REQUIRE([AM_SET_DEPDIR])dnl
346 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
348 [AC_REQUIRE([AC_PROG_][CC])dnl
349 AC_REQUIRE([AC_PROG_][CPP])
352 [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl
353 AC_REQUIRE([AC_PROG_][CXXCPP])
356 [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc],
357 [AC_REQUIRE([AC_PROG_][$1])dnl
361 AC_REQUIRE([AM_MAKE_INCLUDE])
363 AC_CACHE_CHECK([dependency style of $depcc],
364 [am_cv_$1_dependencies_compiler_type],
365 [if test -z "$AMDEP"; then
366 # We make a subdir and do the tests there. Otherwise we can end up
367 # making bogus files that we don't know about and never remove. For
368 # instance it was reported that on HP-UX the gcc test will end up
369 # making a dummy file named `D' -- because `-MD' means `put the output
372 # Copy depcomp to subdir because otherwise we won't find it if we're
373 # using a relative directory.
374 cp "$am_depcomp" confdir
377 am_cv_$1_dependencies_compiler_type=none
378 for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "./depcomp"`; do
379 # We need to recreate these files for each test, as the compiler may
380 # overwrite some of them when testing with obscure command lines.
381 # This happens at least with the AIX C compiler.
382 echo '#include "conftest.h"' > conftest.c
383 echo 'int i;' > conftest.h
387 # after this tag, mechanisms are not by side-effect, so they'll
388 # only be used when explicitly requested
389 if test "x$enable_dependency_tracking" = xyes; then
397 # We check with `-c' and `-o' for the sake of the "dashmstdout"
398 # mode. It turns out that the SunPro C++ compiler does not properly
399 # handle `-M -o', and we need to detect this.
400 if depmode="$depmode" \
401 source=conftest.c object=conftest.o \
402 depfile=conftest.Po tmpdepfile=conftest.TPo \
403 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
404 grep conftest.h conftest.Po > /dev/null 2>&1; then
405 am_cv_$1_dependencies_compiler_type="$depmode"
413 am_cv_$1_dependencies_compiler_type=none
416 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
417 AC_SUBST([$1DEPMODE])
423 # Choose a directory name for dependency files.
424 # This macro is AC_REQUIREd in AM_DEPENDENCIES
425 AC_DEFUN([AM_SET_DEPDIR],
426 [if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
428 # We redirect because .deps might already exist and be populated.
429 # In this situation we don't want to see an error.
430 rmdir .deps > /dev/null 2>&1
440 AC_DEFUN([AM_DEP_TRACK],
441 [AC_ARG_ENABLE(dependency-tracking,
442 [ --disable-dependency-tracking Speeds up one-time builds
443 --enable-dependency-tracking Do not reject slow dependency extractors])
444 if test "x$enable_dependency_tracking" = xno; then
447 am_depcomp="$ac_aux_dir/depcomp"
448 if test ! -f "$am_depcomp"; then
455 if test -z "$AMDEP"; then
460 pushdef([subst], defn([AC_SUBST]))
461 subst(AMDEPBACKSLASH)
465 # Generate code to set up dependency tracking.
466 # This macro should only be invoked once -- use via AC_REQUIRE.
468 # AM_OUTPUT_DEPENDENCY_COMMANDS
471 # This code is only required when automatic dependency tracking
472 # is enabled. FIXME. This creates each `.P' file that we will
473 # need in order to bootstrap the dependency handling code.
474 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
476 test x"$AMDEP" != x"" ||
477 for mf in $CONFIG_FILES; do
479 Makefile) dirpart=.;;
480 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
483 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
484 # Extract the definition of DEP_FILES from the Makefile without
486 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
487 test -z "$DEPDIR" && continue
488 # When using ansi2knr, U may be empty or an underscore; expand it
489 U=`sed -n -e '/^U = / s///p' < "$mf"`
490 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
491 # We invoke sed twice because it is the simplest approach to
492 # changing $(DEPDIR) to its actual value in the expansion.
493 for file in `sed -n -e '
494 /^DEP_FILES = .*\\\\$/ {
503 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
504 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
505 # Make sure the directory exists.
506 test -f "$dirpart/$file" && continue
507 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
508 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
509 # echo "creating $dirpart/$file"
510 echo '# dummy' > "$dirpart/$file"
514 ac_aux_dir="$ac_aux_dir"])])
518 # Check to see how make treats includes.
519 AC_DEFUN([AM_MAKE_INCLUDE],
520 [am_make=${MAKE-make}
521 # BSD make uses .include
522 cat > confinc << 'END'
526 # If we don't find an include directive, just comment out the code.
527 AC_MSG_CHECKING([for style of include used by $am_make])
529 for am_inc in include .include; do
530 echo "$am_inc confinc" > confmf
531 if test "`$am_make -f confmf 2> /dev/null`" = "done"; then
536 AC_SUBST(_am_include)
537 AC_MSG_RESULT($_am_include)
544 AC_DEFUN([AM_C_PROTOTYPES],
545 [AC_REQUIRE([AM_PROG_CC_STDC])
546 AC_REQUIRE([AC_PROG_CPP])
547 AC_MSG_CHECKING([for function prototypes])
548 if test "$am_cv_prog_cc_stdc" != no; then
550 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
554 U=_ ANSI2KNR=./ansi2knr
556 # Ensure some checks needed by ansi2knr itself.
558 AC_CHECK_HEADERS(string.h)
560 AC_SUBST(ANSI2KNR)dnl
566 # @defmac AC_PROG_CC_STDC
567 # @maindex PROG_CC_STDC
569 # If the C compiler in not in ANSI C mode by default, try to add an option
570 # to output variable @code{CC} to make it so. This macro tries various
571 # options that select ANSI C on some system or another. It considers the
572 # compiler to be in ANSI C mode if it handles function prototypes correctly.
574 # If you use this macro, you should check after calling it whether the C
575 # compiler has been set to accept ANSI C; if not, the shell variable
576 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
577 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
578 # program @code{ansi2knr}, which comes with Ghostscript.
581 AC_DEFUN([AM_PROG_CC_STDC],
582 [AC_REQUIRE([AC_PROG_CC])
583 AC_BEFORE([$0], [AC_C_INLINE])
584 AC_BEFORE([$0], [AC_C_CONST])
585 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
586 dnl a magic option to avoid problems with ANSI preprocessor commands
588 dnl FIXME: can't do this because then AC_AIX won't work due to a
589 dnl circular dependency.
590 dnl AC_BEFORE([$0], [AC_PROG_CPP])
591 AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
592 AC_CACHE_VAL(am_cv_prog_cc_stdc,
593 [am_cv_prog_cc_stdc=no
595 # Don't try gcc -ansi; that turns off useful extensions and
596 # breaks some systems' header files.
598 # Ultrix and OSF/1 -std1
599 # HP-UX 10.20 and later -Ae
600 # HP-UX older versions -Aa -D_HPUX_SOURCE
601 # SVR4 -Xc -D__EXTENSIONS__
602 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
604 CC="$ac_save_CC $ac_arg"
608 #include <sys/types.h>
609 #include <sys/stat.h>
610 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
611 struct buf { int x; };
612 FILE * (*rcsopen) (struct buf *, struct stat *, int);
613 static char *e (p, i)
619 static char *f (char * (*g) (char **, int), char **p, ...)
624 s = g (p, va_arg (v,int));
628 int test (int i, double x);
629 struct s1 {int (*f) (int a);};
630 struct s2 {int (*f) (double a);};
631 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
635 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
637 [am_cv_prog_cc_stdc="$ac_arg"; break])
641 if test -z "$am_cv_prog_cc_stdc"; then
642 AC_MSG_RESULT([none needed])
644 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
646 case "x$am_cv_prog_cc_stdc" in
648 *) CC="$CC $am_cv_prog_cc_stdc" ;;