From 5ad1fe77b1d40f5f8556affbfa6af06af93b44f9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 26 Jan 2017 09:58:34 +0100 Subject: [PATCH] m4/mpd_depends.m4: print warning when disabling the feature --- configure.ac | 4 ++-- m4/mpd_auto.m4 | 2 +- m4/mpd_depends.m4 | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index ea4daf7ee..1938f5b36 100644 --- a/configure.ac +++ b/configure.ac @@ -552,7 +552,7 @@ dnl -------------------------------- libmpdclient ------------------------------ MPD_ENABLE_AUTO_PKG_DEPENDS(libmpdclient, LIBMPDCLIENT, [libmpdclient >= 2.2], [MPD client library], [libmpdclient not found], [], - [enable_database], [Cannot use --enable-libmpdclient with --disable-database]) + [enable_database], [Database support is disabled]) dnl -------------------------------- expat -------------------------------- MPD_ENABLE_AUTO_PKG(expat, EXPAT, [expat], @@ -807,7 +807,7 @@ fi MPD_ENABLE_AUTO_PKG_DEPENDS(upnp, UPNP, [libupnp], [UPnP client support], [libupnp not found], [], - [enable_database], [Cannot use --enable-upnp with --disable-database]) + [enable_database], [Database support is disabled]) dnl --------------------------------- libzzip --------------------------------- MPD_ENABLE_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13], diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index ed64064d1..7a13b4cdc 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -181,5 +181,5 @@ dnl dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg AC_DEFUN([MPD_ENABLE_AUTO_PKG_DEPENDS], [ MPD_ENABLE_AUTO_PKG([$1], [$2], [$3], [$4], [$5], [$6], - [MPD_DEPENDS([enable_$1], [$7], [$8])]) + [MPD_DEPENDS([enable_$1], [$7], [$4], [$8])]) ]) diff --git a/m4/mpd_depends.m4 b/m4/mpd_depends.m4 index a60e11b82..8fa11a2ba 100644 --- a/m4/mpd_depends.m4 +++ b/m4/mpd_depends.m4 @@ -2,13 +2,14 @@ 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 -dnl Parameters: varname1, varname2 (=dependency), errmsg +dnl Parameters: varname1, varname2 (=dependency), description, errmsg AC_DEFUN([MPD_DEPENDS], [ if test x$$2 = xno; then if test x$$1 = xauto; then + AC_MSG_WARN([$4: disabling $3]) $1=no elif test x$$1 = xyes; then - AC_MSG_ERROR([$3]) + AC_MSG_ERROR([$3: $4]) fi fi ])