From 705737ea7905f50724e98a3a94512a67dae8253b Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Thu, 11 Oct 2001 03:42:53 +0000 Subject: [PATCH] Fixed the configure script to add a LoadModule directive to the default httpd.conf for any module that was compiled as a DSO. Submitted by: Aaron Bannert git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91415 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ Makefile.in | 28 +++++++++++++++++++++++++--- STATUS | 6 +----- acinclude.m4 | 5 ++++- docs/conf/httpd-std.conf | 29 +++-------------------------- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/CHANGES b/CHANGES index cc437f10e7..98bded01b4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.26-dev + *) Fixed the configure script to add a LoadModule directive to + the default httpd.conf for any module that was compiled + as a DSO. [Aaron Bannert ] + *) rewrite mod_ssl input filtering to work with the new input filtering system. [Justin Erenkrantz] diff --git a/Makefile.in b/Makefile.in index 9a94569b96..2ba620ae4b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -36,9 +36,31 @@ install-conf: done; \ for i in *-std* ldap.conf proxy.conf ssl.conf; do \ [ -f $$i ] || continue; \ - sed -e 's#@@ServerRoot@@#$(prefix)#g' \ - -e 's#@@Port@@#$(PORT)#g' \ - < $$i > $(sysconfdir)/$$i; \ + ( \ + n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \ + if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \ + sed -e 's#@@ServerRoot@@#$(prefix)#g' \ + -e 's#@@Port@@#$(PORT)#g' \ + -e '/@@LoadModule@@/d' \ + < $$i; \ + else \ + sed -n -e '/@@LoadModule@@/q' \ + -e 's#@@ServerRoot@@#$(prefix)#g' \ + -e 's#@@Port@@#$(PORT)#g' \ + -e 'p' \ + < $$i; \ + for j in $(DSO_MODULES) "^EOL^"; do \ + if test $$j != "^EOL^"; then \ + echo "LoadModule $${j}_module modules/mod_$${j}.so"; \ + fi; \ + done; \ + sed -e '1,/@@LoadModule@@/d' \ + -e '/@@LoadModule@@/d' \ + -e 's#@@ServerRoot@@#$(prefix)#g' \ + -e 's#@@Port@@#$(PORT)#g' \ + < $$i; \ + fi \ + ) > $(sysconfdir)/$$i; \ chmod 0644 $(sysconfdir)/$$i; \ file=`echo $$i|sed s/-std//`; \ if [ "$$file" = "httpd.conf" ]; then \ diff --git a/STATUS b/STATUS index c662dc25f4..01d318018f 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2001/10/11 01:49:21 $] +Last modified at [$Date: 2001/10/11 03:42:53 $] Release: @@ -83,10 +83,6 @@ RELEASE SHOWSTOPPERS: to make it agree with the operation of the StartServers directive. - * Fix the configure script to add a LoadModule directive to - the default httpd.conf for any module that was compiled - as a DSO. - * revamp the input filter semantics, per discussions since February (and especially at the hackathon last April). Specifically, ap_get_brigade will return a brigade with diff --git a/acinclude.m4 b/acinclude.m4 index ad92f1d1f5..41a6b12099 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -94,6 +94,7 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ APACHE_SUBST(SH_LIBTOOL) APACHE_SUBST(MK_IMPLIB) APACHE_SUBST(INSTALL_PROG_FLAGS) + APACHE_SUBST(DSO_MODULES) abs_srcdir="`(cd $srcdir && pwd)`" @@ -259,7 +260,9 @@ AC_DEFUN(APACHE_MODULE,[ shared*) enable_$1=`echo $ac_n $enable_$1$ac_c|sed 's/shared,*//'` sharedobjs=yes - shared=yes;; + shared=yes + DSO_MODULES="$DSO_MODULES $1" + ;; *) MODLIST="$MODLIST ifelse($4,,$1,$4)" if test "$1" = "so"; then diff --git a/docs/conf/httpd-std.conf b/docs/conf/httpd-std.conf index 035e9b7ac3..dd913d131a 100644 --- a/docs/conf/httpd-std.conf +++ b/docs/conf/httpd-std.conf @@ -193,32 +193,9 @@ Listen @@Port@@ # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # -#LoadModule auth_anon_module modules/mod_auth_anon.so -#LoadModule auth_db_module modules/mod_auth_db.so -#LoadModule auth_dbm_module modules/mod_auth_dbm.so -#LoadModule auth_digest_module modules/mod_auth_digest.so -#LoadModule cern_meta_module modules/mod_cern_meta.so -#LoadModule dav_module modules/mod_dav.so -#LoadModule dav_fs_module modules/mod_dav_fs.so -#LoadModule expires_module modules/mod_expires.so -#LoadModule file_cache_module modules/mod_file_cache.so -#LoadModule headers_module modules/mod_headers.so -#LoadModule info_module modules/mod_info.so -#LoadModule ldap_module modules/mod_ldap.so -#LoadModule auth_ldap_module modules/mod_auth_ldap.so -#LoadModule mime_magic_module modules/mod_mime_magic.so -#LoadModule proxy_module modules/mod_proxy.so -#LoadModule proxy_connect_module modules/proxy_connect.so -#LoadModule proxy_http_module modules/proxy_http.so -#LoadModule proxy_ftp_module modules/proxy_ftp.so -#LoadModule rewrite_module modules/mod_rewrite.so -#LoadModule ssl_module modules/mod_ssl.so -#LoadModule speling_module modules/mod_speling.so -#LoadModule suexec_module modules/mod_suexec.so -#LoadModule status_module modules/mod_status.so -#LoadModule unique_id_module modules/mod_unique_id.so -#LoadModule usertrack_module modules/mod_usertrack.so -#LoadModule vhost_alias_module modules/mod_vhost_alias.so +# Example: +# LoadModule foo_module modules/mod_foo.so +@@LoadModule@@ # # ExtendedStatus controls whether Apache will generate "full" status