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.91],[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)
47 dnl -----------------------------------------------------------
48 dnl Enable collections.jar (disabled by default)
49 dnl -----------------------------------------------------------
50 AC_ARG_ENABLE([collections],
51 [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
52 [case x"${enableval}" in
53 xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
54 xno) COMPILE_COLLECTIONS=no ;;
55 x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
56 *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
58 [COMPILE_COLLECTIONS=no])
59 AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
61 dnl -----------------------------------------------------------
62 dnl Enable JNI libraries (enabled by default)
63 dnl -----------------------------------------------------------
65 [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])],
66 [case "${enableval}" in
67 yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
69 *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
72 AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)
74 dnl -----------------------------------------------------------
75 dnl Enable core JNI libraries (enabled by default)
76 dnl -----------------------------------------------------------
77 AC_ARG_ENABLE([core-jni],
78 [AS_HELP_STRING(--enable-core-jni,
79 compile JNI sources for core [default=yes])],
80 [case "${enableval}" in
81 yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
82 no) COMPILE_CORE_JNI=no ;;
83 *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
85 [COMPILE_CORE_JNI=yes])
86 AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
88 dnl ------------------------------------------------------------
89 dnl Whether to compile with -Werror or not (disabled by default)
90 dnl ------------------------------------------------------------
91 AC_ARG_ENABLE([Werror],
92 [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
93 [case "${enableval}" in
94 yes) ENABLE_WERROR=yes ;;
95 no) ENABLE_WERROR=no ;;
96 *) ENABLE_WERROR=no ;;
100 dnl -----------------------------------------------------------
101 dnl Default AWT toolkit
102 dnl -----------------------------------------------------------
103 AC_ARG_ENABLE(default-toolkit,
104 AS_HELP_STRING([--enable-default-toolkit],
105 [fully qualified class name of default AWT toolkit]))
106 default_toolkit=$enable_default_toolkit
107 if test "$default_toolkit" = ""; then
108 default_toolkit=gnu.java.awt.peer.gtk.GtkToolkit
110 AC_SUBST(default_toolkit)
112 dnl -----------------------------------------------------------
113 dnl Native libxml/xslt library (disabled by default)
114 dnl -----------------------------------------------------------
115 AC_ARG_ENABLE([xmlj],
116 [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])],
117 [case "${enableval}" in
118 yes) COMPILE_XMLJ=yes ;;
119 no) COMPILE_XMLJ=no ;;
120 *) COMPILE_XMLJ=no ;;
123 AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
125 dnl -----------------------------------------------------------
126 dnl ALSA code (enabled by default)
127 dnl -----------------------------------------------------------
128 AC_ARG_ENABLE([alsa],
129 [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
130 [case "${enableval}" in
131 yes) COMPILE_ALSA=yes ;;
132 no) COMPILE_ALSA=no ;;
133 *) COMPILE_ALSA=yes ;;
135 [AC_CHECK_HEADERS([alsa/asoundlib.h],
136 [AC_CHECK_LIB([asound], [snd_seq_open], COMPILE_ALSA=yes,COMPILE_ALSA=no)],
138 AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
140 dnl -----------------------------------------------------------
141 dnl DSSI code (enabled by default)
142 dnl -----------------------------------------------------------
143 AC_ARG_ENABLE([dssi],
144 [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
145 [case "${enableval}" in
146 yes) COMPILE_DSSI=yes ;;
147 no) COMPILE_DSSI=no ;;
148 *) COMPILE_DSSI=yes ;;
150 [AC_CHECK_HEADERS([dssi.h],COMPILE_DSSI=yes,COMPILE_DSSI=no)])
151 AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
153 dnl -----------------------------------------------------------
154 dnl GTK native peer (enabled by default)
155 dnl -----------------------------------------------------------
156 AC_ARG_ENABLE([gtk-peer],
157 [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])],
158 [case "${enableval}" in
159 yes) COMPILE_GTK_PEER=yes ;;
160 no) COMPILE_GTK_PEER=no ;;
161 *) COMPILE_GTK_PEER=yes ;;
163 [COMPILE_GTK_PEER=yes])
164 AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)
166 dnl -----------------------------------------------------------
167 dnl GTK native peer error checking
168 dnl -----------------------------------------------------------
169 AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))
171 dnl ------------------------------------------------------------
172 dnl determine whether to enable the cairo GTK Graphics2D backend
173 dnl ------------------------------------------------------------
174 AC_ARG_ENABLE([gtk-cairo],
175 [AS_HELP_STRING(--enable-gtk-cairo,build the cairo Graphics2D implementation on GTK [default=no])],
176 [case "${enableval}" in
177 yes) GTK_CAIRO_ENABLED=true ;;
178 no) GTK_CAIRO_ENABLED=false ;;
179 *) GTK_CAIRO_ENABLED=true ;;
181 [GTK_CAIRO_ENABLED=false])
182 AC_SUBST(GTK_CAIRO_ENABLED)
183 if test "x${GTK_CAIRO_ENABLED}" = xtrue; then
184 AC_DEFINE(GTK_CAIRO, 1, [defined if cairo support was built in])
186 AM_CONDITIONAL(GTK_CAIRO, test "x${GTK_CAIRO_ENABLED}" = xtrue)
188 dnl -----------------------------------------------------------
189 dnl Qt native peer (disabled by default)
190 dnl -----------------------------------------------------------
191 AC_ARG_ENABLE([qt-peer],
192 [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
193 [case "${enableval}" in
194 yes) COMPILE_QT_PEER=yes ;;
195 no) COMPILE_QT_PEER=no ;;
196 *) COMPILE_QT_PEER=yes ;;
198 [COMPILE_QT_PEER=no])
199 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
202 dnl -----------------------------------------------------------
203 dnl Sets the native libraries installation dir
204 dnl -----------------------------------------------------------
205 AC_ARG_WITH([native-libdir],
206 [AS_HELP_STRING(--with-native-libdir,sets the installation directore for native libraries [default='${libdir}/${PACKAGE}'])],
208 nativeexeclibdir=${withval}
211 nativeexeclibdir='${libdir}/${PACKAGE}'
214 AC_SUBST(nativeexeclibdir)
216 dnl -----------------------------------------------------------
217 dnl Sets the Java library installation dir.
218 dnl -----------------------------------------------------------
219 AC_ARG_WITH([glibj-dir],
220 [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
225 glibjdir='${datadir}/${PACKAGE}'
230 dnl -----------------------------------------------------------
231 dnl Regenerate headers at build time (disabled by default)
232 dnl -----------------------------------------------------------
233 AC_ARG_ENABLE([regen-headers],
234 [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])],
235 [case "${enableval}" in
236 yes) REGENERATE_JNI_HEADERS=yes ;;
237 no) REGENERATE_JNI_HEADERS=no ;;
238 *) REGENERATE_JNI_HEADERS=no ;;
240 [REGENERATE_JNI_HEADERS=no])
241 AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
246 dnl -----------------------------------------------------------
247 dnl Checks for programs.
248 dnl -----------------------------------------------------------
250 dnl Initialize libtool
258 if test "x${COMPILE_COLLECTIONS}" = xyes; then
259 AC_PATH_PROG(PERL, [perl])
261 AC_SUBST(COLLECTIONS_PREFIX)
262 AC_CONFIG_FILES([lib/mkcollections.pl])
263 AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
266 if test "x${COMPILE_JNI}" = xyes; then
269 dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
271 AC_COMPILE_CHECK_SIZEOF(void *)
273 dnl Checking for endianess.
276 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
277 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
278 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
279 dnl Check for crt_externs.h on Darwin.
280 AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
282 inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
289 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
290 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
291 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]))
292 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]))
294 AC_CHECK_FUNCS([ftruncate fsync select \
295 gethostname socket strerror fork pipe execve open close \
296 lseek fstat read write htonl memset htons connect \
297 getsockname getpeername bind listen accept \
298 recvfrom send sendto setsockopt getsockopt time mktime \
302 mmap munmap mincore msync madvise getpagesize sysconf \
309 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
310 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
311 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
314 AC_MSG_CHECKING([for global timezone variable])
315 dnl FIXME: we don't want a link check here because that won't work
316 dnl when cross-compiling. So instead we make an assumption that
317 dnl the header file will mention timezone if it exists.
318 dnl Don't find the win32 function timezone
319 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
320 [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
323 AC_MSG_CHECKING([for global _timezone variable])
324 dnl FIXME: As above, don't want link check
325 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
326 [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
327 [Define if your platform has the global _timezone variable.])
329 [AC_MSG_RESULT(no)])])])
334 dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
337 dnl When using gcc we want warnings, lots of warnings :-)
338 if test "x${GCC}" = xyes; then
339 dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
340 dnl and modern POSIX and BSD C library functions/prototypes.
342 dnl Warning flags for (almost) everybody.
343 dnl Should probably be configurable
344 WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
345 AC_SUBST(WARNING_CFLAGS)
347 dnl Strict warning flags which not every module uses.
348 dnl Should probably be configurable.
349 STRICT_WARNING_CFLAGS=-Wstrict-prototypes
350 AC_SUBST(STRICT_WARNING_CFLAGS)
352 dnl Whether or not to add -Werror, also not used by all modueles.
353 dnl Can be configured by --disable-Werror
355 if test "x${ENABLE_WERROR}" = xyes; then
356 ERROR_CFLAGS='-Werror'
358 AC_SUBST(ERROR_CFLAGS)
361 dnl Check for libxml and libxslt libraries (when xmlj is enabled).
362 if test "x${COMPILE_XMLJ}" = xyes; then
363 PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
364 PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
368 AC_SUBST(XSLT_CFLAGS)
371 dnl Check for AWT related gthread/gtk
372 if test "x${COMPILE_GTK_PEER}" = xyes; then
374 if test "$no_x" = yes; then
375 AC_MSG_ERROR([GTK+ peers requested but no X library available])
377 dnl We explicitly want the XTest Extension for Robot support.
378 AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
379 [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
381 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
383 if test "x${enable_gtk_cairo}" = xyes; then
384 PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
387 PKG_CHECK_MODULES(FREETYPE2, freetype2)
388 PKG_CHECK_MODULES(PANGOFT2, pangoft2)
393 AC_SUBST(CAIRO_CFLAGS)
394 AC_SUBST(FREETYPE2_LIBS)
395 AC_SUBST(FREETYPE2_CFLAGS)
396 AC_SUBST(PANGOFT2_LIBS)
397 AC_SUBST(PANGOFT2_CFLAGS)
400 dnl Check for AWT related Qt4
401 if test "x${COMPILE_QT_PEER}" = xyes; then
402 PKG_CHECK_MODULES(QT, QtCore QtGui >= 4.1.0, HAVE_QT4="yes", HAVE_QT4="no")
403 if test "x$HAVE_QT4" = "xyes"; then
404 dnl Check needed because in some cases the QtGui includedir
405 dnl doesn't contain the subsystem dir.
406 QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
407 EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
408 AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
409 AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
410 AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
411 QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
412 AC_MSG_WARN([QWidget not found])))
413 AC_CHECK_PROG(MOC, [moc], [moc])
415 if test "x$HAVE_QT4" = "xno"; then
416 AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
419 AC_ARG_WITH([qt4dir],
420 [AS_HELP_STRING([--with-qt4dir=DIR],
421 [Qt4 installation directory used for OS-X.
422 For other systems use pkg-config.])],
425 if test x"$QT4DIR" = x ; then
426 AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
428 AC_MSG_RESULT([QT4DIR... $QT4DIR])
429 AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
430 if test x"$MOC" = x; then
431 AC_MSG_ERROR([*** This is not the right Qt installation])
433 QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
434 QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
435 QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
436 QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
439 AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
440 of your installed Qt4 installation.])
444 AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
452 dnl -----------------------------------------------------------
453 dnl Add the include files for the native abstraction layer.
454 dnl Used by AM_CPPFLAGS in the different modules.
455 dnl -----------------------------------------------------------
456 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
457 AC_SUBST(CLASSPATH_INCLUDES)
459 dnl -----------------------------------------------------------
460 if test "x${COMPILE_JNI}" = xyes; then
461 AC_MSG_CHECKING(jni_md.h support)
462 if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
467 AC_MSG_WARN(no, using x86-linux-gnu)
469 ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
470 ac_dests="include/jni_md.h"
471 while test -n "$ac_sources"; do
472 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
473 set $ac_sources; ac_source=$1; shift; ac_sources=$*
474 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
476 AC_CONFIG_LINKS([$ac_config_links_1])
481 CLASSPATH_WITH_CLASSLIB
483 dnl -----------------------------------------------------------
484 dnl Initialize maintainer mode
485 dnl -----------------------------------------------------------
488 dnl -----------------------------------------------------------
489 dnl Enable debugging statements at compile time. By default
490 dnl these statements should be optimized out of the bytecode
491 dnl produced by an optimizing Java compiler and not hinder
492 dnl performance because debugging is turned off by default.
493 dnl -----------------------------------------------------------
494 AC_ARG_ENABLE([debug],
495 [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
496 [case "${enableval}" in
499 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
501 no) LIBDEBUG="false" ;;
502 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
507 dnl -----------------------------------------------------------
508 dnl Enable execution of all static initializer loadLibrary()
509 dnl calls at compile time. By default most people will not
510 dnl want to disable this, but some VMs (gcj) don't need or want
512 dnl -----------------------------------------------------------
513 AC_ARG_ENABLE([load-library],
514 [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
515 [case "${enableval}" in
516 yes) INIT_LOAD_LIBRARY="true" ;;
517 no) INIT_LOAD_LIBRARY="false" ;;
518 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
520 [INIT_LOAD_LIBRARY="true"])
521 AC_SUBST(INIT_LOAD_LIBRARY)
524 dnl -----------------------------------------------------------
525 dnl Should the VM explicitly run class initialization subfunctions for
526 dnl java.lang.System? (default is false -- the subfunctions will be run
527 dnl automatically by the class initializer)
528 dnl -----------------------------------------------------------
529 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
530 [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
531 [case "${enableval}" in
532 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
533 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
534 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
536 [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
537 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
540 dnl -----------------------------------------------------------
541 dnl avoiding automake complaints
542 dnl -----------------------------------------------------------
546 dnl -----------------------------------------------------------
547 dnl This is probably useless.
548 dnl -----------------------------------------------------------
549 AC_PATH_PROG(MKDIR, mkdir)
551 AC_PATH_PROG(DATE, date)
553 dnl -----------------------------------------------------------
554 dnl According to the GNU coding guide, we shouldn't require find,
555 dnl and zip, however GNU provides both so it should be okay
556 dnl -----------------------------------------------------------
557 AC_PATH_PROG(FIND, find)
559 dnl -----------------------------------------------------------
560 dnl Specify what to install (install only glibj.zip by default)
561 dnl -----------------------------------------------------------
564 dnl -----------------------------------------------------------
565 dnl Enable API documentation generation (disabled by default)
566 dnl -----------------------------------------------------------
569 dnl -----------------------------------------------------------
570 dnl Whether to use jay to regenerate parsers.
571 dnl -----------------------------------------------------------
574 dnl -----------------------------------------------------------
575 dnl This sets the build-time default, which can now be overridden
576 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
577 dnl to "true" or "false".
578 dnl -----------------------------------------------------------
579 AC_ARG_ENABLE([portable-native-sync],
580 [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
581 [case "${enableval}" in
583 AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
587 AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync)
592 AX_CREATE_STDINT_H([include/config-int.h])
594 dnl -----------------------------------------------------------------------
595 dnl Support for using a prebuilt class library
596 dnl -----------------------------------------------------------------------
597 AC_ARG_WITH([glibj_zip],
598 AS_HELP_STRING([--with-glibj-zip=ABS.PATH],
599 [use prebuilt glibj.zip class library]))
601 case "$with_glibj_zip" in
609 AC_MSG_ERROR([Please suply an absolute path to a prebuilt glibj.zip])
613 PATH_TO_GLIBJ_ZIP=$with_glibj_zip
617 AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
618 AC_SUBST(PATH_TO_GLIBJ_ZIP)
621 dnl -----------------------------------------------------------
622 dnl Check if local socket support should be included.
623 dnl -----------------------------------------------------------
624 AC_ARG_ENABLE([local-sockets],
625 [AS_HELP_STRING(--enable-local-sockets,enables local (AF_LOCAL) socket API [default: no])],
626 [case "${enableval}" in
628 ENABLE_LOCAL_SOCKETS=yes
631 ENABLE_LOCAL_SOCKETS=no
635 if test "x$ENABLE_LOCAL_SOCKETS" = "xyes"
637 AC_CHECK_HEADER([sys/un.h])
638 AC_CHECK_FUNCS([read write bind listen accept shutdown], [],
639 AC_MSG_ERROR([networking support not available]))
640 AC_DEFINE(ENABLE_LOCAL_SOCKETS, [1], [Define to enable support for local sockets.])
642 AM_CONDITIONAL(ENABLE_LOCAL_SOCKETS, test "x$ENABLE_LOCAL_SOCKETS" = "xyes")
645 dnl -----------------------------------------------------------
647 dnl -----------------------------------------------------------
648 AC_CONFIG_FILES([Makefile
652 external/sax/Makefile
653 external/w3c_dom/Makefile
654 external/relaxngDatatype/Makefile
655 gnu/classpath/Configuration.java
658 native/fdlibm/Makefile
661 native/jni/classpath/Makefile
662 native/jni/java-io/Makefile
663 native/jni/java-lang/Makefile
664 native/jni/java-net/Makefile
665 native/jni/java-nio/Makefile
666 native/jni/java-util/Makefile
667 native/jni/gtk-peer/Makefile
668 native/jni/qt-peer/Makefile
669 native/jni/xmlj/Makefile
670 native/jni/midi-alsa/Makefile
671 native/jni/midi-dssi/Makefile
672 native/target/Makefile
673 native/target/Linux/Makefile
674 native/target/generic/Makefile
677 scripts/classpath.spec
680 lib/copy-vmresources.sh
685 examples/Makefile.jawt])
686 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
687 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])