Skip to content

Commit

Permalink
Improve FreeBSD support
Browse files Browse the repository at this point in the history
* Detect JAVA_HOME automatically as advised by "man javavm" if not set
* Avoid a compile-time error on FreeBSD 10.3-RELEASE along with clang if the
  OS-specific include directory is not passed to the preprocessor
  • Loading branch information
michael-o committed Jun 13, 2016
1 parent 63f30ef commit 6dc93fe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ AC_DEFUN([WITH_JNI_JDK],
AS_IF(test -z "$JNI_JDK", [
case "$host_os" in
darwin*) __JNI_GUESS="/System/Library/Frameworks/JavaVM.framework";;
freebsd*) __JNI_GUESS=$(env JAVAVM_DRYRUN=yes /usr/local/bin/java | grep '^JAVA_HOME' | cut -c11-);;
*) __JNI_GUESS="/usr";;
esac
AC_MSG_NOTICE([Taking a guess as to where your OS installs the JDK by default...])
Expand Down Expand Up @@ -107,7 +108,7 @@ AC_DEFUN([CHECK_JNI_JDK],[
__JNI_CFLAGS="-I$__JNI_INCLUDE"
case "$host_os" in
darwin*) __JNI_INCLUDE_EXTRAS="darwin";;
bsdi*) __JNI_INCLUDE_EXTRAS="bsdos";;
freebsd*) __JNI_INCLUDE_EXTRAS="freebsd";;
linux*) __JNI_INCLUDE_EXTRAS="linux genunix";;
osf*) __JNI_INCLUDE_EXTRAS="alpha";;
solaris*) __JNI_INCLUDE_EXTRAS="solaris";;
Expand Down

0 comments on commit 6dc93fe

Please sign in to comment.