--- Makefile.orig	Tue May  4 14:47:42 1999
+++ Makefile	Tue May  4 14:47:42 1999
@@ -47,7 +47,7 @@
 #REAL_DAEMON_DIR=/usr/sbin
 #
 # BSD 4.4
-#REAL_DAEMON_DIR=/usr/libexec
+REAL_DAEMON_DIR=/usr/libexec
 #
 # HP-UX SCO Unicos
 #REAL_DAEMON_DIR=/etc
@@ -494,7 +494,7 @@
 # Uncomment the next definition to turn on the language extensions
 # (examples: allow, deny, banners, twist and spawn).
 # 
-#STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
+STYLE	= -DPROCESS_OPTIONS	# Enable language extensions.
 
 ################################################################
 # Optional: Changing the default disposition of logfile records
@@ -517,7 +517,8 @@
 #
 # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
 
-FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
+#FACILITY= LOG_MAIL	# LOG_MAIL is what most sendmail daemons use
+FACILITY= LOG_AUTH
 
 # The syslog priority at which successful connections are logged.
 
@@ -593,7 +594,7 @@
 # look for access control information. Watch out for the quotes and
 # backslashes when you make changes.
 
-TABLES	= -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
+TABLES	= -DHOSTS_DENY=\"${PREFIX}/etc/hosts.deny\" -DHOSTS_ALLOW=\"${PREFIX}/etc/hosts.allow\"
 
 ####################################################
 # Optional: dealing with host name/address conflicts
@@ -613,7 +614,7 @@
 # Paranoid mode implies hostname lookup. In order to disable hostname
 # lookups altogether, see the next section.
 
-PARANOID= -DPARANOID
+#PARANOID= -DPARANOID
 
 ########################################
 # Optional: turning off hostname lookups
@@ -660,9 +661,9 @@
 # Protection against weird shells or weird make programs.
 
 SHELL	= /bin/sh
-.c.o:;	$(CC) $(CFLAGS) -c $*.c
+PREFIX ?= /usr/local
 
-CFLAGS	= -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
+CFLAGS  += -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
 	$(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
 	-DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
 	-DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
@@ -690,6 +691,26 @@
 LIB	= libwrap.a
 
 all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk
+
+install:
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -c -m 644 \
+		tcpd.h ${PREFIX}/include
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -c -m 644 \
+		$(LIB) ${PREFIX}/lib
+	ranlib ${PREFIX}/lib/$(LIB)
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -cs -m ${BINMODE} \
+		tcpd ${PREFIX}/libexec
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -cs -m ${BINMODE} \
+		tcpdchk tcpdmatch ${PREFIX}/sbin
+	${INSTALL} -o ${BINOWN} -g ${BINGRP} -cs -m ${BINMODE} \
+		try-from safe_finger ${PREFIX}/bin
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -c -m ${MANMODE} \
+		tcpd.8 tcpdchk.8 tcpdmatch.8 ${PREFIX}/man/man8
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -c -m ${MANMODE} \
+		hosts_access.3 ${PREFIX}/man/man3
+	${INSTALL} -o ${MANOWN} -g ${MANGRP} -c -m ${MANMODE} \
+		hosts_access.5 hosts_options.5 ${PREFIX}/man/man5
+
 
 # Invalidate all object files when the compiler options (CFLAGS) have changed.
 
