nothing
[automake.git] / aclocal.m4
blobdedc1122a62dbf39068ac985cc0a36c76061f46c
1 dnl aclocal.m4 generated automatically by aclocal 1.1n
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, [no-define])
12 AC_DEFUN(AM_INIT_AUTOMAKE,
13 [AC_REQUIRE([AM_PROG_INSTALL])
14 PACKAGE=[$1]
15 AC_SUBST(PACKAGE)
16 VERSION=[$2]
17 AC_SUBST(VERSION)
18 ifelse([$3],,
19 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
20 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
21 AM_SANITY_CHECK
22 AC_ARG_PROGRAM
23 dnl FIXME This is truly gross.
24 missing_dir=`cd $ac_aux_dir && pwd`
25 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
26 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
27 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
28 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
29 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
30 AC_PROG_MAKE_SET])
33 # serial 1
35 AC_DEFUN(AM_PROG_INSTALL,
36 [AC_REQUIRE([AC_PROG_INSTALL])
37 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
38 AC_SUBST(INSTALL_SCRIPT)dnl
42 # Check to make sure that the build environment is sane.
45 AC_DEFUN(AM_SANITY_CHECK,
46 [AC_MSG_CHECKING([whether build environment is sane])
47 # Just in case
48 sleep 1
49 echo timestamp > conftestfile
50 # Do `set' in a subshell so we don't clobber the current shell's
51 # arguments.  Must try -L first in case configure is actually a
52 # symlink; some systems play weird games with the mod time of symlinks
53 # (eg FreeBSD returns the mod time of the symlink's containing
54 # directory).
55 if (
56    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
57    if test "$@" = "X"; then
58       # -L didn't work.
59       set X `ls -t $srcdir/configure conftestfile`
60    fi
61    test "[$]2" = conftestfile
62    )
63 then
64    # Ok.
65    :
66 else
67    AC_MSG_ERROR([newly created file is older than distributed files!
68 Check your system clock])
70 rm -f conftest*
71 AC_MSG_RESULT(yes)])
73 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
74 dnl The program must properly implement --version.
75 AC_DEFUN(AM_MISSING_PROG,
76 [AC_MSG_CHECKING(for working $2)
77 # Run test in a subshell; some versions of sh will print an error if
78 # an executable is not found, even if stderr is redirected.
79 # Redirect stdin to placate older versions of autoconf.  Sigh.
80 if ($2 --version) < /dev/null > /dev/null 2>&1; then
81    $1=$2
82    AC_MSG_RESULT(found)
83 else
84    $1="$3/missing $2"
85    AC_MSG_RESULT(missing)
87 AC_SUBST($1)])