AC_CONFIG_SRCDIR(java/lang/System.java)
+GCC_TOPLEV_SUBDIRS
+
# We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
AS_HELP_STRING([--with-target-subdir=SUBDIR],
LIBGCJ_CFLAGS="${libgcj_cflags}"
LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
+LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}"
AC_SUBST(LIBGCJ_CFLAGS)
AC_SUBST(LIBGCJ_CXXFLAGS)
AC_SUBST(LIBGCJ_JAVAFLAGS)
+AC_SUBST(LIBGCJ_LD_SYMBOLIC)
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
AM_PROG_CC_C_O
AC_CONFIG_SUBDIRS(libltdl)
-if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
- COMPPATH=.
-else
- COMPPATH=..
-fi
-AC_SUBST(COMPPATH)
-
# The -no-testsuite modules omit the test subdir.
AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
# Check for gc debugging. This option is handled both here and in the GC.
AC_ARG_ENABLE(gc-debug,
-[ --enable-gc-debug include full support for pointer backtracing etc.],
+ AS_HELP_STRING([--enable-gc-debug],
+ [include full support for pointer backtracing etc.]),
[ if test "$enable_gc_debug" = "yes"; then
- AC_DEFINE(LIBGCJ_GC_DEBUG)
+ AC_DEFINE(LIBGCJ_GC_DEBUG, 1,
+ [Define if we want to use debug calls into the garbage collector.])
fi])
# See if the user has the interpreter included.
AM_CONDITIONAL(USING_POSIX_PLATFORM, test "$PLATFORM" = Posix)
AM_CONDITIONAL(USING_ECOS_PLATFORM, test "$PLATFORM" = Ecos)
+case "$host" in
+ *-darwin*) DARWIN_CRT=true ;;
+ *) DARWIN_CRT=false ;;
+esac
+AM_CONDITIONAL(USING_DARWIN_CRT, $DARWIN_CRT)
+
# These may not be defined in a non-ANS conformant embedded system.
# FIXME: Should these case a runtime exception in that case?
AC_EGREP_HEADER(mktime, time.h, AC_DEFINE(HAVE_MKTIME, 1,
no | none | single)
THREADS=none
;;
- posix | pthreads)
+ posix | posix95 | pthreads)
THREADS=posix
case "$host" in
*-*-linux*)
# the command line. For now, the user must provide the -pthread
# switch to link code compiled with gcj. In future, consider adding
# support for weak references to pthread_* functions ala gthr.h API.
- THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
+ THREADSPEC='%{!pthread: %{!shared: %eUnder this configuration, the user must provide -pthread when linking.}}'
;;
*-*-freebsd*)
# FreeBSD 5 implements a model much closer to other modern UNIX
if test -d sysdep; then true; else mkdir sysdep; fi
AC_CONFIG_LINKS(sysdep/locks.h:sysdep/$sysdeps_dir/locks.h)
+AC_CONFIG_LINKS(sysdep/backtrace.h:$fallback_backtrace_h)
HASH_SYNC_SPEC=
# Hash synchronization is only useful with posix threads right now.
fi
AC_SUBST(HASH_SYNC_SPEC)
-
AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
# We're in the tree with gcc, and need to include some of its headers.
GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
-# Figure out where generated headers like libgcj-config.h get installed.
-gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^\"]]*\)\".*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([[^ ]]*\) .*/\1/'`
-tool_include_dir='$(libdir)/gcc/$(target_noncanonical)/'${gcc_version}/include
-AC_SUBST(tool_include_dir)
-AC_SUBST(gcc_version)
-
if test "x${with_newlib}" = "xyes"; then
# We are being configured with a cross compiler. AC_REPLACE_FUNCS
# may not work correctly, because the compiler may not be able to
AC_DEFINE(NO_GETUID, 1, [Define if getuid() and friends are missing.])
PLATFORMNET=NoNet
else
- AC_CHECK_FUNCS(strerror ioctl select fstat open fsync sleep opendir)
- AC_CHECK_FUNCS(gmtime_r localtime_r readdir_r getpwuid_r getcwd)
- AC_CHECK_FUNCS(access stat mkdir rename rmdir unlink realpath utime chmod)
- AC_CHECK_FUNCS(nl_langinfo setlocale)
+ AC_CHECK_FUNCS([strerror ioctl select fstat open fsync sleep opendir \
+ gmtime_r localtime_r readdir_r getpwuid_r getcwd \
+ access stat mkdir rename rmdir unlink realpath utime chmod \
+ nl_langinfo setlocale \
+ inet_pton uname inet_ntoa \
+ fork execvp pipe sigaction ftruncate])
AC_CHECK_FUNCS(inet_aton inet_addr, break)
- AC_CHECK_FUNCS(inet_pton uname inet_ntoa)
- AC_CHECK_FUNCS(fork execvp pipe sigaction ftruncate)
AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
AC_CHECK_FUNC(backtrace, [
case "$host" in
PKG_CHECK_MODULES(LIBART, libart-2.0 >= 2.1)
AC_SUBST(LIBART_CFLAGS)
AC_SUBST(LIBART_LIBS)
+
+ # We require the XTest Extension to support java.awt.Robot.
+ AC_CHECK_LIB([Xtst], [XTestQueryExtension], [true],
+ [AC_MSG_ERROR([libXtst not found, required by java.awt.Robot])],
+ [${X_LIBS}])
fi
# On Solaris, and maybe other architectures, the Boehm collector
# Which gcj do we use?
which_gcj=default
-built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
+built_gcc_dir="`cd ${builddotdot}/../../${host_subdir}/gcc && ${PWDCMD-pwd}`"
if test -n "${with_cross_host}"; then
# We are being configured with a cross compiler. We can't
# use ac_exeext, because that is for the target platform.
case "${which_gcj}" in
built)
GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
- GCJH='$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh'
- ZIP='$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
+ GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/fastjar/fastjar'
;;
cross)
if test "x${with_newlib}" = "xyes"; then
GCJ="gcj -B`${PWDCMD-pwd}`/"
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
- ZIP='$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
+ ZIP='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar'
GCJH=gcjh
;;
esac
# Create it, so that compile/link tests don't fail
test -f libgcj.spec || touch libgcj.spec
+# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
+case $build in
+ *-mingw32) CLASSPATH_SEPARATOR=';' ;;
+ *) CLASSPATH_SEPARATOR=':' ;;
+esac
+AC_SUBST(CLASSPATH_SEPARATOR)
+
# We must search the source tree for java.lang, since we still don't
# have libgcj.jar nor java/lang/*.class
GCJ_SAVE_CPPFLAGS=$CPPFLAGS
AC_COMPILE_CHECK_SIZEOF(void *)
+AC_C_BIGENDIAN_CROSS
+
ZLIBS=
SYS_ZLIBS=
ZINCS=
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
- includedir='${libdir}/gcc/${target_noncanonical}/'$gcc_version/include/
+ includedir='$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include/'
toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
- toolexecmainlibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+ toolexecmainlibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
toolexeclibdir=$toolexecmainlibdir
;;
no)
AC_SUBST(GCJVERSION)
AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+TL_AC_GXX_INCLUDE_DIR
+
# We check for sys/filio.h because Solaris 2.5 defines FIONREAD there.
# On that system, sys/ioctl.h will not include sys/filio.h unless
# BSD_COMP is defined; just including sys/filio.h is simpler.
-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 net/if.h pwd.h sys/config.h stdint.h langinfo.h locale.h)
# We avoid AC_HEADER_DIRENT since we really only care about dirent.h
# for now. If you change this, you also must update natFile.cc.
-AC_CHECK_HEADERS(dirent.h)
+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 net/if.h \
+ pwd.h sys/config.h stdint.h langinfo.h locale.h \
+ dirent.h])
AC_CHECK_HEADERS(inttypes.h, [
AC_DEFINE(HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
AC_DEFINE(JV_HAVE_INTTYPES_H, 1, [Define if <inttypes.h> is available])
sparc*-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
- sh-*-linux* | sh[[34]]*-*-linux*)
- SIGNAL_HANDLER=include/dwarf2-signal.h
+ sh*-*-linux*)
+ SIGNAL_HANDLER=include/sh-signal.h
;;
*mingw*)
SIGNAL_HANDLER=include/win32-signal.h
gcj/Makefile
include/Makefile
testsuite/Makefile
+external/Makefile
+external/sax/Makefile
+external/w3c_dom/Makefile
])
AC_CONFIG_COMMANDS([default],
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
;;
esac
-
-# Make subdirectories and `.d' files. Look in both srcdir and
-# builddir for the .java files.
-h=`${PWDCMD-pwd}`
-: > deps.mk
-( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
- find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
- fgrep -v testsuite | \
- sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
- while read f; do
- echo "include $f" >> deps.mk
- test -f $f || {
- d=`echo $f | sed -e 's,/[[^/]]*$,,'`
- if test ! -d $d; then
- $libgcj_basedir/../mkinstalldirs $d
- fi;
- echo > $f
- }
- done
+for ac_multi_file in $CONFIG_FILES; do
+ case $ac_multi_file in
+ */Makefile)
+ grep "^MULTI[[^ ]]* =" Makefile >> "$ac_multi_file" ;;
+ esac
+done
],
srcdir=${srcdir}
host=${host}