source: trunk/src/gcc/boehm-gc/aclocal.m4@ 1036

Last change on this file since 1036 was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 10.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# Copyright (c) 1999-2001 by Red Hat, Inc. All rights reserved.
14#
15# THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
16# OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
17#
18# Permission is hereby granted to use or copy this program
19# for any purpose, provided the above notices are retained on all copies.
20# Permission to modify the code and to distribute modified code is granted,
21# provided the above notices are retained, and a notice that the code was
22# modified is included with the above copyright notice.
23#
24# Original author: Tom Tromey
25
26# FIXME: We temporarily define our own version of AC_PROG_CC. This is
27# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
28# are probably using a cross compiler, which will not be able to fully
29# link an executable. This should really be fixed in autoconf
30# itself.
31
32AC_DEFUN(GC_CONFIGURE,
33[
34dnl Default to --enable-multilib
35AC_ARG_ENABLE(multilib,
36[ --enable-multilib build many library versions (default)],
37[case "${enableval}" in
38 yes) multilib=yes ;;
39 no) multilib=no ;;
40 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
41 esac], [multilib=yes])dnl
42
43dnl We may get other options which we don't document:
44dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
45
46dnl I needed to add the -n test to allow configuration in src directory - HB
47if test "[$]{srcdir}" = "."; then
48 if test "[$]{with_target_subdir}" != "." -a -n "[$]{with_target_subdir}"; then
49 gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
50 else
51 gc_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
52 fi
53else
54 gc_basedir="[$]{srcdir}/$1"
55fi
56AC_SUBST(gc_basedir)
57AC_CONFIG_AUX_DIR($gc_basedir/..)
58if :; then :; else
59 # This overrides the previous occurrence for automake, but not for
60 # autoconf, which is exactly what we want.
61 AC_CONFIG_AUX_DIR(..)
62fi
63
64AC_CANONICAL_SYSTEM
65
66# This works around an automake problem.
67mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
68AC_SUBST(mkinstalldirs)
69
70AM_INIT_AUTOMAKE(gc, 6.0, no-define)
71
72# FIXME: We temporarily define our own version of AC_PROG_CC. This is
73# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
74# are probably using a cross compiler, which will not be able to fully
75# link an executable. This should really be fixed in autoconf
76# itself.
77
78AC_DEFUN(LIB_AC_PROG_CC,
79[AC_BEFORE([$0], [AC_PROG_CPP])dnl
80dnl Fool anybody using AC_PROG_CC.
81AC_PROVIDE([AC_PROG_CC])
82AC_CHECK_PROG(CC, gcc, gcc)
83if test -z "$CC"; then
84 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
85 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
86fi
87
88AC_PROG_CC_GNU
89
90if test $ac_cv_prog_gcc = yes; then
91 GCC=yes
92dnl Check whether -g works, even if CFLAGS is set, in case the package
93dnl plays around with CFLAGS (such as to build both debugging and
94dnl normal versions of a library), tasteless as that idea is.
95 ac_test_CFLAGS="${CFLAGS+set}"
96 ac_save_CFLAGS="$CFLAGS"
97 CFLAGS=
98 AC_PROG_CC_G
99 if test "$ac_test_CFLAGS" = set; then
100 CFLAGS="$ac_save_CFLAGS"
101 elif test $ac_cv_prog_cc_g = yes; then
102 CFLAGS="-g -O2"
103 else
104 CFLAGS="-O2"
105 fi
106else
107 GCC=
108 test "${CFLAGS+set}" = set || CFLAGS="-g"
109fi
110])
111
112LIB_AC_PROG_CC
113
114# Likewise for AC_PROG_CXX.
115AC_DEFUN(LIB_AC_PROG_CXX,
116[AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
117dnl Fool anybody using AC_PROG_CXX.
118AC_PROVIDE([AC_PROG_CXX])
119AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
120test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
121
122AC_PROG_CXX_GNU
123
124if test $ac_cv_prog_gxx = yes; then
125 GXX=yes
126dnl Check whether -g works, even if CXXFLAGS is set, in case the package
127dnl plays around with CXXFLAGS (such as to build both debugging and
128dnl normal versions of a library), tasteless as that idea is.
129 ac_test_CXXFLAGS="${CXXFLAGS+set}"
130 ac_save_CXXFLAGS="$CXXFLAGS"
131 CXXFLAGS=
132 AC_PROG_CXX_G
133 if test "$ac_test_CXXFLAGS" = set; then
134 CXXFLAGS="$ac_save_CXXFLAGS"
135 elif test $ac_cv_prog_cxx_g = yes; then
136 CXXFLAGS="-g -O2"
137 else
138 CXXFLAGS="-O2"
139 fi
140else
141 GXX=
142 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
143fi
144])
145
146LIB_AC_PROG_CXX
147
148# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
149# run it explicitly here, it will be run implicitly before
150# NEWLIB_CONFIGURE, which doesn't work because that means that it will
151# be run before AC_CANONICAL_HOST.
152AC_CANONICAL_BUILD
153
154AC_CHECK_TOOL(AS, as)
155AC_CHECK_TOOL(AR, ar)
156AC_CHECK_TOOL(RANLIB, ranlib, :)
157
158AC_PROG_INSTALL
159
160AM_MAINTAINER_MODE
161
162# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
163# at least currently, we never actually build a program, so we never
164# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
165# fails, because we are probably configuring with a cross compiler
166# which can't create executables. So we include AC_EXEEXT to keep
167# automake happy, but we don't execute it, since we don't care about
168# the result.
169if false; then
170 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
171 # to nothing, so nothing would remain between `then' and `fi' if it
172 # were not for the `:' below.
173 :
174 AC_EXEEXT
175fi
176
177. [$]{srcdir}/configure.host
178
179case [$]{gc_basedir} in
180/* | [A-Za-z]:[/\\]*) gc_flagbasedir=[$]{gc_basedir} ;;
181*) gc_flagbasedir='[$](top_builddir)/'[$]{gc_basedir} ;;
182esac
183
184gc_cflags="[$]{gc_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{gc_flagbasedir}/libc/include"
185case "${host}" in
186 *-*-cygwin32*)
187 gc_cflags="[$]{gc_cflags} -I[$]{gc_flagbasedir}/../winsup/include"
188 ;;
189esac
190
191dnl gc_cflags="[$]{gc_cflags} -fno-builtin"
192
193GC_CFLAGS=${gc_cflags}
194AC_SUBST(GC_CFLAGS)
195]))
196
197))))
198
199sinclude(../libtool.m4)
200dnl The line below arranges for aclocal not to bring a definition of
201dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
202dnl to add a definition of LIBTOOL to Makefile.in.
203ifelse(yes,no,[AC_DEFUN([AM_PROG_LIBTOOL],[AC_SUBST(LIBTOOL)])])
204
205# Do all the work for Automake. This macro actually does too much --
206# some checks are only needed if your package does certain things.
207# But this isn't really a big deal.
208
209# serial 1
210
211dnl Usage:
212dnl AM_INIT_AUTOMAKE(package,version, [no-define])
213
214AC_DEFUN(AM_INIT_AUTOMAKE,
215[AC_REQUIRE([AC_PROG_INSTALL])
216PACKAGE=[$1]
217AC_SUBST(PACKAGE)
218VERSION=[$2]
219AC_SUBST(VERSION)
220dnl test to see if srcdir already configured
221if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
222 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
223fi
224ifelse([$3],,
225AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
226AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
227AC_REQUIRE([AM_SANITY_CHECK])
228AC_REQUIRE([AC_ARG_PROGRAM])
229dnl FIXME This is truly gross.
230missing_dir=`cd $ac_aux_dir && pwd`
231AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
232AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
233AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
234AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
235AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
236AC_REQUIRE([AC_PROG_MAKE_SET])])
237
238#
239# Check to make sure that the build environment is sane.
240#
241
242AC_DEFUN(AM_SANITY_CHECK,
243[AC_MSG_CHECKING([whether build environment is sane])
244# Just in case
245sleep 1
246echo timestamp > conftestfile
247# Do `set' in a subshell so we don't clobber the current shell's
248# arguments. Must try -L first in case configure is actually a
249# symlink; some systems play weird games with the mod time of symlinks
250# (eg FreeBSD returns the mod time of the symlink's containing
251# directory).
252if (
253 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
254 if test "[$]*" = "X"; then
255 # -L didn't work.
256 set X `ls -t $srcdir/configure conftestfile`
257 fi
258 if test "[$]*" != "X $srcdir/configure conftestfile" \
259 && test "[$]*" != "X conftestfile $srcdir/configure"; then
260
261 # If neither matched, then we have a broken ls. This can happen
262 # if, for instance, CONFIG_SHELL is bash and it inherits a
263 # broken ls alias from the environment. This has actually
264 # happened. Such a system could not be considered "sane".
265 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
266alias in your environment])
267 fi
268
269 test "[$]2" = conftestfile
270 )
271then
272 # Ok.
273 :
274else
275 AC_MSG_ERROR([newly created file is older than distributed files!
276Check your system clock])
277fi
278rm -f conftest*
279AC_MSG_RESULT(yes)])
280
281dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
282dnl The program must properly implement --version.
283AC_DEFUN(AM_MISSING_PROG,
284[AC_MSG_CHECKING(for working $2)
285# Run test in a subshell; some versions of sh will print an error if
286# an executable is not found, even if stderr is redirected.
287# Redirect stdin to placate older versions of autoconf. Sigh.
288if ($2 --version) < /dev/null > /dev/null 2>&1; then
289 $1=$2
290 AC_MSG_RESULT(found)
291else
292 $1="$3/missing $2"
293 AC_MSG_RESULT(missing)
294fi
295AC_SUBST($1)])
296
297# Add --enable-maintainer-mode option to configure.
298# From Jim Meyering
299
300# serial 1
301
302AC_DEFUN(AM_MAINTAINER_MODE,
303[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
304 dnl maintainer-mode is disabled by default
305 AC_ARG_ENABLE(maintainer-mode,
306[ --enable-maintainer-mode enable make rules and dependencies not useful
307 (and sometimes confusing) to the casual installer],
308 USE_MAINTAINER_MODE=$enableval,
309 USE_MAINTAINER_MODE=no)
310 AC_MSG_RESULT($USE_MAINTAINER_MODE)
311 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
312 MAINT=$MAINTAINER_MODE_TRUE
313 AC_SUBST(MAINT)dnl
314]
315)
316
317# Define a conditional.
318
319AC_DEFUN(AM_CONDITIONAL,
320[AC_SUBST($1_TRUE)
321AC_SUBST($1_FALSE)
322if $2; then
323 $1_TRUE=
324 $1_FALSE='#'
325else
326 $1_TRUE='#'
327 $1_FALSE=
328fi])
329
Note: See TracBrowser for help on using the repository browser.