diff options
author | Max Kellermann <max@duempel.org> | 2014-12-08 21:43:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-08 21:54:02 +0100 |
commit | 16f870aa4129e560b4f6cf4a4e4521ee4621e707 (patch) | |
tree | e328edd2093136f0ad62163b474413dc23473214 /m4/mpd_auto.m4 | |
parent | 16f729eb22e490036d65818f3f6c8baef268221d (diff) | |
download | mpd-16f870aa4129e560b4f6cf4a4e4521ee4621e707.tar.gz mpd-16f870aa4129e560b4f6cf4a4e4521ee4621e707.tar.xz mpd-16f870aa4129e560b4f6cf4a4e4521ee4621e707.zip |
m4/mpd_auto.m4: move code to MPD_ARG_ENABLE
Diffstat (limited to '')
-rw-r--r-- | m4/mpd_auto.m4 | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index dda1d90cd..cf24b8e39 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -82,18 +82,17 @@ AC_DEFUN([MPD_FORMAT_DEFAULT], index([$1], [$]), [-1], [$1], [auto])]) -dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG +dnl Wrapper for AC_ARG_ENABLE, AC_DEFINE and AM_CONDITIONAL dnl -dnl Parameters: varname1, varname2, pkg, description, errmsg, default, pre -AC_DEFUN([MPD_ENABLE_AUTO_PKG], [ +dnl Parameters: varname1, varname2, description, default, check +AC_DEFUN([MPD_ARG_ENABLE], [ AC_ARG_ENABLE(translit([$1], [_], [-]), AS_HELP_STRING([--enable-]translit([$1], [_], [-]), - [enable $4 (default: ]MPD_FORMAT_DEFAULT([$6])[)]),, - [enable_$1=]ifelse([$6], [], [auto], [$6])) + [enable $3 (default: ]MPD_FORMAT_DEFAULT([$4])[)]),, + [enable_$1=]ifelse([$4], [], [auto], [$4])) - $7 + $5 - MPD_AUTO_PKG($1, $2, $3, $4, $5) if test x$[]enable_$1 = xyes; then AC_DEFINE(ENABLE_$2, 1, [Define to enable $4]) @@ -101,23 +100,24 @@ AC_DEFUN([MPD_ENABLE_AUTO_PKG], [ AM_CONDITIONAL(ENABLE_$2, test x$[]enable_$1 = xyes) ]) +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], [ + MPD_ARG_ENABLE([$1], [$2], [$4], [$6], [ + $7 + MPD_AUTO_PKG($1, $2, $3, $4, $5) + ]) +]) + dnl Wrapper for AC_ARG_ENABLE and MPD_AUTO_PKG_LIB dnl dnl Parameters: varname1, varname2, pkg, libname, symname, libs, cflags, description, errmsg, default, pre AC_DEFUN([MPD_ENABLE_AUTO_PKG_LIB], [ - AC_ARG_ENABLE(translit([$1], [_], [-]), - AS_HELP_STRING([--enable-]translit([$1], [_], [-]), - [enable $4 (default: ]MPD_FORMAT_DEFAULT([$10])[)]),, - [enable_$1=]ifelse([$10], [], [auto], [$10])) - - $11 - - MPD_AUTO_PKG_LIB($1, $2, $3, $4, $5, $6, $7, $8, $9) - if test x$[]enable_$1 = xyes; then - AC_DEFINE(ENABLE_$2, 1, - [Define to enable $4]) - fi - AM_CONDITIONAL(ENABLE_$2, test x$[]enable_$1 = xyes) + MPD_ARG_ENABLE([$1], [$2], [$4], [$10], [ + $11 + MPD_AUTO_PKG_LIB($1, $2, $3, $4, $5, $6, $7, $8, $9) + ]) ]) dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS |