XMMS2_OPTS="$(echo $XMMS2_OPTS $XMMS2_OPTS1 | tr " " "\n" | grep "\-\-with" | tr "\n" " ")"
XMMS2_OPTS="${XMMS2_OPTS/--without-xmms2d=0/--with-xmms2d}"
XMMS2_OPTS="${XMMS2_OPTS/--without-xmms2d=1/--without-xmms2d}"
XMMS2_OPTS="${XMMS2_OPTS/--with-plugins=lastfm,lastfmeta,curl}"
XMMS2_OPTS="${XMMS2_OPTS/--with-plugins=lastfm,lastfmeta,curl}"
XMMS2_OPTS="${XMMS2_OPTS/--with-optionals=cli/--with-optionals=nycli}"
XMMS2_OPTS="${XMMS2_OPTS/--without-optionals=cli/--without-optionals=nycli}"
message "NOTE: not all of these options might be relevant to your selected"  &&
message "tree and version but they don't affect anything or in other words"  &&
message "NOTHING WILL BREAK IF IT ISN'T SUPPORTED"                 &&
config_query_option XMMS2_OPTS                                     \
"Do you want to build the xmms2 daemon(to play music localy)"      \
                    y                                              \
                    "--with-xmms2d"                                \
                    "--without-xmms2d"                             &&
if list_find "$XMMS2_OPTS" "--with-xmms2d" ; then
config_query_option XMMS2_OPTS                                     \
                    "Do you want diskwrite plugin"                 \
                    y                                              \
                    "--with-plugins=diskwrite"                     \
                    "--without-plugins=diskwrite"                  &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want OSS support"                      \
                    y                                              \
                    "--with-plugins=oss"                           \
                    "--without-plugins=oss"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want html playlist support"            \
                    y                                              \
                    "--with-plugins=html"                          \
                    "--without-plugins=html"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want id3 tag support"                  \
                    y                                              \
                    "--with-plugins=id3v2"                         \
                    "--without-plugins=id3v2"                      &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want equalizer support"                \
                    y                                              \
                    "--with-plugins=equalizer"                     \
                    "--without-plugins=equalizer"                  &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want null output support"              \
                    y                                              \
                    "--with-plugins=null"                          \
                    "--without-plugins=null"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want m3u playlist support"             \
                    y                                              \
                    "--with-plugins=m3u"                           \
                    "--without-plugins=m3u"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want cue playlist support"             \
                    y                                              \
                    "--with-plugins=cue"                           \
                    "--without-plugins=cue"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want nulstripper support"              \
                    y                                              \
                    "--with-plugins=nulstripper"                   \
                    "--without-plugins=nulstripper"                &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want pls playlist support"             \
                    y                                              \
                    "--with-plugins=pls"                           \
                    "--without-plugins=pls"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want icecast stream support"           \
                    y                                              \
                    "--with-plugins=icymetaint,curl"               \
                    "--without-plugins=icymetaint,curl"            &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want ices source support"              \
                    y                                              \
                    "--with-plugins=ices"                          \
                    "--without-plugins=ices"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want phase vocoder effect plugin"      \
                    y                                              \
                    "--with-plugins=vocoder"                       \
                    "--without-plugins=vocoder"                    &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want the normalize effect plugin"      \
                    y                                              \
                    "--with-plugins=normalize"                     \
                    "--without-plugins=normalize"                  &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want daap support"                     \
                    y                                              \
                    "--with-plugins=daap"                          \
                    "--without-plugins=daap"                       &&
config_query_option XMMS2_OPTS                                     \
    "Do you want file transport support(to access using file://)"  \
                    y                                              \
                    "--with-plugins=file"                          \
                    "--without-plugins=file"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want asx support"                      \
                    y                                              \
                    "--with-plugins=asx"                           \
                    "--without-plugins=asx"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want asf support"                      \
                    y                                              \
                    "--with-plugins=asf"                           \
                    "--without-plugins=asf"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want rss support"                      \
                    y                                              \
                    "--with-plugins=rss"                           \
                    "--without-plugins=rss"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want xml support"                      \
                    y                                              \
                    "--with-plugins=xml"                           \
                    "--without-plugins=xml"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want xspf support"                     \
                    y                                              \
                    "--with-plugins=xspf"                          \
                    "--without-plugins=xspf"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want MP4 support"                      \
                    y                                              \
                    "--with-plugins=mp4"                           \
                    "--without-plugins=mp4"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want APE support"                      \
                    y                                              \
                    "--with-plugins=apefile"                       \
                    "--without-plugins=apefile"                    &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want FLV support"                      \
                    y                                              \
                    "--with-plugins=flv"                           \
                    "--without-plugins=flv"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want ReplayGain support"               \
                    y                                              \
                    "--with-plugins=replaygain"                    \
                    "--without-plugins=replaygain"                 &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want TTA support"                      \
                    y                                              \
                    "--with-plugins=tta"                           \
                    "--without-plugins=tta"                        &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want WAVE support"                     \
                    y                                              \
                    "--with-plugins=wave"                          \
                    "--without-plugins=wave"                       &&
# Does not build without CDDA.
#config_query_option XMMS2_OPTS                                     \
#                    "Do you want CDDA support"                     \
#                    y                                              \
#                    "--with-plugins=cdda"                          \
#                    "--without-plugins=cdda"                       &&
config_query_option XMMS2_OPTS                                     \
                     "Do you want GVFS support"                    \
                     y                                             \
                     "--with-plugins=gvfs"                         \
                     "--without-plugins=gvfs"                      &&
config_query_option XMMS2_OPTS                                     \
                     "Do you want karaoke support"                 \
                     y                                             \
                     "--with-plugins=karaoke"                      \
                     "--without-plugins=karaoke"
fi                                                                 &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want to build the new cli client"      \
                    y                                              \
                    "--with-optionals=nycli"                       \
                    "--without-optionals=nycli"                    &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want to build the xmms2-launcher"      \
                    y                                              \
                    "--with-optionals=launcher"                    \
                    "--without-optionals=launcher"                  &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want to build the et report tool"      \
                    y                                              \
                    "--with-optionals=et"                          \
                    "--without-optionals=et"                       &&
config_query_option XMMS2_OPTS                                     \
                    "Do you want to install the xmms2 artwork"     \
                    y                                              \
                    "--with-optionals=pixmaps"                     \
                    "--without-optionals=pixmaps"

