diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-05-07 09:42:22 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-05-27 11:40:20 +0200 |
commit | 941b567a41569260fef14a7337511e8f42337323 (patch) | |
tree | fe04ef41038df279689e2a979dc28e7fe5b37670 /configure.ac | |
parent | 77140de3fe925f75620e94dbd848b1c925935fb5 (diff) |
tdf#131572 Add java 9 module info for libreoffice.jar
Add a java module named "org.libreoffice.uno" for this jar.
This needs to be compiled with Java 9.
But since we want to keep b/c with Java 8,
the rest of the jar has to be compiled with Java 8.
This bumps the *build* requirement to Java 9 while keeping
the *runtime* requirement at Java 8.
The gbuild JavaClassSet class is changed to invoke javac twice,
where the 2nd invocation compiles with --release 9 and a --patch-modules
argument so that it finds the results of the first invocation and also
the javamaker generated files in CustomTargets.
Change-Id: I888f5dbe097cc37136e68db5919939877c981862
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91105
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index 911cf72ed52d..5ba7b47d8963 100644 --- a/configure.ac +++ b/configure.ac @@ -2007,7 +2007,7 @@ AC_ARG_WITH(linker-hash-style, AC_ARG_WITH(jdk-home, AS_HELP_STRING([--with-jdk-home=<absolute path to JDK home>], - [If you have installed JDK 8 or later on your system please supply the + [If you have installed JDK 9 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.]), ,) @@ -7461,20 +7461,12 @@ if test "$ENABLE_JAVA" != ""; then reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome" _jdk_home=$regvalue fi - if test -z "$with_jdk_home"; then - for ver in 1.8; do - reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome" - if test -n "$regvalue"; then - _jdk_home=$regvalue - break - fi - done - fi + if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then with_jdk_home="$_jdk_home" howfound="found automatically" else - AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK]) + AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK >= 9]) fi else test "$build_os" = "cygwin" && with_jdk_home=`win_short_path_for_make "$with_jdk_home"` @@ -7556,24 +7548,7 @@ if test "$ENABLE_JAVA" != ""; then 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.ac]) 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 10800; then - AC_MSG_ERROR([IBM JDK is too old, you need at least 8]) - fi - - AC_MSG_RESULT([found (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 + AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac]) else JDK=sun @@ -7581,10 +7556,10 @@ you must use the "--with-jdk-home" configure option explicitly]) _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED '/^$/d' | $SED s/[[-A-Za-z]]*//` _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` - if test "$_jdk_ver" -lt 10800; then - AC_MSG_ERROR([JDK is too old, you need at least 8]) + if test "$_jdk_ver" -lt 10900; then + AC_MSG_ERROR([JDK is too old, you need at least 9]) fi - if test "$_jdk_ver" -gt 10800; then + if test "$_jdk_ver" -gt 10900; then JAVA_CLASSPATH_NOT_SET=TRUE fi @@ -7600,7 +7575,7 @@ you must use the "--with-jdk-home" configure option explicitly]) JAVAFLAGS=-J-Xmx128M fi else - AC_MSG_ERROR([Java not found. You need at least JDK 8]) + AC_MSG_ERROR([Java not found. You need at least JDK 9]) fi else dnl Java disabled |