1dnl @synopsis AC_PROG_JAVAC 2dnl 3dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the environment 4dnl variable JAVAC then tests in sequence various common Java compilers. For 5dnl political reasons, it starts with the free ones. 6dnl 7dnl If you want to force a specific compiler: 8dnl 9dnl - at the configure.in level, set JAVAC=yourcompiler before calling 10dnl AC_PROG_JAVAC 11dnl 12dnl - at the configure level, setenv JAVAC 13dnl 14dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@. 15dnl 16dnl *Warning*: its success or failure can depend on a proper setting of the 17dnl CLASSPATH env. variable. 18dnl 19dnl TODO: allow to exclude compilers (rationale: most Java programs cannot compile 20dnl with some compilers like guavac). 21dnl 22dnl Note: This is part of the set of autoconf M4 macros for Java programs. 23dnl It is VERY IMPORTANT that you download the whole set, some 24dnl macros depend on other. Unfortunately, the autoconf archive does not 25dnl support the concept of set of macros, so I had to break it for 26dnl submission. 27dnl The general documentation, as well as the sample configure.in, is 28dnl included in the AC_PROG_JAVA macro. 29dnl 30dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr> 31dnl @version $Id: ac_prog_javac.m4,v 12.0 2004/11/17 03:43:38 bostic Exp $ 32dnl 33AC_DEFUN([AC_PROG_JAVAC],[ 34AC_REQUIRE([AC_EXEEXT])dnl 35if test "x$JAVAPREFIX" = x; then 36 test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, javac$EXEEXT "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT) 37else 38 test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, javac$EXEEXT "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT, $JAVAPREFIX) 39fi 40test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH]) 41AC_PROG_JAVAC_WORKS 42AC_PROVIDE([$0])dnl 43]) 44