* c-common.c (decl_attributes): Only take a single attributes
[official-gcc.git] / libjava / aclocal.m4
blobf8112bf8cf0fd25798ea2efbc3dfaf587b0fe46b
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
19   yes) multilib=yes ;;
20   no)  multilib=no ;;
21   *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
22  esac], [multilib=yes])dnl
24 dnl We may get other options which we dont 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
31 # source directory.
32 if test "${srcdir}" = "."; then
33   if test -z "${with_target_subdir}"; then
34     toprel=".."
35   else
36     if test "${with_target_subdir}" != "."; then
37       toprel="${with_multisrctop}../.."
38     else
39       toprel="${with_multisrctop}.."
40     fi
41   fi
42 else
43   toprel=".."
46 libgcj_basedir=$srcdir/$toprel/$1/libjava
47 AC_SUBST(libgcj_basedir)
49 AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
50 if :; then :; else
51   # This overrides the previous occurrence for automake, but not for
52   # autoconf, which is exactly what we want.
53   AC_CONFIG_AUX_DIR(..)
56 # This works around an automake problem.
57 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
58 AC_SUBST(mkinstalldirs)
60 AC_CANONICAL_SYSTEM
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],[])
68 AC_PROG_CC
69 AC_PROG_CXX
71 dnl version is pulled out to make it a bit easier to change using sed.
72 version=0.0.7
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 dont
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.
80 AC_CANONICAL_BUILD
82 AC_CHECK_TOOL(AS, as)
83 AC_CHECK_TOOL(AR, ar)
84 AC_CHECK_TOOL(RANLIB, ranlib, :)
86 AC_PROG_INSTALL
88 AM_MAINTAINER_MODE
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 dont execute it, since we dont care about
96 # the result.
97 if false; then
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.
101   :
102   AC_EXEEXT
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
110 libgcj_cflags=
111 libgcj_cxxflags=
112 libgcj_javaflags=
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)
122 ])dnl
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.
128 ifelse(yes,no,[
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],)
133 AC_SUBST(GCJ)
134 AC_SUBST(LIBTOOL)
137 # Do all the work for Automake.  This macro actually does too much --
138 # some checks are only needed if your package does certain things.
139 # But this isn't really a big deal.
141 # serial 1
143 dnl Usage:
144 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
146 AC_DEFUN(AM_INIT_AUTOMAKE,
147 [AC_REQUIRE([AC_PROG_INSTALL])
148 PACKAGE=[$1]
149 AC_SUBST(PACKAGE)
150 VERSION=[$2]
151 AC_SUBST(VERSION)
152 dnl test to see if srcdir already configured
153 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
154   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
156 ifelse([$3],,
157 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
158 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
159 AC_REQUIRE([AM_SANITY_CHECK])
160 AC_REQUIRE([AC_ARG_PROGRAM])
161 dnl FIXME This is truly gross.
162 missing_dir=`cd $ac_aux_dir && pwd`
163 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
164 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
165 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
166 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
167 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
168 AC_REQUIRE([AC_PROG_MAKE_SET])])
171 # Check to make sure that the build environment is sane.
174 AC_DEFUN(AM_SANITY_CHECK,
175 [AC_MSG_CHECKING([whether build environment is sane])
176 # Just in case
177 sleep 1
178 echo timestamp > conftestfile
179 # Do `set' in a subshell so we don't clobber the current shell's
180 # arguments.  Must try -L first in case configure is actually a
181 # symlink; some systems play weird games with the mod time of symlinks
182 # (eg FreeBSD returns the mod time of the symlink's containing
183 # directory).
184 if (
185    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
186    if test "[$]*" = "X"; then
187       # -L didn't work.
188       set X `ls -t $srcdir/configure conftestfile`
189    fi
190    if test "[$]*" != "X $srcdir/configure conftestfile" \
191       && test "[$]*" != "X conftestfile $srcdir/configure"; then
193       # If neither matched, then we have a broken ls.  This can happen
194       # if, for instance, CONFIG_SHELL is bash and it inherits a
195       # broken ls alias from the environment.  This has actually
196       # happened.  Such a system could not be considered "sane".
197       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
198 alias in your environment])
199    fi
201    test "[$]2" = conftestfile
202    )
203 then
204    # Ok.
205    :
206 else
207    AC_MSG_ERROR([newly created file is older than distributed files!
208 Check your system clock])
210 rm -f conftest*
211 AC_MSG_RESULT(yes)])
213 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
214 dnl The program must properly implement --version.
215 AC_DEFUN(AM_MISSING_PROG,
216 [AC_MSG_CHECKING(for working $2)
217 # Run test in a subshell; some versions of sh will print an error if
218 # an executable is not found, even if stderr is redirected.
219 # Redirect stdin to placate older versions of autoconf.  Sigh.
220 if ($2 --version) < /dev/null > /dev/null 2>&1; then
221    $1=$2
222    AC_MSG_RESULT(found)
223 else
224    $1="$3/missing $2"
225    AC_MSG_RESULT(missing)
227 AC_SUBST($1)])
229 # Add --enable-maintainer-mode option to configure.
230 # From Jim Meyering
232 # serial 1
234 AC_DEFUN(AM_MAINTAINER_MODE,
235 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
236   dnl maintainer-mode is disabled by default
237   AC_ARG_ENABLE(maintainer-mode,
238 [  --enable-maintainer-mode enable make rules and dependencies not useful
239                           (and sometimes confusing) to the casual installer],
240       USE_MAINTAINER_MODE=$enableval,
241       USE_MAINTAINER_MODE=no)
242   AC_MSG_RESULT($USE_MAINTAINER_MODE)
243   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
244   MAINT=$MAINTAINER_MODE_TRUE
245   AC_SUBST(MAINT)dnl
249 # Define a conditional.
251 AC_DEFUN(AM_CONDITIONAL,
252 [AC_SUBST($1_TRUE)
253 AC_SUBST($1_FALSE)
254 if $2; then
255   $1_TRUE=
256   $1_FALSE='#'
257 else
258   $1_TRUE='#'
259   $1_FALSE=
260 fi])
262 # Like AC_CONFIG_HEADER, but automatically create stamp file.
264 AC_DEFUN(AM_CONFIG_HEADER,
265 [AC_PREREQ([2.12])
266 AC_CONFIG_HEADER([$1])
267 dnl When config.status generates a header, we must update the stamp-h file.
268 dnl This file resides in the same directory as the config header
269 dnl that is generated.  We must strip everything past the first ":",
270 dnl and everything past the last "/".
271 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
272 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
273 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
274 <<am_indx=1
275 for am_file in <<$1>>; do
276   case " <<$>>CONFIG_HEADERS " in
277   *" <<$>>am_file "*<<)>>
278     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
279     ;;
280   esac
281   am_indx=`expr "<<$>>am_indx" + 1`
282 done<<>>dnl>>)
283 changequote([,]))])