From faac8c0c52512f5e8aff5ebaf49f1b7dc4cf308d Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Mon, 19 Jan 2015 10:32:51 +0000 Subject: PR 57379: If mod_cgi and mod_cgid get installed, use IfModule for MPM to LoadModule mod_cgi for prefork and mod_cgid for all other MPMs. Previously when combined with --enable-load-all-modules both modules were loaded and it was undefined which one actually handled cgi requests. Based on a patch by olli hauer . git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652955 13f79535-47bb-0310-9956-ffa450edef68 --- Makefile.in | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 0f8cf8d51b..fa8b3f0917 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,6 +58,16 @@ install-conf: -e 's#@@SSLPort@@#$(SSLPORT)#g' \ -e 'p' \ < $$i; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgi " > /dev/null ; then \ + have_cgi="1"; \ + else \ + have_cgi="0"; \ + fi; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgid " > /dev/null ; then \ + have_cgid="1"; \ + else \ + have_cgid="0"; \ + fi; \ for j in $(DSO_MODULES) "^EOL^"; do \ if test $$j != "^EOL^"; then \ if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \ @@ -68,7 +78,17 @@ install-conf: if test "$(LOAD_ALL_MODULES)" = "yes"; then \ loading_disabled=""; \ fi; \ + if test $$j == "cgid" -a "$$have_cgi" == "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + elif test $$j == "cgi" -a "$$have_cgid" == "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + else \ echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + fi; \ fi; \ done; \ sed -e '1,/@@LoadModule@@/d' \ -- cgit v1.2.1