. "$GRIMOIRE/FUNCTIONS" &&

if is_version_less $VERSION 1.7.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 IPv6 support?" n \
                               "--with-ipv6" "" &&

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

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 SUB filter module?" n \
                               "--with-http_sub_module" "" &&

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