1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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 dnl cloned from autoconf 2.13 acspecific.m4
14 AC_DEFUN([AC_C_LONG_LONG],
15 [AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
16 [if test "$GCC" = yes; then
19 AC_TRY_RUN([int main() {
21 exit(sizeof(long long) < sizeof(long)); }],
22 ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
24 if test $ac_cv_c_long_long = yes; then
25 AC_DEFINE(HAVE_LONG_LONG)
29 dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight
31 AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT],
32 [AC_REQUIRE([AC_STRUCT_TM])dnl
33 AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
34 [AC_TRY_COMPILE([#include <sys/types.h>
35 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
36 ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
37 if test "$ac_cv_struct_tm_zone" = yes; then
38 AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
40 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
42 changequote(<<, >>)dnl
44 #ifndef tzname /* For SGI. */
45 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
48 [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
49 if test $ac_cv_var_tzname = yes; then
50 AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME])
53 AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
54 [AC_TRY_COMPILE([#include <sys/types.h>
55 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
56 ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
57 if test "$ac_cv_struct_tm_isdst" = yes; then
58 AC_DEFINE(HAVE_TM_ISDST)
60 AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
62 changequote(<<, >>)dnl
64 #ifndef daylight /* In case IRIX #defines this, too */
68 [atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
69 if test $ac_cv_var_daylight = yes; then
70 AC_DEFINE(HAVE_DAYLIGHT)
74 dnl from autoconf 2.13 acgeneral.m4, with patch:
75 dnl Date: Fri, 15 Jan 1999 05:52:41 -0800
76 dnl Message-ID: <199901151352.FAA18237@shade.twinsun.com>
77 dnl From: eggert@twinsun.com (Paul Eggert)
78 dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars
79 dnl Newsgroups: gnu.utils.bug
81 dnl now include <stdint.h> if available
83 dnl AC_CHECK_TYPE2_STDC(TYPE, DEFAULT)
84 AC_DEFUN([AC_CHECK_TYPE2_STDC],
85 [AC_REQUIRE([AC_HEADER_STDC])dnl
86 AC_REQUIRE([AC_HEADER_STDINT])dnl
87 AC_MSG_CHECKING(for $1)
88 AC_CACHE_VAL(ac_cv_type_$1,
90 [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
94 #include <sys/types.h>
98 #endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
99 if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
103 AC_DEFINE_UNQUOTED($1, $2)
107 dnl from autoconf 2.13 acgeneral.m4, with additional third argument
108 dnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE [, INCLUDES]])
109 AC_DEFUN([AC_CHECK_SIZEOF_INCLUDES],
110 [dnl The name to #define.
111 define([AC_TYPE_NAME], translit(sizeof_$1, [[[a-z *]]], [[[A-Z_P]]]))dnl
112 dnl The cache variable name.
113 define([AC_CV_NAME], translit(ac_cv_sizeof_$1, [[[ *]]], [[[_p]]]))dnl
114 AC_MSG_CHECKING(size of $1)
115 AC_CACHE_VAL(AC_CV_NAME,
120 FILE *f=fopen("conftestval", "w");
122 fprintf(f, "%d\n", sizeof($1));
124 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
125 AC_MSG_RESULT($AC_CV_NAME)
126 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
127 undefine([AC_TYPE_NAME])dnl
128 undefine([AC_CV_NAME])dnl
131 dnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE])
132 AC_DEFUN([AC_CHECK_SIZEOF_STDC_HEADERS],
133 [AC_REQUIRE([AC_HEADER_STDC])dnl
134 AC_REQUIRE([AC_HEADER_STDINT])dnl
135 AC_CHECK_SIZEOF_INCLUDES($1, $2,
139 #include <sys/types.h>
147 dnl AC_CHECK_TYPE_STDC(TYPE, DEFAULT)
148 AC_DEFUN([AC_CHECK_TYPE_STDC],
149 [AC_REQUIRE([AC_HEADER_STDC])dnl
150 AC_REQUIRE([AC_HEADER_STDINT])dnl
151 AC_MSG_CHECKING(for $1)
152 AC_CACHE_VAL(ac_cv_type_$1,
154 [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
158 #include <sys/types.h>
162 #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
163 AC_MSG_RESULT($ac_cv_type_$1)
164 if test $ac_cv_type_$1 = no; then
170 AC_DEFUN([AC_HEADER_STDINT], [AC_CHECK_HEADERS(stdint.h)])
174 dnl By default, many hosts won't let programs access large files;
175 dnl one must use special compiler options to get large-file access to work.
176 dnl For more details about this brain damage please see:
177 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
179 dnl Written by Paul Eggert <eggert@twinsun.com>.
181 dnl Internal subroutine of AC_SYS_LARGEFILE.
182 dnl AC_SYS_LARGEFILE_TEST_INCLUDES
183 AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES],
184 [[#include <sys/types.h>
185 /* Check that off_t can represent 2**63 - 1 correctly.
186 We can't simply "#define LARGE_OFF_T 9223372036854775807",
187 since some C++ compilers masquerading as C compilers
188 incorrectly reject 9223372036854775807. */
189 # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
190 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
191 && LARGE_OFF_T % 2147483647 == 1)
195 dnl Internal subroutine of AC_SYS_LARGEFILE.
196 dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLU=
198 AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
199 [AC_CACHE_CHECK([for $1 value needed for large files], $3,
204 [AC_TRY_COMPILE([#define $1 $2]
209 if test "[$]$3" != no; then
210 AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
213 AC_DEFUN([AC_SYS_LARGEFILE],
214 [AC_REQUIRE([AC_PROG_CC])
215 AC_ARG_ENABLE(largefile,
216 [ --disable-largefile omit support for large files])
217 if test "$enable_largefile" != no; then
219 AC_CACHE_CHECK([for special C compiler options needed for large files=
221 ac_cv_sys_largefile_CC,
222 [ac_cv_sys_largefile_CC=no
223 if test "$GCC" != yes; then
224 # IRIX 6.2 and later do not support large files by default,
225 # so use the C compiler's -n32 option if that helps.
226 AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
229 AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
230 ac_cv_sys_largefile_CC=' -n32')
233 if test "$ac_cv_sys_largefile_CC" != no; then
234 CC="$CC$ac_cv_sys_largefile_CC"
237 AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
238 ac_cv_sys_file_offset_bits,
239 [Number of bits in a file offset, on hosts where this is settable.],
240 AC_SYS_LARGEFILE_TEST_INCLUDES)
241 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
242 ac_cv_sys_large_files,
243 [Define for large files, on AIX-style hosts.],
244 AC_SYS_LARGEFILE_TEST_INCLUDES)
248 AC_DEFUN([AC_FUNC_FSEEKO],
249 [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
250 ac_cv_sys_largefile_source,
251 [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
252 [#include <stdio.h>], [return !fseeko;])
253 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
254 # in glibc 2.1.3, but that breaks too many other things.
255 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
257 AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
258 [ac_cv_func_fseeko=no
259 AC_TRY_LINK([#include <stdio.h>],
260 [return fseeko && fseeko (stdin, 0, 0);],
261 [ac_cv_func_fseeko=yes])])
262 if test $ac_cv_func_fseeko != no; then
263 AC_DEFINE(HAVE_FSEEKO, 1,
264 [Define if fseeko (and presumably ftello) exists and is declared.])
268 # Do all the work for Automake. This macro actually does too much --
269 # some checks are only needed if your package does certain things.
270 # But this isn't really a big deal.
275 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
277 AC_DEFUN([AM_INIT_AUTOMAKE],
278 [AC_REQUIRE([AC_PROG_INSTALL])
283 dnl test to see if srcdir already configured
284 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
285 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
288 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
289 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
290 AC_REQUIRE([AM_SANITY_CHECK])
291 AC_REQUIRE([AC_ARG_PROGRAM])
292 dnl FIXME This is truly gross.
293 missing_dir=`cd $ac_aux_dir && pwd`
294 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
295 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
296 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
297 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
298 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
299 AC_REQUIRE([AC_PROG_MAKE_SET])])
302 # Check to make sure that the build environment is sane.
305 AC_DEFUN([AM_SANITY_CHECK],
306 [AC_MSG_CHECKING([whether build environment is sane])
309 echo timestamp > conftestfile
310 # Do `set' in a subshell so we don't clobber the current shell's
311 # arguments. Must try -L first in case configure is actually a
312 # symlink; some systems play weird games with the mod time of symlinks
313 # (eg FreeBSD returns the mod time of the symlink's containing
316 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
317 if test "[$]*" = "X"; then
319 set X `ls -t $srcdir/configure conftestfile`
321 if test "[$]*" != "X $srcdir/configure conftestfile" \
322 && test "[$]*" != "X conftestfile $srcdir/configure"; then
324 # If neither matched, then we have a broken ls. This can happen
325 # if, for instance, CONFIG_SHELL is bash and it inherits a
326 # broken ls alias from the environment. This has actually
327 # happened. Such a system could not be considered "sane".
328 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
329 alias in your environment])
332 test "[$]2" = conftestfile
338 AC_MSG_ERROR([newly created file is older than distributed files!
339 Check your system clock])
344 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
345 dnl The program must properly implement --version.
346 AC_DEFUN([AM_MISSING_PROG],
347 [AC_MSG_CHECKING(for working $2)
348 # Run test in a subshell; some versions of sh will print an error if
349 # an executable is not found, even if stderr is redirected.
350 # Redirect stdin to placate older versions of autoconf. Sigh.
351 if ($2 --version) < /dev/null > /dev/null 2>&1; then
356 AC_MSG_RESULT(missing)
360 # Like AC_CONFIG_HEADER, but automatically create stamp file.
362 AC_DEFUN([AM_CONFIG_HEADER],
364 AC_CONFIG_HEADER([$1])
365 dnl When config.status generates a header, we must update the stamp-h file.
366 dnl This file resides in the same directory as the config header
367 dnl that is generated. We must strip everything past the first ":",
368 dnl and everything past the last "/".
369 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
370 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
371 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
373 for am_file in <<$1>>; do
374 case " <<$>>CONFIG_HEADERS " in
375 *" <<$>>am_file "*<<)>>
376 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
379 am_indx=`expr "<<$>>am_indx" + 1`
383 # Define a conditional.
385 AC_DEFUN([AM_CONDITIONAL],