This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove old warning. No need to declare what is in ?RCS
[metaconfig.git] / U / modified / Head.U
index 8248223..c456cbf 100644 (file)
@@ -1,12 +1,12 @@
-?RCS: $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
+?RCS: $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
 ?RCS:
-?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS: 
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
 ?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: that same Artistic License; a copy of which may be found at the root
+?RCS: of the source tree for dist 4.0.
 ?RCS:
 ?RCS: $Log: Head.U,v $
 ?RCS: Revision 3.0.1.9  1997/02/28  15:02:09  ram
 ?RCS: Revision 3.0  1993/08/18  12:04:58  ram
 ?RCS: Baseline for dist 3.0 netwide release.
 ?RCS:
-?X: 
+?X:
 ?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.
-?X: 
+?X:
 ?MAKE:Head:
 ?MAKE: -pick wipe $@ %<
-?V:PATH p_ me
-?T:argv Id p paths OS2_SHELL DJGPP
+?V:PATH p_ _exe me newsh
+?T:argv p paths OS2_SHELL DJGPP
 ?T:inksh needksh avoidksh newsh changesh reason
+?F:!*
 ?LINT:extern ENV CDPATH SHELL MACHTYPE _exe is_os2
-?LINT:change ENV CDPATH _exe is_os2
+?LINT:change ENV CDPATH is_os2
+?LINT:nocomment
 #! /bin/sh
 #
 # If these # comments don't work, trim them. Don't worry about any other
 ?X:
 ?X: WE ASK YOU NOT TO REMOVE OR ALTER THE FOLLOWING PARAGRAPH, PLEASE:
 ?X:
-# (Note: this Configure script was generated automatically. Rather than
+# 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.)
+# The dist package (which contains metaconfig) is available via SVN:
+#     svn co https://svn.code.sf.net/p/dist/code/trunk/dist
+#
+?X: OK, I'll not alter, but I'll add to it then ...
+# Though this script was generated by metaconfig from metaunits, it is
+# OK to send patches against Configure itself. It's up to the Configure
+# pumpkin to backport the patch to the metaunits if it is accepted.
+# For more information on patching Configure, see pod/perlhack.pod
+#
+# The metaunits are also available from the public git repository:
+#     http://perl5.git.perl.org/metaconfig.git/ or
+#     $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
+#
+# See Porting/pumpkin.pod for more information on metaconfig.
 #
 ?X:
 ?X: NOTA BENE:
@@ -86,8 +99,6 @@
 ?X: by your version, not mine: It credits your work.
 ?X:
 
-# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
-#
 # Generated on <DATE> [metaconfig <VERSION> PL<PATCHLEVEL>]
 # (with additional metaconfig patches by <MAINTLOC>)
 
@@ -116,7 +127,7 @@ true || exec sh $0 $argv:q
 rm -f c1$$ c2$$
 
 if test -f /dev/cputype -a -f /dev/drivers -a -f /dev/osversion; then
-       cat >&4 <<EOF
+       cat <<EOF
 ***
 *** I'm sorry but this system looks like Plan 9 and Plan 9 doesn't do
 *** Configure that well.  (Plan 9 is close to UNIX but not close enough.)
@@ -127,6 +138,18 @@ EOF
        exit 1
 fi
 
+if test ! -c /dev/null ; then
+       cat <<EOF
+***
+*** I'm sorry, but /dev/null appears to be a file rather than a device.
+*** Please consult your operating sytem's notes for making a device
+*** in /dev.
+*** Cannot continue, aborting.
+***
+EOF
+       exit 1
+fi
+
 : compute my invocation name
 me=$0
 case "$0" in
@@ -139,13 +162,13 @@ esac
 ?X:
 ?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
-?X: DOSish systems such as OS/2.
+?X: DOS-ish systems such as OS/2.
 ?X:
 : Proper separator for the PATH environment variable
 p_=:
-: On OS/2 this directory should exist if this is not floppy only system :-]
+: On OS/2 this directory should exist if this is not floppy only system ":-]"
 if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
-    if test -n "$OS2_SHELL"; then
+       if test -n "$OS2_SHELL"; then
                p_=\;
                PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
 ?X: That's a bug in ksh5.22
@@ -153,7 +176,7 @@ if test -d c:/. || ( uname -a | grep -i 'os\(/\|\)2' ) 2>&1 >/dev/null ; then
                is_os2=yes
        elif test -n "$DJGPP"; then
                case "X${MACHTYPE:-nonesuchmach}" in
-               *cygwin) ;;
+               *cygwin|*msys) ;;
                *) p_=\; ;;
                esac
        fi
@@ -163,7 +186,7 @@ fi
 ?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: PATH. Well, here we try to compromise 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
@@ -175,13 +198,17 @@ fi
 ?X: We only add directories that are not already in the PATH of the
 ?X: user and the directories must exist also.
 ?X:
+?X: 20040627, Merijn, HP-UX's ANSI compiler is in /opt/ansic/bin if present
+?X:  and should be before /usr/ccs/bin, where the braindead bundled compiler
+?X:  can be found. The /usr/ccs/bin compiler cannot be used to build perl.
+?X:
 : 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 /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
 paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
 paths="$paths /sbin /usr/sbin /usr/libexec"
 paths="$paths /system/gnu_library/bin"
@@ -224,15 +251,17 @@ fi
 ?X: On Digital UNIX, /bin/sh may start up buggy /bin/ksh, use sh
 if test -f /osf_boot -a -f /usr/sbin/setld; then
        if test X`/usr/bin/uname -s` = XOSF1; then
-               avoidksh="to avoid Digital UNIX' ksh"
-               newsh=/bin/sh
-               unset BIN_SH # if this is 'xpg4' sh will start up ksh
+               avoidksh="to avoid Digital UNIX' ksh"
+               newsh=/bin/sh
+?X: if BIN_SH is set to 'xpg4', sh will start up ksh
+               unset BIN_SH
        fi
 fi
 ?X: If we are not in ksh and need it, then feed us back to it
 case "$inksh/$needksh" in
 /[a-z]*)
-?X: Unset ENV to avoid any ~/.kshrc that could alias cd or whatever...
+?X: Clear ENV to avoid any ~/.kshrc that could alias cd or whatever...
+?X: Don't use "unset ENV", that is not portable enough
                ENV=''
                changesh=true
                reason="$needksh"
@@ -246,7 +275,7 @@ true/[a-z]*)
        ;;
 esac
 ?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.
+?X: we don't need ksh nor want to avoid it explicitly, yet are using it.
 case "$inksh/$needksh-$avoidksh-" in
 true/--)
                cat <<EOM
@@ -270,6 +299,11 @@ true)
        esac
        ;;
 esac
+?X: 2004.06.09 rac
+?X: having $newsh persist as ksh here is bad news if ksh doesn't really
+?X: exist. this causes us to toss away a perfectly good working test in
+?X: bash in favor of more exotic external options. see bug 42665.
+test -x "${newsh}" || unset newsh
 
 ?X: Unset CDPATH to avoid surprises when using cd under some shells
 ?X: Can't unset it because that's not portable to very old shells.
@@ -277,16 +311,17 @@ esac
 ?X: Don't want to set it to '.' because then ksh prints out the
 ?X: name of the directory every time you cd to it. --AD 6/98
 ?X: In order to inflict the least harm, change it only if it's set.
-: if needed set CDPATH to a harmless value that is not chatty
+: if needed, set CDPATH to a harmless value that is not chatty
 : avoid bash 2.02 problems with empty CDPATH.
 case "$CDPATH" in
 '')    ;;
 *)     case "$SHELL" in
-       *bash*) CDPATH='.' ;;
-       *)              CDPATH='' ;;
+       *bash*) CDPATH='.' ;;
+       *) CDPATH='' ;;
        esac
        ;;
 esac
+
 : Configure runs within the UU subdirectory
 test -d UU || mkdir UU
 ?X: Use ./* to avoid any confirmation prompts from enhanced shells -- WED