Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds a new --with-cgiroot parameter to the configure script. It allows

to define the path to the CGI root directory. This patch also adds
some logic to use MacOS X's paths by default in case a Darwin based OS
is detected.

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6003 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
commit 32481fbc271c38a7478ee2bc3bd3be95af996546 1 parent 0559d23
@alobbs alobbs authored
Showing with 27 additions and 5 deletions.
  1. +3 −3 Makefile.am
  2. +1 −1  cherokee.conf.sample.pre
  3. +23 −1 configure.in
View
6 Makefile.am
@@ -28,11 +28,11 @@ cherokeeconfdir = $(sysconfdir)/cherokee
cherokeeadmindir = $(datadir)/cherokee/admin
.h.pre.h:
- sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
+ sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
.sample.pre.sample:
- sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
+ sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
.xml.pre.xml:
- sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
+ sed -e "s|%sysconfdir%|${sysconfdir}|g; s|%sbindir%|${sbindir}|g; s|%docdir%|${docdir}|g; s|%prefix%|${prefix}|g; s|%localstatedir%|${localstatedir}|g; s|%libdir%|${libdir}|g; s|%wwwroot%|${WWW_ROOT}|g; s|%cgiroot%|${CGI_ROOT}|g; s|%version%|${PACKAGE_VERSION}|g; s|%phpcgi%|${PHPCGI}|g; s|%datadir%|${datadir}|g; s|%localedir%|${localedir}|g" $< > $@
CONSTANTS_PRE = \
View
2  cherokee.conf.sample.pre
@@ -49,7 +49,7 @@ vserver!1!rule!3!handler = file
vserver!1!rule!4!match = directory
vserver!1!rule!4!match!directory = /cgi-bin
-vserver!1!rule!4!document_root = %prefix%/lib/cgi-bin
+vserver!1!rule!4!document_root = %cgiroot%
vserver!1!rule!4!handler = cgi
vserver!1!rule!5!match = directory
View
24 configure.in
@@ -1281,9 +1281,31 @@ dnl
dnl WWW root directory, and user/group
dnl
AC_ARG_WITH(wwwroot, AC_HELP_STRING([--with-wwwroot=DIR], [Set the WWW root directory]),
- WWW_ROOT="$withval", WWW_ROOT="$localstatedir/www")
+ WWW_ROOT="$withval", [
+ case "$host" in
+ *-*-darwin*)
+ WWW_ROOT="/Library/WebServer/Documents"
+ ;;
+ *)
+ WWW_ROOT="$localstatedir/www"
+ ;;
+ esac
+])
AC_SUBST(WWW_ROOT)
+AC_ARG_WITH(cgiroot, AC_HELP_STRING([--with-cgiroot=DIR], [Set the CGI directory]),
+ CGI_ROOT="$withval", [
+ case "$host" in
+ *-*-darwin*)
+ CGI_ROOT="/Library/WebServer/CGI-Executables"
+ ;;
+ *)
+ CGI_ROOT="$prefix/lib/cgi-bin"
+ ;;
+ esac
+])
+AC_SUBST(CGI_ROOT)
+
AC_ARG_WITH(wwwuser, AC_HELP_STRING([--with-wwwuser=USER], [Set default execution user]),
WWW_USER="$withval", WWW_USER="")
AC_SUBST(WWW_USER)
Please sign in to comment.
Something went wrong with that request. Please try again.