From:	SMTP%"ram@acri.fr" 17-FEB-1995 16:31:59.81
To:	USRC
CC:	
Subj:	v47i059: dist-3.0 - Configure script generator and related tools, Patch50

Resent-Date: 16 Feb 1995 14:07:23 -0600
Path: decwrl!amd!amdahl.com!pacbell.com!att-out!rutgers!news.iag.net!news.mathworks.com!uunet!sparky!not-for-mail
From: ram@acri.fr (Raphael Manfredi)
Newsgroups: comp.sources.misc
Subject: v47i059: dist-3.0 - Configure script generator and related tools, Patch50
Followup-To: comp.sources.d
Date: 16 Feb 1995 14:07:23 -0600
Organization: Advanced Computer Research Institute, Lyon, France
Lines: 1054
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-Id: <3i0b9r$hce@sparky.sterling.com>
Nntp-Posting-Host: sparky.sterling.com
X-Md4-Signature: f2118702eace9ef95a389f831d3f7b2d
To: unix-sources@pa.dec.com
Resent-Message-Id: <"VPl3B2.0.t16.X5HHl"@ftp-gw-1.pa.dec.com>
Resent-From: unix-sources@pa.dec.com
X-Mailing-List: <unix-sources@pa.dec.com> archive/latest/483
X-Loop: unix-sources@pa.dec.com
Precedence: list
Resent-Sender: unix-sources-request@pa.dec.com

Submitted-by: ram@acri.fr (Raphael Manfredi)
Posting-number: Volume 47, Issue 59
Archive-name: dist-3.0/patch50
Environment: UNIX, Perl, RCS
Patch-To: dist-3.0: Volume 39, Issue 5-32

[The latest patch for dist version 3.0 is #51.]

System: dist version 3.0
Patch #: 50
Priority: LOW
Subject: patch #49, continued
Date: Mon Jan 30 16:03:50 MET 1995
From: Raphael Manfredi <ram@acri.fr>

Description:
	See patch #49.


Fix:	From rn, say "| patch -p -N -d DIR", where DIR is your dist source
	directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
	If you don't have the patch program, apply the following by hand,
	or get patch (version 2.0, latest patchlevel).

	After patching:
		Configure -ders
		make depend
		make
		make install
		make install.man

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from me:

		Raphael Manfredi <ram@acri.fr>

	If you send a mail message of the following form it will greatly speed
	processing:

		Subject: Command
		@SH mailpatch PATH dist 3.0 LIST
			   ^ note the c

	where PATH is a return path FROM ME TO YOU either in Internet notation,
	or in bang notation from some well-known host, and LIST is the number
	of one or more patches you need, separated by spaces, commas, and/or
	hyphens.  Saying 35- says everything from 35 to the end.

	To get some more detailed instructions, send me the following mail:

		Subject: Command
		@SH mailhelp PATH


Index: patchlevel.h
Prereq: 49
4c4
< #define PATCHLEVEL 49
---
> #define PATCHLEVEL 50

Index: mcon/man/mconfig.SH
Prereq: 3.0.1.12
*** mcon/man/mconfig.SH.old	Mon Jan 30 15:50:18 1995
--- mcon/man/mconfig.SH	Mon Jan 30 15:50:19 1995
***************
*** 20,26 ****
  .TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
  ''' @(#) Manual page for metaconfig
  '''
! ''' $Id: mconfig.SH,v 3.0.1.12 1995/01/11 15:39:16 ram Exp $
  '''
  '''  Copyright (c) 1991-1993, Raphael Manfredi
  '''  
--- 20,26 ----
  .TH METACONFIG $manext "Version $VERSION PL$PATCHLEVEL"
  ''' @(#) Manual page for metaconfig
  '''
! ''' $Id: mconfig.SH,v 3.0.1.13 1995/01/30 14:46:39 ram Exp $
  '''
  '''  Copyright (c) 1991-1993, Raphael Manfredi
  '''  
***************
*** 31,36 ****
--- 31,39 ----
  '''  of the source tree for dist 3.0.
  '''
  ''' $Log: mconfig.SH,v $
+ ''' Revision 3.0.1.13  1995/01/30  14:46:39  ram
+ ''' patch49: documented new special units Prefixit.U and Prefixup.U
+ '''
  ''' Revision 3.0.1.12  1995/01/11  15:39:16  ram
  ''' patch45: documents new -O option and new Getfile escape supports
  ''' patch45: documents the & escape in Myread and the new cc symbol lookup
***************
*** 1599,1604 ****
--- 1602,1641 ----
  getting the old answers from \fIconfig.sh\fR or providing useful hints
  when running on a given platform for the first time. See the \fIConfigure
  Hints\fR paragraph for more information about hints.
+ .TP
+ Prefixit.U
+ The purpose of this unit is to detect changes in the installation prefix
+ directory to recompute automatically suitable defaults from previous answers.
+ It relies on the value of the \fI\$oldprefix\fR variable which holds the
+ previous prefix directory when it changed, and is empty otherwise. For instance,
+ if the prefix was changed from \fI/opt\fR to \fI/usr/local\fR, then the
+ previous binary installation directory will be changed from \fI/opt/bin\fR
+ to \fI/usr/local/bin\fR, or will remain unchanged if it was, say, \fI/bin\fR.
+ .sp
+ You need to call \fBset\fR before issuing an \fBeval\fR on \fI\$prefixit\fR,
+ such as:
+ .Ex
+ set dflt var [dir]
+ eval \$prefixit
+ .Ef
+ which would set \fI\$dflt\fR to \fI\$var\fR or \fI\$prefix/dir\fR depending
+ on whether the prefix remained the same or not. If \fIdir\fR is the
+ string \fInone\fR, a single space value in \fI\$dflt\fR is kept as-is, even
+ when the prefix changes. If \fIdir\fR is omitted, then \fI\$dflt\fR is set
+ to an empty string if the prefix changed, to \fI\$var\fR otherwise.
+ .TP
+ Prefixup.U
+ The intent of thit unit is similar to that of Prefixit.U, i.e. it helps
+ fixing the default string to accomodate prefix changes. However, the shell
+ variable \fI\$prefixup\fR, when evaluated, will only restore ~name expansions,
+ should prefix use such an escape mechanism. Use it as:
+ .Ex
+ set dflt
+ eval \$prefixup
+ .Ef
+ before prompting via \fIgetfile\fR for instance. If the prefix does not
+ make use of ~name expanstion, then the above will be a no-op on the \fI$dflt\fR
+ variable, naturally.
  .TP
  Typedef.U
  This unit produces the \fI\$typedef\fR shell variable, used internally by

Index: mcon/U/privlib.U
Prereq: 3.0.1.2
*** mcon/U/privlib.U.old	Mon Jan 30 15:50:16 1995
--- mcon/U/privlib.U	Mon Jan 30 15:50:16 1995
***************
*** 1,4 ****
! ?RCS: $Id: privlib.U,v 3.0.1.2 1994/08/29 16:31:52 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: privlib.U,v 3.0.1.3 1995/01/30 14:44:23 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,26 ****
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: privlib.U,v $
  ?RCS: Revision 3.0.1.2  1994/08/29  16:31:52  ram
  ?RCS: patch32: now uses installation prefix
  ?RCS:
  ?RCS: Revision 3.0.1.1  1993/09/13  16:12:34  ram
! ?RCS: patch10: added support for /local/lib (WAD)
! ?RCS: patch10: prompt phrasing made more explicit (WAD)
  ?RCS:
  ?RCS: Revision 3.0  1993/08/18  12:09:35  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
  ?MAKE:privlib privlibexp installprivlib: afs package cat Getfile \
! 	Oldconfig prefix
  ?MAKE:	-pick add $@ %<
  ?S:privlib:
  ?S:	This variable contains the eventual value of the PRIVLIB symbol,
--- 9,29 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: privlib.U,v $
+ ?RCS: Revision 3.0.1.3  1995/01/30  14:44:23  ram
+ ?RCS: patch49: can now handle installation prefix changes (from WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.2  1994/08/29  16:31:52  ram
  ?RCS: patch32: now uses installation prefix
  ?RCS:
  ?RCS: Revision 3.0.1.1  1993/09/13  16:12:34  ram
! ?RCS: patch10: added support for /local/lib (WED)
! ?RCS: patch10: prompt phrasing made more explicit (WED)
  ?RCS:
  ?RCS: Revision 3.0  1993/08/18  12:09:35  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
  ?MAKE:privlib privlibexp installprivlib: afs package cat Getfile \
! 	Oldconfig Prefixit test
  ?MAKE:	-pick add $@ %<
  ?S:privlib:
  ?S:	This variable contains the eventual value of the PRIVLIB symbol,
***************
*** 51,63 ****
  ?H:#define PRIVLIB_EXP "$privlibexp"		/**/
  ?H:.
  : determine where private executables go
! case "$privlib" in
! '')
! 	dflt=$prefix/lib/$package
! 	;;
! *)  dflt="$privlib"
! 	;;
! esac
  $cat <<EOM
  
  There are some auxiliary files for $package that need to be put into a
--- 54,61 ----
  ?H:#define PRIVLIB_EXP "$privlibexp"		/**/
  ?H:.
  : determine where private executables go
! set dflt privlib lib/$package
! eval $prefixit
  $cat <<EOM
  
  There are some auxiliary files for $package that need to be put into a
***************
*** 65,72 ****
  
  EOM
  fn=d~+
! rp='Pathname where private library files will reside?'
  . ./getfile
  privlib="$ans"
  privlibexp="$ansexp"
  if $afs; then
--- 63,73 ----
  
  EOM
  fn=d~+
! rp='Pathname where the private library files will reside?'
  . ./getfile
+ if $test "X$privlibexp" != "X$ansexp"; then
+ 	installprivlib=''
+ fi
  privlib="$ans"
  privlibexp="$ansexp"
  if $afs; then

Index: mcon/U/Prefixit.U
*** mcon/U/Prefixit.U.old	Mon Jan 30 15:50:09 1995
--- mcon/U/Prefixit.U	Mon Jan 30 15:50:09 1995
***************
*** 0 ****
--- 1,68 ----
+ ?RCS: $Id: Prefixit.U,v 3.0.1.1 1995/01/30 14:29:22 ram Exp $
+ ?RCS:
+ ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+ ?RCS: 
+ ?RCS: You may redistribute only under the terms of the Artistic Licence,
+ ?RCS: as specified in the README file that comes with the distribution.
+ ?RCS: You may reuse parts of this distribution only within the terms of
+ ?RCS: that same Artistic Licence; a copy of which may be found at the root
+ ?RCS: of the source tree for dist 3.0.
+ ?RCS:
+ ?RCS: $Log: Prefixit.U,v $
+ ?RCS: Revision 3.0.1.1  1995/01/30  14:29:22  ram
+ ?RCS: patch49: created
+ ?RCS:
+ ?X:
+ ?X: Used as: "set dflt var dir; eval $prefixit" to set $dflt to be
+ ?X: $prefix/dir by default, or the previous $var depending on certain
+ ?X: conditions:
+ ?X: - If the $oldprefix variable is empty, then $prefix holds the same
+ ?X:   value as on previous runs. Therefore, reuse $var if set, otherwise
+ ?X:   set $dflt to $prefix/dir.
+ ?X: - If $oldprefix is not empty, then set $dflt to $prefix/dir if $var
+ ?X:   is empty (first run). Otherwise, if $var is $oldprefix/dir, then
+ ?X:   change it to $prefix/dir. If none of the above, reuse the old $var.
+ ?X:
+ ?X: When dir is omitted, the dflt variable is set to $var if prefix did not
+ ?X: change, to an empty value otherwise. If dir=none, then a single space
+ ?X: in var is kept as-is, even if the prefix changes.
+ ?X:
+ ?MAKE:Prefixit: prefix oldprefix
+ ?MAKE:	-pick add $@ %<
+ ?LINT:define prefixit
+ ?S:prefixit:
+ ?S:	This shell variable is used internally by Configure to reset
+ ?S:	the leading installation prefix correctly when it is changed.
+ ?S:		set dflt var [dir]
+ ?S:		eval $prefixit
+ ?S:	That will set $dflt to $var or $prefix/dir depending on the
+ ?S:	value of $var and $oldprefix.
+ ?S:.
+ ?V:prefixit
+ ?T:tp
+ : set the prefixit variable, to compute a suitable default value
+ prefixit='case "$3" in
+ ""|none)
+ 	case "$oldprefix" in
+ 	"") eval "$1=\"\$$2\"";;
+ 	*)
+ 		case "$3" in
+ 		"") eval "$1=";;
+ 		none)
+ 			eval "tp=\"\$$2\"";
+ 			case "$tp" in
+ 			""|" ") eval "$1=\"\$$2\"";;
+ 			*) eval "$1=";;
+ 			esac;;
+ 		esac;;
+ 	esac;;
+ *)
+ 	eval "tp=\"$oldprefix-\$$2-\""; eval "tp=\"$tp\"";
+ 	case "$tp" in
+ 	--|/*--|\~*--) eval "$1=\"$prefix/$3\"";;
+ 	/*-$oldprefix/*|\~*-$oldprefix/*)
+ 		eval "$1=\`echo \$$2 | sed \"s,^$oldprefix,$prefix,\"\`";;
+ 	*) eval "$1=\"\$$2\"";;
+ 	esac;;
+ esac'
+ 

Index: mcon/U/scriptdir.U
Prereq: 3.0.1.1
*** mcon/U/scriptdir.U.old	Mon Jan 30 15:50:17 1995
--- mcon/U/scriptdir.U	Mon Jan 30 15:50:18 1995
***************
*** 1,4 ****
! ?RCS: $Id: scriptdir.U,v 3.0.1.1 1994/08/29 16:32:04 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: scriptdir.U,v 3.0.1.2 1995/01/30 14:46:13 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: scriptdir.U,v $
+ ?RCS: Revision 3.0.1.2  1995/01/30  14:46:13  ram
+ ?RCS: patch49: can now handle installation prefix changes (from WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.1  1994/08/29  16:32:04  ram
  ?RCS: patch32: now uses installation prefix
  ?RCS:
***************
*** 16,22 ****
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
  ?MAKE:scriptdir scriptdirexp installscript: afs cat test Getfile Loc \
! 	Oldconfig +bin prefix
  ?MAKE:	-pick add $@ %<
  ?S:scriptdir:
  ?S:	This variable holds the name of the directory in which the user wants
--- 19,25 ----
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
  ?MAKE:scriptdir scriptdirexp installscript: afs cat test Getfile Loc \
! 	Oldconfig +bin Prefixit prefixexp Prefixup
  ?MAKE:	-pick add $@ %<
  ?S:scriptdir:
  ?S:	This variable holds the name of the directory in which the user wants
***************
*** 49,54 ****
--- 52,59 ----
  ?H:#define SCRIPTDIR_EXP "$scriptdirexp"	/**/
  ?H:.
  : determine where public executable scripts go
+ set scriptdir scriptdir
+ eval $prefixit
  case "$scriptdir" in
  '')
  	dflt="$bin"
***************
*** 56,62 ****
  	$test -d /usr/share/scripts && dflt=/usr/share/scripts
  	$test -d /usr/share/bin && dflt=/usr/share/bin
  	$test -d /usr/local/script && dflt=/usr/local/script
! 	$test -d $prefix/script && dflt=$prefix/script
  	;;
  *)  dflt="$scriptdir"
  	;;
--- 61,69 ----
  	$test -d /usr/share/scripts && dflt=/usr/share/scripts
  	$test -d /usr/share/bin && dflt=/usr/share/bin
  	$test -d /usr/local/script && dflt=/usr/local/script
! 	$test -d $prefixexp/script && dflt=$prefixexp/script
! 	set dflt
! 	eval $prefixup
  	;;
  *)  dflt="$scriptdir"
  	;;
***************
*** 72,77 ****
--- 79,87 ----
  fn=d~
  rp='Where do you keep publicly executable scripts?'
  . ./getfile
+ if $test "X$ansexp" != "X$scriptdirexp"; then
+ 	installscript=''
+ fi
  scriptdir="$ans"
  scriptdirexp="$ansexp"
  if $afs; then

Index: mcon/U/lib.U
Prereq: 3.0.1.1
*** mcon/U/lib.U.old	Mon Jan 30 15:50:13 1995
--- mcon/U/lib.U	Mon Jan 30 15:50:13 1995
***************
*** 1,4 ****
! ?RCS: $Id: lib.U,v 3.0.1.1 1994/08/29 16:27:40 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: lib.U,v 3.0.1.2 1995/01/30 14:38:08 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,21 ****
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: lib.U,v $
  ?RCS: Revision 3.0.1.1  1994/08/29  16:27:40  ram
  ?RCS: patch32: now uses installation prefix to set the default
  ?RCS:
  ?RCS: Revision 3.0  1993/08/18  12:08:56  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
! ?MAKE:lib libexp: Getfile Loc Oldconfig prefix
  ?MAKE:	-pick add $@ %<
  ?S:lib:
  ?S:	This variable holds the name of the directory in which the user wants
--- 9,24 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: lib.U,v $
+ ?RCS: Revision 3.0.1.2  1995/01/30  14:38:08  ram
+ ?RCS: patch49: can now handle installation prefix changes (from WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.1  1994/08/29  16:27:40  ram
  ?RCS: patch32: now uses installation prefix to set the default
  ?RCS:
  ?RCS: Revision 3.0  1993/08/18  12:08:56  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
! ?MAKE:lib libexp: Getfile Loc Oldconfig Prefixit Prefixup prefixexp
  ?MAKE:	-pick add $@ %<
  ?S:lib:
  ?S:	This variable holds the name of the directory in which the user wants
***************
*** 28,35 ****
  ?S:	at configuration time, for convenient use in your makefiles.
  ?S:.
  : determine where public libraries go
  case "$lib" in
! '') dflt=`./loc . "." $prefix/lib /usr/local/lib /usr/lib /lib`;;
  *)  dflt="$lib";;
  esac
  echo " "
--- 31,44 ----
  ?S:	at configuration time, for convenient use in your makefiles.
  ?S:.
  : determine where public libraries go
+ set lib lib
+ eval $prefixit
  case "$lib" in
! '')
! 	dflt=`./loc . "." $prefixexp/lib /usr/local/lib /usr/lib /lib`
! 	set dflt
! 	eval $prefixup
! 	;;
  *)  dflt="$lib";;
  esac
  echo " "

Index: mcon/U/bin.U
Prereq: 3.0.1.2
*** mcon/U/bin.U.old	Mon Jan 30 15:50:11 1995
--- mcon/U/bin.U	Mon Jan 30 15:50:11 1995
***************
*** 1,4 ****
! ?RCS: $Id: bin.U,v 3.0.1.2 1994/08/29 16:05:28 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: bin.U,v 3.0.1.3 1995/01/30 14:32:40 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: bin.U,v $
+ ?RCS: Revision 3.0.1.3  1995/01/30  14:32:40  ram
+ ?RCS: patch49: can now handle installation prefix changes (from WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.2  1994/08/29  16:05:28  ram
  ?RCS: patch32: now uses installation prefix
  ?RCS:
***************
*** 18,24 ****
  ?RCS: Revision 3.0  1993/08/18  12:05:26  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
! ?MAKE:bin binexp installbin: Getfile Oldconfig afs cat prefix
  ?MAKE:	-pick add $@ %<
  ?S:bin:
  ?S:	This variable holds the name of the directory in which the user wants
--- 21,27 ----
  ?RCS: Revision 3.0  1993/08/18  12:05:26  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
! ?MAKE:bin binexp installbin: Prefixit Getfile Oldconfig afs cat test
  ?MAKE:	-pick add $@ %<
  ?S:bin:
  ?S:	This variable holds the name of the directory in which the user wants
***************
*** 49,65 ****
  ?D:bin='/usr/local/bin'
  : determine where public executables go
  echo " "
! case "$bin" in
! '')
! 	dflt="$prefix/bin"
! 	;;
! *)
! 	dflt="$bin"
! 	;;
! esac
  fn=d~
  rp='Pathname where the public executables will reside?'
  . ./getfile
  bin="$ans"
  binexp="$ansexp"
  if $afs; then
--- 52,65 ----
  ?D:bin='/usr/local/bin'
  : determine where public executables go
  echo " "
! set dflt bin bin
! eval $prefixit
  fn=d~
  rp='Pathname where the public executables will reside?'
  . ./getfile
+ if $test "X$ansexp" != "X$binexp"; then
+ 	installbin=''
+ fi
  bin="$ans"
  binexp="$ansexp"
  if $afs; then

Index: mcon/U/Config_h.U
Prereq: 3.0.1.2
*** mcon/U/Config_h.U.old	Mon Jan 30 15:50:08 1995
--- mcon/U/Config_h.U	Mon Jan 30 15:50:08 1995
***************
*** 1,4 ****
! ?RCS: $Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: Config_h.U,v $
+ ?RCS: Revision 3.0.1.3  1995/01/30  14:25:39  ram
+ ?RCS: patch49: typo fixes in leading config.h comment (WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.2  1993/08/24  12:13:20  ram
  ?RCS: patch3: added TOP as a local shell temporary variable
  ?RCS:
***************
*** 60,69 ****
   * running Configure.
   *
   * Feel free to modify any of this as the need arises.  Note, however,
!  * that running config.h.SH again will wipe out any changes you've made.
!  * For a more permanent change edit config.sh and rerun config.h.SH.
   *
!  * \$Id: Config_h.U,v 3.0.1.2 1993/08/24 12:13:20 ram Exp $
   */
  
  /* Configuration time: $cf_time
--- 63,72 ----
   * running Configure.
   *
   * Feel free to modify any of this as the need arises.  Note, however,
!  * that running config_h.SH again will wipe out any changes you've made.
!  * For a more permanent change edit config.sh and rerun config_h.SH.
   *
!  * \$Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
   */
  
  /* Configuration time: $cf_time

Index: mcon/U/Prefixup.U
*** mcon/U/Prefixup.U.old	Mon Jan 30 15:50:10 1995
--- mcon/U/Prefixup.U	Mon Jan 30 15:50:10 1995
***************
*** 0 ****
--- 1,38 ----
+ ?RCS: $Id: Prefixup.U,v 3.0.1.1 1995/01/30 14:30:40 ram Exp $
+ ?RCS:
+ ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+ ?RCS: 
+ ?RCS: You may redistribute only under the terms of the Artistic Licence,
+ ?RCS: as specified in the README file that comes with the distribution.
+ ?RCS: You may reuse parts of this distribution only within the terms of
+ ?RCS: that same Artistic Licence; a copy of which may be found at the root
+ ?RCS: of the source tree for dist 3.0.
+ ?RCS:
+ ?RCS: $Log: Prefixup.U,v $
+ ?RCS: Revision 3.0.1.1  1995/01/30  14:30:40  ram
+ ?RCS: patch49: created
+ ?RCS:
+ ?X:
+ ?X: Used as: "set dflt; eval $prefixup" to set $dflt to be $prefix/dir
+ ?X: instead of $prefixexp/dir, in case portability was involved somehow
+ ?X: and $prefix uses ~name expansion.
+ ?X:
+ ?MAKE:Prefixup: prefix prefixexp
+ ?MAKE:	-pick add $@ %<
+ ?LINT:define prefixup
+ ?S:prefixup:
+ ?S:	This shell variable is used internally by Configure to reset
+ ?S:	the leading installation prefix correctly when $prefix uses
+ ?S:	~name expansion.
+ ?S:		set dflt
+ ?S:		eval $prefixup
+ ?S:	That will set $dflt to $prefix/dir if it was $prefixexp/dir and
+ ?S:	$prefix differs from $prefixexp.
+ ?S:.
+ ?V:prefixup
+ : set the prefixup variable, to restore leading tilda escape
+ prefixup='case "$prefixexp" in
+ "$prefix") ;;
+ *) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
+ esac'
+ 

Index: mcon/pl/obsolete.pl
Prereq: 3.0
*** mcon/pl/obsolete.pl.old	Mon Jan 30 15:50:21 1995
--- mcon/pl/obsolete.pl	Mon Jan 30 15:50:21 1995
***************
*** 1,4 ****
! ;# $Id: obsolete.pl,v 3.0 1993/08/18 12:10:27 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
--- 1,4 ----
! ;# $Id: obsolete.pl,v 3.0.1.1 1995/01/30 14:49:22 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
***************
*** 9,14 ****
--- 9,17 ----
  ;#  of the source tree for dist 3.0.
  ;#
  ;# $Log: obsolete.pl,v $
+ ;# Revision 3.0.1.1  1995/01/30  14:49:22  ram
+ ;# patch49: random clean-up in &record_obsolete
+ ;#
  ;# Revision 3.0  1993/08/18  12:10:27  ram
  ;# Baseline for dist 3.0 netwide release.
  ;#
***************
*** 24,31 ****
  	local($_) = @_;
  	local(@obsoleted);					# List of obsolete symbols
  	local($symbol);						# New symbol which must be used
! 	local($dollar);						# The '$' or a null string
! 	$dollar = '$' if s/^\$//;			# Starts with a '$' if shell symbol
  	# Syntax for obsolete symbols specification is
  	#    list of symbols (obsolete ones):
  	if (/^(\w+)\s*\((.*)\)\s*:$/) {
--- 27,33 ----
  	local($_) = @_;
  	local(@obsoleted);					# List of obsolete symbols
  	local($symbol);						# New symbol which must be used
! 	local($dollar) = s/^\$// ? '$':'';	# The '$' or a null string
  	# Syntax for obsolete symbols specification is
  	#    list of symbols (obsolete ones):
  	if (/^(\w+)\s*\((.*)\)\s*:$/) {

Index: mcon/U/rootid.U
Prereq: 3.0
*** mcon/U/rootid.U.old	Mon Jan 30 15:50:16 1995
--- mcon/U/rootid.U	Mon Jan 30 15:50:16 1995
***************
*** 1,4 ****
! ?RCS: $Id: rootid.U,v 3.0 1993/08/18 12:09:42 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: rootid.U,v 3.0.1.1 1995/01/30 14:45:36 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: rootid.U,v $
+ ?RCS: Revision 3.0.1.1  1995/01/30  14:45:36  ram
+ ?RCS: patch49: now only prints a single empty line when outputting something
+ ?RCS:
  ?RCS: Revision 3.0  1993/08/18  12:09:42  ram
  ?RCS: Baseline for dist 3.0 netwide release.
  ?RCS:
***************
*** 24,33 ****
  ?H:#define ROOTID $rootid		/**/
  ?H:.
  : determine root id
- echo " "
  rootid=`$sed -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d" </etc/passwd`
  case "$rootid" in
  '') rootid=0 ;;
! *) echo "Root uid = $rootid" >&4 ;;
  esac
  
--- 27,35 ----
  ?H:#define ROOTID $rootid		/**/
  ?H:.
  : determine root id
  rootid=`$sed -e "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/" -e "q" -e "}" -e "d" </etc/passwd`
  case "$rootid" in
  '') rootid=0 ;;
! *) echo " "; echo "Root uid = $rootid" >&4 ;;
  esac
  

Index: mcon/U/i_regex.U
*** mcon/U/i_regex.U.old	Mon Jan 30 15:50:12 1995
--- mcon/U/i_regex.U	Mon Jan 30 15:50:12 1995
***************
*** 0 ****
--- 1,35 ----
+ ?RCS: $Id: i_regex.U,v 3.0.1.1 1995/01/30 14:35:45 ram Exp $
+ ?RCS:
+ ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+ ?RCS: 
+ ?RCS: You may redistribute only under the terms of the Artistic Licence,
+ ?RCS: as specified in the README file that comes with the distribution.
+ ?RCS: You may reuse parts of this distribution only within the terms of
+ ?RCS: that same Artistic Licence; a copy of which may be found at the root
+ ?RCS: of the source tree for dist 3.0.
+ ?RCS:
+ ?RCS: Original Author: Sidney C. Smith <scsmith@cbda9.apgea.army.mil>
+ ?RCS:
+ ?RCS: $Log: i_regex.U,v $
+ ?RCS: Revision 3.0.1.1  1995/01/30  14:35:45  ram
+ ?RCS: patch49: created
+ ?RCS:
+ ?RCS:
+ ?MAKE:i_regex: Inhdr
+ ?MAKE:	-pick add $@ %<
+ ?S:i_regex:
+ ?S:	This variable conditionally defines the I_REGEX symbol, which
+ ?S:	indicates to the C program that <regex.h> exists and should
+ ?S:	be included.
+ ?S:.
+ ?C:I_REGEX:
+ ?C:	This symbol, if defined, indicates that <regex.h> exists and should
+ ?C:	be included.
+ ?C:.
+ ?H:#$i_regex I_REGEX	/**/
+ ?H:.
+ ?LINT:set i_regex
+ : see if regex is available
+ set regex.h i_regex
+ eval $inhdr
+ 

Index: mcon/U/Begin.U
Prereq: 3.0.1.1
*** mcon/U/Begin.U.old	Mon Jan 30 15:50:07 1995
--- mcon/U/Begin.U	Mon Jan 30 15:50:07 1995
***************
*** 1,4 ****
! ?RCS: $Id: Begin.U,v 3.0.1.1 1994/10/31 09:32:20 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: Begin.U,v 3.0.1.2 1995/01/30 14:25:08 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: Begin.U,v $
+ ?RCS: Revision 3.0.1.2  1995/01/30  14:25:08  ram
+ ?RCS: patch49: avoid an empty rmlist: systems might choke on it (WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.1  1994/10/31  09:32:20  ram
  ?RCS: patch44: created
  ?RCS:
***************
*** 26,30 ****
  : Here we go...
  echo "Beginning of configuration questions for $package."
  
! trap 'echo " "; rm -rf $rmlist; exit 1' 1 2 3 15
  
--- 29,36 ----
  : Here we go...
  echo "Beginning of configuration questions for $package."
  
! ?X: Make sure the rm below is given a non-empty list for some systems.
! ?X: This is run only when within the UU directory, hence we can safely
! ?X: attempt to rm a non-existent 'X' file...
! trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
  

Index: mcon/pl/cosmetic.pl
Prereq: 3.0.1.1
*** mcon/pl/cosmetic.pl.old	Mon Jan 30 15:50:20 1995
--- mcon/pl/cosmetic.pl	Mon Jan 30 15:50:20 1995
***************
*** 1,4 ****
! ;# $Id: cosmetic.pl,v 3.0.1.1 1993/11/10 17:39:10 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
--- 1,4 ----
! ;# $Id: cosmetic.pl,v 3.0.1.2 1995/01/30 14:47:52 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
***************
*** 9,14 ****
--- 9,17 ----
  ;#  of the source tree for dist 3.0.
  ;#
  ;# $Log: cosmetic.pl,v $
+ ;# Revision 3.0.1.2  1995/01/30  14:47:52  ram
+ ;# patch49: forgot to localize the spaces variable
+ ;#
  ;# Revision 3.0.1.1  1993/11/10  17:39:10  ram
  ;# patch14: now also adds confmagic.h if not in MANIFEST.new already
  ;# patch14: new functions mani_add and mani_remove to factorize code
***************
*** 23,28 ****
--- 26,32 ----
  	# on the actual text held in Config_h.U. If the unit is modified, then the
  	# following might need adjustments.
  	local($blank_lines) = 0;
+ 	local($spaces) = 0;
  	open(CONF_H, 'config_h.SH') || die "Can't open config_h.SH\n";
  	while(<CONF_H>) {
  		++$blank_lines if /^$/;

Index: mcon/U/d_attribut.U
Prereq: 3.0.1.2
*** mcon/U/d_attribut.U.old	Mon Jan 30 15:50:11 1995
--- mcon/U/d_attribut.U	Mon Jan 30 15:50:11 1995
***************
*** 1,4 ****
! ?RCS: $Id: d_attribut.U,v 3.0.1.2 1995/01/11 15:25:47 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: d_attribut.U,v 3.0.1.3 1995/01/30 14:33:45 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 11,16 ****
--- 11,19 ----
  ?RCS: Original Author: Andy Dougherty <doughera@lafcol.lafayette.edu>
  ?RCS:
  ?RCS: $Log: d_attribut.U,v $
+ ?RCS: Revision 3.0.1.3  1995/01/30  14:33:45  ram
+ ?RCS: patch49: test C program now includes <stdio.h> (WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.2  1995/01/11  15:25:47  ram
  ?RCS: patch45: fixed typo in the d_attribut variable (ADO)
  ?RCS:
***************
*** 40,45 ****
--- 43,49 ----
  echo " "
  echo "Checking whether your compiler can handle __attribute__ ..." >&4
  $cat >attrib.c <<'EOCP'
+ #include <stdio.h>
  void croak (char* pat,...) __attribute__((format(printf,1,2),noreturn));
  EOCP
  if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then

Index: mcon/pl/configure.pl
Prereq: 3.0.1.4
*** mcon/pl/configure.pl.old	Mon Jan 30 15:50:19 1995
--- mcon/pl/configure.pl	Mon Jan 30 15:50:19 1995
***************
*** 1,4 ****
! ;# $Id: configure.pl,v 3.0.1.4 1995/01/11 15:40:02 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
--- 1,4 ----
! ;# $Id: configure.pl,v 3.0.1.5 1995/01/30 14:47:15 ram Exp $
  ;#
  ;#  Copyright (c) 1991-1993, Raphael Manfredi
  ;#  
***************
*** 9,14 ****
--- 9,17 ----
  ;#  of the source tree for dist 3.0.
  ;#
  ;# $Log: configure.pl,v $
+ ;# Revision 3.0.1.5  1995/01/30  14:47:15  ram
+ ;# patch49: removed old "do name()" routine call constructs
+ ;#
  ;# Revision 3.0.1.4  1995/01/11  15:40:02  ram
  ;# patch45: now allows @if statements for the add.Config_sh unit inclusion
  ;#
***************
*** 228,234 ****
  	else {
  		die "Unrecognized command from Makefile: $cmd\n";
  	}
! 	do check_state();		# Make sure there are no pending statements
  	close UNIT;
  }
  
--- 231,237 ----
  	else {
  		die "Unrecognized command from Makefile: $cmd\n";
  	}
! 	&check_state;		# Make sure there are no pending statements
  	close UNIT;
  }
  

Index: MANIFEST
*** MANIFEST.old	Mon Jan 30 15:50:22 1995
--- MANIFEST	Mon Jan 30 15:50:22 1995
***************
*** 107,112 ****
--- 107,114 ----
  mcon/U/Oldconfig.U         Looks for old config.sh file
  mcon/U/Oldsym.U            Try to propagate symbols
  mcon/U/Options.U           Configure option parsing
+ mcon/U/Prefixit.U          Fixes path prefix in variables in case it changed
+ mcon/U/Prefixup.U          Fixes vars with path prefix using ~name expansion
  mcon/U/Rcs.U               Some stupid redefinitions to keep RCS happy
  mcon/U/Setvar.U            Set a variable with some sanity checks
  mcon/U/Tr.U                Builds a tr script to handle lower and upper classes
***************
*** 368,373 ****
--- 370,376 ----
  mcon/U/i_neterrno.U        Shall we include <net/errno.h>?
  mcon/U/i_niin.U            Shall we include <netinet/in.h>?
  mcon/U/i_pwd.U             Shall we include <pwd.h>?
+ mcon/U/i_regex.U           Shall we include <regex.h>?
  mcon/U/i_stddef.U          Shall we include <stddef.h>?
  mcon/U/i_stdlib.U          Shall we include <stdlib.h>?
  mcon/U/i_string.U          <string.h> or <strings.h>?

Index: README
*** README.old	Mon Jan 30 15:50:01 1995
--- README	Mon Jan 30 15:50:01 1995
***************
*** 15,23 ****
      Artistic License for more details.
  ------------------------------------------------------------------------
  
! This version of dist requires you to have at least perl 4.0 but not
! perl 5.0, which is guranteed not to work... A port will be required
! to move to the new perl 5.0.
  
  Please read all the directions below before you proceed any further, and
  then follow them carefully.
--- 15,27 ----
      Artistic License for more details.
  ------------------------------------------------------------------------
  
! This version of dist requires you to have at least perl 4.0 PL36.
! It has also been ported to work with perl 5.0 PL0, provided you have
! at least integrated patches 0a-0h, issued by Andy Dougherty and made
! available at the following ftp sites:
! 
! 	ftp.demon.co.uk:/pub/perl/db/perl5.000-p0a-p0h.tar.gz
! 	ftp.funet.fi:/pub/languages/perl/ports/perl5/perl5.000-p0a-p0h.tar.gz
  
  Please read all the directions below before you proceed any further, and
  then follow them carefully.

Index: mcon/U/pager.U
Prereq: 3.0.1.1
*** mcon/U/pager.U.old	Mon Jan 30 15:50:15 1995
--- mcon/U/pager.U	Mon Jan 30 15:50:15 1995
***************
*** 1,4 ****
! ?RCS: $Id: pager.U,v 3.0.1.1 1994/10/29 16:27:45 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
--- 1,4 ----
! ?RCS: $Id: pager.U,v 3.0.1.2 1995/01/30 14:41:26 ram Exp $
  ?RCS:
  ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
  ?RCS: 
***************
*** 9,14 ****
--- 9,17 ----
  ?RCS: of the source tree for dist 3.0.
  ?RCS:
  ?RCS: $Log: pager.U,v $
+ ?RCS: Revision 3.0.1.2  1995/01/30  14:41:26  ram
+ ?RCS: patch49: ensure dflt gets initialized in case no pagers are found (WED)
+ ?RCS:
  ?RCS: Revision 3.0.1.1  1994/10/29  16:27:45  ram
  ?RCS: patch36: replaced Myread by Getfile in the dependency line
  ?RCS:
***************
*** 24,29 ****
--- 27,33 ----
  : locate the preferred pager for this system
  case "$pager" in
  '')
+ 	dflt=''
  	case "$pg" in
  	/*) dflt=$pg;;
  	esac

*** End of Patch 50 ***

exit 0 # Just in case...

