Evolving SRv6 (Segment Routing for IPv6)
[vpp.git] / src / configure.ac
index 4ed5570..c22d152 100644 (file)
@@ -10,6 +10,9 @@ AC_PROG_CC
 AM_PROG_AS
 AM_PROG_LIBTOOL
 AC_PROG_YACC
+AM_PATH_PYTHON
+
+AM_CONDITIONAL([CROSSCOMPILE], [test "$cross_compiling" == "yes"])
 
 ###############################################################################
 # Macros
@@ -71,7 +74,7 @@ AC_DEFUN([PLUGIN_DISABLED],
      AC_HELP_STRING([--enable-$1-plugin], [Build $1 plugin]),
        [enable_$1_plugin=yes ],
        [enable_$1_plugin=no])
-  AM_CONDITIONAL(m4_toupper((ENABLE_$1_PLUGIN), test "$enable_$1_plugin" = "yes")
+  AM_CONDITIONAL(m4_toupper(ENABLE_$1_PLUGIN), test "$enable_$1_plugin" = "yes")
   m4_append([list_of_plugins], [$1], [, ])
 ])
 
@@ -95,12 +98,11 @@ DISABLE_ARG(japi,   [Disable Java API bindings])
 
 # --with-X
 WITH_ARG(dpdk,         [Use use DPDK])
-WITH_ARG(dpdk_crypto,  [Use DPDK cryptodev])
+WITH_ARG(dpdk_crypto_sw,[Use DPDK cryptodev SW PMDs])
 WITH_ARG(dpdk_mlx5_pmd,        [Use DPDK with mlx5 PMD])
 
 # --without-X
-WITHOUT_ARG(ipsec,     [Disable IPSec])
-WITHOUT_ARG(ipv6sr,    [Disable IPv6 SR])
+WITHOUT_ARG(libssl,    [Disable libssl])
 WITHOUT_ARG(apicli,    [Disable binary api CLI])
 
 AC_ARG_WITH(unix,
@@ -130,9 +132,8 @@ AC_SUBST(APICLI,            [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
 
 AC_DEFINE_UNQUOTED(DPDK,               [${n_with_dpdk}])
 AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB,    [${n_enable_dpdk_shared}])
-AC_DEFINE_UNQUOTED(DPDK_CRYPTO,                [${n_with_dpdk_crypto}])
-AC_DEFINE_UNQUOTED(IPSEC,              [${n_with_ipsec}])
-AC_DEFINE_UNQUOTED(IPV6SR,             [${n_with_ipv6sr}])
+AC_DEFINE_UNQUOTED(DPDK_CRYPTO_SW,     [${n_with_dpdk_crypto_sw}])
+AC_DEFINE_UNQUOTED(WITH_LIBSSL,                [${n_with_libssl}])
 
 
 # Silence following noise:
@@ -152,6 +153,7 @@ PLUGIN_ENABLED(ioam)
 PLUGIN_ENABLED(lb)
 PLUGIN_ENABLED(sixrd)
 PLUGIN_ENABLED(snat)
+PLUGIN_DISABLED(srv6sample)
 
 ###############################################################################
 # Dependency checks
@@ -172,6 +174,20 @@ AM_COND_IF([ENABLE_G2],
   PKG_CHECK_MODULES(g2, gtk+-2.0)
 ])
 
+# If cross-compiling, we need external vppapigen and we cannot continue without it
+# For native builds, we just set dependency on vpppaigen binary in top_builddir
+AM_COND_IF([CROSSCOMPILE],
+[
+  AC_PATH_PROG([VPPAPIGEN], [vppapigen], [no])
+  if test "$VPPAPIGEN" = "no"; then
+    AC_MSG_ERROR([Externaly built vppapigen is needed when cross-compiling...])
+  fi
+],[
+  VPPAPIGEN=\$\(top_builddir\)/vppapigen
+])
+AC_SUBST([VPPAPIGEN])
+
+
 ###############################################################################
 # JAVA
 ###############################################################################