dnl @synopsis AX_PROG_JAVAVM dnl Mark Holder changed name from from AX_PROG_JAVA to AX_PROG_JAVAVM dnl Here is a summary of the main macros: dnl dnl AX_PROG_JAVAC: finds a Java compiler. dnl dnl AX_PROG_JAVAVM: finds a Java virtual machine. dnl dnl AC_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!). dnl dnl AC_CHECK_RQRD_CLASS: finds if we have the given class and stops otherwise. dnl dnl AC_TRY_COMPILE_JAVA: attempt to compile user given source. dnl dnl AC_TRY_RUN_JAVA: attempt to compile and run user given source. dnl dnl AC_JAVA_OPTIONS: adds Java configure options. dnl dnl AC_PROG_JAVAAC_PROG_JAVAVM tests an existing Java virtual machine. It uses the dnl environment variable JAVA then tests in sequence various common Java dnl virtual machines. For political reasons, it starts with the free ones. dnl You *must* call [AX_PROG_JAVAC] before. dnl dnl If you want to force a specific VM: dnl dnl - at the configure.in level, set JAVA=yourvm before calling AX_PROG_JAVAVM dnl (but after AC_INIT) dnl dnl - at the configure level, setenv JAVA dnl dnl You can use the JAVA variable in your Makefile.in, with @JAVA@. dnl dnl *Warning*: its success or failure can depend on a proper setting of the dnl CLASSPATH env. variable. dnl dnl TODO: allow to exclude virtual machines (rationale: most Java programs dnl cannot run with some VM like kaffe). dnl dnl Note: This is part of the set of autoconf M4 macros for Java programs. dnl It is VERY IMPORTANT that you download the whole set, some dnl macros depend on other. Unfortunately, the autoconf archive does not dnl support the concept of set of macros, so I had to break it for dnl submission. dnl dnl A Web page, with a link to the latest CVS snapshot is at dnl . dnl dnl This is a sample configure.in dnl Process this file with autoconf to produce a configure script. dnl dnl AC_INIT(UnTag.java) dnl dnl dnl Checks for programs. dnl AC_CHECK_CLASSPATH dnl AX_PROG_JAVAC dnl AC_PROG_JAVAAC_PROG_JAVAVM dnl dnl dnl Checks for classes dnl AC_CHECK_RQRD_CLASS(org.xml.sax.Parser) dnl AC_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver) dnl dnl AC_OUTPUT(Makefile) dnl dnl @author Stephane Bortzmeyer dnl @version $Id: ac_prog_java.m4,v 1.5 2000/01/02 16:07:12 bortz Exp $ dnl AC_DEFUN([AX_PROG_JAVAVM],[ AC_REQUIRE([AC_EXEEXT])dnl if test x$JAVAPREFIX = x; then test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT) else test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX) fi test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH]) AX_PROG_JAVAVM_WORKS AC_PROVIDE([$0])dnl ])