1 dnl Available from the GNU Autoconf Macro Archive at:
2 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_javac_works.html
4 AC_DEFUN([AC_PROG_JAVAC_WORKS],[
5 AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
8 cat << \EOF > $JAVA_TEST
9 /* [#]line __oline__ "configure" */
13 if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
14 ac_cv_prog_javac_works=yes
16 AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
17 echo "configure: failed program was:" >&AC_FD_CC
18 cat $JAVA_TEST >&AC_FD_CC
20 rm -f $JAVA_TEST $CLASS_TEST