--- makefile.orig	Sun Nov 23 12:33:36 2003
+++ makefile	Sun Nov 23 12:33:16 2003
@@ -886,11 +886,11 @@
 WERMIT = makewhat
 BINARY = wermit
 DESTDIR = 
-BINDIR = /usr/local/bin
-MANDIR = /usr/man/man1
+BINDIR = @@prefix@@/bin
+MANDIR = @@prefix@@/share/man/man1
 MANEXT = 1
 SRCDIR =
-INFODIR =
+INFODIR = @@prefix@@/share/kermit
 CERTDIR =
 
 TEXTFILES = COPYING.TXT ckcbwr.txt ckubwr.txt ckuins.txt ckccfg.txt \
@@ -975,48 +975,27 @@
 	fi;\
 	cp $(BINARY) $(DESTDIR)$(BINDIR)/kermit || exit 1;\
 	chmod 755    $(DESTDIR)$(BINDIR)/kermit || exit 1;\
-	rm -f        $(DESTDIR)$(BINDIR)/kermit-sshsub;\
-	ln -s        $(DESTDIR)$(BINDIR)/kermit\
-		     $(DESTDIR)$(BINDIR)/kermit-sshsub || exit 1;\
-	echo 'set flag=f\nPrC Removing binaries' >&3;\
-	echo "RmF $(DESTDIR)$(BINDIR)/kermit-sshsub" >&3;\
-	echo "RmF $(DESTDIR)$(BINDIR)/kermit" >&3;\
-	if test -f ckermit.ini; then\
-		echo "#!$(DESTDIR)$(BINDIR)/kermit" >\
-			$(DESTDIR)$(BINDIR)/_tmp.ini;\
-		cat ckermit.ini >> $(DESTDIR)$(BINDIR)/_tmp.ini;\
-		mv $(DESTDIR)$(BINDIR)/_tmp.ini\
-		   $(DESTDIR)$(BINDIR)/ckermit.ini;\
-		chmod 755 $(DESTDIR)$(BINDIR)/ckermit.ini;\
-		echo "RmF $(DESTDIR)$(BINDIR)/ckermit.ini" >&3;\
-	fi;\
-	echo;\
-	echo 'EfM' >&3;\
-	echo "Kermit binary installed:";\
-	ls -l $(DESTDIR)$(BINDIR)/kermit\
-	      $(DESTDIR)$(BINDIR)/kermit-sshsub\
-	      $(DESTDIR)$(BINDIR)/ckermit.ini;\
 	echo;\
 	echo " WARNING: If C-Kermit is to be used for dialing out,";\
 	echo " you must change its owner and group and permissions";\
 	echo " to match the 'cu' program.  See the ckuins.txt file";\
 	echo " for details.";\
 	echo;\
-	echo MANDIR=$(MANDIR);\
-	if test -n "$(MANDIR)"; then\
-		if test -d $(MANDIR); then\
-			echo  "$(MANDIR) exists...";\
+	echo MANDIR=$(DESTDIR)$(MANDIR);\
+	if test -n "$(DESTDIR)$(MANDIR)"; then\
+		if test -d $(DESTDIR)$(MANDIR); then\
+			echo  "$(DESTDIR)$(MANDIR) exists...";\
 		else\
-			echo "Creating $(MANDIR)...";\
-			mkdir $(MANDIR) || exit 1;\
-			chmod 755 $(MANDIR) || exit 1;\
+			echo "Creating $(DESTDIR)$(MANDIR)...";\
+			mkdir $(DESTDIR)$(MANDIR) || exit 1;\
+			chmod 755 $(DESTDIR)$(MANDIR) || exit 1;\
 		fi;\
 		echo "Installing man page...";\
-		rm -f $(MANDIR)/kermit.$(MANEXT);\
-		cp    ckuker.nr $(MANDIR)/kermit.$(MANEXT) || exit 1;\
-		chmod 644       $(MANDIR)/kermit.$(MANEXT) || exit 1;\
+		rm -f $(DESTDIR)$(MANDIR)/kermit.$(MANEXT);\
+		cp    ckuker.nr $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
+		chmod 644       $(DESTDIR)$(MANDIR)/kermit.$(MANEXT) || exit 1;\
 		echo 'set flag=f\nPrC Removing man pages' >&3;\
-		echo "RmF $(MANDIR)/kermit.$(MANEXT)" >&3;\
+		echo "RmF $(DESTDIR)$(MANDIR)/kermit.$(MANEXT)" >&3;\
 		echo 'EfM' >&3;\
 		echo;\
 	else\
@@ -1882,8 +1861,8 @@
 macosx102nc:
 	@echo Making C-Kermit $(CKVER) for `uname -s` + ncurses...
 	$(MAKE) xermit KTARGET=$${KTARGET:-$(@)} \
-	"CFLAGS= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
-	$(KFLAGS) " "LIBS= -lncurses $(LIBS)"
+	"CFLAGS+= -DMACOSX10 -DCK_NCURSES -DTCPSOCKET -DUSE_STRERROR -O \
+	-DLOCK_DIR=\\\"/tmp\\\" $(KFLAGS) " "LIBS= -lncurses $(LIBS)"
 
 #The problem here is that if curses.h also exists, it conflicts with
 #ncurses.h and and we have fatal errors.  If this happens to you, then
