aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2010-08-12 13:03:04 +0200
committerMartin Willi <martin@revosec.ch>2010-08-12 13:14:32 +0200
commit9e2c88b98d3f5d5c2f35935b2618ca41d368832c (patch)
tree999ed12a9cacdbe79207b206d63f9d8d4ec4bc77 /m4
parent8bec0f5153a2748ac242215d3bbbe5a2f5f811cd (diff)
downloadstrongswan-9e2c88b98d3f5d5c2f35935b2618ca41d368832c.tar.bz2
strongswan-9e2c88b98d3f5d5c2f35935b2618ca41d368832c.tar.xz
Use a m4 helper macro to build plugin lists
Diffstat (limited to 'm4')
-rw-r--r--m4/macros/add-plugin.m410
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/macros/add-plugin.m4 b/m4/macros/add-plugin.m4
new file mode 100644
index 000000000..4986a5449
--- /dev/null
+++ b/m4/macros/add-plugin.m4
@@ -0,0 +1,10 @@
+# ADD_PLUGIN(plugin, category list)
+# -----------------------------------
+# Append the plugin name $1 to the category list variable $2_plugin
+AC_DEFUN([ADD_PLUGIN],
+ if test [patsubst(x$$1, [-], [_])] = xtrue; then
+ [m4_foreach_w([category], [$2],
+ [m4_format([%s_plugins=${%s_plugins}" $1"], category, category)]
+ )]
+ fi
+)