diff --git a/configure.ac b/configure.ac index 1938f5b36..f8fc6792b 100644 --- a/configure.ac +++ b/configure.ac @@ -796,18 +796,14 @@ AM_CONDITIONAL(ENABLE_BZIP2_TEST, test x$BZIP2 != xno) dnl ---------------------------------- libupnp --------------------------------- -if test x$enable_expat = xno; then - if test x$enable_upnp = xauto; then - AC_MSG_WARN([expat disabled -- disabling UPnP]) - enable_upnp=no - elif test x$enable_upnp = xyes; then - AC_MSG_ERROR([expat disabled -- required for UPnP]) - fi -fi - MPD_ENABLE_AUTO_PKG_DEPENDS(upnp, UPNP, [libupnp], [UPnP client support], [libupnp not found], [], - [enable_database], [Database support is disabled]) + [enable_database], [Database support is disabled], [ + MPD_DEPENDS([enable_upnp], [enable_expat], + [UPnP client support], + [UPnP requires expat]) + ] +) dnl --------------------------------- libzzip --------------------------------- MPD_ENABLE_AUTO_PKG(zzip, ZZIP, [zziplib >= 0.13], diff --git a/m4/mpd_auto.m4 b/m4/mpd_auto.m4 index 7a13b4cdc..b8355fd5a 100644 --- a/m4/mpd_auto.m4 +++ b/m4/mpd_auto.m4 @@ -178,8 +178,10 @@ AC_DEFUN([MPD_ENABLE_AUTO_HEADER], [ dnl Wrapper for MPD_ENABLE_AUTO_PKG and MPD_DEPENDS dnl -dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg +dnl Parameters: varname1, varname2, pkg, description, errmsg, default, dep_variable, dep_errmsg, pre AC_DEFUN([MPD_ENABLE_AUTO_PKG_DEPENDS], [ - MPD_ENABLE_AUTO_PKG([$1], [$2], [$3], [$4], [$5], [$6], - [MPD_DEPENDS([enable_$1], [$7], [$4], [$8])]) + MPD_ENABLE_AUTO_PKG([$1], [$2], [$3], [$4], [$5], [$6], [ + $9 + MPD_DEPENDS([enable_$1], [$7], [$4], [$8]) + ]) ])