Simple ip4 NAT plugin
[vpp.git] / plugins / configure.ac
1 AC_INIT(core_plugins, 1.0)
2 LT_INIT
3 AM_INIT_AUTOMAKE
4
5 AM_PROG_AS
6 AC_PROG_CC
7 AM_PROG_CC_C_O
8
9 AC_ARG_ENABLE(tests,
10               AC_HELP_STRING([--enable-tests], [Build unit tests]),
11               [enable_tests=1],
12               [enable_tests=0])
13
14 AC_ARG_WITH(plugin-toolkit,
15             AC_HELP_STRING([--with-plugin-toolkit],
16             [build using the vpp toolkit]),
17             [with_plugin_toolkit=${prefix}/include],
18             [with_plugin_toolkit=.])
19
20 AC_ARG_WITH(dpdk,
21             AC_HELP_STRING([--with-dpdk],[Use the Intel dpdk]),
22             [with_dpdk=1],
23             [with_dpdk=0])
24
25 AC_SUBST(TOOLKIT_INCLUDE,[${with_plugin_toolkit}])
26 AM_CONDITIONAL(WITH_PLUGIN_TOOLKIT, test "$with_plugin_toolkit" != ".")
27 AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1")
28
29 AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
30 AC_SUBST(DPDK,["-DDPDK=${with_dpdk}"])
31
32
33 #
34 # Please DO NOT, UNDER ANY CIRCUMSTANCES enable or disable
35 # plugins by "clever" manipulation of the arguments to AC_ARG_ENABLE
36 #
37 # Instead, please configure the default set of plugins in 
38 # .../build-data/platforms/<platform>.mk, by adding --enable-XXX-plugin
39 # stanzas to plugins_configure_args_<platform> 
40
41 # The following per-plugin boilerplate is begging for an additional
42 # macro, but the first 10 tries at making one didn't work. Another day.
43
44 #
45 # Sample plugin
46 #
47 AC_ARG_ENABLE(sample_plugin,
48               AC_HELP_STRING([--enable-sample-plugin], [Build sample plugin]),
49               [enable_sample_plugin=1],
50               [enable_sample_plugin=0])
51
52 if test "x$enable_sample_plugin" = x1; then
53    AC_CONFIG_SUBDIRS([sample-plugin])
54 fi
55
56 AM_CONDITIONAL(ENABLE_SAMPLE_PLUGIN, test "$enable_sample_plugin" = "1")
57
58 #
59 # SIXRD plugin
60 #
61 AC_ARG_ENABLE(sixrd_plugin,
62               AC_HELP_STRING([--enable-sixrd-plugin], [Build sixrd plugin]),
63               [enable_sixrd_plugin=1],
64               [enable_sixrd_plugin=0])
65
66 if test "x$enable_sixrd_plugin" = x1; then
67    AC_CONFIG_SUBDIRS([sixrd-plugin])
68 fi
69
70 AM_CONDITIONAL(ENABLE_SIXRD_PLUGIN, test "$enable_sixrd_plugin" = "1")
71
72 #
73 # IOAM plugin
74 #
75 AC_ARG_ENABLE(ioam_plugin,
76               AC_HELP_STRING([--enable-ioam-plugin], [Build ioam plugin]),
77               [enable_ioam_plugin=1],
78               [enable_ioam_plugin=0])
79
80 if test "x$enable_ioam_plugin" = x1; then
81    AC_CONFIG_SUBDIRS([ioam-plugin])
82 fi
83
84 AM_CONDITIONAL(ENABLE_IOAM_PLUGIN, test "$enable_ioam_plugin" = "1")
85
86 #
87 # VCGN plugin
88 #
89 AC_ARG_ENABLE(vcgn_plugin,
90               AC_HELP_STRING([--enable-vcgn-plugin], [Build vcgn plugin]),
91               [enable_vcgn_plugin=1],
92               [enable_vcgn_plugin=0])
93
94 if test "x$enable_vcgn_plugin" = x1; then
95    AC_CONFIG_SUBDIRS([vcgn-plugin])
96 fi
97
98 AM_CONDITIONAL(ENABLE_VCGN_PLUGIN, test "$enable_vcgn_plugin" = "1")
99
100 #
101 # SNAT plugin
102 #
103 AC_ARG_ENABLE(snat_plugin,
104               AC_HELP_STRING([--enable-snat-plugin], [Build snat plugin]),
105               [enable_snat_plugin=1],
106               [enable_snat_plugin=0])
107
108 if test "x$enable_snat_plugin" = x1; then
109    AC_CONFIG_SUBDIRS([snat-plugin])
110 fi
111
112 AM_CONDITIONAL(ENABLE_SNAT_PLUGIN, test "$enable_snat_plugin" = "1")
113
114
115 AC_OUTPUT([Makefile])