source: gs2-extensions/tdb/trunk/src/jni/m4/ac_prog_java.m4@ 30206

Last change on this file since 30206 was 30206, checked in by jmt12, 5 years ago

A m4 directory containing a number of M4 packages used to compile this project. Running aclocal will cause the other (default) M4 packages to be linked into here too (so there is a .svnignore to ignore them)

File size: 2.6 KB
Line 
1dnl @synopsis AC_PROG_JAVA
2dnl
3dnl Here is a summary of the main macros:
4dnl
5dnl AC_PROG_JAVAC: finds a Java compiler.
6dnl
7dnl AC_PROG_JAVA: finds a Java virtual machine.
8dnl
9dnl AC_CHECK_CLASS: finds if we have the given class (beware of
10dnl CLASSPATH!).
11dnl
12dnl AC_CHECK_RQRD_CLASS: finds if we have the given class and stops
13dnl otherwise.
14dnl
15dnl AC_TRY_COMPILE_JAVA: attempt to compile user given source.
16dnl
17dnl AC_TRY_RUN_JAVA: attempt to compile and run user given source.
18dnl
19dnl AC_JAVA_OPTIONS: adds Java configure options.
20dnl
21dnl AC_PROG_JAVA tests an existing Java virtual machine. It uses the
22dnl environment variable JAVA then tests in sequence various common
23dnl Java virtual machines. For political reasons, it starts with the
24dnl free ones. You *must* call [AC_PROG_JAVAC] before.
25dnl
26dnl If you want to force a specific VM:
27dnl
28dnl - at the configure.in level, set JAVA=yourvm before calling
29dnl AC_PROG_JAVA
30dnl
31dnl (but after AC_INIT)
32dnl
33dnl - at the configure level, setenv JAVA
34dnl
35dnl You can use the JAVA variable in your Makefile.in, with @JAVA@.
36dnl
37dnl *Warning*: its success or failure can depend on a proper setting of
38dnl the CLASSPATH env. variable.
39dnl
40dnl TODO: allow to exclude virtual machines (rationale: most Java
41dnl programs cannot run with some VM like kaffe).
42dnl
43dnl Note: This is part of the set of autoconf M4 macros for Java
44dnl programs. It is VERY IMPORTANT that you download the whole set,
45dnl some macros depend on other. Unfortunately, the autoconf archive
46dnl does not support the concept of set of macros, so I had to break it
47dnl for submission.
48dnl
49dnl A Web page, with a link to the latest CVS snapshot is at
50dnl <http://www.internatif.org/bortzmeyer/autoconf-Java/>.
51dnl
52dnl This is a sample configure.in Process this file with autoconf to
53dnl produce a configure script.
54dnl
55dnl AC_INIT(UnTag.java)
56dnl
57dnl dnl Checks for programs.
58dnl AC_CHECK_CLASSPATH
59dnl AC_PROG_JAVAC
60dnl AC_PROG_JAVA
61dnl
62dnl dnl Checks for classes
63dnl AC_CHECK_RQRD_CLASS(org.xml.sax.Parser)
64dnl AC_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver)
65dnl
66dnl AC_OUTPUT(Makefile)
67dnl
68dnl @category Java
69dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
70dnl @version 2000-07-19
71dnl @license GPLWithACException
72
73AC_DEFUN([AC_PROG_JAVA],[
74AC_REQUIRE([AC_EXEEXT])
75if test x$JAVAPREFIX = x; then
76 test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT)
77else
78 test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT java$EXEEXT, $JAVAPREFIX)
79fi
80test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
81AC_PROG_JAVA_WORKS
82AC_PROVIDE([$0])
83])
Note: See TracBrowser for help on using the repository browser.