1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
"http://www.w3.org/TR/html4/strict.dtd">
6
<title>Autoconf Macro: ac_try_compile_java</title>
7
<link rel="stylesheet" type="text/css" href="ac-archive.css">
11
<table summary="web navigation" style="width:100%;">
14
<td style="width:50%;" align="center">[<a href="index.html">Macro Index
17
<td style="width:50%;" align="center">[<a href=
18
"../m4source/ac_try_compile_java.m4">Download M4 Source</a>]</td>
24
<h1>ac_try_compile_java</h1>
29
<p style="text-align:left; white-space:nowrap;">
30
<code>AC_TRY_COMPILE_JAVA</code></p>
36
<p>AC_TRY_COMPILE_JAVA attempt to compile user given source.</p>
38
<p>*Warning*: its success or failure can depend on a proper setting of the
39
CLASSPATH env. variable.</p>
41
<p>Note: This is part of the set of autoconf M4 macros for Java programs.
42
It is VERY IMPORTANT that you download the whole set, some macros depend on
43
other. Unfortunately, the autoconf archive does not support the concept of
44
set of macros, so I had to break it for submission. The general
45
documentation, as well as the sample configure.in, is included in the
46
AC_PROG_JAVA macro.</p>
52
<p>1.2 (last modified: 2000-07-19)</p>
58
<p>Devin Weaver <ktohg@tritarget.com></p>
61
<h2>M4 Source Code</h2>
64
<pre class="m4source">
65
AC_DEFUN([AC_TRY_COMPILE_JAVA],[
66
AC_REQUIRE([AC_PROG_JAVAC])dnl
67
cat << \EOF > Test.java
68
/* [#]line __oline__ "configure" */
69
ifelse([$1], , , [import $1;])
74
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class
76
dnl Don't remove the temporary files here, so they can be examined.
77
ifelse([$3], , :, [$3])
79
echo "configure: failed program was:" >&AC_FD_CC
80
cat Test.java >&AC_FD_CC
81
ifelse([$4], , , [ rm -fr Test*
92
<a href="COPYING.html">GNU General Public License</a> with this special
93
<a href="COPYING-Exception.html">exception</a>.