Imported GNU Classpath 0.19 + gcj-import-20051115.
[gcc.git] / libjava / classpath / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl -----------------------------------------------------------
4 dnl Turning off cache for debug reasons
5 dnl -----------------------------------------------------------
6 dnl define([AC_CACHE_LOAD], )dnl
7 dnl define([AC_CACHE_SAVE], )dnl
8
9 AC_INIT([GNU Classpath],[0.20-pre],[classpath@gnu.org],[classpath])
10 AC_CONFIG_SRCDIR(java/lang/System.java)
11
12 AC_CANONICAL_TARGET
13
14 dnl -----------------------------------------------------------
15 dnl Fold all IA-32 CPU architectures into "x86"
16 dnl -----------------------------------------------------------
17 if expr ${target_cpu} : '.*86' > /dev/null; then target_cpu=x86; fi
18
19 dnl -----------------------------------------------------------
20 dnl We will not track/change lib version until we reach version 1.0
21 dnl at which time we'll have to be more anal about such things
22 dnl -----------------------------------------------------------
23 AC_SUBST(LIBVERSION, "0:0:0")
24 case "$host_os" in
25 darwin*)
26 cp_module=""
27 ;;
28 *)
29 cp_module="-module"
30 ;;
31 esac
32
33 CLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"
34 AC_SUBST(CLASSPATH_MODULE)
35
36 AC_PREREQ(2.59)
37 AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
38 AC_CONFIG_HEADERS([include/config.h])
39 AC_PREFIX_DEFAULT(/usr/local/classpath)
40
41 dnl -----------------------------------------------------------
42 dnl Enable JNI libraries (enabled by default)
43 dnl -----------------------------------------------------------
44 AC_ARG_ENABLE([jni],
45 [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])],
46 [case "${enableval}" in
47 yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
48 no) COMPILE_JNI=no ;;
49 *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
50 esac],
51 [COMPILE_JNI=yes])
52 AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)
53
54 dnl -----------------------------------------------------------
55 dnl Enable core JNI libraries (enabled by default)
56 dnl -----------------------------------------------------------
57 AC_ARG_ENABLE([core-jni],
58 [AS_HELP_STRING(--enable-core-jni,
59 compile JNI sources for core [default=yes])],
60 [case "${enableval}" in
61 yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
62 no) COMPILE_CORE_JNI=no ;;
63 *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
64 esac],
65 [COMPILE_CORE_JNI=yes])
66 AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
67
68 dnl ------------------------------------------------------------
69 dnl Whether to compile with -Werror or not (disabled by default)
70 dnl ------------------------------------------------------------
71 AC_ARG_ENABLE([Werror],
72 [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
73 [case "${enableval}" in
74 yes) ENABLE_WERROR=yes ;;
75 no) ENABLE_WERROR=no ;;
76 *) ENABLE_WERROR=no ;;
77 esac],
78 [ENABLE_WERROR=no])
79
80 dnl -----------------------------------------------------------
81 dnl Default AWT toolkit
82 dnl -----------------------------------------------------------
83 AC_ARG_ENABLE(default-toolkit,
84 AS_HELP_STRING([--enable-default-toolkit],
85 [fully qualified class name of default AWT toolkit]))
86 default_toolkit=$enable_default_toolkit
87 if test "$default_toolkit" = ""; then
88 default_toolkit=gnu.java.awt.peer.gtk.GtkToolkit
89 fi
90 AC_SUBST(default_toolkit)
91
92 dnl -----------------------------------------------------------
93 dnl Native libxml/xslt library (disabled by default)
94 dnl -----------------------------------------------------------
95 AC_ARG_ENABLE([xmlj],
96 [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])],
97 [case "${enableval}" in
98 yes) COMPILE_XMLJ=yes ;;
99 no) COMPILE_XMLJ=no ;;
100 *) COMPILE_XMLJ=no ;;
101 esac],
102 [COMPILE_XMLJ=no])
103 AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
104
105 dnl -----------------------------------------------------------
106 dnl ALSA code (enabled by default)
107 dnl -----------------------------------------------------------
108 AC_ARG_ENABLE([alsa],
109 [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
110 [case "${enableval}" in
111 yes) COMPILE_ALSA=yes ;;
112 no) COMPILE_ALSA=no ;;
113 *) COMPILE_ALSA=yes ;;
114 esac],
115 [AC_CHECK_HEADERS([alsa/asoundlib.h],COMPILE_ALSA=yes,COMPILE_ALSA=no)])
116 AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
117
118 dnl -----------------------------------------------------------
119 dnl DSSI code (enabled by default)
120 dnl -----------------------------------------------------------
121 AC_ARG_ENABLE([dssi],
122 [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
123 [case "${enableval}" in
124 yes) COMPILE_DSSI=yes ;;
125 no) COMPILE_DSSI=no ;;
126 *) COMPILE_DSSI=yes ;;
127 esac],
128 [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])
129 AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
130
131 dnl -----------------------------------------------------------
132 dnl GTK native peer (enabled by default)
133 dnl -----------------------------------------------------------
134 AC_ARG_ENABLE([gtk-peer],
135 [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])],
136 [case "${enableval}" in
137 yes) COMPILE_GTK_PEER=yes ;;
138 no) COMPILE_GTK_PEER=no ;;
139 *) COMPILE_GTK_PEER=yes ;;
140 esac],
141 [COMPILE_GTK_PEER=yes])
142 AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)
143
144 dnl -----------------------------------------------------------
145 dnl GTK native peer error checking
146 dnl -----------------------------------------------------------
147 AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))
148
149 dnl ------------------------------------------------------------
150 dnl determine whether to enable the cairo GTK Graphics2D backend
151 dnl ------------------------------------------------------------
152 AC_ARG_ENABLE([gtk-cairo],
153 [AS_HELP_STRING(--enable-gtk-cairo,build the cairo Graphics2D implementation on GTK [default=no])],
154 [case "${enableval}" in
155 yes) GTK_CAIRO_ENABLED=true ;;
156 no) GTK_CAIRO_ENABLED=false ;;
157 *) GTK_CAIRO_ENABLED=true ;;
158 esac],
159 [GTK_CAIRO_ENABLED=false])
160 AC_SUBST(GTK_CAIRO_ENABLED)
161 if test "x${GTK_CAIRO_ENABLED}" = xtrue; then
162 AC_DEFINE(GTK_CAIRO, 1, [defined if cairo support was built in])
163 fi
164 AM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue)
165
166 dnl -----------------------------------------------------------
167 dnl Qt native peer (disabled by default)
168 dnl -----------------------------------------------------------
169 AC_ARG_ENABLE([qt-peer],
170 [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
171 [case "${enableval}" in
172 yes) COMPILE_QT_PEER=yes ;;
173 no) COMPILE_QT_PEER=no ;;
174 *) COMPILE_QT_PEER=yes ;;
175 esac],
176 [COMPILE_QT_PEER=no])
177 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
178
179
180 dnl -----------------------------------------------------------
181 dnl Sets the native libraries installation dir
182 dnl -----------------------------------------------------------
183 AC_ARG_WITH([native-libdir],
184 [AS_HELP_STRING(--with-native-libdir,sets the installation directore for native libraries [default='${libdir}/${PACKAGE}'])],
185 [
186 nativelibdir=${withval}
187 ],
188 [
189 nativelibdir='${libdir}/${PACKAGE}'
190 ])
191
192 AC_SUBST(nativelibdir)
193
194 dnl -----------------------------------------------------------
195 dnl Sets the Java library installation dir.
196 dnl -----------------------------------------------------------
197 AC_ARG_WITH([glibj-dir],
198 [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
199 [
200 glibjdir=${withval}
201 ],
202 [
203 glibjdir='${datadir}/${PACKAGE}'
204 ])
205
206 AC_SUBST(glibjdir)
207
208 dnl -----------------------------------------------------------
209 dnl Regenerate headers at build time (disabled by default)
210 dnl -----------------------------------------------------------
211 AC_ARG_ENABLE([regen-headers],
212 [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
213 [case "${enableval}" in
214 yes) REGENERATE_JNI_HEADERS=yes ;;
215 no) REGENERATE_JNI_HEADERS=no ;;
216 *) REGENERATE_JNI_HEADERS=no ;;
217 esac],
218 [REGENERATE_JNI_HEADERS=no])
219 AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
220
221 AC_PROG_LN_S
222 AC_PROG_INSTALL
223
224 dnl -----------------------------------------------------------
225 dnl Checks for programs.
226 dnl -----------------------------------------------------------
227
228 dnl GCC LOCAL
229 GCC_NO_EXECUTABLES
230
231 dnl Initialize libtool
232 AC_DISABLE_STATIC
233 AC_PROG_LIBTOOL
234 dnl AC_PROG_AWK
235 AC_PROG_CC
236 AC_PROG_CPP
237 AC_PROG_CXX
238
239 if test "x${COMPILE_JNI}" = xyes; then
240 AC_HEADER_STDC
241
242 dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
243 dnl at least.
244 AC_COMPILE_CHECK_SIZEOF(void *)
245
246 dnl Checking for endianess.
247 AC_C_BIGENDIAN_CROSS
248
249 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
250 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
251 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
252 dnl Check for crt_externs.h on Darwin.
253 AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
254 asm/ioctls.h \
255 inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
256 sys/time.h \
257 sys/select.h \
258 crt_externs.h \
259 fcntl.h \
260 sys/mman.h])
261
262 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
263 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
264 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
265 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
266
267 AC_CHECK_FUNCS([ftruncate fsync select \
268 gethostname socket strerror fork pipe execve open close \
269 lseek fstat read write htonl memset htons connect \
270 getsockname getpeername bind listen accept \
271 recvfrom send sendto setsockopt getsockopt time mktime \
272 localtime_r \
273 strerror_r \
274 fcntl \
275 mmap munmap mincore msync madvise getpagesize sysconf])
276
277 AC_HEADER_TIME
278 AC_STRUCT_TM
279 AC_STRUCT_TIMEZONE
280
281 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
282 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
283 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
284 AC_MSG_RESULT(yes)],
285 [AC_MSG_RESULT(no)
286 AC_MSG_CHECKING([for global timezone variable])
287 dnl FIXME: we don't want a link check here because that won't work
288 dnl when cross-compiling. So instead we make an assumption that
289 dnl the header file will mention timezone if it exists.
290 dnl Don't find the win32 function timezone
291 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
292 [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
293 AC_MSG_RESULT(yes)],
294 [AC_MSG_RESULT(no)
295 AC_MSG_CHECKING([for global _timezone variable])
296 dnl FIXME: As above, don't want link check
297 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
298 [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
299 [Define if your platform has the global _timezone variable.])
300 AC_MSG_RESULT(yes)],
301 [AC_MSG_RESULT(no)])])])
302
303 AC_C_CONST
304 AC_C_ATTRIBUTE
305
306 dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
307 AM_ICONV
308
309 dnl When using gcc we want warnings, lots of warnings :-)
310 if test "x${GCC}" = xyes; then
311 dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
312 dnl and modern POSIX and BSD C library functions/prototypes.
313
314 dnl Warning flags for (almost) everybody.
315 dnl Should probably be configurable
316 WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
317 AC_SUBST(WARNING_CFLAGS)
318
319 dnl Strict warning flags which not every module uses.
320 dnl Should probably be configurable.
321 STRICT_WARNING_CFLAGS=-Wstrict-prototypes
322 AC_SUBST(STRICT_WARNING_CFLAGS)
323
324 dnl Whether or not to add -Werror, also not used by all modueles.
325 dnl Can be configured by --disable-Werror
326 ERROR_CFLAGS=
327 if test "x${ENABLE_WERROR}" = xyes; then
328 ERROR_CFLAGS='-Werror'
329 fi
330 AC_SUBST(ERROR_CFLAGS)
331 fi
332
333 dnl Check for libxml and libxslt libraries (when xmlj is enabled).
334 if test "x${COMPILE_XMLJ}" = xyes; then
335 PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
336 PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
337 AC_SUBST(XML_LIBS)
338 AC_SUBST(XML_CFLAGS)
339 AC_SUBST(XSLT_LIBS)
340 AC_SUBST(XSLT_CFLAGS)
341 fi
342
343 dnl Check for AWT related gthread/gtk
344 if test "x${COMPILE_GTK_PEER}" = xyes; then
345 AC_PATH_XTRA
346 if test "$no_x" = yes; then
347 AC_MSG_ERROR([GTK+ peers requested but no X library available])
348 fi
349 dnl We explicitly want the XTest Extension for Robot support.
350 AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
351 [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
352 [${X_LIBS}])
353 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
354
355 if test "x${enable_gtk_cairo}" = xyes; then
356 PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
357 fi
358
359 PKG_CHECK_MODULES(PANGOFT2, pangoft2)
360
361 AC_SUBST(GTK_CFLAGS)
362 AC_SUBST(GTK_LIBS)
363 AC_SUBST(CAIRO_LIBS)
364 AC_SUBST(CAIRO_CFLAGS)
365 AC_SUBST(PANGOFT2_LIBS)
366 AC_SUBST(PANGOFT2_CFLAGS)
367 fi
368
369 dnl Check for AWT related Qt4
370 if test "x${COMPILE_QT_PEER}" = xyes; then
371 PKG_CHECK_MODULES(QT, QtGui >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no")
372 if test "x$HAVE_QT4" = "xyes"; then
373 dnl Check needed because in some cases the QtGui includedir
374 dnl doesn't contain the subsystem dir.
375 QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
376 EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
377 AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
378 AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
379 AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
380 QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
381 AC_MSG_WARN([QWidget not found])))
382 AC_CHECK_PROG(MOC, [moc], [moc])
383 fi
384 if test "x$HAVE_QT4" = "xno"; then
385 AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
386 case "$host_os" in
387 darwin*)
388 AC_ARG_WITH([qt4dir],
389 [AS_HELP_STRING([--with-qt4dir=DIR],
390 [Qt4 installation directory used for OS-X.
391 For other systems use pkg-config.])],
392 [QT4DIR=$withval]
393 )
394 if test x"$QT4DIR" = x ; then
395 AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
396 fi
397 AC_MSG_RESULT([QT4DIR... $QT4DIR])
398 AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
399 if test x"$MOC" = x; then
400 AC_MSG_ERROR([*** This is not the right Qt installation])
401 fi
402 QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
403 QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
404 QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
405 QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
406 ;;
407 *)
408 AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
409 of your installed Qt4 installation.])
410 ;;
411 esac
412 fi
413 AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
414 AC_SUBST(QT_CFLAGS)
415 AC_SUBST(QT_LIBS)
416 fi
417 fi
418
419 CLASSPATH_WITH_JAVAH
420
421 dnl -----------------------------------------------------------
422 dnl Add the include files for the native abstraction layer.
423 dnl Used by AM_CPPFLAGS in the different modules.
424 dnl -----------------------------------------------------------
425 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
426 AC_SUBST(CLASSPATH_INCLUDES)
427
428 dnl -----------------------------------------------------------
429 if test "x${COMPILE_JNI}" = xyes; then
430 AC_MSG_CHECKING(jni_md.h support)
431 if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
432 AC_MSG_RESULT(yes)
433 else
434 target_cpu=x86
435 target_os=linux-gnu
436 AC_MSG_WARN(no, using x86-linux-gnu)
437 fi
438 ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
439 ac_dests="include/jni_md.h"
440 while test -n "$ac_sources"; do
441 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
442 set $ac_sources; ac_source=$1; shift; ac_sources=$*
443 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
444 done
445 AC_CONFIG_LINKS([$ac_config_links_1])
446 fi
447
448 CLASSPATH_FIND_JAVAC
449
450 CLASSPATH_WITH_CLASSLIB
451
452 dnl -----------------------------------------------------------
453 dnl Initialize maintainer mode
454 dnl -----------------------------------------------------------
455 AM_MAINTAINER_MODE
456
457 dnl -----------------------------------------------------------
458 dnl Enable debugging statements at compile time. By default
459 dnl these statements should be optimized out of the bytecode
460 dnl produced by an optimizing Java compiler and not hinder
461 dnl performance because debugging is turned off by default.
462 dnl -----------------------------------------------------------
463 AC_ARG_ENABLE([debug],
464 [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
465 [case "${enableval}" in
466 yes)
467 LIBDEBUG="true"
468 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
469 ;;
470 no) LIBDEBUG="false" ;;
471 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
472 esac],
473 [LIBDEBUG="false"])
474 AC_SUBST(LIBDEBUG)
475
476 dnl -----------------------------------------------------------
477 dnl Enable execution of all static initializer loadLibrary()
478 dnl calls at compile time. By default most people will not
479 dnl want to disable this, but some VMs (gcj) don't need or want
480 dnl them.
481 dnl -----------------------------------------------------------
482 AC_ARG_ENABLE([load-library],
483 [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
484 [case "${enableval}" in
485 yes) INIT_LOAD_LIBRARY="true" ;;
486 no) INIT_LOAD_LIBRARY="false" ;;
487 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
488 esac],
489 [INIT_LOAD_LIBRARY="true"])
490 AC_SUBST(INIT_LOAD_LIBRARY)
491
492
493 dnl -----------------------------------------------------------
494 dnl Should the VM explicitly run class initialization subfunctions for
495 dnl java.lang.System? (default is false -- the subfunctions will be run
496 dnl automatically by the class initializer)
497 dnl -----------------------------------------------------------
498 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
499 [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
500 [case "${enableval}" in
501 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
502 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
503 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
504 esac],
505 [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
506 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
507
508
509 dnl -----------------------------------------------------------
510 dnl avoiding automake complaints
511 dnl -----------------------------------------------------------
512 REMOVE=""
513 AC_SUBST(REMOVE)
514
515 dnl -----------------------------------------------------------
516 dnl This is probably useless.
517 dnl -----------------------------------------------------------
518 AC_PATH_PROG(MKDIR, mkdir)
519 AC_PATH_PROG(CP, cp)
520 AC_PATH_PROG(DATE, date)
521
522 dnl -----------------------------------------------------------
523 dnl According to the GNU coding guide, we shouldn't require find,
524 dnl and zip, however GNU provides both so it should be okay
525 dnl -----------------------------------------------------------
526 AC_PATH_PROG(FIND, find)
527
528 dnl -----------------------------------------------------------
529 dnl Specify what to install (install only glibj.zip by default)
530 dnl -----------------------------------------------------------
531 CLASSPATH_WITH_GLIBJ
532
533 dnl -----------------------------------------------------------
534 dnl Enable API documentation generation (disabled by default)
535 dnl -----------------------------------------------------------
536 CLASSPATH_WITH_GJDOC
537
538 dnl -----------------------------------------------------------
539 dnl Whether to use jay to regenerate parsers.
540 dnl -----------------------------------------------------------
541 REGEN_WITH_JAY
542
543 dnl -----------------------------------------------------------
544 dnl This sets the build-time default, which can now be overridden
545 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
546 dnl to "true" or "false".
547 dnl -----------------------------------------------------------
548 AC_ARG_ENABLE([portable-native-sync],
549 [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
550 [case "${enableval}" in
551 yes)
552 AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
553 ;;
554 no) ;;
555 *)
556 AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync)
557 ;;
558 esac],
559 [])
560
561 dnl -----------------------------------------------------------
562 dnl output files
563 dnl -----------------------------------------------------------
564 AC_CONFIG_FILES([Makefile
565 doc/Makefile
566 doc/api/Makefile
567 external/Makefile
568 external/sax/Makefile
569 external/w3c_dom/Makefile
570 gnu/classpath/Configuration.java
571 include/Makefile
572 native/Makefile
573 native/fdlibm/Makefile
574 native/jawt/Makefile
575 native/jni/Makefile
576 native/jni/classpath/Makefile
577 native/jni/java-io/Makefile
578 native/jni/java-lang/Makefile
579 native/jni/java-net/Makefile
580 native/jni/java-nio/Makefile
581 native/jni/java-util/Makefile
582 native/jni/gtk-peer/Makefile
583 native/jni/qt-peer/Makefile
584 native/jni/xmlj/Makefile
585 native/jni/midi-alsa/Makefile
586 native/jni/midi-dssi/Makefile
587 native/target/Makefile
588 native/target/Linux/Makefile
589 native/target/generic/Makefile
590 resource/Makefile
591 scripts/Makefile
592 scripts/classpath.spec
593 lib/Makefile
594 lib/gen-classlist.sh
595 lib/copy-vmresources.sh
596 examples/Makefile
597 examples/Makefile.jawt])
598 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
599 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])
600 AC_OUTPUT