Build system: implement REUSE with SPDX identifiers
[lttng-ust.git] / m4 / ax_prog_javac_works.m4
1 # SPDX-License-Identifier: GPL-2.0-or-later WITH LicenseRef-Autoconf-exception-macro
2 #
3 # ===========================================================================
4 # https://www.gnu.org/software/autoconf-archive/ax_prog_javac_works.html
5 # ===========================================================================
6 #
7 # SYNOPSIS
8 #
9 # AX_PROG_JAVAC_WORKS
10 #
11 # DESCRIPTION
12 #
13 # Internal use ONLY.
14 #
15 # Note: This is part of the set of autoconf M4 macros for Java programs.
16 # It is VERY IMPORTANT that you download the whole set, some macros depend
17 # on other. Unfortunately, the autoconf archive does not support the
18 # concept of set of macros, so I had to break it for submission. The
19 # general documentation, as well as the sample configure.in, is included
20 # in the AX_PROG_JAVA macro.
21 #
22 # LICENSE
23 #
24 # Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
25 #
26 # This program is free software; you can redistribute it and/or modify it
27 # under the terms of the GNU General Public License as published by the
28 # Free Software Foundation; either version 2 of the License, or (at your
29 # option) any later version.
30 #
31 # This program is distributed in the hope that it will be useful, but
32 # WITHOUT ANY WARRANTY; without even the implied warranty of
33 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
34 # Public License for more details.
35 #
36 # You should have received a copy of the GNU General Public License along
37 # with this program. If not, see <https://www.gnu.org/licenses/>.
38 #
39 # As a special exception, the respective Autoconf Macro's copyright owner
40 # gives unlimited permission to copy, distribute and modify the configure
41 # scripts that are the output of Autoconf when processing the Macro. You
42 # need not follow the terms of the GNU General Public License when using
43 # or distributing such scripts, even though portions of the text of the
44 # Macro appear in them. The GNU General Public License (GPL) does govern
45 # all other use of the material that constitutes the Autoconf Macro.
46 #
47 # This special exception to the GPL applies to versions of the Autoconf
48 # Macro released by the Autoconf Archive. When you make and distribute a
49 # modified version of the Autoconf Macro, you may extend this special
50 # exception to the GPL to apply to your modified version as well.
51
52 #serial 7
53
54 AU_ALIAS([AC_PROG_JAVAC_WORKS], [AX_PROG_JAVAC_WORKS])
55 AC_DEFUN([AX_PROG_JAVAC_WORKS],[
56 AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
57 JAVA_TEST=Test.java
58 CLASS_TEST=Test.class
59 cat << \EOF > $JAVA_TEST
60 /* [#]line __oline__ "configure" */
61 public class Test {
62 }
63 EOF
64 if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
65 ac_cv_prog_javac_works=yes
66 else
67 AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
68 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
69 cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
70 fi
71 rm -f $JAVA_TEST $CLASS_TEST
72 ])
73 AC_PROVIDE([$0])dnl
74 ])
This page took 0.033274 seconds and 4 git commands to generate.