X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=plugins%2Fconfigure.ac;h=6e7d5b8ad1e661afcab5ff8c01b83d3b73b7eb9e;hb=cd06b728920e7119582de4d9a09ac71034706b2a;hp=7aff9875edfad7501647e6b7e386fb696e7dafc1;hpb=dbacf85fed57839b58ad10605a5245ebe6c1a049;p=vpp.git diff --git a/plugins/configure.ac b/plugins/configure.ac index 7aff9875edf..6e7d5b8ad1e 100644 --- a/plugins/configure.ac +++ b/plugins/configure.ac @@ -1,35 +1,38 @@ AC_INIT(core_plugins, 1.0) LT_INIT AM_INIT_AUTOMAKE +AM_SILENT_RULES([yes]) -AM_PROG_AS AC_PROG_CC -AM_PROG_CC_C_O AC_ARG_ENABLE(tests, AC_HELP_STRING([--enable-tests], [Build unit tests]), [enable_tests=1], [enable_tests=0]) -AC_ARG_WITH(plugin-toolkit, - AC_HELP_STRING([--with-plugin-toolkit], - [build using the vpp toolkit]), - [with_plugin_toolkit=${prefix}/include], - [with_plugin_toolkit=.]) - AC_ARG_WITH(dpdk, - AC_HELP_STRING([--with-dpdk],[Use the Intel dpdk]), + AC_HELP_STRING([--with-dpdk],[Use DPDK]), [with_dpdk=1], [with_dpdk=0]) -AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}]) -AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".") AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1") AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1") AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"]) -AC_DEFUN([PLUGIN], +AC_DEFUN([PLUGIN_ENABLED], +[ + AC_ARG_ENABLE($1_plugin, + AC_HELP_STRING([--disable-$1-plugin], [Do not build $1 plugin]), + [enable_the_plugin=0], + [enable_the_plugin=1]) +if test "x$enable_the_plugin" = x1; then + AC_CONFIG_SUBDIRS($1-plugin) +fi +AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1") +]) + +AC_DEFUN([PLUGIN_DISABLED], [ AC_ARG_ENABLE($1_plugin, AC_HELP_STRING([--enable-$1-plugin], [Build $1 plugin]), @@ -42,7 +45,7 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1") ]) # To add a new plugin subdirectory: -# +# # add PLUGIN(new) below, and # add the following to Makefile.am: # @@ -50,10 +53,16 @@ AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1") # SUBDIRS += new-plugin # endif -PLUGIN(sample) -PLUGIN(sixrd) -PLUGIN(ioam) -PLUGIN(vcgn) -PLUGIN(snat) +PLUGIN_ENABLED(sixrd) +PLUGIN_ENABLED(ioam) +PLUGIN_ENABLED(snat) +PLUGIN_ENABLED(ila) +PLUGIN_ENABLED(lb) +PLUGIN_ENABLED(flowperpkt) +PLUGIN_ENABLED(acl) + +# Disabled plugins, require --enable-XXX-plugin +PLUGIN_DISABLED(vcgn) +PLUGIN_DISABLED(sample) AC_OUTPUT([Makefile])