dnl @synopsis AC_PROG_JAVAC
dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the
dnl environment variable JAVAC then tests in sequence various common
dnl Java compilers. For political reasons, it starts with the free
dnl If you want to force a specific compiler:
dnl - at the configure.in level, set JAVAC=yourcompiler before calling
dnl - at the configure level, setenv JAVAC
dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
dnl *Warning*: its success or failure can depend on a proper setting of
dnl the CLASSPATH env. variable.
dnl TODO: allow to exclude compilers (rationale: most Java programs
dnl cannot compile with some compilers like guavac).
dnl Note: This is part of the set of autoconf M4 macros for Java
dnl programs. It is VERY IMPORTANT that you download the whole set,
dnl some macros depend on other. Unfortunately, the autoconf archive
dnl does not support the concept of set of macros, so I had to break it
dnl for submission. The general documentation, as well as the sample
dnl configure.in, is included in the AC_PROG_JAVA macro.
dnl @category Java
dnl @author Stephane Bortzmeyer <firstname.lastname@example.org>
dnl @version 2000-07-19
dnl @license GPLWithACException
if test "x$JAVAPREFIX" = x; then
test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)
test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX)
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])