summaryrefslogtreecommitdiff
path: root/libjava/classpath/configure.ac
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-09 19:58:05 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-09 19:58:05 +0000
commit65bf3316cf384588453604be6b4f0ed3751a8b0f (patch)
tree996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/configure.ac
parent8fc56618a84446beccd45b80381cdfe0e94050df (diff)
downloadgcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/configure.ac')
-rw-r--r--libjava/classpath/configure.ac154
1 files changed, 106 insertions, 48 deletions
diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac
index 193b1d5f988..83bab19d0a6 100644
--- a/libjava/classpath/configure.ac
+++ b/libjava/classpath/configure.ac
@@ -6,11 +6,18 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
-AC_INIT([GNU Classpath],[0.92],[classpath@gnu.org],[classpath])
+AC_INIT([GNU Classpath],[0.94-pre],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
AC_CANONICAL_TARGET
+dnl GCJ LOCAL
+AC_ARG_ENABLE(java-maintainer-mode,
+ AS_HELP_STRING([--enable-java-maintainer-mode],
+ [allow rebuilding of .class and .h files]))
+AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
+dnl END GCJ LOCAL
+
dnl -----------------------------------------------------------
dnl Fold all IA-32 CPU architectures into "x86"
dnl -----------------------------------------------------------
@@ -41,6 +48,9 @@ AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar])
AC_CONFIG_HEADERS([include/config.h])
AC_PREFIX_DEFAULT(/usr/local/classpath)
+dnl GCC LOCAL
+GCC_NO_EXECUTABLES
+
dnl -----------------------------------------------------------
dnl Enable collections.jar (disabled by default)
dnl -----------------------------------------------------------
@@ -85,13 +95,17 @@ AM_CONDITIONAL(CREATE_CORE_JNI_LIBRARIES, test "x${COMPILE_CORE_JNI}" = xyes)
dnl -----------------------------------------------------------
dnl Default Preference Backend
dnl -----------------------------------------------------------
-AC_ARG_ENABLE(default-preferences-peer,
- AS_HELP_STRING([--enable-default-preferences-peer],
- [fully qualified class name of default Preferences API Backend]))
-DEFAULT_PREFS_PEER=$enable_default_preferences_peer
-if test "$DEFAULT_PREFS_PEER" = ""; then
- DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory
-fi
+AC_ARG_ENABLE([default-preferences-peer],
+ [AS_HELP_STRING([--enable-default-preferences-peer@<:@=peer type or class name@:>@],
+ [specify one of: "gconf" [default] for a GConf based backend, "file" for a file based one, "memory" for a transient one, or a fully qualified class name implementing java.util.prefs.PreferencesFactory])],
+ [case "${enableval}" in
+ file) DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory ;;
+ gconf|yes|true) DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory ;;
+ memory) DEFAULT_PREFS_PEER=gnu.java.util.prefs.MemoryBasedFactory ;;
+ no|false) AC_MSG_ERROR(bad value '${enableval}' for --enable-default-preferences-peer) ;;
+ *) DEFAULT_PREFS_PEER=${enableval} ;;
+ esac],
+ [DEFAULT_PREFS_PEER=gnu.java.util.prefs.GConfBasedFactory])
dnl AC_SUBST(DEFAULT_PREFS_PEER)
dnl -----------------------------------------------------------
@@ -120,9 +134,9 @@ AC_ARG_ENABLE([Werror],
[case "${enableval}" in
yes) ENABLE_WERROR=yes ;;
no) ENABLE_WERROR=no ;;
- *) ENABLE_WERROR=no ;;
+ *) ENABLE_WERROR=default ;;
esac],
- [ENABLE_WERROR=no])
+ [ENABLE_WERROR=default])
dnl -----------------------------------------------------------
dnl Default AWT toolkit
@@ -222,24 +236,15 @@ AC_ARG_ENABLE([plugin],
AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes)
dnl -----------------------------------------------------------
-dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir. $libdir is
-dnl defined to the same value for all multilibs. We define toolexeclibdir
-dnl so that we can refer to the multilib installation directories from
-dnl classpath's build files.
-dnl -----------------------------------------------------------
-CLASSPATH_TOOLEXECLIBDIR
-
-dnl -----------------------------------------------------------
dnl Sets the native libraries installation dir
dnl -----------------------------------------------------------
-dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}
AC_ARG_WITH([native-libdir],
[AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
[
nativeexeclibdir=${withval}
],
[
- nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`
+ nativeexeclibdir='${libdir}/${PACKAGE}'
])
AC_SUBST(nativeexeclibdir)
@@ -292,7 +297,11 @@ dnl -----------------------------------------------------------
AC_ARG_ENABLE([tool-wrappers],
[AS_HELP_STRING(--enable-tool-wrappers,create tool wrapper binaries [default=no])],
[case x"${enableval}" in
- xyes) COMPILE_WRAPPERS=yes ;;
+ xyes)
+ COMPILE_WRAPPERS=yes;
+ AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
+ AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
+ ;;
xno) COMPILE_WRAPPERS=no ;;
x) COMPILE_WRAPPERS=yes ;;
*) COMPILE_WRAPPERS=yes ;;
@@ -306,13 +315,25 @@ AC_PROG_INSTALL
dnl -----------------------------------------------------------
dnl Checks for programs.
dnl -----------------------------------------------------------
-AC_PROG_CXX
+
dnl Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
dnl AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
+AC_PROG_CXX
+
+# Handle -Werror default case.
+if test "$ENABLE_WERROR" = default; then
+ case "$host_os" in
+ *linux*)
+ if test "$GCC" = yes; then
+ ENABLE_WERROR=yes
+ fi
+ ;;
+ esac
+fi
if test "x${COMPILE_COLLECTIONS}" = xyes; then
AC_PATH_PROG(PERL, [perl])
@@ -323,6 +344,8 @@ if test "x${COMPILE_COLLECTIONS}" = xyes; then
fi
if test "x${COMPILE_JNI}" = xyes; then
+ GCC_ATTRIBUTE_UNUSED
+
AC_HEADER_STDC
dnl Checking sizeof void * is needed for fdlibm to work properly on ppc64,
@@ -344,7 +367,9 @@ if test "x${COMPILE_JNI}" = xyes; then
crt_externs.h \
fcntl.h \
sys/mman.h \
- magic.h])
+ magic.h \
+ sys/event.h sys/epoll.h \
+ ifaddrs.h])
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
@@ -353,20 +378,29 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_CHECK_FUNCS([ftruncate fsync select \
gethostname socket strerror fork pipe execve open close \
- lseek fstat read write htonl memset htons connect \
+ lseek fstat read readv write writev htonl memset htons connect \
getsockname getpeername bind listen accept \
recvfrom send sendto setsockopt getsockopt time mktime \
- localtime_r \
+ gethostbyname_r localtime_r \
strerror_r \
fcntl \
mmap munmap mincore msync madvise getpagesize sysconf \
lstat readlink \
- ])
+ inet_aton inet_addr inet_pton \
+ getifaddrs kqueue kevent epoll_create \
+ readdir_r ])
LIBMAGIC=
AC_CHECK_LIB(magic, magic_open, LIBMAGIC=-lmagic)
AC_SUBST(LIBMAGIC)
+ AC_MSG_CHECKING([whether struct sockaddr_in6 is in netinet/in.h])
+ 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_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
@@ -401,17 +435,17 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl When using gcc we want warnings, lots of warnings :-)
if test "x${GCC}" = xyes; then
- dnl We want ISO C90 pedantic ansi, but with longlong (jlong) support
+ dnl We want ISO C90 ansi, but with longlong (jlong) support
dnl and modern POSIX and BSD C library functions/prototypes.
dnl Warning flags for (almost) everybody.
dnl Should probably be configurable
- WARNING_CFLAGS='-pedantic -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
+ WARNING_CFLAGS='-W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long'
AC_SUBST(WARNING_CFLAGS)
dnl Strict warning flags which not every module uses.
dnl Should probably be configurable.
- STRICT_WARNING_CFLAGS=-Wstrict-prototypes
+ STRICT_WARNING_CFLAGS='-Wstrict-prototypes -pedantic'
AC_SUBST(STRICT_WARNING_CFLAGS)
dnl Whether or not to add -Werror, also not used by all modueles.
@@ -538,6 +572,28 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_SUBST(QT_CFLAGS)
AC_SUBST(QT_LIBS)
fi
+ dnl **********************************************************************
+ dnl Check for MSG_NOSIGNAL
+ dnl **********************************************************************
+ AC_MSG_CHECKING(for MSG_NOSIGNAL)
+ AC_TRY_COMPILE([#include <sys/socket.h>],
+ [ int f = MSG_NOSIGNAL; ],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,
+ [Define this symbol if you have MSG_NOSIGNAL]) ],
+ [ AC_MSG_RESULT(no)]
+ )
+ dnl **********************************************************************
+ dnl Check for SO_NOSIGPIPE (Darwin equivalent for MSG_NOSIGNAL)
+ dnl **********************************************************************
+ AC_MSG_CHECKING(for SO_NOSIGPIPE )
+ AC_TRY_COMPILE([#include <sys/socket.h>],
+ [ int f = SO_NOSIGPIPE; ],
+ [ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SO_NOSIGPIPE, 1,
+ [Define this symbol if you have SO_NOSIGPIPE]) ],
+ [ AC_MSG_RESULT(no)]
+ )
dnl Check for plugin support headers and libraries.
if test "x${COMPILE_PLUGIN}" = xyes; then
@@ -551,6 +607,9 @@ if test "x${COMPILE_JNI}" = xyes; then
if test "x${MOZILLA_FOUND}" = xno; then
PKG_CHECK_MODULES(MOZILLA, mozilla-firefox-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
fi
+ if test "x${MOZILLA_FOUND}" = xno; then
+ PKG_CHECK_MODULES(MOZILLA, seamonkey-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no])
+ fi
PKG_CHECK_MODULES(GLIB, glib-2.0)
AC_SUBST(MOZILLA_CFLAGS)
@@ -568,7 +627,7 @@ dnl -----------------------------------------------------------
dnl Add the include files for the native abstraction layer.
dnl Used by AM_CPPFLAGS in the different modules.
dnl -----------------------------------------------------------
-CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic"
+CLASSPATH_INCLUDES="-I\$(top_srcdir)/include -I\$(top_srcdir)/native/jni/classpath -I\$(top_srcdir)/native/jni/native-lib"
AC_SUBST(CLASSPATH_INCLUDES)
dnl -----------------------------------------------------------
@@ -746,13 +805,13 @@ case "$with_escher" in
use_escher=false
;;
"yes")
- AC_MSG_ERROR([Please suply an absolute path to Escher library])
+ AC_MSG_ERROR([Please supply an absolute path to Escher library])
;;
*)
use_escher=true
PATH_TO_ESCHER=$with_escher
;;
-esac;
+esac
AM_CONDITIONAL(USE_ESCHER, test x$use_escher = xtrue)
AC_SUBST(PATH_TO_ESCHER)
@@ -795,6 +854,7 @@ external/Makefile
external/sax/Makefile
external/w3c_dom/Makefile
external/relaxngDatatype/Makefile
+external/jsr166/Makefile
gnu/classpath/Configuration.java
gnu/java/security/Configuration.java
include/Makefile
@@ -814,10 +874,8 @@ native/jni/qt-peer/Makefile
native/jni/xmlj/Makefile
native/jni/midi-alsa/Makefile
native/jni/midi-dssi/Makefile
+native/jni/native-lib/Makefile
native/plugin/Makefile
-native/target/Makefile
-native/target/Linux/Makefile
-native/target/generic/Makefile
resource/Makefile
resource/META-INF/services/java.util.prefs.PreferencesFactory
scripts/Makefile
@@ -837,24 +895,25 @@ tools/gjarsigner
tools/gkeytool
tools/gjar
tools/gnative2ascii
-tools/gserialver])
+tools/gserialver
+tools/grmiregistry
+tools/gtnameserv
+tools/gorbd
+tools/grmid
+tools/grmic
+tools/gjavah])
AC_CONFIG_COMMANDS([gappletviewer],[chmod 755 tools/gappletviewer])
AC_CONFIG_COMMANDS([gjarsigner],[chmod 755 tools/gjarsigner])
AC_CONFIG_COMMANDS([gkeytool],[chmod 755 tools/gkeytool])
AC_CONFIG_COMMANDS([gjar],[chmod 755 tools/gjar])
AC_CONFIG_COMMANDS([gnative2ascii],[chmod 755 tools/gnative2ascii])
AC_CONFIG_COMMANDS([gserialver],[chmod 755 tools/gserialver])
-fi
-
-
-if test "x${COMPILE_WRAPPERS}" = xno
-then
-AC_CONFIG_FILES([tools/appletviewer
-tools/jarsigner
-tools/keytool])
-AC_CONFIG_COMMANDS([appletviewer],[chmod 755 tools/appletviewer])
-AC_CONFIG_COMMANDS([jarsigner],[chmod 755 tools/jarsigner])
-AC_CONFIG_COMMANDS([keytool],[chmod 755 tools/keytool])
+AC_CONFIG_COMMANDS([grmiregistry],[chmod 755 tools/grmiregistry])
+AC_CONFIG_COMMANDS([gtnameserv],[chmod 755 tools/gtnameserv])
+AC_CONFIG_COMMANDS([gorbd],[chmod 755 tools/gorbd])
+AC_CONFIG_COMMANDS([grmid],[chmod 755 tools/grmid])
+AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic])
+AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah])
fi
AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh])
@@ -866,4 +925,3 @@ cat ${srcdir}/lib/standard.omit.in > lib/standard.omit
if test x$use_escher != xtrue; then
echo gnu/java/awt/peer/x/.*java$ >> lib/standard.omit
fi
-