1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 sinclude(../libtool.m4)
14 dnl The lines below arrange for aclocal not to bring libtool.m4
15 dnl AC_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
16 dnl to add a definition of LIBTOOL to Makefile.in.
18 AC_DEFUN([AC_PROG_LIBTOOL],)
19 AC_DEFUN([AM_PROG_LIBTOOL],)
23 # mmap(2) blacklisting. Some platforms provide the mmap library routine
24 # but don't support all of the features we need from it.
25 AC_DEFUN([AC_FUNC_MMAP_BLACKLIST],
26 [if test $ac_cv_header_sys_mman_h != yes \
27 || test $ac_cv_func_mmap != yes; then
28 ac_cv_func_mmap_file=no
29 ac_cv_func_mmap_dev_zero=no
30 ac_cv_func_mmap_anon=no
32 AC_CACHE_CHECK([whether read-only mmap of a plain file works],
34 [# Add a system to this blacklist if
35 # mmap(0, stat_size, PROT_READ, MAP_PRIVATE, fd, 0) doesn't return a
36 # memory area containing the same data that you'd get if you applied
37 # read() to the same fd. The only system known to have a problem here
38 # is VMS, where text files have record structure.
41 ac_cv_func_mmap_file=no ;;
43 ac_cv_func_mmap_file=yes;;
45 AC_CACHE_CHECK([whether mmap from /dev/zero works],
46 ac_cv_func_mmap_dev_zero,
47 [# Add a system to this blacklist if it has mmap() but /dev/zero
48 # does not exist, or if mmapping /dev/zero does not give anonymous
49 # zeroed pages with both the following properties:
50 # 1. If you map N consecutive pages in with one call, and then
51 # unmap any subset of those pages, the pages that were not
52 # explicitly unmapped remain accessible.
53 # 2. If you map two adjacent blocks of memory and then unmap them
54 # both at once, they must both go away.
55 # Systems known to be in this category are Windows (all variants),
58 vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
59 ac_cv_func_mmap_dev_zero=no ;;
61 ac_cv_func_mmap_dev_zero=yes;;
64 # Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
65 AC_CACHE_CHECK([for MAP_ANON(YMOUS)], ac_cv_decl_map_anon,
67 [#include <sys/types.h>
72 #define MAP_ANONYMOUS MAP_ANON
75 [int n = MAP_ANONYMOUS;],
76 ac_cv_decl_map_anon=yes,
77 ac_cv_decl_map_anon=no)])
79 if test $ac_cv_decl_map_anon = no; then
80 ac_cv_func_mmap_anon=no
82 AC_CACHE_CHECK([whether mmap with MAP_ANON(YMOUS) works],
84 [# Add a system to this blacklist if it has mmap() and MAP_ANON or
85 # MAP_ANONYMOUS, but using mmap(..., MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
86 # doesn't give anonymous zeroed pages with the same properties listed
87 # above for use of /dev/zero.
88 # Systems known to be in this category are Windows, VMS, and SCO Unix.
90 vms* | cygwin* | pe | mingw* | sco* | udk* )
91 ac_cv_func_mmap_anon=no ;;
93 ac_cv_func_mmap_anon=yes;;
98 if test $ac_cv_func_mmap_file = yes; then
99 AC_DEFINE(HAVE_MMAP_FILE, 1,
100 [Define if read-only mmap of a plain file works.])
102 if test $ac_cv_func_mmap_dev_zero = yes; then
103 AC_DEFINE(HAVE_MMAP_DEV_ZERO, 1,
104 [Define if mmap of /dev/zero works.])
106 if test $ac_cv_func_mmap_anon = yes; then
107 AC_DEFINE(HAVE_MMAP_ANON, 1,
108 [Define if mmap with MAP_ANON(YMOUS) works.])
112 sinclude(../config/accross.m4)
114 # Like AC_CONFIG_HEADER, but automatically create stamp file.
116 AC_DEFUN(AM_CONFIG_HEADER,
118 AC_CONFIG_HEADER([$1])
119 dnl When config.status generates a header, we must update the stamp-h file.
120 dnl This file resides in the same directory as the config header
121 dnl that is generated. We must strip everything past the first ":",
122 dnl and everything past the last "/".
123 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
124 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
125 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
127 for am_file in <<$1>>; do
128 case " <<$>>CONFIG_HEADERS " in
129 *" <<$>>am_file "*<<)>>
130 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
133 am_indx=`expr "<<$>>am_indx" + 1`
137 # Do all the work for Automake. This macro actually does too much --
138 # some checks are only needed if your package does certain things.
139 # But this isn't really a big deal.
144 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
146 AC_DEFUN(AM_INIT_AUTOMAKE,
147 [AC_REQUIRE([AC_PROG_INSTALL])
152 dnl test to see if srcdir already configured
153 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
154 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
157 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
158 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
159 AC_REQUIRE([AM_SANITY_CHECK])
160 AC_REQUIRE([AC_ARG_PROGRAM])
161 dnl FIXME This is truly gross.
162 missing_dir=`cd $ac_aux_dir && pwd`
163 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
164 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
165 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
166 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
167 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
168 AC_REQUIRE([AC_PROG_MAKE_SET])])
171 # Check to make sure that the build environment is sane.
174 AC_DEFUN(AM_SANITY_CHECK,
175 [AC_MSG_CHECKING([whether build environment is sane])
178 echo timestamp > conftestfile
179 # Do `set' in a subshell so we don't clobber the current shell's
180 # arguments. Must try -L first in case configure is actually a
181 # symlink; some systems play weird games with the mod time of symlinks
182 # (eg FreeBSD returns the mod time of the symlink's containing
185 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
186 if test "[$]*" = "X"; then
188 set X `ls -t $srcdir/configure conftestfile`
190 if test "[$]*" != "X $srcdir/configure conftestfile" \
191 && test "[$]*" != "X conftestfile $srcdir/configure"; then
193 # If neither matched, then we have a broken ls. This can happen
194 # if, for instance, CONFIG_SHELL is bash and it inherits a
195 # broken ls alias from the environment. This has actually
196 # happened. Such a system could not be considered "sane".
197 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
198 alias in your environment])
201 test "[$]2" = conftestfile
207 AC_MSG_ERROR([newly created file is older than distributed files!
208 Check your system clock])
213 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
214 dnl The program must properly implement --version.
215 AC_DEFUN(AM_MISSING_PROG,
216 [AC_MSG_CHECKING(for working $2)
217 # Run test in a subshell; some versions of sh will print an error if
218 # an executable is not found, even if stderr is redirected.
219 # Redirect stdin to placate older versions of autoconf. Sigh.
220 if ($2 --version) < /dev/null > /dev/null 2>&1; then
225 AC_MSG_RESULT(missing)
229 # Add --enable-maintainer-mode option to configure.
234 AC_DEFUN(AM_MAINTAINER_MODE,
235 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
236 dnl maintainer-mode is disabled by default
237 AC_ARG_ENABLE(maintainer-mode,
238 [ --enable-maintainer-mode enable make rules and dependencies not useful
239 (and sometimes confusing) to the casual installer],
240 USE_MAINTAINER_MODE=$enableval,
241 USE_MAINTAINER_MODE=no)
242 AC_MSG_RESULT($USE_MAINTAINER_MODE)
243 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
244 MAINT=$MAINTAINER_MODE_TRUE
249 # Define a conditional.
251 AC_DEFUN(AM_CONDITIONAL,