summaryrefslogtreecommitdiff
path: root/m4/ax_jni_include_dir.m4
diff options
context:
space:
mode:
authorkarypid <karypid@yahoo.co.uk>2014-10-21 18:16:24 +0100
committerkarypid <karypid@yahoo.co.uk>2014-10-21 23:33:19 +0100
commitca0304cc3fd6180dd4d0f46f25e67b23ebd6df26 (patch)
treeb5b5ef7b0823c029130cb1f8585af84999faf5bb /m4/ax_jni_include_dir.m4
parentb333bd99e63076f71c3019b61af8073fe91d96da (diff)
downloadautoconf-archive-ca0304cc3fd6180dd4d0f46f25e67b23ebd6df26.tar.gz
Support standard Oracle JDK installation layout on Mac OS X.
Diffstat (limited to 'm4/ax_jni_include_dir.m4')
-rw-r--r--m4/ax_jni_include_dir.m412
1 files changed, 9 insertions, 3 deletions
diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4
index b664d80..becb33a 100644
--- a/m4/ax_jni_include_dir.m4
+++ b/m4/ax_jni_include_dir.m4
@@ -44,7 +44,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 10
+#serial 11
AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
AC_DEFUN([AX_JNI_INCLUDE_DIR],[
@@ -66,8 +66,13 @@ else
fi
case "$host_os" in
- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
- _JINC="$_JTOPDIR/Headers";;
+ darwin*) # Apple JDK is at /System location and has headers symlinked elsewhere
+ case "$_JTOPDIR" in
+ /System/Library/Frameworks/JavaVM.framework/*)
+ _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+ _JINC="$_JTOPDIR/Headers";;
+ *) _JINC="$_JTOPDIR/include";;
+ esac;;
*) _JINC="$_JTOPDIR/include";;
esac
_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
@@ -88,6 +93,7 @@ AC_CHECK_FILE([$_JINC/jni.h],
case "$host_os" in
bsdi*) _JNI_INC_SUBDIRS="bsdos";;
freebsd*) _JNI_INC_SUBDIRS="freebsd";;
+darwin*) _JNI_INC_SUBDIRS="darwin";;
linux*) _JNI_INC_SUBDIRS="linux genunix";;
osf*) _JNI_INC_SUBDIRS="alpha";;
solaris*) _JNI_INC_SUBDIRS="solaris";;