2017-01-26 09:45:25 +01:00
|
|
|
dnl Declare a dependency of one feature on another. If the depending
|
|
|
|
dnl feature is disabled, the former must be disabled as well. If the
|
|
|
|
dnl former was explicitly enabled, abort with an error message.
|
|
|
|
dnl
|
2017-01-26 09:58:34 +01:00
|
|
|
dnl Parameters: varname1, varname2 (=dependency), description, errmsg
|
2014-10-24 23:43:21 +02:00
|
|
|
AC_DEFUN([MPD_DEPENDS], [
|
|
|
|
if test x$$2 = xno; then
|
|
|
|
if test x$$1 = xauto; then
|
2017-01-26 09:58:34 +01:00
|
|
|
AC_MSG_WARN([$4: disabling $3])
|
2014-10-24 23:43:21 +02:00
|
|
|
$1=no
|
|
|
|
elif test x$$1 = xyes; then
|
2017-01-26 09:58:34 +01:00
|
|
|
AC_MSG_ERROR([$3: $4])
|
2014-10-24 23:43:21 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
])
|