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