persistent_add NANO_OPTS
config_query_list NANO_CONFIG                                                 \
	"Use standard compile time features, enable all or choose from list?" \
	"standard" "all" "choose"                                             &&
if [[ "${NANO_CONFIG}" == "all" ]]
then NANO_OPTS="--enable-all"
elif [[ "${NANO_CONFIG}" == "choose" ]] ; then
	config_query NANO_LARGE "Enable support for large files?" y
	config_query NANO_NLS "Enable National Language support?" y
	config_query NANO_BROWSER "Enable mini file-browser?" y
	config_query NANO_HELP "Enable help function?" y
	config_query NANO_JUSTIFY "Enable justify/unjustify function?" y
	config_query NANO_MOUSE "Enable mouse function?" y
	config_query NANO_PWD "Enable setting of working directory?" y
	config_query NANO_SPELLING "Enable spell checker function?" y
	config_query NANO_TAB "Enable tab-completion?" y
	config_query NANO_WRAP "Enable text wrapping?" y
	config_query NANO_COLOR "Enable color and syntax highlighting?" y
	config_query NANO_MULTIBUF "Enable multiple file buffers?" y
	config_query NANO_RC "Enable use of .nanorc file?" y
	config_query NANO_UTF8 "Enable UTF-8 support?" y
	if [[ "${NANO_LARGE}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-largefile"
	else NANO_OPTS="${NANO_OPTS} --disable-largefile"
	fi
	if [[ "${NANO_NLS}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-nls"
	else NANO_OPTS="${NANO_OPTS} --disable-nls"
	fi
	if [[ "${NANO_BROWSER}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-browser"
	else NANO_OPTS="${NANO_OPTS} --disable-browser"
	fi
	if [[ "${NANO_HELP}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-help"
	else NANO_OPTS="${NANO_OPTS} --disable-help"
	fi
	if [[ "${NANO_JUSTIFY}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-justify"
	else NANO_OPTS="${NANO_OPTS} --disable-justify"
	fi
	if [[ "${NANO_MOUSE}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-mouse"
	else NANO_OPTS="${NANO_OPTS} --disable-mouse"
	fi
	if [[ "${NANO_PWD}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-operatingdir"
	else NANO_OPTS="${NANO_OPTS} --disable-operatingdir"
	fi
	if [[ "${NANO_SPELLING}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-speller"
	else NANO_OPTS="${NANO_OPTS} --disable-speller"
	fi
	if [[ "${NANO_TAB}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-tabcomp"
	else NANO_OPTS="${NANO_OPTS} --disable-tabcomp"
	fi
	if [[ "${NANO_WRAP}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-wrapping"
	else NANO_OPTS="${NANO_OPTS} --disable-wrapping"
	fi
	if [[ "${NANO_COLOR}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-color"
	else NANO_OPTS="${NANO_OPTS} --disable-color"
	fi
	if [[ "${NANO_MULTIBUF}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-multibuffer"
	else NANO_OPTS="${NANO_OPTS} --disable-multibuffer"
	fi
	if [[ "${NANO_RC}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-nanorc"
	else NANO_OPTS="${NANO_OPTS} --disable-nanorc"
	fi
	if [[ "${NANO_UTF8}" == "y" ]]
	then NANO_OPTS="${NANO_OPTS} --enable-utf8"
	else NANO_OPTS="${NANO_OPTS} --disable-utf8"
	fi
fi
