1 dnl Process this file with autoconf to produce a configure script.
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
9 AC_INIT([GNU Classpath],[0.92-pre],[classpath@gnu.org],[classpath])
10 AC_CONFIG_SRCDIR(java/lang/System.java)
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
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")
33 CLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"
34 AC_SUBST(CLASSPATH_MODULE)
36 CLASSPATH_CONVENIENCE="-no-undefined"
37 AC_SUBST(CLASSPATH_CONVENIENCE)
40 AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
41 AC_CONFIG_HEADERS([include/config.h])
42 AC_PREFIX_DEFAULT(/usr/local/classpath)
44 dnl -----------------------------------------------------------
45 dnl Enable collections.jar (disabled by default)
46 dnl -----------------------------------------------------------
47 AC_ARG_ENABLE([collections],
48 [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
49 [case x"${enableval}" in
50 xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
51 xno) COMPILE_COLLECTIONS=no ;;
52 x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
53 *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
55 [COMPILE_COLLECTIONS=no])
56 AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
58 dnl -----------------------------------------------------------
59 dnl Enable JNI libraries (enabled by default)
60 dnl -----------------------------------------------------------
62 [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])],
63 [case "${enableval}" in
64 yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
66 *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
69 AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)
71 dnl -----------------------------------------------------------
72 dnl Enable core JNI libraries (enabled by default)
73 dnl -----------------------------------------------------------
74 AC_ARG_ENABLE([core-jni],
75 [AS_HELP_STRING(--enable-core-jni,
76 compile JNI sources for core [default=yes])],
77 [case "${enableval}" in
78 yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
79 no) COMPILE_CORE_JNI=no ;;
80 *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
82 [COMPILE_CORE_JNI=yes])
83 AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
85 dnl ------------------------------------------------------------
86 dnl Whether to compile with -Werror or not (disabled by default)
87 dnl ------------------------------------------------------------
88 AC_ARG_ENABLE([Werror],
89 [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
90 [case "${enableval}" in
91 yes) ENABLE_WERROR=yes ;;
92 no) ENABLE_WERROR=no ;;
93 *) ENABLE_WERROR=no ;;
97 dnl -----------------------------------------------------------
98 dnl Default AWT toolkit
99 dnl -----------------------------------------------------------
100 AC_ARG_ENABLE(default-toolkit,
101 AS_HELP_STRING([--enable-default-toolkit],
102 [fully qualified class name of default AWT toolkit]))
103 default_toolkit=$enable_default_toolkit
104 if test "$default_toolkit" = ""; then
105 default_toolkit=gnu.java.awt.peer.gtk.GtkToolkit
107 AC_SUBST(default_toolkit)
109 dnl -----------------------------------------------------------
110 dnl Native libxml/xslt library (disabled by default)
111 dnl -----------------------------------------------------------
112 AC_ARG_ENABLE([xmlj],
113 [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])],
114 [case "${enableval}" in
115 yes) COMPILE_XMLJ=yes ;;
116 no) COMPILE_XMLJ=no ;;
117 *) COMPILE_XMLJ=no ;;
120 AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
122 dnl -----------------------------------------------------------
123 dnl ALSA code (enabled by default)
124 dnl -----------------------------------------------------------
125 AC_ARG_ENABLE([alsa],
126 [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
127 [case "${enableval}" in
128 yes) COMPILE_ALSA=yes ;;
129 no) COMPILE_ALSA=no ;;
130 *) COMPILE_ALSA=yes ;;
132 [AC_CHECK_HEADERS([alsa/asoundlib.h],
133 [AC_CHECK_LIB([asound], [snd_seq_open], COMPILE_ALSA=yes,COMPILE_ALSA=no)],
135 AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
137 dnl -----------------------------------------------------------
138 dnl DSSI code (enabled by default)
139 dnl -----------------------------------------------------------
140 AC_ARG_ENABLE([dssi],
141 [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
142 [case "${enableval}" in
143 yes) COMPILE_DSSI=yes ;;
144 no) COMPILE_DSSI=no ;;
145 *) COMPILE_DSSI=yes ;;
147 [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])
148 AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
150 dnl -----------------------------------------------------------
151 dnl GTK native peer (enabled by default)
152 dnl -----------------------------------------------------------
153 AC_ARG_ENABLE([gtk-peer],
154 [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])],
155 [case "${enableval}" in
156 yes) COMPILE_GTK_PEER=yes ;;
157 no) COMPILE_GTK_PEER=no ;;
158 *) COMPILE_GTK_PEER=yes ;;
160 [COMPILE_GTK_PEER=yes])
161 AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)
163 dnl -----------------------------------------------------------
164 dnl GTK native peer error checking
165 dnl -----------------------------------------------------------
166 AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))
168 dnl -----------------------------------------------------------
169 dnl Qt native peer (disabled by default)
170 dnl -----------------------------------------------------------
171 AC_ARG_ENABLE([qt-peer],
172 [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
173 [case "${enableval}" in
174 yes) COMPILE_QT_PEER=yes ;;
175 no) COMPILE_QT_PEER=no ;;
176 *) COMPILE_QT_PEER=yes ;;
178 [COMPILE_QT_PEER=no])
179 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
181 dnl -----------------------------------------------------------
182 dnl Plugin (enabled by default)
183 dnl -----------------------------------------------------------
184 AC_ARG_ENABLE([plugin],
185 [AS_HELP_STRING(--disable-plugin,compile gcjwebplugin (disabled by --disable-plugin) [default=yes])],
186 [case "${enableval}" in
187 yes) COMPILE_PLUGIN=yes ;;
188 no) COMPILE_PLUGIN=no ;;
189 *) COMPILE_PLUGIN=yes ;;
191 [COMPILE_PLUGIN=yes])
192 AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
194 dnl -----------------------------------------------------------
195 dnl Sets the native libraries installation dir
196 dnl -----------------------------------------------------------
197 AC_ARG_WITH([native-libdir],
198 [AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
200 nativeexeclibdir=${withval}
203 nativeexeclibdir='${libdir}/${PACKAGE}'
206 AC_SUBST(nativeexeclibdir)
208 dnl -----------------------------------------------------------
209 dnl Sets the Java library installation dir.
210 dnl -----------------------------------------------------------
211 AC_ARG_WITH([glibj-dir],
212 [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
217 glibjdir='${datadir}/${PACKAGE}'
222 dnl -----------------------------------------------------------
223 dnl Sets the VM name for use in tool wrapper scripts
224 dnl -----------------------------------------------------------
226 [AS_HELP_STRING(--with-vm,sets the VM binary name [default='${prefix}/bin/jamvm'])],
231 VM_BINARY='${prefix}/bin/jamvm'
235 AM_CONDITIONAL(FOUND_CACAO, test "x`basename $VM_BINARY`" = xcacao)
237 dnl -----------------------------------------------------------
238 dnl Regenerate headers at build time (disabled by default)
239 dnl -----------------------------------------------------------
240 AC_ARG_ENABLE([regen-headers],
241 [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
242 [case "${enableval}" in
243 yes) REGENERATE_JNI_HEADERS=yes ;;
244 no) REGENERATE_JNI_HEADERS=no ;;
245 *) REGENERATE_JNI_HEADERS=no ;;
247 [REGENERATE_JNI_HEADERS=no])
248 AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
250 dnl -----------------------------------------------------------
251 dnl Enable tool wrapper binaries (disabled by default)
252 dnl -----------------------------------------------------------
253 AC_ARG_ENABLE([tool-wrappers],
254 [AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
255 [case x"${enableval}" in
256 xyes) COMPILE_WRAPPERS=yes ;;
257 xno) COMPILE_WRAPPERS=no ;;
258 x) COMPILE_WRAPPERS=yes ;;
259 *) COMPILE_WRAPPERS=yes ;;
261 [COMPILE_WRAPPERS=no])
262 AM_CONDITIONAL(CREATE_WRAPPERS, test "x${COMPILE_WRAPPERS}" = xyes)
267 dnl -----------------------------------------------------------
268 dnl Checks for programs.
269 dnl -----------------------------------------------------------
271 dnl Initialize libtool
278 if test "x${COMPILE_COLLECTIONS}" = xyes; then
279 AC_PATH_PROG(PERL, [perl])
281 AC_SUBST(COLLECTIONS_PREFIX)
282 AC_CONFIG_FILES([lib/mkcollections.pl])
283 AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
286 if test "x${COMPILE_JNI}" = xyes; then
289 dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
291 AC_COMPILE_CHECK_SIZEOF(void *)
293 dnl Checking for endianess.
296 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
297 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
298 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
299 dnl Check for crt_externs.h on Darwin.
300 AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
302 inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
310 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
311 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
312 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]))
313 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]))
315 AC_CHECK_FUNCS([ftruncate fsync select \
316 gethostname socket strerror fork pipe execve open close \
317 lseek fstat read write htonl memset htons connect \
318 getsockname getpeername bind listen accept \
319 recvfrom send sendto setsockopt getsockopt time mktime \
323 mmap munmap mincore msync madvise getpagesize sysconf \
328 AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
335 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
336 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
337 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
340 AC_MSG_CHECKING([for global timezone variable])
341 dnl FIXME: we don't want a link check here because that won't work
342 dnl when cross-compiling. So instead we make an assumption that
343 dnl the header file will mention timezone if it exists.
344 dnl Don't find the win32 function timezone
345 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
346 [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
349 AC_MSG_CHECKING([for global _timezone variable])
350 dnl FIXME: As above, don't want link check
351 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
352 [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
353 [Define if your platform has the global _timezone variable.])
355 [AC_MSG_RESULT(no)])])])
360 dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
363 dnl When using gcc we want warnings, lots of warnings :-)
364 if test "x${GCC}" = xyes; then
365 dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
366 dnl and modern POSIX and BSD C library functions/prototypes.
368 dnl Warning flags for (almost) everybody.
369 dnl Should probably be configurable
370 WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
371 AC_SUBST(WARNING_CFLAGS)
373 dnl Strict warning flags which not every module uses.
374 dnl Should probably be configurable.
375 STRICT_WARNING_CFLAGS=-Wstrict-prototypes
376 AC_SUBST(STRICT_WARNING_CFLAGS)
378 dnl Whether or not to add -Werror, also not used by all modueles.
379 dnl Can be configured by --disable-Werror
381 if test "x${ENABLE_WERROR}" = xyes; then
382 ERROR_CFLAGS='-Werror'
384 AC_SUBST(ERROR_CFLAGS)
387 dnl Check for libxml and libxslt libraries (when xmlj is enabled).
388 if test "x${COMPILE_XMLJ}" = xyes; then
389 PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
390 PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
394 AC_SUBST(XSLT_CFLAGS)
397 dnl Check for AWT related gthread/gtk
398 if test "x${COMPILE_GTK_PEER}" = xyes; then
400 if test "$no_x" = yes; then
401 AC_MSG_ERROR([GTK+ peers requested but no X library available])
403 dnl We explicitly want the XTest Extension for Robot support.
404 AC_CHECK_LIB([Xtst], [XTestQueryExtension],
405 [XTEST_LIBS="$XTEST_LIBS -lX11 -lXtst"],
406 [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
409 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
410 PKG_CHECK_MODULES(FREETYPE2, freetype2)
411 PKG_CHECK_MODULES(PANGOFT2, pangoft2)
412 dnl Check if we can link against the XRender library and set
413 dnl HAVE_XRENDER accordingly.
414 AC_CHECK_LIB([Xrender], [XRenderQueryExtension],
415 [AC_DEFINE(HAVE_XRENDER, 1, [Define to 1 if you have libXrender.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrender"]],
419 dnl Check if we can link against the XRandR library and set
420 dnl HAVE_XRANDR accordingly.
421 AC_CHECK_LIB([Xrandr], [XRRQueryExtension],
422 [AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have libXrandr.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrandr"]],
428 AC_SUBST(FREETYPE2_LIBS)
429 AC_SUBST(FREETYPE2_CFLAGS)
430 AC_SUBST(PANGOFT2_LIBS)
431 AC_SUBST(PANGOFT2_CFLAGS)
435 dnl Check for AWT related Qt4
436 if test "x${COMPILE_QT_PEER}" = xyes; then
437 PKG_CHECK_MODULES(QT, QtCore QtGui >= 4.1.0, HAVE_QT4="yes", HAVE_QT4="no")
438 if test "x$HAVE_QT4" = "xyes"; then
439 dnl Check needed because in some cases the QtGui includedir
440 dnl doesn't contain the subsystem dir.
441 QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtGui`
442 EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
443 AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
444 AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
445 AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
446 QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
447 AC_MSG_WARN([QWidget not found])))
448 AC_CHECK_PROG(MOC, [moc], [moc])
450 if test "x$HAVE_QT4" = "xno"; then
451 AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
454 AC_ARG_WITH([qt4dir],
455 [AS_HELP_STRING([--with-qt4dir=DIR],
456 [Qt4 installation directory used for OS-X.
457 For other systems use pkg-config.])],
460 if test x"$QT4DIR" = x ; then
461 AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
463 AC_MSG_RESULT([QT4DIR... $QT4DIR])
464 AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
465 if test x"$MOC" = x; then
466 AC_MSG_ERROR([*** This is not the right Qt installation])
468 QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
469 QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
470 QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
471 QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
474 AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
475 of your installed Qt4 installation.])
479 AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
484 dnl Check for plugin support headers and libraries.
485 if test "x${COMPILE_PLUGIN}" = xyes; then
486 PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
487 if test "x${MOZILLA_FOUND}" = xno; then
488 PKG_CHECK_MODULES(MOZILLA, firefox-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
490 if test "x${MOZILLA_FOUND}" = xno; then
491 PKG_CHECK_MODULES(MOZILLA, xulrunner-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
493 PKG_CHECK_MODULES(GLIB, glib-2.0)
495 AC_SUBST(MOZILLA_CFLAGS)
496 AC_SUBST(MOZILLA_LIBS)
497 AC_SUBST(GLIB_CFLAGS)
500 AC_SUBST(PLUGIN_DIR, $HOME/.mozilla/plugins/)
506 dnl -----------------------------------------------------------
507 dnl Add the include files for the native abstraction layer.
508 dnl Used by AM_CPPFLAGS in the different modules.
509 dnl -----------------------------------------------------------
510 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
511 AC_SUBST(CLASSPATH_INCLUDES)
513 dnl -----------------------------------------------------------
514 if test "x${COMPILE_JNI}" = xyes; then
515 AC_MSG_CHECKING(jni_md.h support)
516 if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
521 AC_MSG_WARN(no, using x86-linux-gnu)
523 ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
524 ac_dests="include/jni_md.h"
525 while test -n "$ac_sources"; do
526 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
527 set $ac_sources; ac_source=$1; shift; ac_sources=$*
528 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
530 AC_CONFIG_LINKS([$ac_config_links_1])
535 CLASSPATH_WITH_CLASSLIB
537 dnl -----------------------------------------------------------
538 dnl Initialize maintainer mode
539 dnl -----------------------------------------------------------
542 dnl -----------------------------------------------------------
543 dnl Enable debugging statements at compile time. By default
544 dnl these statements should be optimized out of the bytecode
545 dnl produced by an optimizing Java compiler and not hinder
546 dnl performance because debugging is turned off by default.
547 dnl -----------------------------------------------------------
548 AC_ARG_ENABLE([debug],
549 [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
550 [case "${enableval}" in
553 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
555 no) LIBDEBUG="false" ;;
556 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
561 dnl -----------------------------------------------------------
562 dnl Enable execution of all static initializer loadLibrary()
563 dnl calls at compile time. By default most people will not
564 dnl want to disable this, but some VMs (gcj) don't need or want
566 dnl -----------------------------------------------------------
567 AC_ARG_ENABLE([load-library],
568 [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
569 [case "${enableval}" in
570 yes) INIT_LOAD_LIBRARY="true" ;;
571 no) INIT_LOAD_LIBRARY="false" ;;
572 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
574 [INIT_LOAD_LIBRARY="true"])
575 AC_SUBST(INIT_LOAD_LIBRARY)
578 dnl -----------------------------------------------------------
579 dnl Should the VM explicitly run class initialization subfunctions for
580 dnl java.lang.System? (default is false -- the subfunctions will be run
581 dnl automatically by the class initializer)
582 dnl -----------------------------------------------------------
583 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
584 [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
585 [case "${enableval}" in
586 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
587 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
588 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
590 [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
591 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
594 dnl -----------------------------------------------------------
595 dnl avoiding automake complaints
596 dnl -----------------------------------------------------------
600 dnl -----------------------------------------------------------
601 dnl This is probably useless.
602 dnl -----------------------------------------------------------
603 AC_PATH_PROG(MKDIR, mkdir)
605 AC_PATH_PROG(DATE, date)
607 dnl -----------------------------------------------------------
608 dnl According to the GNU coding guide, we shouldn't require find,
609 dnl and zip, however GNU provides both so it should be okay
610 dnl -----------------------------------------------------------
611 AC_PATH_PROG(FIND, find)
613 dnl -----------------------------------------------------------
614 dnl Specify what to install (install only glibj.zip by default)
615 dnl -----------------------------------------------------------
618 dnl -----------------------------------------------------------
619 dnl Enable API documentation generation (disabled by default)
620 dnl -----------------------------------------------------------
623 dnl -----------------------------------------------------------
624 dnl Whether to use jay to regenerate parsers.
625 dnl -----------------------------------------------------------
628 dnl -----------------------------------------------------------
629 dnl This sets the build-time default, which can now be overridden
630 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
631 dnl to "true" or "false".
632 dnl -----------------------------------------------------------
633 AC_ARG_ENABLE([portable-native-sync],
634 [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
635 [case "${enableval}" in
637 AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
641 AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync)
646 AX_CREATE_STDINT_H([include/config-int.h])
648 dnl -----------------------------------------------------------------------
649 dnl Support for using a prebuilt class library
650 dnl -----------------------------------------------------------------------
651 AC_ARG_WITH([glibj_zip],
652 AS_HELP_STRING([--with-glibj-zip=ABS.PATH],
653 [use prebuilt glibj.zip class library]))
655 case "$with_glibj_zip" in
663 AC_MSG_ERROR([Please suply an absolute path to a prebuilt glibj.zip])
667 PATH_TO_GLIBJ_ZIP=$with_glibj_zip
671 AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
672 AC_SUBST(PATH_TO_GLIBJ_ZIP)
675 dnl -----------------------------------------------------------
676 dnl Check if local socket support should be included.
677 dnl -----------------------------------------------------------
678 AC_ARG_ENABLE([local-sockets],
679 [AS_HELP_STRING(--enable-local-sockets,enables local (AF_LOCAL) socket API [default: no])],
680 [case "${enableval}" in
682 ENABLE_LOCAL_SOCKETS=yes
685 ENABLE_LOCAL_SOCKETS=no
689 if test "x$ENABLE_LOCAL_SOCKETS" = "xyes"
691 AC_CHECK_HEADER([sys/un.h])
692 AC_CHECK_FUNCS([read write bind listen accept shutdown], [],
693 AC_MSG_ERROR([networking support not available]))
694 AC_DEFINE(ENABLE_LOCAL_SOCKETS, [1], [Define to enable support for local sockets.])
696 AM_CONDITIONAL(ENABLE_LOCAL_SOCKETS, test "x$ENABLE_LOCAL_SOCKETS" = "xyes")
699 dnl -----------------------------------------------------------
701 dnl -----------------------------------------------------------
702 AC_CONFIG_FILES([Makefile
706 external/sax/Makefile
707 external/w3c_dom/Makefile
708 external/relaxngDatatype/Makefile
709 gnu/classpath/Configuration.java
712 native/fdlibm/Makefile
715 native/jni/classpath/Makefile
716 native/jni/java-io/Makefile
717 native/jni/java-lang/Makefile
718 native/jni/java-net/Makefile
719 native/jni/java-nio/Makefile
720 native/jni/java-util/Makefile
721 native/jni/gtk-peer/Makefile
722 native/jni/qt-peer/Makefile
723 native/jni/xmlj/Makefile
724 native/jni/midi-alsa/Makefile
725 native/jni/midi-dssi/Makefile
726 native/plugin/Makefile
727 native/target/Makefile
728 native/target/Linux/Makefile
729 native/target/generic/Makefile
732 scripts/classpath.spec
735 lib/copy-vmresources.sh
738 examples/Makefile.jawt])
740 if test "x${COMPILE_WRAPPERS}" = xno
742 AC_CONFIG_FILES([tools/appletviewer
745 AC_CONFIG_COMMANDS([appletviewer],[chmod 755 tools/appletviewer])
746 AC_CONFIG_COMMANDS([jarsigner],[chmod 755 tools/jarsigner])
747 AC_CONFIG_COMMANDS([keytool],[chmod 755 tools/keytool])
750 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
751 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])