# remove obsolete options from AVFS_OPTS
list_remove AVFS_OPTS '--disable-preload' &&
list_remove AVFS_OPTS '--enable-preload' &&
list_remove AVFS_OPTS '--disable-avfscoda' &&
list_remove AVFS_OPTS '--enable-avfscoda' &&

config_query_option AVFS_OPTS "Compile avfs as a shared and static library?" y \
                              "--enable-library" \
                              "--disable-library" &&

config_query_option AVFS_OPTS "Compile in debug information?" n \
                              "--enable-debug" \
                              "--disable-debug" &&

# dav support is broken
if list_find "$AVFS_OPTS" "--enable-dav"; then
  message "${PROBLEM_COLOR}Dav module is incompatible with modern libraries, disabling it...${DEFAULT_COLOR}" &&

  list_remove "AVFS_OPTS" "--enable-dav"
fi &&

list_add "AVFS_OPTS" "--disable-dav"
