Last change
on this file since 3073 was
3064,
checked in by gah, 12 years ago
|
don't build java binding unless we find jni.h
|
File size:
1.4 KB
|
Line | |
---|
1 | AC_DEFUN([RP_LANG_JAVA],[ |
---|
2 | AC_ARG_WITH([java], |
---|
3 | [AS_HELP_STRING([--with-java[=DIR]],[location of java @<:@default=yes@:>@])], |
---|
4 | [], |
---|
5 | [with_java=yes]) |
---|
6 | JAVA="" |
---|
7 | JAVAH="" |
---|
8 | JAVAC="" |
---|
9 | JAVA_DEV_PKG="no" |
---|
10 | |
---|
11 | if 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 |
---|
21 | fi |
---|
22 | JDK= |
---|
23 | JAVA_INC_DIR= |
---|
24 | JAVA_INC_SPEC= |
---|
25 | |
---|
26 | # If java exists, let's look for the jni.h file. |
---|
27 | if test "x${JAVA}" != "x" ; then |
---|
28 | for d in \ |
---|
29 | ${with_java} \ |
---|
30 | ${JAVA_HOME} \ |
---|
31 | /apps/java/jdk1.6* \ |
---|
32 | /usr/lib/jvm/java-6-openjdk \ |
---|
33 | /usr/lib/jvm/icedtea-6 \ |
---|
34 | /usr/lib/jvm/*sun-1.6* \ |
---|
35 | /opt/sun-jdk-1.6* \ |
---|
36 | /usr/lib/jvm/icedtea-7 \ |
---|
37 | /opt/icedtea6-* \ |
---|
38 | /opt/sun-jdk-1.5* \ |
---|
39 | /usr/lib/jvm/*sun-1.5* |
---|
40 | do |
---|
41 | if test -r "${d}/include/jni.h" ; then |
---|
42 | JDK=${d} |
---|
43 | JAVA_HOME=$JDK |
---|
44 | JAVA_INC_DIR=${JDK}/include |
---|
45 | JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux" |
---|
46 | break; |
---|
47 | fi |
---|
48 | if test -r "${d}/Headers/jni.h" ; then |
---|
49 | JDK=${d} |
---|
50 | JAVA_HOME=$JDK |
---|
51 | JAVA_INC_DIR=${JDK}/Headers |
---|
52 | JAVA_INC_SPEC="-I${JDK}/Headers -I${JDK}/Headers/macos" |
---|
53 | break; |
---|
54 | fi |
---|
55 | done |
---|
56 | fi |
---|
57 | ]) |
---|
Note: See
TracBrowser
for help on using the repository browser.