1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(java/lang/System.java)
AC_CANONICAL_HOST
PACKAGE="classpath"
VERSION="0.02"
LIBVERSION="0:0:0"
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(LIBVERSION)
AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
AM_CONFIG_HEADER(include/config.h)
AC_PREFIX_DEFAULT(/usr/local/classpath)
dnl Initialize libtool
AM_DISABLE_STATIC
AM_PROG_LIBTOOL
dnl required if SUBDIRS is used
AC_PROG_MAKE_SET
dnl Checks for programs.
dnl AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h sys/types.h sys/config.h inttypes.h stdint.h)
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED))
AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
AC_C_CONST
AC_CHECK_FUNCS(gethostname socket strerror fork pipe execve strtod atof)
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_C_BIGENDIAN
dnl guile checks - shouldn't need now that mauve exists
dnl GUILE_FLAGS
dnl We want to avoid -O2 at the moment, gcc 2.96 from Red Hat 7
dnl cannot compile some native functions (gcc errors) with this
dnl flag.
CFLAGS="-g"
dnl We want warnings, lots of warnings :-)
if eval "test x$GCC = xyes"; then
JAPHAR_GREP_CFLAGS(-Wall, [
CFLAGS="$CFLAGS -Wall"
])
fi
dnl Check for cthreads, w32 threads, pthreads
dnl CLASSPATH_CHECK_THREADS
dnl Check for AWT related glib/gtk/libart_lgpl
AM_PATH_GTK(1.2.4,,exit 1)
AM_PATH_GLIB(1.2.4,,exit 1,gthread)
dnl XXX Fix me when libart.m4 has the compile test fixed!
enable_libarttest=no
AM_PATH_LIBART(2.1.0,,exit 1)
dnl -----------------------------------------------------------
dnl Must do automatic checks before specific --with-* overrides
dnl for vm programs, includes, libraries
dnl -----------------------------------------------------------
dnl --with-japhar
CLASSPATH_CHECK_JAPHAR
dnl --with-kaffe
CLASSPATH_CHECK_KAFFE
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl Various overrides are allowed here to contradict defaults
dnl from automatic VM checks.
dnl -----------------------------------------------------------
AC_ARG_WITH(java,
[ --with-java specify path to a java-like program ],
[
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
# set javac to user input value
AC_MSG_CHECKING(for java)
USER_JABBA=${withval}
AC_SUBST(USER_JABBA)
AC_MSG_RESULT(${withval})
conditional_with_java=true
fi
],
[ conditional_with_java=false])
AM_CONDITIONAL(USER_SPECIFIED_JABBA, test x$conditional_with_java = xtrue)
AC_ARG_WITH(javah,
[ --with-javah specify path to a javah-like program ],
[
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
# set javah to user input value
AC_MSG_CHECKING(for javah)
USER_JAVAH=${withval}
AC_SUBST(USER_JAVAH)
AC_MSG_RESULT(${withval})
conditional_with_javah=true
fi
],
[ conditional_with_javah=false ])
AM_CONDITIONAL(USER_SPECIFIED_JAVAH, test x$conditional_with_javah = xtrue)
dnl define JIKES for Makefile.am if --with-jikes specified to configure
CLASSPATH_CHECK_JIKES
AM_CONDITIONAL(USER_SPECIFIED_JIKES, test x$conditional_with_jikes = xtrue)
dnl define KJC_CLASSPATH for Makefile.am if --with-kjc specified to configure
CLASSPATH_CHECK_KJC
AC_ARG_WITH(classlib,
[ --with-classlib specify path to a classes.zip like file ],
[
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
# set class library to user input value
AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test x = y)
AC_MSG_CHECKING(for classlib)
USER_CLASSLIB=${withval}
AC_SUBST(USER_CLASSLIB)
AC_MSG_RESULT(${withval})
conditional_with_classlib=true
fi
],
[ conditional_with_classlib=false ])
AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test x$conditional_with_classlib = xtrue)
AC_ARG_WITH(includedir,
[ --with-includedir=DIR specify path to an extra include dir ],
[
AC_MSG_CHECKING(for includedir)
if test ${withval} != "" || test ${withval} != "yes" || test ${withval} != "no"; then
if test -r ${withval}; then
if test "$EXTRA_INCLUDES" = ""; then
EXTRA_INCLUDES="-I${withval}"
else
EXTRA_INCLUDES="${EXTRA_INCLUDES} -I${withval}"
fi
AC_SUBST(EXTRA_INCLUDES)
AC_MSG_RESULT("added ${withval}")
else
AC_MSG_RESULT("${withval} does not exist")
fi
fi
],
[
if test -z "$EXTRA_INCLUDES"; then
EXTRA_INCLUDES=""
AC_SUBST(EXTRA_INCLUDES)
fi
])
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl Initialize maintainer mode, not clear to me yet whether
dnl developer-mode is still needed but maintainer-mode definitely
dnl is.
dnl -----------------------------------------------------------
AM_MAINTAINER_MODE
dnl This build mode indicates to configure it should compile java classes
dnl but not rebuild the dependency files for doing so. The default then is to
dnl not build any Java classes (glibj.zip is distributed in the build using
dnl the maintainer-mode)
AC_ARG_ENABLE(developer-mode,
[ --enable-developer-mode enable some of the rules in maintainer-mode
(compilation of Java classes) [default=no]],
[case "${enableval}" in
yes) USE_DEVELOPER_MODE=yes ;;
no) USE_DEVELOPER_MODE=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-developer-mode) ;;
esac],
[USE_DEVELOPER_MODE=no])
if test x${USE_MAINTAINER_MODE} = "xyes"; then
USE_DEVELOPER_MODE=no
fi
AM_CONDITIONAL(DEVELOPER_MODE, test x$USE_DEVELOPER_MODE = xyes)
dnl to mimic MAINT from AM_MAINTAINER_MODE
DEVEL=$DEVELOPER_MODE_TRUE
AC_SUBST(DEVEL)
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl Enable debugging statements at compile time. By default
dnl these statements should be optimized out of the bytecode
dnl produced by an optimizing Java compiler and not hinder
dnl performance.
dnl -----------------------------------------------------------
AC_ARG_ENABLE(debug,
[ --enable-debug enable runtime debugging code],
[case "${enableval}" in
yes)
LIBDEBUG="true"
AC_DEFINE(DEBUG)
;;
no) LIBDEBUG="false" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],
[LIBDEBUG="false"])
AC_SUBST(LIBDEBUG)
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl Enable execution of all static initializer loadLibrary()
dnl calls at compile time. By default most people will not
dnl want to disable this, but some VMs (gcj) don't need or want
dnl them.
dnl -----------------------------------------------------------
AC_ARG_ENABLE(load-library,
[ --enable-load-library [default=yes]],
[case "${enableval}" in
yes) INIT_LOAD_LIBRARY="true" ;;
no) INIT_LOAD_LIBRARY="false" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
esac],
[INIT_LOAD_LIBRARY="true"])
AC_SUBST(INIT_LOAD_LIBRARY)
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl This takes care of autodetecting our preferred VM when one
dnl isn't specified explicitly.
dnl -----------------------------------------------------------
dnl if no jvm yet defined, check for japhar
dnl if test -z "$JVM" || test "$JVM" = "no"; then
dnl # need to have these defined if no vm selected, default to japhar
dnl if test -z "$JVM_REFERENCE"; then
dnl X dnl conditional_with_classlib != xtrue || test x$conditional_with_javah != xtrue; then
dnl X dnl echo classlib $conditional_with_classlib
dnl X dnl echo javah $conditional_with_javah
dnl CLASSPATH_INTERNAL_CHECK_JAPHAR
dnl AC_MSG_CHECKING(for defined vm)
dnl if test -z "$JVM" || test "$JVM" = "no"; then
dnl AC_MSG_ERROR(no: try --with-japhar or --with-kaffe)
dnl else
dnl AC_MSG_RESULT(yes)
dnl fi
dnl fi
dnl fi
dnl must check our conditionals from vm checks
AM_CONDITIONAL(JAPHAR, test x$conditional_with_japhar = xtrue)
AM_CONDITIONAL(KAFFE, test x$conditional_with_kaffe = xtrue)
dnl can be defined by kaffe check, should be here should we autodetect
dnl kaffe in the future
AM_CONDITIONAL(USER_SPECIFIED_KJC, test x$conditional_with_kjc = xtrue)
dnl -----------------------------------------------------------
dnl -----------------------------------------------------------
dnl Small loop to add other things to EXTRA_INCLUDES from a VM
dnl -----------------------------------------------------------
for i in $JAPHAR_CFLAGS $KAFFE_CFLAGS ; do
add_to_extra_includes=1
for j in $EXTRA_INCLUDES ; do
if test $i = $j ; then
add_to_extra_includes=0
fi
done
if test $add_to_extra_includes -eq 1; then
EXTRA_INCLUDES="$EXTRA_INCLUDES $i"
fi
done
dnl -----------------------------------------------------------
dnl Create a link to the VM specific files we're compiling with
if test x"$JVM_REFERENCE" = x; then
JVM_REFERENCE=reference
fi
AC_LINK_FILES(vm/$JVM_REFERENCE, vm/current)
dnl avoiding automake complaints
REMOVE=""
AC_SUBST(REMOVE)
dnl This is probably useless.
AC_PATH_PROG(SH, sh)
dnl According to the GNU coding guide, we shouldn't require find,
dnl zip, and perl, however it should be okay since it is only used
dnl in maintainer mode.
AC_PATH_PROG(FIND, find)
AC_PATH_PROG(ZIP, zip)
AC_PATH_PROG(PERL, perl)
AC_OUTPUT(Makefile
com/Makefile
com/sun/Makefile
com/sun/javadoc/Makefile
doc/Makefile
gnu/Makefile
gnu/classpath/Makefile
gnu/classpath/Configuration.java
gnu/java/Makefile
gnu/java/awt/Makefile
gnu/java/awt/image/Makefile
gnu/java/awt/peer/Makefile
gnu/java/awt/peer/gtk/Makefile
gnu/java/beans/Makefile
gnu/java/beans/editors/Makefile
gnu/java/beans/info/Makefile
gnu/java/io/Makefile
gnu/java/io/decode/Makefile
gnu/java/io/encode/Makefile
gnu/java/lang/Makefile
gnu/java/lang/reflect/Makefile
gnu/java/locale/Makefile
gnu/java/net/Makefile
gnu/java/net/content/Makefile
gnu/java/net/content/text/Makefile
gnu/java/net/protocol/Makefile
gnu/java/net/protocol/file/Makefile
gnu/java/net/protocol/http/Makefile
gnu/java/security/Makefile
gnu/java/security/der/Makefile
gnu/java/security/provider/Makefile
gnu/java/security/util/Makefile
gnu/tools/Makefile
gnu/tools/serialver/Makefile
java/Makefile
java/applet/Makefile
java/awt/Makefile
java/awt/datatransfer/Makefile
java/awt/event/Makefile
java/awt/image/Makefile
java/awt/peer/Makefile
java/awt/print/Makefile
java/beans/Makefile
java/beans/beancontext/Makefile
java/io/Makefile
java/lang/Makefile
java/lang/ref/Makefile
java/lang/reflect/Makefile
java/math/Makefile
java/net/Makefile
java/security/Makefile
java/security/acl/Makefile
java/security/cert/Makefile
java/security/interfaces/Makefile
java/security/spec/Makefile
java/sql/Makefile
java/text/Makefile
java/util/Makefile
java/util/jar/Makefile
java/util/zip/Makefile
javax/Makefile
native/Makefile
native/jni/Makefile
native/jni/awt/Makefile
native/lib/Makefile
native/vmi/Makefile
resource/Makefile
resource/java/Makefile
resource/java/util/Makefile
resource/java/security/Makefile
vm/Makefile
vm/kaffe/Makefile
vm/kaffe/java/Makefile
vm/kaffe/kaffe/Makefile
vm/kaffe/native/Makefile
vm/reference/Makefile
vm/reference/gnu/Makefile
vm/reference/gnu/vm/Makefile
vm/reference/gnu/vm/stack/Makefile
vm/reference/java/Makefile
vm/reference/java/lang/Makefile
vm/reference/java/lang/reflect/Makefile
lib/Makefile
lib/gen-classlist.sh
lib/mkdep.pl
lib/mkcollections.pl,
[ chmod 755 lib/mkdep.pl
chmod 755 lib/mkcollections.pl
chmod 755 lib/gen-classlist.sh
])
|