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>
(cherry picked from commit 0e86934fc8)
r14.0.x
Slávek Banko 7 years ago
parent b5373d6ec2
commit 5200a0cc9d

@ -5766,8 +5766,11 @@ if test "x$kde_java_bindir" != "xno"; then
if test ! -x "$kde_java_bindir/javac"; 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.]) AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
fi fi
if test ! -x "$kde_java_bindir/javah"; then kde_javac_h=`$kde_java_bindir/javac -h 2>&1 | grep "invalid flag"`
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.]) 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 fi
if test ! -x "$kde_java_bindir/jar"; then 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.]) 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]) AC_MSG_RESULT([none found])
fi 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(JAVAC)
AC_SUBST(JAVA8)
AC_SUBST(JAVAH) AC_SUBST(JAVAH)
AC_SUBST(JAR) AC_SUBST(JAR)
AC_SUBST(JVMLIBS) AC_SUBST(JVMLIBS)

Loading…
Cancel
Save