configure.ac: add macro MPD_ENABLE_AUTO_PKG_LIB
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user