OSDN Git Service

2005-12-01 Anthony Green <green@redhat.com>
[pf3gnuchains/gcc-fork.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],
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
279   AC_HEADER_TIME
280   AC_STRUCT_TM
281   AC_STRUCT_TIMEZONE
282
283   AC_MSG_CHECKING([for tm_gmtoff in struct tm])
284   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
285   [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
286    AC_MSG_RESULT(yes)],
287   [AC_MSG_RESULT(no)
288    AC_MSG_CHECKING([for global timezone variable])
289    dnl FIXME: we don't want a link check here because that won't work
290    dnl when cross-compiling.  So instead we make an assumption that
291    dnl the header file will mention timezone if it exists.
292    dnl Don't find the win32 function timezone
293    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
294      [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
295       AC_MSG_RESULT(yes)],
296      [AC_MSG_RESULT(no)
297        AC_MSG_CHECKING([for global _timezone variable])
298        dnl FIXME: As above, don't want link check
299        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
300          [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
301             [Define if your platform has the global _timezone variable.])
302           AC_MSG_RESULT(yes)],
303           [AC_MSG_RESULT(no)])])])
304
305   AC_C_CONST
306   AC_C_ATTRIBUTE
307
308   dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
309   AM_ICONV
310
311   dnl When using gcc we want warnings, lots of warnings :-)
312   if test "x${GCC}" = xyes; then
313     dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
314     dnl and modern POSIX and BSD C library functions/prototypes.
315
316     dnl Warning flags for (almost) everybody.
317     dnl Should probably be configurable
318     WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
319     AC_SUBST(WARNING_CFLAGS)
320
321     dnl Strict warning flags which not every module uses.
322     dnl Should probably be configurable.
323     STRICT_WARNING_CFLAGS=-Wstrict-prototypes
324     AC_SUBST(STRICT_WARNING_CFLAGS)
325
326     dnl Whether or not to add -Werror, also not used by all modueles.
327     dnl Can be configured by --disable-Werror
328     ERROR_CFLAGS=
329     if test "x${ENABLE_WERROR}" = xyes; then
330        ERROR_CFLAGS='-Werror'
331     fi
332     AC_SUBST(ERROR_CFLAGS)
333   fi
334
335   dnl Check for libxml and libxslt libraries (when xmlj is enabled).
336   if test "x${COMPILE_XMLJ}" = xyes; then
337     PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
338     PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
339     AC_SUBST(XML_LIBS)
340     AC_SUBST(XML_CFLAGS)
341     AC_SUBST(XSLT_LIBS)
342     AC_SUBST(XSLT_CFLAGS)
343   fi
344
345   dnl Check for AWT related gthread/gtk
346   if test "x${COMPILE_GTK_PEER}" = xyes; then
347     AC_PATH_XTRA
348     if test "$no_x" = yes; then
349         AC_MSG_ERROR([GTK+ peers requested but no X library available])
350     fi
351     dnl We explicitly want the XTest Extension for Robot support.
352     AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
353           [AC_MSG_ERROR([libXtst NOT found, required for GdkRobot])],
354           [${X_LIBS}])
355     PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
356
357     if test "x${enable_gtk_cairo}" = xyes; then
358       PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.0)
359     fi
360
361     PKG_CHECK_MODULES(PANGOFT2, pangoft2)
362   
363     AC_SUBST(GTK_CFLAGS)
364     AC_SUBST(GTK_LIBS)
365     AC_SUBST(CAIRO_LIBS)
366     AC_SUBST(CAIRO_CFLAGS)
367     AC_SUBST(PANGOFT2_LIBS)
368     AC_SUBST(PANGOFT2_CFLAGS)
369   fi
370
371   dnl Check for AWT related Qt4
372   if test "x${COMPILE_QT_PEER}" = xyes; then
373     PKG_CHECK_MODULES(QT, QtGui >= 4.0.1, HAVE_QT4="yes", HAVE_QT4="no")
374     if test "x$HAVE_QT4" = "xyes"; then
375       dnl Check needed because in some cases the QtGui includedir
376       dnl doesn't contain the subsystem dir.
377       QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
378       EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
379       AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
380       AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
381       AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
382         QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
383         AC_MSG_WARN([QWidget not found])))
384         AC_CHECK_PROG(MOC, [moc], [moc])
385     fi
386     if test "x$HAVE_QT4" = "xno"; then
387       AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
388       case "$host_os" in
389         darwin*)
390           AC_ARG_WITH([qt4dir],
391             [AS_HELP_STRING([--with-qt4dir=DIR],
392             [Qt4 installation directory used for OS-X.
393             For other systems use pkg-config.])],
394             [QT4DIR=$withval]
395             )
396           if test x"$QT4DIR" = x ; then
397             AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
398           fi
399           AC_MSG_RESULT([QT4DIR... $QT4DIR])
400           AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
401           if test x"$MOC" = x; then
402             AC_MSG_ERROR([*** This is not the right Qt installation])
403           fi
404           QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
405           QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
406           QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
407           QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
408           ;;
409         *)
410           AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
411           of your installed Qt4 installation.])
412           ;;
413       esac
414     fi
415     AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
416     AC_SUBST(QT_CFLAGS)
417     AC_SUBST(QT_LIBS)
418   fi
419 fi
420
421 CLASSPATH_WITH_JAVAH
422
423 dnl ----------------------------------------------------------- 
424 dnl Add the include files for the native abstraction layer.
425 dnl Used by AM_CPPFLAGS in the different modules.
426 dnl -----------------------------------------------------------
427 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
428 AC_SUBST(CLASSPATH_INCLUDES)
429
430 dnl -----------------------------------------------------------
431 if test "x${COMPILE_JNI}" = xyes; then
432   AC_MSG_CHECKING(jni_md.h support)
433   if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
434     AC_MSG_RESULT(yes)
435   else
436     target_cpu=x86
437     target_os=linux-gnu 
438     AC_MSG_WARN(no, using x86-linux-gnu)
439   fi
440   ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
441   ac_dests="include/jni_md.h"
442   while test -n "$ac_sources"; do
443     set $ac_dests; ac_dest=$1; shift; ac_dests=$*
444     set $ac_sources; ac_source=$1; shift; ac_sources=$*
445     ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
446   done
447   AC_CONFIG_LINKS([$ac_config_links_1])
448 fi
449
450 CLASSPATH_FIND_JAVAC
451
452 CLASSPATH_WITH_CLASSLIB
453
454 dnl -----------------------------------------------------------
455 dnl Initialize maintainer mode
456 dnl -----------------------------------------------------------
457 AM_MAINTAINER_MODE
458
459 dnl -----------------------------------------------------------
460 dnl Enable debugging statements at compile time.  By default
461 dnl these statements should be optimized out of the bytecode
462 dnl produced by an optimizing Java compiler and not hinder 
463 dnl performance because debugging is turned off by default.
464 dnl -----------------------------------------------------------
465 AC_ARG_ENABLE([debug],
466               [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
467               [case "${enableval}" in 
468                 yes) 
469                 LIBDEBUG="true"
470                 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled]) 
471                 ;;
472                 no)   LIBDEBUG="false" ;;
473                 *)      AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
474               esac],
475               [LIBDEBUG="false"])
476 AC_SUBST(LIBDEBUG)
477
478 dnl -----------------------------------------------------------
479 dnl Enable execution of all static initializer loadLibrary() 
480 dnl calls at compile time.  By default most people will not
481 dnl want to disable this, but some VMs (gcj) don't need or want 
482 dnl them.
483 dnl -----------------------------------------------------------
484 AC_ARG_ENABLE([load-library],
485               [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
486               [case "${enableval}" in 
487                 yes) INIT_LOAD_LIBRARY="true" ;;
488                 no) INIT_LOAD_LIBRARY="false" ;;
489                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
490               esac],
491               [INIT_LOAD_LIBRARY="true"])
492 AC_SUBST(INIT_LOAD_LIBRARY)
493
494
495 dnl -----------------------------------------------------------
496 dnl Should the VM explicitly run class initialization subfunctions for
497 dnl java.lang.System?   (default is false -- the subfunctions will be run 
498 dnl automatically by the class initializer)
499 dnl -----------------------------------------------------------
500 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
501               [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
502               [case "${enableval}" in 
503                 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
504                 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
505                 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
506               esac],
507               [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
508 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
509
510
511 dnl -----------------------------------------------------------
512 dnl avoiding automake complaints
513 dnl -----------------------------------------------------------
514 REMOVE=""
515 AC_SUBST(REMOVE)
516
517 dnl -----------------------------------------------------------
518 dnl This is probably useless.
519 dnl -----------------------------------------------------------
520 AC_PATH_PROG(MKDIR, mkdir)
521 AC_PATH_PROG(CP, cp)
522 AC_PATH_PROG(DATE, date)
523
524 dnl -----------------------------------------------------------
525 dnl According to the GNU coding guide, we shouldn't require find, 
526 dnl and zip, however GNU provides both so it should be okay 
527 dnl -----------------------------------------------------------
528 AC_PATH_PROG(FIND, find)
529
530 dnl -----------------------------------------------------------
531 dnl Specify what to install (install only glibj.zip by default)
532 dnl -----------------------------------------------------------
533 CLASSPATH_WITH_GLIBJ
534
535 dnl -----------------------------------------------------------
536 dnl Enable API documentation generation (disabled by default)
537 dnl -----------------------------------------------------------
538 CLASSPATH_WITH_GJDOC
539
540 dnl -----------------------------------------------------------
541 dnl Whether to use jay to regenerate parsers.
542 dnl -----------------------------------------------------------
543 REGEN_WITH_JAY
544
545 dnl -----------------------------------------------------------
546 dnl This sets the build-time default, which can now be overridden 
547 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
548 dnl to "true" or "false".
549 dnl -----------------------------------------------------------
550 AC_ARG_ENABLE([portable-native-sync],
551               [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
552               [case "${enableval}" in 
553                 yes) 
554                      AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
555                      ;;
556                 no)  ;;
557                 *)   
558                      AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync) 
559                      ;;
560               esac],
561               [])
562
563 dnl -----------------------------------------------------------
564 dnl output files
565 dnl -----------------------------------------------------------
566 AC_CONFIG_FILES([Makefile
567 doc/Makefile
568 doc/api/Makefile
569 external/Makefile
570 external/sax/Makefile
571 external/w3c_dom/Makefile
572 gnu/classpath/Configuration.java
573 include/Makefile
574 native/Makefile
575 native/fdlibm/Makefile
576 native/jawt/Makefile
577 native/jni/Makefile
578 native/jni/classpath/Makefile
579 native/jni/java-io/Makefile
580 native/jni/java-lang/Makefile
581 native/jni/java-net/Makefile
582 native/jni/java-nio/Makefile
583 native/jni/java-util/Makefile
584 native/jni/gtk-peer/Makefile
585 native/jni/qt-peer/Makefile
586 native/jni/xmlj/Makefile
587 native/jni/midi-alsa/Makefile
588 native/jni/midi-dssi/Makefile
589 native/target/Makefile
590 native/target/Linux/Makefile
591 native/target/generic/Makefile
592 resource/Makefile
593 scripts/Makefile
594 scripts/classpath.spec
595 lib/Makefile
596 lib/gen-classlist.sh
597 lib/copy-vmresources.sh
598 examples/Makefile
599 examples/Makefile.jawt])
600 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
601 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])
602 AC_OUTPUT