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 AC_DEFUN(LIBGCJ_CONFIGURE,
15 dnl Default to --enable-multilib
16 AC_ARG_ENABLE(multilib,
17 [ --enable-multilib build many library versions (default)],
18 [case "${enableval}" in
21 *) AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
22 esac], [multilib=yes])dnl
24 dnl We may get other options which we don't document:
25 dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
27 # When building with srcdir == objdir, links to the source files will
28 # be created in directories within the target_subdir. We have to
29 # adjust toplevel_srcdir accordingly, so that configure finds
30 # install-sh and other auxiliary files that live in the top-level
32 if test "${srcdir}" = "."; then
33 if test -z "${with_target_subdir}"; then
36 if test "${with_target_subdir}" != "."; then
37 toprel="${with_multisrctop}../.."
39 toprel="${with_multisrctop}.."
46 libgcj_basedir=$srcdir/$toprel/$1/libjava
47 AC_SUBST(libgcj_basedir)
49 AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
51 # This overrides the previous occurrence for automake, but not for
52 # autoconf, which is exactly what we want.
56 # This works around an automake problem.
57 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
58 AC_SUBST(mkinstalldirs)
62 dnl This shouldn't be needed, as long as top-level dependencies are
63 dnl defined correctly and shared-library paths are set up so that
64 dnl execution tests succeed. FIXME.
65 define([AC_PROG_CC_WORKS],[])
66 define([AC_PROG_CXX_WORKS],[])
71 dnl version is pulled out to make it a bit easier to change using sed.
73 dnl Still use "libjava" here to placate dejagnu.
74 AM_INIT_AUTOMAKE(libjava, $version)
76 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
77 # run it explicitly here, it will be run implicitly before
78 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
79 # be run before AC_CANONICAL_HOST.
84 AC_CHECK_TOOL(RANLIB, ranlib, :)
90 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
91 # at least currently, we never actually build a program, so we never
92 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
93 # fails, because we are probably configuring with a cross compiler
94 # which cant create executables. So we include AC_EXEEXT to keep
95 # automake happy, but we don't execute it, since we don't care about
98 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
99 # to nothing, so nothing would remain between `then' and `fi' if it
100 # were not for the `:' below.
105 # configure.host sets the following important variables
106 # libgcj_cflags - host specific C compiler flags
107 # libgcj_cxxflags - host specific C++ compiler flags
108 # libgcj_javaflags - host specific Java compiler flags
114 . [$]{srcdir}/configure.host
116 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
117 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
118 LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}"
119 AC_SUBST(LIBGCJ_CFLAGS)
120 AC_SUBST(LIBGCJ_CXXFLAGS)
121 AC_SUBST(LIBGCJ_JAVAFLAGS)
124 sinclude(../libtool.m4)
125 dnl The lines below arrange for aclocal not to bring libtool.m4
126 dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
127 dnl to add a definition of LIBTOOL to Makefile.in.
129 AC_DEFUN([AM_PROG_LIBTOOL],)
130 AC_DEFUN([AC_LIBTOOL_DLOPEN],)
131 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
132 AC_DEFUN([LT_AC_PROG_GCJ],)
139 dnl From Bruno Haible.
143 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
144 dnl those with the standalone portable GNU libiconv installed).
146 AC_ARG_WITH([libiconv-prefix],
147 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
148 for dir in `echo "$withval" | tr : ' '`; do
149 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
150 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
154 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
155 am_cv_func_iconv="no, consider installing GNU libiconv"
157 AC_TRY_LINK([#include <stdlib.h>
159 [iconv_t cd = iconv_open("","");
160 iconv(cd,NULL,NULL,NULL,NULL);
162 am_cv_func_iconv=yes)
163 if test "$am_cv_func_iconv" != yes; then
166 AC_TRY_LINK([#include <stdlib.h>
168 [iconv_t cd = iconv_open("","");
169 iconv(cd,NULL,NULL,NULL,NULL);
172 am_cv_func_iconv=yes)
176 if test "$am_cv_func_iconv" = yes; then
177 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
178 AC_MSG_CHECKING([for iconv declaration])
179 AC_CACHE_VAL(am_cv_proto_iconv, [
187 #if defined(__STDC__) || defined(__cplusplus)
188 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
192 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
193 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
194 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
195 AC_MSG_RESULT([$]{ac_t:-
196 }[$]am_cv_proto_iconv)
197 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
198 [Define as const if the declaration of iconv() needs const.])
201 if test "$am_cv_lib_iconv" = yes; then
207 # Do all the work for Automake. This macro actually does too much --
208 # some checks are only needed if your package does certain things.
209 # But this isn't really a big deal.
214 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
216 AC_DEFUN(AM_INIT_AUTOMAKE,
217 [AC_REQUIRE([AC_PROG_INSTALL])
222 dnl test to see if srcdir already configured
223 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
224 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
227 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
228 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
229 AC_REQUIRE([AM_SANITY_CHECK])
230 AC_REQUIRE([AC_ARG_PROGRAM])
231 dnl FIXME This is truly gross.
232 missing_dir=`cd $ac_aux_dir && pwd`
233 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
234 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
235 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
236 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
237 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
238 AC_REQUIRE([AC_PROG_MAKE_SET])])
241 # Check to make sure that the build environment is sane.
244 AC_DEFUN(AM_SANITY_CHECK,
245 [AC_MSG_CHECKING([whether build environment is sane])
248 echo timestamp > conftestfile
249 # Do `set' in a subshell so we don't clobber the current shell's
250 # arguments. Must try -L first in case configure is actually a
251 # symlink; some systems play weird games with the mod time of symlinks
252 # (eg FreeBSD returns the mod time of the symlink's containing
255 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
256 if test "[$]*" = "X"; then
258 set X `ls -t $srcdir/configure conftestfile`
260 if test "[$]*" != "X $srcdir/configure conftestfile" \
261 && test "[$]*" != "X conftestfile $srcdir/configure"; then
263 # If neither matched, then we have a broken ls. This can happen
264 # if, for instance, CONFIG_SHELL is bash and it inherits a
265 # broken ls alias from the environment. This has actually
266 # happened. Such a system could not be considered "sane".
267 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
268 alias in your environment])
271 test "[$]2" = conftestfile
277 AC_MSG_ERROR([newly created file is older than distributed files!
278 Check your system clock])
283 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
284 dnl The program must properly implement --version.
285 AC_DEFUN(AM_MISSING_PROG,
286 [AC_MSG_CHECKING(for working $2)
287 # Run test in a subshell; some versions of sh will print an error if
288 # an executable is not found, even if stderr is redirected.
289 # Redirect stdin to placate older versions of autoconf. Sigh.
290 if ($2 --version) < /dev/null > /dev/null 2>&1; then
295 AC_MSG_RESULT(missing)
299 # Add --enable-maintainer-mode option to configure.
304 AC_DEFUN(AM_MAINTAINER_MODE,
305 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
306 dnl maintainer-mode is disabled by default
307 AC_ARG_ENABLE(maintainer-mode,
308 [ --enable-maintainer-mode enable make rules and dependencies not useful
309 (and sometimes confusing) to the casual installer],
310 USE_MAINTAINER_MODE=$enableval,
311 USE_MAINTAINER_MODE=no)
312 AC_MSG_RESULT($USE_MAINTAINER_MODE)
313 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
314 MAINT=$MAINTAINER_MODE_TRUE
319 # Define a conditional.
321 AC_DEFUN(AM_CONDITIONAL,
332 # Like AC_CONFIG_HEADER, but automatically create stamp file.
334 AC_DEFUN(AM_CONFIG_HEADER,
336 AC_CONFIG_HEADER([$1])
337 dnl When config.status generates a header, we must update the stamp-h file.
338 dnl This file resides in the same directory as the config header
339 dnl that is generated. We must strip everything past the first ":",
340 dnl and everything past the last "/".
341 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
342 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
343 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
345 for am_file in <<$1>>; do
346 case " <<$>>CONFIG_HEADERS " in
347 *" <<$>>am_file "*<<)>>
348 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
351 am_indx=`expr "<<$>>am_indx" + 1`