Skip to content

Commit

Permalink
Fix several issues around Java OS and header files location detection
Browse files Browse the repository at this point in the history
This closes #177
  • Loading branch information
michael-o committed Jul 12, 2024
1 parent 365eddb commit f57359c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
</properties>
<body>
<release version="1.4.1" date="tbd" description="Bug fix release">
<action dev="michaelo" type="fix">
Fix several issues around Java OS and header files location detection.
</action>
</release>
<release version="1.4.0" date="2024-05-24" description="Bug fix release">
<!-- Fix -->
Expand Down
4 changes: 2 additions & 2 deletions src/native/unix/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 -------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/native/unix/support/apjava.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
],
Expand All @@ -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
Expand Down

0 comments on commit f57359c

Please sign in to comment.