OSDN Git Service

* arm/ieee754-sf.S (floatdisf): Fix label definition in FPA
[pf3gnuchains/gcc-fork.git] / libjava / configure.ac
index e33884e..c453029 100644 (file)
@@ -134,9 +134,11 @@ libgcj_javaflags=
 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])
 
@@ -253,6 +255,15 @@ AC_ARG_ENABLE(libgcj-debug,
     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],
+                 [include full support for pointer backtracing etc.]),
+[ if test "$enable_gc_debug" = "yes"; then
+    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.
 AC_ARG_ENABLE(interpreter,
   AS_HELP_STRING([--enable-interpreter],
@@ -418,6 +429,12 @@ AM_CONDITIONAL(USING_WIN32_PLATFORM, test "$PLATFORM" = Win32)
 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,
@@ -602,7 +619,7 @@ case "$THREADS" in
  no | none | single)
     THREADS=none
     ;;
- posix | pthreads)
+ posix | posix95 | pthreads)
     THREADS=posix
     case "$host" in
      *-*-linux*)
@@ -643,7 +660,7 @@ case "$THREADS" in
        # 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
@@ -713,13 +730,11 @@ 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'
 
+TL_AC_GCC_VERSION([$srcdir/..])
+
 # 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
@@ -818,12 +833,12 @@ else
        AC_CACHE_CHECK([whether gethostbyname_r declaration requires -D_REENTRANT],
        [libjava_cv_gethostbyname_r_needs_reentrant],
        [ AC_LANG_PUSH(C++)
-         AC_TRY_COMPILE([#include <netdb.h>],
-           [gethostbyname_r("", 0, 0);],
+         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]],
+           [[gethostbyname_r("", 0, 0);]])],
            [libjava_cv_gethostbyname_r_needs_reentrant=no], [dnl
                CPPFLAGS_SAVE="$CPPFLAGS"
                CPPFLAGS="$CPPFLAGS -D_REENTRANT"
-               AC_TRY_COMPILE([#include <netdb.h>], [gethostbyname_r("", 0, 0);],
+               AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[gethostbyname_r("", 0, 0);]])],
                    [libjava_cv_gethostbyname_r_needs_reentrant=yes],
                    [libjava_cv_gethostbyname_r_needs_reentrant=fail])
                CPPFLAGS="$CPPFLAGS_SAVE"
@@ -838,11 +853,11 @@ else
 
      AC_CACHE_CHECK([for struct hostent_data],
        [libjava_cv_struct_hostent_data], [dnl
-       AC_TRY_COMPILE([
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
 # define _REENTRANT 1
 #endif
-#include <netdb.h>], [struct hostent_data data;],
+#include <netdb.h>]], [[struct hostent_data data;]])],
          [libjava_cv_struct_hostent_data=yes],
          [libjava_cv_struct_hostent_data=no])])
      if test "x$libjava_cv_struct_hostent_data" = xyes; then
@@ -903,13 +918,13 @@ else
 
       # We can save a little space at runtime if the mutex has m_count
       # or __m_count.  This is a nice hack for Linux.
-      AC_TRY_COMPILE([#include <pthread.h>], [
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
           extern pthread_mutex_t *mutex; int q = mutex->m_count;
-        ], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1,
+        ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE_M_COUNT, 1,
              [Define if pthread_mutex_t has m_count member.]), [
-       AC_TRY_COMPILE([#include <pthread.h>], [
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], [[
            extern pthread_mutex_t *mutex; int q = mutex->__m_count;
-         ], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1,
+         ]])], AC_DEFINE(PTHREAD_MUTEX_HAVE___M_COUNT, 1,
             [Define if pthread_mutex_t has __m_count member.]))])
    fi
 
@@ -1087,6 +1102,13 @@ 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
+    *-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
@@ -1115,6 +1137,8 @@ CPPFLAGS=$GCJ_SAVE_CPPFLAGS
 
 AC_COMPILE_CHECK_SIZEOF(void *)
 
+AC_C_BIGENDIAN_CROSS
+
 ZLIBS=
 SYS_ZLIBS=
 ZINCS=
@@ -1178,6 +1202,8 @@ GCJVERSION=$gcjversion
 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.
@@ -1194,50 +1220,50 @@ AC_HEADER_SYS_WAIT
 AC_CHECK_TYPE([ssize_t], [int])
 
 AC_MSG_CHECKING([for in_addr_t])
-AC_TRY_COMPILE([#include <sys/types.h>
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
 #if STDC_HEADERS
 #include <stdlib.h>
 #include <stddef.h>
 #endif
 #if HAVE_NETINET_IN_H
 #include <netinet/in.h>
-#endif], [in_addr_t foo;],
+#endif]], [[in_addr_t foo;]])],
   [AC_DEFINE(HAVE_IN_ADDR_T, 1,
      [Define to 1 if 'in_addr_t' is defined in sys/types.h or netinet/in.h.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([whether struct ip_mreq is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct ip_mreq mreq;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ip_mreq mreq;]])],
   [AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1,
      [Define if struct ip_mreq is defined in netinet/in.h.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([whether struct ipv6_mreq is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct ipv6_mreq mreq6;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct ipv6_mreq mreq6;]])],
   [AC_DEFINE(HAVE_STRUCT_IPV6_MREQ, 1,
      [Define if struct ipv6_mreq is defined in netinet/in.h.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
-AC_TRY_COMPILE([#include <netinet/in.h>], [struct sockaddr_in6 addr6;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]], [[struct sockaddr_in6 addr6;]])],
   [AC_DEFINE(HAVE_INET6, 1,
      [Define if inet6 structures are defined in netinet/in.h.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([for socklen_t in sys/socket.h])
-AC_TRY_COMPILE([#define _POSIX_PII_SOCKET
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _POSIX_PII_SOCKET
 #include <sys/types.h>
-#include <sys/socket.h>], [socklen_t x = 5;],
+#include <sys/socket.h>]], [[socklen_t x = 5;]])],
   [AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)])
 
 AC_MSG_CHECKING([for tm_gmtoff in struct tm])
-AC_TRY_COMPILE([#include <time.h>], [struct tm tim; tim.tm_gmtoff = 0;],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[struct tm tim; tim.tm_gmtoff = 0;]])],
   [AC_DEFINE(STRUCT_TM_HAS_GMTOFF, 1, [Define if struct tm has tm_gmtoff field.])
    AC_MSG_RESULT(yes)],
   [AC_MSG_RESULT(no)
@@ -1246,13 +1272,13 @@ AC_TRY_COMPILE([#include <time.h>], [struct tm tim; tim.tm_gmtoff = 0;],
    dnl when cross-compiling.  So instead we make an assumption that
    dnl the header file will mention timezone if it exists.
    dnl Don't find the win32 function timezone
-   AC_TRY_COMPILE([#include <time.h>], [void i(){long z2 = 2*timezone;}],
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[void i(){long z2 = 2*timezone;}]])],
      [AC_DEFINE(HAVE_TIMEZONE, 1, [Define if global 'timezone' exists.])
       AC_MSG_RESULT(yes)],
      [AC_MSG_RESULT(no)
        AC_MSG_CHECKING([for global _timezone variable])
        dnl FIXME: As above, don't want link check
-       AC_TRY_COMPILE([#include <time.h>], [long z2 = _timezone;],
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[long z2 = _timezone;]])],
          [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE, 1,
             [Define if your platform has the global _timezone variable.])
           AC_MSG_RESULT(yes)],
@@ -1299,8 +1325,8 @@ case "${host}" in
  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
@@ -1373,25 +1399,6 @@ case " $CONFIG_FILES " in
    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
 ],
 srcdir=${srcdir}
 host=${host}