]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bc/aclocal.m4
This commit was generated by cvs2svn to compensate for changes in r55099,
[FreeBSD/FreeBSD.git] / contrib / bc / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.1n
2
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.
6
7 # serial 1
8
9 dnl Usage:
10 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
11
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])
31
32
33 # serial 1
34
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
39 ])
40
41 #
42 # Check to make sure that the build environment is sane.
43 #
44
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])
69 fi
70 rm -f conftest*
71 AC_MSG_RESULT(yes)])
72
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 if ($2 --version) > /dev/null 2>&1; then
80    $1=$2
81    AC_MSG_RESULT(found)
82 else
83    $1="$3/missing $2"
84    AC_MSG_RESULT(missing)
85 fi
86 AC_SUBST($1)])
87
88 # Like AC_CONFIG_HEADER, but automatically create stamp file.
89
90 AC_DEFUN(AM_CONFIG_HEADER,
91 [AC_PREREQ([2.12])
92 AC_CONFIG_HEADER([$1])
93 dnl When config.status generates a header, we must update the stamp-h file.
94 dnl This file resides in the same directory as the config header
95 dnl that is generated.  We must strip everything past the first ":",
96 dnl and everything past the last "/".
97 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
98 test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl
99 changequote([,]))])
100