~ubuntu-branches/ubuntu/hardy/autoconf-archive/hardy

« back to all changes in this revision

Viewing changes to htmldoc/ac_try_compile_java.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-06-26 09:43:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040626094357-3be3jwcz1vcdhpe8
Tags: upstream-20040616
ImportĀ upstreamĀ versionĀ 20040616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
 
2
"http://www.w3.org/TR/html4/strict.dtd">
 
3
 
 
4
<html lang="en">
 
5
<head>
 
6
  <title>Autoconf Macro: ac_try_compile_java</title>
 
7
  <link rel="stylesheet" type="text/css" href="ac-archive.css">
 
8
</head>
 
9
 
 
10
<body>
 
11
  <table summary="web navigation" style="width:100%;">
 
12
    <tbody>
 
13
      <tr>
 
14
        <td style="width:50%;" align="center">[<a href="index.html">Macro Index
 
15
        Page</a>]</td>
 
16
 
 
17
        <td style="width:50%;" align="center">[<a href=
 
18
        "../m4source/ac_try_compile_java.m4">Download M4 Source</a>]</td>
 
19
      </tr>
 
20
    </tbody>
 
21
  </table>
 
22
  <hr>
 
23
 
 
24
  <h1>ac_try_compile_java</h1>
 
25
 
 
26
  <h2>Synopsis</h2>
 
27
 
 
28
  <div class="indent">
 
29
    <p style="text-align:left; white-space:nowrap;">
 
30
    <code>AC_TRY_COMPILE_JAVA</code></p>
 
31
  </div>
 
32
 
 
33
  <h2>Description</h2>
 
34
 
 
35
  <div class="indent">
 
36
    <p>AC_TRY_COMPILE_JAVA attempt to compile user given source.</p>
 
37
 
 
38
    <p>*Warning*: its success or failure can depend on a proper setting of the
 
39
    CLASSPATH env. variable.</p>
 
40
 
 
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>
 
47
  </div>
 
48
 
 
49
  <h2>Version</h2>
 
50
 
 
51
  <div class="indent">
 
52
    <p>1.2 (last modified: 2000-07-19)</p>
 
53
  </div>
 
54
 
 
55
  <h2>Author</h2>
 
56
 
 
57
  <div class="indent">
 
58
    <p>Devin Weaver &lt;ktohg@tritarget.com&gt;</p>
 
59
  </div>
 
60
 
 
61
  <h2>M4 Source Code</h2>
 
62
 
 
63
  <div class="indent">
 
64
    <pre class="m4source">
 
65
AC_DEFUN([AC_TRY_COMPILE_JAVA],[
 
66
AC_REQUIRE([AC_PROG_JAVAC])dnl
 
67
cat &lt;&lt; \EOF &gt; Test.java
 
68
/* [#]line __oline__ "configure" */
 
69
ifelse([$1], , , [import $1;])
 
70
public class Test {
 
71
[$2]
 
72
}
 
73
EOF
 
74
if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) &amp;&amp; test -s Test.class
 
75
then
 
76
dnl Don't remove the temporary files here, so they can be examined.
 
77
  ifelse([$3], , :, [$3])
 
78
else
 
79
  echo "configure: failed program was:" &gt;&amp;AC_FD_CC
 
80
  cat Test.java &gt;&amp;AC_FD_CC
 
81
ifelse([$4], , , [  rm -fr Test*
 
82
  $4
 
83
])dnl
 
84
fi
 
85
rm -fr Test*])
 
86
</pre>
 
87
  </div>
 
88
 
 
89
  <h2>Copyright</h2>
 
90
 
 
91
  <div class="indent">
 
92
    <a href="COPYING.html">GNU General Public License</a> with this special
 
93
    <a href="COPYING-Exception.html">exception</a>.
 
94
  </div>
 
95
</body>
 
96
</html>