configure.ac |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 05591f7bb1aa9f11ac1ecb1becbac905425cd25d
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Fri Apr 19 14:40:20 2024 +0200
Commit:     Balazs Varga <balazs.varga.ext...@allotropia.de>
CommitDate: Wed Oct 2 19:37:03 2024 +0200

    look for java, javac and javadoc with the .exe suffix on windows
    
    while it doesn't make a difference from within cygwin or from within
    git-bash, it does affect checks from wsl into windows since the version
    without .exe isn't found/only the .exe does actually exist as a file<.
    Cygwin portion already explicitly checked for the .exe to determine
    whether the JDK home is valid, so just use it like that.
    
    Change-Id: Ifc0238f54ed4326de27840136589e64fcdb6f3e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166334
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174236
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>
    Tested-by: Balazs Varga <balazs.varga.ext...@allotropia.de>

diff --git a/configure.ac b/configure.ac
index 353edfb2053f..3dd65bca4f8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3493,6 +3493,8 @@ dnl 
===================================================================
 dnl Java support
 dnl ===================================================================
 AC_MSG_CHECKING([whether to build with Java support])
+javacompiler="javac"
+javadoc="javadoc"
 if test "$with_java" != "no"; then
     if test "$DISABLE_SCRIPTING" = TRUE; then
         AC_MSG_RESULT([no, overridden by --disable-scripting])
@@ -8622,13 +8624,17 @@ if test "$ENABLE_JAVA" != ""; then
             fi
             howfound="found automatically"
         else
-            with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
             howfound="you passed"
         fi
+        PathFormat "$with_jdk_home"
+        with_jdk_home="$formatted_path_unix"
 
         if ! test -f "$with_jdk_home/lib/jvm.lib" -a -f 
"$with_jdk_home/bin/java.exe"; then
             AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option (or 
fix the path) pointing to a $WIN_HOST_BITS-bit JDK >= 8])
         fi
+        with_java="java.exe"
+        javacompiler="javac.exe"
+        javadoc="javadoc.exe"
     fi
 
     # macOS: /usr/libexec/java_home helps to set the current JDK_HOME. 
Actually JDK_HOME should NOT be set where java (/usr/bin/java) is located.
@@ -8761,7 +8767,6 @@ dnl 
===================================================================
 dnl Checks for javac
 dnl ===================================================================
 if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
-    javacompiler="javac"
     : ${JAVA_SOURCE_VER=8}
     : ${JAVA_TARGET_VER=8}
     if test -z "$with_jdk_home"; then
@@ -8789,14 +8794,14 @@ dnl Checks for javadoc
 dnl ===================================================================
 if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
     if test -z "$with_jdk_home"; then
-        AC_PATH_PROG(JAVADOC, javadoc)
+        AC_PATH_PROG(JAVADOC, $javadoc)
     else
-        _javadoc_path="$with_jdk_home/bin/javadoc"
+        _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)
+            AC_PATH_PROG(JAVADOC, $javadoc)
         fi
     fi
     if test -z "$JAVADOC"; then

Reply via email to