6b1786aa65
PR other/66259 * config-ml.in: Reflects renaming of configure.in to configure.ac * configure: Likewise * configure.ac: Likewise boehm-gc/ PR other/66259 * Makefile.direct: Reflects renaming of configure.in to configure.ac * Makefile.dist: Likewise * version.h: Likewise * doc/README: Likewise config/ PR other/66259 * gettext.m4: Reflects renaming of configure.in to configure.ac * po.m4: Likewise * stdint.m4: Likewise * tcl.m4: Likewise gcc/ PR other/66259 * acinclude.m4: Reflects renaming of configure.in to configure.ac * configure: Likewise * configure.ac: Likewise * doc/install.texi: Likewise * doc/tm.texi: Likewise * doc/tm.texi.in: Likewise gcc/ada/ PR other/66259 * prj-nmsc.adb: Reflects renaming of configure.in to configure.ac * gcc-interface/Makefile.in: Likewise intl/ PR other/66259 * configure: Reflects renaming of configure.in to configure.ac libjava/ PR other/66259 * configure: Reflects renaming of configure.in to configure.ac libjava/classpath PR other/66259 * INSTALL: Reflects renaming of configure.in to configure.ac * ltconfig: Likewise * missing: Likewise * m4/ac_prog_javac.m4: Likewise * m4/ac_prog/javac_works.m4: Likewise * resource/META-INF/mimetypes.default: Likewise libjava/libltdl PR other/66259 * THREADS: Reflects renaming of configure.in to configure.ac liboffloadmic/ PR other/66259 * configure: Reflects renaming of configure.in to configure.ac From-SVN: r226183
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
dnl @synopsis AC_PROG_JAVAC_WORKS
|
|
dnl
|
|
dnl Internal use ONLY.
|
|
dnl
|
|
dnl Note: This is part of the set of autoconf M4 macros for Java
|
|
dnl programs. It is VERY IMPORTANT that you download the whole set,
|
|
dnl some macros depend on other. Unfortunately, the autoconf archive
|
|
dnl does not support the concept of set of macros, so I had to break it
|
|
dnl for submission. The general documentation, as well as the sample
|
|
dnl configure.ac, is included in the AC_PROG_JAVA macro.
|
|
dnl
|
|
dnl @category Java
|
|
dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
|
|
dnl @version 2000-07-19
|
|
dnl @license GPLWithACException
|
|
dnl
|
|
dnl Modified to test for 1.5 by Andrew John Hughes on 2008-02-11
|
|
|
|
AC_DEFUN_ONCE([AC_PROG_JAVAC_WORKS],[
|
|
AC_REQUIRE([AC_PROG_JAVAC])
|
|
AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
|
|
JAVA_TEST=Object.java
|
|
CLASS_TEST=Object.class
|
|
cat << \EOF > $JAVA_TEST
|
|
/* [#]line __oline__ "configure" */
|
|
package java.lang;
|
|
|
|
public class Object
|
|
{
|
|
static <T> void doStuff()
|
|
{
|
|
}
|
|
}
|
|
EOF
|
|
if test x$JAVAC_IS_GCJ = xyes; then
|
|
CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST"
|
|
else
|
|
CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST"
|
|
fi
|
|
if AC_TRY_COMMAND($CMD) >/dev/null 2>&1; then
|
|
ac_cv_prog_javac_works=yes
|
|
else
|
|
AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
|
|
echo "configure: failed program was:" >&AC_FD_CC
|
|
cat $JAVA_TEST >&AC_FD_CC
|
|
fi
|
|
rm -f $JAVA_TEST $CLASS_TEST
|
|
])
|
|
AC_PROVIDE([$0])dnl
|
|
])
|