diff options
Diffstat (limited to 'libjava/classpath/m4/ac_prog_java.m4')
-rw-r--r-- | libjava/classpath/m4/ac_prog_java.m4 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libjava/classpath/m4/ac_prog_java.m4 b/libjava/classpath/m4/ac_prog_java.m4 new file mode 100644 index 00000000000..356d99d8084 --- /dev/null +++ b/libjava/classpath/m4/ac_prog_java.m4 @@ -0,0 +1,17 @@ +dnl Available from the GNU Autoconf Macro Archive at: +dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_java.html +dnl +dnl Changes for gjdoc: check for "kaffe, gij, java", not only "kaffe, java" +dnl Changes for GNU Classpath: check for "cacao, jamvm" as well +dnl +AC_DEFUN([AC_PROG_JAVA],[ +AC_REQUIRE([AC_EXEEXT])dnl +if test "x$JAVAPREFIX" = x; then + test "x$JAVA" = x && AC_CHECK_PROGS(JAVA, cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT) +else + test "x$JAVA" = x && AC_CHECK_PROGS(JAVA, cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT, $JAVAPREFIX) +fi +test "x$JAVA" = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH]) +AC_PROG_JAVA_WORKS +AC_PROVIDE([$0])dnl +]) |