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(LIBGCJ_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 dont document:
31 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
33 if test "[$]{srcdir}" = "."; then
34 if test "[$]{with_target_subdir}" != "."; then
35 libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
37 libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
40 libgcj_basedir="[$]{srcdir}/$1"
42 AC_SUBST(libgcj_basedir)
46 dnl Still use "libjava" here to placate dejagnu.
47 AM_INIT_AUTOMAKE(libjava, 0.0.7)
49 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
50 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
51 # are probably using a cross compiler, which will not be able to fully
52 # link an executable. This should really be fixed in autoconf
55 AC_DEFUN(LIB_AC_PROG_CC,
56 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
57 AC_CHECK_PROG(CC, gcc, gcc)
58 if test -z "$CC"; then
59 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
60 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
65 if test $ac_cv_prog_gcc = yes; then
67 dnl Check whether -g works, even if CFLAGS is set, in case the package
68 dnl plays around with CFLAGS (such as to build both debugging and
69 dnl normal versions of a library), tasteless as that idea is.
70 ac_test_CFLAGS="${CFLAGS+set}"
71 ac_save_CFLAGS="$CFLAGS"
74 if test "$ac_test_CFLAGS" = set; then
75 CFLAGS="$ac_save_CFLAGS"
76 elif test $ac_cv_prog_cc_g = yes; then
83 test "${CFLAGS+set}" = set || CFLAGS="-g"
89 # Likewise for AC_PROG_CXX.
90 AC_DEFUN(LIB_AC_PROG_CXX,
91 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
92 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
93 test -z "$CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
97 if test $ac_cv_prog_gxx = yes; then
99 dnl Check whether -g works, even if CXXFLAGS is set, in case the package
100 dnl plays around with CXXFLAGS (such as to build both debugging and
101 dnl normal versions of a library), tasteless as that idea is.
102 ac_test_CXXFLAGS="${CXXFLAGS+set}"
103 ac_save_CXXFLAGS="$CXXFLAGS"
106 if test "$ac_test_CXXFLAGS" = set; then
107 CXXFLAGS="$ac_save_CXXFLAGS"
108 elif test $ac_cv_prog_cxx_g = yes; then
115 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
121 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont
122 # run it explicitly here, it will be run implicitly before
123 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
124 # be run before AC_CANONICAL_HOST.
127 AC_CHECK_TOOL(AS, as)
128 AC_CHECK_TOOL(AR, ar)
129 AC_CHECK_TOOL(RANLIB, ranlib, :)
135 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
136 # at least currently, we never actually build a program, so we never
137 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
138 # fails, because we are probably configuring with a cross compiler
139 # which cant create executables. So we include AC_EXEEXT to keep
140 # automake happy, but we dont execute it, since we dont care about
146 # configure.host sets the following important variables
147 # libgcj_cflags - host specific C compiler flags
148 # libgcj_cxxflags - host specific C++ compiler flags
149 # libgcj_javaflags - host specific Java compiler flags
155 . [$]{libgcj_basedir}/configure.host
157 case [$]{libgcj_basedir} in
158 /* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{libgcj_basedir} ;;
159 *) libgcj_flagbasedir='[$](top_builddir)/'[$]{libgcj_basedir} ;;
162 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
163 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
164 LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
165 AC_SUBST(LIBGCJ_CFLAGS)
166 AC_SUBST(LIBGCJ_CXXFLAGS)
167 AC_SUBST(LIBGCJ_JAVAFLAGS)
170 # Do all the work for Automake. This macro actually does too much --
171 # some checks are only needed if your package does certain things.
172 # But this isn't really a big deal.
177 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
179 AC_DEFUN(AM_INIT_AUTOMAKE,
180 [AC_REQUIRE([AC_PROG_INSTALL])
185 dnl test to see if srcdir already configured
186 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
187 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
190 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
191 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
192 AC_REQUIRE([AM_SANITY_CHECK])
193 AC_REQUIRE([AC_ARG_PROGRAM])
194 dnl FIXME This is truly gross.
195 missing_dir=`cd $ac_aux_dir && pwd`
196 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
197 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
198 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
199 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
200 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
201 AC_REQUIRE([AC_PROG_MAKE_SET])])
204 # Check to make sure that the build environment is sane.
207 AC_DEFUN(AM_SANITY_CHECK,
208 [AC_MSG_CHECKING([whether build environment is sane])
211 echo timestamp > conftestfile
212 # Do `set' in a subshell so we don't clobber the current shell's
213 # arguments. Must try -L first in case configure is actually a
214 # symlink; some systems play weird games with the mod time of symlinks
215 # (eg FreeBSD returns the mod time of the symlink's containing
218 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
219 if test "[$]*" = "X"; then
221 set X `ls -t $srcdir/configure conftestfile`
223 if test "[$]*" != "X $srcdir/configure conftestfile" \
224 && test "[$]*" != "X conftestfile $srcdir/configure"; then
226 # If neither matched, then we have a broken ls. This can happen
227 # if, for instance, CONFIG_SHELL is bash and it inherits a
228 # broken ls alias from the environment. This has actually
229 # happened. Such a system could not be considered "sane".
230 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
231 alias in your environment])
234 test "[$]2" = conftestfile
240 AC_MSG_ERROR([newly created file is older than distributed files!
241 Check your system clock])
246 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
247 dnl The program must properly implement --version.
248 AC_DEFUN(AM_MISSING_PROG,
249 [AC_MSG_CHECKING(for working $2)
250 # Run test in a subshell; some versions of sh will print an error if
251 # an executable is not found, even if stderr is redirected.
252 # Redirect stdin to placate older versions of autoconf. Sigh.
253 if ($2 --version) < /dev/null > /dev/null 2>&1; then
258 AC_MSG_RESULT(missing)
262 # Add --enable-maintainer-mode option to configure.
267 AC_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
282 # Define a conditional.
284 AC_DEFUN(AM_CONDITIONAL,
295 # Like AC_CONFIG_HEADER, but automatically create stamp file.
297 AC_DEFUN(AM_CONFIG_HEADER,
299 AC_CONFIG_HEADER([$1])
300 dnl When config.status generates a header, we must update the stamp-h file.
301 dnl This file resides in the same directory as the config header
302 dnl that is generated. We must strip everything past the first ":",
303 dnl and everything past the last "/".
304 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
305 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
306 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
308 for am_file in <<$1>>; do
309 case " <<$>>CONFIG_HEADERS " in
310 *" <<$>>am_file "*<<)>>
311 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
314 am_indx=`expr "<<$>>am_indx" + 1`