]>
Commit | Line | Data |
---|---|---|
ee9dd372 TT |
1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
2 | ||
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. | |
7 | ||
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. | |
12 | ||
ee9dd372 TT |
13 | AC_DEFUN(LIBGCJ_CONFIGURE, |
14 | [ | |
15 | dnl Default to --enable-multilib | |
16 | AC_ARG_ENABLE(multilib, | |
bc5afba4 | 17 | [ --enable-multilib build many library versions (default)], |
ee9dd372 TT |
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 | |
23 | ||
24 | dnl We may get other options which we dont document: | |
25 | dnl --with-target-subdir, --with-multisrctop, --with-multisubdir | |
26 | ||
27 | if test "[$]{srcdir}" = "."; then | |
28 | if test "[$]{with_target_subdir}" != "."; then | |
29 | libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1" | |
30 | else | |
31 | libgcj_basedir="[$]{srcdir}/[$]{with_multisrctop}$1" | |
32 | fi | |
33 | else | |
34 | libgcj_basedir="[$]{srcdir}/$1" | |
35 | fi | |
36 | AC_SUBST(libgcj_basedir) | |
37 | ||
38 | AC_CANONICAL_HOST | |
39 | ||
158a8e6b AO |
40 | dnl This shouldn't be needed, as long as top-level dependencies are |
41 | dnl defined correctly and shared-library paths are set up so that | |
42 | dnl execution tests succeed. FIXME. | |
43 | define([AC_PROG_CC_WORKS],[]) | |
44 | define([AC_PROG_CXX_WORKS],[]) | |
45 | ||
46 | AC_PROG_CC | |
47 | AC_PROG_CXX | |
48 | ||
550c2492 TT |
49 | dnl version is pulled out to make it a bit easier to change using sed. |
50 | version=0.0.7 | |
ee9dd372 | 51 | dnl Still use "libjava" here to placate dejagnu. |
550c2492 | 52 | AM_INIT_AUTOMAKE(libjava, $version) |
ee9dd372 | 53 | |
ee9dd372 TT |
54 | # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we dont |
55 | # run it explicitly here, it will be run implicitly before | |
56 | # LIBGCJ_CONFIGURE, which doesn't work because that means that it will | |
57 | # be run before AC_CANONICAL_HOST. | |
58 | AC_CANONICAL_BUILD | |
59 | ||
60 | AC_CHECK_TOOL(AS, as) | |
61 | AC_CHECK_TOOL(AR, ar) | |
62 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
63 | ||
64 | AC_PROG_INSTALL | |
65 | ||
66 | AM_MAINTAINER_MODE | |
67 | ||
68 | # We need AC_EXEEXT to keep automake happy in cygnus mode. However, | |
69 | # at least currently, we never actually build a program, so we never | |
70 | # need to use $(EXEEXT). Moreover, the test for EXEEXT normally | |
71 | # fails, because we are probably configuring with a cross compiler | |
72 | # which cant create executables. So we include AC_EXEEXT to keep | |
73 | # automake happy, but we dont execute it, since we dont care about | |
74 | # the result. | |
75 | if false; then | |
76 | AC_EXEEXT | |
77 | fi | |
78 | ||
79 | # configure.host sets the following important variables | |
80 | # libgcj_cflags - host specific C compiler flags | |
81 | # libgcj_cxxflags - host specific C++ compiler flags | |
82 | # libgcj_javaflags - host specific Java compiler flags | |
83 | ||
84 | libgcj_cflags= | |
85 | libgcj_cxxflags= | |
86 | libgcj_javaflags= | |
87 | ||
88 | . [$]{libgcj_basedir}/configure.host | |
89 | ||
90 | case [$]{libgcj_basedir} in | |
91 | /* | [A-Za-z]:[/\\]*) libgcj_flagbasedir=[$]{libgcj_basedir} ;; | |
92 | *) libgcj_flagbasedir='[$](top_builddir)/'[$]{libgcj_basedir} ;; | |
93 | esac | |
94 | ||
95 | LIBGCJ_CFLAGS="[$]{libgcj_cflags}" | |
96 | LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}" | |
97 | LIBGCJ_JAVAFLAGS="[$]{libgcj_javaflags}" | |
98 | AC_SUBST(LIBGCJ_CFLAGS) | |
99 | AC_SUBST(LIBGCJ_CXXFLAGS) | |
100 | AC_SUBST(LIBGCJ_JAVAFLAGS) | |
101 | ])dnl | |
102 | ||
6d0860ee AO |
103 | sinclude(../libtool.m4) |
104 | dnl The lines below arrange for aclocal not to bring libtool.m4 | |
105 | dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake | |
106 | dnl to add a definition of LIBTOOL to Makefile.in. | |
107 | ifelse(yes,no,[ | |
108 | AC_DEFUN([AM_PROG_LIBTOOL],) | |
109 | AC_DEFUN([AC_LIBTOOL_DLOPEN],) | |
110 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE],) | |
cad396c8 AO |
111 | AC_DEFUN([LT_AC_PROG_GCJ],) |
112 | AC_SUBST(GCJ) | |
6d0860ee AO |
113 | AC_SUBST(LIBTOOL) |
114 | ]) | |
115 | ||
ee9dd372 TT |
116 | # Do all the work for Automake. This macro actually does too much -- |
117 | # some checks are only needed if your package does certain things. | |
118 | # But this isn't really a big deal. | |
119 | ||
120 | # serial 1 | |
121 | ||
122 | dnl Usage: | |
123 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) | |
124 | ||
125 | AC_DEFUN(AM_INIT_AUTOMAKE, | |
126 | [AC_REQUIRE([AC_PROG_INSTALL]) | |
127 | PACKAGE=[$1] | |
128 | AC_SUBST(PACKAGE) | |
129 | VERSION=[$2] | |
130 | AC_SUBST(VERSION) | |
131 | dnl test to see if srcdir already configured | |
132 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
133 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
134 | fi | |
135 | ifelse([$3],, | |
136 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
137 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) | |
138 | AC_REQUIRE([AM_SANITY_CHECK]) | |
139 | AC_REQUIRE([AC_ARG_PROGRAM]) | |
140 | dnl FIXME This is truly gross. | |
141 | missing_dir=`cd $ac_aux_dir && pwd` | |
142 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) | |
143 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) | |
144 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) | |
145 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) | |
146 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) | |
147 | AC_REQUIRE([AC_PROG_MAKE_SET])]) | |
148 | ||
149 | # | |
150 | # Check to make sure that the build environment is sane. | |
151 | # | |
152 | ||
153 | AC_DEFUN(AM_SANITY_CHECK, | |
154 | [AC_MSG_CHECKING([whether build environment is sane]) | |
155 | # Just in case | |
156 | sleep 1 | |
157 | echo timestamp > conftestfile | |
158 | # Do `set' in a subshell so we don't clobber the current shell's | |
159 | # arguments. Must try -L first in case configure is actually a | |
160 | # symlink; some systems play weird games with the mod time of symlinks | |
161 | # (eg FreeBSD returns the mod time of the symlink's containing | |
162 | # directory). | |
163 | if ( | |
164 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
165 | if test "[$]*" = "X"; then | |
166 | # -L didn't work. | |
167 | set X `ls -t $srcdir/configure conftestfile` | |
168 | fi | |
169 | if test "[$]*" != "X $srcdir/configure conftestfile" \ | |
170 | && test "[$]*" != "X conftestfile $srcdir/configure"; then | |
171 | ||
172 | # If neither matched, then we have a broken ls. This can happen | |
173 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
174 | # broken ls alias from the environment. This has actually | |
175 | # happened. Such a system could not be considered "sane". | |
176 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
177 | alias in your environment]) | |
178 | fi | |
179 | ||
180 | test "[$]2" = conftestfile | |
181 | ) | |
182 | then | |
183 | # Ok. | |
184 | : | |
185 | else | |
186 | AC_MSG_ERROR([newly created file is older than distributed files! | |
187 | Check your system clock]) | |
188 | fi | |
189 | rm -f conftest* | |
190 | AC_MSG_RESULT(yes)]) | |
191 | ||
192 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) | |
193 | dnl The program must properly implement --version. | |
194 | AC_DEFUN(AM_MISSING_PROG, | |
195 | [AC_MSG_CHECKING(for working $2) | |
196 | # Run test in a subshell; some versions of sh will print an error if | |
197 | # an executable is not found, even if stderr is redirected. | |
198 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
199 | if ($2 --version) < /dev/null > /dev/null 2>&1; then | |
200 | $1=$2 | |
201 | AC_MSG_RESULT(found) | |
202 | else | |
203 | $1="$3/missing $2" | |
204 | AC_MSG_RESULT(missing) | |
205 | fi | |
206 | AC_SUBST($1)]) | |
207 | ||
208 | # Add --enable-maintainer-mode option to configure. | |
209 | # From Jim Meyering | |
210 | ||
211 | # serial 1 | |
212 | ||
213 | AC_DEFUN(AM_MAINTAINER_MODE, | |
214 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
215 | dnl maintainer-mode is disabled by default | |
216 | AC_ARG_ENABLE(maintainer-mode, | |
217 | [ --enable-maintainer-mode enable make rules and dependencies not useful | |
218 | (and sometimes confusing) to the casual installer], | |
219 | USE_MAINTAINER_MODE=$enableval, | |
220 | USE_MAINTAINER_MODE=no) | |
221 | AC_MSG_RESULT($USE_MAINTAINER_MODE) | |
222 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) | |
223 | MAINT=$MAINTAINER_MODE_TRUE | |
224 | AC_SUBST(MAINT)dnl | |
225 | ] | |
226 | ) | |
227 | ||
228 | # Define a conditional. | |
229 | ||
230 | AC_DEFUN(AM_CONDITIONAL, | |
231 | [AC_SUBST($1_TRUE) | |
232 | AC_SUBST($1_FALSE) | |
233 | if $2; then | |
234 | $1_TRUE= | |
235 | $1_FALSE='#' | |
236 | else | |
237 | $1_TRUE='#' | |
238 | $1_FALSE= | |
239 | fi]) | |
240 | ||
241 | # Like AC_CONFIG_HEADER, but automatically create stamp file. | |
242 | ||
243 | AC_DEFUN(AM_CONFIG_HEADER, | |
244 | [AC_PREREQ([2.12]) | |
245 | AC_CONFIG_HEADER([$1]) | |
246 | dnl When config.status generates a header, we must update the stamp-h file. | |
247 | dnl This file resides in the same directory as the config header | |
248 | dnl that is generated. We must strip everything past the first ":", | |
249 | dnl and everything past the last "/". | |
250 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl | |
251 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, | |
252 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, | |
253 | <<am_indx=1 | |
254 | for am_file in <<$1>>; do | |
255 | case " <<$>>CONFIG_HEADERS " in | |
256 | *" <<$>>am_file "*<<)>> | |
257 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx | |
258 | ;; | |
259 | esac | |
260 | am_indx=`expr "<<$>>am_indx" + 1` | |
261 | done<<>>dnl>>) | |
262 | changequote([,]))]) | |
263 |