source: trunk/cf/rp_lang_java.m4 @ 2203

Last change on this file since 2203 was 2203, checked in by gah, 11 years ago
File size: 1.1 KB
Line 
1AC_DEFUN([RP_LANG_JAVA],[
2JAVA=""
3JAVAH=""
4JAVAC=""
5JAVA_DEV_PKG="no"
6AC_ARG_WITH(
7    [java],
8    [AS_HELP_STRING([--with-java=DIR], [location of java @<:@default=yes@:>@])],
9    [rp_with_java=$withval])
10
11if test "${rp_with_java}" != "no" ; then
12  if test "${rp_with_java}" = "yes" ; then
13    AC_PATH_PROG(JAVA,  java)
14    AC_PATH_PROG(JAVAC, javac)
15    AC_PATH_PROG(JAVAH, javah)
16  else
17    AC_PATH_PROG(JAVA,  java,  [], [${rp_with_java}/bin:${rp_with_java}])
18    AC_PATH_PROG(JAVAC, javac, [], [${rp_with_java}/bin:${rp_with_java}])
19    AC_PATH_PROG(JAVAH, javah, [], [${rp_with_java}/bin:${rp_with_java}])
20  fi
21fi
22JDK=
23JAVA_INC_DIR=
24JAVA_INC_SPEC=
25
26# If java exists, let's look for the jni.h file.
27if test "x${JAVA}" != "x" ; then
28  for d in \
29   ${JAVA_HOME} \
30   /apps/java/jdk1.6.0_01 \
31   /usr/lib/jvm/*sun-1.6* \
32   /opt/sun-jdk-1.6* \
33   /opt/icedtea6-* \
34   /opt/sun-jdk-1.5* \
35   /usr/lib/jvm/*sun-1.5*
36  do
37    if test -r "${d}/include/jni.h" ; then
38      JDK=${d}
39      break;
40    fi
41  done
42  JAVA_HOME=$JDK
43  JAVA_INC_DIR=${JDK}/include
44  JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux"
45fi
46])
Note: See TracBrowser for help on using the repository browser.