. "$GRIMOIRE/FUNCTIONS" &&

if is_version_less $VERSION 1.1; then
  config_query NGINX_SYSLOG "Build with syslog support?" n
else
  persistent_add NGINX_SYSLOG &&
  local NGINX_SYSLOG="n"
fi &&

config_query_option NGINX_OPTS "Build with mail support?" n \
                               "--with-mail" "" &&

if list_find "$NGINX_MODULES" "dav_ext"; then
  list_add "NGINX_OPTS" "--with-http_dav_module"
else
  config_query_option NGINX_OPTS "Enable HTTP WebDAV module?" n \
                                 "--with-http_dav_module" ""
fi &&

config_query_option NGINX_OPTS "Enable HTTP Real IP module?" n \
                               "--with-http_realip_module" ""
