source: trunk/cf/rpLangJava.m4 @ 2298

Last change on this file since 2298 was 2298, checked in by gah, 9 years ago

fixes for grid.sh build for opensees

File size: 1.3 KB
Line 
1AC_DEFUN([RP_LANG_JAVA],[
2AC_ARG_WITH([java],
3    [AS_HELP_STRING([--with-java[=DIR]],[location of java @<:@default=yes@:>@])],
4    [],
5    [with_java=yes])
6JAVA=""
7JAVAH=""
8JAVAC=""
9JAVA_DEV_PKG="no"
10
11if test "${with_java}" != "no" ; then
12  if test "${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,  [], [${with_java}/bin:${with_java}])
18    AC_PATH_PROG(JAVAC, javac, [], [${with_java}/bin:${with_java}])
19    AC_PATH_PROG(JAVAH, javah, [], [${with_java}/bin:${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   ${with_java} \
30   ${JAVA_HOME} \
31   /apps/java/jdk1.6* \
32   /usr/lib/jvm/*sun-1.6* \
33   /opt/sun-jdk-1.6* \
34   /opt/icedtea6-* \
35   /opt/sun-jdk-1.5* \
36   /usr/lib/jvm/*sun-1.5*
37  do
38    if test -r "${d}/include/jni.h" ; then
39      JDK=${d}
40      JAVA_HOME=$JDK
41      JAVA_INC_DIR=${JDK}/include
42      JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux"
43      break;
44    fi
45    if test -r "${d}/Headers/jni.h" ; then
46      JDK=${d}
47      JAVA_HOME=$JDK
48      JAVA_INC_DIR=${JDK}/Headers
49      JAVA_INC_SPEC="-I${JDK}/Headers -I${JDK}/Headers/macos"
50      break;
51    fi
52  done
53fi
54])
Note: See TracBrowser for help on using the repository browser.