diff options
author | Max Kellermann <max@duempel.org> | 2014-11-22 23:18:07 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-22 23:50:21 +0100 |
commit | c643b6ff167fbd0b6fead4bee38a2b498ee611a7 (patch) | |
tree | 87abf17c65755134fb1c4b54a5e8ccc67ee99316 /m4 | |
parent | b3f5b4932c360efef696f7db112766c63b1de389 (diff) | |
download | mpd-c643b6ff167fbd0b6fead4bee38a2b498ee611a7.tar.gz mpd-c643b6ff167fbd0b6fead4bee38a2b498ee611a7.tar.xz mpd-c643b6ff167fbd0b6fead4bee38a2b498ee611a7.zip |
configure.ac: add macro MPD_ENABLE_AUTO_PKG_LIB
Diffstat (limited to 'm4')
-rw-r--r-- | m4/mpd_auto.m4 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index 041affc65..00e98f7f3 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -97,6 +97,25 @@ 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_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: auto)]),, + [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) +]) + dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS dnl dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg |