diff options
author | Damjan Marion <dmarion@me.com> | 2018-09-27 18:02:28 +0000 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-09-27 20:00:43 +0000 |
commit | 09cce66888f622af285e92ae05f76462a5a6d3b5 (patch) | |
tree | 61c0c1629d4d53e336594f35d86ce5e6369c4940 /extras/japi/m4/ax_vpp_find_jdk8.m4 | |
parent | 430420fbbade8a45671cac5ab8f3ba7a70fe4434 (diff) |
Revert "japi: Move Java API binding to cmake"
components: Development
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find JNI (missing: JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.10/Modules/FindJNI.cmake:310 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:37 (find_package)
-- Configuring incomplete, errors occurred!
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeOutput.log".
See also "/scratch/vpp-tmp/build-root/build-vpp-native/japi/CMakeFiles/CMakeError.log".
Makefile:640: recipe for target 'japi-configure' failed
make[2]: *** [japi-configure] Error 1
make[2]: Leaving directory '/scratch/vpp-tmp/build-root'
This reverts commit a33db2528485ac39e8987bec7b138dbdad21dc5a.
Change-Id: I8a818ce70a8379656c1134432e22db418a4690fe
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'extras/japi/m4/ax_vpp_find_jdk8.m4')
-rw-r--r-- | extras/japi/m4/ax_vpp_find_jdk8.m4 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/extras/japi/m4/ax_vpp_find_jdk8.m4 b/extras/japi/m4/ax_vpp_find_jdk8.m4 new file mode 100644 index 00000000000..94b785038f7 --- /dev/null +++ b/extras/japi/m4/ax_vpp_find_jdk8.m4 @@ -0,0 +1,43 @@ + + +AC_DEFUN([AX_VPP_FIND_JDK8], +[ +while true +do + if test "${JAVA_HOME+set}" = set ; then + AC_MSG_CHECKING([${JAVA_HOME} for Java 8 compiler]) + JAVAC=${JAVA_HOME}/bin/javac + JAVAH=${JAVA_HOME}/bin/javah + JAR=${JAVA_HOME}/bin/jar + JAVA_VERSION=$(${JAVA_HOME}/bin/javac -source 8 -version 2>&1) + if test 0 -eq "$?"; then + JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) + AC_MSG_RESULT([ok]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Java in ${JAVA_HOME} (path specified in JAVA_HOME) cannot compile Java 8 code]) + fi + break + fi + + for dir in $(find /usr/lib*/jvm/* -maxdepth 0 -type d); do + AC_MSG_CHECKING([${dir} for Java 8 compiler]) + JAVA_VERSION=$(${dir}/bin/javac -source 8 -version 2>&1) + if test 0 -eq "$?"; then + JAVA_VERSION=$(echo "${JAVA_VERSION}" | cut -d\ -f2) + JAVA_HOME=${dir} + JAVAC=${dir}/bin/javac + JAVAH=${dir}/bin/javah + JAR=${dir}/bin/jar + AC_MSG_RESULT([found version $JAVA_VERSION]) + break + else + JAVA_VERSION="" + AC_MSG_RESULT([no]) + fi + done + + test "${JAVA_HOME}set" = set && AC_MSG_ERROR([Could not find Java 8 compiler]) + break +done +]) |