1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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 m4_define([AH_LCLINT_TEMPLATE],
16 m4_text_wrap([$2 */], [ ], [/* ])
17 m4_text_wrap([$3@*/], [ ], [/*@])[
20 m4_define([AC_DEFINE_LCLINT],
21 [AC_DEFINE_TRACE([$1])dnl
22 AH_LCLINT_TEMPLATE([$1], [$3], [$4])dnl
23 cat >>confdefs.h <<\_ACEOF
28 # Do all the work for Automake. This macro actually does too much --
29 # some checks are only needed if your package does certain things.
30 # But this isn't really a big deal.
34 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
35 # written in clear, in which case automake, when reading aclocal.m4,
36 # will think it sees a *use*, and therefore will trigger all it's
37 # C support machinery. Also note that it means that autoscan, seeing
38 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
41 # We require 2.13 because we rely on SHELL being computed by configure.
44 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
45 # -----------------------------------------------------------
46 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
47 # The purpose of this macro is to provide the user with a means to
48 # check macros which are provided without letting her know how the
49 # information is coded.
50 # If this macro is not defined by Autoconf, define it here.
51 ifdef([AC_PROVIDE_IFELSE],
53 [define([AC_PROVIDE_IFELSE],
54 [ifdef([AC_PROVIDE_$1],
58 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
59 # ----------------------------------------------
60 AC_DEFUN([AM_INIT_AUTOMAKE],
61 [AC_REQUIRE([AC_PROG_INSTALL])dnl
62 # test to see if srcdir already configured
63 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
64 test -f $srcdir/config.status; then
65 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
68 # Define the identity of the package.
74 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
75 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
77 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
78 # the ones we care about.
79 ifdef([m4_pattern_allow],
80 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
82 # Autoconf 2.50 always computes EXEEXT. However we need to be
83 # compatible with 2.13, for now. So we always define EXEEXT, but we
86 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
87 # requests that it be used. This is a bit dumb.
91 # Some tools Automake needs.
92 AC_REQUIRE([AM_SANITY_CHECK])dnl
93 AC_REQUIRE([AC_ARG_PROGRAM])dnl
94 AM_MISSING_PROG(ACLOCAL, aclocal)
95 AM_MISSING_PROG(AUTOCONF, autoconf)
96 AM_MISSING_PROG(AUTOMAKE, automake)
97 AM_MISSING_PROG(AUTOHEADER, autoheader)
98 AM_MISSING_PROG(MAKEINFO, makeinfo)
99 AM_MISSING_PROG(AMTAR, tar)
101 AM_PROG_INSTALL_STRIP
102 # We need awk for the "check" target. The system "awk" is bad on
104 AC_REQUIRE([AC_PROG_AWK])dnl
105 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
106 AC_REQUIRE([AM_DEP_TRACK])dnl
107 AC_REQUIRE([AM_SET_DEPDIR])dnl
108 AC_PROVIDE_IFELSE([AC_PROG_][CC],
109 [_AM_DEPENDENCIES(CC)],
110 [define([AC_PROG_][CC],
111 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
112 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
113 [_AM_DEPENDENCIES(CXX)],
114 [define([AC_PROG_][CXX],
115 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
119 # Check to make sure that the build environment is sane.
126 AC_DEFUN([AM_SANITY_CHECK],
127 [AC_MSG_CHECKING([whether build environment is sane])
130 echo timestamp > conftest.file
131 # Do `set' in a subshell so we don't clobber the current shell's
132 # arguments. Must try -L first in case configure is actually a
133 # symlink; some systems play weird games with the mod time of symlinks
134 # (eg FreeBSD returns the mod time of the symlink's containing
137 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
138 if test "$[*]" = "X"; then
140 set X `ls -t $srcdir/configure conftest.file`
143 if test "$[*]" != "X $srcdir/configure conftest.file" \
144 && test "$[*]" != "X conftest.file $srcdir/configure"; then
146 # If neither matched, then we have a broken ls. This can happen
147 # if, for instance, CONFIG_SHELL is bash and it inherits a
148 # broken ls alias from the environment. This has actually
149 # happened. Such a system could not be considered "sane".
150 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
151 alias in your environment])
154 test "$[2]" = conftest.file
160 AC_MSG_ERROR([newly created file is older than distributed files!
161 Check your system clock])
168 # AM_MISSING_PROG(NAME, PROGRAM)
169 # ------------------------------
170 AC_DEFUN([AM_MISSING_PROG],
171 [AC_REQUIRE([AM_MISSING_HAS_RUN])
172 $1=${$1-"${am_missing_run}$2"}
178 # Define MISSING if not defined so far and test if it supports --run.
179 # If it does, set am_missing_run to use it, otherwise, to nothing.
180 AC_DEFUN([AM_MISSING_HAS_RUN],
181 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
182 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
183 # Use eval to expand $SHELL
184 if eval "$MISSING --run true"; then
185 am_missing_run="$MISSING --run "
189 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
195 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
196 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
197 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
199 # Of course, Automake must honor this variable whenever it calls a
200 # tool from the auxiliary directory. The problem is that $srcdir (and
201 # therefore $ac_aux_dir as well) can be either absolute or relative,
202 # depending on how configure is run. This is pretty annoying, since
203 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
204 # source directory, any form will work fine, but in subdirectories a
205 # relative path needs to be adjusted first.
207 # $ac_aux_dir/missing
208 # fails when called from a subdirectory if $ac_aux_dir is relative
209 # $top_srcdir/$ac_aux_dir/missing
210 # fails if $ac_aux_dir is absolute,
211 # fails when called from a subdirectory in a VPATH build with
212 # a relative $ac_aux_dir
214 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
215 # are both prefixed by $srcdir. In an in-source build this is usually
216 # harmless because $srcdir is `.', but things will broke when you
217 # start a VPATH build or use an absolute $srcdir.
219 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
220 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
221 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
222 # and then we would define $MISSING as
223 # MISSING="\${SHELL} $am_aux_dir/missing"
224 # This will work as long as MISSING is not called from configure, because
225 # unfortunately $(top_srcdir) has no meaning in configure.
226 # However there are other variables, like CC, which are often used in
227 # configure, and could therefore not use this "fixed" $ac_aux_dir.
229 # Another solution, used here, is to always expand $ac_aux_dir to an
230 # absolute PATH. The drawback is that using absolute paths prevent a
231 # configured tree to be moved without reconfiguration.
233 AC_DEFUN([AM_AUX_DIR_EXPAND], [
234 # expand $ac_aux_dir to an absolute path
235 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
240 # Define $install_sh.
241 AC_DEFUN([AM_PROG_INSTALL_SH],
242 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
243 install_sh=${install_sh-"$am_aux_dir/install-sh"}
244 AC_SUBST(install_sh)])
246 # One issue with vendor `install' (even GNU) is that you can't
247 # specify the program used to strip binaries. This is especially
248 # annoying in cross-compiling environments, where the build's strip
249 # is unlikely to handle the host's binaries.
250 # Fortunately install-sh will honor a STRIPPROG variable, so we
251 # always use install-sh in `make install-strip', and initialize
252 # STRIPPROG with the value of the STRIP variable (set by the user).
253 AC_DEFUN([AM_PROG_INSTALL_STRIP],
254 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
255 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
256 AC_SUBST([INSTALL_STRIP_PROGRAM])])
258 # serial 4 -*- Autoconf -*-
262 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
263 # written in clear, in which case automake, when reading aclocal.m4,
264 # will think it sees a *use*, and therefore will trigger all it's
265 # C support machinery. Also note that it means that autoscan, seeing
266 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
270 # _AM_DEPENDENCIES(NAME)
271 # ---------------------
272 # See how the compiler implements dependency checking.
273 # NAME is "CC", "CXX" or "OBJC".
274 # We try a few techniques and use that to set a single cache variable.
276 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
277 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
278 # dependency, and given that the user is not expected to run this macro,
279 # just rely on AC_PROG_CC.
280 AC_DEFUN([_AM_DEPENDENCIES],
281 [AC_REQUIRE([AM_SET_DEPDIR])dnl
282 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
283 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
284 AC_REQUIRE([AM_DEP_TRACK])dnl
286 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
287 [$1], CXX, [depcc="$CXX" am_compiler_list=],
288 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
289 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
290 [depcc="$$1" am_compiler_list=])
292 AC_CACHE_CHECK([dependency style of $depcc],
293 [am_cv_$1_dependencies_compiler_type],
294 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
295 # We make a subdir and do the tests there. Otherwise we can end up
296 # making bogus files that we don't know about and never remove. For
297 # instance it was reported that on HP-UX the gcc test will end up
298 # making a dummy file named `D' -- because `-MD' means `put the output
301 # Copy depcomp to subdir because otherwise we won't find it if we're
302 # using a relative directory.
303 cp "$am_depcomp" conftest.dir
306 am_cv_$1_dependencies_compiler_type=none
307 if test "$am_compiler_list" = ""; then
308 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
310 for depmode in $am_compiler_list; do
311 # We need to recreate these files for each test, as the compiler may
312 # overwrite some of them when testing with obscure command lines.
313 # This happens at least with the AIX C compiler.
314 echo '#include "conftest.h"' > conftest.c
315 echo 'int i;' > conftest.h
316 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
320 # after this tag, mechanisms are not by side-effect, so they'll
321 # only be used when explicitly requested
322 if test "x$enable_dependency_tracking" = xyes; then
330 # We check with `-c' and `-o' for the sake of the "dashmstdout"
331 # mode. It turns out that the SunPro C++ compiler does not properly
332 # handle `-M -o', and we need to detect this.
333 if depmode=$depmode \
334 source=conftest.c object=conftest.o \
335 depfile=conftest.Po tmpdepfile=conftest.TPo \
336 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
337 grep conftest.h conftest.Po > /dev/null 2>&1 &&
338 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
339 am_cv_$1_dependencies_compiler_type=$depmode
347 am_cv_$1_dependencies_compiler_type=none
350 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
351 AC_SUBST([$1DEPMODE])
357 # Choose a directory name for dependency files.
358 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
359 AC_DEFUN([AM_SET_DEPDIR],
360 [rm -f .deps 2>/dev/null
361 mkdir .deps 2>/dev/null
362 if test -d .deps; then
365 # MS-DOS does not allow filenames that begin with a dot.
368 rmdir .deps 2>/dev/null
375 AC_DEFUN([AM_DEP_TRACK],
376 [AC_ARG_ENABLE(dependency-tracking,
377 [ --disable-dependency-tracking Speeds up one-time builds
378 --enable-dependency-tracking Do not reject slow dependency extractors])
379 if test "x$enable_dependency_tracking" != xno; then
380 am_depcomp="$ac_aux_dir/depcomp"
383 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
384 pushdef([subst], defn([AC_SUBST]))
385 subst(AMDEPBACKSLASH)
389 # Generate code to set up dependency tracking.
390 # This macro should only be invoked once -- use via AC_REQUIRE.
392 # AM_OUTPUT_DEPENDENCY_COMMANDS
395 # This code is only required when automatic dependency tracking
396 # is enabled. FIXME. This creates each `.P' file that we will
397 # need in order to bootstrap the dependency handling code.
398 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
400 test x"$AMDEP_TRUE" != x"" ||
401 for mf in $CONFIG_FILES; do
403 Makefile) dirpart=.;;
404 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
407 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
408 # Extract the definition of DEP_FILES from the Makefile without
410 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
411 test -z "$DEPDIR" && continue
412 # When using ansi2knr, U may be empty or an underscore; expand it
413 U=`sed -n -e '/^U = / s///p' < "$mf"`
414 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
415 # We invoke sed twice because it is the simplest approach to
416 # changing $(DEPDIR) to its actual value in the expansion.
417 for file in `sed -n -e '
418 /^DEP_FILES = .*\\\\$/ {
427 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
428 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
429 # Make sure the directory exists.
430 test -f "$dirpart/$file" && continue
431 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
432 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
433 # echo "creating $dirpart/$file"
434 echo '# dummy' > "$dirpart/$file"
437 ], [AMDEP_TRUE="$AMDEP_TRUE"
438 ac_aux_dir="$ac_aux_dir"])])
442 # Check to see how make treats includes.
443 AC_DEFUN([AM_MAKE_INCLUDE],
444 [am_make=${MAKE-make}
445 cat > confinc << 'END'
449 # If we don't find an include directive, just comment out the code.
450 AC_MSG_CHECKING([for style of include used by $am_make])
454 # First try GNU make style include.
455 echo "include confinc" > confmf
456 # We grep out `Entering directory' and `Leaving directory'
457 # messages which can occur if `w' ends up in MAKEFLAGS.
458 # In particular we don't look at `^make:' because GNU make might
459 # be invoked under some other name (usually "gmake"), in which
460 # case it prints its new name instead of `make'.
461 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
466 # Now try BSD make style include.
467 if test "$am__include" = "#"; then
468 echo '.include "confinc"' > confmf
469 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
475 AC_SUBST(am__include)
477 AC_MSG_RESULT($_am_result)
483 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
484 # -------------------------------------
485 # Define a conditional.
487 # FIXME: Once using 2.50, use this:
488 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
489 AC_DEFUN([AM_CONDITIONAL],
490 [ifelse([$1], [TRUE],
491 [errprint(__file__:__line__: [$0: invalid condition: $1
494 ifelse([$1], [FALSE],
495 [errprint(__file__:__line__: [$0: invalid condition: $1
508 # Like AC_CONFIG_HEADER, but automatically create stamp file.
512 # When config.status generates a header, we must update the stamp-h file.
513 # This file resides in the same directory as the config header
514 # that is generated. We must strip everything past the first ":",
515 # and everything past the last "/".
519 AC_DEFUN([AM_CONFIG_HEADER],
520 [ifdef([AC_FOREACH],dnl
521 [dnl init our file count if it isn't already
522 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
523 dnl prepare to store our destination file list for use in config.status
524 AC_FOREACH([_AM_File], [$1],
525 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
526 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
527 dnl and add it to the list of files AC keeps track of, along
529 AC_CONFIG_HEADERS(_AM_File,
530 dnl COMMANDS, [, INIT-CMDS]
531 [# update the timestamp
532 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
533 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
534 m4_popdef([_AM_Dest])])],dnl
535 [AC_CONFIG_HEADER([$1])
537 ifelse(patsubst([$1], [[^ ]], []),
539 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
540 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
542 for am_file in $1; do
543 case " \$CONFIG_HEADERS " in
545 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
546 if test -n "\$am_dir"; then
547 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
548 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
549 am_tmpdir=\$am_tmpdir\$am_subdir/
550 if test ! -d \$am_tmpdir; then
555 echo timestamp > "\$am_dir"stamp-h\$am_indx
558 am_indx=\`expr \$am_indx + 1\`
560 ])]) # AM_CONFIG_HEADER
564 # Like AS_DIRNAME, only do it during macro expansion
565 AC_DEFUN([_AM_DIRNAME],
566 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
567 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
568 m4_if(m4_regexp([$1], [^/.*]), -1,
570 m4_patsubst([$1], [^\(/\).*], [\1])),
571 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
572 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
577 # Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
578 AC_DEFUN([AM_PROG_LEX],
579 [AC_REQUIRE([AM_MISSING_HAS_RUN])
580 AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])