- if test -z "$cgidir"; then
- AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgidir],[
- rjk_cv_cgidir="not found"
+ if test -z "$httpdir"; then
+ AC_CACHE_CHECK([for httpd document root],[rjk_cv_httpdir],[
+ rjk_cv_httpdir="not found"
+ for dir in /var/www/html \
+ /var/www/htdocs \
+ /var/www/localhost/htdocs \
+ /var/www \
+ /home/httpd/html \
+ /srv/www/html \
+ /usr/local/www/data \
+ /usr/local/www/*/data \
+ /Library/WebServer/Documents \
+ /usr/local/apache/htdocs; do
+ if test -d "$dir"; then
+ rjk_cv_httpdir="$dir"
+ fi
+ done
+ ])
+ if test "$rjk_cv_cgiexecdir" = "not found"; then
+ AC_MSG_ERROR([cannot identify httpd documentroot. Set httpdir on configure command line])
+ fi
+ httpdir="$rjk_cv_httpdir"
+ fi
+ if test ! -z "$cgidir"; then
+ # This is a bit harsh but should stop any disasters
+ AC_MSG_ERROR([cgidir has been renamed to cgiexecdir])
+ fi
+ if test -z "$cgiexecdir"; then
+ AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgiexecdir],[
+ rjk_cv_cgiexecdir="not found"