jamie@89: ##### http://autoconf-archive.cryp.to/ac_prog_javac_works.html jamie@89: # jamie@89: # SYNOPSIS jamie@89: # jamie@89: # AC_PROG_JAVAC_WORKS jamie@89: # jamie@89: # DESCRIPTION jamie@89: # jamie@89: # Internal use ONLY. jamie@89: # jamie@89: # Note: This is part of the set of autoconf M4 macros for Java jamie@89: # programs. It is VERY IMPORTANT that you download the whole set, jamie@89: # some macros depend on other. Unfortunately, the autoconf archive jamie@89: # does not support the concept of set of macros, so I had to break it jamie@89: # for submission. The general documentation, as well as the sample jamie@89: # configure.in, is included in the AC_PROG_JAVA macro. jamie@89: # jamie@89: # LAST MODIFICATION jamie@89: # jamie@89: # 2000-07-19 jamie@89: # jamie@89: # COPYLEFT jamie@89: # jamie@89: # Copyright (c) 2000 Stephane Bortzmeyer jamie@89: # jamie@89: # This program is free software; you can redistribute it and/or jamie@89: # modify it under the terms of the GNU General Public License as jamie@89: # published by the Free Software Foundation; either version 2 of the jamie@89: # License, or (at your option) any later version. jamie@89: # jamie@89: # This program is distributed in the hope that it will be useful, but jamie@89: # WITHOUT ANY WARRANTY; without even the implied warranty of jamie@89: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU jamie@89: # General Public License for more details. jamie@89: # jamie@89: # You should have received a copy of the GNU General Public License jamie@89: # along with this program; if not, write to the Free Software jamie@89: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA jamie@89: # 02111-1307, USA. jamie@89: # jamie@89: # As a special exception, the respective Autoconf Macro's copyright jamie@89: # owner gives unlimited permission to copy, distribute and modify the jamie@89: # configure scripts that are the output of Autoconf when processing jamie@89: # the Macro. You need not follow the terms of the GNU General Public jamie@89: # License when using or distributing such scripts, even though jamie@89: # portions of the text of the Macro appear in them. The GNU General jamie@89: # Public License (GPL) does govern all other use of the material that jamie@89: # constitutes the Autoconf Macro. jamie@89: # jamie@89: # This special exception to the GPL applies to versions of the jamie@89: # Autoconf Macro released by the Autoconf Macro Archive. When you jamie@89: # make and distribute a modified version of the Autoconf Macro, you jamie@89: # may extend this special exception to the GPL to apply to your jamie@89: # modified version as well. jamie@89: jamie@89: AC_DEFUN([AC_PROG_JAVAC_WORKS],[ jamie@89: AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [ jamie@89: JAVA_TEST=Test.java jamie@89: CLASS_TEST=Test.class jamie@89: cat << \EOF > $JAVA_TEST jamie@89: /* [#]line __oline__ "configure" */ jamie@89: public class Test { jamie@89: } jamie@89: EOF jamie@89: if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then jamie@89: ac_cv_prog_javac_works=yes jamie@89: else jamie@89: AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)]) jamie@89: echo "configure: failed program was:" >&AC_FD_CC jamie@89: cat $JAVA_TEST >&AC_FD_CC jamie@89: fi jamie@89: rm -f $JAVA_TEST $CLASS_TEST jamie@89: ]) jamie@89: AC_PROVIDE([$0])dnl jamie@89: ])