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],)
22 AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
23 [changequote(<<, >>)dnl
24 dnl The name to #define.
25 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
26 dnl The cache variable name.
27 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
29 AC_MSG_CHECKING(size of $1)
30 AC_CACHE_VAL(AC_CV_NAME,
31 [for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
32 AC_TRY_COMPILE([#include "confdefs.h"
33 #include <sys/types.h>
35 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
36 if test x$AC_CV_NAME != x ; then break; fi
39 if test x$AC_CV_NAME = x ; then
40 AC_MSG_ERROR([cannot determine a size for $1])
42 AC_MSG_RESULT($AC_CV_NAME)
43 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
44 undefine([AC_TYPE_NAME])dnl
45 undefine([AC_CV_NAME])dnl
48 AC_DEFUN([AC_C_BIGENDIAN_CROSS],
49 [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
50 [ac_cv_c_bigendian=unknown
51 # See if sys/param.h defines the BYTE_ORDER macro.
52 AC_TRY_COMPILE([#include <sys/types.h>
53 #include <sys/param.h>], [
54 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
56 #endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
57 AC_TRY_COMPILE([#include <sys/types.h>
58 #include <sys/param.h>], [
59 #if BYTE_ORDER != BIG_ENDIAN
61 #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
62 if test $ac_cv_c_bigendian = unknown; then
64 /* Are we little or big endian? From Harbison&Steele. */
68 char c[sizeof (long)];
71 exit (u.c[sizeof (long) - 1] == 1);
72 }], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
73 [ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
75 if test $ac_cv_c_bigendian = unknown; then
76 AC_MSG_CHECKING(to probe for byte ordering)
79 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
80 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
81 void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
82 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
83 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
84 void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
85 int main() { _ascii (); _ebcdic (); return 0; }
87 ] if test -f conftest.c ; then
88 if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
89 if test `grep -l BIGenDianSyS conftest.o` ; then
90 echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
93 if test `grep -l LiTTleEnDian conftest.o` ; then
94 echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
95 if test $ac_cv_c_bigendian = yes ; then
96 ac_cv_c_bigendian=unknown;
101 echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
104 AC_MSG_RESULT($ac_cv_c_bigendian)
106 if test $ac_cv_c_bigendian = yes; then
107 AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
112 AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
113 if test $ac_cv_c_bigendian = unknown; then
114 AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
118 # Like AC_CONFIG_HEADER, but automatically create stamp file.
120 AC_DEFUN(AM_CONFIG_HEADER,
122 AC_CONFIG_HEADER([$1])
123 dnl When config.status generates a header, we must update the stamp-h file.
124 dnl This file resides in the same directory as the config header
125 dnl that is generated. We must strip everything past the first ":",
126 dnl and everything past the last "/".
127 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
128 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
129 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
131 for am_file in <<$1>>; do
132 case " <<$>>CONFIG_HEADERS " in
133 *" <<$>>am_file "*<<)>>
134 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
137 am_indx=`expr "<<$>>am_indx" + 1`
141 # Do all the work for Automake. This macro actually does too much --
142 # some checks are only needed if your package does certain things.
143 # But this isn't really a big deal.
148 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
150 AC_DEFUN(AM_INIT_AUTOMAKE,
151 [AC_REQUIRE([AC_PROG_INSTALL])
156 dnl test to see if srcdir already configured
157 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
158 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
161 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
162 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
163 AC_REQUIRE([AM_SANITY_CHECK])
164 AC_REQUIRE([AC_ARG_PROGRAM])
165 dnl FIXME This is truly gross.
166 missing_dir=`cd $ac_aux_dir && pwd`
167 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
168 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
169 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
170 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
171 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
172 AC_REQUIRE([AC_PROG_MAKE_SET])])
175 # Check to make sure that the build environment is sane.
178 AC_DEFUN(AM_SANITY_CHECK,
179 [AC_MSG_CHECKING([whether build environment is sane])
182 echo timestamp > conftestfile
183 # Do `set' in a subshell so we don't clobber the current shell's
184 # arguments. Must try -L first in case configure is actually a
185 # symlink; some systems play weird games with the mod time of symlinks
186 # (eg FreeBSD returns the mod time of the symlink's containing
189 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
190 if test "[$]*" = "X"; then
192 set X `ls -t $srcdir/configure conftestfile`
194 if test "[$]*" != "X $srcdir/configure conftestfile" \
195 && test "[$]*" != "X conftestfile $srcdir/configure"; then
197 # If neither matched, then we have a broken ls. This can happen
198 # if, for instance, CONFIG_SHELL is bash and it inherits a
199 # broken ls alias from the environment. This has actually
200 # happened. Such a system could not be considered "sane".
201 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
202 alias in your environment])
205 test "[$]2" = conftestfile
211 AC_MSG_ERROR([newly created file is older than distributed files!
212 Check your system clock])
217 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
218 dnl The program must properly implement --version.
219 AC_DEFUN(AM_MISSING_PROG,
220 [AC_MSG_CHECKING(for working $2)
221 # Run test in a subshell; some versions of sh will print an error if
222 # an executable is not found, even if stderr is redirected.
223 # Redirect stdin to placate older versions of autoconf. Sigh.
224 if ($2 --version) < /dev/null > /dev/null 2>&1; then
229 AC_MSG_RESULT(missing)
233 # Add --enable-maintainer-mode option to configure.
238 AC_DEFUN(AM_MAINTAINER_MODE,
239 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
240 dnl maintainer-mode is disabled by default
241 AC_ARG_ENABLE(maintainer-mode,
242 [ --enable-maintainer-mode enable make rules and dependencies not useful
243 (and sometimes confusing) to the casual installer],
244 USE_MAINTAINER_MODE=$enableval,
245 USE_MAINTAINER_MODE=no)
246 AC_MSG_RESULT($USE_MAINTAINER_MODE)
247 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
248 MAINT=$MAINTAINER_MODE_TRUE
253 # Define a conditional.
255 AC_DEFUN(AM_CONDITIONAL,