1 dnl taken from http://ac-archive.sourceforge.net/
3 dnl @synopsis AC_PROG_JAVAC_WORKS
7 dnl Note: This is part of the set of autoconf M4 macros for Java
8 dnl programs. It is VERY IMPORTANT that you download the whole set,
9 dnl some macros depend on other. Unfortunately, the autoconf archive
10 dnl does not support the concept of set of macros, so I had to break it
11 dnl for submission. The general documentation, as well as the sample
12 dnl configure.in, is included in the AC_PROG_JAVA macro.
15 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
16 dnl @version 2000-07-19
17 dnl @license GPLWithACException
19 AC_DEFUN([AC_PROG_JAVAC_WORKS],[
20 AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
23 cat << \EOF > $JAVA_TEST
24 /* [#]line __oline__ "configure" */
28 if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
29 ac_cv_prog_javac_works=yes
31 AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
32 echo "configure: failed program was:" >&AC_FD_CC
33 cat $JAVA_TEST >&AC_FD_CC
35 rm -f $JAVA_TEST $CLASS_TEST