Skip to content

Commit

Permalink
Add support for building against the Oracle JDK on OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
chirino committed Dec 2, 2013
1 parent 5cbc5f9 commit c1980ef
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions maven-hawtjni-plugin/src/main/resources/project-template/m4/jni.m4
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,20 @@ AC_DEFUN([CHECK_JNI_JDK],[
AC_PREREQ([2.61])
__JNI_JDK_HOME="$1"
AC_MSG_CHECKING(if '$__JNI_JDK_HOME' is a JDK)
__JNI_INCLUDE="$__JNI_JDK_HOME/include"
# OSX had to be a little different.
case "$host_os" in
darwin*) __JNI_INCLUDE="$__JNI_JDK_HOME/Headers";;
*) __JNI_INCLUDE="$__JNI_JDK_HOME/include";;
esac
AS_IF(test -r "$__JNI_INCLUDE/jni.h",[
AS_IF(test -r "$__JNI_JDK_HOME/Headers/jni.h",[
__JNI_INCLUDE="$__JNI_JDK_HOME/Headers"
])
AS_IF(test -r "$__JNI_INCLUDE/jni.h",[
AS_IF(test -r "$__JNI_JDK_HOME/Headers/jni.h",[
__JNI_INCLUDE="$__JNI_JDK_HOME/Headers"
])
# Also include the os specific include dirs in the JNI_CFLAGS
__JNI_CFLAGS="-I$__JNI_INCLUDE"
case "$host_os" in
Expand All @@ -108,6 +114,7 @@ AC_DEFUN([CHECK_JNI_JDK],[
solaris*) __JNI_INCLUDE_EXTRAS="solaris";;
mingw*) __JNI_INCLUDE_EXTRAS="win32";;
cygwin*) __JNI_INCLUDE_EXTRAS="win32";;
darwin*) __JNI_INCLUDE_EXTRAS="darwin";;
*) __JNI_INCLUDE_EXTRAS="genunix";;
esac
Expand Down

0 comments on commit c1980ef

Please sign in to comment.