summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac16
1 files changed, 7 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 4e422e2648b8..368ccb84daa4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8028,19 +8028,17 @@ if test "$ENABLE_JAVA" != ""; then
if test -n "$regvalue"; then
ver=$regvalue
reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
- reg_jdk_home=$regvalue
- fi
-
- if test -f "$reg_jdk_home/lib/jvm.lib" -a -f "$reg_jdk_home/bin/java.exe"; then
- with_jdk_home="$reg_jdk_home"
- howfound="found automatically"
- else
- AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $WIN_HOST_BITS-bit JDK >= 9])
+ with_jdk_home=$regvalue
fi
+ howfound="found automatically"
else
- test "$build_os" = "cygwin" && with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
+ with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
howfound="you passed"
fi
+
+ 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 >= 9])
+ fi
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.