$NetBSD: patch-aa,v 1.18 2002/02/01 16:04:39 jlam Exp $

--- Makefile.tmpl.orig	Fri Feb  1 10:05:43 2002
+++ Makefile.tmpl
@@ -324,11 +324,6 @@
 	$(MKDIR) $(root)$(mandir)/man1
 	$(MKDIR) $(root)$(mandir)/man8
 	$(MKDIR) $(root)$(sysconfdir)
-	$(MKDIR) $(root)$(sysconfdir)/ssl.crt
-	$(MKDIR) $(root)$(sysconfdir)/ssl.crl
-	$(MKDIR) $(root)$(sysconfdir)/ssl.csr
-	$(MKDIR) $(root)$(sysconfdir)/ssl.key
-	$(MKDIR) $(root)$(sysconfdir)/ssl.prm
 	$(MKDIR) $(root)$(htdocsdir)
 	$(MKDIR) $(root)$(manualdir)
 	$(MKDIR) $(root)$(iconsdir)
@@ -387,34 +382,6 @@
 			file=`echo $${mod} | sed -e 's;^.*/\([^/]*\);\1;'`; \
 			echo "$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}"; \
 			$(INSTALL_DSO) $(TOP)/$(SRC)/$${mod} $(root)$(libexecdir)/$${file}; \
-			name=`$(TOP)/$(AUX)/fmn.sh $(TOP)/$(SRC)/$${mod}`; \
-			if [ ".$$name" = .ssl_module ]; then \
-				echo "<IfDefine SSL>" >>$(SRC)/.apaci.install.conf; \
-			fi; \
-			echo dummy | awk '{ printf("LoadModule %-18s %s\n", modname, modpath); }' \
-			modname="$${name}" modpath="$(libexecdir_relative)$${file}" >>$(SRC)/.apaci.install.conf; \
-			if [ ".$$name" = .ssl_module ]; then \
-				echo "</IfDefine>" >>$(SRC)/.apaci.install.conf; \
-			fi; \
-		done; \
-		echo "" >>$(SRC)/.apaci.install.conf; \
-		echo "#  Reconstruction of the complete module list from all available modules" >>$(SRC)/.apaci.install.conf; \
-		echo "#  (static and shared ones) to achieve correct module execution order." >>$(SRC)/.apaci.install.conf; \
-		echo "#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]" >>$(SRC)/.apaci.install.conf; \
-		echo "ClearModuleList" >>$(SRC)/.apaci.install.conf; \
-		for mod in `egrep "^[ 	]*(Add|Shared)Module" $(SRC)/Configuration.apaci |\
-		            sed	-e 's:[ 	]*SharedModule::' \
-		                -e 's:[ 	]*AddModule::' \
-		                -e 's:modules/[^/]*/::' \
-		                -e 's:[ 	]lib: mod_:' \
-		                -e 's:\.[soam]*$$:.c:'`; do \
-			if [ ".$$mod" = .mod_ssl.c ]; then \
-				echo "<IfDefine SSL>" >>$(SRC)/.apaci.install.conf; \
-			fi; \
-			echo "AddModule $$mod" >>$(SRC)/.apaci.install.conf; \
-			if [ ".$$mod" = .mod_ssl.c ]; then \
-				echo "</IfDefine>" >>$(SRC)/.apaci.install.conf; \
-			fi; \
 		done; \
 	fi
 	@echo "<=== [programs]"
@@ -533,7 +500,7 @@
 #   icons and distributed CGI scripts.
 install-data:
 	@echo "===> [data: Installing initial data files]"
-	-@if [ -f $(root)$(htdocsdir)/index.html ] || [ -f $(root)$(htdocsdir)/index.html.en ]; then \
+	-@if false; then \
 		echo "[PRESERVING EXISTING DATA SUBDIR: $(root)$(htdocsdir)/]"; \
 	else \
 		echo "Copying tree $(TOP)/htdocs/ -> $(root)$(htdocsdir)/"; \
@@ -555,9 +522,10 @@
 		for script in printenv test-cgi; do \
 			cat $(TOP)/cgi-bin/$${script} |\
 			sed -e 's;^#!/.*perl;#!$(PERL);' \
+			    -e 's;LD_LIBRARY_PATH=.*;LD_LIBRARY_PATH=/usr/lib:$(prefix)/lib:/usr/local/lib;' \
 			> $(TOP)/$(SRC)/.apaci.install.tmp; \
-			echo "$(INSTALL_DATA) $(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
-			$(INSTALL_DATA) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
+			echo "$(INSTALL_SCRIPT) $(TOP)/conf/$${script}[*] $(root)$(cgidir)/$${script}"; \
+			$(INSTALL_SCRIPT) $(TOP)/$(SRC)/.apaci.install.tmp $(root)$(cgidir)/$${script}; \
 		done; \
 	fi
 	@echo "Copying tree $(TOP)/icons/ -> $(root)$(iconsdir)/"; \
@@ -571,7 +539,7 @@
 #   and initial config files while preserving existing ones.
 install-config:
 	@echo "===> [config: Installing Apache configuration files]"
-	-@for conf in httpd.conf access.conf srm.conf; do \
+	-@for conf in httpd.conf; do \
 		if [ .$$conf = .httpd.conf ]; then \
 			target_conf="$(TARGET).conf"; \
 		else \
