summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-12-20 04:15:04 (GMT)
committerGitHub <noreply@github.com>2020-12-20 04:15:04 (GMT)
commit3c7b2ab5db81942024a168343cee4c8418d0a0e8 (patch)
treeeba1b0860dfb06b52e01231ab47b04d8acc07e5e /m4
parent05f6f2becd9f30cc6ce3f17c31cf51369e92536a (diff)
downloadhdf5-3c7b2ab5db81942024a168343cee4c8418d0a0e8.zip
hdf5-3c7b2ab5db81942024a168343cee4c8418d0a0e8.tar.gz
hdf5-3c7b2ab5db81942024a168343cee4c8418d0a0e8.tar.bz2
Update jni.h detection for OS version changes in Macos 11.x (#211)
Diffstat (limited to 'm4')
-rw-r--r--m4/ax_jni_include_dir.m418
1 files changed, 12 insertions, 6 deletions
diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4
index ae7a5f0..cd72098 100644
--- a/m4/ax_jni_include_dir.m4
+++ b/m4/ax_jni_include_dir.m4
@@ -73,13 +73,19 @@ fi
case "$host_os" in
darwin*) # Apple Java headers are inside the Xcode bundle.
- macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p')
- if @<:@ "$macos_version" -gt "7" @:>@; then
- _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework"
- _JINC="$_JTOPDIR/Headers"
+ major_macos_version=$(sw_vers -productVersion | sed -n -e 's/^\(@<:@0-9@:>@*\).@<:@0-9@:>@*.@<:@0-9@:>@*/\1/p')
+ if @<:@ "$major_macos_version" -gt "10" @:>@; then
+ _JTOPDIR="$(/usr/libexec/java_home)"
+ _JINC="$_JTOPDIR/include"
else
- _JTOPDIR="/System/Library/Frameworks/JavaVM.framework"
- _JINC="$_JTOPDIR/Headers"
+ macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p')
+ if @<:@ "$macos_version" -gt "7" @:>@; then
+ _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework"
+ _JINC="$_JTOPDIR/Headers"
+ else
+ _JTOPDIR="/System/Library/Frameworks/JavaVM.framework"
+ _JINC="$_JTOPDIR/Headers"
+ fi
fi
;;
*) _JINC="$_JTOPDIR/include";;