# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../apache/config.in
# Copyright (C) 2006 - 2011 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2004 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---

if pkgcheck apache X
then
 	menu_begin MENU_PKG_APACHE 'Apache Package Options'
	text 'Install prefix for apache packages' \
	     SDECFG_PKG_APACHE_PREFIX "usr"

	pkgout
	list= ; default=
	while read pkg ver ; do
		if [ "$pkg" = "bdb42" ] ; then
			default="$pkg"
		elif [ "$default" = "" ] ; then
			default="$pkg"
		fi
		list="$list $pkg Use_${pkg}_($ver)_as_standard_DB"
	done < <(grep  "^X .* bdb[0-9 ]*" $cfgtmpdir/config/packages | \
	         cut -f5,6 -d' ' | sort)

	if [ "$list" ] ; then
		choice SDECFG_PKG_APACHE_BDB $default $list
	fi

	bool "Enable suEXEC" 					SDECFG_PKG_APACHE_SUEXEC		0
	if [ "$SDECFG_PKG_APACHE_SUEXEC" == "1" ]; then
		text 'suEXEC document root' \
			SDECFG_PKG_APACHE_DOCROOT "lib/htdocs"
	#	text 'suEXEC user directory' \
	#		SDECFG_PKG_APACHE_USERDIR "public_html"
	fi

	bool "DSO support (mod_so)"				SDECFG_PKG_APACHE_MOD_SO		1
	bool "Anonymous user access (mod_auth_anon)"		SDECFG_PKG_APACHE_MOD_AUTH_ANON	0
	bool "DBM authentication support (mod_auth_dbm)"	SDECFG_PKG_APACHE_MOD_AUTH_DBM		0
       	bool "Digest authentication support (mod_auth_digest)"  SDECFG_PKG_APACHE_MOD_AUTH_DIGEST      0
	bool "LDAP authentication support (mod_auth_ldap)"	SDECFG_PKG_APACHE_MOD_AUTH_LDAP	0
	bool "SSL/TLS support (mod_ssl)"			SDECFG_PKG_APACHE_MOD_SSL		1
	bool "WebDAV support (mod_dav)"				SDECFG_PKG_APACHE_MOD_DAV		1
	bool "Dynamic file caching support (mod_cache)"		SDECFG_PKG_APACHE_MOD_CACHE		0
	bool "Disk caching support (mod_disk_cache)"		SDECFG_PKG_APACHE_MOD_DISK_CACHE	0
	bool "Proxy support (mod_proxy)"			SDECFG_PKG_APACHE_MOD_PROXY 		0
	bool "URL rewrite  support (mod_rewrite)"		SDECFG_PKG_APACHE_MOD_REWRITE		1
        bool "Compression support (mod_deflate)"       		SDECFG_PKG_APACHE_MOD_DEFLATE		1
	bool "Server information support (mod_info)"		SDECFG_PKG_APACHE_MOD_INFO		0
	bool "URL spelling correction support (mod_spelling)"	SDECFG_PKG_APACHE_MOD_SPELLING		0

	menu_end
fi