source: trunk/src/gcc/fastjar/aclocal.m4@ 1567

Last change on this file since 1567 was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

  • Property cvs2svn:cvs-rev set to 1.1.1.2
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.9 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13
14dnl Host type sizes probe.
15dnl By Kaveh R. Ghazi. One typo fixed since.
16dnl
17AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
18[changequote(<<, >>)dnl
19dnl The name to #define.
20define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
21dnl The cache variable name.
22define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
23changequote([, ])dnl
24AC_MSG_CHECKING(size of $1)
25AC_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>
29$2
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
32done
33])
34if test x$AC_CV_NAME = x ; then
35 AC_MSG_ERROR([cannot determine a size for $1])
36fi
37AC_MSG_RESULT($AC_CV_NAME)
38AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
39undefine([AC_TYPE_NAME])dnl
40undefine([AC_CV_NAME])dnl
41])
42
43dnl Utility macro used by next two tests.
44dnl AC_EXAMINE_OBJECT(C source code,
45dnl commands examining object file,
46dnl [commands to run if compile failed]):
47dnl
48dnl Compile the source code to an object file; then convert it into a
49dnl printable representation. All unprintable characters and
50dnl asterisks (*) are replaced by dots (.). All white space is
51dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the
52dnl output, but runs of newlines are compressed to a single newline.
53dnl Finally, line breaks are forcibly inserted so that no line is
54dnl longer than 80 columns and the file ends with a newline. The
55dnl result of all this processing is in the file conftest.dmp, which
56dnl may be examined by the commands in the second argument.
57dnl
58AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
59[AC_LANG_SAVE
60AC_LANG_C
61dnl Next bit cribbed from AC_TRY_COMPILE.
62cat > conftest.$ac_ext <<EOF
63[#line __oline__ "configure"
64#include "confdefs.h"
65$1
66]EOF
67if AC_TRY_EVAL(ac_compile); then
68 od -c conftest.o |
69 sed ['s/^[0-7]*[ ]*/ /
70 s/\*/./g
71 s/ \\n/*/g
72 s/ [0-9][0-9][0-9]/./g
73 s/ \\[^ ]/./g'] |
74 tr -d '
75 ' | tr -s '*' '
76' | fold | sed '$a\
77' > conftest.dmp
78 $2
79ifelse($3, , , else
80 $3
81)dnl
82fi
83rm -rf conftest*
84AC_LANG_RESTORE])
85
86dnl Host endianness probe.
87dnl Differs from AC_C_BIGENDIAN in that it does not require
88dnl running a program on the host.
89dnl
90AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN],
91[AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian,
92[ac_cv_c_compile_endian=unknown
93gcc_AC_EXAMINE_OBJECT([
94#ifdef HAVE_LIMITS_H
95# include <limits.h>
96#endif
97/* This structure must have no internal padding. */
98 struct {
99 char prefix[sizeof "\nendian:" - 1];
100 short word;
101 char postfix[2];
102 } tester = {
103 "\nendian:",
104#if SIZEOF_SHORT == 4
105 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
106#endif
107 ('A' << CHAR_BIT) | 'B',
108 'X', '\n'
109};],
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
114 fi])
115])
116if test $ac_cv_c_compile_endian = unknown; then
117 AC_MSG_ERROR([*** unable to determine endianness])
118elif 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
121 big-endian order.])
122fi
123])
124
125dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
126dnl of the usual 2.
127AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG,
128[AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
129[AC_TRY_COMPILE([
130#include <sys/types.h>
131#ifdef HAVE_SYS_STAT_H
132# include <sys/stat.h>
133#endif
134#ifdef HAVE_UNISTD_H
135# include <unistd.h>
136#endif
137#ifdef HAVE_DIRECT_H
138# include <direct.h>
139#endif], [mkdir ("foo", 0);],
140 gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
141if test $gcc_cv_mkdir_takes_one_arg = yes ; then
142 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a
143single argument.])
144fi
145])
146
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.
150
151# serial 1
152
153dnl Usage:
154dnl AM_INIT_AUTOMAKE(package,version, [no-define])
155
156AC_DEFUN(AM_INIT_AUTOMAKE,
157[AC_REQUIRE([AC_PROG_INSTALL])
158PACKAGE=[$1]
159AC_SUBST(PACKAGE)
160VERSION=[$2]
161AC_SUBST(VERSION)
162dnl test to see if srcdir already configured
163if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
164 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
165fi
166ifelse([$3],,
167AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
168AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
169AC_REQUIRE([AM_SANITY_CHECK])
170AC_REQUIRE([AC_ARG_PROGRAM])
171dnl FIXME This is truly gross.
172missing_dir=`cd $ac_aux_dir && pwd`
173AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
174AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
175AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
176AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
177AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
178AC_REQUIRE([AC_PROG_MAKE_SET])])
179
180#
181# Check to make sure that the build environment is sane.
182#
183
184AC_DEFUN(AM_SANITY_CHECK,
185[AC_MSG_CHECKING([whether build environment is sane])
186# Just in case
187sleep 1
188echo 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
193# directory).
194if (
195 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
196 if test "[$]*" = "X"; then
197 # -L didn't work.
198 set X `ls -t $srcdir/configure conftestfile`
199 fi
200 if test "[$]*" != "X $srcdir/configure conftestfile" \
201 && test "[$]*" != "X conftestfile $srcdir/configure"; then
202
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
208alias in your environment])
209 fi
210
211 test "[$]2" = conftestfile
212 )
213then
214 # Ok.
215 :
216else
217 AC_MSG_ERROR([newly created file is older than distributed files!
218Check your system clock])
219fi
220rm -f conftest*
221AC_MSG_RESULT(yes)])
222
223dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
224dnl The program must properly implement --version.
225AC_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.
230if ($2 --version) < /dev/null > /dev/null 2>&1; then
231 $1=$2
232 AC_MSG_RESULT(found)
233else
234 $1="$3/missing $2"
235 AC_MSG_RESULT(missing)
236fi
237AC_SUBST($1)])
238
239# Like AC_CONFIG_HEADER, but automatically create stamp file.
240
241AC_DEFUN(AM_CONFIG_HEADER,
242[AC_PREREQ([2.12])
243AC_CONFIG_HEADER([$1])
244dnl When config.status generates a header, we must update the stamp-h file.
245dnl This file resides in the same directory as the config header
246dnl that is generated. We must strip everything past the first ":",
247dnl and everything past the last "/".
248AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
249ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
250<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
251<<am_indx=1
252for 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
256 ;;
257 esac
258 am_indx=`expr "<<$>>am_indx" + 1`
259done<<>>dnl>>)
260changequote([,]))])
261
262# Add --enable-maintainer-mode option to configure.
263# From Jim Meyering
264
265# serial 1
266
267AC_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
278 AC_SUBST(MAINT)dnl
279]
280)
281
282# Define a conditional.
283
284AC_DEFUN(AM_CONDITIONAL,
285[AC_SUBST($1_TRUE)
286AC_SUBST($1_FALSE)
287if $2; then
288 $1_TRUE=
289 $1_FALSE='#'
290else
291 $1_TRUE='#'
292 $1_FALSE=
293fi])
294
Note: See TracBrowser for help on using the repository browser.