summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSophia Schröder <sophia.schroeder@libreoffice.org>2018-04-11 15:39:57 +0100
committerTamás Bunth <btomi96@gmail.com>2018-04-12 09:09:37 +0200
commitf4fc28aedf9c673f368ddc00f3279f6d54c1a654 (patch)
treeafb5988b77618f0be0f91df8de70e0de779caec2 /configure.ac
parent189d3e10c7d25138c58f28ca4f5c041f1a9f4494 (diff)
Revert "Remove dead HSQLDB driver"
We cannot silently convert user data or their used file formats and then await them to accept it or reinstall an older version. Let us make a soft change instead of an hard (heart) break and avoid us to been attacked with fire and forks from our users. This reverts commit 8d381ae8d6c742a7e15bf7ad9e07b65f81728ef6. Change-Id: Ia153640935e355771acb85cf652f8fe4c21fafbb Reviewed-on: https://gerrit.libreoffice.org/52731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac78
1 files changed, 78 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ce3dcd67f1d1..e4f2bb53770d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1739,6 +1739,15 @@ AC_ARG_WITH(system-libtommath,
[Use libtommath already on system]),,
[with_system_libtommath="$with_system_libs"])
+AC_ARG_WITH(system-hsqldb,
+ AS_HELP_STRING([--with-system-hsqldb],
+ [Use hsqldb already on system.]))
+
+AC_ARG_WITH(hsqldb-jar,
+ AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
+ [Specify path to jarfile manually.]),
+ HSQLDB_JAR=$withval)
+
libo_FUZZ_ARG_ENABLE(scripting-beanshell,
AS_HELP_STRING([--disable-scripting-beanshell],
[Disable support for scripts in BeanShell.]),
@@ -8419,6 +8428,75 @@ fi
AC_SUBST(SYSTEM_MYSQL_CONNECTOR_CPP)
dnl ===================================================================
+dnl Check for system hsqldb
+dnl ===================================================================
+if test "$with_java" != "no"; then
+ HSQLDB_USE_JDBC_4_1=
+ AC_MSG_CHECKING([which hsqldb to use])
+ if test "$with_system_hsqldb" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_HSQLDB=TRUE
+ if test -z $HSQLDB_JAR; then
+ HSQLDB_JAR=/usr/share/java/hsqldb.jar
+ fi
+ if ! test -f $HSQLDB_JAR; then
+ AC_MSG_ERROR(hsqldb.jar not found.)
+ fi
+ 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=
+ BUILD_TYPE="$BUILD_TYPE HSQLDB"
+ AC_MSG_CHECKING([whether hsqldb should be built with JDBC 4.1])
+ javanumver=`$JAVAINTERPRETER -version 2>&1 | $AWK -v num=true -f $SRC_ROOT/solenv/bin/getcompver.awk`
+ if expr "$javanumver" '>=' 000100060000 > /dev/null; then
+ AC_MSG_RESULT([yes])
+ HSQLDB_USE_JDBC_4_1=TRUE
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+ AC_SUBST(SYSTEM_HSQLDB)
+ AC_SUBST(HSQLDB_JAR)
+ AC_SUBST([HSQLDB_USE_JDBC_4_1])
+fi
+
+dnl ===================================================================
dnl Check for PostgreSQL stuff
dnl ===================================================================
if test "x$enable_postgresql_sdbc" != "xno"; then