--- makefile.in.orig	Wed Jan 22 12:43:13 2003
+++ makefile.in	Mon Apr  7 07:32:51 2003
@@ -54,12 +54,12 @@
 ## Where you want the doc-files installed
 docdir= @libdir@/lynx_doc
 DOCDIR= $(DESTDIR)$(docdir)
-docdir1= $(shell echo "$(docdir)"|sed -e 's!^/!!')
+docdir1!= echo "$(docdir)"|sed -e 's!^/!!'
 
 ## Where you want the help-files installed
 helpdir= @libdir@/lynx_help
 HELPDIR= $(DESTDIR)$(helpdir)
-helpdir1= $(shell echo "$(helpdir)"|sed -e 's!^/!!')
+helpdir1!= echo "$(helpdir)"|sed -e 's!^/!!'
 
 ##set the relative location of the WWW library Implementation directory,
 ##from this directory
@@ -351,22 +351,19 @@
 		if test "$(COMPRESS_PROG)" != "" ; then \
 			(cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \
 		fi'
-	@echo Updating $(libdir)/lynx.cfg
-	$(SHELL) -c 'if test -f $(LIBDIR)/lynx.cfg ; then \
-		mv $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.tmp ; \
-	else \
-		cp $(srcdir)/lynx.cfg $(LIBDIR)/lynx.tmp ; \
-	fi'
-	@echo Updating $(libdir)/lynx.cfg to point to installed help-files
+	@echo Updating $(libdir)/lynx.cfg.default
+	cp $(srcdir)/lynx.cfg $(LIBDIR)/lynx.tmp
+	@echo Updating $(libdir)/lynx.cfg.default to point to installed help-files
 	@ECHO_CC@sed	-e '/^HELPFILE:http/s!^!#!' \
 		-e '/^#HELPFILE:file/s!#!!' \
 		-e '/^HELPFILE:file/s!PATH_TO/lynx_help!$(helpdir1)!' \
 		-e '/^[A-Z_]*:/s!PATH_TO/lynx_doc!$(docdir1)!' \
 		-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
 		-e '/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
-		$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg
-	chmod 644 $(LIBDIR)/lynx.cfg
+		$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg.default
+	chmod 644 $(LIBDIR)/lynx.cfg.default
 	-rm -f $(LIBDIR)/lynx.tmp
+	-[ ! -f $(LIBDIR)/lynx.cfg ] && $(INSTALL_DATA) $(LIBDIR)/lynx.cfg.default $(LIBDIR)/lynx.cfg
 
 LYHelp.h : help_files.sed LYHelp.hin
 	@echo Creating $@
@@ -388,7 +385,7 @@
 	$(SHELL) -c '$(srcdir)/cfg_defs.sh $(srcdir)'
 
 install-cfg : $(LIBDIR)
-	@$(SHELL) -c '$(srcdir)/scripts/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg'
+	@$(SHELL) -c '$(srcdir)/scripts/install-cfg.sh "$(INSTALL_DATA)" $(srcdir)/lynx.cfg $(LIBDIR)/lynx.cfg.default'
 
 install-lss : $(LIBDIR)
 	-mv -f $(LIBDIR)/lynx.lss $(LIBDIR)/lynx.oldlss
