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