Kaydet (Commit) 509bc5e5 authored tarafından Wol's avatar Wol Kaydeden (comit) Noel Grandin

Fix java home detection on gentoo

On gentoo (and some other distros?) /usr/bin/javac points at a script
that chooses the version of java to run. So when configure resolves
the link it doesn't end up where it expects to be. This mod detects
this situation, clears java_home, and lets it fall through to the next
test which completes successfully.

Change-Id: I7400ac06485475203abd584f60aed7eca81c7f90
Reviewed-on: https://gerrit.libreoffice.org/22847Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst f345a2c5
......@@ -7117,7 +7117,7 @@ if test "$ENABLE_JAVA" != ""; then
add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
fi
dnl now that we have the path to the real javac, make a JAVA_HOME out of it..
dnl now that we probably 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
......@@ -7126,6 +7126,11 @@ if test "$ENABLE_JAVA" != ""; then
JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
else
JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
dnl check that we have a directory as certain distros eg gentoo substitute javac for a script
dnl that checks which version to run
if test -f "$JAVA_HOME"; then
JAVA_HOME=""; # set JAVA_HOME to null if it's a file
fi
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment