From 16f729eb22e490036d65818f3f6c8baef268221d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 Dec 2014 18:38:52 +0100 Subject: m4/mpd_auto.m4: fix displayed default value Was hard-coded to "auto", and the macro parameter was ignored (in the help text). --- m4/mpd_auto.m4 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index aceca2fac..dda1d90cd 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -77,13 +77,18 @@ AC_DEFUN([MPD_AUTO_LIB], [ [$5])]) ]) +AC_DEFUN([MPD_FORMAT_DEFAULT], + [ifelse([$1], [], [auto], + index([$1], [$]), [-1], [$1], + [auto])]) + dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG dnl dnl Parameters: varname1, varname2, pkg, description, errmsg, default, pre AC_DEFUN([MPD_ENABLE_AUTO_PKG], [ AC_ARG_ENABLE(translit([$1], [_], [-]), AS_HELP_STRING([--enable-]translit([$1], [_], [-]), - [enable $4 (default: auto)]),, + [enable $4 (default: ]MPD_FORMAT_DEFAULT([$6])[)]),, [enable_$1=]ifelse([$6], [], [auto], [$6])) $7 @@ -102,7 +107,7 @@ dnl Parameters: varname1, varname2, pkg, libname, symname, libs, cflags, descrip AC_DEFUN([MPD_ENABLE_AUTO_PKG_LIB], [ AC_ARG_ENABLE(translit([$1], [_], [-]), AS_HELP_STRING([--enable-]translit([$1], [_], [-]), - [enable $4 (default: auto)]),, + [enable $4 (default: ]MPD_FORMAT_DEFAULT([$10])[)]),, [enable_$1=]ifelse([$10], [], [auto], [$10])) $11 -- cgit v1.2.3