Blame config/ax_prog_javac.m4

Packit c04fcb
# ===========================================================================
Packit c04fcb
#       http://www.gnu.org/software/autoconf-archive/ax_prog_javac.html
Packit c04fcb
# ===========================================================================
Packit c04fcb
#
Packit c04fcb
# SYNOPSIS
Packit c04fcb
#
Packit c04fcb
#   AX_PROG_JAVAC
Packit c04fcb
#
Packit c04fcb
# DESCRIPTION
Packit c04fcb
#
Packit c04fcb
#   AX_PROG_JAVAC tests an existing Java compiler. It uses the environment
Packit c04fcb
#   variable JAVAC then tests in sequence various common Java compilers. For
Packit c04fcb
#   political reasons, it starts with the free ones.
Packit c04fcb
#
Packit c04fcb
#   If you want to force a specific compiler:
Packit c04fcb
#
Packit c04fcb
#   - at the configure.in level, set JAVAC=yourcompiler before calling
Packit c04fcb
#   AX_PROG_JAVAC
Packit c04fcb
#
Packit c04fcb
#   - at the configure level, setenv JAVAC
Packit c04fcb
#
Packit c04fcb
#   You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
Packit c04fcb
#
Packit c04fcb
#   *Warning*: its success or failure can depend on a proper setting of the
Packit c04fcb
#   CLASSPATH env. variable.
Packit c04fcb
#
Packit c04fcb
#   TODO: allow to exclude compilers (rationale: most Java programs cannot
Packit c04fcb
#   compile with some compilers like guavac).
Packit c04fcb
#
Packit c04fcb
#   Note: This is part of the set of autoconf M4 macros for Java programs.
Packit c04fcb
#   It is VERY IMPORTANT that you download the whole set, some macros depend
Packit c04fcb
#   on other. Unfortunately, the autoconf archive does not support the
Packit c04fcb
#   concept of set of macros, so I had to break it for submission. The
Packit c04fcb
#   general documentation, as well as the sample configure.in, is included
Packit c04fcb
#   in the AX_PROG_JAVA macro.
Packit c04fcb
#
Packit c04fcb
# LICENSE
Packit c04fcb
#
Packit c04fcb
#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
Packit c04fcb
#
Packit c04fcb
#   This program is free software; you can redistribute it and/or modify it
Packit c04fcb
#   under the terms of the GNU General Public License as published by the
Packit c04fcb
#   Free Software Foundation; either version 2 of the License, or (at your
Packit c04fcb
#   option) any later version.
Packit c04fcb
#
Packit c04fcb
#   This program is distributed in the hope that it will be useful, but
Packit c04fcb
#   WITHOUT ANY WARRANTY; without even the implied warranty of
Packit c04fcb
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Packit c04fcb
#   Public License for more details.
Packit c04fcb
#
Packit c04fcb
#   You should have received a copy of the GNU General Public License along
Packit c04fcb
#   with this program. If not, see <http://www.gnu.org/licenses/>.
Packit c04fcb
#
Packit c04fcb
#   As a special exception, the respective Autoconf Macro's copyright owner
Packit c04fcb
#   gives unlimited permission to copy, distribute and modify the configure
Packit c04fcb
#   scripts that are the output of Autoconf when processing the Macro. You
Packit c04fcb
#   need not follow the terms of the GNU General Public License when using
Packit c04fcb
#   or distributing such scripts, even though portions of the text of the
Packit c04fcb
#   Macro appear in them. The GNU General Public License (GPL) does govern
Packit c04fcb
#   all other use of the material that constitutes the Autoconf Macro.
Packit c04fcb
#
Packit c04fcb
#   This special exception to the GPL applies to versions of the Autoconf
Packit c04fcb
#   Macro released by the Autoconf Archive. When you make and distribute a
Packit c04fcb
#   modified version of the Autoconf Macro, you may extend this special
Packit c04fcb
#   exception to the GPL to apply to your modified version as well.
Packit c04fcb
Packit c04fcb
#serial 7
Packit c04fcb
Packit c04fcb
AU_ALIAS([AC_PROG_JAVAC], [AX_PROG_JAVAC])
Packit c04fcb
AC_DEFUN([AX_PROG_JAVAC],[
Packit c04fcb
m4_define([m4_ax_prog_javac_list],["gcj -C" guavac jikes javac])dnl
Packit c04fcb
AS_IF([test "x$JAVAPREFIX" = x],
Packit c04fcb
      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list])],
Packit c04fcb
      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list], [], [$JAVAPREFIX/bin])])
Packit c04fcb
m4_undefine([m4_ax_prog_javac_list])dnl
Packit c04fcb
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
Packit c04fcb
AX_PROG_JAVAC_WORKS
Packit c04fcb
AC_PROVIDE([$0])dnl
Packit c04fcb
])