*** Makefile.in	Tue May 27 10:41:44 1997
--- Makefile.in	Tue May 27 11:00:37 1997
***************
*** 24,31 ****
  ##besides /usr/local/lib
  cfg= /usr/local/lib
  
! installbin= install -c -s -m 755
! installdoc= install -c -m 444
  
  ##set the relative location of the WWW library Implementation directory,
  ##from this directory
--- 24,32 ----
  ##besides /usr/local/lib
  cfg= /usr/local/lib
  
! ##change the next lines if install is not BSD-compatible
! installbin= @INSTALL@-c -s -m 755
! installdoc= @INSTALL@-c -m 444
  
  ##set the relative location of the WWW library Implementation directory,
  ##from this directory
***************
*** 56,62 ****
  # "Alert!:  Unable to connect to remote host" whenever you try to
  # access a host other than localhost and have made Lynx without it.
  # See the PROBLEMS file for more information.
! #RESOLVLIB= -lresolv
  
  # !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
  # To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
--- 57,63 ----
  # "Alert!:  Unable to connect to remote host" whenever you try to
  # access a host other than localhost and have made Lynx without it.
  # See the PROBLEMS file for more information.
! RESOLVLIB=@RESOLVLIB@
  
  # !!!!!!!!!!! Alternate socket functions for SOCKS !!!!!!!!!!!!!!!!!!
  # To make a SOCKSified lynx, include -DSOCKS in your SITE_LYDEFS and
***************
*** 271,276 ****
--- 272,278 ----
  	@echo
  
  # Map some extra commands to existing ones
+ guess: @LYNX_TARGET@
  unix: generic
  decstation: ultrix
  decstation-slang: ultrix-slang
***************
*** 1001,1006 ****
--- 1003,1030 ----
  	rm -f WWW/Library/*/.created
  	cd src; $(MAKE) clean
  	rm -f *.b src/lynx core Lynx.leaks
+ 	rm -f config.log config.cache config.status
+ 
+ # When a new version comes in, remake Makefile.in and userdefs.h.in
+ # Ignore warnings like this: WARNING: predecessor cycle (Makefile.in.patch)
+ 
+ Makefile.in: Makefile.in.patch
+ 	cp Makefile Makefile.in
+ 	patch < Makefile.in.patch
+ 
+ userdefs.h.in: userdefs.h.in.patch
+ 	cp userdefs.h userdefs.h.in
+ 	patch < userdefs.h.in.patch
+ 
+ # Then update the patch to help make sure it will work next time
+ 
+ userdefs.h.in.patch: userdefs.h.in
+ 	diff -c userdefs.h userdefs.h.in \
+ 	| sed 's/userdefs.h	/userdefs.h.in	/g' > userdefs.h.in.patch
+ 
+ Makefile.in.patch: Makefile.in
+ 	diff -c Makefile Makefile.in \
+ 	| sed 's/^... Makefile	/*** Makefile.in	/g' > Makefile.in.patch
  
  tar:  clean
  	rm -f lynx
