diff options
Diffstat (limited to 'm4/mpd_auto.m4')
-rw-r--r-- | m4/mpd_auto.m4 | 9 |
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 |