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 # Copyright (c) 1999-2001, 2002 by Red Hat, Inc. All rights reserved.
15 # THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
16 # OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
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.
24 # Original author: Tom Tromey
26 AC_DEFUN(GC_CONFIGURE,
29 AM_INIT_AUTOMAKE(gc, 6.1a1, no-define)
31 # The autoconf 2.5x version of the no-executables hack.
32 sinclude(../config/no-executables.m4)
35 # Yak. We must force CC and CXX to /not/ be precious variables; otherwise
36 # the wrong, non-multilib-adjusted value will be used in multilibs.
37 # As a side effect, we have to subst CFLAGS and CXXFLAGS ourselves.
39 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
40 m4_define([_AC_ARG_VAR_PRECIOUS],[])
43 m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
50 AC_CHECK_TOOL(RANLIB, ranlib, :)
56 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
57 # at least currently, we never actually build a program, so we never
58 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
59 # fails, because we are probably configuring with a cross compiler
60 # which can't create executables. So we include AC_EXEEXT to keep
61 # automake happy, but we don't execute it, since we don't care about
64 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
65 # to nothing, so nothing would remain between `then' and `fi' if it
66 # were not for the `:' below.
71 . [$]{srcdir}/configure.host
73 case [$]{gc_basedir} in
74 /* | [A-Za-z]:[/\\]*) gc_flagbasedir=[$]{gc_basedir} ;;
75 *) gc_flagbasedir='[$](top_builddir)/'[$]{gc_basedir} ;;
78 gc_cflags="[$]{gc_cflags} -I"'[$](top_builddir)'"/$1/targ-include -I[$]{gc_flagbasedir}/libc/include"
81 gc_cflags="[$]{gc_cflags} -I[$]{gc_flagbasedir}/../winsup/include"
85 dnl gc_cflags="[$]{gc_cflags} -fno-builtin"
87 GC_CFLAGS=${gc_cflags}
93 sinclude(../libtool.m4)
94 dnl The line below arranges for aclocal not to bring a definition of
95 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
96 dnl to add a definition of LIBTOOL to Makefile.in.
97 ifelse(yes,no,[AC_DEFUN([AM_PROG_LIBTOOL],[AC_SUBST(LIBTOOL)])])
99 # Do all the work for Automake. This macro actually does too much --
100 # some checks are only needed if your package does certain things.
101 # But this isn't really a big deal.
106 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
108 AC_DEFUN(AM_INIT_AUTOMAKE,
109 [AC_REQUIRE([AC_PROG_INSTALL])
114 dnl test to see if srcdir already configured
115 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
116 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
119 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
120 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
121 AC_REQUIRE([AM_SANITY_CHECK])
122 AC_REQUIRE([AC_ARG_PROGRAM])
123 dnl FIXME This is truly gross.
124 missing_dir=`cd $ac_aux_dir && pwd`
125 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
126 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
127 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
128 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
129 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
130 AC_REQUIRE([AC_PROG_MAKE_SET])])
133 # Check to make sure that the build environment is sane.
136 AC_DEFUN(AM_SANITY_CHECK,
137 [AC_MSG_CHECKING([whether build environment is sane])
140 echo timestamp > conftestfile
141 # Do `set' in a subshell so we don't clobber the current shell's
142 # arguments. Must try -L first in case configure is actually a
143 # symlink; some systems play weird games with the mod time of symlinks
144 # (eg FreeBSD returns the mod time of the symlink's containing
147 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
148 if test "[$]*" = "X"; then
150 set X `ls -t $srcdir/configure conftestfile`
152 if test "[$]*" != "X $srcdir/configure conftestfile" \
153 && test "[$]*" != "X conftestfile $srcdir/configure"; then
155 # If neither matched, then we have a broken ls. This can happen
156 # if, for instance, CONFIG_SHELL is bash and it inherits a
157 # broken ls alias from the environment. This has actually
158 # happened. Such a system could not be considered "sane".
159 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
160 alias in your environment])
163 test "[$]2" = conftestfile
169 AC_MSG_ERROR([newly created file is older than distributed files!
170 Check your system clock])
175 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
176 dnl The program must properly implement --version.
177 AC_DEFUN(AM_MISSING_PROG,
178 [AC_MSG_CHECKING(for working $2)
179 # Run test in a subshell; some versions of sh will print an error if
180 # an executable is not found, even if stderr is redirected.
181 # Redirect stdin to placate older versions of autoconf. Sigh.
182 if ($2 --version) < /dev/null > /dev/null 2>&1; then
187 AC_MSG_RESULT(missing)
191 # Add --enable-maintainer-mode option to configure.
196 AC_DEFUN(AM_MAINTAINER_MODE,
197 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
198 dnl maintainer-mode is disabled by default
199 AC_ARG_ENABLE(maintainer-mode,
200 [ --enable-maintainer-mode enable make rules and dependencies not useful
201 (and sometimes confusing) to the casual installer],
202 USE_MAINTAINER_MODE=$enableval,
203 USE_MAINTAINER_MODE=no)
204 AC_MSG_RESULT($USE_MAINTAINER_MODE)
205 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
206 MAINT=$MAINTAINER_MODE_TRUE
211 # Define a conditional.
213 AC_DEFUN(AM_CONDITIONAL,