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.
14 dnl Host type sizes probe.
15 dnl By Kaveh R. Ghazi. One typo fixed since.
17 AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
18 [changequote(<<, >>)dnl
19 dnl The name to #define.
20 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
21 dnl The cache variable name.
22 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
24 AC_MSG_CHECKING(size of $1)
25 AC_CACHE_VAL(AC_CV_NAME,
26 [for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
27 AC_TRY_COMPILE([#include "confdefs.h"
28 #include <sys/types.h>
30 ], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
31 if test x$AC_CV_NAME != x ; then break; fi
34 if test x$AC_CV_NAME = x ; then
35 AC_MSG_ERROR([cannot determine a size for $1])
37 AC_MSG_RESULT($AC_CV_NAME)
38 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
39 undefine([AC_TYPE_NAME])dnl
40 undefine([AC_CV_NAME])dnl
43 dnl Utility macro used by next two tests.
44 dnl AC_EXAMINE_OBJECT(C source code,
45 dnl commands examining object file,
46 dnl [commands to run if compile failed]):
48 dnl Compile the source code to an object file; then convert it into a
49 dnl printable representation. All unprintable characters and
50 dnl asterisks (*) are replaced by dots (.). All white space is
51 dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the
52 dnl output, but runs of newlines are compressed to a single newline.
53 dnl Finally, line breaks are forcibly inserted so that no line is
54 dnl longer than 80 columns and the file ends with a newline. The
55 dnl result of all this processing is in the file conftest.dmp, which
56 dnl may be examined by the commands in the second argument.
58 AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
61 dnl Next bit cribbed from AC_TRY_COMPILE.
62 cat > conftest.$ac_ext <<EOF
63 [#line __oline__ "configure"
67 if AC_TRY_EVAL(ac_compile); then
69 sed ['s/^[0-7]*[ ]*/ /
72 s/ [0-9][0-9][0-9]/./g
86 dnl Host endianness probe.
87 dnl Differs from AC_C_BIGENDIAN in that it does not require
88 dnl running a program on the host.
90 AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN],
91 [AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian,
92 [ac_cv_c_compile_endian=unknown
93 gcc_AC_EXAMINE_OBJECT([
97 /* This structure must have no internal padding. */
99 char prefix[sizeof "\nendian:" - 1];
104 #if SIZEOF_SHORT == 4
105 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
107 ('A' << CHAR_BIT) | 'B',
110 [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
111 ac_cv_c_compile_endian=big-endian
112 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
113 ac_cv_c_compile_endian=little-endian
116 if test $ac_cv_c_compile_endian = unknown; then
117 AC_MSG_ERROR([*** unable to determine endianness])
118 elif test $ac_cv_c_compile_endian = big-endian; then
119 AC_DEFINE(WORDS_BIG_ENDIAN, 1,
120 [Define if the host machine stores words of multi-word integers in
125 dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
127 AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG,
128 [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
130 #include <sys/types.h>
131 #ifdef HAVE_SYS_STAT_H
132 # include <sys/stat.h>
139 #endif], [mkdir ("foo", 0);],
140 gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
141 if test $gcc_cv_mkdir_takes_one_arg = yes ; then
142 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a
147 # Do all the work for Automake. This macro actually does too much --
148 # some checks are only needed if your package does certain things.
149 # But this isn't really a big deal.
154 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
156 AC_DEFUN(AM_INIT_AUTOMAKE,
157 [AC_REQUIRE([AC_PROG_INSTALL])
162 dnl test to see if srcdir already configured
163 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
164 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
167 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
168 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
169 AC_REQUIRE([AM_SANITY_CHECK])
170 AC_REQUIRE([AC_ARG_PROGRAM])
171 dnl FIXME This is truly gross.
172 missing_dir=`cd $ac_aux_dir && pwd`
173 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
174 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
175 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
176 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
177 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
178 AC_REQUIRE([AC_PROG_MAKE_SET])])
181 # Check to make sure that the build environment is sane.
184 AC_DEFUN(AM_SANITY_CHECK,
185 [AC_MSG_CHECKING([whether build environment is sane])
188 echo timestamp > conftestfile
189 # Do `set' in a subshell so we don't clobber the current shell's
190 # arguments. Must try -L first in case configure is actually a
191 # symlink; some systems play weird games with the mod time of symlinks
192 # (eg FreeBSD returns the mod time of the symlink's containing
195 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
196 if test "[$]*" = "X"; then
198 set X `ls -t $srcdir/configure conftestfile`
200 if test "[$]*" != "X $srcdir/configure conftestfile" \
201 && test "[$]*" != "X conftestfile $srcdir/configure"; then
203 # If neither matched, then we have a broken ls. This can happen
204 # if, for instance, CONFIG_SHELL is bash and it inherits a
205 # broken ls alias from the environment. This has actually
206 # happened. Such a system could not be considered "sane".
207 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
208 alias in your environment])
211 test "[$]2" = conftestfile
217 AC_MSG_ERROR([newly created file is older than distributed files!
218 Check your system clock])
223 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
224 dnl The program must properly implement --version.
225 AC_DEFUN(AM_MISSING_PROG,
226 [AC_MSG_CHECKING(for working $2)
227 # Run test in a subshell; some versions of sh will print an error if
228 # an executable is not found, even if stderr is redirected.
229 # Redirect stdin to placate older versions of autoconf. Sigh.
230 if ($2 --version) < /dev/null > /dev/null 2>&1; then
235 AC_MSG_RESULT(missing)
239 # Like AC_CONFIG_HEADER, but automatically create stamp file.
241 AC_DEFUN(AM_CONFIG_HEADER,
243 AC_CONFIG_HEADER([$1])
244 dnl When config.status generates a header, we must update the stamp-h file.
245 dnl This file resides in the same directory as the config header
246 dnl that is generated. We must strip everything past the first ":",
247 dnl and everything past the last "/".
248 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
249 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
250 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
252 for am_file in <<$1>>; do
253 case " <<$>>CONFIG_HEADERS " in
254 *" <<$>>am_file "*<<)>>
255 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
258 am_indx=`expr "<<$>>am_indx" + 1`
262 # Add --enable-maintainer-mode option to configure.
267 AC_DEFUN(AM_MAINTAINER_MODE,
268 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
269 dnl maintainer-mode is disabled by default
270 AC_ARG_ENABLE(maintainer-mode,
271 [ --enable-maintainer-mode enable make rules and dependencies not useful
272 (and sometimes confusing) to the casual installer],
273 USE_MAINTAINER_MODE=$enableval,
274 USE_MAINTAINER_MODE=no)
275 AC_MSG_RESULT($USE_MAINTAINER_MODE)
276 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
277 MAINT=$MAINTAINER_MODE_TRUE
282 # Define a conditional.
284 AC_DEFUN(AM_CONDITIONAL,