Commit 16f729eb authored by Max Kellermann's avatar Max Kellermann

m4/mpd_auto.m4: fix displayed default value

Was hard-coded to "auto", and the macro parameter was ignored (in the help text).
parent 36f0bd43
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment