configure.ac: improve database dependency checks
Abort if --enable-libmpdclient or --enable-upnp are used with --disable-database, instead of ignoring the mismatch silently.
This commit is contained in:
parent
6cf1acfb48
commit
30dd29e251
@ -293,7 +293,9 @@ fi
|
|||||||
AC_ARG_ENABLE(libmpdclient,
|
AC_ARG_ENABLE(libmpdclient,
|
||||||
AS_HELP_STRING([--enable-libmpdclient],
|
AS_HELP_STRING([--enable-libmpdclient],
|
||||||
[enable support for the MPD client]),,
|
[enable support for the MPD client]),,
|
||||||
enable_libmpdclient=$database_auto)
|
enable_libmpdclient=auto)
|
||||||
|
MPD_DEPENDS([enable_libmpdclient], [enable_database],
|
||||||
|
[Cannot use --enable-libmpdclient with --disable-database])
|
||||||
|
|
||||||
AC_ARG_ENABLE(expat,
|
AC_ARG_ENABLE(expat,
|
||||||
AS_HELP_STRING([--enable-expat],
|
AS_HELP_STRING([--enable-expat],
|
||||||
@ -303,7 +305,9 @@ AC_ARG_ENABLE(expat,
|
|||||||
AC_ARG_ENABLE(upnp,
|
AC_ARG_ENABLE(upnp,
|
||||||
AS_HELP_STRING([--enable-upnp],
|
AS_HELP_STRING([--enable-upnp],
|
||||||
[enable UPnP client support (default: auto)]),,
|
[enable UPnP client support (default: auto)]),,
|
||||||
enable_upnp=$database_auto)
|
enable_upnp=auto)
|
||||||
|
MPD_DEPENDS([enable_upnp], [enable_database],
|
||||||
|
[Cannot use --enable-upnp with --disable-database])
|
||||||
|
|
||||||
AC_ARG_ENABLE(adplug,
|
AC_ARG_ENABLE(adplug,
|
||||||
AS_HELP_STRING([--enable-adplug],
|
AS_HELP_STRING([--enable-adplug],
|
||||||
|
9
m4/mpd_depends.m4
Normal file
9
m4/mpd_depends.m4
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
AC_DEFUN([MPD_DEPENDS], [
|
||||||
|
if test x$$2 = xno; then
|
||||||
|
if test x$$1 = xauto; then
|
||||||
|
$1=no
|
||||||
|
elif test x$$1 = xyes; then
|
||||||
|
AC_MSG_ERROR([$3])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
])
|
Loading…
Reference in New Issue
Block a user