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.99.1-pre],[classpath@gnu.org],[classpath])
10 AC_CONFIG_SRCDIR(java/lang/System.java)
11 AC_CONFIG_MACRO_DIR([m4])
14 AC_CONFIG_AUX_DIR(../..)
20 AC_ARG_ENABLE(java-maintainer-mode,
21 AS_HELP_STRING([--enable-java-maintainer-mode],
22 [allow rebuilding of .class and .h files]))
23 AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
27 # We would like to our source tree to be readonly. However when releases or
28 # pre-releases are generated, the man pages need to be included as they are
29 # converted from the texi files via perl which we don't require end users to
31 # Therefore we have --enable-generated-files-in-srcdir to do just that.
33 AC_MSG_CHECKING([whether to place generated files in the source directory])
34 dnl generated-files-in-srcdir is disabled by default
35 AC_ARG_ENABLE(generated-files-in-srcdir,
36 [ --enable-generated-files-in-srcdir
37 put copies of generated files in source dir
38 intended for creating source tarballs for users
39 without texinfo, perl, bison or flex.],
40 generated_files_in_srcdir=$enableval,
41 generated_files_in_srcdir=no)
43 AC_MSG_RESULT($generated_files_in_srcdir)
44 AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
47 # Find the rest of the source tree framework.
48 AM_ENABLE_MULTILIB(, ../..)
50 AM_CONDITIONAL(INSTALL_BINARIES, test -z "${with_multisubdir}")
52 dnl -----------------------------------------------------------
53 dnl Fold all IA-32 CPU architectures into "x86"
54 dnl -----------------------------------------------------------
55 if expr ${target_cpu} : '.*86' > /dev/null; then target_cpu=x86; fi
57 dnl -----------------------------------------------------------
58 dnl We will not track/change lib version until we reach version 1.0
59 dnl at which time we'll have to be more anal about such things
60 dnl -----------------------------------------------------------
61 AC_SUBST(LIBVERSION, "0:0:0")
71 CLASSPATH_MODULE="${cp_module} -version-info ${LIBVERSION} -no-undefined"
72 AC_SUBST(CLASSPATH_MODULE)
74 CLASSPATH_CONVENIENCE="-no-undefined"
75 AC_SUBST(CLASSPATH_CONVENIENCE)
78 AM_INIT_AUTOMAKE([1.9.0 no-dist gnu std-options tar-ustar -Wno-portability])
79 AC_CONFIG_HEADERS([include/config.h])
80 AC_PREFIX_DEFAULT(/usr/local/classpath)
85 dnl -----------------------------------------------------------
86 dnl Enable collections.jar (disabled by default)
87 dnl -----------------------------------------------------------
88 AC_ARG_ENABLE([collections],
89 [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
90 [case x"${enableval}" in
91 xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
92 xno) COMPILE_COLLECTIONS=no ;;
93 x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
94 *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
96 [COMPILE_COLLECTIONS=no])
97 AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
99 dnl -----------------------------------------------------------
100 dnl Enable JNI libraries (enabled by default)
101 dnl -----------------------------------------------------------
103 [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])],
104 [case "${enableval}" in
105 yes) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
106 no) COMPILE_JNI=no ;;
107 *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;;
110 AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes)
112 dnl -----------------------------------------------------------
113 dnl Enable core JNI libraries (enabled by default)
114 dnl -----------------------------------------------------------
115 AC_ARG_ENABLE([core-jni],
116 [AS_HELP_STRING(--enable-core-jni,
117 compile JNI sources for core [default=yes])],
118 [case "${enableval}" in
119 yes) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
120 no) COMPILE_CORE_JNI=no ;;
121 *) COMPILE_CORE_JNI=yes; COMPILE_JAVA=yes ;;
123 [COMPILE_CORE_JNI=yes])
124 AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
126 dnl -----------------------------------------------------------
127 dnl Default Preference Backend
128 dnl -----------------------------------------------------------
129 AC_ARG_ENABLE([default-preferences-peer],
130 [AS_HELP_STRING([--enable-default-preferences-peer@<:@=peer type or class name@:>@],
131 [specify one of: "gconf" [default] for a GConf based backend, "file" for a file based one, "memory" for a transient one, or a fully qualified class name implementing java.util.prefs.PreferencesFactory])],
132 [case "${enableval}" in
133 file) DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory ;;
134 gconf|yes|true) DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory ;;
135 memory) DEFAULT_PREFS_PEER=gnu.java.util.prefs.MemoryBasedFactory ;;
136 no|false) AC_MSG_ERROR(bad value '${enableval}' for --enable-default-preferences-peer) ;;
137 *) DEFAULT_PREFS_PEER=${enableval} ;;
139 [DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory])
140 dnl AC_SUBST(DEFAULT_PREFS_PEER)
142 dnl -----------------------------------------------------------
143 dnl GConf native peer (enabled by default)
144 dnl -----------------------------------------------------------
145 AC_ARG_ENABLE([gconf-peer],
146 [AS_HELP_STRING(--disable-gconf-peer,compile GConf native peers (disabled by --disable-jni) [default=yes])],
147 [case "${enableval}" in
148 yes) COMPILE_GCONF_PEER=yes ;;
149 no) COMPILE_GCONF_PEER=no ;;
150 *) COMPILE_GCONF_PEER=yes ;;
152 [COMPILE_GCONF_PEER=yes])
153 AM_CONDITIONAL(CREATE_GCONF_PEER_LIBRARIES, test "x${COMPILE_GCONF_PEER}" = xyes)
155 dnl -----------------------------------------------------------
156 dnl GConf native peer error checking
157 dnl -----------------------------------------------------------
158 AC_ARG_ENABLE([gconf-peers],,AC_MSG_ERROR([No --enable-gconf-peers (or --disable-gconf-peers) option; you want --enable-gconf-peer]))
160 dnl ------------------------------------------------------------
161 dnl GStreamer based sound provider backend (disabled by default)
162 dnl ------------------------------------------------------------
163 AC_ARG_ENABLE([gstreamer-peer],
164 [AS_HELP_STRING(--enable-gstreamer-peer,compile GStreamer native peers (disabled by --disable-jni) [default=no])],
165 [case "${enableval}" in
166 yes) COMPILE_GSTREAMER_PEER=yes ;;
167 no) COMPILE_GSTREAMER_PEER=no ;;
168 *) COMPILE_GSTREAMER_PEER=default ;;
170 [COMPILE_GSTREAMER_PEER=default])
171 AM_CONDITIONAL(CREATE_GSTREAMER_PEER_LIBRARIES, test "x${COMPILE_GSTREAMER_PEER}" = xyes)
173 dnl -----------------------------------------------------------
174 dnl GStreamer native peer error checking
175 dnl -----------------------------------------------------------
176 AC_ARG_ENABLE([gstreamer-peers],,AC_MSG_ERROR([No --enable-gstreamer-peers (or --disable-gstreamer-peers) option; you want --enable-gstreamer-peer]))
178 dnl ------------------------------------------------------------
179 dnl Whether to compile with -Werror or not (disabled by default)
180 dnl ------------------------------------------------------------
181 AC_ARG_ENABLE([Werror],
182 [AS_HELP_STRING(--enable-Werror,whether to compile C code with -Werror which turns any compiler warning into a compilation failure [default=no])],
183 [case "${enableval}" in
184 yes) ENABLE_WERROR=yes ;;
185 no) ENABLE_WERROR=no ;;
186 *) ENABLE_WERROR=no ;;
190 dnl -----------------------------------------------------------
191 dnl Default AWT toolkit
192 dnl -----------------------------------------------------------
193 AC_ARG_ENABLE(default-toolkit,
194 AS_HELP_STRING([--enable-default-toolkit],
195 [fully qualified class name of default AWT toolkit]))
196 default_toolkit=$enable_default_toolkit
197 if test "$default_toolkit" = ""; then
198 default_toolkit=gnu.java.awt.peer.gtk.GtkToolkit
200 AC_SUBST(default_toolkit)
202 dnl -----------------------------------------------------------
203 dnl Native libxml/xslt library (disabled by default)
204 dnl -----------------------------------------------------------
205 AC_ARG_ENABLE([xmlj],
206 [AS_HELP_STRING(--enable-xmlj,compile native libxml/xslt library [default=no])],
207 [case "${enableval}" in
208 yes) COMPILE_XMLJ=yes ;;
209 no) COMPILE_XMLJ=no ;;
210 *) COMPILE_XMLJ=no ;;
213 AM_CONDITIONAL(CREATE_XMLJ_LIBRARY, test "x${COMPILE_XMLJ}" = xyes)
215 dnl -----------------------------------------------------------
216 dnl ALSA code (enabled by default)
217 dnl -----------------------------------------------------------
218 AC_ARG_ENABLE([alsa],
219 [AS_HELP_STRING(--disable-alsa,compile ALSA providers (enable by --enable-alsa) [default=yes])],
220 [case "${enableval}" in
221 yes) COMPILE_ALSA=yes ;;
222 no) COMPILE_ALSA=no ;;
223 *) COMPILE_ALSA=yes ;;
225 [AC_CHECK_HEADERS([alsa/asoundlib.h],
226 [AC_CHECK_LIB([asound], [snd_seq_open], COMPILE_ALSA=yes,COMPILE_ALSA=no)],
228 AM_CONDITIONAL(CREATE_ALSA_LIBRARIES, test "x${COMPILE_ALSA}" = xyes)
230 dnl -----------------------------------------------------------
231 dnl DSSI code (enabled by default)
232 dnl -----------------------------------------------------------
233 AC_ARG_ENABLE([dssi],
234 [AS_HELP_STRING(--disable-dssi,compile DSSI providers (enable by --enable-dssi) [default=yes])],
235 [case "${enableval}" in
236 yes) COMPILE_DSSI=yes ;;
237 no) COMPILE_DSSI=no ;;
238 *) COMPILE_DSSI=yes ;;
241 AC_CHECK_HEADERS([dssi.h], [
242 AC_CHECK_HEADERS([jack/jack.h],COMPILE_DSSI=yes)])])
243 AM_CONDITIONAL(CREATE_DSSI_LIBRARIES, test "x${COMPILE_DSSI}" = xyes)
245 dnl -----------------------------------------------------------
246 dnl GTK native peer (enabled by default)
247 dnl -----------------------------------------------------------
248 AC_ARG_ENABLE([gtk-peer],
249 [AS_HELP_STRING(--disable-gtk-peer,compile GTK native peers (disabled by --disable-jni) [default=yes])],
250 [case "${enableval}" in
251 yes) COMPILE_GTK_PEER=yes ;;
252 no) COMPILE_GTK_PEER=no ;;
253 *) COMPILE_GTK_PEER=yes ;;
255 [COMPILE_GTK_PEER=yes])
256 AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes)
258 dnl -----------------------------------------------------------
259 dnl GTK native peer error checking
260 dnl -----------------------------------------------------------
261 AC_ARG_ENABLE([gtk-peers],,AC_MSG_ERROR([No --enable-gtk-peers (or --disable-gtk-peers) option; you want --enable-gtk-peer]))
263 dnl -----------------------------------------------------------
264 dnl Qt native peer (disabled by default)
265 dnl -----------------------------------------------------------
266 AC_ARG_ENABLE([qt-peer],
267 [AS_HELP_STRING(--enable-qt-peer,compile Qt4 native peers (disabled by --disable-jni) [default=no])],
268 [case "${enableval}" in
269 yes) COMPILE_QT_PEER=yes ;;
270 no) COMPILE_QT_PEER=no ;;
271 *) COMPILE_QT_PEER=yes ;;
273 [COMPILE_QT_PEER=no])
274 AM_CONDITIONAL(CREATE_QT_PEER_LIBRARIES, test "x${COMPILE_QT_PEER}" = xyes)
276 dnl -----------------------------------------------------------
277 dnl Plugin (disabled by default)
278 dnl -----------------------------------------------------------
279 AC_ARG_ENABLE([plugin],
280 [AS_HELP_STRING(--disable-plugin,compile gcjwebplugin (disabled by --disable-plugin) [default=yes])],
281 [case "${enableval}" in
282 yes) COMPILE_PLUGIN=yes ;;
283 no) COMPILE_PLUGIN=no ;;
284 *) COMPILE_PLUGIN=yes ;;
287 AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
289 dnl -----------------------------------------------------------
290 dnl Native java.math.BigInteger (enabled by default)
291 dnl -----------------------------------------------------------
293 [AS_HELP_STRING(--enable-gmp,
294 compile native java.math.BigInteger library (disabled by --disable-gmp) [default=yes])],
295 [case "${enableval}" in
296 yes|true) COMPILE_GMP=yes ;;
297 no|false) COMPILE_GMP=no ;;
298 *) COMPILE_GMP=yes ;;
302 dnl -----------------------------------------------------------
303 dnl GJDoc (enabled by default)
304 dnl -----------------------------------------------------------
305 AC_ARG_ENABLE([gjdoc],
306 [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])],
307 [case "${enableval}" in
308 yes) COMPILE_GJDOC=yes ;;
309 no) COMPILE_GJDOC=no ;;
310 *) COMPILE_GJDOC=yes ;;
313 AM_CONDITIONAL(CREATE_GJDOC, test "x${COMPILE_GJDOC}" = xyes)
315 dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir. $libdir is
316 dnl defined to the same value for all multilibs. We define toolexeclibdir
317 dnl so that we can refer to the multilib installation directories from
318 dnl classpath's build files.
319 dnl -----------------------------------------------------------
320 case ${host_alias} in
321 "") host_noncanonical=${build_noncanonical} ;;
322 *) host_noncanonical=${host_alias} ;;
324 case ${target_alias} in
325 "") target_noncanonical=${host_noncanonical} ;;
326 *) target_noncanonical=${target_alias} ;;
328 AC_SUBST(target_noncanonical)
330 AC_ARG_ENABLE(version-specific-runtime-libs,
331 AS_HELP_STRING([--enable-version-specific-runtime-libs],
332 [specify that runtime libraries should be installed in a compiler-specific directory]),
333 [case "$enableval" in
334 yes) version_specific_libs=yes ;;
335 no) version_specific_libs=no ;;
336 *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
338 [version_specific_libs=no]
340 CLASSPATH_TOOLEXECLIBDIR
342 dnl -----------------------------------------------------------
343 dnl Sets the native libraries installation dir
344 dnl -----------------------------------------------------------
345 dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}-${libgcj_soversion}
346 AC_ARG_WITH([native-libdir],
347 [AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
349 nativeexeclibdir=${withval}
352 nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
355 AC_SUBST(nativeexeclibdir)
357 dnl -----------------------------------------------------------
358 dnl Sets the Java library installation dir.
359 dnl -----------------------------------------------------------
360 AC_ARG_WITH([glibj-dir],
361 [AS_HELP_STRING(--with-glibj-dir,sets the installation directory for glibj.zip [default='${libdir}/${PACKAGE}'])],
366 glibjdir='${datadir}/${PACKAGE}'
371 dnl -----------------------------------------------------------
372 dnl Sets the Antlr jar to use for compiling gjdoc
373 dnl -----------------------------------------------------------
374 AC_ARG_WITH([antlr-jar],
375 [AS_HELP_STRING([--with-antlr-jar=file],[Use ANTLR from the specified jar file])],
380 ANTLR_JAR="$ANTLR_JAR"
383 dnl -----------------------------------------------------------
384 dnl Regenerate headers at build time (enabled if not found)
385 dnl -----------------------------------------------------------
386 AC_MSG_CHECKING([whether to regenerate the headers])
387 AC_ARG_ENABLE([regen-headers],
388 [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=yes if headers don't exist])],
389 [case "${enableval}" in
390 yes) REGENERATE_JNI_HEADERS=yes ;;
391 no) REGENERATE_JNI_HEADERS=no ;;
392 *) REGENERATE_JNI_HEADERS=yes ;;
394 [if test -e ${srcdir}/include/java_lang_VMSystem.h; then
395 REGENERATE_JNI_HEADERS=no ;
397 REGENERATE_JNI_HEADERS=yes ;
399 AC_MSG_RESULT(${REGENERATE_JNI_HEADERS})
400 AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes)
402 dnl ------------------------------------------------------------------------
403 dnl Regenerate GJDoc parser at build time (enabled if not found)
404 dnl ------------------------------------------------------------------------
405 AC_MSG_CHECKING([whether to regenerate the GJDoc parser])
406 AC_ARG_ENABLE([regen-gjdoc-parser],
407 [AS_HELP_STRING(--enable-regen-gjdoc-parser,automatically regenerate the GJDoc parser [default=yes if generated source doesn't exist])],
408 [case "${enableval}" in
409 yes) REGENERATE_GJDOC_PARSER=yes ;;
410 no) REGENERATE_GJDOC_PARSER=no ;;
411 *) REGENERATE_GJDOC_PARSER=yes ;;
413 [if test -e ${srcdir}/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java; then
414 REGENERATE_GJDOC_PARSER=no ;
416 REGENERATE_GJDOC_PARSER=yes ;
418 AC_MSG_RESULT(${REGENERATE_GJDOC_PARSER})
419 AM_CONDITIONAL(CREATE_GJDOC_PARSER, test "x${REGENERATE_GJDOC_PARSER}" = xyes)
421 dnl -----------------------------------------------------------
422 dnl Enable tool wrapper binaries (disabled by default)
423 dnl -----------------------------------------------------------
424 AC_ARG_ENABLE([tool-wrappers],
425 [AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
426 [case x"${enableval}" in
428 COMPILE_WRAPPERS=yes;
429 AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
430 AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
432 xno) COMPILE_WRAPPERS=no ;;
433 x) COMPILE_WRAPPERS=yes ;;
434 *) COMPILE_WRAPPERS=yes ;;
436 [COMPILE_WRAPPERS=no])
437 AM_CONDITIONAL(CREATE_WRAPPERS, test "x${COMPILE_WRAPPERS}" = xyes)
442 dnl -----------------------------------------------------------
443 dnl Checks for programs.
444 dnl -----------------------------------------------------------
446 dnl Initialize libtool
455 # Handle -Werror default case.
456 if test "$ENABLE_WERROR" = default; then
459 if test "$GCC" = yes; then
466 if test "x${COMPILE_COLLECTIONS}" = xyes; then
467 AC_PATH_PROG(PERL, [perl])
469 AC_SUBST(COLLECTIONS_PREFIX)
470 AC_CONFIG_FILES([lib/mkcollections.pl])
471 AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
474 if test "x${COMPILE_JNI}" = xyes; then
479 dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
481 AC_COMPILE_CHECK_SIZEOF(void *)
483 dnl Checking for endianess.
486 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
487 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
488 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
489 dnl Check for crt_externs.h on Darwin.
490 dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE.
491 dnl Check for sys/loadavg.h for getloadavg() on Solaris 9.
492 dnl Check for sys/sockio.h for SIOCGIFFLAGS on OpenSolaris.
493 AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
495 inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
502 sys/event.h sys/epoll.h \
504 netinet/in_systm.h netinet/ip.h net/if.h \
505 sys/loadavg.h sys/sockio.h])
507 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
508 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
509 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]))
510 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]))
512 AC_SEARCH_LIBS([clock_gettime], [rt])
513 AC_SEARCH_LIBS([inet_pton],[nsl])
514 AC_CHECK_LIB([socket], [gethostname])
516 AC_CHECK_FUNCS([ftruncate fsync select \
517 gethostname socket strerror fork pipe execve open close \
518 lseek fstat read readv write writev htonl memset htons connect \
519 getsockname getpeername bind listen accept \
520 recvfrom send sendto setsockopt getsockopt time mktime clock_gettime \
521 gethostbyname_r localtime_r \
525 mmap munmap mincore msync madvise getpagesize sysconf \
527 inet_aton inet_addr inet_pton \
528 getifaddrs kqueue kevent epoll_create \
532 AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
535 AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
536 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
537 [AC_DEFINE(HAVE_INET6, 1,
538 [Define if inet6 structures are defined in netinet/in.h.])
546 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
547 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],[[struct tm tim; tim.tm_gmtoff = 0;]])],
548 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
551 AC_MSG_CHECKING([for global timezone variable])
552 dnl FIXME: we don't want a link check here because that won't work
553 dnl when cross-compiling. So instead we make an assumption that
554 dnl the header file will mention timezone if it exists.
555 dnl Don't find the win32 function timezone
556 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
557 [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
560 AC_MSG_CHECKING([for global _timezone variable])
561 dnl FIXME: As above, don't want link check
562 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
563 [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
564 [Define if your platform has the global _timezone variable.])
566 [AC_MSG_RESULT(no)])])])
571 AX_FUNC_WHICH_GETHOSTBYNAME_R
573 dnl See if we HAVE_ICONV, how ICONV_CONST is set and LTLIBICONV
576 dnl When using gcc we want warnings, lots of warnings :-)
577 if test "x${GCC}" = xyes; then
578 dnl We want ISO C90 ansi, but with longlong (jlong) support
579 dnl and modern POSIX and BSD C library functions/prototypes.
581 dnl Warning flags for (almost) everybody.
582 dnl Should probably be configurable
583 WARNING_CFLAGS='-W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
584 AC_SUBST(WARNING_CFLAGS)
586 dnl CFLAGS that are used for all native code. We want to compile
587 dnl everything with unwinder data so that backtrace() will always
589 EXTRA_CFLAGS='-fexceptions -fasynchronous-unwind-tables'
590 AC_SUBST(EXTRA_CFLAGS)
592 dnl Strict warning flags which not every module uses.
593 dnl Should probably be configurable.
594 STRICT_WARNING_CFLAGS='-Wstrict-prototypes -pedantic'
595 AC_SUBST(STRICT_WARNING_CFLAGS)
597 dnl Whether or not to add -Werror, also not used by all modueles.
598 dnl Can be configured by --disable-Werror
600 if test "x${ENABLE_WERROR}" = xyes; then
601 ERROR_CFLAGS='-Werror'
603 AC_SUBST(ERROR_CFLAGS)
606 dnl Check for libxml and libxslt libraries (when xmlj is enabled).
607 if test "x${COMPILE_XMLJ}" = xyes; then
608 PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.6.8)
609 PKG_CHECK_MODULES(XSLT, libxslt >= 1.1.11)
613 AC_SUBST(XSLT_CFLAGS)
616 dnl Check for AWT related gthread/gtk
617 if test "x${COMPILE_GTK_PEER}" = xyes; then
619 if test "$no_x" = yes; then
620 AC_MSG_ERROR([GTK+ peers requested but no X library available])
622 dnl Check if we can link against the XTest library and set
623 dnl HAVE_XTEST accordingly.
624 AC_CHECK_LIB([Xtst], [XTestQueryExtension],
625 [AC_DEFINE(HAVE_XTEST, 1, [Define to 1 if you have libXtst.])[XTEST_LIBS="$XTEST_LIBS -X11 -lXtst"]],
630 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
631 PKG_CHECK_MODULES(FREETYPE2, freetype2)
632 PKG_CHECK_MODULES(PANGOFT2, pangoft2)
633 PKG_CHECK_MODULES(CAIRO, cairo >= 1.1.8)
634 dnl Check if we can link against the XRender library and set
635 dnl HAVE_XRENDER accordingly.
636 AC_CHECK_LIB([Xrender], [XRenderQueryExtension],
637 [AC_DEFINE(HAVE_XRENDER, 1, [Define to 1 if you have libXrender.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrender"]],
641 dnl Check if we can link against the XRandR library and set
642 dnl HAVE_XRANDR accordingly.
643 AC_CHECK_LIB([Xrandr], [XRRQueryExtension],
644 [AC_DEFINE(HAVE_XRANDR, 1, [Define to 1 if you have libXrandr.])[X_EXTRA_LIBS="$X_EXTRA_LIBS -lXrandr"]],
650 AC_SUBST(FREETYPE2_LIBS)
651 AC_SUBST(FREETYPE2_CFLAGS)
652 AC_SUBST(PANGOFT2_LIBS)
653 AC_SUBST(PANGOFT2_CFLAGS)
658 if test "x${COMPILE_GCONF_PEER}" = xyes; then
659 PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.6.0)
660 AC_SUBST(GCONF_CFLAGS)
662 dnl we also need gdk for locking
663 PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
666 dnl check if the config value was given form the command line,
667 dnl if not, overwrite the default if we have the gconf backend
669 USE_GCONF_PREFS_PEER=$enable_default_preferences_peer
670 if test "$USE_GCONF_PREFS_PEER" = ""; then
671 DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory
676 if test "x${COMPILE_GSTREAMER_PEER}" = xyes; then
681 PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED)
682 AC_SUBST(GSTREAMER_CFLAGS)
683 AC_SUBST(GSTREAMER_LIBS)
686 PKG_CHECK_MODULES(GSTREAMER_BASE,
687 gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED)
688 AC_SUBST(GSTREAMER_BASE_CFLAGS)
689 AC_SUBST(GSTREAMER_BASE_LIBS)
691 dnl gstreamer-plugin-base
692 PKG_CHECK_MODULES(GSTREAMER_PLUGINS_BASE,
693 gstreamer-plugins-base-$GST_MAJORMINOR >= $GST_REQUIRED)
694 AC_SUBST(GSTREAMER_PLUGINS_BASE_CFLAGS)
695 AC_SUBST(GSTREAMER_PLUGINS_BASE_LIBS)
697 GST_PLUGIN_LDFLAGS='-module -avoid-version -Wno-unused-parameter -no-undefined'
698 AC_SUBST(GST_PLUGIN_LDFLAGS)
700 PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.8)
704 dnl set the gstreamer based file reader, writer and mixer
705 GSTREAMER_FILE_READER=gnu.javax.sound.sampled.gstreamer.io.GstAudioFileReader
706 GSTREAMER_MIXER_PROVIDER=gnu.javax.sound.sampled.gstreamer.GStreamerMixerProvider
708 dnl add the gstreamer resources
709 AC_SUBST(GSTREAMER_FILE_READER)
710 AC_SUBST(GSTREAMER_MIXER_PROVIDER)
712 dnl Check for AWT related Qt4
713 if test "x${COMPILE_QT_PEER}" = xyes; then
714 PKG_CHECK_MODULES(QT, QtCore QtGui >= 4.1.0, HAVE_QT4="yes", HAVE_QT4="no")
715 if test "x$HAVE_QT4" = "xyes"; then
716 dnl Check needed because in some cases the QtGui includedir
717 dnl doesn't contain the subsystem dir.
718 QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir QtGui`
719 EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
720 AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
721 AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
722 AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
723 QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
724 AC_MSG_WARN([QWidget not found])))
725 AC_CHECK_PROG(MOC, [moc], [moc])
726 AC_CHECK_PROG(MOC4, [moc-qt4], [moc-qt4])
727 if test x"$MOC4" != x ; then
728 AC_MSG_NOTICE([Using $MOC4 as moc])
732 if test "x$HAVE_QT4" = "xno"; then
733 AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
736 AC_ARG_WITH([qt4dir],
737 [AS_HELP_STRING([--with-qt4dir=DIR],
738 [Qt4 installation directory used for OS-X.
739 For other systems use pkg-config.])],
742 if test x"$QT4DIR" = x ; then
743 AC_MSG_ERROR([*** No path for Qt4 --with-qt4dir option given])
745 AC_MSG_RESULT([QT4DIR... $QT4DIR])
746 AC_CHECK_PROG(MOC, [moc], [$QT4DIR/bin/moc], [], $QT4DIR/bin)
747 if test x"$MOC" = x; then
748 AC_MSG_ERROR([*** This is not the right Qt installation])
750 QT_CFLAGS="-F$QT4DIR/lib -I$QT4DIR/lib/QtCore.framework/Headers"
751 QT_CFLAGS="$QT_CFLAGS -I$QT4DIR/lib/QtGui.framework/Headers"
752 QT_LIBS="-Xlinker -F$QT4DIR/lib -Xlinker -framework -Xlinker QtCore"
753 QT_LIBS="$QT_LIBS -Xlinker -framework -Xlinker QtGui"
756 AC_MSG_ERROR([*** Please check PKG_CONFIG_PATH or the version
757 of your installed Qt4 installation.])
761 AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
765 dnl **********************************************************************
766 dnl Check for MSG_NOSIGNAL
767 dnl **********************************************************************
768 AC_MSG_CHECKING(for MSG_NOSIGNAL)
769 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = MSG_NOSIGNAL; ]])],[ AC_MSG_RESULT(yes)
770 AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
771 [Define this symbol if you have MSG_NOSIGNAL]) ],[ AC_MSG_RESULT(no)
773 dnl **********************************************************************
774 dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL)
775 dnl **********************************************************************
776 AC_MSG_CHECKING(for SO_NOSIGPIPE )
777 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = SO_NOSIGPIPE; ]])],[ AC_MSG_RESULT(yes)
778 AC_DEFINE(HAVE_SO_NOSIGPIPE, 1,
779 [Define this symbol if you have SO_NOSIGPIPE]) ],[ AC_MSG_RESULT(no)
781 dnl **********************************************************************
782 dnl Check for MSG_WAITALL
783 dnl **********************************************************************
784 AC_MSG_CHECKING(for MSG_WAITALL)
785 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[ int f = MSG_WAITALL; ]])],[ AC_MSG_RESULT(yes)
786 AC_DEFINE(HAVE_MSG_WAITALL, 1,
787 [Define this symbol if you have MSG_WAITALL]) ],[ AC_MSG_RESULT(no)
790 dnl Check for plugin support headers and libraries.
791 if test "x${COMPILE_PLUGIN}" = xyes; then
792 PKG_CHECK_MODULES(MOZILLA, mozilla-plugin libxul-unstable, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
793 if test "x${MOZILLA_FOUND}" = xno; then
794 PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
796 if test "x${MOZILLA_FOUND}" = xno; then
797 PKG_CHECK_MODULES(MOZILLA, firefox-plugin firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
799 if test "x${MOZILLA_FOUND}" = xno; then
800 PKG_CHECK_MODULES(MOZILLA, xulrunner-plugin xulrunner-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
802 if test "x${MOZILLA_FOUND}" = xno; then
803 PKG_CHECK_MODULES(MOZILLA, mozilla-firefox-plugin mozilla-firefox-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
805 if test "x${MOZILLA_FOUND}" = xno; then
806 PKG_CHECK_MODULES(MOZILLA, seamonkey-plugin seamonkey-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
808 if test "x${MOZILLA_FOUND}" = xno; then
809 PKG_CHECK_MODULES(MOZILLA, iceape-plugin iceape-xpcom, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
811 if test "x${MOZILLA_FOUND}" = xno; then
812 AC_MSG_ERROR([Couldn't find plugin support headers and libraries, try --disable-plugin])
815 PKG_CHECK_MODULES(GLIB, glib-2.0)
816 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gdk-pixbuf-2.0)
818 AC_SUBST(MOZILLA_CFLAGS)
819 AC_SUBST(MOZILLA_LIBS)
820 AC_SUBST(GLIB_CFLAGS)
825 AC_SUBST(PLUGIN_DIR, $HOME/.mozilla/plugins/)
828 dnl Check for GNU MP library and header file
829 dnl for GNU MP versions >= 4.2 use __gmpz_combit; otherwise look for
830 dnl __gmpz_mul_si for earlier versions (>= 3.1).
831 dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to
832 dnl change the name of the corresponding ac_ variable on lines 860...
833 AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package.
834 Equivalent to --with-gmp-include=PATH/include
835 plus --with-gmp-lib=PATH/lib])
836 AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files])
837 AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library])
839 if test "x$with_gmp" != x; then
842 gmplibs="-L$with_gmp/lib $gmplibs"
843 gmpinc="-I$with_gmp/include $gmpinc"
844 if test "x$with_gmp_include" != x; then
845 gmpinc="-I$with_gmp_include $gmpinc"
847 if test "x$with_gmp_lib" != x; then
848 gmplibs="-L$with_gmp_lib $gmplibs"
852 gmpinc="-I/usr/include"
855 if test "x${COMPILE_GMP}" = xyes; then
856 AC_MSG_CHECKING([for GMP directories])
857 if test "x$with_gmp" != x; then
858 gmplibs="-L$with_gmp/lib -lgmp"
859 gmpinc="-I$with_gmp/include"
860 if test "x$with_gmp_include" != x; then
861 gmpinc="-I$with_gmp_include $gmpinc"
863 if test "x$with_gmp_lib" != x; then
864 gmplibs="-L$with_gmp_lib $gmplibs"
869 gmpinc="-I/usr/include"
871 AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc])
872 AC_CHECK_LIB(gmp, __gmpz_mul_si,
873 [GMP_CFLAGS="$gmpinc"
874 GMP_LIBS="$gmplibs" ],
880 AC_CHECK_HEADERS([gmp.h])
887 if test "x${REGENERATE_JNI_HEADERS}" = xyes; then
891 dnl -----------------------------------------------------------
892 dnl Add the include files for the native abstraction layer.
893 dnl Used by AM_CPPFLAGS in the different modules.
894 dnl -----------------------------------------------------------
895 CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/jni/native-lib"
896 AC_SUBST(CLASSPATH_INCLUDES)
898 dnl -----------------------------------------------------------
899 if test "x${COMPILE_JNI}" = xyes; then
900 AC_MSG_CHECKING(jni_md.h support)
901 if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then
906 AC_MSG_WARN(no, using x86-linux-gnu)
908 ac_sources="include/jni_md-${target_cpu}-${target_os}.h"
909 ac_dests="include/jni_md.h"
910 while test -n "$ac_sources"; do
911 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
912 set $ac_sources; ac_source=$1; shift; ac_sources=$*
913 ac_config_links_1="$ac_config_links_1 $ac_dest:$ac_source"
915 AC_CONFIG_LINKS([$ac_config_links_1])
918 CLASSPATH_WITH_CLASSLIB
920 dnl -----------------------------------------------------------
921 dnl Initialize maintainer mode
922 dnl -----------------------------------------------------------
925 dnl -----------------------------------------------------------
926 dnl Enable debugging statements at compile time. By default
927 dnl these statements should be optimized out of the bytecode
928 dnl produced by an optimizing Java compiler and not hinder
929 dnl performance because debugging is turned off by default.
930 dnl -----------------------------------------------------------
931 AC_ARG_ENABLE([debug],
932 [AS_HELP_STRING(--enable-debug,enable runtime debugging code)],
933 [case "${enableval}" in
936 AC_DEFINE(DEBUG, 1, [Define to 1 if you want native library runtime debugging code enabled])
938 no) LIBDEBUG="false" ;;
939 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
944 dnl -----------------------------------------------------------
945 dnl Enable execution of all static initializer loadLibrary()
946 dnl calls at compile time. By default most people will not
947 dnl want to disable this, but some VMs (gcj) don't need or want
949 dnl -----------------------------------------------------------
950 AC_ARG_ENABLE([load-library],
951 [AS_HELP_STRING(--enable-load-library,enable to use JNI native methods [default=yes])],
952 [case "${enableval}" in
953 yes) INIT_LOAD_LIBRARY="true" ;;
954 no) INIT_LOAD_LIBRARY="false" ;;
955 *) AC_MSG_ERROR(bad value ${enableval} for --enable-load-library) ;;
957 [INIT_LOAD_LIBRARY="true"])
958 AC_SUBST(INIT_LOAD_LIBRARY)
961 dnl -----------------------------------------------------------
962 dnl Specify the jar file containing the Eclipse Java Compiler. If
963 dnl this option is not specified then the com.sun.tools.javac
964 dnl implementation will not be included in tools.zip.
965 dnl -----------------------------------------------------------
966 dnl GCJ LOCAL: default to $multi_basedir/ecj.jar
967 dnl In the default case where $multi_basedir/ecj.jar is found
968 dnl $(jardir)/ecj.jar will not expand properly in GNU Classpath's
969 dnl gnu/classpath/Configuration.java. That is OK though since libjava's
970 dnl gnu/classpath/Configuration.java overrides GNU Classpath's and
971 dnl ECJ_JAR_FILE will be properly expanded in libjava's
972 dnl gnu/classpath/natConfiguration.cc.
973 AC_ARG_WITH([ecj-jar],
974 [AS_HELP_STRING([--with-ecj-jar=ABS.PATH],
975 [specify jar file containing the Eclipse Java Compiler])],
977 [if test -f $multi_basedir/ecj.jar; then
978 ECJ_JAR='$(jardir)/ecj.jar'
982 dnl -----------------------------------------------------------
983 dnl Should the VM explicitly run class initialization subfunctions for
984 dnl java.lang.System? (default is false -- the subfunctions will be run
985 dnl automatically by the class initializer)
986 dnl -----------------------------------------------------------
987 AC_ARG_ENABLE([java-lang-system-explicit-initialization],
988 [AS_HELP_STRING(--enable-java-lang-system-explicit-initialization,will the VM explicitly invoke java.lang.System's static initialization methods [default=no])],
989 [case "${enableval}" in
990 yes|true) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="true" ;;
991 no|false) JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false" ;;
992 *) AC_MSG_ERROR(bad value ${enableval} for --enable-java-lang-system-explicit-initialization) ;;
994 [JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION="false"])
995 AC_SUBST(JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION)
998 dnl -----------------------------------------------------------
999 dnl avoiding automake complaints
1000 dnl -----------------------------------------------------------
1004 dnl -----------------------------------------------------------
1005 dnl This is probably useless.
1006 dnl -----------------------------------------------------------
1007 AC_PATH_PROG(MKDIR, mkdir)
1008 AC_PATH_PROG(CP, cp)
1009 AC_PATH_PROG(DATE, date)
1011 dnl -----------------------------------------------------------
1012 dnl According to the GNU coding guide, we shouldn't require find,
1013 dnl and zip, however GNU provides both so it should be okay
1014 dnl -----------------------------------------------------------
1015 AC_PATH_PROG(FIND, find)
1017 dnl -----------------------------------------------------------
1018 dnl Specify what to install (install only glibj.zip by default)
1019 dnl -----------------------------------------------------------
1020 CLASSPATH_WITH_GLIBJ
1022 dnl -----------------------------------------------------------
1023 dnl Enable API documentation generation (disabled by default)
1024 dnl -----------------------------------------------------------
1025 CLASSPATH_WITH_GJDOC
1027 dnl -----------------------------------------------------------
1028 dnl Whether to use jay to regenerate parsers.
1029 dnl -----------------------------------------------------------
1032 dnl -----------------------------------------------------------
1033 dnl This sets the build-time default, which can now be overridden
1034 dnl by setting the system property gnu.classpath.awt.gtk.portable.native.sync
1035 dnl to "true" or "false".
1036 dnl -----------------------------------------------------------
1037 AC_ARG_ENABLE([portable-native-sync],
1038 [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)],
1039 [case "${enableval}" in
1041 AC_DEFINE(PORTABLE_NATIVE_SYNC, 1, [Define if you want to synchronize VM threads portably by default; undef otherwise])
1045 AC_MSG_ERROR(bad value ${enableval} for --enable-portable-native-sync)
1050 AX_CREATE_STDINT_H([include/config-int.h])
1052 dnl -----------------------------------------------------------------------
1053 dnl Support for using a prebuilt class library
1054 dnl -----------------------------------------------------------------------
1055 AC_ARG_WITH([glibj_zip],
1056 AS_HELP_STRING([--with-glibj-zip=ABS.PATH],
1057 [use prebuilt glibj.zip class library]))
1059 case "$with_glibj_zip" in
1067 AC_MSG_ERROR([Please suply an absolute path to a prebuilt glibj.zip])
1071 PATH_TO_GLIBJ_ZIP=$with_glibj_zip
1075 AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
1076 AC_SUBST(PATH_TO_GLIBJ_ZIP)
1078 if test "x${TOOLSDIR}" != x; then
1080 if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then
1084 if test "x${COMPILE_GJDOC}" = xyes; then
1087 if test "x${REGENERATE_GJDOC_PARSER}" = xyes && test "x${enable_java_maintainer_mode}" = xyes; then
1089 AC_PROG_ANTLR(2,7,1)
1095 # Check for javac if we need to build either the class library,
1096 # the examples or the tools
1097 if test "x${use_glibj_zip}" = xfalse || \
1098 test "x${EXAMPLESDIR}" != x || \
1099 test "x${TOOLSDIR}" != x && \
1100 test "x${build_class_files}" != xno && \
1101 test "${enable_java_maintainer_mode}" = yes; then dnl GCJ_LOCAL
1103 CLASSPATH_JAVAC_MEM_CHECK
1105 AM_CONDITIONAL(GCJ_JAVAC, false)
1108 dnl -----------------------------------------------------------
1109 dnl Build with Escher based X peers.
1110 dnl -----------------------------------------------------------
1111 AC_ARG_WITH([escher],
1112 AS_HELP_STRING([--with-escher=ABS.PATH],
1113 [specify path to escher dir or JAR for X peers]))
1114 case "$with_escher" in
1122 AC_MSG_ERROR([Please supply an absolute path to Escher library])
1126 PATH_TO_ESCHER=$with_escher
1130 AM_CONDITIONAL(USE_ESCHER, test x$use_escher = xtrue)
1131 AC_SUBST(PATH_TO_ESCHER)
1133 dnl -----------------------------------------------------------
1134 dnl Check if local socket support should be included.
1135 dnl -----------------------------------------------------------
1136 AC_ARG_ENABLE([local-sockets],
1137 [AS_HELP_STRING(--enable-local-sockets,enables local (AF_LOCAL) socket API [default: no])],
1138 [case "${enableval}" in
1140 ENABLE_LOCAL_SOCKETS=yes
1143 ENABLE_LOCAL_SOCKETS=no
1147 if test "x$ENABLE_LOCAL_SOCKETS" = "xyes"
1149 AC_CHECK_HEADER([sys/un.h])
1150 AC_CHECK_FUNCS([read write bind listen accept shutdown], [],
1151 AC_MSG_ERROR([networking support not available]))
1152 AC_DEFINE(ENABLE_LOCAL_SOCKETS, [1], [Define to enable support for local sockets.])
1154 AM_CONDITIONAL(ENABLE_LOCAL_SOCKETS, test "x$ENABLE_LOCAL_SOCKETS" = "xyes")
1156 dnl -----------------------------------------------------------
1157 dnl Add the default preference peer
1158 dnl -----------------------------------------------------------
1159 AC_SUBST(DEFAULT_PREFS_PEER)
1161 dnl -----------------------------------------------------------
1162 dnl Set GNU MP related params
1163 dnl -----------------------------------------------------------
1164 WANT_NATIVE_BIG_INTEGER=false
1165 if test "x${COMPILE_GMP}" = xyes; then
1166 if test "x${ac_cv_lib_gmp___gmpz_mul_si}" = xyes; then
1167 if test "x${ac_cv_header_gmp_h}" = xyes; then
1168 WANT_NATIVE_BIG_INTEGER=true
1169 AC_DEFINE(WITH_GNU_MP, 1, [Define to 1 if gmp is usable])
1177 AC_SUBST(WANT_NATIVE_BIG_INTEGER)
1178 AM_CONDITIONAL(CREATE_GMPBI_LIBRARY, test "x${COMPILE_GMP}" = xyes)
1180 dnl -----------------------------------------------------------
1182 dnl -----------------------------------------------------------
1183 AC_CONFIG_FILES([Makefile
1187 external/sax/Makefile
1188 external/w3c_dom/Makefile
1189 external/relaxngDatatype/Makefile
1190 external/jsr166/Makefile
1191 gnu/classpath/Configuration.java
1192 gnu/java/security/Configuration.java
1195 native/fdlibm/Makefile
1196 native/jawt/Makefile
1198 native/jni/classpath/Makefile
1199 native/jni/java-io/Makefile
1200 native/jni/java-lang/Makefile
1201 native/jni/java-math/Makefile
1202 native/jni/java-net/Makefile
1203 native/jni/java-nio/Makefile
1204 native/jni/java-util/Makefile
1205 native/jni/gtk-peer/Makefile
1206 native/jni/gconf-peer/Makefile
1207 native/jni/gstreamer-peer/Makefile
1208 native/jni/qt-peer/Makefile
1209 native/jni/xmlj/Makefile
1210 native/jni/midi-alsa/Makefile
1211 native/jni/midi-dssi/Makefile
1212 native/jni/native-lib/Makefile
1213 native/plugin/Makefile
1215 resource/META-INF/services/java.util.prefs.PreferencesFactory
1216 resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader
1217 resource/META-INF/services/javax.sound.sampled.spi.MixerProvider
1219 scripts/classpath.spec
1221 lib/gen-classlist.sh
1222 lib/copy-vmresources.sh
1223 scripts/check_jni_methods.sh
1226 examples/Makefile.jawt
1227 examples/Makefile.java2d])
1229 CLASSPATH_COND_IF([CREATE_WRAPPERS], [test "x${COMPILE_WRAPPERS}" = xyes], [],
1230 [AC_CONFIG_FILES([tools/gappletviewer
1243 AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
1244 AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
1245 AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
1246 AC_CONFIG_COMMANDS([gjar],[chmod 755 tools/gjar])
1247 AC_CONFIG_COMMANDS([gnative2ascii],[chmod 755 tools/gnative2ascii])
1248 AC_CONFIG_COMMANDS([gserialver],[chmod 755 tools/gserialver])
1249 AC_CONFIG_COMMANDS([grmiregistry],[chmod 755 tools/grmiregistry])
1250 AC_CONFIG_COMMANDS([gtnameserv],[chmod 755 tools/gtnameserv])
1251 AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd])
1252 AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid])
1253 AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic])
1254 AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah])
1257 if test "x${COMPILE_GJDOC}" = xyes
1259 AC_CONFIG_FILES([tools/gjdoc])
1260 AC_CONFIG_COMMANDS([gjdoc], [chmod 755 tools/gjdoc])
1263 AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
1264 AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh])
1267 # Create standard.omit based on decisions we just made.
1268 cat ${srcdir}/lib/standard.omit.in > lib/standard.omit
1269 if test x$use_escher != xtrue; then
1270 echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
1273 if test "x${COMPILE_PLUGIN}" = "xyes" ; then
1274 AC_MSG_WARN([You have enabled the browser plugin. Please note that this is no longer maintained as part of GNU Classpath; development has moved to the IcedTea project.])