1 # aclocal.m4 generated automatically by aclocal 1.4k
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 # Do all the work for Automake. This macro actually does too much --
15 # some checks are only needed if your package does certain things.
16 # But this isn't really a big deal.
20 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
21 # written in clear, in which case automake, when reading aclocal.m4,
22 # will think it sees a *use*, and therefore will trigger all it's
23 # C support machinery. Also note that it means that autoscan, seeing
24 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
27 # We require 2.13 because we rely on SHELL being computed by configure.
30 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
31 # -----------------------------------------------------------
32 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
33 # The purpose of this macro is to provide the user with a means to
34 # check macros which are provided without letting her know how the
35 # information is coded.
36 # If this macro is not defined by Autoconf, define it here.
37 ifdef([AC_PROVIDE_IFELSE],
39 [define([AC_PROVIDE_IFELSE],
40 [ifdef([AC_PROVIDE_$1],
44 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
45 # ----------------------------------------------
46 AC_DEFUN([AM_INIT_AUTOMAKE],
47 [AC_REQUIRE([AC_PROG_INSTALL])dnl
48 # test to see if srcdir already configured
49 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
50 test -f $srcdir/config.status; then
51 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
54 # Define the identity of the package.
60 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
61 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
63 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
64 # the ones we care about.
65 ifdef([m4_pattern_allow],
66 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
68 # Autoconf 2.50 always computes EXEEXT. However we need to be
69 # compatible with 2.13, for now. So we always define EXEEXT, but we
72 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
73 # requests that it be used. This is a bit dumb.
77 # Some tools Automake needs.
78 AC_REQUIRE([AM_SANITY_CHECK])dnl
79 AC_REQUIRE([AC_ARG_PROGRAM])dnl
80 AM_MISSING_PROG(ACLOCAL, aclocal)
81 AM_MISSING_PROG(AUTOCONF, autoconf)
82 AM_MISSING_PROG(AUTOMAKE, automake)
83 AM_MISSING_PROG(AUTOHEADER, autoheader)
84 AM_MISSING_PROG(MAKEINFO, makeinfo)
85 AM_MISSING_PROG(AMTAR, tar)
88 # We need awk for the "check" target. The system "awk" is bad on
90 AC_REQUIRE([AC_PROG_AWK])dnl
91 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
92 AC_REQUIRE([AM_DEP_TRACK])dnl
93 AC_REQUIRE([AM_SET_DEPDIR])dnl
94 AC_PROVIDE_IFELSE([AC_PROG_][CC],
95 [_AM_DEPENDENCIES(CC)],
96 [define([AC_PROG_][CC],
97 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
98 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
99 [_AM_DEPENDENCIES(CXX)],
100 [define([AC_PROG_][CXX],
101 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
105 # Check to make sure that the build environment is sane.
112 AC_DEFUN([AM_SANITY_CHECK],
113 [AC_MSG_CHECKING([whether build environment is sane])
116 echo timestamp > conftest.file
117 # Do `set' in a subshell so we don't clobber the current shell's
118 # arguments. Must try -L first in case configure is actually a
119 # symlink; some systems play weird games with the mod time of symlinks
120 # (eg FreeBSD returns the mod time of the symlink's containing
123 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
124 if test "$[*]" = "X"; then
126 set X `ls -t $srcdir/configure conftest.file`
129 if test "$[*]" != "X $srcdir/configure conftest.file" \
130 && test "$[*]" != "X conftest.file $srcdir/configure"; then
132 # If neither matched, then we have a broken ls. This can happen
133 # if, for instance, CONFIG_SHELL is bash and it inherits a
134 # broken ls alias from the environment. This has actually
135 # happened. Such a system could not be considered "sane".
136 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
137 alias in your environment])
140 test "$[2]" = conftest.file
146 AC_MSG_ERROR([newly created file is older than distributed files!
147 Check your system clock])
154 # AM_MISSING_PROG(NAME, PROGRAM)
155 # ------------------------------
156 AC_DEFUN([AM_MISSING_PROG],
157 [AC_REQUIRE([AM_MISSING_HAS_RUN])
158 $1=${$1-"${am_missing_run}$2"}
164 # Define MISSING if not defined so far and test if it supports --run.
165 # If it does, set am_missing_run to use it, otherwise, to nothing.
166 AC_DEFUN([AM_MISSING_HAS_RUN],
167 [test x"${MISSING+set}" = xset ||
168 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
169 # Use eval to expand $SHELL
170 if eval "$MISSING --run true"; then
171 am_missing_run="$MISSING --run "
175 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
181 # Define $install_sh.
182 AC_DEFUN([AM_PROG_INSTALL_SH],
183 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
184 install_sh=${install_sh-"$am_aux_dir/install-sh"}
185 AC_SUBST(install_sh)])
189 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
190 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
191 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
193 # Of course, Automake must honor this variable whenever it calls a
194 # tool from the auxiliary directory. The problem is that $srcdir (and
195 # therefore $ac_aux_dir as well) can be either absolute or relative,
196 # depending on how configure is run. This is pretty annoying, since
197 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
198 # source directory, any form will work fine, but in subdirectories a
199 # relative path needs to be adjusted first.
201 # $ac_aux_dir/missing
202 # fails when called from a subdirectory if $ac_aux_dir is relative
203 # $top_srcdir/$ac_aux_dir/missing
204 # fails if $ac_aux_dir is absolute,
205 # fails when called from a subdirectory in a VPATH build with
206 # a relative $ac_aux_dir
208 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
209 # are both prefixed by $srcdir. In an in-source build this is usually
210 # harmless because $srcdir is `.', but things will broke when you
211 # start a VPATH build or use an absolute $srcdir.
213 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
214 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
215 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
216 # and then we would define $MISSING as
217 # MISSING="\${SHELL} $am_aux_dir/missing"
218 # This will work as long as MISSING is not called from configure, because
219 # unfortunately $(top_srcdir) has no meaning in configure.
220 # However there are other variables, like CC, which are often used in
221 # configure, and could therefore not use this "fixed" $ac_aux_dir.
223 # Another solution, used here, is to always expand $ac_aux_dir to an
224 # absolute PATH. The drawback is that using absolute paths prevent a
225 # configured tree to be moved without reconfiguration.
227 AC_DEFUN([AM_AUX_DIR_EXPAND], [
228 # expand $ac_aux_dir to an absolute path
229 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
232 # One issue with vendor `install' (even GNU) is that you can't
233 # specify the program used to strip binaries. This is especially
234 # annoying in cross-compiling environments, where the build's strip
235 # is unlikely to handle the host's binaries.
236 # Fortunately install-sh will honor a STRIPPROG variable, so we
237 # always use install-sh in `make install-strip', and initialize
238 # STRIPPROG with the value of the STRIP variable (set by the user).
239 AC_DEFUN([AM_PROG_INSTALL_STRIP],
240 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
241 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
242 AC_SUBST([INSTALL_STRIP_PROGRAM])])
244 # serial 4 -*- Autoconf -*-
248 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
249 # written in clear, in which case automake, when reading aclocal.m4,
250 # will think it sees a *use*, and therefore will trigger all it's
251 # C support machinery. Also note that it means that autoscan, seeing
252 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
256 # _AM_DEPENDENCIES(NAME)
257 # ---------------------
258 # See how the compiler implements dependency checking.
259 # NAME is "CC", "CXX" or "OBJC".
260 # We try a few techniques and use that to set a single cache variable.
262 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
263 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
264 # dependency, and given that the user is not expected to run this macro,
265 # just rely on AC_PROG_CC.
266 AC_DEFUN([_AM_DEPENDENCIES],
267 [AC_REQUIRE([AM_SET_DEPDIR])dnl
268 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
269 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
270 AC_REQUIRE([AM_DEP_TRACK])dnl
272 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
273 [$1], CXX, [depcc="$CXX" am_compiler_list=],
274 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
275 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
276 [depcc="$$1" am_compiler_list=])
278 AC_CACHE_CHECK([dependency style of $depcc],
279 [am_cv_$1_dependencies_compiler_type],
280 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
281 # We make a subdir and do the tests there. Otherwise we can end up
282 # making bogus files that we don't know about and never remove. For
283 # instance it was reported that on HP-UX the gcc test will end up
284 # making a dummy file named `D' -- because `-MD' means `put the output
287 # Copy depcomp to subdir because otherwise we won't find it if we're
288 # using a relative directory.
289 cp "$am_depcomp" conftest.dir
292 am_cv_$1_dependencies_compiler_type=none
293 if test "$am_compiler_list" = ""; then
294 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
296 for depmode in $am_compiler_list; do
297 # We need to recreate these files for each test, as the compiler may
298 # overwrite some of them when testing with obscure command lines.
299 # This happens at least with the AIX C compiler.
300 echo '#include "conftest.h"' > conftest.c
301 echo 'int i;' > conftest.h
302 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
306 # after this tag, mechanisms are not by side-effect, so they'll
307 # only be used when explicitly requested
308 if test "x$enable_dependency_tracking" = xyes; then
316 # We check with `-c' and `-o' for the sake of the "dashmstdout"
317 # mode. It turns out that the SunPro C++ compiler does not properly
318 # handle `-M -o', and we need to detect this.
319 if depmode=$depmode \
320 source=conftest.c object=conftest.o \
321 depfile=conftest.Po tmpdepfile=conftest.TPo \
322 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
323 grep conftest.h conftest.Po > /dev/null 2>&1 &&
324 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
325 am_cv_$1_dependencies_compiler_type=$depmode
333 am_cv_$1_dependencies_compiler_type=none
336 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
337 AC_SUBST([$1DEPMODE])
343 # Choose a directory name for dependency files.
344 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
345 AC_DEFUN([AM_SET_DEPDIR],
346 [rm -f .deps 2>/dev/null
347 mkdir .deps 2>/dev/null
348 if test -d .deps; then
351 # MS-DOS does not allow filenames that begin with a dot.
354 rmdir .deps 2>/dev/null
361 AC_DEFUN([AM_DEP_TRACK],
362 [AC_ARG_ENABLE(dependency-tracking,
363 [ --disable-dependency-tracking Speeds up one-time builds
364 --enable-dependency-tracking Do not reject slow dependency extractors])
365 if test "x$enable_dependency_tracking" != xno; then
366 am_depcomp="$ac_aux_dir/depcomp"
369 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
370 pushdef([subst], defn([AC_SUBST]))
371 subst(AMDEPBACKSLASH)
375 # Generate code to set up dependency tracking.
376 # This macro should only be invoked once -- use via AC_REQUIRE.
378 # AM_OUTPUT_DEPENDENCY_COMMANDS
381 # This code is only required when automatic dependency tracking
382 # is enabled. FIXME. This creates each `.P' file that we will
383 # need in order to bootstrap the dependency handling code.
384 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
386 test x"$AMDEP_TRUE" != x"" ||
387 for mf in $CONFIG_FILES; do
389 Makefile) dirpart=.;;
390 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
393 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
394 # Extract the definition of DEP_FILES from the Makefile without
396 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
397 test -z "$DEPDIR" && continue
398 # When using ansi2knr, U may be empty or an underscore; expand it
399 U=`sed -n -e '/^U = / s///p' < "$mf"`
400 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
401 # We invoke sed twice because it is the simplest approach to
402 # changing $(DEPDIR) to its actual value in the expansion.
403 for file in `sed -n -e '
404 /^DEP_FILES = .*\\\\$/ {
413 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
414 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
415 # Make sure the directory exists.
416 test -f "$dirpart/$file" && continue
417 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
418 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
419 # echo "creating $dirpart/$file"
420 echo '# dummy' > "$dirpart/$file"
423 ], [AMDEP_TRUE="$AMDEP_TRUE"
424 ac_aux_dir="$ac_aux_dir"])])
428 # Check to see how make treats includes.
429 AC_DEFUN([AM_MAKE_INCLUDE],
430 [am_make=${MAKE-make}
431 cat > confinc << 'END'
435 # If we don't find an include directive, just comment out the code.
436 AC_MSG_CHECKING([for style of include used by $am_make])
440 # First try GNU make style include.
441 echo "include confinc" > confmf
442 # We grep out `Entering directory' and `Leaving directory'
443 # messages which can occur if `w' ends up in MAKEFLAGS.
444 # In particular we don't look at `^make:' because GNU make might
445 # be invoked under some other name (usually "gmake"), in which
446 # case it prints its new name instead of `make'.
447 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
452 # Now try BSD make style include.
453 if test "$am__include" = "#"; then
454 echo '.include "confinc"' > confmf
455 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
461 AC_SUBST(am__include)
463 AC_MSG_RESULT($_am_result)
469 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
470 # -------------------------------------
471 # Define a conditional.
473 # FIXME: Once using 2.50, use this:
474 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
475 AC_DEFUN([AM_CONDITIONAL],
476 [ifelse([$1], [TRUE],
477 [errprint(__file__:__line__: [$0: invalid condition: $1
480 ifelse([$1], [FALSE],
481 [errprint(__file__:__line__: [$0: invalid condition: $1