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