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.
22 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
23 # -----------------------------------------------------------
24 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
25 # The purpose of this macro is to provide the user with a means to
26 # check macros which are provided without letting her know how the
27 # information is coded.
28 # If this macro is not defined by Autoconf, define it here.
29 ifdef([AC_PROVIDE_IFELSE],
31 [define([AC_PROVIDE_IFELSE],
32 [ifdef([AC_PROVIDE_$1],
36 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
37 # ----------------------------------------------
38 AC_DEFUN([AM_INIT_AUTOMAKE],
39 [dnl We require 2.13 because we rely on SHELL being computed by configure.
40 AC_REQUIRE([AC_PROG_INSTALL])dnl
41 # test to see if srcdir already configured
42 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
43 test -f $srcdir/config.status; then
44 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
47 # Define the identity of the package.
53 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
54 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
56 # Some tools Automake needs.
57 AC_REQUIRE([AM_SANITY_CHECK])dnl
58 AC_REQUIRE([AC_ARG_PROGRAM])dnl
59 AM_MISSING_PROG(ACLOCAL, aclocal)
60 AM_MISSING_PROG(AUTOCONF, autoconf)
61 AM_MISSING_PROG(AUTOMAKE, automake)
62 AM_MISSING_PROG(AUTOHEADER, autoheader)
63 AM_MISSING_PROG(MAKEINFO, makeinfo)
64 AM_MISSING_PROG(AMTAR, tar)
66 # We need awk for the "check" target. The system "awk" is bad on
68 AC_REQUIRE([AC_PROG_AWK])dnl
69 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
70 AC_REQUIRE([AM_DEP_TRACK])dnl
71 AC_REQUIRE([AM_SET_DEPDIR])dnl
72 AC_PROVIDE_IFELSE([AC_PROG_CC],
73 [AM_DEPENDENCIES(CC)],
75 defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])])dnl
76 AC_PROVIDE_IFELSE([AC_PROG_CXX],
77 [AM_DEPENDENCIES(CXX)],
78 [define([AC_PROG_CXX],
79 defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])])dnl
83 # Check to make sure that the build environment is sane.
86 AC_DEFUN([AM_SANITY_CHECK],
87 [AC_MSG_CHECKING([whether build environment is sane])
90 echo timestamp > conftestfile
91 # Do `set' in a subshell so we don't clobber the current shell's
92 # arguments. Must try -L first in case configure is actually a
93 # symlink; some systems play weird games with the mod time of symlinks
94 # (eg FreeBSD returns the mod time of the symlink's containing
97 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
98 if test "[$]*" = "X"; then
100 set X `ls -t $srcdir/configure conftestfile`
102 if test "[$]*" != "X $srcdir/configure conftestfile" \
103 && test "[$]*" != "X conftestfile $srcdir/configure"; then
105 # If neither matched, then we have a broken ls. This can happen
106 # if, for instance, CONFIG_SHELL is bash and it inherits a
107 # broken ls alias from the environment. This has actually
108 # happened. Such a system could not be considered "sane".
109 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
110 alias in your environment])
113 test "[$]2" = conftestfile
119 AC_MSG_ERROR([newly created file is older than distributed files!
120 Check your system clock])
125 # AM_MISSING_PROG(NAME, PROGRAM)
126 AC_DEFUN([AM_MISSING_PROG], [
127 AC_REQUIRE([AM_MISSING_HAS_RUN])
128 $1=${$1-"${am_missing_run}$2"}
131 # Like AM_MISSING_PROG, but only looks for install-sh.
132 # AM_MISSING_INSTALL_SH()
133 AC_DEFUN([AM_MISSING_INSTALL_SH], [
134 AC_REQUIRE([AM_MISSING_HAS_RUN])
135 if test -z "$install_sh"; then
136 install_sh="$ac_aux_dir/install-sh"
137 test -f "$install_sh" || install_sh="$ac_aux_dir/install.sh"
138 test -f "$install_sh" || install_sh="${am_missing_run}${ac_auxdir}/install-sh"
139 dnl FIXME: an evil hack: we remove the SHELL invocation from
140 dnl install_sh because automake adds it back in. Sigh.
141 install_sh="`echo $install_sh | sed -e 's/\${SHELL}//'`"
143 AC_SUBST(install_sh)])
145 # AM_MISSING_HAS_RUN.
146 # Define MISSING if not defined so far and test if it supports --run.
147 # If it does, set am_missing_run to use it, otherwise, to nothing.
148 AC_DEFUN([AM_MISSING_HAS_RUN], [
149 test x"${MISSING+set}" = xset || \
150 MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
151 # Use eval to expand $SHELL
152 if eval "$MISSING --run :"; then
153 am_missing_run="$MISSING --run "
157 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
161 # See how the compiler implements dependency checking.
163 # AM_DEPENDENCIES(NAME)
164 # NAME is "CC", "CXX" or "OBJC".
166 # We try a few techniques and use that to set a single cache variable.
168 AC_DEFUN([AM_DEPENDENCIES],[
169 AC_REQUIRE([AM_SET_DEPDIR])
170 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])
172 AC_REQUIRE([AC_PROG_CC])
173 AC_REQUIRE([AC_PROG_CPP])
175 depcpp="$CPP"],[$1],CXX,[
176 AC_REQUIRE([AC_PROG_CXX])
177 AC_REQUIRE([AC_PROG_CXXCPP])
179 depcpp="$CXXCPP"],[$1],OBJC,[
180 am_cv_OBJC_dependencies_compiler_type=gcc],[
181 AC_REQUIRE([AC_PROG_][$1])
184 AC_MSG_CHECKING([dependency style of $depcc])
185 AC_CACHE_VAL(am_cv_[$1]_dependencies_compiler_type,[
186 if test -z "$AMDEP"; then
187 echo '#include "conftest.h"' > conftest.c
188 echo 'int i;' > conftest.h
190 am_cv_[$1]_dependencies_compiler_type=none
191 for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "$am_depcomp"`; do
194 # after this tag, mechanisms are not by side-effect, so they'll
195 # only be used when explicitly requested
196 if test "x$enable_dependency_tracking" = xyes; then
204 # We check with `-c' and `-o' for the sake of the "dashmstdout"
205 # mode. It turns out that the SunPro C++ compiler does not properly
206 # handle `-M -o', and we need to detect this.
207 if depmode="$depmode" \
208 source=conftest.c object=conftest.o \
209 depfile=conftest.Po tmpdepfile=conftest.TPo \
210 $SHELL $am_depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
211 grep conftest.h conftest.Po > /dev/null 2>&1; then
212 am_cv_[$1]_dependencies_compiler_type="$depmode"
219 am_cv_[$1]_dependencies_compiler_type=none
222 AC_MSG_RESULT($am_cv_[$1]_dependencies_compiler_type)
223 [$1]DEPMODE="depmode=$am_cv_[$1]_dependencies_compiler_type"
224 AC_SUBST([$1]DEPMODE)
227 # Choose a directory name for dependency files.
228 # This macro is AC_REQUIREd in AM_DEPENDENCIES
230 AC_DEFUN([AM_SET_DEPDIR],[
231 if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
233 # We redirect because .deps might already exist and be populated.
234 # In this situation we don't want to see an error.
235 rmdir .deps > /dev/null 2>&1
242 AC_DEFUN([AM_DEP_TRACK],[
243 AC_ARG_ENABLE(dependency-tracking,
244 [ --disable-dependency-tracking Speeds up one-time builds
245 --enable-dependency-tracking Do not reject slow dependency extractors])
246 if test "x$enable_dependency_tracking" = xno; then
249 am_depcomp="$ac_aux_dir/depcomp"
250 if test ! -f "$am_depcomp"; then
257 if test -z "$AMDEP"; then
262 pushdef([subst], defn([AC_SUBST]))
263 subst(AMDEPBACKSLASH)
267 # Generate code to set up dependency tracking.
268 # This macro should only be invoked once -- use via AC_REQUIRE.
270 # AM_OUTPUT_DEPENDENCY_COMMANDS
273 # This code is only required when automatic dependency tracking
274 # is enabled. FIXME. This creates each `.P' file that we will
275 # need in order to bootstrap the dependency handling code.
276 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
278 test x"$AMDEP" != x"" ||
279 for mf in $CONFIG_FILES; do
281 Makefile) dirpart=.;;
282 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
285 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
286 # Extract the definition of DEP_FILES from the Makefile without
288 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
289 test -z "$DEPDIR" && continue
290 # When using ansi2knr, U may be empty or an underscore; expand it
291 U=`sed -n -e '/^U = / s///p' < "$mf"`
292 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
293 # We invoke sed twice because it is the simplest approach to
294 # changing $(DEPDIR) to its actual value in the expansion.
295 for file in `sed -n -e '
296 /^DEP_FILES = .*\\\\$/ {
305 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
306 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
307 # Make sure the directory exists.
308 test -f "$dirpart/$file" && continue
309 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
310 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
311 # echo "creating $dirpart/$file"
312 echo '# dummy' > "$dirpart/$file"
316 ac_aux_dir="$ac_aux_dir"])])