Add check if Java is >= 8

With Java >= 8 instead of javah, it is preferred to use javac
with option -h. In later Java versions, javah is removed.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 7 years ago
parent 04c35f89e0
commit 0e86934fc8

@ -5766,8 +5766,11 @@ if test "x$kde_java_bindir" != "xno"; then
if test ! -x "$kde_java_bindir/javac"; then
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
fi
if test ! -x "$kde_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
kde_javac_h=`$kde_java_bindir/javac -h 2>&1 | grep "invalid flag"`
if test -n "$kde_javac_h"; then
if test ! -x "$kde_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
fi
if test ! -x "$kde_java_bindir/jar"; then
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
@ -5875,7 +5878,23 @@ else
AC_MSG_RESULT([none found])
fi
AC_MSG_CHECKING([if Java is >= 8])
JAVA8=false
if test -x "$kde_java_bindir/javac"; then
kde_javac_h=`$kde_java_bindir/javac -h 2>&1 | grep "invalid flag"`
if test -z "$kde_javac_h"; then
JAVA8=true
JAVAH=
fi
fi
if $JAVA8; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(JAVAC)
AC_SUBST(JAVA8)
AC_SUBST(JAVAH)
AC_SUBST(JAR)
AC_SUBST(JVMLIBS)

Loading…
Cancel
Save