new files from elsewhere
[automake.git] / aclocal.m4
blobadec624fbd0eb228a5c09a13b63765c62cdc1228
1 dnl aclocal.m4 generated automatically by aclocal 1.1m
3 # Do all the work for Automake.  This macro actually does too much --
4 # some checks are only needed if your package does certain things.
5 # But this isn't really a big deal.
7 # serial 1
9 dnl Usage:
10 dnl AM_INIT_AUTOMAKE(package,version)
12 AC_DEFUN(AM_INIT_AUTOMAKE,
13 [AC_REQUIRE([AM_PROG_INSTALL])
14 PACKAGE=[$1]
15 AC_SUBST(PACKAGE)
16 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
17 VERSION=[$2]
18 AC_SUBST(VERSION)
19 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
20 AM_SANITY_CHECK
21 AC_ARG_PROGRAM
22 dnl FIXME This is truly gross.
23 missing_dir=`cd $ac_aux_dir && pwd`
24 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
25 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
26 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
27 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
28 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
29 AC_PROG_MAKE_SET])
32 # serial 1
34 AC_DEFUN(AM_PROG_INSTALL,
35 [AC_REQUIRE([AC_PROG_INSTALL])
36 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
37 AC_SUBST(INSTALL_SCRIPT)dnl
41 # Check to make sure that the build environment is sane.
44 AC_DEFUN(AM_SANITY_CHECK,
45 [AC_MSG_CHECKING([whether build environment is sane])
46 echo timestamp > conftestfile
47 # Just in case
48 sleep 1
49 # Do `set' in a subshell so we don't clobber the current shell's
50 # arguments.  Must try -L first in case configure is actually a
51 # symlink; some systems play weird games with the mod time of symlinks
52 # (eg FreeBSD returns the mod time of the symlink's containing
53 # directory).
54 if (
55    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
56    if test "$@" = "X"; then
57       # -L didn't work.
58       set X `ls -t $srcdir/configure conftestfile`
59    fi
60    test "[$]2" = conftestfile
61    )
62 then
63    # Ok.
64    :
65 else
66    AC_MSG_ERROR([newly created file is older than distributed files!
67 Check your system clock])
69 rm -f conftest*
70 AC_MSG_RESULT(yes)])
72 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
73 dnl The program must properly implement --version.
74 AC_DEFUN(AM_MISSING_PROG,
75 [AC_MSG_CHECKING(for working $2)
76 if $2 --version > /dev/null 2>&1; then
77    $1=$2
78    AC_MSG_RESULT(found)
79 else
80    $1="$3/missing $2"
81    AC_MSG_RESULT(missing)
83 AC_SUBST($1)])