Diffstat (limited to 'mcon/U/Head.U')
1 files changed, 246 insertions, 0 deletions
diff --git a/mcon/U/Head.U b/mcon/U/Head.U
new file mode 100644
@@ -0,0 +1,246 @@
+?RCS: $Id: Head.U,v 18.104.22.168 1997/02/28 15:02:09 ram Exp $
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?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: $Log: Head.U,v $
+?RCS: Revision 22.214.171.124 1997/02/28 15:02:09 ram
+?RCS: patch61: make sure we unset CDPATH for shells that support this
+?RCS: patch61: improved Korn shell detection and handling
+?RCS: Revision 126.96.36.199 1995/07/25 13:40:02 ram
+?RCS: patch56: added SVR4-ish /opt directories to path list (ADO)
+?RCS: patch56: OS/2 platforms are using another path separator
+?RCS: Revision 188.8.131.52 1995/03/21 08:46:15 ram
+?RCS: patch52: definition of paths wrongly added spurious ':' chars
+?RCS: Revision 184.108.40.206 1994/10/29 15:54:19 ram
+?RCS: patch36: make sure ENV is unset before calling /bin/ksh
+?RCS: Revision 220.127.116.11 1994/08/29 16:03:44 ram
+?RCS: patch32: now sets PATH only using existing directories
+?RCS: Revision 18.104.22.168 1994/06/20 06:54:28 ram
+?RCS: patch30: now computes its invocation name into 'me'
+?RCS: patch30: symbol me is made visible to all units read-only
+?RCS: Revision 22.214.171.124 1993/12/15 08:15:07 ram
+?RCS: patch15: added /sbin:/usr/sbin:/usr/libexec in PATH for BSD/386
+?RCS: Revision 126.96.36.199 1993/11/10 17:32:35 ram
+?RCS: patch14: ensure PATH is reset to '.' before testing for alias
+?RCS: Revision 188.8.131.52 1993/08/27 14:38:07 ram
+?RCS: patch7: not all 'test' programs support the -x option
+?RCS: Revision 3.0 1993/08/18 12:04:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?X: This is the very first unit in the Configure script. It is mostly just
+?X: things to keep people from getting into a tizzy right off the bat.
+?MAKE: -pick wipe $@ %<
+?V:PATH p_ me
+?T:argv Id p paths OS2_SHELL
+?T:inksh needksh avoidksh newsh changesh reason
+# If these # comments don't work, trim them. Don't worry about any other
+# shell scripts, Configure will trim # comments from them for you.
+# (If you are trying to port this package to a machine without sh,
+# I would suggest you have a look at the prototypical config_h.SH file
+# and edit it to reflect your system. Some packages may include samples
+# of config.h for certain machines, so you might look for one of those.)
+?X: NOTE THAT A CONFIGURE SCRIPT IS IN THE PUBLIC DOMAIN (whether or not
+?X: the software which uses it is in the public domain).
+# Yes, you may rip this off to use in other distribution packages. This
+# script belongs to the public domain and cannot be copyrighted.
+?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE:
+# (Note: this Configure script was generated automatically. Rather than
+# working with this copy of Configure, you may wish to get metaconfig.
+# The dist-3.0 package (which contains metaconfig) was posted in
+# comp.sources.misc and is available on CPAN under authors/id/RAM so
+# you may fetch it yourself from your nearest archive site.)
+?X: NOTA BENE:
+?X: If you develop you own version of metaconfig based on this work,
+?X: you have to add some comments telling that the script was generated
+?X: by your version, not mine: It credits your work.
+# $Id: Head.U,v 184.108.40.206 1997/02/28 15:02:09 ram Exp $
+# Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>]
+cat >/tmp/c1$$ <<EOF
+SCO csh still thinks true is false. Write to SCO today and tell them that next
+year Configure ought to "rm /bin/csh" unless they fix their blasted shell. :-)
+(Actually, Configure ought to just patch csh in place. Hmm. Hmmmmm. All
+we'd have to do is go in and swap the && and || tokens, wherever they are.)
+[End of diatribe. We now return you to your regularly scheduled programming...]
+cat >/tmp/c2$$ <<EOF
+OOPS! You naughty creature! You didn't run Configure with sh!
+I will attempt to remedy the situation by running sh for you...
+true || cat /tmp/c1$$ /tmp/c2$$
+true || exec sh $0 $argv:q
+(exit $?0) || cat /tmp/c2$$
+(exit $?0) || exec sh $0 $argv:q
+rm -f /tmp/c1$$ /tmp/c2$$
+: compute my invocation name
+case "$0" in
+ me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
+ test "$me" || me=$0
+?X: To be able to run under OS/2, we must detect that early enough to use
+?X: the proper path separator, stored in $p_. It is : on UNIX and \ on OS/2.
+: Proper PATH separator
+: On OS/2 this directory should exist if this is not floppy only system :-]
+if test -d c:/.; then
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+?X: That's a bug in ksh5.22
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
+?X: There are two schools of thoughts here. Some people correctly argue that
+?X: the user has a better chance than we do of setting a reasonable PATH and
+?X: others argue that Configure is the best place there is to set up a suitable
+?X: PATH. Well, here we try to compromize by keeping the user's PATH and
+?X: appending some directories which are known to work on some machine or the
+?X: other. The rationale behind this being that a novice user might not have a
+?X: proper environment variable set, and some directories like /etc (where
+?X: chown is located on some BSD systems) may be missing--RAM.
+?X: SVR4 adds an /opt directory for optional packages. Some sites use
+?X: various permutations on /opt as opposed to /usr or /usr/local.-- ADO
+?X: We only add directories that are not already in the PATH of the
+?X: user and the directories must exist also.
+: Proper PATH setting
+paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
+paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
+paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
+paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
+paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
+paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin"
+paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
+paths="$paths /sbin /usr/sbin /usr/libexec"
+for p in $paths
+ case "$p_$PATH$p_" in
+ *$p_$p$p_*) ;;
+ *) test -d $p && PATH=$PATH$p_$p ;;
+: shall we be using ksh?
+?X: Use (alias -x) and not (alias) since zsh and bash recognize the alias
+?X: builtin but not the -x option which is typically ksh...
+?X: We need to set up PATH before calling the "alias" built-in since some
+?X: systems like HP-UX have a binary called /bin/alias.
+if (PATH=.; alias -x) >/dev/null 2>&1; then
+?X: On HP-UX, large Configure scripts may exercise a bug in /bin/sh, use ksh
+if test -f /hp-ux -a -f /bin/ksh; then
+ needksh='to avoid sh bug in "here document" expansion'
+?X: On AIX4, /bin/sh is really ksh and it causes problems, use sh
+if test -d /usr/lpp -a -f /usr/bin/bsh -a -f /usr/bin/uname; then
+ if test X`/usr/bin/uname -v` = X4; then
+ avoidksh="to avoid AIX 4's /bin/sh"
+?X: If we are not in ksh and need it, then feed us back to it
+case "$inksh/$needksh" in
+?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever...
+ unset ENV
+?X: If we are in ksh and must avoid it, then feed us back to a new shell
+case "$inksh/$avoidksh" in
+?X: Warn them if they use ksh on other systems, which are those where
+?X: we don't need ksh nor want to avoid it explicitely, yet are using it.
+case "$inksh/$needksh-$avoidksh-" in
+ cat <<EOM
+(I see you are using the Korn shell. Some ksh's blow up on $me,
+mainly on older exotic systems. If yours does, try the Bourne shell instead.)
+case "$changesh" in
+ echo "(Feeding myself to $newsh $reason.)"
+?X: Make sure they didn't say sh <Configure by checking whether $0 ends
+?X: with Configure or not. If they did say sh <../../Configure, then too
+?X: bad for them anyway, since we lost that path indication...
+?X: Otherwise, execing $0 ensures we keep the full remote source dir
+?X: indication for src.U.
+ case "$0" in
+ Configure|*/Configure) exec $newsh $0 "$@";;
+ *) exec $newsh Configure "$@";;
+: Configure runs within the UU subdirectory
+test -d UU || mkdir UU
+?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED
+?X: Unset CDPATH to avoid surprised when using cd under some shells
+cd UU && rm -f ./*