aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-08 18:38:52 +0100
committerMax Kellermann <max@duempel.org>2014-12-08 18:38:52 +0100
commit16f729eb22e490036d65818f3f6c8baef268221d (patch)
tree817609283ba2744a7d18e56f8b5e114116ba6823 /m4
parent36f0bd432c8ccd367696ebd5609f064f9e548e86 (diff)
downloadmpd-16f729eb22e490036d65818f3f6c8baef268221d.tar.gz
mpd-16f729eb22e490036d65818f3f6c8baef268221d.tar.xz
mpd-16f729eb22e490036d65818f3f6c8baef268221d.zip
m4/mpd_auto.m4: fix displayed default value
Was hard-coded to "auto", and the macro parameter was ignored (in the help text).
Diffstat (limited to 'm4')
-rw-r--r--m4/mpd_auto.m49
1 files 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