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/configure.ac | |
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/configure.ac')
-rw-r--r-- | extras/japi/configure.ac | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/extras/japi/configure.ac b/extras/japi/configure.ac new file mode 100644 index 00000000000..f6e7b53ac7f --- /dev/null +++ b/extras/japi/configure.ac @@ -0,0 +1,57 @@ +AC_INIT(japi, 18.10) +LT_INIT +AM_INIT_AUTOMAKE +AM_SILENT_RULES([yes]) +AC_PREFIX_DEFAULT([/usr]) + +PKG_CHECK_MODULES([CHECK], [check], [HAVE_CHECK=1], [HAVE_CHECK=0]) +AM_CONDITIONAL([USE_CHECK],[test "$HAVE_CHECK" -eq 1]) + +AC_PROG_CC +AC_PROG_CXX + +# Check if compiler supports specific flag +AC_DEFUN([CC_CHECK_FLAG], +[ + AC_MSG_CHECKING([if $CC supports $1]) + AC_LANG_PUSH([C]) + ac_saved_cflags="$CFLAGS" + CFLAGS="-Werror $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [cc_flag_check=yes], + [cc_flag_check=no] +) + AC_MSG_RESULT([$cc_flag_check]) + CFLAGS="$ac_saved_cflags" + AC_LANG_POP([C]) +]) + +CC_CHECK_FLAG("-Wno-address-of-packed-member") +AS_IF([test "$cc_flag_check" = yes], + [CFLAGS="${CFLAGS} -Wno-address-of-packed-member"], []) + +AM_CONDITIONAL(ENABLE_ACL_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_NAT_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_L2E_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_GBP_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_PPPOE_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_GTPU_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_IOAM_PLUGIN, test "yes" = "yes") +AM_CONDITIONAL(ENABLE_NSH_PLUGIN, test "yes" = "yes") + +AX_VPP_FIND_JDK8 +AC_SUBST(JAVA_HOME) +AC_SUBST(JAVAC) +AC_SUBST(JAVAH) +AC_SUBST(JAR) + +AS_CASE([$host_cpu], + [x86_64], [CPU_FLAGS="-march=corei7 -mtune=corei7-avx"], + [aarch64], [CPU_FLAGS="-march=armv8-a+crc"], + [CPU_FLAGS=""], +) +AC_SUBST([CPU_FLAGS]) + +AC_OUTPUT([Makefile java/Makefile]) + +AC_CONFIG_MACRO_DIR([m4]) |