$OpenBSD$
--- configure.ac.orig	Tue Feb 14 05:12:47 2006
+++ configure.ac	Wed Apr 12 06:49:06 2006
@@ -78,6 +78,13 @@ case "$host_os" in
     CFLAGS="$CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
     ;;
 
+*openbsd3* )
+    OS_DIR="openbsd3"
+	LIBS="$LIBS -L/usr/local/lib -lintl -liconv"
+	CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+    CFLAGS="$CFLAGS -D__OPENBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
+    ;;
+
 *irix* )
     OS_DIR="irix"
     CFLAGS="$CFLAGS -D__IRIX__"
@@ -159,15 +166,6 @@ AC_CHECK_SIZEOF(void *)
 AC_C_BIGENDIAN
 
 
-dnl check which ld flags are required to export symbols
-if test x"$with_gnu_ld" = "xyes"; then
-    EXPORT_SYMBOLS_FLAGS="-Wl,--export-dynamic"
-else
-    EXPORT_SYMBOLS_FLAGS=""
-fi
-AC_SUBST(EXPORT_SYMBOLS_FLAGS)
-
-
 dnl define install prefix
 if test "x$prefix" = "xNONE"; then
     CACAO_PREFIX=$ac_default_prefix
@@ -586,9 +584,16 @@ AC_PROG_JAR
 
 dnl now configure subpackages
 dnl the export is not my favorite (is there another way?)
-export CFLAGS
-AC_CONFIG_SUBDIRS(src/boehm-gc)
 
+dnl if test x"$OS_DIR" = "xopenbsd3"; then
+dnl    AC_CHECK_HEADER([gc.h],, [AC_MSG_ERROR(cannot find gc.h (boehm-gc))])
+dnl    AC_CHECK_LIB([gc],[GC_malloc(100*sizeof(int))],, [AC_MSG_ERROR(cannot find -lgc (boehm-gc))])
+dnl	LIBS="$LIBS -lgc"
+dnl else
+	export CFLAGS
+	AC_CONFIG_SUBDIRS(src/boehm-gc)
+dnl fi
+
 AC_CONFIG_FILES([Makefile]
 		[contrib/Makefile]
 		[contrib/setenvinstalled]
@@ -608,7 +613,7 @@ AC_CONFIG_FILES([Makefile]
 		[src/native/tools/Makefile]
 		[src/native/vm/Makefile]
 		[src/scripts/Makefile]
-		[src/scripts/java]
+		[src/scripts/java-cacao]
 		[src/scripts/rmiregistry]
 		[src/threads/Makefile]
 		[src/threads/green/Makefile]
@@ -622,6 +627,7 @@ AC_CONFIG_FILES([Makefile]
 		[src/vm/jit/alpha/linux/Makefile]
 		[src/vm/jit/i386/Makefile]
 		[src/vm/jit/i386/freebsd/Makefile]
+		[src/vm/jit/i386/openbsd3/Makefile]
 		[src/vm/jit/i386/linux/Makefile]
 		[src/vm/jit/intrp/Makefile]
 		[src/vm/jit/inline/Makefile]
