diff 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
line wrap: on
line diff
--- a/configure.ac	Fri Jan 12 10:20:31 2018 -0800
+++ b/configure.ac	Sat Jan 13 10:27:11 2018 -0800
@@ -2720,17 +2720,11 @@
   ## Java and JVM found.  Set up flags.
   case $host_os in
     darwin*)
-      ## Sneak the -framework flag into mkoctfile via LDFLAGS
-      LDFLAGS="$LDFLAGS -framework JavaVM"
-      ## According to: http://developer.apple.com/unix/crossplatform.html
-      ## one must explicitly set the include path.
-      ## Unfortunately, the include path keeps moving around.
       if test -n "$JAVA_CPPFLAGS"; then
-        JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS}"
+        JAVA_CPPFLAGS="-I${JAVA_CPPFLAGS} -I${JAVA_CPPFLAGS}/darwin"
       else
-        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"
+        JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/darwin"
       fi
-      JAVA_LIBS="-framework JavaVM"
     ;;
     *)
       if test -n "$JAVA_CPPFLAGS"; then