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

Last change on this file since 2013 was 1589, checked in by bird, 21 years ago

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

  • Property cvs2svn:cvs-rev set to 1.1.1.3
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 9.0 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 Modified to return a size of 0 if type doesn't exist
17dnl
18AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
19[changequote(<<, >>)dnl
20dnl The name to #define.
21define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
22dnl The cache variable name.
23define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
24changequote([, ])dnl
25AC_MSG_CHECKING(size of $1)
26AC_CACHE_VAL(AC_CV_NAME,
27[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
28 AC_TRY_COMPILE([#include "confdefs.h"
29#include <sys/types.h>
30$2
31], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
32 if test x$AC_CV_NAME != x ; then break; fi
33done
34])
35if test x$AC_CV_NAME = x ; then
36 AC_CV_NAME=0
37fi
38AC_MSG_RESULT($AC_CV_NAME)
39AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
40undefine([AC_TYPE_NAME])dnl
41undefine([AC_CV_NAME])dnl
42])
43
44dnl Utility macro used by next two tests.
45dnl AC_EXAMINE_OBJECT(C source code,
46dnl commands examining object file,
47dnl [commands to run if compile failed]):
48dnl
49dnl Compile the source code to an object file; then convert it into a
50dnl printable representation. All unprintable characters and
51dnl asterisks (*) are replaced by dots (.). All white space is
52dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the
53dnl output, but runs of newlines are compressed to a single newline.
54dnl Finally, line breaks are forcibly inserted so that no line is
55dnl longer than 80 columns and the file ends with a newline. The
56dnl result of all this processing is in the file conftest.dmp, which
57dnl may be examined by the commands in the second argument.
58dnl
59AC_DEFUN([gcc_AC_EXAMINE_OBJECT],
60[AC_LANG_SAVE
61AC_LANG_C
62dnl Next bit cribbed from AC_TRY_COMPILE.
63cat > conftest.$ac_ext <<EOF
64[#line __oline__ "configure"
65#include "confdefs.h"
66$1
67]EOF
68if AC_TRY_EVAL(ac_compile); then
69 od -c conftest.o |
70 sed ['s/^[0-7]*[ ]*/ /
71 s/\*/./g
72 s/ \\n/*/g
73 s/ [0-9][0-9][0-9]/./g
74 s/ \\[^ ]/./g'] |
75 tr -d '
76 ' | tr -s '*' '
77' | fold | sed '$a\
78' > conftest.dmp
79 $2
80ifelse($3, , , else
81 $3
82)dnl
83fi
84rm -rf conftest*
85AC_LANG_RESTORE])
86
87dnl Host endianness probe.
88dnl Differs from AC_C_BIGENDIAN in that it does not require
89dnl running a program on the host.
90dnl
91AC_DEFUN([fastjar_AC_COMPILE_C_BIGENDIAN],
92[AC_CACHE_CHECK(byte ordering, ac_cv_c_compile_endian,
93[ac_cv_c_compile_endian=unknown
94gcc_AC_EXAMINE_OBJECT([
95#ifdef HAVE_LIMITS_H
96# include <limits.h>
97#endif
98/* This structure must have no internal padding. */
99 struct {
100 char prefix[sizeof "\nendian:" - 1];
101 short word;
102 char postfix[2];
103 } tester = {
104 "\nendian:",
105#if SIZEOF_SHORT == 4
106 ('A' << (CHAR_BIT * 3)) | ('B' << (CHAR_BIT * 2)) |
107#endif
108 ('A' << CHAR_BIT) | 'B',
109 'X', '\n'
110};],
111 [if grep 'endian:AB' conftest.dmp >/dev/null 2>&1; then
112 ac_cv_c_compile_endian=big-endian
113 elif grep 'endian:BA' conftest.dmp >/dev/null 2>&1; then
114 ac_cv_c_compile_endian=little-endian
115 fi])
116])
117if test $ac_cv_c_compile_endian = unknown; then
118 AC_MSG_ERROR([*** unable to determine endianness])
119elif test $ac_cv_c_compile_endian = big-endian; then
120 AC_DEFINE(WORDS_BIG_ENDIAN, 1,
121 [Define if the host machine stores words of multi-word integers in
122 big-endian order.])
123fi
124])
125
126dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
127dnl of the usual 2.
128AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG,
129[AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
130[AC_TRY_COMPILE([
131#include <sys/types.h>
132#ifdef HAVE_SYS_STAT_H
133# include <sys/stat.h>
134#endif
135#ifdef HAVE_UNISTD_H
136# include <unistd.h>
137#endif
138#ifdef HAVE_DIRECT_H
139# include <direct.h>
140#endif], [mkdir ("foo", 0);],
141 gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
142if test $gcc_cv_mkdir_takes_one_arg = yes ; then
143 AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a
144single argument.])
145fi
146])
147
148# Do all the work for Automake. This macro actually does too much --
149# some checks are only needed if your package does certain things.
150# But this isn't really a big deal.
151
152# serial 1
153
154dnl Usage:
155dnl AM_INIT_AUTOMAKE(package,version, [no-define])
156
157AC_DEFUN(AM_INIT_AUTOMAKE,
158[AC_REQUIRE([AC_PROG_INSTALL])
159PACKAGE=[$1]
160AC_SUBST(PACKAGE)
161VERSION=[$2]
162AC_SUBST(VERSION)
163dnl test to see if srcdir already configured
164if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
165 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
166fi
167ifelse([$3],,
168AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
169AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
170AC_REQUIRE([AM_SANITY_CHECK])
171AC_REQUIRE([AC_ARG_PROGRAM])
172dnl FIXME This is truly gross.
173missing_dir=`cd $ac_aux_dir && pwd`
174AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
175AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
176AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
177AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
178AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
179AC_REQUIRE([AC_PROG_MAKE_SET])])
180
181#
182# Check to make sure that the build environment is sane.
183#
184
185AC_DEFUN(AM_SANITY_CHECK,
186[AC_MSG_CHECKING([whether build environment is sane])
187# Just in case
188sleep 1
189echo timestamp > conftestfile
190# Do `set' in a subshell so we don't clobber the current shell's
191# arguments. Must try -L first in case configure is actually a
192# symlink; some systems play weird games with the mod time of symlinks
193# (eg FreeBSD returns the mod time of the symlink's containing
194# directory).
195if (
196 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
197 if test "[$]*" = "X"; then
198 # -L didn't work.
199 set X `ls -t $srcdir/configure conftestfile`
200 fi
201 if test "[$]*" != "X $srcdir/configure conftestfile" \
202 && test "[$]*" != "X conftestfile $srcdir/configure"; then
203
204 # If neither matched, then we have a broken ls. This can happen
205 # if, for instance, CONFIG_SHELL is bash and it inherits a
206 # broken ls alias from the environment. This has actually
207 # happened. Such a system could not be considered "sane".
208 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
209alias in your environment])
210 fi
211
212 test "[$]2" = conftestfile
213 )
214then
215 # Ok.
216 :
217else
218 AC_MSG_ERROR([newly created file is older than distributed files!
219Check your system clock])
220fi
221rm -f conftest*
222AC_MSG_RESULT(yes)])
223
224dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
225dnl The program must properly implement --version.
226AC_DEFUN(AM_MISSING_PROG,
227[AC_MSG_CHECKING(for working $2)
228# Run test in a subshell; some versions of sh will print an error if
229# an executable is not found, even if stderr is redirected.
230# Redirect stdin to placate older versions of autoconf. Sigh.
231if ($2 --version) < /dev/null > /dev/null 2>&1; then
232 $1=$2
233 AC_MSG_RESULT(found)
234else
235 $1="$3/missing $2"
236 AC_MSG_RESULT(missing)
237fi
238AC_SUBST($1)])
239
240# Like AC_CONFIG_HEADER, but automatically create stamp file.
241
242AC_DEFUN(AM_CONFIG_HEADER,
243[AC_PREREQ([2.12])
244AC_CONFIG_HEADER([$1])
245dnl When config.status generates a header, we must update the stamp-h file.
246dnl This file resides in the same directory as the config header
247dnl that is generated. We must strip everything past the first ":",
248dnl and everything past the last "/".
249AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
250ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
251<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
252<<am_indx=1
253for am_file in <<$1>>; do
254 case " <<$>>CONFIG_HEADERS " in
255 *" <<$>>am_file "*<<)>>
256 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
257 ;;
258 esac
259 am_indx=`expr "<<$>>am_indx" + 1`
260done<<>>dnl>>)
261changequote([,]))])
262
263# Add --enable-maintainer-mode option to configure.
264# From Jim Meyering
265
266# serial 1
267
268AC_DEFUN(AM_MAINTAINER_MODE,
269[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
270 dnl maintainer-mode is disabled by default
271 AC_ARG_ENABLE(maintainer-mode,
272[ --enable-maintainer-mode enable make rules and dependencies not useful
273 (and sometimes confusing) to the casual installer],
274 USE_MAINTAINER_MODE=$enableval,
275 USE_MAINTAINER_MODE=no)
276 AC_MSG_RESULT($USE_MAINTAINER_MODE)
277 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
278 MAINT=$MAINTAINER_MODE_TRUE
279 AC_SUBST(MAINT)dnl
280]
281)
282
283# Define a conditional.
284
285AC_DEFUN(AM_CONDITIONAL,
286[AC_SUBST($1_TRUE)
287AC_SUBST($1_FALSE)
288if $2; then
289 $1_TRUE=
290 $1_FALSE='#'
291else
292 $1_TRUE='#'
293 $1_FALSE=
294fi])
295
Note: See TracBrowser for help on using the repository browser.