From ebfa8f061c7ad49dcc8208833979996ccc51e602 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Jul 2016 13:20:56 +0200 Subject: [PATCH] Fix default handling in M4 macro AC_PLUGIN() The AC_PLUGIN() could not properly handle if a plugin is to be enabled by default. This patch adds support for outputting the correct help text. Signed-off-by: Joachim Nilsson --- m4/plugin.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/plugin.m4 b/m4/plugin.m4 index da0569c3..eec29dce 100644 --- a/m4/plugin.m4 +++ b/m4/plugin.m4 @@ -3,6 +3,7 @@ define([toupper], [translit([$1], [a-z], [A-Z])]) define([sanitize], [translit([$1], [-], [_])]) +define([enadis], [ifelse([$1], [yes], [disable], [enable])]) # AC_PLUGIN(name, default, info) # ------------------------------------------------------------ @@ -12,7 +13,7 @@ Optional Plugins:]) enable_plugin="no" define(pluggy, sanitize($1)) define(PLUGGY, toupper(pluggy)) - AC_ARG_ENABLE([$1-plugin], AS_HELP_STRING([--enable-$1-plugin], [$3]), [ + AC_ARG_ENABLE([$1-plugin], AS_HELP_STRING([--enadis($2)-$1-plugin], [$3]), [ if test "x$enableval" = "xyes"; then enable_plugin="yes" else