--- config_office/configure.in.ark	2006-02-19 16:54:19.000000000 +0000
+++ config_office/configure.in	2006-02-19 16:57:05.000000000 +0000
@@ -2935,7 +2935,10 @@
 else
     AC_MSG_RESULT([internal])
     SYSTEM_HSQLDB=NO
-    BUILD_TYPE="$BUILD_TYPE HSQLDB"
+    if test "$WITH_JAVA" != "no"; then
+        dnl Don't build hsqldb if we don't have Java
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+    fi
 fi
 AC_SUBST(SYSTEM_HSQLDB)
 AC_SUBST(HSQLDB_JAR)
