* src/vm/exceptions.c (toolbox/logging.h): Removed.
[cacao.git] / configure.ac
index a725e4f62eff63f8146915eedb2bc883b644daa2..169eb6074845e48df69d0750af9b5971fc192788 100644 (file)
@@ -22,7 +22,7 @@ dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
 dnl 
-dnl $Id: configure.ac 8056 2007-06-10 14:49:57Z michi $
+dnl $Id: configure.ac 8274 2007-08-08 15:58:17Z twisti $
 
 dnl Process this file with autoconf to produce a configure script.
 
@@ -215,14 +215,17 @@ AC_HEADER_STDC
 
 dnl keep them alpha-sorted!
 AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([netdb.h])
 AC_CHECK_HEADERS([stdlib.h])
 AC_CHECK_HEADERS([string.h])
 AC_CHECK_HEADERS([time.h])
+AC_CHECK_HEADERS([ucontext.h])
 AC_CHECK_HEADERS([unistd.h])
 AC_CHECK_HEADERS([sys/ioctl.h])
 AC_CHECK_HEADERS([sys/mman.h])
 AC_CHECK_HEADERS([sys/resource.h])
 AC_CHECK_HEADERS([sys/select.h])
+AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([sys/stat.h])
 AC_CHECK_HEADERS([sys/time.h])
 AC_CHECK_HEADERS([sys/types.h])
@@ -253,26 +256,47 @@ AC_FUNC_MEMCMP
 AC_FUNC_MMAP
 
 dnl keep them alpha-sorted!
+AC_CHECK_FUNCS([accept])
+AC_CHECK_FUNCS([atoi])
+AC_CHECK_FUNCS([atol])
 AC_CHECK_FUNCS([calloc])
+AC_CHECK_FUNCS([close])
 AC_CHECK_FUNCS([confstr])
+AC_CHECK_FUNCS([connect])
+AC_CHECK_FUNCS([fflush])
+AC_CHECK_FUNCS([fopen])
+AC_CHECK_FUNCS([fprintf])
 AC_CHECK_FUNCS([free])
 AC_CHECK_FUNCS([fstat])
 AC_CHECK_FUNCS([getcwd])
+AC_CHECK_FUNCS([gethostbyname])
+AC_CHECK_FUNCS([gethostname])
 AC_CHECK_FUNCS([getpagesize])
 AC_CHECK_FUNCS([getrusage])
+AC_CHECK_FUNCS([getsockname])
 AC_CHECK_FUNCS([gettimeofday])
+AC_CHECK_FUNCS([htons])
 AC_CHECK_FUNCS([ioctl])
 AC_CHECK_FUNCS([isnan])
+AC_CHECK_FUNCS([listen])
 AC_CHECK_FUNCS([localtime])
 AC_CHECK_FUNCS([localtime_r])
 AC_CHECK_FUNCS([lseek])
+AC_CHECK_FUNCS([malloc])
 AC_CHECK_FUNCS([mmap])
 AC_CHECK_FUNCS([mprotect])
 AC_CHECK_FUNCS([open])
+AC_CHECK_FUNCS([recv])
 AC_CHECK_FUNCS([scandir])
 AC_CHECK_FUNCS([select])
+AC_CHECK_FUNCS([send])
+AC_CHECK_FUNCS([setsockopt])
+AC_CHECK_FUNCS([shutdown])
+AC_CHECK_FUNCS([socket])
+AC_CHECK_FUNCS([strchr])
 AC_CHECK_FUNCS([strdup])
 AC_CHECK_FUNCS([strerror])
+AC_CHECK_FUNCS([strncmp])
 AC_CHECK_FUNCS([strstr])
 AC_CHECK_FUNCS([time])
 
@@ -500,6 +524,13 @@ if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
                      ;;
             esac
 
+            case "${OS_DIR}" in
+                solaris)
+                                        AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
+                     ;;
+            esac
+
+
             AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
             AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
             AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
@@ -768,25 +799,7 @@ else
 fi
 
 
-dnl check if zlib should be used
-AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
-AC_ARG_ENABLE([zlib],
-              [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
-              [case "${enableval}" in
-                  no) ENABLE_ZLIB=no;;
-                  *) ENABLE_ZLIB=yes;;
-               esac],
-              [ENABLE_ZLIB=yes])
-AC_MSG_RESULT(${ENABLE_ZLIB})
-
-if test x"${ENABLE_ZLIB}" = "xyes"; then
-    AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
-    AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
-    AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
-    AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
-fi
-AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
-
+AC_CHECK_ENABLE_ZLIB
 
 dnl check for stuff to be built
 AC_CHECK_ENABLE_JNI
@@ -837,6 +850,9 @@ AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
 AC_SUBST(ENABLE_STATICVM)
 
 
+AC_CHECK_ENABLE_ANNOTATIONS
+
+
 dnl where is CACAO's vm.zip
 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
 AC_ARG_WITH([vm-zip],
@@ -886,21 +902,26 @@ if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
     dnl check for some classpath related stuff when we link statically
     AM_ICONV_LINK
 else
-    dnl we need this check for --enable-staticvm, otherwise ltdl can't find dlopen
-    if test x"${ENABLE_STATICVM}" = "xyes"; then
-        AC_CHECK_LIB(dl, dlopen,, [AC_MSG_ERROR(cannot find libdl)])
-    fi
-
-    AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
-    AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
+    AC_CHECK_ENABLE_LTDL
 fi
 AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
 AC_SUBST(WITH_STATIC_CLASSPATH)
 
 
 dnl check for some programs we need
-AC_PROG_JAVAC
-AC_PROG_JAR
+
+case "${WITH_CLASSPATH}" in
+    cldc1.1 | gnu)
+        AC_PROG_JAVAC
+        AC_PROG_JAR
+        ;;
+    sun)
+        ;;
+    *)
+        AC_MSG_ERROR(unknown classpath configuration ${WITH_CLASSPATH})
+        ;;
+esac
+
 
 AC_CHECK_HEADERS(
        [regex.h], 
@@ -946,6 +967,7 @@ AC_CONFIG_FILES([Makefile]
                [src/native/vm/Makefile]
                [src/native/vm/cldc1.1/Makefile]
                [src/native/vm/gnu/Makefile]
+               [src/native/vm/sun/Makefile]
                [src/scripts/Makefile]
                [src/scripts/java]
                [src/threads/Makefile]
@@ -988,7 +1010,6 @@ AC_CONFIG_FILES([Makefile]
                [src/vm/jit/sparc64/Makefile]
                [src/vm/jit/sparc64/linux/Makefile]
                [src/vm/jit/sparc64/solaris/Makefile]
-               [src/vm/jit/tools/Makefile]
                [src/vm/jit/verify/Makefile]
                [src/vm/jit/x86_64/Makefile]
                [src/vm/jit/x86_64/freebsd/Makefile]
@@ -1003,7 +1024,7 @@ AC_CONFIG_FILES([Makefile]
                [tests/regression/resolving/classes1/Makefile]
                [tests/regression/resolving/classes2/Makefile]
                [tests/regression/resolving/classes3/Makefile]
-               )
+)
 
 
 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS