1 # aclocal.m4 generated automatically by aclocal 1.4c
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 # 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 # Some tools Automake needs.
64 AC_REQUIRE([AM_SANITY_CHECK])dnl
65 AC_REQUIRE([AC_ARG_PROGRAM])dnl
66 AM_MISSING_PROG(ACLOCAL, aclocal)
67 AM_MISSING_PROG(AUTOCONF, autoconf)
68 AM_MISSING_PROG(AUTOMAKE, automake)
69 AM_MISSING_PROG(AUTOHEADER, autoheader)
70 AM_MISSING_PROG(MAKEINFO, makeinfo)
71 AM_MISSING_PROG(AMTAR, tar)
73 # We need awk for the "check" target. The system "awk" is bad on
75 AC_REQUIRE([AC_PROG_AWK])dnl
76 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
77 AC_REQUIRE([AM_DEP_TRACK])dnl
78 AC_REQUIRE([AM_SET_DEPDIR])dnl
79 AC_PROVIDE_IFELSE([AC_PROG_][CC],
80 [AM_DEPENDENCIES(CC)],
81 [define([AC_PROG_][CC],
82 defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
83 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
84 [AM_DEPENDENCIES(CXX)],
85 [define([AC_PROG_][CXX],
86 defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
90 # Check to make sure that the build environment is sane.
97 AC_DEFUN([AM_SANITY_CHECK],
98 [AC_MSG_CHECKING([whether build environment is sane])
101 echo timestamp > conftest.file
102 # Do `set' in a subshell so we don't clobber the current shell's
103 # arguments. Must try -L first in case configure is actually a
104 # symlink; some systems play weird games with the mod time of symlinks
105 # (eg FreeBSD returns the mod time of the symlink's containing
108 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
109 if test "$[*]" = "X"; then
111 set X `ls -t $srcdir/configure conftest.file`
113 if test "$[*]" != "X $srcdir/configure conftest.file" \
114 && test "$[*]" != "X conftest.file $srcdir/configure"; then
116 # If neither matched, then we have a broken ls. This can happen
117 # if, for instance, CONFIG_SHELL is bash and it inherits a
118 # broken ls alias from the environment. This has actually
119 # happened. Such a system could not be considered "sane".
120 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
121 alias in your environment])
124 test "$[2]" = conftest.file
130 AC_MSG_ERROR([newly created file is older than distributed files!
131 Check your system clock])
139 # AM_MISSING_PROG(NAME, PROGRAM)
140 # ------------------------------
141 AC_DEFUN([AM_MISSING_PROG],
142 [AC_REQUIRE([AM_MISSING_HAS_RUN])
143 $1=${$1-"${am_missing_run}$2"}
147 # AM_MISSING_INSTALL_SH
148 # ---------------------
149 # Like AM_MISSING_PROG, but only looks for install-sh.
150 AC_DEFUN([AM_MISSING_INSTALL_SH],
151 [AC_REQUIRE([AM_MISSING_HAS_RUN])
152 if test -z "$install_sh"; then
153 for install_sh in "$ac_aux_dir/install-sh" \
154 "$ac_aux_dir/install.sh" \
155 "${am_missing_run}${ac_auxdir}/install-sh";
157 test -f "$install_sh" && break
159 # FIXME: an evil hack: we remove the SHELL invocation from
160 # install_sh because automake adds it back in. Sigh.
161 install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
163 AC_SUBST(install_sh)])
168 # Define MISSING if not defined so far and test if it supports --run.
169 # If it does, set am_missing_run to use it, otherwise, to nothing.
170 AC_DEFUN([AM_MISSING_HAS_RUN],
171 [test x"${MISSING+set}" = xset ||
172 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
173 # Use eval to expand $SHELL
174 if eval "$MISSING --run :"; then
175 am_missing_run="$MISSING --run "
179 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
185 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
186 # written in clear, in which case automake, when reading aclocal.m4,
187 # will think it sees a *use*, and therefore will trigger all it's
188 # C support machinery. Also note that it means that autoscan, seeing
189 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
191 # AM_DEPENDENCIES(NAME)
192 # ---------------------
193 # See how the compiler implements dependency checking.
194 # NAME is "CC", "CXX" or "OBJC".
195 # We try a few techniques and use that to set a single cache variable.
196 AC_DEFUN([AM_DEPENDENCIES],
197 [AC_REQUIRE([AM_SET_DEPDIR])dnl
198 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
200 [AC_REQUIRE([AC_PROG_][CC])dnl
201 AC_REQUIRE([AC_PROG_][CPP])
204 [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl
205 AC_REQUIRE([AC_PROG_][CXXCPP])
208 [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc],
209 [AC_REQUIRE([AC_PROG_][$1])dnl
213 AC_CACHE_CHECK([dependency style of $depcc],
214 [am_cv_$1_dependencies_compiler_type],
215 [if test -z "$AMDEP"; then
216 echo '#include "conftest.h"' > conftest.c
217 echo 'int i;' > conftest.h
219 am_cv_$1_dependencies_compiler_type=none
220 for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "$am_depcomp"`; do
223 # after this tag, mechanisms are not by side-effect, so they'll
224 # only be used when explicitly requested
225 if test "x$enable_dependency_tracking" = xyes; then
233 # We check with `-c' and `-o' for the sake of the "dashmstdout"
234 # mode. It turns out that the SunPro C++ compiler does not properly
235 # handle `-M -o', and we need to detect this.
236 if depmode="$depmode" \
237 source=conftest.c object=conftest.o \
238 depfile=conftest.Po tmpdepfile=conftest.TPo \
239 $SHELL $am_depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
240 grep conftest.h conftest.Po > /dev/null 2>&1; then
241 am_cv_$1_dependencies_compiler_type="$depmode"
248 am_cv_$1_dependencies_compiler_type=none
251 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
252 AC_SUBST([$1DEPMODE])
258 # Choose a directory name for dependency files.
259 # This macro is AC_REQUIREd in AM_DEPENDENCIES
260 AC_DEFUN([AM_SET_DEPDIR],
261 [if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
263 # We redirect because .deps might already exist and be populated.
264 # In this situation we don't want to see an error.
265 rmdir .deps > /dev/null 2>&1
275 AC_DEFUN([AM_DEP_TRACK],
276 [AC_ARG_ENABLE(dependency-tracking,
277 [ --disable-dependency-tracking Speeds up one-time builds
278 --enable-dependency-tracking Do not reject slow dependency extractors])
279 if test "x$enable_dependency_tracking" = xno; then
282 am_depcomp="$ac_aux_dir/depcomp"
283 if test ! -f "$am_depcomp"; then
290 if test -z "$AMDEP"; then
295 pushdef([subst], defn([AC_SUBST]))
296 subst(AMDEPBACKSLASH)
300 # Generate code to set up dependency tracking.
301 # This macro should only be invoked once -- use via AC_REQUIRE.
303 # AM_OUTPUT_DEPENDENCY_COMMANDS
306 # This code is only required when automatic dependency tracking
307 # is enabled. FIXME. This creates each `.P' file that we will
308 # need in order to bootstrap the dependency handling code.
309 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
311 test x"$AMDEP" != x"" ||
312 for mf in $CONFIG_FILES; do
314 Makefile) dirpart=.;;
315 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
318 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
319 # Extract the definition of DEP_FILES from the Makefile without
321 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
322 test -z "$DEPDIR" && continue
323 # When using ansi2knr, U may be empty or an underscore; expand it
324 U=`sed -n -e '/^U = / s///p' < "$mf"`
325 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
326 # We invoke sed twice because it is the simplest approach to
327 # changing $(DEPDIR) to its actual value in the expansion.
328 for file in `sed -n -e '
329 /^DEP_FILES = .*\\\\$/ {
338 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
339 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
340 # Make sure the directory exists.
341 test -f "$dirpart/$file" && continue
342 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
343 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
344 # echo "creating $dirpart/$file"
345 echo '# dummy' > "$dirpart/$file"
349 ac_aux_dir="$ac_aux_dir"])])