configure, win: Use Win/mixed path for JAVA_HOME
commit 08f3f447fb
Date: Wed Apr 22 12:43:32 2026 +0200
remove additional PathFormatUnix wrapper
adjusted the PathFormat function to set
$formatted_path_unix to Unix-style/Cygwin paths
when building in Cygwin.
However, for JAVA_HOME (used e.g. for the Java
Java include paths and linker flags/paths),
Windows/mixed style paths are needed.
Use $formatted_path instead of $formatted_path_unix
for these.
However, keep using a Unix path for directory
checks, as these wouldn't work with Windows
paths for the WSL-as-helper build.
Once Java 8 is no longer supported, these checks
can be dropped altogether as those directories
don't exist with Java >= 9 any more anyway,
see discussion in [1].
This addresses the following build error seen in
a clean Cygwin build on Windows:
D:/src/lo/master/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c(29): fatal error C1083: Cannot open include file: 'jawt_md.h': No such file or directory
[1] https://gerrit.libreoffice.org/c/core/+/204766/comments/ff0973b2_f15fdaf3
Change-Id: I11fdd489e49e26a1b99ff9fb822bf8eb3923f399
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204766
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
+5
-3
@@ -9473,7 +9473,7 @@ _ACEOF
|
||||
fi
|
||||
fi
|
||||
PathFormat "$JAVA_HOME"
|
||||
JAVA_HOME="$formatted_path_unix"
|
||||
JAVA_HOME="$formatted_path"
|
||||
fi
|
||||
|
||||
if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
|
||||
@@ -16345,10 +16345,12 @@ else
|
||||
fi
|
||||
pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/$WIN_BUILD_ARCH" "before"
|
||||
if test "$ENABLE_JAVA" != ""; then
|
||||
if test -d "$JAVA_HOME/jre/bin/client"; then
|
||||
PathFormat "$JAVA_HOME"
|
||||
JAVA_HOME_unix="$formatted_path_unix"
|
||||
if test -d "$JAVA_HOME_unix/jre/bin/client"; then
|
||||
pathmunge "$JAVA_HOME/jre/bin/client" "before"
|
||||
fi
|
||||
if test -d "$JAVA_HOME/jre/bin/hotspot"; then
|
||||
if test -d "$JAVA_HOME_unix/jre/bin/hotspot"; then
|
||||
pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
|
||||
fi
|
||||
pathmunge "$JAVA_HOME/bin" "before"
|
||||
|
||||
Reference in New Issue
Block a user