aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-01-14 16:43:34 -0800
committerDan Albert <danalbert@google.com>2016-01-22 14:51:24 -0800
commit3186be22b6598fbd467b126347d1c7f48ccb7f71 (patch)
tree2b176d3ce027fa5340160978effeb88ec9054aaa /gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4
parenta45222a0e5951558bd896b0513bf638eb376e086 (diff)
downloadtoolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.tar.gz
toolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.tar.bz2
toolchain_gcc-3186be22b6598fbd467b126347d1c7f48ccb7f71.zip
Check in a pristine copy of GCC 4.8.1.
The copy of GCC that we use for Android is still not working for mingw. Rather than finding all the differences that have crept into our GCC, just check in a copy from ftp://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.8.1.tar.bz2. GCC 4.8.1 was chosen because it is what we have been using for mingw thus far, and the emulator doesn't yet work when upgrading to 4.9. Bug: http://b/26523949 Change-Id: Iedc0f05243d4332cc27ccd46b8a4b203c88dcaa3
Diffstat (limited to 'gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4')
-rw-r--r--gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m460
1 files changed, 60 insertions, 0 deletions
diff --git a/gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4 b/gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4
new file mode 100644
index 000000000..0f8f226ef
--- /dev/null
+++ b/gcc-4.8.1/libjava/classpath/m4/ac_prog_javac.m4
@@ -0,0 +1,60 @@
+dnl @synopsis AC_PROG_JAVAC
+dnl
+dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the
+dnl environment variable JAVAC then tests in sequence various common
+dnl Java compilers. For political reasons, it starts with the free
+dnl ones.
+dnl
+dnl If you want to force a specific compiler:
+dnl
+dnl - at the configure.in level, set JAVAC=yourcompiler before calling
+dnl AC_PROG_JAVAC
+dnl
+dnl - at the configure level, setenv JAVAC
+dnl
+dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
+dnl
+dnl *Warning*: its success or failure can depend on a proper setting of
+dnl the CLASSPATH env. variable.
+dnl
+dnl TODO: allow to exclude compilers (rationale: most Java programs
+dnl cannot compile with some compilers like guavac).
+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.in, 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 remove jikes by Andrew John Hughes on 2008-02-11
+
+AC_DEFUN_ONCE([AC_PROG_JAVAC],[
+AC_REQUIRE([AC_EXEEXT])dnl
+ECJ_OPTS="-warn:-deprecation,serial,unusedImport,unusedPrivate,resource"
+JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
+GCJ_OPTS="-g"
+if test "x$JAVAPREFIX" = x; then
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT $ECJ_OPTS"] ["ecj-3.3$EXEEXT $ECJ_OPTS"] ["ecj-3.2$EXEEXT $ECJ_OPTS"] ["javac$EXEEXT $JAVAC_OPTS"] "gcj$EXEEXT -C")
+else
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT $ECJ_OPTS"] ["ecj-3.3$EXEEXT $ECJ_OPTS"] ["ecj-3.2$EXEEXT $ECJ_OPTS"] ["javac$EXEEXT $JAVAC_OPTS"] "gcj$EXEEXT -C", $JAVAPREFIX)
+fi
+test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
+AC_CACHE_CHECK([if $JAVAC is a version of gcj], ac_cv_prog_javac_is_gcj, [
+if $JAVAC --version 2>&1 | grep gcj >&AS_MESSAGE_LOG_FD ; then
+ ac_cv_prog_javac_is_gcj=yes;
+ JAVAC="$JAVAC $GCJ_OPTS";
+else
+ ac_cv_prog_javac_is_gcj=no;
+fi
+])
+AC_SUBST(JAVAC_IS_GCJ, $ac_cv_prog_javac_is_gcj)
+AM_CONDITIONAL(GCJ_JAVAC, test x"${JAVAC_IS_GCJ}" = xyes)
+dnl END GCJ LOCAL
+AC_PROVIDE([$0])dnl
+])