• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/dist/aclocal_java/
1dnl @synopsis AC_TRY_COMPILE_JAVA
2dnl
3dnl AC_TRY_COMPILE_JAVA attempt to compile user given source.
4dnl
5dnl *Warning*: its success or failure can depend on a proper setting of the
6dnl CLASSPATH env. variable.
7dnl
8dnl Note: This is part of the set of autoconf M4 macros for Java programs.
9dnl It is VERY IMPORTANT that you download the whole set, some
10dnl macros depend on other. Unfortunately, the autoconf archive does not
11dnl support the concept of set of macros, so I had to break it for
12dnl submission.
13dnl The general documentation, as well as the sample configure.in, is
14dnl included in the AC_PROG_JAVA macro.
15dnl
16dnl @author Devin Weaver <ktohg@tritarget.com>
17dnl @version $Id: ac_try_compile_java.m4,v 12.0 2004/11/17 03:43:38 bostic Exp $
18dnl
19AC_DEFUN([AC_TRY_COMPILE_JAVA],[
20AC_REQUIRE([AC_PROG_JAVAC])dnl
21cat << \EOF > Test.java
22/* [#]line __oline__ "configure" */
23ifelse([$1], , , [import $1;])
24public class Test {
25[$2]
26}
27EOF
28if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class
29then
30dnl Don't remove the temporary files here, so they can be examined.
31  ifelse([$3], , :, [$3])
32else
33  echo "configure: failed program was:" >&AC_FD_CC
34  cat Test.java >&AC_FD_CC
35ifelse([$4], , , [  rm -fr Test*
36  $4
37])dnl
38fi
39rm -fr Test*])
40