1 dnl Process this with autoconf to create configure
2 AC_INIT(java/lang/System.java)
4 dnl Can't be done in LIBGCJ_CONFIGURE because that confuses automake.
10 dnl We use these options to decide which functions to include.
11 AC_ARG_WITH(target-subdir,
12 [ --with-target-subdir=SUBDIR
13 configuring in a subdirectory])
14 AC_ARG_WITH(cross-host,
15 [ --with-cross-host=HOST configuring with a cross compiler])
19 AM_CONFIG_HEADER(include/config.h)
21 # Only use libltdl for native builds.
22 if test -z "${with_cross_host}"; then
23 AC_LIBLTDL_CONVENIENCE
27 # Sigh. Libtool's macro doesn't do the right thing.
28 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
34 AC_CONFIG_SUBDIRS($DIRLTDL)
36 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
43 dnl The -no-testsuite modules omit the test subdir.
44 AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
46 dnl See whether the user prefers size or speed for Character.
47 dnl The default is size.
48 AC_ARG_ENABLE(fast-character,
49 [ --enable-fast-character prefer speed over size for Character],
51 , AC_DEFINE(COMPACT_CHARACTER))
53 dnl Should the runtime set system properties by examining the
54 dnl environment variable GCJ_PROPERTIES?
55 AC_ARG_ENABLE(getenv-properties,
56 [ --disable-getenv-properties
57 don't set system properties from GCJ_PROPERTIES])
59 dnl Whether GCJ_PROPERTIES is used depends on the target.
60 if test -n "$enable_getenv_properties"; then
61 enable_getenv_properties=${enable_getenv_properties_default-yes}
63 if test "$enable_getenv_properties" = no; then
64 AC_DEFINE(DISABLE_GETENV_PROPERTIES)
67 dnl See if the user has requested runtime debugging.
70 AC_ARG_ENABLE(libgcj-debug,
71 [ --enable-libgcj-debug enable runtime debugging code],
72 if test "$enable_libgcj_debug" = yes; then
77 dnl See if the user has the interpreter included.
78 AC_ARG_ENABLE(interpreter,
79 [ --enable-interpreter enable interpreter],
80 if test "$enable_interpreter" = yes; then
81 # This can also be set in configure.host.
82 libgcj_interpreter=yes
83 elif test "$enable_interpreter" = no; then
87 if test "$libgcj_interpreter" = yes; then
88 AC_DEFINE(INTERPRETER)
92 dnl See if we should use setjmp/longjmp exceptions
93 AC_ARG_ENABLE(sjlj-exceptions,
94 [ --enable-sjlj-exceptions use setjmp/longjmp exceptions],
95 if test "$enable_sjlj_exceptions" = yes; then
96 # This can be set in configure.host.
100 if test "$libgcj_sjlj" = yes; then
101 EXCEPTIONSPEC="-fsjlj-exceptions"
102 AC_DEFINE(SJLJ_EXCEPTIONS)
105 AC_MSG_CHECKING([for data_start])
108 AC_TRY_LINK([extern int data_start;], [return ((int) &data_start);],
109 [AC_MSG_RESULT(found it)],
110 [LIBDATASTARTSPEC="-u data_start libgcjdata.a%s"
112 AC_MSG_RESULT(missing)])
113 AC_SUBST(LIBDATASTARTSPEC)
115 dnl See if the user wants to disable java.net. This is the mildly
116 dnl ugly way that we admit that target-side configuration sucks.
117 AC_ARG_ENABLE(java-net,
118 [ --disable-java-net disable java.net])
120 dnl Whether java.net is built by default can depend on the target.
121 if test -n "$enable_java_net"; then
122 enable_java_net=${enable_java_net_default-yes}
124 if test "$enable_java_net" = no; then
125 AC_DEFINE(DISABLE_JAVA_NET)
128 dnl See if the user wants to disable JVMPI support.
130 [ --disable-jvmpi disable JVMPI support])
132 if test "$enable_jvmpi" != no; then
133 AC_DEFINE(ENABLE_JVMPI)
136 dnl If the target is an eCos system, use the appropriate eCos
138 dnl FIXME: this should not be a local option but a global target
139 dnl system; at present there is no eCos target.
142 [ --with-ecos enable runtime eCos target support],
143 TARGET_ECOS="$with_ecos"
146 case "$TARGET_ECOS" in
148 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
149 PROCESS=${PROCESS-Posix}
152 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
158 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED))
159 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED))
160 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
161 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED))
164 dnl These may not be defined in a non-ANS conformant embedded system.
165 dnl FIXME: Should these case a runtime exception in that case?
166 AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME))
167 AC_EGREP_HEADER(localtime, time.h, AC_DEFINE(HAVE_LOCALTIME))
169 dnl Create the subdirectory for natFileDescriptor.cc, or the attempt
170 dnl to create the link will fail.
171 test -d java || mkdir java
172 test -d java/io || mkdir java/io
173 test -d gnu || mkdir gnu
174 AC_LINK_FILES(java/io/$FILE_DESCRIPTOR, java/io/natFileDescriptor.cc)
176 dnl Likewise for ConcreteProcess.java and natConcreteProcess.cc.
177 test -d java/lang || mkdir java/lang
178 AC_LINK_FILES(java/lang/${PROCESS}Process.java, java/lang/ConcreteProcess.java)
179 AC_LINK_FILES(java/lang/nat${PROCESS}Process.cc, java/lang/natConcreteProcess.cc)
184 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
185 AC_SUBST(LIBGCJTESTSPEC)
187 AC_ARG_WITH(system-zlib,
188 [ --with-system-zlib use installed libz])
192 AC_SUBST(ZLIBTESTSPEC)
194 dnl FIXME: this should be _libs on some hosts.
197 dnl Allow the GC to be disabled. Can be useful when debugging.
198 AC_MSG_CHECKING([for garbage collector to use])
199 AC_ARG_ENABLE(java-gc,
200 changequote(<<,>>)dnl
201 << --enable-java-gc=TYPE choose garbage collector [boehm]>>,
215 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
216 # We include the path to the boehm-gc build directory.
217 # See Makefile.am to understand why.
218 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
219 GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
221 JC1GCSPEC='-fuse-boehm-gc'
222 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
223 dnl We also want to pick up some cpp flags required when including
224 dnl boehm-config.h. Yuck.
225 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
228 dnl The POSIX thread support needs to know this.
229 AC_DEFINE(HAVE_BOEHM_GC)
237 AC_MSG_ERROR(unrecognized collector \"$GC\")
247 AC_LINK_FILES(include/$GCHDR, include/java-gc.h)
250 dnl Note that this code is kept in sync with similar code in gcc/configure.in.
251 dnl In particular both packages must make the same decision about which
252 dnl thread package to use.
253 AC_MSG_CHECKING([for threads package to use])
254 AC_ARG_ENABLE(threads, [ --enable-threads=TYPE choose threading package],
256 dnl FIXME: figure out native threads to use here.
259 if test "$THREADS" = yes; then
265 # FIXME: this isn't correct in all cases.
272 # FIXME: for now, choose POSIX, because we implement that.
273 # Later, choose irix threads.
277 # FIXME: for now, choose POSIX, because we implement that.
278 # Later, choose solaris threads.
296 AC_DEFINE(LINUX_THREADS)
300 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
301 AC_MSG_ERROR(thread package $THREADS not yet supported)
304 AC_MSG_ERROR($THREADS is an unknown thread package)
307 AC_MSG_RESULT($THREADS)
319 THREADOBJS=posix-threads.lo
320 THREADH=posix-threads.h
321 # MIT pthreads doesn't seem to have the mutexattr functions.
322 # But for now we don't check for it. We just assume you aren't
323 # using MIT pthreads.
324 AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT)
326 # If we're using the Boehm GC, then we happen to know that it
327 # defines _REENTRANT, so we don't bother. Eww.
328 if test "$GC" != boehm; then
329 AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
331 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Required define if using POSIX threads])
335 THREADOBJS=no-threads.lo
339 AC_LINK_FILES(include/$THREADH, include/java-threads.h)
346 AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
352 # Find eh-common.h and support headers. If we're in the tree with
353 # gcc, then look there. Otherwise look in compat-include. If all else
354 # fails, just hope the user has set things up somehow.
355 if test -r $srcdir/../gcc/eh-common.h; then
356 EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
358 if test -d $srcdir/../compat-include; then
359 EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
365 if test -n "${with_cross_host}"; then
366 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
367 # may not work correctly, because the compiler may not be able to
370 # We assume newlib. This lets us hard-code the functions we know
372 AC_DEFINE(HAVE_MEMMOVE)
373 AC_DEFINE(HAVE_MEMCPY)
374 AC_DEFINE(HAVE_STRERROR)
375 AC_DEFINE(HAVE_GMTIME_R)
376 AC_DEFINE(HAVE_LOCALTIME_R)
377 dnl This is only for POSIX threads.
378 AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT)
379 dnl We also assume we are using gcc, which provides alloca.
380 AC_DEFINE(HAVE_ALLOCA)
382 dnl Assume we do not have getuid and friends.
386 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
388 # If Canadian cross, then don't pick up tools from the build
390 if test "$build" != "$with_cross_host"; then
393 GCJ="${target_alias}-gcj"
399 AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep)
400 AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd)
401 AC_CHECK_FUNCS(access stat mkdir rename rmdir unlink realpath)
402 AC_CHECK_FUNCS(iconv nl_langinfo setlocale)
403 AC_CHECK_FUNCS(inet_aton inet_addr, break)
404 AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
405 AC_CHECK_FUNCS(backtrace fork execvp pipe)
406 AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
407 AC_CHECK_LIB(dl, dladdr, [
408 AC_DEFINE(HAVE_DLADDR)])
409 AC_CHECK_FILES(/proc/self/exe, [
410 AC_DEFINE(HAVE_PROC_SELF_EXE)])
412 AC_CHECK_FUNCS(gethostbyname_r, [
413 AC_DEFINE(HAVE_GETHOSTBYNAME_R)
414 # There are two different kinds of gethostbyname_r.
415 # We look for the one that returns `int'.
416 # Hopefully this check is robust enough.
417 AC_EGREP_HEADER(int.*gethostbyname_r, netdb.h, [
418 AC_DEFINE(GETHOSTBYNAME_R_RETURNS_INT)])
421 *" -D_REENTRANT "*) ;;
423 dnl On DU4.0, gethostbyname_r is only declared with -D_REENTRANT
424 AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
425 [libjava_cv_gethostbyname_r_needs_reentrant],
428 AC_TRY_COMPILE([#include <netdb.h>],
429 [gethostbyname_r("", 0, 0);],
430 [libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
431 CPPFLAGS_SAVE="$CPPFLAGS"
432 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
433 AC_TRY_COMPILE([#include <netdb.h>], [gethostbyname_r("", 0, 0);],
434 [libjava_cv_gethostbyname_r_needs_reentrant=yes],
435 [libjava_cv_gethostbyname_r_needs_reentrant=fail])
436 CPPFLAGS="$CPPFLAGS_SAVE"
440 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
441 AC_DEFINE(_REENTRANT, 1, [Required define if using POSIX threads])
446 AC_CACHE_CHECK([for struct hostent_data],
447 [libjava_cv_struct_hostent_data], [dnl
449 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
450 # define _REENTRANT 1
452 #include <netdb.h>], [struct hostent_data data;],
453 [libjava_cv_struct_hostent_data=yes],
454 [libjava_cv_struct_hostent_data=no])])
455 if test "x$libjava_cv_struct_hostent_data" = xyes; then
456 AC_DEFINE(HAVE_STRUCT_HOSTENT_DATA, 1,
457 [Define if struct hostent_data is defined in netdb.h])
461 AC_CHECK_FUNCS(gethostbyaddr_r, [
462 AC_DEFINE(HAVE_GETHOSTBYADDR_R)
463 # There are two different kinds of gethostbyaddr_r.
464 # We look for the one that returns `int'.
465 # Hopefully this check is robust enough.
466 AC_EGREP_HEADER(int.*gethostbyaddr_r, netdb.h, [
467 AC_DEFINE(GETHOSTBYADDR_R_RETURNS_INT)])])
469 AC_CHECK_FUNCS(gethostname, [
470 AC_DEFINE(HAVE_GETHOSTNAME)
471 AC_EGREP_HEADER(gethostname, unistd.h, [
472 AC_DEFINE(HAVE_GETHOSTNAME_DECL)])])
474 # Look for these functions in the thread library, but only bother
475 # if using POSIX threads.
476 if test "$THREADS" = posix; then
478 LIBS="$LIBS $THREADLIBS"
479 # Some POSIX thread systems don't have pthread_mutexattr_settype.
481 AC_CHECK_FUNCS(pthread_mutexattr_settype pthread_mutexattr_setkind_np)
483 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
484 # Solaris 7 the name librt is preferred.
485 AC_CHECK_FUNCS(sched_yield, , [
486 AC_CHECK_LIB(rt, sched_yield, [
487 AC_DEFINE(HAVE_SCHED_YIELD)
488 THREADLIBS="$THREADLIBS -lrt"
489 THREADSPEC="$THREADSPEC -lrt"], [
490 AC_CHECK_LIB(posix4, sched_yield, [
491 AC_DEFINE(HAVE_SCHED_YIELD)
492 THREADLIBS="$THREADLIBS -lposix4"
493 THREADSPEC="$THREADSPEC -lposix4"])])])
496 # We can save a little space at runtime if the mutex has m_count
497 # or __m_count. This is a nice hack for Linux.
498 AC_TRY_COMPILE([#include <pthread.h>], [
499 extern pthread_mutex_t *mutex; int q = mutex->m_count;
500 ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT), [
501 AC_TRY_COMPILE([#include <pthread.h>], [
502 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
503 ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT))])
506 # We require a way to get the time.
508 AC_CHECK_FUNCS(gettimeofday time ftime, time_found=yes)
509 if test "$time_found" = no; then
510 AC_MSG_ERROR([no function found to get the time])
513 AC_CHECK_FUNCS(memmove)
517 AC_CHECK_FUNCS(memcpy, memcpy_found=yes)
518 if test "$memcpy_found" = no; then
519 AC_MSG_ERROR([memcpy is required])
522 # Some library-finding code we stole from Tcl.
523 #--------------------------------------------------------------------
524 # Check for the existence of the -lsocket and -lnsl libraries.
525 # The order here is important, so that they end up in the right
526 # order in the command line generated by make. Here are some
527 # special considerations:
528 # 1. Use "connect" and "accept" to check for -lsocket, and
529 # "gethostbyname" to check for -lnsl.
530 # 2. Use each function name only once: can't redo a check because
531 # autoconf caches the results of the last check and won't redo it.
532 # 3. Use -lnsl and -lsocket only if they supply procedures that
533 # aren't already present in the normal libraries. This is because
534 # IRIX 5.2 has libraries, but they aren't needed and they're
535 # bogus: they goof up name resolution if used.
536 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
537 # To get around this problem, check for both libraries together
538 # if -lsocket doesn't work by itself.
539 #--------------------------------------------------------------------
541 AC_CACHE_CHECK([for socket libraries], gcj_cv_lib_sockets,
544 unset ac_cv_func_connect
545 AC_CHECK_FUNC(connect, gcj_checkSocket=0, gcj_checkSocket=1)
546 if test "$gcj_checkSocket" = 1; then
547 unset ac_cv_func_connect
548 AC_CHECK_LIB(socket, main, gcj_cv_lib_sockets="-lsocket",
551 if test "$gcj_checkBoth" = 1; then
553 LIBS="$LIBS -lsocket -lnsl"
554 unset ac_cv_func_accept
555 AC_CHECK_FUNC(accept,
557 gcj_cv_lib_sockets="-lsocket -lnsl"])
558 unset ac_cv_func_accept
561 unset ac_cv_func_gethostbyname
563 LIBS="$LIBS $gcj_cv_lib_sockets"
564 AC_CHECK_FUNC(gethostbyname, ,
565 [AC_CHECK_LIB(nsl, main,
566 [gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"])])
567 unset ac_cv_func_gethostbyname
570 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
572 if test "$with_system_zlib" = yes; then
573 AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=-lzgcj)
576 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
579 # On Solaris, and maybe other architectures, the Boehm collector
581 if test "$GC" = boehm; then
582 AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
585 if test -z "${with_multisubdir}"; then
589 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
592 if test -x "${builddotdot}/../../gcc/gcj"; then
593 dir="`cd ${builddotdot}/../../gcc && pwd`"
594 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
602 # Create it, so that compile/link tests don't fail
603 test -f libgcj.spec || touch libgcj.spec
607 dnl FIXME: cross compilation
608 AC_CHECK_SIZEOF(void *)
613 if test "x$ZLIBSPEC" = "x-lzgcj"; then
614 # We include the path to the zlib build directory.
615 # See Makefile.am to understand why.
616 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
617 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
618 ZINCS='-I$(top_srcdir)/../zlib'
626 AC_SUBST(EXCEPTIONSPEC)
628 AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
629 AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
630 AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes || test "$NULL_TARGET" = yes)
631 AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
632 AM_CONDITIONAL(NEEDS_DATA_START, test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes)
633 AC_SUBST(EH_COMMON_INCLUDE)
635 # Determine gcj version number.
637 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
639 AC_DEFINE_UNQUOTED(GCJVERSION, "$gcjvers")
641 AC_SUBST(AM_RUNTESTFLAGS)
643 dnl Work around a g++ bug. Reported to gcc-bugs@gcc.gnu.org on Jan 22, 2000.
644 AC_MSG_CHECKING([for g++ -ffloat-store bug])
645 save_CFLAGS="$CFLAGS"
646 CFLAGS="-x c++ -O2 -ffloat-store"
647 AC_TRY_COMPILE([#include <math.h>], ,
649 [AC_DEFINE(__NO_MATH_INLINES)
651 CFLAGS="$save_CFLAGS"
653 dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
654 dnl On that system, sys/ioctl.h will not include sys/filio.h unless
655 dnl BSD_COMP is defined; just including sys/filio.h is simpler.
656 AC_CHECK_HEADERS(unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h sys/config.h inttypes.h stdint.h langinfo.h locale.h)
657 dnl We avoid AC_HEADER_DIRENT since we really only care about dirent.h
658 dnl for now. If you change this, you also must update natFile.cc.
659 AC_CHECK_HEADERS(dirent.h)
661 AC_CHECK_TYPE([ssize_t], [int])
663 AC_MSG_CHECKING([for in_addr_t])
664 AC_TRY_COMPILE([#include <sys/types.h>
669 #if HAVE_NETINET_IN_H
670 #include <netinet/in.h>
671 #endif], [in_addr_t foo;],
672 [AC_DEFINE([HAVE_IN_ADDR_T])
676 AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h])
677 AC_TRY_COMPILE([#include <netinet/in.h>], [struct ip_mreq mreq;],
678 [AC_DEFINE(HAVE_STRUCT_IP_MREQ)
682 AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
683 AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
684 [AC_DEFINE(HAVE_INET6)
688 AC_MSG_CHECKING([for socklen_t in sys/socket.h])
689 AC_TRY_COMPILE([#include <sys/types.h>
690 #include <sys/socket.h>], [socklen_t x = 5;],
691 [AC_DEFINE(HAVE_SOCKLEN_T)
695 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
696 AC_TRY_COMPILE([#include <time.h>], [struct tm tim; tim.tm_gmtoff = 0;],
697 [AC_DEFINE(STRUCT_TM_HAS_GMTOFF)
700 AC_MSG_CHECKING([for global timezone variable])
701 dnl FIXME: we don't want a link check here because that won't work
702 dnl when cross-compiling. So instead we make an assumption that
703 dnl the header file will mention timezone if it exists.
704 AC_TRY_COMPILE([#include <time.h>], [long z2 = timezone;],
705 [AC_DEFINE(HAVE_TIMEZONE)
707 [AC_MSG_RESULT(no)])])
711 AC_CHECK_PROGS(PERL, perl, false)
717 SIGNAL_HANDLER=include/i386-signal.h
720 SIGNAL_HANDLER=include/sparc-signal.h
723 SYSDEP_SOURCES=sysdep/ia64.c
724 test -d sysdep || mkdir sysdep
727 SIGNAL_HANDLER=include/default-signal.h
731 # If we're using sjlj exceptions, forget what we just learned.
732 if test "$libgcj_sjlj" = yes; then
733 SIGNAL_HANDLER=include/default-signal.h
736 AC_SUBST(SYSDEP_SOURCES)
738 AC_LINK_FILES($SIGNAL_HANDLER, include/java-signal.h)
740 if test "${multilib}" = "yes"; then
741 multilib_arg="--enable-multilib"
748 dnl Determine which AWT peer libraries to build
749 AC_ARG_ENABLE(java-awt,
750 [ --enable-java-awt list of AWT peer implementations to be built])
752 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
756 for peer in $peerlibs ; do
759 if [test "$no_x" = yes]; then
760 echo "*** xlib peers requested but no X library available" 1>&2
770 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
775 AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
776 AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
783 AC_OUTPUT(Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile,
784 [if test -n "$CONFIG_FILES"; then
785 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
788 # Make subdirectories and `.d' files. Look in both srcdir and
789 # builddir for the .java files.
792 ( (cd $srcdir && find . -name '*.java' -print) ;
793 find . -name '*.java' -print) | \
794 fgrep -v testsuite | \
795 sed -e 's/\.java/.d/' | \
797 echo "include $f" >> deps.mk
800 d=`echo $f | sed -e 's,/[^/]*$,,'`
802 $srcdir/../mkinstalldirs $d
810 with_multisubdir=${with_multisubdir}
811 ac_configure_args="${multilib_arg} ${ac_configure_args}"
812 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
813 libgcj_basedir=${libgcj_basedir}