diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index e5ae19f5..819261c9 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -41,6 +41,9 @@
+
+ Fix several issues around Java OS and header files location detection.
+
diff --git a/src/native/unix/configure.in b/src/native/unix/configure.in
index b411f016..8f01244e 100644
--- a/src/native/unix/configure.in
+++ b/src/native/unix/configure.in
@@ -95,9 +95,9 @@ AP_FIND_JAVA_OS()
if test -z "${JAVA_OS}"
then
AC_MSG_RESULT([jni_md.h found in $JAVA_HOME/$JAVA_INC])
- INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/$JAVA_INC"
+ INCLUDES="$INCLUDES -I$JAVA_HOME/$JAVA_INC"
else
- INCLUDES="$INCLUDES -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
+ INCLUDES="$INCLUDES -I$JAVA_HOME/$JAVA_INC -I$JAVA_HOME/$JAVA_INC/$JAVA_OS"
fi
dnl -------------------------------------------------------------------------
diff --git a/src/native/unix/support/apjava.m4 b/src/native/unix/support/apjava.m4
index cd92280d..921b5fb8 100644
--- a/src/native/unix/support/apjava.m4
+++ b/src/native/unix/support/apjava.m4
@@ -57,9 +57,9 @@ AC_DEFUN([AP_FIND_JAVA_OS],[
AC_ARG_WITH(os-type,[ --with-os-type[=SUBDIR] Location of JDK os-type subdirectory.],
[
tempval=$withval
- if test ! -d "$JAVA_HOME/$tempval"
+ if test ! -d "$JAVA_HOME/$JAVA_INC/$tempval"
then
- AC_MSG_ERROR(Not a directory: ${JAVA_HOME}/${tempval})
+ AC_MSG_ERROR(Not a directory: ${JAVA_HOME}/$JAVA_INC/${tempval})
fi
JAVA_OS=$tempval
],
@@ -80,7 +80,7 @@ AC_DEFUN([AP_FIND_JAVA_OS],[
fi
done
if test "x$JAVA_OS" = "xNONE"; then
- AC_MSG_RESULT(Cannot find jni_md.h in ${JAVA_HOME}/${OS})
+ AC_MSG_RESULT(Cannot find jni_md.h in ${JAVA_HOME}/${JAVA_INC}/\${OS})
AC_MSG_ERROR(You should retry --with-os-type=SUBDIR)
fi
fi