--- ./configure.in	2013-03-07 14:27:38.000000000 +0000
+++ ./configure.in	2013-03-07 15:01:20.511222246 +0000
@@ -375,11 +375,6 @@
         [Enable support for scripts in BeanShell.])
 )
 
-AC_ARG_ENABLE(ext-scripting-javascript,
-    AS_HELP_STRING([--enable-ext-scripting-javascript],
-        [Enable support for scripts in JavaScript.])
-)
-
 AC_ARG_ENABLE(ext-typo,
     AS_HELP_STRING([--enable-ext-typo],
         [Enable the Typography Toolbar extension.])
@@ -1073,11 +1068,6 @@
         [Use Berkeley db already on system.]),,
     [with_system_db="$with_system_libs"])
 
-AC_ARG_WITH(system-lucene,
-    AS_HELP_STRING([--with-system-lucene],
-        [Use Lucene already on system.]),,
-    [with_system_lucene="$with_system_jars"])
-
 AC_ARG_WITH(system-apache-commons,
     AS_HELP_STRING([--with-system-apache-commons],
         [Use Apache commons libraries already on system.]),,
@@ -1381,16 +1371,6 @@
     with_stlport=$withval ,
 with_stlport=auto)
 
-AC_ARG_WITH(jdk-home,
-    AS_HELP_STRING([--with-jdk-home],
-        [If you have installed JDK 1.3 or later on your system please supply the
-         path here. Note that this is not the location of the java command but the
-         location of the entire distribution.])
-    [
-                          Usage:     --with-jdk-home=<absolute path to JDK home>
-    ],
-,)
-
 AC_ARG_WITH(gxx_include_path,
     AS_HELP_STRING([--with-gxx-include-path],
         [If you want to override the autodetected g++ include path.])
@@ -1406,63 +1386,6 @@
 
          To build without help, use --without-help.]))
 
-AC_ARG_WITH(java,
-    AS_HELP_STRING([--with-java],
-        [Specify the name of the Java interpreter command. Typically "java"
-         which is the default.
-
-         To build without support for Java components, applets, accessibility
-         or the XML filters written in Java, use --without-java or --with-java=no.])
-    [
-                          Usage:     --with-java==<java command>
-                                     --without-java
-    ],
-    [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
-    [ with_java=java ]
-)
-
-AC_ARG_WITH(java_target_version,
-    AS_HELP_STRING([--with-java-target-version],
-        [Generate class files that will work on JVMs with the specified version.
-         For example, use --with-java-target-version=1.4 to make sure that the
-         application will work with JVM 1.4 even when compiled with JDK 1.5.])
-    [
-                          This option is ignored when you compile with gcj/gij.
-
-                          Usage:     --with-java-target-version=<jvm version>
-    ],
-,)
-
-AC_ARG_WITH(jvm-path,
-    AS_HELP_STRING([--with-jvm-path],
-        [Use a specific JVM search path at runtime.])
-    [
-                          Usage:     --with-jvm-path=<absolute path to parent of jvm home>
-
-                          e. g.: --with-jvm-path=/usr/lib/
-                                 to find JRE/JDK in /usr/lib/jvm/
-    ],
-,)
-
-AC_ARG_WITH(ant-home,
-    AS_HELP_STRING([--with-ant-home],
-        [If you have installed Jakarta Ant on your system, please supply the path here.
-         Note that this is not the location of the Ant binary but the location
-         of the entire distribution.])
-    [
-                          Usage:     --with-ant-home=<absolute path to Ant home>
-    ],
-,)
-
-AC_ARG_WITH(junit,
-    AS_HELP_STRING([--with-junit],
-        [Specifies the JUnit 4 jar file to use for JUnit-based tests.
-         --without-junit disables those tests. Not relevant in the --without-java case.])
-    [
-                          Usage:     --with-junit=<absolute path to JUnit 4 jar>
-    ],
-,with_junit=yes)
-
 AC_ARG_WITH(perl-home,
     AS_HELP_STRING([--with-perl-home],
         [If you have installed Perl 5 Distribution, on your system, please
@@ -3877,461 +3800,6 @@
 AC_SUBST(BUILD_VER_STRING)
 
 dnl ===================================================================
-dnl Java support enable
-dnl ===================================================================
-AC_MSG_CHECKING([whether to build with Java support])
-if test "$with_java" != "no"; then
-    AC_MSG_RESULT([yes])
-    SOLAR_JAVA="TRUE"
-else
-    AC_MSG_RESULT([no])
-    SOLAR_JAVA=""
-fi
-
-AC_SUBST(SOLAR_JAVA)
-
-dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we
-dnl want there to be *run-time* (and build-time) support for Java extensions in the
-dnl built LibreOffice.
-
-dnl SOLAR_JAVA="BUILD" is claimed to indicate build-time only support
-dnl (no runtime support). It doesn't seem to ever be set to this
-dnl value, though, and everywhere SOLAR_JAVA is only checked for being
-dnl empty or non-empty.
-
-dnl SOLAR_JAVA="" indicate no java support at all
-
-if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then
-    # IBMs JDK needs this...
-    JITC_PROCESSOR_TYPE=6
-    export JITC_PROCESSOR_TYPE
-    JITC_PROCESSOR_TYPE_EXPORT="export JITC_PROCESSOR_TYPE=$JITC_PROCESSOR_TYPE"
-fi
-AC_SUBST([JITC_PROCESSOR_TYPE_EXPORT])
-
-if test $_os = "WINNT"; then
-    WITH_VC_REDIST="TRUE"
-fi
-AC_SUBST(WITH_VC_REDIST)
-
-dnl ===================================================================
-dnl Checks for Java
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-
-    # Windows-specific tests
-    if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        if test "$CL_X64" != ""; then
-            bitness="64-bit"
-            otherbitness="32-bit"
-        else
-            bitness="32-bit"
-            otherbitness="64-bit"
-        fi
-
-        if test -z "$with_jdk_home"; then
-
-            # Unfortunately apparently no way to find, if needed, the 64-bit
-            # JDK in the Registry from the 32-bit Perl oowintool
-
-            _jdk_home=`./oowintool --jdk-home`
-            if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
-                with_jdk_home="$_jdk_home"
-                howfound="found by oowintool"
-            else
-                AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK])
-            fi
-        else
-            test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"`
-            howfound="you passed"
-        fi
-    fi
-
-    JAVA_HOME=; export JAVA_HOME
-    if test -z "$with_jdk_home"; then
-        AC_PATH_PROG(JAVAINTERPRETER, $with_java)
-    else
-        _java_path="$with_jdk_home/bin/$with_java"
-        dnl Check if there is a Java interpreter at all.
-        if test -x "$_java_path"; then
-            JAVAINTERPRETER=$_java_path
-        else
-            AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
-        fi
-    fi
-
-    if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        # Check that the JDK found is correct architecture
-        # Why is this necessary, we don't link with any library from the JDK I think,
-
-        shortjdkhome=`cygpath -d "$with_jdk_home"`
-        if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" = "" >/dev/null; then
-            AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
-            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
-        elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" != ""  >/dev/null; then
-            AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
-            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
-        fi
-
-        if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then
-            JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
-        fi
-        JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"`
-        JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"`
-    elif test "$_os" = "Darwin"; then
-        dnl HACK:  There currently is only a 32 bit version of LibreOffice for Mac OS X,
-        dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it
-        dnl to run in 32 bit mode and be able to load LibreOffice jnilibs:
-        AC_MSG_CHECKING([whether to pass -d32 to Java interpreter])
-        if "$JAVAINTERPRETER" -d32 >&5 2>&5; then
-            AC_MSG_RESULT([yes])
-            JAVAIFLAGS=-d32
-        else
-            AC_MSG_RESULT([no])
-        fi
-    fi
-fi
-
-dnl ===================================================================
-dnl Checks for JDK.
-dnl ===================================================================
-
-# Note that JAVA_HOME as for now always means the *build* platform's
-# JAVA_HOME. Whether all the complexity here actually is needed any
-# more or not, no idea.
-
-if test "$SOLAR_JAVA" != ""; then
-    _gij_longver=0
-    AC_MSG_CHECKING([the installed JDK])
-    if test -n "$JAVAINTERPRETER"; then
-        dnl java -version sends output to stderr!
-        if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
-            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-        elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then
-            JDK=gcj
-            AC_MSG_RESULT([checked (gcj)])
-            _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`;
-            _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
-
-        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then
-            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in])
-        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then
-            JDK=ibm
-
-            dnl IBM JDK specific tests
-            _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
-            _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-
-            if test "$_jdk_ver" -lt 10500; then
-                AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5])
-            fi
-
-            AC_MSG_RESULT([checked (IBM JDK $_jdk)])
-
-            if test "$with_jdk_home" = ""; then
-                AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
-you must use the "--with-jdk-home" configure option explicitly])
-            fi
-
-           JAVA_HOME=$with_jdk_home
-
-        else
-            JDK=sun
-
-            dnl Sun JDK specific tests
-            _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
-            _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
-
-            if test "$_jdk_ver" -lt 10500; then
-                AC_MSG_ERROR([JDK is too old, you need at least 1.5])
-            fi
-            AC_MSG_RESULT([checked (JDK $_jdk)])
-            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
-            if test "$_os" = "WINNT"; then
-                JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
-            fi
-        fi
-    else
-        AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4])
-    fi
-else
-    dnl Java disabled
-    JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME
-fi
-
-_java_target_ver="1.5"
-dnl ===================================================================
-dnl Check for target Java bytecode version
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    AC_MSG_CHECKING([for target Java bytecode version])
-    if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then
-    AC_MSG_RESULT([default by $JDK])
-    if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
-        AC_MSG_WARN([Value defined by --with-java-target-version is ignored!])
-    fi
-    else
-    if test -n "$with_java_target_version" -a "$with_java_target_version" != "no" ; then
-        _java_target_ver="$with_java_target_version"
-        AC_MSG_RESULT([$_java_target_ver])
-    elif test $_jdk_ver -gt 10000 ; then
-        _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'`
-        AC_MSG_RESULT([$_java_target_ver])
-    else
-        AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!])
-    fi
-    fi
-
-    JAVA_SOURCE_VER="$_java_target_ver"
-    JAVA_TARGET_VER="$_java_target_ver"
-fi
-
-dnl ===================================================================
-dnl Checks for javac
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    if test "$JDK" = "gcj"; then
-        javacompiler=`echo $with_java | $SED -e "s/gij/gcj/g" | $SED -e "s/java/javac/g"`
-    else
-        javacompiler="javac"
-    fi
-    if test -z "$with_jdk_home"; then
-        AC_PATH_PROG(JAVACOMPILER, $javacompiler)
-    else
-        _javac_path="$with_jdk_home/bin/$javacompiler"
-        dnl Check if there is a Java compiler at all.
-        if test -x "$_javac_path"; then
-            JAVACOMPILER=$_javac_path
-        fi
-    fi
-    if test -z "$JAVACOMPILER"; then
-        AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
-    fi
-    if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then
-            JAVACOMPILER="${JAVACOMPILER}.exe"
-        fi
-        JAVACOMPILER=`cygpath -d "$JAVACOMPILER"`
-        JAVACOMPILER=`cygpath -u "$JAVACOMPILER"`
-    fi
-
-    if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then
-        AC_MSG_CHECKING([re-checking JDK])
-        JDK=gcj
-        AC_MSG_RESULT([checked (ecj)])
-        #TODO: what's to do here? some switch to do 1.5 compiling?
-        JAVAFLAGS="-source 1.5 -target 1.5"
-        _gij_longver="40200"
-    fi
-fi
-
-JAVACISGCJ=""
-dnl ===================================================================
-dnl Checks that javac is gcj
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    if test `$JAVACOMPILER --version 2>&1 | grep -c "GCC"` -gt 0; then
-        JAVACISGCJ="yes"
-    fi
-fi
-AC_SUBST(JAVACISGCJ)
-
-JAVACISKAFFE=""
-dnl ===================================================================
-dnl Checks that javac is kaffe
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    if test `$JAVACOMPILER -version 2>&1 | grep -c "Kaffe"` -gt 0; then
-        JAVACISKAFFE="yes"
-    fi
-fi
-AC_SUBST(JAVACISKAFFE)
-
-dnl ===================================================================
-dnl Checks for javadoc
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    if test -z "$with_jdk_home"; then
-        AC_PATH_PROG(JAVADOC, javadoc)
-    else
-        _javadoc_path="$with_jdk_home/bin/javadoc"
-        dnl Check if there is a javadoc at all.
-        if test -x "$_javadoc_path"; then
-            JAVADOC=$_javadoc_path
-        else
-            AC_PATH_PROG(JAVADOC, javadoc)
-        fi
-    fi
-    if test -z "$JAVADOC"; then
-        AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
-    fi
-    if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then
-        if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then
-            JAVADOC="${JAVADOC}.exe"
-        fi
-        JAVADOC=`cygpath -d "$JAVADOC"`
-        JAVADOC=`cygpath -u "$JAVADOC"`
-    fi
-fi
-
-if test "$SOLAR_JAVA" != ""; then
-    # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
-    if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
-        if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
-           # try to recover first by looking whether we have a alternatives
-           # system as in Debian or newer SuSEs where following /usr/bin/javac
-           # over /etc/alternatives/javac leads to the right bindir where we
-           # just need to strip a bit away to get a valid JAVA_HOME
-           JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
-        elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
-            # maybe only one level of symlink (e.g. on Mac)
-            JAVA_HOME=$(readlink $JAVACOMPILER)
-            if test "$(dirname $JAVA_HOME)" = "."; then
-                # we've got no path to trim back
-                JAVA_HOME=""
-            fi
-        else
-            # else warn
-            AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
-            AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
-            echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn
-            echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn
-        fi
-        dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
-        if test "$JAVA_HOME" != "/usr"; then
-            if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
-                dnl Leopard returns a non-suitable path with readlink - points to "Current" only
-                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
-                dnl Tiger already returns a JDK path..
-                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
-            else
-                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
-            fi
-        fi
-    fi
-    # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
-
-    dnl now if JAVA_HOME has been set to empty, then call findhome to find it
-    if test -z "$JAVA_HOME"; then
-        if test "x$with_jdk_home" = "x"; then
-            cat > findhome.java <<_ACEOF
-[import java.io.File;
-
-class findhome
-{
-    public static void main(String args[])
-    {
-        String jrelocation = System.getProperty("java.home");
-        File jre = new File(jrelocation);
-        System.out.println(jre.getParent());
-    }
-}]
-_ACEOF
-            AC_MSG_CHECKING([if javac works])
-            javac_cmd="$JAVACOMPILER findhome.java 1>&2"
-            AC_TRY_EVAL(javac_cmd)
-            if test $? = 0 && test -f ./findhome.class ; then
-                AC_MSG_RESULT([javac works])
-            else
-                echo "configure: javac test failed" >&5
-                cat findhome.java >&5
-                AC_MSG_ERROR([javac does not work - java projects will not build!])
-            fi
-            AC_MSG_CHECKING([if gij knows its java.home])
-            JAVA_HOME=`$JAVAINTERPRETER findhome`
-            if test $? = 0 && test "$JAVA_HOME" != "" ; then
-                AC_MSG_RESULT([$JAVA_HOME])
-            else
-                echo "configure: java test failed" >&5
-                cat findhome.java >&5
-                AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
-            fi
-            # clean-up after ourselves
-            rm -f ./findhome.java ./findhome.class
-        else
-            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
-        fi
-    fi
-
-    dnl second sanity check JAVA_HOME if possible
-    if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then
-        # now check if $JAVA_HOME is really valid
-        if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
-            if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
-                JAVA_HOME_OK="NO"
-            fi
-        elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then
-            JAVA_HOME_OK="NO"
-        fi
-        if test "$JAVA_HOME_OK" = "NO"; then
-            AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
-            AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
-            AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly])
-            echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn
-            echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn
-            echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn
-        fi
-    fi
-fi
-
-AWTLIB=
-
-if test "$SOLAR_JAVA" != ""; then
-    AC_MSG_CHECKING([for jawt lib name])
-    if test "$JDK" = "gcj"; then
-        save_CFLAGS=$CFLAGS
-        save_LDFLAGS=$LDFLAGS
-        CFLAGS="$CFLAGS -I$JAVA_HOME/include"
-        LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj"
-        exec 6>/dev/null # no output
-        AC_CHECK_HEADER(jni.h, [],
-                    [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], [])
-        AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] )
-        exec 6>&1 # output on again
-        CFLAGS=$save_CFLAGS
-        LDFLAGS=$save_LDFLAGS
-    fi
-    # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols.
-    # A workaround is to link also against libpmawt.so
-    if test "$JDK" = "ibm" ; then
-        save_CFLAGS=$CFLAGS
-        save_LDFLAGS=$LDFLAGS
-        save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
-        CFLAGS="$CFLAGS -I$JAVA_HOME/include"
-        LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin"
-        LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH
-        export LD_LIBRARY_PATH
-        exec 6>/dev/null # no output
-        AC_CHECK_HEADER(jni.h, [],
-                    [AC_MSG_ERROR([jni.h could not be found.])], [])
-        AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] )
-        if test -z "$AWTLIB"; then
-            LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt"
-            AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"])
-        fi
-        exec 6>&1 # output on again
-        CFLAGS=$save_CFLAGS
-        LDFLAGS=$save_LDFLAGS
-        LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH
-    fi
-    if test -z "$AWTLIB"; then
-        AWTLIB=-ljawt
-    fi
-    AC_MSG_RESULT([$AWTLIB])
-    AC_SUBST(AWTLIB)
-fi
-
-AC_SUBST(JAVA_HOME)
-AC_SUBST(JDK)
-AC_SUBST(JAVAFLAGS)
-AC_SUBST(JAVA_SOURCE_VER)
-AC_SUBST(JAVA_TARGET_VER)
-AC_SUBST(JAVAINTERPRETER)
-AC_SUBST(JAVAIFLAGS)
-AC_SUBST(JAVACOMPILER)
-AC_SUBST(JAVADOC)
-
-dnl ===================================================================
 dnl Checks for specific files.
 dnl ===================================================================
 
@@ -4599,47 +4067,6 @@
 dnl ===================================================================
 AC_MSG_CHECKING([whether to build the ODK])
 if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then
-    AC_MSG_RESULT([yes])
-
-    if test "$with_java" != "no"; then
-        AC_MSG_CHECKING([whether to build unowinreg.dll])
-        if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then
-            # build on Win by default
-            enable_build_unowinreg=yes
-        fi
-        if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then
-            AC_MSG_RESULT([no])
-            BUILD_UNOWINREG=NO
-        else
-            AC_MSG_RESULT([yes])
-            BUILD_UNOWINREG=YES
-        fi
-        if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then
-            if test -z "$with_mingw_cross_compiler"; then
-                dnl Guess...
-                AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false)
-            elif test -x "$with_mingw_cross_compiler"; then
-                 MINGWCXX="$with_mingw_cross_compiler"
-            else
-                AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false)
-            fi
-
-            if test "$MINGWCXX" = "false"; then
-                AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.])
-            fi
-
-            mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`"
-            if test -x "$mingwstrip_test"; then
-                MINGWSTRIP="$mingwstrip_test"
-            else
-                AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false)
-            fi
-
-            if test "$MINGWSTRIP" = "false"; then
-                AC_MSG_ERROR(MinGW32 binutils not found.)
-            fi
-        fi
-    fi
     BUILD_TYPE="$BUILD_TYPE ODK"
 else
     AC_MSG_RESULT([no])
@@ -5157,73 +4584,6 @@
 AC_SUBST(DB_LIB)
 AC_SUBST(DB_CPPLIB)
 
-dnl ===================================================================
-dnl Check for system lucene
-dnl ===================================================================
-if test "$with_java" != "no"; then
-AC_MSG_CHECKING([which lucene to use])
-if test "$with_system_lucene" = "yes"; then
-    AC_MSG_RESULT([external])
-    SYSTEM_LUCENE=YES
-    if test -z $LUCENE_CORE_JAR; then
-         AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar,
-            [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ],
-            [
-              AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
-                [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
-                [ AC_CHECK_FILE(/usr/share/java/lucene.jar,
-                   [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
-                   [ AC_MSG_ERROR(lucene-core.jar replacement not found)]
-                  )
-                ]
-              )
-            ]
-         )
-    else
-        AC_CHECK_FILE($LUCENE_CORE_JAR, [],
-               [AC_MSG_ERROR(lucene-core.jar not found.)], [])
-    fi
-
-    if test -z $LUCENE_ANALYZERS_JAR; then
-        AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar,
-            [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ],
-            [
-              AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar,
-                [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-contrib/lucene-analyzers.jar ],
-                [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)]
-              )
-            ]
-        )
-    else
-        AC_CHECK_FILE($LUCENE_CORE_JAR, [],
-               [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], [])
-    fi
-    AC_MSG_CHECKING([whether lucene is version 2.x])
-    export LUCENE_CORE_JAR
-    if $PERL -e 'use Archive::Zip;
-            my $file = "$ENV{'LUCENE_CORE_JAR'}";
-            my $zip = Archive::Zip->new( $file );
-            my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
-            if ( $mf =~ m/Specification-Version: 2.*/ ) {
-                exit 0;
-            } else {
-                exit 1;
-            }'; then
-        AC_MSG_RESULT([yes])
-    else
-        AC_MSG_ERROR([no, you need lucene 2])
-    fi
-
-else
-    AC_MSG_RESULT([internal])
-    SYSTEM_LUCENE=NO
-    BUILD_TYPE="$BUILD_TYPE LUCENE"
-fi
-fi
-AC_SUBST(SYSTEM_LUCENE)
-AC_SUBST(LUCENE_CORE_JAR)
-AC_SUBST(LUCENE_ANALYZERS_JAR)
-
 AC_MSG_CHECKING([whether to build the MySQL Connector extension])
 if test "x$enable_ext_mysql_connector" = "xyes" -a "x$enable_extension_integration" != "xno"; then
     AC_MSG_RESULT([yes])
@@ -5335,54 +4695,6 @@
     AC_SUBST(SYSTEM_MYSQL_CPPCONN)
 fi
 
-dnl ===================================================================
-dnl Check for system hsqldb
-dnl ===================================================================
-if test "$with_java" != "no"; then
-AC_MSG_CHECKING([which hsqldb to use])
-if test "$with_system_hsqldb" = "yes"; then
-    AC_MSG_RESULT([external])
-    SYSTEM_HSQLDB=YES
-    if test -z $HSQLDB_JAR; then
-        HSQLDB_JAR=/usr/share/java/hsqldb.jar
-    fi
-    AC_CHECK_FILE($HSQLDB_JAR, [],
-               [AC_MSG_ERROR(hsqldb.jar not found.)], [])
-    AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
-    export HSQLDB_JAR
-    if $PERL -e 'use Archive::Zip;
-            my $file = "$ENV{'HSQLDB_JAR'}";
-            my $zip = Archive::Zip->new( $file );
-            my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
-            if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
-               push @l, split(/\n/, $mf);
-               foreach my $line (@l) {
-                  if ($line =~ m/Specification-Version:/) {
-                      ($t, $version) = split (/:/,$line);
-                      $version =~ s/^\s//;
-                      ($a, $b, $c, $d) = split (/\./,$version);
-                      if ($c == "0" && $d > "8")  {
-                          exit 0;
-                      } else {
-                          exit 1;
-                      }
-                  }
-               }
-            } else {
-                exit 1;
-            }'; then
-        AC_MSG_RESULT([yes])
-    else
-        AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
-    fi
-else
-    AC_MSG_RESULT([internal])
-    SYSTEM_HSQLDB=NO
-    BUILD_TYPE="$BUILD_TYPE HSQLDB"
-fi
-AC_SUBST(SYSTEM_HSQLDB)
-AC_SUBST(HSQLDB_JAR)
-fi
 
 dnl ===================================================================
 dnl Check for PostgreSQL stuff
@@ -5442,156 +4754,6 @@
 AC_SUBST(POSTGRESQL_LIB)
 
 dnl ===================================================================
-dnl Check for system beanshell
-dnl ===================================================================
-if test "$with_java" != "no"; then
-AC_MSG_CHECKING([which beanshell to use])
-if test "$with_system_beanshell" = "yes"; then
-    AC_MSG_RESULT([external])
-    SYSTEM_BSH=YES
-    if test -z $BSH_JAR; then
-        BSH_JAR=/usr/share/java/bsh.jar
-    fi
-    AC_CHECK_FILE($BSH_JAR, [],
-               [AC_MSG_ERROR(bsh.jar not found.)], [])
-else
-    AC_MSG_RESULT([internal])
-    SYSTEM_BSH=NO
-    BUILD_TYPE="$BUILD_TYPE BSH"
-fi
-fi
-AC_SUBST(SYSTEM_BSH)
-AC_SUBST(BSH_JAR)
-
-
-dnl ===================================================================
-dnl Check for system saxon
-dnl ===================================================================
-if test "$with_java" != "no"; then
-AC_MSG_CHECKING([which saxon to use])
-if test "$with_system_saxon" = "yes"; then
-    AC_MSG_RESULT([external])
-    SYSTEM_SAXON=YES
-    if test -z $SAXON_JAR; then
-        AC_CHECK_FILE(/usr/share/java/saxon9.jar,
-            [ SAXON_JAR=/usr/share/java/saxon9.jar ],
-            [
-              AC_CHECK_FILE(/usr/share/java/saxon.jar,
-                [ SAXON_JAR=/usr/share/java/saxon.jar ],
-                [ AC_CHECK_FILE(/usr/share/java/saxon9.jar,
-                    [ SAXON_JAR=/usr/share/java/saxon9.jar ],
-                    [ AC_MSG_ERROR(saxon.jar replacement not found)]
-                  )
-                ]
-              )
-            ]
-          )
-    else
-        AC_CHECK_FILE($SAXON_JAR, [],
-               [AC_MSG_ERROR(saxon.jar replacement not found.)], [])
-    fi
-    if test -n "$SERIALIZER_JAR"; then
-        AC_CHECK_FILE($SERIALIZER_JAR, [],
-               [AC_MSG_ERROR(serializer.jar not found.)], [])
-        AC_SUBST(SERIALIZER_JAR)
-    fi
-
-    dnl Saxon comes in two practically available versions, the out-of-date saxonb which
-    dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he
-    dnl "home edition" version, which is crippled to not support those Java extensions.
-    dnl And as an aside the he one also needs to be tweaked to include
-    dnl a META-INF/services to broadcast that it supports the jaxp transform factory
-
-    AC_MSG_CHECKING([if saxon works])
-    cat > saxontest.java <<_ACEOF
-[import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.stream.StreamSource;
-import java.io.*;
-
-import net.sf.saxon.FeatureKeys;
-
-class saxontest {
-    public static void main(String[] args) {
-      System.setProperty("javax.xml.transform.TransformerFactory",
-        "net.sf.saxon.TransformerFactoryImpl");
-      try {
-        TransformerFactory tfactory = TransformerFactory.newInstance();
-    // some external saxons (Debian, Ubuntu, ...) have this disabled
-    // per default
-    tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
-        System.out.println("TransformerFactory is" +
-          tfactory.getClass().getName());
-        Transformer transformer = tfactory.newTransformer(
-          new StreamSource(new File(args[0])));
-      } catch(Exception e){
-        e.printStackTrace(System.err);
-        System.exit(-1);
-      }
-      System.exit(0);
-    }
-}
-]
-_ACEOF
-
-    cat > saxontest.xsl<<_ACEOF
-[<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
-  <xsl:value-of select="math:sqrt(1)" xmlns:math="java:java.lang.Math"/>
- </xsl:template>
-</xsl:stylesheet>
-]
-_ACEOF
-
-    javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2"
-    AC_TRY_EVAL(javac_cmd)
-    if test $? = 0 && test -f ./saxontest.class ; then
-        java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2"
-        AC_TRY_EVAL(java_cmd)
-        if test $? = 0; then
-            AC_MSG_RESULT([yes])
-        else
-            cat saxontest.java >&5
-            AC_MSG_RESULT([no])
-            AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb])
-        fi
-    else
-        AC_MSG_RESULT([no])
-        cat saxontest.java >&5
-        AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar])
-    fi
-else
-    AC_MSG_RESULT([internal])
-    SYSTEM_SAXON=NO
-    NEED_SAXON=TRUE
-fi
-fi
-AC_SUBST(SYSTEM_SAXON)
-AC_SUBST(SAXON_JAR)
-
-if test -n "$NEED_SAXON"; then
-    BUILD_TYPE="$BUILD_TYPE SAXON"
-fi
-
-# ===================================================================
-# Check whether to build stax
-# ===================================================================
-AC_MSG_CHECKING([whether building the stax is required])
-BUILD_STAX=NO
-if test -z "$SOLAR_JAVA"; then
-    AC_MSG_RESULT([no (java disabled)])
-elif test "$SYSTEM_SAXON" = "YES"; then
-    AC_MSG_RESULT([no (already provided by system saxon)])
-elif test -f "./stax/download/jsr173_1.0_api.jar"; then
-    AC_MSG_RESULT([no (will use the prebuilt stax/download/jsr173_1.0_api.jar)])
-else
-    BUILD_STAX=YES
-    AC_MSG_RESULT([yes (no system saxon and no prebuilt copy)])
-fi
-AC_SUBST(BUILD_STAX)
-
-dnl ===================================================================
 dnl Check for system curl
 dnl ===================================================================
 AC_MSG_CHECKING([which libcurl to use])
@@ -7297,340 +6459,6 @@
    BUILD_TYPE="$BUILD_TYPE SDEXT"
 fi
 
-AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
-if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
-  AC_MSG_RESULT([yes])
-  AC_MSG_CHECKING([for swext module])
-  ENABLE_MEDIAWIKI=YES
-  BUILD_TYPE="$BUILD_TYPE SWEXT"
-  if test  "x$with_java" = "xno"; then
-    AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
-  fi
-else
-  AC_MSG_RESULT([no])
-  ENABLE_MEDIAWIKI=NO
-  SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
-fi
-AC_SUBST(ENABLE_MEDIAWIKI)
-
-if test "$ENABLE_MEDIAWIKI" = "YES"; then
-    AC_MSG_CHECKING([which Servlet API Jar to use])
-    if test "$with_system_servlet_api" = "yes"; then
-        AC_MSG_RESULT([external])
-        SYSTEM_SERVLETAPI=YES
-        if test -z "$SERVLETAPI_JAR"; then
-            SERVLETAPI_JAR=/usr/share/java/servlet-api.jar
-        fi
-        AC_CHECK_FILE($SERVLETAPI_JAR, [],
-              [AC_MSG_ERROR(servlet-api.jar not found.)], [])
-    else
-        AC_MSG_RESULT([internal])
-        SYSTEM_SERVLETAPI=NO
-        BUILD_TYPE="$BUILD_TYPE TOMCAT"
-    fi
-fi
-AC_SUBST(SYSTEM_SERVLETAPI)
-AC_SUBST(SERVLETAPI_JAR)
-
-AC_MSG_CHECKING([whether to build the Report Builder extension])
-if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
-    AC_MSG_RESULT([yes])
-    ENABLE_REPORTBUILDER=YES
-    AC_MSG_CHECKING([for reportbuilder module])
-    AC_MSG_CHECKING([which jfreereport libs to use])
-    if test "$with_system_jfreereport" = "yes"; then
-        SYSTEM_JFREEREPORT=YES
-        AC_MSG_RESULT([external])
-        if test -z $SAC_JAR; then
-            SAC_JAR=/usr/share/java/sac.jar
-        fi
-        AC_CHECK_FILE($SAC_JAR, [],
-             [AC_MSG_ERROR(sac.jar not found.)], [])
-
-        if test -z $LIBXML_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar,
-                [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/libxml.jar,
-                       [ LIBXML_JAR=/usr/share/java/libxml.jar ],
-                       [AC_MSG_ERROR(libxml.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBXML_JAR, [],
-                 [AC_MSG_ERROR(libxml.jar not found.)], [])
-        fi
-
-        if test -z $FLUTE_JAR; then
-            AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar,
-                [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/flute.jar,
-                        [ FLUTE_JAR=/usr/share/java/flute.jar ],
-                        [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($FLUTE_JAR, [],
-                 [AC_MSG_ERROR(flute-1.3.0.jar not found.)], [])
-        fi
-
-        if test -z $JFREEREPORT_JAR; then
-            AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar,
-                [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/flow-engine.jar,
-                        [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ],
-                        [AC_MSG_ERROR(jfreereport.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($JFREEREPORT_JAR, [],
-                 [AC_MSG_ERROR(jfreereport.jar not found.)], [])
-        fi
-
-        if test -z $LIBLAYOUT_JAR; then
-            AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar,
-                [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/liblayout.jar,
-                        [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ],
-                        [AC_MSG_ERROR(liblayout.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBLAYOUT_JAR, [],
-                 [AC_MSG_ERROR(liblayout.jar not found.)], [])
-        fi
-
-        if test -z $LIBLOADER_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar,
-                [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/libloader.jar,
-                       [ LIBLOADER_JAR=/usr/share/java/libloader.jar ],
-                       [AC_MSG_ERROR(libloader.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBLOADER_JAR, [],
-                [AC_MSG_ERROR(libloader.jar not found.)], [])
-        fi
-
-        if test -z $LIBFORMULA_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar,
-                 [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ],
-                 [
-                     AC_CHECK_FILE(/usr/share/java/libformula.jar,
-                         [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ],
-                         [AC_MSG_ERROR(libformula.jar replacement not found.)]
-                     )
-                 ]
-            )
-        else
-            AC_CHECK_FILE($LIBFORMULA_JAR, [],
-                [AC_MSG_ERROR(libformula.jar not found.)], [])
-        fi
-
-        if test -z $LIBREPOSITORY_JAR; then
-            AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar,
-                [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/librepository.jar,
-                        [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ],
-                        [AC_MSG_ERROR(librepository.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBREPOSITORY_JAR, [],
-                [AC_MSG_ERROR(librepository.jar not found.)], [])
-        fi
-
-        if test -z $LIBFONTS_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar,
-                [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/libfonts.jar,
-                        [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ],
-                        [AC_MSG_ERROR(libfonts.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBFONTS_JAR, [],
-                [AC_MSG_ERROR(libfonts.jar not found.)], [])
-        fi
-
-        if test -z $LIBSERIALIZER_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar,
-                [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/libserializer.jar,
-                        [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ],
-                        [AC_MSG_ERROR(libserializer.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBSERIALIZER_JAR, [],
-                [AC_MSG_ERROR(libserializer.jar not found.)], [])
-        fi
-
-
-        if test -z $LIBBASE_JAR; then
-            AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar,
-                [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ],
-                [
-                    AC_CHECK_FILE(/usr/share/java/libbase.jar,
-                        [ LIBBASE_JAR=/usr/share/java/libbase.jar ],
-                        [AC_MSG_ERROR(libbase.jar replacement not found.)]
-                    )
-                ]
-            )
-        else
-            AC_CHECK_FILE($LIBBASE_JAR, [],
-                [AC_MSG_ERROR(libbase.jar not found.)], [])
-        fi
-
-    else
-        AC_MSG_RESULT([internal])
-        AC_MSG_CHECKING([for jfreereport module])
-        SYSTEM_JFREEREPORT=NO
-        BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
-    fi
-    BUILD_TYPE="$BUILD_TYPE REPORTBUILDER"
-else
-    AC_MSG_RESULT([no])
-    ENABLE_REPORTBUILDER=NO
-    SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN"
-    SYSTEM_JFREEREPORT=NO
-fi
-AC_SUBST(ENABLE_REPORTBUILDER)
-AC_SUBST(SYSTEM_JFREEREPORT)
-AC_SUBST(SAC_JAR)
-AC_SUBST(LIBXML_JAR)
-AC_SUBST(FLUTE_JAR)
-AC_SUBST(JFREEREPORT_JAR)
-AC_SUBST(LIBBASE_JAR)
-AC_SUBST(LIBLAYOUT_JAR)
-AC_SUBST(LIBLOADER_JAR)
-AC_SUBST(LIBFORMULA_JAR)
-AC_SUBST(LIBREPOSITORY_JAR)
-AC_SUBST(LIBFONTS_JAR)
-AC_SUBST(LIBSERIALIZER_JAR)
-
-# this has to be here because both the Wiki Publisher and the SRB use
-# commons-logging
-if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
-    AC_MSG_CHECKING([which Apache commons-* libs to use])
-    if test "$with_system_apache_commons" = "yes"; then
-        SYSTEM_APACHE_COMMONS=YES
-        AC_MSG_RESULT([external])
-        if test "$ENABLE_MEDIAWIKI" = "YES"; then
-            if test -z $COMMONS_CODEC_JAR; then
-                AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar,
-                    [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ],
-                    [
-                        AC_CHECK_FILE(/usr/share/java/commons-codec.jar,
-                            [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ],
-                            [AC_MSG_ERROR(commons-codec.jar replacement not found.)]
-                        )
-                    ]
-                )
-            else
-                AC_CHECK_FILE($COMMONS_CODEC_JAR, [],
-                    [AC_MSG_ERROR(commons-codec.jar not found.)], [])
-            fi
-
-            if test -z $COMMONS_LANG_JAR; then
-                AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar,
-                    [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ],
-                    [
-                        AC_CHECK_FILE(/usr/share/java/commons-lang.jar,
-                            [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ],
-                            [AC_MSG_ERROR(commons-lang.jar replacement not found.)]
-                            )
-                    ]
-                )
-            else
-                AC_CHECK_FILE($COMMONS_LANG_JAR, [],
-                    [AC_MSG_ERROR(commons-lang.jar not found.)], [])
-            fi
-
-            if test -z $COMMONS_HTTPCLIENT_JAR; then
-                AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar,
-                    [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ],
-                    [
-                        AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar,
-                            [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ],
-                            [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)]
-                        )
-                    ]
-                )
-            else
-                AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [],
-                    [AC_MSG_ERROR(commons-httpclient.jar not found.)], [])
-            fi
-        fi
-        if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then
-            if test -z $COMMONS_LOGGING_JAR; then
-                AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar,
-                   [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ],
-                   [
-                        AC_CHECK_FILE(/usr/share/java/commons-logging.jar,
-                            [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ],
-                            [AC_MSG_ERROR(commons-logging.jar replacement not found.)]
-                        )
-                    ]
-                )
-            else
-                AC_CHECK_FILE($COMMONS_LOGGING_JAR, [],
-                    [AC_MSG_ERROR(commons-logging.jar not found.)], [])
-            fi
-        fi
-    else
-        AC_MSG_RESULT([internal])
-        SYSTEM_APACHE_COMMONS=NO
-        BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT"
-    fi
-fi
-AC_SUBST(SYSTEM_APACHE_COMMONS)
-AC_SUBST(COMMONS_CODEC_JAR)
-AC_SUBST(COMMONS_LANG_JAR)
-AC_SUBST(COMMONS_HTTPCLIENT_JAR)
-AC_SUBST(COMMONS_LOGGING_JAR)
-
-# scripting provider for BeanShell extension?
-AC_MSG_CHECKING([whether to build extension for support of scripts in BeanShell])
-if test "x$enable_ext_scripting_beanshell" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
-   AC_MSG_RESULT([yes])
-   ENABLE_SCRIPTING_BEANSHELL=YES
-else
-   AC_MSG_RESULT([no])
-   ENABLE_SCRIPTING_BEANSHELL=NO
-   SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_BEANSHELL"
-fi
-AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
-
-# scripting provider for JavaScript extension?
-AC_MSG_CHECKING([whether to build extension for support of scripts in JavaScript])
-if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
-   AC_MSG_RESULT([yes])
-   ENABLE_SCRIPTING_JAVASCRIPT=YES
-   BUILD_TYPE="$BUILD_TYPE RHINO"
-else
-   AC_MSG_RESULT([no])
-   ENABLE_SCRIPTING_JAVASCRIPT=NO
-   SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_SCRIPTING_JAVASCRIPT"
-fi
-AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
-
 dnl Scripting provider for Python extension?
 dnl We always provide this unless we have disabled Python completely
 if test $enable_python = no; then
@@ -8208,18 +7036,6 @@
 AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK)
 
 dnl ===================================================================
-dnl Test whether to include NLPSolver extension
-dnl ===================================================================
-AC_MSG_CHECKING([for NLPSolver extension integration])
-if test "x$enable_ext_nlpsolver" = "xyes" -a "x$enable_extension_integration" != "xno" -a "x$with_java" != "xno"; then
-    BUILD_TYPE="$BUILD_TYPE NLPSOLVER"
-    SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER"
-    AC_MSG_RESULT([yes])
-else
-    AC_MSG_RESULT([no])
-fi
-
-dnl ===================================================================
 dnl Test whether to include LanguageTool extension
 dnl ===================================================================
 AC_MSG_CHECKING([for LanguageTool extension integration])
@@ -8949,248 +7765,6 @@
 AC_SUBST(SYSTEM_LIBJPEG)
 
 dnl ===================================================================
-dnl Check for runtime JVM search path
-dnl ===================================================================
-if test "$SOLAR_JAVA" != ""; then
-    AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
-    if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then
-        AC_MSG_RESULT([yes])
-        if ! test -d "$with_jvm_path"; then
-            AC_MSG_ERROR(["$with_jvm_path" not a directory])
-        fi
-        if ! test -d "$with_jvm_path"jvm; then
-            AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
-        fi
-        JVM_ONE_PATH_CHECK="$with_jvm_path"
-        AC_SUBST(JVM_ONE_PATH_CHECK)
-    else
-        AC_MSG_RESULT([no])
-    fi
-fi
-
-dnl ===================================================================
-dnl Test for the presence of Ant and that it works
-dnl ===================================================================
-
-if test "$SOLAR_JAVA" != ""; then
-    ANT_HOME=; export ANT_HOME
-    WITH_ANT_HOME=; export WITH_ANT_HOME
-    if test -z "$with_ant_home"; then
-        AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd])
-    else
-        if test "$_os" = "WINNT"; then
-            with_ant_home=`cygpath -u "$with_ant_home"`
-        fi
-        AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
-        WITH_ANT_HOME=$with_ant_home
-        ANT_HOME=$with_ant_home
-    fi
-
-    if test -z "$ANT"; then
-        AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
-    else
-        # resolve relative or absolute symlink
-        while test -h "$ANT"; do
-            a_cwd=`pwd`
-            a_basename=`basename "$ANT"`
-            a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
-            cd "`dirname "$ANT"`"
-            cd "`dirname "$a_script"`"
-            ANT="`pwd`"/"`basename "$a_script"`"
-            cd "$a_cwd"
-        done
-
-        AC_MSG_CHECKING([if $ANT works])
-        cat > conftest.java << EOF
-        public class conftest {
-            int testmethod(int a, int b) {
-                    return a + b;
-            }
-        }
-EOF
-
-        cat > conftest.xml << EOF
-        <project name="conftest" default="conftest">
-        <target name="conftest">
-            <javac srcdir="." includes="conftest.java">
-            </javac>
-        </target>
-        </project>
-EOF
-
-        oldJAVA_HOME=$JAVA_HOME
-        if test "$JAVACISGCJ" = "yes"; then
-            JAVA_HOME=; export JAVA_HOME
-            ant_gcj="-Dbuild.compiler=gcj"
-        fi
-        AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
-        if test $? = 0 && test -f ./conftest.class ; then
-            AC_MSG_RESULT([Ant works])
-            if test -z "$WITH_ANT_HOME"; then
-                ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
-                if test -z "$ANT_HOME"; then
-                    ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
-                fi
-            else
-                ANT_HOME="$WITH_ANT_HOME"
-            fi
-        else
-            echo "configure: Ant test failed" >&5
-            cat conftest.java >&5
-            cat conftest.xml >&5
-            AC_MSG_WARN([Ant does not work - Some Java projects will not build!])
-            ANT_HOME=""
-            echo "Ant does not work - Some Java projects will not build!" >>warn
-        fi
-        JAVA_HOME=$oldJAVA_HOME
-        rm -f conftest* core core.* *.core
-    fi
-    if test -z "$ANT_HOME"; then
-        ANT_HOME="NO_ANT_HOME"
-    fi
-    AC_SUBST(ANT_HOME)
-
-    dnl Checking for ant.jar
-    if test "$ANT_HOME" != "NO_ANT_HOME"; then
-        AC_MSG_CHECKING([Ant lib directory])
-        if test -f $ANT_HOME/lib/ant.jar; then
-            ANT_LIB="$ANT_HOME/lib"
-        else
-            if test -f $ANT_HOME/ant.jar; then
-                ANT_LIB="$ANT_HOME"
-            else
-                if test -f /usr/share/java/ant.jar; then
-                    ANT_LIB=/usr/share/java
-                else
-                    if test -f /usr/share/ant-core/lib/ant.jar; then
-                        ANT_LIB=/usr/share/ant-core/lib
-                    else
-                        if test -f $ANT_HOME/lib/ant/ant.jar; then
-                            ANT_LIB="$ANT_HOME/lib/ant"
-                        else
-                            if test -f /usr/share/lib/ant/ant.jar; then
-                                ANT_LIB=/usr/share/lib/ant
-                            else
-                                AC_MSG_ERROR([Ant libraries not found!])
-                            fi
-                        fi
-                    fi
-                fi
-            fi
-        fi
-        AC_MSG_RESULT([Ant lib directory found.])
-    fi
-    AC_SUBST(ANT_LIB)
-
-    ant_minver=1.6.0
-    ant_minminor1=`echo $ant_minver | cut -d"." -f2`
-
-    AC_MSG_CHECKING([whether Ant is >= $ant_minver])
-    ant_version=`"$ANT" -version | $AWK '{ print $4; }'`
-    ant_version_major=`echo $ant_version | cut -d. -f1`
-    ant_version_minor=`echo $ant_version | cut -d. -f2`
-    echo "configure: ant_version $ant_version " >&5
-    echo "configure: ant_version_major $ant_version_major " >&5
-    echo "configure: ant_version_minor $ant_version_minor " >&5
-    if test "$ant_version_major" -ge "2"; then
-        AC_MSG_RESULT([yes, $ant_version])
-    elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then
-        AC_MSG_RESULT([yes, $ant_version])
-    else
-        AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
-    fi
-
-    if test "$ENABLE_MEDIAWIKI" = "YES"; then
-        AC_MSG_CHECKING([whether Ant supports mapper type="regexp"])
-        rm -rf confdir
-        mkdir confdir
-        cat > conftest.java << EOF
-            public class conftest {
-                int testmethod(int a, int b) {
-                    return a + b;
-                }
-            }
-EOF
-
-        cat > conftest.xml << EOF
-            <project name="conftest" default="conftest">
-            <target name="conftest" depends="copytest">
-                <javac srcdir="." includes="conftest.java">
-                </javac>
-            </target>
-            <target name="copytest">
-                 <copy todir="confdir">
-                 <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
-                 <filterset/>
-                 <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/>
-                 </copy>
-            </target>
-            </project>
-EOF
-
-        if test "$JAVACISGCJ" = "yes"; then
-            JAVA_HOME=; export JAVA_HOME
-            ant_gcj="-Dbuild.compiler=gcj"
-        fi
-        AC_TRY_COMMAND("$ANT" $ant_gcj -buildfile conftest.xml 1>&2)
-        if test $? = 0 && test -f ./conftest.class ; then
-            AC_MSG_RESULT([yes])
-            rm -rf confdir
-        else
-            echo "configure: Ant test failed" >&5
-            cat conftest.java >&5
-            cat conftest.xml >&5
-            rm -rf confdir
-            AC_MSG_ERROR([no. Did you install ant-apache-regexp?])
-        fi
-    fi
-    rm -f conftest* core core.* *.core
-fi
-
-OOO_JUNIT_JAR=
-if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then
-    AC_MSG_CHECKING([for JUnit 4])
-    if test "$with_junit" = "yes"; then
-        if test -e /usr/share/java/junit4.jar; then
-            OOO_JUNIT_JAR=/usr/share/java/junit4.jar
-        else
-           if test -e /usr/share/lib/java/junit.jar; then
-              OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
-           else
-              OOO_JUNIT_JAR=/usr/share/java/junit.jar
-           fi
-        fi
-    else
-        OOO_JUNIT_JAR=$with_junit
-    fi
-    if test "$_os" = "WINNT"; then
-        OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
-    fi
-    "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \
-        grep org/junit/Before.class > /dev/null 2>&5
-    if test $? -eq 0; then
-        # check if either class-path entry is available for hamcrest or
-        # it's bundled
-        if "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" |$GREP -q hamcrest || \
-            "$UNZIP" -c "$OOO_JUNIT_JAR" META-INF/MANIFEST.MF |$GREP 'Class-Path:' | $GREP -q 'hamcrest'; then
-            AC_MSG_RESULT([$OOO_JUNIT_JAR])
-        else
-            AC_MSG_ERROR([your junit jar neither sets a classpath nor includes hamcrest; please
-provide a full junit jar or use --without-junit])
-        fi
-    else
-        AC_MSG_RESULT([no])
-        AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default
-location (/usr/share/java), specify its pathname via
---with-junit=..., or disable it via --without-junit])
-    fi
-    if test $OOO_JUNIT_JAR != ""; then
-	BUILD_TYPE="$BUILD_TYPE QADEVOOO"
-    fi
-fi
-AC_SUBST(OOO_JUNIT_JAR)
-
-dnl ===================================================================
 dnl Product version
 dnl ===================================================================
 AC_MSG_CHECKING([for product version])
