OSDN Git Service

PR libgcj/12001:
[pf3gnuchains/gcc-fork.git] / libjava / configure.in
index 416fb3d..134fe1e 100644 (file)
@@ -80,12 +80,43 @@ dnl Currently works only for Linux X86/ia64
 dnl Typically faster and more space-efficient
 AC_ARG_ENABLE(hash-synchronization,
 [  --enable-hash-synchronization
-                          Use global hash table for monitor locks])
+                          use global hash table for monitor locks])
 
 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,
+[  --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)
+
+# What is the native OS API for MinGW?
+AC_ARG_WITH(win32-nlsapi,
+changequote(<<,>>)dnl
+<<  --with-win32-nlsapi=ansi, unicows or unicode
+                          native MinGW libgcj Win32 OS API [ansi]>>,
+changequote([,])
+[case "${withval}" in
+  ansi) with_win32_nlsapi=ansi ;;
+  unicows) with_win32_nlsapi=unicows ;;
+  unicode) with_win32_nlsapi=unicode ;;
+  *) AC_MSG_ERROR(Bad value ${withval} for --with-win32-nlsapi.) ;;
+esac],[with_win32_nlsapi=ansi])
+
+case "${with_win32_nlsapi}" in
+  unicows | unicode) 
+    AC_DEFINE(MINGW_LIBGCJ_UNICODE, 1,
+      [Define if MinGW libgcj uses the Windows UNICODE OS API.])
+    ;;
+esac
+
 dnl configure.host sets slow_pthread_self if the synchronization code should 
 dnl try to avoid pthread_self calls by caching thread IDs in a hashtable.
 if test "${slow_pthread_self}" = "yes"; then
@@ -221,6 +252,9 @@ AC_ARG_WITH(ecos,
 TARGET_ECOS="$with_ecos"
 )
 
+EXTRA_CC_FILES=
+AC_SUBST(EXTRA_CC_FILES)
+
 PLATFORMOBJS=
 case "$TARGET_ECOS" in
    no) case "$host" in
@@ -285,15 +319,23 @@ test -d java/net || mkdir java/net
 AC_LINK_FILES(java/net/natInetAddress${PLATFORMNET}.cc, java/net/natInetAddress.cc)
 AC_LINK_FILES(java/net/natNetworkInterface${PLATFORMNET}.cc, java/net/natNetworkInterface.cc)
 
-dnl Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.ca.c
+dnl Likewise for natPlainSocketImpl.cc and natPlainDatagramSocketImpl.cc.
 test -d gnu/java || mkdir gnu/java
 test -d gnu/java/net || mkdir gnu/java/net
 AC_LINK_FILES(gnu/java/net/natPlainSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainSocketImpl.cc)
 AC_LINK_FILES(gnu/java/net/natPlainDatagramSocketImpl${PLATFORMNET}.cc, gnu/java/net/natPlainDatagramSocketImpl.cc)
 
+dnl Likewise for natPipeImpl.cc and natSelectorImpl.cc.
+test -d gnu/java/nio || mkdir gnu/java/nio
+AC_LINK_FILES(gnu/java/nio/natPipeImpl${PLATFORM}.cc, gnu/java/nio/natPipeImpl.cc)
+AC_LINK_FILES(gnu/java/nio/natSelectorImpl${PLATFORM}.cc, gnu/java/nio/natSelectorImpl.cc)
+
 case "${host}" in
     *mingw*)
       SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
+      if test "${with_win32_nlsapi}" = "unicows"; then
+        SYSTEMSPEC="-lunicows $SYSTEMSPEC"
+      fi
     ;;
     *)
       SYSTEMSPEC=
@@ -363,6 +405,18 @@ done
 AM_CONDITIONAL(XLIB_AWT, test "$use_xlib_awt" = yes)
 AM_CONDITIONAL(GTK_AWT, test "$use_gtk_awt" = yes)
 
+dnl determine whether to enable the cairo GTK Graphics2D backend
+AC_ARG_ENABLE(gtk-cairo, [  --enable-gtk-cairo       build the cairo Graphics2D implementation on GTK])
+AM_CONDITIONAL(GTK_CAIRO, test "x${enable_gtk_cairo}" = xyes)
+if test "x${enable_gtk_cairo}" = xyes
+then
+       PKG_CHECK_MODULES(CAIRO, cairo)
+       PKG_CHECK_MODULES(PANGOFT2, pangoft2)
+fi
+AC_SUBST(CAIRO_LIBS)
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(PANGOFT2_LIBS)
+AC_SUBST(PANGOFT2_CFLAGS)
 
 dnl FIXME: this should be _libs on some hosts.
 libsubdir=.libs
@@ -566,6 +620,7 @@ if test "x${with_newlib}" = "xyes"; then
    AC_DEFINE(HAVE_TIME, 1, [Define if you have time.])
    AC_DEFINE(HAVE_GMTIME_R, 1, [Define if you have the 'gmtime_r' function])
    AC_DEFINE(HAVE_LOCALTIME_R, 1, [Define if you have the 'localtime_r' function.])
+   AC_DEFINE(HAVE_USLEEP_DECL, 1, [Define if usleep is declared in <unistd.h>.])
    dnl This is only for POSIX threads.
    AC_DEFINE(HAVE_PTHREAD_MUTEXATTR_INIT, 1, [Define if using POSIX threads that have the mutexattr functions.])
    dnl We also assume we are using gcc, which provides alloca.
@@ -588,6 +643,13 @@ else
        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
+         EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc"
+         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.])
@@ -604,7 +666,13 @@ else
    ])
 
    AC_CHECK_LIB(dl, dladdr, [
-     AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])])
+     if test "x${disable_dladdr}" = "xyes"; then
+       #Broken dladdr().
+       true
+     else
+       AC_DEFINE(HAVE_DLADDR, 1, [Define if you have dladdr()])
+     fi
+   ])
    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])])
@@ -807,8 +875,8 @@ else
 
    # Test for Gtk stuff, if asked for.
    if test "$use_gtk_awt" = yes; then
-      AM_PATH_GTK_2_0(2.0.0,,exit 1)
-      AM_PATH_GLIB_2_0(2.0.0,,exit 1,gthread)
+      AM_PATH_GTK_2_0(2.2.0,,exit 1)
+      AM_PATH_GLIB_2_0(2.2.0,,exit 1,gthread)
       dnl XXX Fix me when libart.m4 has the compile test fixed!
       enable_libarttest=no
       AM_PATH_LIBART(2.1.0,,exit 1)
@@ -1095,6 +1163,9 @@ case "${host}" in
  *mingw*)
     SIGNAL_HANDLER=include/win32-signal.h
     ;;
+ mips*-*-linux*)
+    SIGNAL_HANDLER=include/mips-signal.h
+    ;;
  *)
     SIGNAL_HANDLER=include/default-signal.h
     ;;