From: Rainer Jung Date: Mon, 19 Jan 2015 10:32:51 +0000 (+0000) Subject: PR 57379: If mod_cgi and mod_cgid get installed, X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a98ee5bc8f5a02538a0fb0038fb9414050e032bb;p=thirdparty%2Fapache%2Fhttpd.git PR 57379: If mod_cgi and mod_cgid get installed, use IfModule for MPM to choose mod_cgi for prefork and mod_cgid in all other cases. Previously when combined with --enable-load-all-modules both modules were loaded and it was undefined which one actually handled cgi requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652955 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/Makefile.in b/Makefile.in index 0f8cf8d51bc..fa8b3f09172 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' \