OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [classpath/] [m4/] [ac_prog_javac_works.m4] - Blame information for rev 773

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 773 jeremybenn
dnl @synopsis AC_PROG_JAVAC_WORKS
2
dnl
3
dnl Internal use ONLY.
4
dnl
5
dnl Note: This is part of the set of autoconf M4 macros for Java
6
dnl programs. It is VERY IMPORTANT that you download the whole set,
7
dnl some macros depend on other. Unfortunately, the autoconf archive
8
dnl does not support the concept of set of macros, so I had to break it
9
dnl for submission. The general documentation, as well as the sample
10
dnl configure.in, is included in the AC_PROG_JAVA macro.
11
dnl
12
dnl @category Java
13
dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
14
dnl @version 2000-07-19
15
dnl @license GPLWithACException
16
dnl
17
dnl Modified to test for 1.5 by Andrew John Hughes on 2008-02-11
18
 
19
AC_DEFUN_ONCE([AC_PROG_JAVAC_WORKS],[
20
AC_REQUIRE([AC_PROG_JAVAC])
21
AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
22
JAVA_TEST=Object.java
23
CLASS_TEST=Object.class
24
cat << \EOF > $JAVA_TEST
25
/* [#]line __oline__ "configure" */
26
package java.lang;
27
 
28
public class Object
29
{
30
  static <T> void doStuff()
31
  {
32
  }
33
}
34
EOF
35
if test x$JAVAC_IS_GCJ = xyes; then
36
  CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST"
37
else
38
  CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST"
39
fi
40
if AC_TRY_COMMAND($CMD) >/dev/null 2>&1; then
41
  ac_cv_prog_javac_works=yes
42
else
43
  AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
44
  echo "configure: failed program was:" >&AC_FD_CC
45
  cat $JAVA_TEST >&AC_FD_CC
46
fi
47
rm -f $JAVA_TEST $CLASS_TEST
48
])
49
AC_PROVIDE([$0])dnl
50
])

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.