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 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
14 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
15 # are probably using a cross compiler, which will not be able to fully
16 # link an executable. This should really be fixed in autoconf
19 AC_DEFUN(BOEHM_CONFIGURE,
21 dnl Default to --enable-multilib
22 AC_ARG_ENABLE(multilib,
23 [ --enable-multilib build many library versions (default)],
24 [case "${enableval}" in
27 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
28 esac], [multilib=yes])dnl
30 dnl We may get other options which we don't document:
31 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
33 if test "[$]{srcdir}" = "."; then
34 if test "[$]{with_target_subdir}" != "."; then
35 boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
37 boehm_gc_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
40 boehm_gc_basedir="[$]{srcdir}/$1"
42 AC_SUBST(boehm_gc_basedir)
46 AM_INIT_AUTOMAKE(boehm-gc, 5.1, no-define)
48 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
49 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
50 # are probably using a cross compiler, which will not be able to fully
51 # link an executable. This should really be fixed in autoconf
54 AC_DEFUN(LIB_AC_PROG_CC,
55 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
56 dnl Fool anybody using AC_PROG_CC.
57 AC_PROVIDE([AC_PROG_CC])
58 AC_CHECK_PROG(CC, gcc, gcc)
59 if test -z "$CC"; then
60 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
61 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
66 if test $ac_cv_prog_gcc = yes; then
68 dnl Check whether -g works, even if CFLAGS is set, in case the package
69 dnl plays around with CFLAGS (such as to build both debugging and
70 dnl normal versions of a library), tasteless as that idea is.
71 ac_test_CFLAGS="${CFLAGS+set}"
72 ac_save_CFLAGS="$CFLAGS"
75 if test "$ac_test_CFLAGS" = set; then
76 CFLAGS="$ac_save_CFLAGS"
77 elif test $ac_cv_prog_cc_g = yes; then
84 test "${CFLAGS+set}" = set || CFLAGS="-g"
90 # Likewise for AC_PROG_CXX.
91 AC_DEFUN(LIB_AC_PROG_CXX,
92 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
93 dnl Fool anybody using AC_PROG_CXX.
94 AC_PROVIDE([AC_PROG_CXX])
95 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
96 test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
100 if test $ac_cv_prog_gxx = yes; then
102 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
103 dnl plays around with CXXFLAGS (such as to build both debugging and
104 dnl normal versions of a library), tasteless as that idea is.
105 ac_test_CXXFLAGS="${CXXFLAGS+set}"
106 ac_save_CXXFLAGS="$CXXFLAGS"
109 if test "$ac_test_CXXFLAGS" = set; then
110 CXXFLAGS="$ac_save_CXXFLAGS"
111 elif test $ac_cv_prog_cxx_g = yes; then
118 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
124 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
125 # run it explicitly here, it will be run implicitly before
126 # NEWLIB_CONFIGURE, which doesn't work because that means that it will
127 # be run before AC_CANONICAL_HOST.
130 AC_CHECK_TOOL(AS, as)
131 AC_CHECK_TOOL(AR, ar)
132 AC_CHECK_TOOL(RANLIB, ranlib, :)
138 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
139 # at least currently, we never actually build a program, so we never
140 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
141 # fails, because we are probably configuring with a cross compiler
142 # which can't create executables. So we include AC_EXEEXT to keep
143 # automake happy, but we don't execute it, since we don't care about
149 . [$]{boehm_gc_basedir}/configure.host
151 case [$]{boehm_gc_basedir} in
152 /* | [A-Za-z]:[/\\]*) boehm_gc_flagbasedir=[$]{boehm_gc_basedir} ;;
153 *) boehm_gc_flagbasedir='[$](top_builddir)/'[$]{boehm_gc_basedir} ;;
156 boehm_gc_cflags="[$]{boehm_gc_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{boehm_gc_flagbasedir}/libc/include"
159 boehm_gc_cflags="[$]{boehm_gc_cflags} -I[$]{boehm_gc_flagbasedir}/../winsup/include"
163 boehm_gc_cflags="[$]{boehm_gc_cflags} -fno-builtin"
165 BOEHM_GC_CFLAGS=${boehm_gc_cflags}
166 AC_SUBST(BOEHM_GC_CFLAGS)
171 sinclude(../libtool.m4)
172 dnl The line below arranges for aclocal not to bring a definition of
173 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
174 dnl to add a definition of LIBTOOL to Makefile.in.
175 ifelse(yes,no,[AC_DEFUN([AM_PROG_LIBTOOL],[AC_SUBST(LIBTOOL)])])
177 # Do all the work for Automake. This macro actually does too much --
178 # some checks are only needed if your package does certain things.
179 # But this isn't really a big deal.
184 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
186 AC_DEFUN(AM_INIT_AUTOMAKE,
187 [AC_REQUIRE([AC_PROG_INSTALL])
192 dnl test to see if srcdir already configured
193 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
194 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
197 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
198 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
199 AC_REQUIRE([AM_SANITY_CHECK])
200 AC_REQUIRE([AC_ARG_PROGRAM])
201 dnl FIXME This is truly gross.
202 missing_dir=`cd $ac_aux_dir && pwd`
203 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
204 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
205 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
206 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
207 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
208 AC_REQUIRE([AC_PROG_MAKE_SET])])
211 # Check to make sure that the build environment is sane.
214 AC_DEFUN(AM_SANITY_CHECK,
215 [AC_MSG_CHECKING([whether build environment is sane])
218 echo timestamp > conftestfile
219 # Do `set' in a subshell so we don't clobber the current shell's
220 # arguments. Must try -L first in case configure is actually a
221 # symlink; some systems play weird games with the mod time of symlinks
222 # (eg FreeBSD returns the mod time of the symlink's containing
225 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
226 if test "[$]*" = "X"; then
228 set X `ls -t $srcdir/configure conftestfile`
230 if test "[$]*" != "X $srcdir/configure conftestfile" \
231 && test "[$]*" != "X conftestfile $srcdir/configure"; then
233 # If neither matched, then we have a broken ls. This can happen
234 # if, for instance, CONFIG_SHELL is bash and it inherits a
235 # broken ls alias from the environment. This has actually
236 # happened. Such a system could not be considered "sane".
237 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
238 alias in your environment])
241 test "[$]2" = conftestfile
247 AC_MSG_ERROR([newly created file is older than distributed files!
248 Check your system clock])
253 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
254 dnl The program must properly implement --version.
255 AC_DEFUN(AM_MISSING_PROG,
256 [AC_MSG_CHECKING(for working $2)
257 # Run test in a subshell; some versions of sh will print an error if
258 # an executable is not found, even if stderr is redirected.
259 # Redirect stdin to placate older versions of autoconf. Sigh.
260 if ($2 --version) < /dev/null > /dev/null 2>&1; then
265 AC_MSG_RESULT(missing)
269 # Add --enable-maintainer-mode option to configure.
274 AC_DEFUN(AM_MAINTAINER_MODE,
275 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
276 dnl maintainer-mode is disabled by default
277 AC_ARG_ENABLE(maintainer-mode,
278 [ --enable-maintainer-mode enable make rules and dependencies not useful
279 (and sometimes confusing) to the casual installer],
280 USE_MAINTAINER_MODE=$enableval,
281 USE_MAINTAINER_MODE=no)
282 AC_MSG_RESULT($USE_MAINTAINER_MODE)
283 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
284 MAINT=$MAINTAINER_MODE_TRUE
289 # Define a conditional.
291 AC_DEFUN(AM_CONDITIONAL,