diff options
author | Michael Koch <konqueror@gmx.de> | 2004-04-08 20:04:11 +0000 |
---|---|---|
committer | Michael Koch <konqueror@gmx.de> | 2004-04-08 20:04:11 +0000 |
commit | 40de253a8b42b244b873a4ab776b29e74790286f (patch) | |
tree | 102a991cd52694a81f4f1e7adbb7a544ed84c5a7 /configure.ac | |
parent | c989d198d05e0949cc190568b042683b31b2cce5 (diff) | |
download | classpath-40de253a8b42b244b873a4ab776b29e74790286f.tar.gz |
2004-04-08 Michael Koch <konqueror@gmx.de>
* configure.ac: Added gnu/java/nio/channels/Makefile to output files.
* gnu/java/nio/Makefile.am: Added subdir channels.
* include/gnu_java_nio_channels_FileChannelImpl.h: New file.
* include/java_io_FileDescriptor.h,
include/java_nio_DirectByteBufferImpl.h: Updates.
* include/java_nio_channels_FileChannelImpl.h: Removed.
* include/Makefile.am: Handle generation of
gnu_java_nio_channels_FileChannelImpl.h.
* java/nio/channels/Makefile.am (EXTRA_DIST): Removed FileChannelImpl.java.
* native/jni/java-nio/Makefile.am
(libjavanio_la_SOURCES): Removed java_nio_FileChannelImpl.c and
added gnu_java_nio_channels_FileChannelImpl.c.
* native/jni/java-io/FileDescriptor.c: Commented out all code.
* native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: New file.
* native/jni/java-nio/java_nio_DirectByteBufferImpl.c: Fixed method names.
* native/jni/java-nio/java_nio_FileChannelImpl.c: Removed.
2004-04-08 Per Bothner <per@bothner.com>
* java/nio/channels/Channels.java (newInputStream, newOutputStream):
Optimize when argument is a FileChannelImpl.
(newInputStream(FileChannelImpl), newOutputStream(FileChannelImpl)):
New native methods.
2004-04-08 Per Bothner <per@bothner.com>
* java/nio/channels/FileChannelImpl.java: Moved to package
gnu/java/nio/channels, since we need to refer to it from java.io.
* java/nio/channels/natFileChannelImpl.cc: Removed file.
* gnu/java/nio/channels/FileChannelImpl.java: New class, renamed
from java/nio/channels. Don't depend on FileDescriptor.
(in, out, err): New static fields.
(mode): New field.
(SET, CUR, READ, WRITE, APPEND, EXCL, SYNC, DSYNC): Moved constants
from FileDescriptor.
(by): Removed MappedByteBuffer field.
(map): New working implementation.
* java/io/FileDescriptor.java: Implement on top of FileChannel.
Remove native methods.
* gnu/java/nio/FileLockImpl.java (fd): Remove field, replacing it by:
(ch): New FileChannelImpl field. Update constructor to match.
(releaseImpl): Remove native method. Instead ...
(release): Call unlock on channel.
* java/io/FileInputStream.java (ch): Change type to FileChannelImpl.
(<init>(File)): Allocate a FileChannelImpl, not a FileDescriptor.
(<init>(FileChannelImpl)): New package-private constructor.
(<init>(FileDescriptor)): Extract FileChannelImpl from arg.
(available, close, read, skip): Implement using FileChannelImpl.
(getFD): Allocate FileDescriptor if needed.
(getChannel): Is now trivial.
* java/io/FileOutputStream.java: Corresponding changes.
* java/io/RandomAccessFile.java: Corresponding changes.
* java/nio/MappedByteBuffer.java: (forceImpl, isLoadedImpl, loadImpl,
unmapImpl): New dummy methods, to be overridden by subclass.
(finalize, isLoaded, load, force): New methods.
* java/nio/MappedByteBufferImpl.java: More-or-less rewrite.
Now works, at least for read mapping.
2004-04-08 Per Bothner <per@bothner.com>
* java/nio/CharBufferImpl.java: Inline super constructor.
* java/nio/DoubleBufferImpl.java: Likewise.
* java/nio/FloatBufferImpl.java: Likewise.
* java/nio/IntBufferImpl.java: Likewise.
* java/nio/LongBufferImpl.java: Likewise.
* java/nio/ShortBufferImpl.java: Likewise.
* java/nio/CharBuffer.java: Remove unused constructor.
* java/nio/DoubleBuffer.java: Likewise.
* java/nio/FloatBuffer.java: Likewise.
* java/nio/IntBuffer.java: Likewise.
* java/nio/LongBuffer.java: Likewise.
* java/nio/ShortBuffer.java: Likewise.
* java/nio/CharViewBufferImpl.java: New convenience constructor.
Fix buggy call to super constructor.
* java/nio/DoubleViewBufferImpl.java: Likewise.
* java/nio/FloatViewBufferImpl.java: Likewise.
* java/nio/IntViewBufferImpl.java: Likewise.
* java/nio/LongViewBufferImpl.java: Likewise.
* java/nio/ShortViewBufferImpl.java: Likewise.
* java/nio/ByteBuffer.java (endian): Make non-private so other
java.nio classes can inherit it.
(<init>): Don't bother clearing array_offset.
* java/nio/ByteBuffer.java (allocate): Re-implement using wrap.
* java/nio/ByteBuffer.java (get(byte[],int,int)): Check underflow.
Remove redundant test.
* java/nio/ByteBufferImpl.java (asCharBuffer, asShortBuffer,
asIntBuffer, asLongBuffer, asFloatBuffer, asDoubleBuffer):
Use new XxxViewBufferImpl constructors.
* java/nio/MappedByteBufferImpl.java: Likewise.
* java/nio/DirectByteBufferImpl.java: Likewise.
* java/nio/ByteBufferImpl.java: Remove one constructor.
Inline super in remaining constructor.
* java/nio/ByteBuffer.java: Remove unused constructor.
* java/nio/ByteBufferImpl.java (shiftDown): New optimized method.
* java/nio/ByteBufferImpl.java (get, put): Add array_offset.
* java/nio/DirectByteBufferImpl.java (owner): New field.
(offset): Remove unused field.
(<init>): Modify one and add another constructor. Change callers.
(allocateDirect): Removed - not used.
(getImpl, putImpl): Make static and pass address explicitly,
to make them useful for MappedByteBufferImpl.
(get, put): Check for underflow. Modify for new getImpl.
(getImpl): New native method where target is array.
(get(byte[],int,int)): Use the above.
(adjustAddress): New static native method.
(slice, duplicate, asReadOnly): New implementations.
2004-04-08 Per Bothner <per@bothner.com>
* java/nio/ByteBuffer.java (shiftDown): New helper method.
* java/nio/ByteBufferImpl.java (compact): Use new shiftDown method.
* sava/nio/ByteBufferHelper.java: Remove redundant 'final' specifiers.
Pass ByteOrder parameter to most methods, since the underlying
ByteBuffer's order isn't always what we should use.
* java/nio/ByteBufferImpl.java: Pass byte-order various places.
* java/nio/DirectByteBufferImpl.java: Likewise.
Use ByteBufferHelper methods.
* java/nio/MappedByteBufferImpl.java: Likewise.
(compact): Use shiftDown.
* java/nio/CharViewBufferImpl.java (<init>): Pass byte-order.
(get, put): Use ByteBufferHelper.
(compact): Use new shiftDown method.
(duplicate(boolean)): New helper method.
(duplicate, asReadOnlyBuffer): Use it.
(order): Return endian field.
* java/nio/DoubleViewBufferImpl.java: Likewise.
* java/nio/FloatViewBufferImpl.java: Likewise.
* java/nio/IntViewBufferImpl.java: Likewise.
* java/nio/LongViewBufferImpl.java: Likewise.
* java/nio/ShortViewBufferImpl.java: Likewise.
* java/nio/CharViewBufferImpl.java (subsequence): Redundant test.
* java/nio/DirectByteBufferImpl.java (shiftDown): New native method.
(compact): Re-implement using shiftDown.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 87 |
1 files changed, 44 insertions, 43 deletions
diff --git a/configure.ac b/configure.ac index 1afecc64d..f1ebcc920 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,8 @@ dnl Process this file with autoconf to produce a configure script. +dnl ----------------------------------------------------------- dnl Turning off cache for debug reasons +dnl ----------------------------------------------------------- dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl @@ -9,11 +11,15 @@ AC_CONFIG_SRCDIR(java/lang/System.java) AC_CANONICAL_TARGET +dnl ----------------------------------------------------------- dnl Fold all IA-32 CPU architectures into "x86" +dnl ----------------------------------------------------------- if expr ${target_cpu} : .*86 > /dev/null; then target_cpu=x86; fi +dnl ----------------------------------------------------------- dnl We will not track/change lib version until we reach version 1.0 dnl at which time we'll have to be more anal about such things +dnl ----------------------------------------------------------- AC_SUBST(LIBVERSION, "0:0:0") AC_PREREQ(2.59) @@ -21,16 +27,9 @@ AM_INIT_AUTOMAKE(1.7.0) AC_CONFIG_HEADERS([include/config.h]) AC_PREFIX_DEFAULT(/usr/local/classpath) -AC_ARG_ENABLE([java], - [AS_HELP_STRING(--enable-java,compile Java source [default=yes])], - [case "${enableval}" in - yes) COMPILE_JAVA=yes ;; - no) COMPILE_JAVA=no ;; - *) COMPILE_JAVA=yes ;; - esac], - [COMPILE_JAVA=yes]) -AM_CONDITIONAL(BUILD_GLIBJ_ZIP, test "x${COMPILE_JAVA}" = xyes) - +dnl ----------------------------------------------------------- +dnl Enable JNI libraries (enabled by default) +dnl ----------------------------------------------------------- AC_ARG_ENABLE([jni], [AS_HELP_STRING(--enable-jni,compile JNI source [default=yes])], [case "${enableval}" in @@ -39,7 +38,11 @@ AC_ARG_ENABLE([jni], *) COMPILE_JNI=yes; COMPILE_JAVA=yes ;; esac], [COMPILE_JNI=yes]) +AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes) +dnl ----------------------------------------------------------- +dnl Enable CNI libraries (disabled by default) +dnl ----------------------------------------------------------- AC_ARG_ENABLE([cni], [AS_HELP_STRING(--enable-cni,compile CNI source [default=no])], [case "${enableval}" in @@ -48,9 +51,10 @@ AC_ARG_ENABLE([cni], *) COMPILE_CNI=yes; COMPILE_JAVA=yes ;; esac], [COMPILE_CNI=no]) +AM_CONDITIONAL(CREATE_CNI_LIBRARIES, test "x${COMPILE_CNI}" = xyes) dnl ----------------------------------------------------------- -dnl GTK native peer +dnl GTK native peer (enabled by default) dnl ----------------------------------------------------------- AC_ARG_ENABLE([gtk-peer], [AS_HELP_STRING(--enable-gtk-peer,compile GTK native peers [default=yes])], @@ -60,11 +64,11 @@ AC_ARG_ENABLE([gtk-peer], *) COMPILE_GTK_PEER=yes ;; esac], [COMPILE_GTK_PEER=yes]) - -AM_CONDITIONAL(CREATE_JNI_LIBRARIES, test "x${COMPILE_JNI}" = xyes) -AM_CONDITIONAL(CREATE_CNI_LIBRARIES, test "x${COMPILE_CNI}" = xyes) AM_CONDITIONAL(CREATE_GTK_PEER_LIBRARIES, test "x${COMPILE_GTK_PEER}" = xyes) +dnl ----------------------------------------------------------- +dnl Regenerate headers at build time (disabled by default) +dnl ----------------------------------------------------------- AC_ARG_ENABLE([regen-headers], [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=no])], [case "${enableval}" in @@ -73,13 +77,14 @@ AC_ARG_ENABLE([regen-headers], *) REGENERATE_JNI_HEADERS=no ;; esac], [REGENERATE_JNI_HEADERS=no]) - AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes) AC_PROG_LN_S AC_PROG_INSTALL +dnl ----------------------------------------------------------- dnl Checks for programs. +dnl ----------------------------------------------------------- dnl AC_PROG_CXX dnl Initialize libtool AC_DISABLE_STATIC @@ -134,13 +139,11 @@ CLASSPATH_WITH_JAVAH CLASSPATH_WITH_INCLUDEDIR dnl ----------------------------------------------------------- -dnl add the include files for the native abstraction layer +dnl Add the include files for the native abstraction layer. dnl ----------------------------------------------------------- - EXTRA_INCLUDES="${EXTRA_INCLUDES} -I\$(top_srcdir)/native/target/Linux -I\$(top_srcdir)/native/target/generic" dnl ----------------------------------------------------------- - if test "x${COMPILE_JNI}" = xyes; then AC_MSG_CHECKING("jni_md.h support") if test -f ${srcdir}/include/jni_md-${target_cpu}-${target_os}.h; then @@ -165,7 +168,6 @@ CLASSPATH_FIND_JAVAC CLASSPATH_WITH_CLASSLIB - dnl ----------------------------------------------------------- dnl Initialize maintainer mode dnl ----------------------------------------------------------- @@ -189,8 +191,6 @@ AC_ARG_ENABLE([debug], esac], [LIBDEBUG="false"]) AC_SUBST(LIBDEBUG) -dnl ----------------------------------------------------------- - dnl ----------------------------------------------------------- dnl Enable execution of all static initializer loadLibrary() @@ -214,27 +214,10 @@ AC_ARG_ENABLE([load-library], fi ]) AC_SUBST(INIT_LOAD_LIBRARY) -dnl ----------------------------------------------------------- - -dnl ----------------------------------------------------------- -dnl Small loop to add other things to EXTRA_INCLUDES from a VM dnl ----------------------------------------------------------- -dnl for i in $JAPHAR_CFLAGS $KAFFE_CFLAGS ; do -dnl add_to_extra_includes=1 -dnl for j in $EXTRA_INCLUDES ; do -dnl if test $i = $j ; then -dnl add_to_extra_includes=0 -dnl fi -dnl done -dnl if test $add_to_extra_includes -eq 1; then -dnl EXTRA_INCLUDES="$EXTRA_INCLUDES $i" -dnl fi -dnl done -dnl ----------------------------------------------------------- - - dnl Create a link to the VM specific files we're compiling with +dnl ----------------------------------------------------------- if test "x${JVM_REFERENCE}" = x; then JVM_REFERENCE=reference fi @@ -247,26 +230,41 @@ while test -n "$ac_sources"; do done AC_CONFIG_LINKS([$ac_config_links_2]) +dnl ----------------------------------------------------------- dnl avoiding automake complaints +dnl ----------------------------------------------------------- REMOVE="" AC_SUBST(REMOVE) +dnl ----------------------------------------------------------- dnl This is probably useless. +dnl ----------------------------------------------------------- AC_PATH_PROG(SH, sh) AC_PATH_PROG(MKDIR, mkdir) AC_PATH_PROG(CP, cp) AC_PATH_PROG(DATE, date) +dnl ----------------------------------------------------------- dnl According to the GNU coding guide, we shouldn't require find, dnl and zip, however GNU provides both so it should be okay +dnl ----------------------------------------------------------- AC_PATH_PROG(FIND, find) -dnl Useful for disabling zip even if you have it -CLASSPATH_WITH_ZIP +dnl ----------------------------------------------------------- +dnl Create glibj.zip (enabled by default) +dnl ----------------------------------------------------------- +CLASSPATH_ENABLE_GLIBJ -CLASSPATH_ENABLE_GJDOC +dnl ----------------------------------------------------------- +dnl Install class files (disabled by default) +dnl ----------------------------------------------------------- +CLASSPATH_ENABLE_CLASS_INSTALL dnl ----------------------------------------------------------- +dnl Enable API documentation generation (disabled by default) +dnl ----------------------------------------------------------- +CLASSPATH_ENABLE_GJDOC + dnl ----------------------------------------------------------- AC_ARG_ENABLE([portable-native-sync], [AS_HELP_STRING(--enable-portable-native-sync,synchronize VM threads portably)], @@ -280,8 +278,10 @@ AC_ARG_ENABLE([portable-native-sync], ;; esac], []) -dnl ----------------------------------------------------------- +dnl ----------------------------------------------------------- +dnl output files +dnl ----------------------------------------------------------- AC_CONFIG_FILES([Makefile doc/Makefile doc/api/Makefile @@ -306,6 +306,7 @@ gnu/java/locale/Makefile gnu/java/net/Makefile gnu/java/net/content/Makefile gnu/java/nio/Makefile +gnu/java/nio/channels/Makefile gnu/java/nio/charset/Makefile gnu/java/net/content/text/Makefile gnu/java/net/protocol/Makefile |