X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libjava%2Fconfigure.ac;h=1077b8dd8fc91ab569489603cc4063b47301ed9a;hp=2df1385c099ec0c3caa73ef11c86f3202fd04b52;hb=dcb3477d1edcb7925933d3a71ac59721f8b9e72e;hpb=3d123c5eff7c99e0d764f1bbc3c46fce67f28729 diff --git a/libjava/configure.ac b/libjava/configure.ac index 2df1385c099..1077b8dd8fc 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -113,8 +113,13 @@ AC_SUBST(LDFLAGS) 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 @@ -142,8 +147,203 @@ 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 @@ -162,7 +362,8 @@ AC_SUBST(DIRLTDL) AC_PROG_LIBTOOL AM_PROG_GCJ AM_PROG_CC_C_O -AC_CONFIG_SUBDIRS(libltdl) + +AC_CONFIG_SUBDIRS(classpath libltdl) # The -no-testsuite modules omit the test subdir. AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite) @@ -202,16 +403,12 @@ if test -z "$enable_hash_synchronization"; then 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, @@ -238,18 +435,6 @@ if test "${slow_pthread_self}" = "yes"; then [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], @@ -382,8 +567,6 @@ AC_ARG_WITH(ecos, TARGET_ECOS="$with_ecos" ) -supply_backtrace=no - PLATFORM_INNER_NAT_HDRS= case "$TARGET_ECOS" in no) case "$host" in @@ -421,8 +604,7 @@ AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [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 ;; @@ -449,10 +631,10 @@ test -d java/lang || mkdir java/lang 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 @@ -493,57 +675,6 @@ AC_SUBST(ZLIBTESTSPEC) 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], @@ -562,6 +693,17 @@ AC_SUBST(PANGOFT2_CFLAGS) # 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, @@ -658,11 +800,10 @@ case "$THREADS" in 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*) THREADCXXFLAGS=-pthread @@ -711,6 +852,7 @@ AM_CONDITIONAL(USING_NO_THREADS, test "$THREADS" = none) 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. @@ -756,41 +898,9 @@ else fork execvp pipe sigaction ftruncate]) AC_CHECK_FUNCS(inet_aton inet_addr, break) 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_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()])]) + 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])]) @@ -903,6 +1013,17 @@ else 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 @@ -1016,85 +1137,6 @@ else 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}/../../${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' - ZIP='$(top_builddir)/$(MULTIBUILDTOP)../../$(host_subdir)/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='$(top_builddir)/$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/fastjar' - GCJH=gcjh - ;; -esac - -AC_SUBST(GCJH) -AC_SUBST(ZIP) - -# 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 @@ -1113,25 +1155,35 @@ CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`" 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= @@ -1151,6 +1203,7 @@ AC_SUBST(ZINCS) AC_SUBST(DIVIDESPEC) AC_SUBST(CHECKREFSPEC) AC_SUBST(EXCEPTIONSPEC) +AC_SUBST(BACKTRACESPEC) AC_SUBST(IEEESPEC) AM_CONDITIONAL(NATIVE, test "$NATIVE" = yes) @@ -1190,12 +1243,23 @@ AC_SUBST(toolexecdir) 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. @@ -1282,7 +1346,31 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct tm tim; tim.t [AC_MSG_RESULT(no)])])]) AC_FUNC_ALLOCA -AC_FUNC_MMAP + +dnl Check for mmap() +# AC_FUNC_MMAP goes to far and checks for mmap fixed, we do only need mmap +# at a mmap selected address. See +# gnu/java/nio/channels/natFileChannelPosix.cc + +AC_MSG_CHECKING([for mmap]) +AC_CACHE_VAL(ac_cv_func_mmap_ok, + [AC_TRY_LINK( + changequote(<<, >>)dnl + << +#include +#include +#include +#include + >>, + changequote([, ])dnl + [mmap((void *)0, 0, PROT_READ, 0, 0, 0);], + ac_cv_func_mmap_ok=yes, + ac_cv_func_mmap_ok=no)] ) +AC_MSG_RESULT($ac_cv_func_mmap_ok) +if test $ac_cv_func_mmap_ok = yes +then + AC_DEFINE(HAVE_MMAP, 1, [ Define to 1 if you have a working `mmap' system call w/o fixed address ability.]) +fi AC_CHECK_PROGS(PERL, perl, false) @@ -1345,15 +1433,6 @@ if test "$enable_sjlj_exceptions" = yes; then 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 @@ -1369,7 +1448,20 @@ else 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) @@ -1382,13 +1474,9 @@ Makefile libgcj.pc libgcj.spec libgcj-test.spec -gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile -external/Makefile -external/sax/Makefile -external/w3c_dom/Makefile ]) AC_CONFIG_COMMANDS([default],