|
52 | 52 | AC_ARG_WITH([java], [AS_HELP_STRING([--with-java], [path to JDK])], [], |
53 | 53 | [with_java="$JAVA_HOME:$DEFAULT_JAVA_HOME:/usr/lib/jvm/java"]) |
54 | 54 | AC_ARG_WITH([jni-headers], [AS_HELP_STRING([--with-jni-headers=PLATFORM], |
55 | | - [use JNI headers for PLATFORM. Specify "cross" to use Classpath |
56 | | - headers from the build platform.])], [], [with_jni_headers=guess]) |
| 55 | + [use JNI headers for PLATFORM. Specify "cross" to use bundled |
| 56 | + Classpath headers.])], [], [with_jni_headers=guess]) |
57 | 57 | if test z$with_jni_headers = zguess ; then |
58 | 58 | if test $host = $build ; then |
59 | 59 | AS_CASE([$host], |
@@ -81,30 +81,15 @@ if test z$with_jni_headers != zcross ; then |
81 | 81 | JNI_CFLAGS="\"-I$jni_h_dir\" \"-I$jni_md_h_dir\"" |
82 | 82 | else |
83 | 83 | # For cross builds, we don't have the OpenJDK jni_md.h for the target |
84 | | - # platform, so use the GNU Classpath JNI headers in the build system's |
85 | | - # gcj include directory instead. Autoconf doesn't give us a variable |
86 | | - # for the build compiler, which is okay because anything other than |
87 | | - # GCC probably won't support this syntax. |
| 84 | + # platform, so use our own copy of the GNU Classpath JNI headers instead. |
88 | 85 | # |
89 | 86 | # Don't set JAVA_HOME unless it was specified on the command line. |
90 | | - # |
91 | | - # This is terrible. |
92 | | - JNI_CFLAGS= |
93 | | - AC_MSG_CHECKING([for cross jni.h and jni_md.h]) |
94 | | - for word in $(gcc - -v -E < /dev/null 2>&1) |
95 | | - do |
96 | | - if test -r "$word/jni.h" && test -r "$word/jni_md.h" ; then |
97 | | - AC_MSG_RESULT([$word]) |
98 | | - JNI_CFLAGS="-I$word" |
99 | | - break |
100 | | - fi |
101 | | - done |
102 | | - if test "x$JNI_CFLAGS" = x ; then |
103 | | - AC_MSG_RESULT([not found]) |
104 | | - AC_MSG_ERROR([cannot find JNI headers]) |
105 | | - fi |
| 87 | + AC_MSG_CHECKING([whether to use bundled JNI headers]) |
| 88 | + AC_MSG_RESULT([yes]) |
| 89 | + JNI_CFLAGS='-I$(top_srcdir)/cross' |
106 | 90 | fi |
107 | 91 | AC_SUBST([JNI_CFLAGS]) |
| 92 | +AM_CONDITIONAL([USE_CROSS_HEADERS], [test x$with_jni_headers = xcross]) |
108 | 93 |
|
109 | 94 | # Checks for typedefs, structures, and compiler characteristics. |
110 | 95 |
|
|
0 commit comments