$NetBSD: patch-ab,v 1.8 2003/12/07 19:18:17 wiz Exp $

--- Makefile.orig	Mon Nov 17 01:43:35 2003
+++ Makefile
@@ -1,30 +1,32 @@
-CC = gcc
-LD = gcc
-RM = rm -f
-MKDIR = mkdir -p
-INSTALL = install -c
-CFLAGS = -Wall -O2 -fomit-frame-pointer
+#CC = gcc
+LD = $(CC)
+#RM = rm -f
+#MKDIR = mkdir -p
+#INSTALL = install -c
+CFLAGS += -Wall -O2 -fomit-frame-pointer
 # You may use OpenSSL's MD5 routines instead of the ones supplied here
 #CFLAGS += -DHAVE_OPENSSL
-LDFLAGS = -s
+#LDFLAGS = -s
 LIBS =
 # Linux with glibc, FreeBSD, NetBSD
-#LIBS += -lcrypt
+LIBS += -lcrypt
 # HP-UX trusted system
 #LIBS += -lsec
 # Solaris (POP_STANDALONE, POP_VIRTUAL)
-#LIBS += -lsocket -lnsl
+.ifdef ${OPSYS} == "SunOS"
+LIBS += -lsocket -lnsl
+.endif
 # PAM
 #LIBS += -lpam
 # TCP wrappers
-#LIBS += -lwrap
+LIBS += -lwrap
 # libwrap may also want this
 #LIBS += -lnsl
 # OpenSSL (-DHAVE_OPENSSL)
 #LIBS += -lcrypto
 
 DESTDIR =
-PREFIX = /usr/local
+#PREFIX = /usr/local
 SBINDIR = $(PREFIX)/sbin
 MANDIR = $(PREFIX)/man
 
