. "${GRIMOIRE}/MESON_CONFIGURE"

# remove obsolete options
list_remove MPD_OPTS "--enable-mvp" &&
list_remove MPD_OPTS "--disable-mvp" &&
list_remove MPD_OPTS "--enable-oggflac" &&
list_remove MPD_OPTS "--disable-oggflac" &&
list_remove MPD_OPTS "ipv6=true" &&
list_remove MPD_OPTS "ipv6=false" &&
list_remove MPD_OPTS "upnp=true" &&
list_remove MPD_OPTS "upnp=false" &&

config_query_option MPD_OPTS "Enable IPv6 support?" y \
                             "ipv6=enabled" \
                             "ipv6=disabled" &&

config_query_option MPD_OPTS "Enable writing to a FIFO?" y \
                             "fifo=true" \
                             "fifo=false" &&

config_query_option MPD_OPTS "Enable support for clients connecting via TCP?" y \
                             "tcp=true" \
                             "tcp=false" &&

config_query_option MPD_OPTS "Enable support for clients connecting via unix domain sockets?" y \
                             "local_socket=true" \
                             "local_socket=false" &&

config_query_option MPD_OPTS "Enable writing to a pipe?" n \
                             "pipe=true" \
                             "pipe=false" &&

config_query_option MPD_OPTS "Enable HTTP server output?" y \
                             "httpd=true" \
                             "httpd=false" &&

config_query_option MPD_OPTS "Enable recorder file output plugin?" n \
                             "recorder=true" \
                             "recorder=false" &&

config_query_option MPD_OPTS "Enable DSD file output plugin?" n \
                             "dsd=true" \
                             "dsd=false" &&

config_query_option MPD_OPTS "Enable UPnP client support?" n \
                             "upnp=enabled" \
                             "upnp=disabled" &&

config_query_option MPD_OPTS "Enable support for neighbor discovery?" n \
                             "neighbor=true" \
                             "neighbor=false" &&

config_query_option MPD_OPTS "Enable support for CUE sheets?" n \
                             "cue=true" \
                             "cue=false" &&

config_query_option MPD_OPTS "Enable support for Inotify automatic database update?" y \
                             "inotify=true" \
                             "inotify=false"
