Mercurial > octave
comparison configure.ac @ 24592:6c3b7ca0cb90
Fix Java >1.8 on macOS (Bug #9439)
* configure.ac: Set up JAVA_CPPFLAGS in a manner consistent with Linux.
* libinterp/octave-value/ov-java.cc: Remove all the CPP magic for macOS.
author | Sebastian Schöps <sesc@gmx.de> |
---|---|
date | Sat, 13 Jan 2018 10:27:11 -0800 |
parents | ac9b4751c223 |
children | f39ae754a7d8 |
comparison
equal
deleted
inserted
replaced
24591:bccb203494f6 | 24592:6c3b7ca0cb90 |
---|---|
2718 AC_MSG_CHECKING([for include file <jni.h>]) | 2718 AC_MSG_CHECKING([for include file <jni.h>]) |
2719 | 2719 |
2720 ## Java and JVM found. Set up flags. | 2720 ## Java and JVM found. Set up flags. |
2721 case $host_os in | 2721 case $host_os in |
2722 darwin*) | 2722 darwin*) |
2723 ## Sneak the -framework flag into mkoctfile via LDFLAGS | |
2724 LDFLAGS="$LDFLAGS -framework JavaVM" | |
2725 ## According to: http://developer.apple.com/unix/crossplatform.html | |
2726 ## one must explicitly set the include path. | |
2727 ## Unfortunately, the include path keeps moving around. | |
2728 if test -n "$JAVA_CPPFLAGS"; then | 2723 if test -n "$JAVA_CPPFLAGS"; then |
2729 JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS}" | 2724 JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS} -I${JAVA_CPPFLAGS}/darwin" |
2730 else | 2725 else |
2731 JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I/System/Library/Frameworks/JavaVM.framework/Home/include -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers" | 2726 JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin" |
2732 fi | 2727 fi |
2733 JAVA_LIBS="-framework JavaVM" | |
2734 ;; | 2728 ;; |
2735 *) | 2729 *) |
2736 if test -n "$JAVA_CPPFLAGS"; then | 2730 if test -n "$JAVA_CPPFLAGS"; then |
2737 JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS} -I${JAVA_CPPFLAGS}/linux" | 2731 JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS} -I${JAVA_CPPFLAGS}/linux" |
2738 else | 2732 else |