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],
AM_INIT_AUTOMAKE([1.9.0])
AC_CHECK_TOOL(AS, as)
+AC_CHECK_TOOL(LD, ld)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_PROGS(JAR, [jar fastjar], false)
+if test "$JAR" = false; then
+ AC_MSG_ERROR(jar program not found)
+fi
AC_PROG_INSTALL
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)
+
+# Only use libltdl for non-newlib builds.
+if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
+ AC_LTDL_SHLIBPATH
+fi
AC_CONFIG_HEADERS([include/config.h gcj/libgcj-config.h])
+# See if the user has requested runtime debugging.
+LIBGCJDEBUG="disable"
+AC_SUBST(LIBGCJDEBUG)
+AC_ARG_ENABLE(libgcj-debug,
+ AS_HELP_STRING([--enable-libgcj-debug],
+ [enable runtime debugging code]),
+ [if test "$enable_libgcj_debug" = yes; then
+ AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.])
+ LIBGCJDEBUG="enable"
+ fi])
+
+# Determine which AWT peer libraries to build
+AC_ARG_ENABLE(java-awt,
+ AS_HELP_STRING([--enable-java-awt],
+ [list of AWT peer implementations to be built]))
+
+peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
+use_xlib_awt=""
+use_gtk_awt=""
+use_qt_awt=""
+# The default toolkit to use is the first one specified.
+TOOLKIT=
+AC_SUBST(TOOLKIT)
+
+for peer in $peerlibs ; do
+ case $peer in
+ xlib)
+ if test "$no_x" = yes; then
+ echo "*** xlib peers requested but no X library available" 1>&2
+ exit 1
+ else
+ use_xlib_awt="yes"
+ if test -z "$TOOLKIT"; then
+ TOOLKIT=gnu.awt.xlib.XToolkit
+ fi
+ fi
+ ;;
+ gtk)
+ if test "$no_x" = yes; then
+ echo "*** gtk peers requested but no X library available" 1>&2
+ exit 1
+ else
+ use_gtk_awt=yes
+ if test -z "$TOOLKIT"; then
+ TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
+ fi
+ fi
+ ;;
+ qt)
+ if test "$no_x" = yes; then
+ # Perhaps we should admit the possibility of embedded Qt.
+ echo "*** Qt peers requested but no X library available" 1>&2
+ exit 1
+ else
+ use_qt_awt=yes
+ if test -z "$TOOLKIT"; then
+ TOOLKIT=gnu.java.awt.peer.qt.QtToolkit
+ fi
+ fi
+ ;;
+ no)
+ use_xlib_awt=
+ use_gtk_awt=
+ use_qt_awt=
+ break
+ ;;
+ *)
+ echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
+ exit 1
+ esac
+done
+
+AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
+AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
+AM_CONDITIONAL(QT_AWT, test "$use_qt_awt" = yes)
+
+# Create standard.omit based on decisions we just made.
+cp $srcdir/standard.omit.in standard.omit
+if test "$use_xlib_awt" != yes; then
+ echo gnu/awt/xlib >> standard.omit
+ echo gnu/gcj/xlib >> standard.omit
+fi
+if test "$use_gtk_awt" != yes; then
+ echo gnu/java/awt/peer/gtk >> standard.omit
+fi
+if test "$use_qt_awt" != yes; then
+ echo gnu/java/awt/peer/qt >> standard.omit
+fi
+
+if test -z "${with_multisubdir}"; then
+ builddotdot=.
+else
+ builddotdot=`echo ${with_multisubdir} | sed -e 's:[[^/]][[^/]]*:..:g'`
+fi
+
+NATIVE=yes
+
+# Which gcj do we use?
+which_gcj=default
+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.
+ NATIVE=no
+ cross_host_exeext=
+ case "${with_cross_host}" in
+ *mingw* | *cygwin*)
+ cross_host_exeext=.exe
+ ;;
+ esac
+ if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
+ if test x"$build_noncanonical" = x"$with_cross_host"; then
+ # Ordinary cross (host!=target and host=build)
+ which_gcj=built
+ else
+ # Canadian cross (host!=target and host!=build)
+ which_gcj=cross
+ fi
+ else
+ which_gcj=cross
+ fi
+else
+ # We are being configured with a native or crossed-native compiler
+ if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
+ if test x"$build" = x"$host"; then
+ # True native build (host=target and host=build)
+ which_gcj=built
+ else
+ # Crossed-native build (host=target and host!=build)
+ which_gcj=cross
+ fi
+ else
+ which_gcj=path
+ fi
+fi
+case "${which_gcj}" in
+ built)
+ GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
+ GCJH='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/gcc/gcjh'
+ ;;
+ cross)
+ if test "x${with_newlib}" = "xyes"; then
+ # FIXME (comment): Why is this needed?
+ GCC_UNWIND_INCLUDE=
+ GCJ="${target_noncanonical}-gcj"
+ else
+ GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
+ fi
+ GCJH='$(target_noncanonical)-gcjh'
+ ;;
+ path)
+ GCJ="gcj -B`${PWDCMD-pwd}`/"
+ GCJH=gcjh
+ ;;
+esac
+
+AC_SUBST(GCJH)
+
+# Create it, so that compile/link tests don't fail
+test -f libgcj.spec || touch libgcj.spec
+
+
+
+# Set up to configure Classpath.
+# FIXME: no supported way to pass args in autoconf.
+ac_configure_args="$ac_configure_args --disable-load-library"
+ac_configure_args="$ac_configure_args --${LIBGCJDEBUG}-debug"
+ac_configure_args="$ac_configure_args --enable-default-toolkit=$TOOLKIT"
+dir1=`cd $srcdir && pwd`
+dir2=`pwd`
+ac_configure_args="$ac_configure_args --with-vm-classes=$dir1:$dir2"
+ac_configure_args="$ac_configure_args --disable-core-jni"
+dnl FIXME?
+ac_configure_args="$ac_configure_args --disable-examples"
+ac_configure_args="$ac_configure_args --with-glibj=build"
+if test "$use_gtk_awt" != yes; then
+ ac_configure_args="$ac_configure_args --disable-gtk-peer"
+fi
+if test "$use_qt_awt" != yes; then
+ ac_configure_args="$ac_configure_args --disable-qt-peer"
+else
+ # We need this as qt is disabled by default in classpath.
+ ac_configure_args="$ac_configure_args --enable-qt-peer"
+fi
+dnl --with-gcj=$GCJ
+dnl --with-javah=$GCJH
+dnl gjdoc?
+dnl gtk-cairo -- just export here...
+dnl --enable-regen-headers?
+
# Only use libltdl for non-newlib builds.
if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
AC_LIBLTDL_CONVENIENCE
AC_PROG_LIBTOOL
AM_PROG_GCJ
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)
+AC_CONFIG_SUBDIRS(classpath libltdl)
# The -no-testsuite modules omit the test subdir.
AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
enable_hash_synchronization=$enable_hash_synchronization_default
fi
-# Do we allow intermodule optimizations (i.e. compiling many files at once)?
-AC_ARG_ENABLE(libgcj-multifile,
- AS_HELP_STRING([--enable-libgcj-multifile]
- [allow compilation of several files at once]),
-[case "${enableval}" in
- yes) enable_libgcj_multifile=yes ;;
- no) enable_libgcj_multifile=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libgcj-multifile) ;;
-esac],[enable_libgcj_multifile=no])
-AM_CONDITIONAL(ONESTEP, test "$enable_libgcj_multifile" = yes)
+AC_ARG_WITH(java-home,
+ AS_HELP_STRING([--with-java-home=DIRECTORY],
+ [value of java.home system property]),
+ [JAVA_HOME="${withval}"], [JAVA_HOME=""])
+AM_CONDITIONAL(JAVA_HOME_SET, test ! -z "$JAVA_HOME")
+AC_SUBST(JAVA_HOME)
# What is the native OS API for MinGW?
AC_ARG_WITH(win32-nlsapi,
[Define if if the synchronization code should try to avoid pthread_self calls by caching thread IDs in a hashtable.])
fi
-
-# See if the user has requested runtime debugging.
-LIBGCJDEBUG="false"
-AC_SUBST(LIBGCJDEBUG)
-AC_ARG_ENABLE(libgcj-debug,
- AS_HELP_STRING([--enable-libgcj-debug],
- [enable runtime debugging code]),
- [if test "$enable_libgcj_debug" = yes; then
- AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.])
- LIBGCJDEBUG="true"
- fi])
-
# Check for gc debugging. This option is handled both here and in the GC.
AC_ARG_ENABLE(gc-debug,
AS_HELP_STRING([--enable-gc-debug],
TARGET_ECOS="$with_ecos"
)
-supply_backtrace=no
-
PLATFORM_INNER_NAT_HDRS=
case "$TARGET_ECOS" in
no) case "$host" in
[Define if you have u_int32_t]))
AM_CONDITIONAL(USING_WIN32_PLATFORM, test "$PLATFORM" = Win32)
-AM_CONDITIONAL(USING_POSIX_PLATFORM, test "$PLATFORM" = Posix)
-AM_CONDITIONAL(USING_ECOS_PLATFORM, test "$PLATFORM" = Ecos)
+AM_CONDITIONAL(USING_POSIX_PLATFORM, test "$PLATFORM" = Posix || 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_CONFIG_LINKS(java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java)
AC_CONFIG_LINKS(java/lang/natConcreteProcess.cc:java/lang/nat${PLATFORM}Process.cc)
-# Likewise for natInetAddress.cc and natNetworkInterface.cc.
+# Likewise for natInetAddress.cc and natVMNetworkInterface.cc.
test -d java/net || mkdir java/net
AC_CONFIG_LINKS(java/net/natInetAddress.cc:java/net/natInetAddress${PLATFORMNET}.cc)
-AC_CONFIG_LINKS(java/net/natNetworkInterface.cc:java/net/natNetworkInterface${PLATFORMNET}.cc)
+AC_CONFIG_LINKS(java/net/natVMNetworkInterface.cc:java/net/natVMNetworkInterface${PLATFORMNET}.cc)
# Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
test -d gnu/java || mkdir gnu/java
AC_PATH_XTRA
-# Determine which AWT peer libraries to build
-AC_ARG_ENABLE(java-awt,
- AS_HELP_STRING([--enable-java-awt],
- [list of AWT peer implementations to be built]))
-
-peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
-use_xlib_awt=""
-use_gtk_awt=""
-# The default toolkit to use is the first one specified.
-TOOLKIT=
-AC_SUBST(TOOLKIT)
-
-for peer in $peerlibs ; do
- case $peer in
- xlib)
- if test "$no_x" = yes; then
- echo "*** xlib peers requested but no X library available" 1>&2
- exit 1
- else
- use_xlib_awt="yes"
- if test -z "$TOOLKIT"; then
- TOOLKIT=gnu.awt.xlib.XToolkit
- fi
- fi
- ;;
- gtk)
- if test "$no_x" = yes; then
- echo "*** xlib peers requested but no X library available" 1>&2
- exit 1
- else
- use_gtk_awt=yes
- if test -z "$TOOLKIT"; then
- TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
- fi
- test -d jniinclude || mkdir jniinclude
- fi
- ;;
- no)
- use_xlib_awt=
- use_gtk_awt=
- break
- ;;
- *)
- echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
- exit 1
- esac
-done
-
-AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
-AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
-
# determine whether to enable the cairo GTK Graphics2D backend
AC_ARG_ENABLE(gtk-cairo,
AS_HELP_STRING([--enable-gtk-cairo],
# FIXME: this should be _libs on some hosts.
libsubdir=.libs
+# extra LD Flags which are required for targets
+case "${host}" in
+*-*-darwin[[0-7]].*)
+ # For now we have to disable it on darwin[8-9] because it slows down
+ # the linking phase. A possible bug in ld?
+ # on Darwin -single_module speeds up loading of the dynamic libraries.
+ extra_ldflags_libjava=-Wl,-single_module
+ ;;
+esac
+AC_SUBST(extra_ldflags_libjava)
+
# Allow the GC to be disabled. Can be useful when debugging.
AC_MSG_CHECKING([for garbage collector to use])
AC_ARG_ENABLE(java-gc,
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
- # which support threads. However, it still does not support
- # -lpthread.
+ # FreeBSD >=5.3 implements a model much closer to other modern UNIX
+ # systems which support threads and -lpthread.
THREADLDFLAGS=-pthread
- THREADSPEC=-lc_r
+ THREADSPEC=-lpthread
;;
- alpha*-dec-osf*)
+ alpha*-dec-osf* | hppa*-hp-hpux*)
THREADCXXFLAGS=-pthread
# boehm-gc needs some functions from librt, so link that too.
THREADLIBS='-lpthread -lrt'
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)
+AC_CONFIG_LINKS(sysdep/descriptor.h:$descriptor_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 mmap])
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
- ia64-*-linux*)
- # Has broken backtrace()
- ;;
- mips*-*-linux*)
- # Has broken backtrace(), but we supply our own.
- if test -d sysdep; then true; else mkdir -p sysdep; fi
- supply_backtrace=yes
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- *)
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- esac
- ], [
- case "$host" in
- *mingw*)
- # Has backtrace() defined in libgcj itself
- AC_DEFINE(HAVE_BACKTRACE, 1,
- [Define if your platform has a working backtrace() function.])
- ;;
- esac
- ])
-
+ AC_CHECK_HEADERS(execinfo.h unistd.h dlfcn.h)
+ # Do an additional check on dld, HP-UX for example has dladdr in libdld.sl
AC_CHECK_LIB(dl, dladdr, [
- if test "x${disable_dladdr}" = "xyes"; then
- #Broken dladdr().
- true
- else
- AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])
- fi
- ])
+ AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])], [
+ AC_CHECK_LIB(dld, dladdr, [
+ AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])])
+
if test x"$build" = x"$host"; then
AC_CHECK_FILES(/proc/self/exe, [
AC_DEFINE(HAVE_PROC_SELF_EXE, 1, [Define if you have /proc/self/exe])])
AC_DEFINE(HAVE_SCHED_YIELD)
THREADLIBS="$THREADLIBS -lposix4"
THREADSPEC="$THREADSPEC -lposix4"])])])
+
+ AC_CHECK_LIB(rt, clock_gettime, [
+ AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])
+ case "$THREADSPEC" in
+ *-lrt*) ;;
+ *)
+ THREADSPEC="$THREADSPEC -lrt"
+ THREADLIBS="$THREADLIBS -lrt"
+ ;;
+ esac])
+
LIBS="$save_LIBS"
# We can save a little space at runtime if the mutex has m_count
if test "$memcpy_found" = no; then
AC_MSG_ERROR([memcpy is required])
fi
-
+ # Do an additional check on dld, HP-UX for example has dlopen in libdld.sl
AC_CHECK_LIB(dl, dlopen, [
- AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])
+ AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])], [
+ AC_CHECK_LIB(dld, dlopen, [
+ AC_DEFINE(HAVE_DLOPEN, 1, [Define if dlopen is available])])])
# Some library-finding code we stole from Tcl.
#--------------------------------------------------------------------
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
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
fi
fi
-AM_CONDITIONAL(SUPPLY_BACKTRACE, test "$supply_backtrace" = yes)
-
-if test -z "${with_multisubdir}"; then
- builddotdot=.
-else
- builddotdot=`echo ${with_multisubdir} | sed -e 's:[[^/]][[^/]]*:..:g'`
-fi
-
-NATIVE=yes
-# Which gcj do we use?
-which_gcj=default
-built_gcc_dir="`cd ${builddotdot}/../../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.
- NATIVE=no
- cross_host_exeext=
- case "${with_cross_host}" in
- *mingw* | *cygwin*)
- cross_host_exeext=.exe
- ;;
- esac
- if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
- if test x"$build_noncanonical" = x"$with_cross_host"; then
- # Ordinary cross (host!=target and host=build)
- which_gcj=built
- else
- # Canadian cross (host!=target and host!=build)
- which_gcj=cross
- fi
- else
- which_gcj=cross
- fi
-else
- # We are being configured with a native or crossed-native compiler
- if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
- if test x"$build" = x"$host"; then
- # True native build (host=target and host=build)
- which_gcj=built
- else
- # Crossed-native build (host=target and host!=build)
- which_gcj=cross
- fi
- else
- which_gcj=path
- fi
-fi
-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'
- ;;
- cross)
- if test "x${with_newlib}" = "xyes"; then
- # FIXME (comment): Why is this needed?
- GCC_UNWIND_INCLUDE=
- GCJ="${target_noncanonical}-gcj"
- else
- GCJ="${target_noncanonical}-gcj -B`${PWDCMD-pwd}`/"
- fi
- ZIP=jar
- GCJH='$(target_noncanonical)-gcjh'
- ;;
- path)
- 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'
- GCJH=gcjh
- ;;
+# Use a semicolon as CLASSPATH separator for MinGW, otherwise a colon.
+case $build in
+ *-mingw32) CLASSPATH_SEPARATOR=';' ;;
+ *) CLASSPATH_SEPARATOR=':' ;;
esac
-
-AC_SUBST(GCJH)
-AC_SUBST(ZIP)
-
-# Create it, so that compile/link tests don't fail
-test -f libgcj.spec || touch libgcj.spec
+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
if test ! -f gnu/classpath/Configuration.java; then
test -d gnu || mkdir gnu
test -d gnu/classpath || mkdir gnu/classpath
- sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
- -e 's,@TOOLKIT@,$TOOLKIT,' \
- < $srcdir/gnu/classpath/Configuration.java.in \
+ # Note that it is not crucial that all the values here be correct.
+ sed -e "s,@prefix@,$prefix," \
+ -e "s,@VERSION@,$VERSION," \
+ -e "s,@LIBDEBUG@,false," \
+ -e "s,@INIT_LOAD_LIBRARY@,false," \
+ -e "s,@@,$LIBGCJDEBUG," \
+ -e "s,@default_toolkit@,$TOOLKIT," \
+ -e "s,@JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@,false," \
+ -e "s,@GTK_CAIRO_ENABLED@,false," \
+ < $srcdir/classpath/gnu/classpath/Configuration.java.in \
> gnu/classpath/Configuration.java
# We do not want to redirect the output of the grep below to /dev/null,
# but we add /dev/null to the input list so that grep will print the
# filename of Configuration.java in case it finds any matches.
- if grep @ gnu/classpath/Configuration.java /dev/null; then
+ if grep '@.*@' gnu/classpath/Configuration.java /dev/null; then
AC_MSG_ERROR([configure.ac is missing the substitutions above])
fi
fi
LT_AC_PROG_GCJ
+# Now remove it.
+rm -f gnu/classpath/Configuration.java
+
CPPFLAGS=$GCJ_SAVE_CPPFLAGS
-AC_COMPILE_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(void *)
-AC_C_BIGENDIAN_CROSS
+AC_C_BIGENDIAN
ZLIBS=
SYS_ZLIBS=
AC_SUBST(DIVIDESPEC)
AC_SUBST(CHECKREFSPEC)
AC_SUBST(EXCEPTIONSPEC)
+AC_SUBST(BACKTRACESPEC)
AC_SUBST(IEEESPEC)
AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes)
# 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(toolexecmainlibdir)
AC_SUBST(toolexeclibdir)
+# Determine where the standard .db file is found.
+multi_os_directory=`$CC -print-multi-os-directory`
+case $multi_os_directory in
+ .) dbexecdir='$(libdir)/gcj-$(gcc_version)' ;; # Avoid /.
+ *) dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)' ;;
+esac
+AC_SUBST(dbexecdir)
+
# Determine gcj version number.
gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
GCJVERSION=$gcjversion
AC_SUBST(GCJVERSION)
AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+AC_DEFINE(JV_VERSION, "1.4.2", [Compatibility version string])
+AC_DEFINE(JV_API_VERSION, "1.4", [API compatibility version string])
+
+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])
[AC_MSG_RESULT(no)])])])
AC_FUNC_ALLOCA
-AC_FUNC_MMAP
AC_CHECK_PROGS(PERL, perl, false)
hppa*-*-linux*)
SIGNAL_HANDLER=include/pa-signal.h
;;
+ hppa*-hp-hpux*)
+ SIGNAL_HANDLER=include/hppa-signal.h
+ ;;
ia64-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
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
SIGNAL_HANDLER_AUX=
fi
-# Define here any compiler flags that you need in order to make backtrace() work.
-BACKTRACESPEC=
-case "${host}" in
- x86_64*-*-linux*|i?86-*)
- BACKTRACESPEC=-fno-omit-frame-pointer
- ;;
-esac
-AC_SUBST(BACKTRACESPEC)
-
AC_SUBST(SYSDEP_SOURCES)
if test -z "$SIGNAL_HANDLER_AUX"; then
multilib_arg=
fi
+# See if we support thread-local storage.
+GCC_CHECK_TLS
+# Check if linker supports static linking on a per library basis
+LD_START_STATIC_SPEC=
+LD_FINISH_STATIC_SPEC=
+if $LD --help 2>&1 | grep -q -e -call_shared ; then
+ if $LD --help 2>&1 | grep -q -e -non_shared ; then
+ LD_START_STATIC_SPEC='%{static-libgcj:-non_shared}'
+ LD_FINISH_STATIC_SPEC='%{static-libgcj:-call_shared}'
+ fi
+fi
+AC_SUBST(LD_START_STATIC_SPEC)
+AC_SUBST(LD_FINISH_STATIC_SPEC)
here=`${PWDCMD-pwd}`
AC_SUBST(here)
libgcj.pc
libgcj.spec
libgcj-test.spec
-gnu/classpath/Configuration.java
gcj/Makefile
include/Makefile
testsuite/Makefile
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
;;
esac
+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}