2009-03-28 11:10:40 +01:00
|
|
|
AC_DEFUN([MPD_AUTO_ENABLED], [
|
|
|
|
var="enable_$1"
|
|
|
|
feature="$2"
|
|
|
|
|
|
|
|
if eval "test x`echo '$'$var` = xauto"; then
|
|
|
|
AC_MSG_NOTICE([auto-detected $feature])
|
|
|
|
eval "$var=yes"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([MPD_AUTO_DISABLED], [
|
|
|
|
var="enable_$1"
|
|
|
|
feature="$2"
|
|
|
|
msg="$3"
|
|
|
|
|
|
|
|
if eval "test x`echo '$'$var` = xauto"; then
|
|
|
|
AC_MSG_WARN([$msg -- disabling $feature])
|
|
|
|
eval "$var=no"
|
2009-03-29 21:44:55 +02:00
|
|
|
elif eval "test x`echo '$'$var` = xyes"; then
|
2009-03-28 11:10:40 +01:00
|
|
|
AC_MSG_ERROR([$msg])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([MPD_AUTO_RESULT], [
|
|
|
|
name="$1"
|
|
|
|
var="enable_$1"
|
|
|
|
found="found_$name"
|
|
|
|
feature="$2"
|
|
|
|
msg="$3"
|
|
|
|
|
|
|
|
if eval "test x`echo '$'$var` = xno"; then
|
|
|
|
eval "$found=no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if eval "test x`echo '$'$found` = xyes"; then
|
|
|
|
MPD_AUTO_ENABLED([$name], [$feature])
|
|
|
|
else
|
|
|
|
MPD_AUTO_DISABLED([$name], [$feature], [$msg])
|
|
|
|
fi
|
|
|
|
])
|
2009-03-28 21:48:07 +01:00
|
|
|
|
|
|
|
AC_DEFUN([MPD_AUTO_PKG], [
|
|
|
|
if eval "test x`echo '$'enable_$1` != xno"; then
|
|
|
|
PKG_CHECK_MODULES([$2], [$3],
|
|
|
|
[eval "found_$1=yes"],
|
|
|
|
[eval "found_$1=no"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
MPD_AUTO_RESULT([$1], [$4], [$5])
|
|
|
|
])
|