-#
-# 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])
-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])
-
-if test "x$enable_sixrd_plugin" = x1; then
- AC_CONFIG_SUBDIRS([sixrd-plugin])
+AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
+AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
+
+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)