diff options
-rw-r--r-- | acinclude.m4.in | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/acinclude.m4.in b/acinclude.m4.in index d85b119..e4bdd59 100644 --- a/acinclude.m4.in +++ b/acinclude.m4.in @@ -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) |