Integrate from mainperl.
Jarkko Hietaniemi [Sat, 3 Apr 1999 12:49:04 +0000 (12:49 +0000)]
p4raw-id: //depot/cfgperl@3209

19 files changed:
Configure
MANIFEST
Makefile.SH
Policy_sh.SH
cflags.SH
config_h.SH
configpm
hints/aix.sh
hints/irix_6.sh
hints/linux.sh
makeaperl.SH
makedepend.SH
makedir.SH
myconfig.SH [moved from myconfig with 66% similarity, mode: 0644]
perl_exp.SH
pod/perldelta.pod
t/op/filetest.t [changed mode: 0755->0644]
t/op/subst_amp.t [changed mode: 0755->0644]
writemain.SH

index 52d57b2..ce5658f 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Mon Mar 15 18:36:13 EET 1999 [metaconfig 3.0 PL70]
+# Generated on Fri Apr  2 15:40:35 EET DST 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -661,11 +661,13 @@ d_dirent64_s=''
 d_flock64_s=''
 d_fstat64=''
 d_ftruncate64=''
-d_ino64t=''
+d_ino64_t=''
+d_llseek=''
 d_lockf64=''
 d_lseek64=''
 d_lstat64=''
-d_off64t=''
+d_off64_t=''
+d_offset_t=''
 d_open64=''
 d_opendir64=''
 d_readdir64=''
@@ -1311,7 +1313,7 @@ esac
 
 : script used to extract .SH files with variable substitutions
 cat >extract <<'EOS'
-CONFIG=true
+CONFIGDOTSH=true
 echo "Doing variable substitutions on .SH files..."
 if test -f $src/MANIFEST; then
        set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH$'`
@@ -1770,7 +1772,6 @@ more
 nm
 nroff
 pg
-tee
 test
 uname
 zip
@@ -2096,7 +2097,7 @@ EOM
                                        osvers=2
                                fi
                        fi
-                       unset tmp
+                       tmp=''
                        ;;
                pc*)
                        if test -n "$DJGPP"; then
@@ -5319,19 +5320,6 @@ EOM
                beos*)  xxx='' ;;
                *)              xxx='LD_LIBRARY_PATH' ;;
                esac
-               if test X"$xxx" != "X"; then
-                       $cat <<EOM  | $tee -a ../config.msg >&4
-
-To build perl, you must add the current working directory to your
-$xxx environment variable before running make.  You can do
-this with
-   $xxx=\`pwd\`:\$$xxx; export $xxx
-for Bourne-style shells, or
-   setenv $xxx \`pwd\`
-for Csh-style shells.  You *MUST* do this before running make.
-
-EOM
-               fi
                ;;
        *)      useshrplib='false' ;;
        esac
@@ -6876,7 +6864,7 @@ while $test $# -ge 2; do
     shift 2;
 done > try.c;
 echo "int main () { struct $struct foo; foo.$field = 0; }" >> try.c;
-if eval $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
        val="$define";
 else
        val="$undef";
@@ -7242,6 +7230,10 @@ if $test X"$use64bits" = X"$define"; then
        set lockf64 d_lockf64
        eval $inlibc
 
+       : see if llseek exists
+       set llseek d_llseek
+       eval $inlibc
+
        : see if lseek64 exists
        set lseek64 d_lseek64
        eval $inlibc
@@ -7283,6 +7275,7 @@ if $test X"$use64bits" = X"$define"; then
        echo $n "Checking to see if your system supports off64_t...$c" >&4
        $cat >try.c <<EOCP
 #include <sys/types.h>
+#include <stdio.h>
 off64_t foo() { off64_t x; x = 7; return x; }'
 EOCP
        if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
@@ -7293,7 +7286,26 @@ EOCP
                echo " Nope, it doesn't." >&4
        fi
        $rm -f try.*
-       set d_off64t
+       set d_off64_t
+       eval $setvar
+
+       : check for offset_t
+       echo " "
+       echo $n "Checking to see if your system supports offset_t...$c" >&4
+       $cat >try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+offset_t foo() { offset_t x; x = 7; return x; }'
+EOCP
+       if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+               val="$define"
+               echo " Yup, it does." >&4
+       else
+               val="$undef"
+               echo " Nope, it doesn't." >&4
+       fi
+       $rm -f try.*
+       set d_offset_t
        eval $setvar
 
        : check for ino64_t
@@ -7318,7 +7330,7 @@ EOCP
        else
                echo " Nope, it doesn't." >&4
        fi
-       set d_ino64t
+       set d_ino64_t
        eval $setvar
 
        : check for struct flock64
@@ -7353,7 +7365,7 @@ EOCP
 
 else
        val="$undef"
-       for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64t d_ino64t d_flock64_s d_dirent64_s
+       for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64_t d_offset_t d_ino64_t d_flock64_s d_dirent64_s
        do
                set $xxx
                eval $setvar
@@ -12000,7 +12012,7 @@ do
 done
 $rm -f try.c
 EOS
-unset postprocess_cc_v
+postprocess_cc_v=''
 chmod +x ccsym
 $eunicefix ccsym
 ./ccsym > ccsym1.raw
@@ -12770,13 +12782,14 @@ d_hasmntopt='$d_hasmntopt'
 d_htonl='$d_htonl'
 d_index='$d_index'
 d_inetaton='$d_inetaton'
-d_ino64t='$d_ino64t'
+d_ino64_t='$d_ino64_t'
 d_int64t='$d_int64t'
 d_iovec_s='$d_iovec_s'
 d_isascii='$d_isascii'
 d_killpg='$d_killpg'
 d_lchown='$d_lchown'
 d_link='$d_link'
+d_llseek='$d_llseek'
 d_locconv='$d_locconv'
 d_lockf64='$d_lockf64'
 d_lockf='$d_lockf'
@@ -12814,7 +12827,8 @@ d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
 d_nextkey64='$d_nextkey64'
 d_nice='$d_nice'
-d_off64t='$d_off64t'
+d_off64_t='$d_off64_t'
+d_offset_t='$d_offset_t'
 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
 d_oldpthreads='$d_oldpthreads'
 d_oldsock='$d_oldsock'
@@ -13254,7 +13268,7 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh
 : add special variables
 $test -f $src/patchlevel.h && \
 awk '/^#define[        ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
-echo "CONFIG=true" >>config.sh
+echo "CONFIGDOTSH=true" >>config.sh
 
 : propagate old symbols
 if $test -f UU/config.sh; then
index 2b69bc2..60612f2 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -857,7 +857,7 @@ mpeix/mpeixish.h    MPE/iX port
 mpeix/nm               MPE/iX port
 mpeix/relink           MPE/iX port
 mv-if-diff             Script to mv a file if it changed
-myconfig               Prints summary of the current configuration
+myconfig.SH            Prints summary of the current configuration
 nostdio.h              Cause compile error on stdio calls
 op.c                   Opcode syntax tree code
 op.h                   Opcode syntax tree header
index 986181f..4ea0ca0 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
index 52a2c57..3008843 100644 (file)
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $CONFIGDOTSH in
 '') . ./config.sh ;;
 esac
 echo "Extracting Policy.sh (with variable substitutions)"
index 8a1ba82..75de568 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -28,7 +28,7 @@ $startsh
 
 : In the following dollars and backticks do not need the extra backslash.
 $spitshell >>cflags <<'!NO!SUBS!'
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
index ab0cb53..f933c78 100644 (file)
@@ -705,11 +705,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
  */
 #$d_umask HAS_UMASK            /**/
 
-/* HAS_VFORK:
- *     This symbol, if defined, indicates that vfork() exists.
- */
-#$d_vfork HAS_VFORK    /**/
-
 /* HASVOLATILE:
  *     This symbol, if defined, indicates that this C compiler knows about
  *     the volatile declaration.
@@ -1092,22 +1087,6 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
 #define MEM_ALIGNBYTES $alignbytes
 #endif
 
-/* INTSIZE:
- *     This symbol contains the value of sizeof(int) so that the C
- *     preprocessor can make decisions based on it.
- */
-/* LONGSIZE:
- *     This symbol contains the value of sizeof(long) so that the C
- *     preprocessor can make decisions based on it.
- */
-/* SHORTSIZE:
- *     This symbol contains the value of sizeof(short) so that the C
- *     preprocessor can make decisions based on it.
- */
-#define INTSIZE $intsize               /**/
-#define LONGSIZE $longsize             /**/
-#define SHORTSIZE $shortsize           /**/
-
 /* BYTEORDER:
  *     This symbol holds the hexadecimal constant defined in byteorder,
  *     i.e. 0x1234 or 0x4321, etc...
@@ -1919,6 +1898,11 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
 #$d_semctl_semun USE_SEMCTL_SEMUN      /**/
 #$d_semctl_semid_ds USE_SEMCTL_SEMID_DS        /**/
 
+/* HAS_VFORK:
+ *     This symbol, if defined, indicates that vfork() exists.
+ */
+#$d_vfork HAS_VFORK    /**/
+
 /* Signal_t:
  *     This symbol's value is either "void" or "int", corresponding to the
  *     appropriate return type of a signal handler.  Thus, you can declare
@@ -2351,7 +2335,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
 #$d_stat64      HAS_STAT64             /**/
 #$d_telldir64   HAS_TELLDIR64  /**/
 #$d_truncate64  HAS_TRUNCATE64 /**/
-#$d_off64t      HAS_OFF64_T            /**/
+#$d_off64_t      HAS_OFF64_T           /**/
 #$d_dirent64_s   HAS_STRUCT_DIRENT64   /**/
 
 /* PRIVLIB:
index 9cf8103..4c9eb12 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -44,10 +44,10 @@ $in_v = 0;
 
 while (<>) {
     next if m:^#!/bin/sh:;
-    # Catch CONFIG=true and PERL_VERSION=n line from Configure.
+    # Catch CONFIGDOTSH=true and PERL_VERSION=n line from Configure.
     s/^(\w+)=(true|\d+)\s*$/$1='$2'\n/;
     my ($k,$v) = ($1,$2);
-    # grandfather PATCHLEVEL and SUBVERSION
+    # grandfather PATCHLEVEL and SUBVERSION and CONFIG
     if ($k) {
        if ($k eq 'PERL_VERSION') {
            push @v_others, "PATCHLEVEL='$v'\n";
@@ -55,6 +55,9 @@ while (<>) {
        elsif ($k eq 'PERL_SUBVERSION') {
            push @v_others, "SUBVERSION='$v'\n";
        }
+       elsif ($k eq 'CONFIGDOTSH') {
+           push @v_others, "CONFIG='$v'\n";
+       }
     }
     # We can delimit things in config.sh with either ' or ". 
     unless ($in_v or m/^(\w+)=(['"])(.*\n)/){
@@ -411,11 +414,11 @@ require $config_pm;
 import Config;
 
 die "$0: $config_pm not valid"
-       unless $Config{'CONFIG'} eq 'true';
+       unless $Config{'CONFIGDOTSH'} eq 'true';
 
 die "$0: error processing $config_pm"
        if defined($Config{'an impossible name'})
-       or $Config{'CONFIG'} ne 'true' # test cache
+       or $Config{'CONFIGDOTSH'} ne 'true' # test cache
        ;
 
 die "$0: error processing $config_pm"
index c4fcfc1..27f884c 100644 (file)
@@ -17,10 +17,12 @@ d_setruid='undef'
 
 alignbytes=8
 
-usemymalloc='n'
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
 
-# Intuiting the existence of system calls under AIX is difficult,
-# at best; the safest technique is to find them empirically.
+# Intuiting the existence of system calls under AIX is difficult, at best;
+# the safest (and slowest...) technique is to find them empirically.
 usenm='undef'
 
 so="a"
index 6a115b8..1b032cd 100644 (file)
@@ -121,6 +121,13 @@ malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"'
        ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE"
        optimize="-O3"
        usenm='undef'
+       case "`uname -s`" in
+       # Without the -mabi=64 gcc in 64-bit IRIX has problems passing
+       # and returning small structures.  This affects inet_*() and semctl().
+       # See http://reality.sgi.com/ariel/freeware/gcc-2.8.1-notes.html
+       # for more information.  Reported by Lionel Cons <lionel.cons@cern.ch>.
+       IRIX64) ccflags="$ccflags -mabi=64" ;;
+       esac
        ;;
 *)
        # this is needed to force the old-32 paths
index 4764e9e..0339e8f 100644 (file)
@@ -43,8 +43,16 @@ ignore_versioned_solibs='y'
 # available via anonymous FTP at tsx-11.mit.edu in
 # /pub/linux/docs/linux-standards/fsstnd.
 # Allow a command line override, e.g. Configure -Dprefix=/foo/bar
+# Also, if the user has specified -Uinstallusrbinperl and hasn't
+# specified a prefix, then set prefix to /usr/local.
 case "$prefix" in
-'') prefix='/usr' ;;
+'')
+    case "$installusrbinperl" in
+    "$undef")
+        prefix='/usr/local' ;;
+    esac
+*)
+    prefix='/usr' ;;
 esac
 
 # gcc-2.6.3 defines _G_HAVE_BOOL to 1, but doesn't actually supply bool.
@@ -56,6 +64,19 @@ set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'`
 shift
 libswanted="$*"
 
+# If you have glibc, then report the version for ./myconfig bug reporting.
+# (Configure doesn't need to know the specific version since it just uses
+# gcc to load the library for all tests.)
+# Is this sufficiently robust for libc5 systems as well as
+# glibc-2.1.x systems?
+# We don't use __GLIBC__ and  __GLIBC_MINOR__ because they 
+# are insufficiently precise to distinguish things like
+# libc-2.0.6 and libc-2.0.7.
+if test -L /lib/libc.so.6; then
+    libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'`
+    libc=/lib/$libc
+fi
+
 # Configure may fail to find lstat() since it's a static/inline
 # function in <sys/stat.h>.
 d_lstat=define
index 16b7435..45812ba 100644 (file)
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
index 0f32da3..ba90d72 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
@@ -37,7 +37,7 @@ esac
 
 export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh \$0; kill \$\$)
 
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
index 09908ed..d1650e7 100755 (executable)
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
     if test ! -f config.sh; then
        ln ../config.sh . || \
old mode 100755 (executable)
new mode 100644 (file)
similarity index 66%
rename from myconfig
rename to myconfig.SH
index 02ee0a6..83de2fa
--- a/myconfig
@@ -1,22 +1,32 @@
-#!/bin/sh
+case $CONFIGDOTSH in
+'')
+       if test -f config.sh; then TOP=.;
+       elif test -f ../config.sh; then TOP=..;
+       elif test -f ../../config.sh; then TOP=../..;
+       elif test -f ../../../config.sh; then TOP=../../..;
+       elif test -f ../../../../config.sh; then TOP=../../../..;
+       else
+           echo "Can't find the perl config.sh file produced by Configure"; 
+           exit 1
+       fi
+       . $TOP/config.sh
+       ;;
+esac
+: This forces SH files to create target in same directory as SH file.
+: This is so that make depend always knows where to find SH derivatives.
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+echo "Extracting myconfig (with variable substitutions)"
+$spitshell >myconfig <<!GROK!THIS!
+$startsh
 
 # This script is designed to provide a handy summary of the configuration
 # information being used to build perl. This is especially useful if you
 # are requesting help from comp.lang.perl.misc on usenet or via mail.
 
-if test -f config.sh; then TOP=.;
-elif test -f ../config.sh; then TOP=..;
-elif test -f ../../config.sh; then TOP=../..;
-elif test -f ../../../config.sh; then TOP=../../..;
-elif test -f ../../../../config.sh; then TOP=../../../..;
-else
-       echo "Can't find the perl config.sh file produced by Configure"; exit 1
-fi
-. $TOP/config.sh
-
 # Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
-
-$spitshell <<!GROK!THIS!
+cat <<'!NO!SUBS!'
 Summary of my $package (revision $baserev version $PERL_VERSION subversion $PERL_SUBVERSION) configuration:
   Platform:
     osname=$osname, osvers=$osvers, archname=$archname
@@ -42,4 +52,7 @@ Summary of my $package (revision $baserev version $PERL_VERSION subversion $PERL
     dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
     cccdlflags='$cccdlflags', lddlflags='$lddlflags'
 
+!NO!SUBS!
 !GROK!THIS!
+chmod 755 myconfig
+$eunicefix myconfig
index 6bf0d7c..5a15ed4 100644 (file)
@@ -24,7 +24,7 @@
 # The file is then given to the system loader (cc/xlc command line)
 # as -bE:export.file.
 
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;
index beb25c7..8bf59ab 100644 (file)
@@ -448,6 +448,13 @@ to skip installing perl also as /usr/bin/perl.  This is useful if you
 prefer not to modify /usr/bin for some reason or another but harmful
 because many scripts assume to find Perl in /usr/bin/perl.
 
+=head1 Configuration Changes
+
+You can use "Configure -Uinstallusrbinperl" which causes installperl
+to skip installing perl also as /usr/bin/perl.  This is useful if you
+prefer not to modify /usr/bin for some reason or another but harmful
+because many scripts assume to find Perl in /usr/bin/perl.
+
 =head1 BUGS
 
 If you find what you think is a bug, you might check the headers of
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 025d954..b191975 100644 (file)
@@ -1,4 +1,4 @@
-case $CONFIG in
+case $CONFIGDOTSH in
 '')
        if test -f config.sh; then TOP=.;
        elif test -f ../config.sh; then TOP=..;