X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=plugins%2Fconfigure.ac;h=9c631634ff6491a8c16e1b294e0e567bd971c7b1;hb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;hp=8a5fdbc2175927ee40e195de422f9b92c8e476c4;hpb=20c02cb133cf7b8a0570b83acf927d5a0d601a36;p=vpp.git diff --git a/plugins/configure.ac b/plugins/configure.ac index 8a5fdbc2175..9c631634ff6 100644 --- a/plugins/configure.ac +++ b/plugins/configure.ac @@ -1,115 +1,65 @@ 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}"]) - -# -# Please DO NOT, UNDER ANY CIRCUMSTANCES enable or disable -# plugins by "clever" manipulation of the arguments to AC_ARG_ENABLE -# -# Instead, please configure the default set of plugins in -# .../build-data/platforms/.mk, by adding --enable-XXX-plugin -# stanzas to plugins_configure_args_ - -# The following per-plugin boilerplate is begging for an additional -# macro, but the first 10 tries at making one didn't work. Another day. - -# -# Sample plugin -# -AC_ARG_ENABLE(sample_plugin, - AC_HELP_STRING([--enable-sample-plugin], [Build sample plugin]), - [enable_sample_plugin=1], - [enable_sample_plugin=0]) - -if test "x$enable_sample_plugin" = x1; then - AC_CONFIG_SUBDIRS([sample-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_SAMPLE_PLUGIN, test "$enable_sample_plugin" = "1") - -# -# SIXRD plugin -# -AC_ARG_ENABLE(sixrd_plugin, - AC_HELP_STRING([--enable-sixrd-plugin], [Build sixrd plugin]), - [enable_sixrd_plugin=1], - [enable_sixrd_plugin=0]) - -if test "x$enable_sixrd_plugin" = x1; then - AC_CONFIG_SUBDIRS([sixrd-plugin]) +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]), + [enable_the_plugin=1], + [enable_the_plugin=0]) +if test "x$enable_the_plugin" = x1; then + AC_CONFIG_SUBDIRS($1-plugin) fi +AM_CONDITIONAL(ENABLE_$1_PLUGIN, test "$enable_the_plugin" = "1") +]) -AM_CONDITIONAL(ENABLE_SIXRD_PLUGIN, test "$enable_sixrd_plugin" = "1") - +# To add a new plugin subdirectory: # -# IOAM plugin +# add PLUGIN(new) below, and +# add the following to Makefile.am: # -AC_ARG_ENABLE(ioam_plugin, - AC_HELP_STRING([--enable-ioam-plugin], [Build ioam plugin]), - [enable_ioam_plugin=1], - [enable_ioam_plugin=0]) - -if test "x$enable_ioam_plugin" = x1; then - AC_CONFIG_SUBDIRS([ioam-plugin]) -fi - -AM_CONDITIONAL(ENABLE_IOAM_PLUGIN, test "$enable_ioam_plugin" = "1") - -# -# VCGN plugin -# -AC_ARG_ENABLE(vcgn_plugin, - AC_HELP_STRING([--enable-vcgn-plugin], [Build vcgn plugin]), - [enable_vcgn_plugin=1], - [enable_vcgn_plugin=0]) - -if test "x$enable_vcgn_plugin" = x1; then - AC_CONFIG_SUBDIRS([vcgn-plugin]) -fi - -AM_CONDITIONAL(ENABLE_VCGN_PLUGIN, test "$enable_vcgn_plugin" = "1") - -# -# SNAT plugin -# -AC_ARG_ENABLE(snat_plugin, - AC_HELP_STRING([--enable-snat-plugin], [Build snat plugin]), - [enable_snat_plugin=1], - [enable_snat_plugin=0]) - -if test "x$enable_snat_plugin" = x1; then - AC_CONFIG_SUBDIRS([snat-plugin]) -fi - -AM_CONDITIONAL(ENABLE_SNAT_PLUGIN, test "$enable_snat_plugin" = "1") - +# if ENABLE_new_PLUGIN +# SUBDIRS += new-plugin +# endif + +PLUGIN_ENABLED(ioam) +PLUGIN_ENABLED(snat) +PLUGIN_ENABLED(lb) +PLUGIN_ENABLED(acl) + +# Disabled plugins, require --enable-XXX-plugin +PLUGIN_DISABLED(vcgn) +PLUGIN_DISABLED(sample) AC_OUTPUT([Makefile])