aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/mpd_auto.m419
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