summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-12-21 07:38:16 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-12-21 07:38:16 +0000
commitd8f2e4ccb684dfafc2c7b30a318ebf5798a9a1a4 (patch)
tree3c16387648ad5ab6cf979332dd605ab3fedb214e /Configure
parentffed7fefd1d95d05e699dababfbb57ef2497cea1 (diff)
downloadperl-d8f2e4ccb684dfafc2c7b30a318ebf5798a9a1a4.tar.gz
perl 3.0 patch #7 (combined patch)
The select operator didn't interpret bit vectors correctly on non-little-endian machines such as Suns. Rather than bollux up the rather straightforward interpretation of bit vectors, I made the select operator rearrange the bytes as necessary. So it is still true that vec($foo,0,1) refers to the first bit of the first byte of string $foo, even on big-endian machines. The send() socket operator didn't correctly allow you to specify a TO argument even though this was documented. (The TO argument is desirable for sending datagram packets.) In ANSI standard C, they decided that longjmp() didn't have to guarantee anything about registers. Several people sent me some patches that declared certain variables as volatile rather than register for such compilers. Rather than go that route, however, I wanted to keep some of these variables in registers, so I just made sure that the important ones are restored from non-register locations after longjmp(). I think "volatile" encourages people to punt too easily. The foreach construct still had some difficulty with two nested foreach loops referring to the same array, and to a single foreach that called its enclosing subroutine recursively. I think I've got this straight now. You wouldn't think a little iterator would give some much trouble. A pattern like /b*/ wouldn't match a null string before the first character. And certain patterns didn't match correctly at end of string. The upshot was that $_ = 'aaa'; s/b*/x/g; produced 'axaxa' rather than the expected 'xaxaxax'. This has been fixed. Note however that the split operator will still not match a null string before the first character, so that split(/b*/,'aaa') produces ('a','a','a'), not ('','a','a','a',''). The saga continues, and hopefully concludes. I realized I was fighting a losing battle trying to grep out all the includes from <time.h> and <sys/time.h>. There are just too many funny includes, symbols, links and such on too many kinds of machines. Configure now compiles a test program several different ways to figure out which way to define the various symbols. Configure now lets you pick between yacc or bison for your compiler compiler. If you pick bison, be sure you have alloca somewhere on your system. The ANSI function strerror() is now supported where available. In addition, errno may now be a macro with an lvalue, so errno isn't declared extern if it's defined as a macro in <errno.h>. The memcpy() and memset() are now allowed to return void. There is now support for sys/ndir.h for systems such as Xenix. It's now also easier to cross compile on a 386 for a 286. DG/UX has functions setpgrp2() and getpgrp2() to keep the BSD sematics separate from the SystemV semantics. So now we have yet another wonderful non-standard way of doing things. There is also a utime.h file which lets them put time stamps on files to microsecond resolutions, though perl doesn't take advantage of this. The list of optional libraries to be searched for now includes -lnet_s, -lnsl_s, -lsocket and -lx. We can now find .h files down in /usr/include/lan. Microport systems have problems. I've added some CRIPPLED_CC support for them, but you still need to read the README.uport file for some extra rigamarole. In the README file, there are now hints for what to do if your compile doesn't work right, and specific hints for machines known to require certain switches. The grep operator with a simple first argument, such as grep(1,@array), didn't work right. That one seems silly, but grep($_,@array) didn't work either. Now it does. A /$pat/ followed by a // wrongly freed the runtime pattern twice, causing ill-will on the part of all concerned. The ord() function now always returns positive even on signed-char machines. This seems to be less surprising to people. If you still want a signed value on such machines, you can always use unpack. The lib/complete.pl file misused the @_ array. The array has been renamed. In the man page, I clarified that s`pat`repl` does command substitution on the replacement string, that $timeleft from select() is likely not implemented in many places, and that the qualified form package'filehandle works as well as $package'variable. It is also explicitly stated that certain identifiers (non-alpha, STDIN, etc.) are always resolved in package main's symbol table. Perl didn't grok setuid scripts that had a space on the first line between the shebang and the interpreter name. In stab.c, sighandler() may now return either void or int, depending on the value of VOIDSIG. You couldn't debug a script that used -p or -n because they would try to slap an extra } on the end of the perldb.pl file. This upset the parser. The interpration of strings like " ''$foo'' " caused problems because the tokener didn't realize that neither single quote following the variable was indicating a package qualifier. (It knew the last one wasn't, but was confused about the first one.) Merely changing an if to a while fixed it. Well, two if's. Another place we don't want ' to be interpreted as a package qualifier is if it's the delimiter for an m'pat' or s'pat'repl'. These have been grandfathered to look like a match and a substitution. There were a couple of problems in a2p. First, the ops array was dimensioned too big on 286's. Second, there was a problem involving passing a union where I should've passed a member of the union, which meant user-defined functions didn't work right on some machines.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure215
1 files changed, 163 insertions, 52 deletions
diff --git a/Configure b/Configure
index 5f53877817..4e8856faf7 100755
--- a/Configure
+++ b/Configure
@@ -8,7 +8,7 @@
# 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.)
#
-# $Header: Configure,v 3.0.1.3 89/11/17 15:01:21 lwall Locked $
+# $Header: Configure,v 3.0.1.4 89/12/21 18:57:00 lwall Locked $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
@@ -115,6 +115,7 @@ d_flock=''
d_getgrps=''
d_gethent=''
d_getpgrp=''
+d_getpgrp2=''
d_getprior=''
d_htonl=''
d_index=''
@@ -132,6 +133,7 @@ d_rmdir=''
d_setegid=''
d_seteuid=''
d_setpgrp=''
+d_setpgrp2=''
d_setprior=''
d_setregid=''
d_setresgid=''
@@ -146,12 +148,9 @@ socketlib=''
d_statblks=''
d_stdstdio=''
d_strctcpy=''
+d_strerror=''
d_symlink=''
d_syscall=''
-d_tminsys=''
-i_systime=''
-i_timetoo=''
-i_systimetoo=''
d_varargs=''
d_vfork=''
d_voidsig=''
@@ -172,6 +171,11 @@ d_pwclass=''
d_pwexpire=''
i_sysdir=''
i_sysioctl=''
+i_sysndir=''
+i_time=''
+i_systime=''
+d_systimekernel=''
+i_utime=''
i_varargs=''
i_vfork=''
intsize=''
@@ -206,8 +210,9 @@ stdchar=''
uidtype=''
voidflags=''
defvoidused=''
-lib=''
+yacc=''
privlib=''
+lib=''
CONFIG=''
: set package name
package=perl
@@ -219,7 +224,9 @@ echo " "
define='define'
undef='undef'
-libpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large /usr/lib/small /lib/small'
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+libpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
@@ -245,12 +252,12 @@ attrlist="$attrlist hpux hp9000s300 hp9000s500 hp9000s800"
attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
-attrlist="$attrlist i186"
+attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
d_newshome="/usr/NeWS"
defvoidused=7
-libswanted="net nm ndir ndbm dbm sun bsd c_s"
-inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd'
+libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd x c_s"
+inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
: some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
@@ -1104,11 +1111,17 @@ case "$libswanted" in
'') libswanted='c_s';;
esac
for thislib in $libswanted; do
+ case "$thislib" in
+ dbm) thatlib=ndbm;;
+ *_s) thatlib=NONE;;
+ *) thatlib="${thislib}_s";;
+ *) thatlib=NONE;;
+ esac
xxx=`loc lib$thislib.a X /usr/lib /usr/local/lib /lib`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
@@ -1120,11 +1133,11 @@ for thislib in $libswanted; do
*) dflt="$dflt $xxx";;
esac
else
- xxx=`loc Slib$thislib.a X /usr/lib /usr/local/lib /lib`
+ xxx=`loc Slib$thislib.a X $xlibpth`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
@@ -1151,6 +1164,7 @@ cc command line when linking. Other systems use shared libraries
by default. There may be other libraries needed to compile $package
on your machine as well. If your system needs the "-lc_s" option,
include it here. Include any other special libraries here as well.
+Say "none" for none.
EOM
echo " "
@@ -1347,7 +1361,10 @@ case "$libs" in
if test ! -f $try; then
try=`loc $thislib blurfl/dyick $libpth`
if test ! -f $try; then
- try=''
+ try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
+ if test ! -f $try; then
+ try=''
+ fi
fi
fi
fi
@@ -1377,13 +1394,13 @@ else
ans=`loc clib blurfl/dyick $libpth`
fi
if test ! -f "$ans"; then
- ans=`loc Slibc.a blurfl/dyick /usr/lib/386 /lib/386 $libpth`
+ ans=`loc Slibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Mlibc.a blurfl/dyick $libpth`
+ ans=`loc Mlibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Llibc.a blurfl/dyick $libpth`
+ ans=`loc Llibc.a blurfl/dyick $xlibpth`
fi
if test -f "$ans"; then
echo "Your C library is in $ans, of all places."
@@ -1522,14 +1539,14 @@ if $contains '^crypt$' libc.list >/dev/null 2>&1; then
d_crypt="$define"
cryptlib=''
else
- cryptlib=`loc Slibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Slibcrypt.a "" $xlibpth`
if $test -z "$cryptlib"; then
- cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Mlibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`loc Llibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Llibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
@@ -1636,6 +1653,10 @@ eval $inlibc
set getpgrp d_getpgrp
eval $inlibc
+: see if getpgrp2 exists
+set getpgrp2 d_getpgrp2
+eval $inlibc
+
: see if getpriority exists
set getpriority d_getprior
eval $inlibc
@@ -1792,6 +1813,10 @@ eval $inlibc
set setpgrp d_setpgrp
eval $inlibc
+: see if setpgrp2 exists
+set setpgrp2 d_setpgrp2
+eval $inlibc
+
: see if setpriority exists
set setpriority d_setprior
eval $inlibc
@@ -1923,6 +1948,10 @@ else
fi
$rm -f try.*
+: see if strerror exists
+set strerror d_strerror
+eval $inlibc
+
: see if symlink exists
set symlink d_symlink
eval $inlibc
@@ -1931,31 +1960,71 @@ eval $inlibc
set syscall d_syscall
eval $inlibc
-: see if struct tm is defined in sys/time.h
-echo " "
-if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
- echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
- d_tminsys="$undef"
- if test -f /usr/include/sys/time.h; then
- i_systime="$define"
- else
- i_systime="$undef"
- fi
-else
- echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
- d_tminsys="$define"
- i_systime="$define"
-fi
-if $contains '^#.*include.*<time\.h>' /usr/include/sys/time.h >/dev/null 2>&1 ; then
- i_timetoo="$undef"
-else
- i_timetoo="$define"
-fi
-if $contains '^#.*include.*<sys/time\.h>' /usr/include/time.h >/dev/null 2>&1 ; then
- i_systimetoo="$undef"
-else
- i_systimetoo="$define"
-fi
+: see if we should include time.h, sys/time.h, or both
+cat <<'EOM'
+
+Testing to see if we should include <time.h>, <sys/time.h> or both.
+I'm now running the test program...
+EOM
+$cat >try.c <<'EOCP'
+#ifdef I_TIME
+#include <time.h>
+#endif
+#ifdef I_SYSTIME
+#ifdef SYSTIMEKERNEL
+#define KERNEL
+#endif
+#include <sys/time.h>
+#endif
+main()
+{
+ struct tm foo;
+#ifdef S_TIMEVAL
+ struct timeval bar;
+#endif
+ if (foo.tm_sec == foo.tm_sec)
+ exit(0);
+#ifdef S_TIMEVAL
+ if (bar.tv_sec == bar.tv_sec)
+ exit(0);
+#endif
+ exit(1);
+}
+EOCP
+flags=''
+for s_timeval in '-DS_TIMEVAL' ''; do
+ for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
+ for i_time in '' '-DI_TIME'; do
+ for i_systime in '-DI_SYSTIME' ''; do
+ case "$flags" in
+ '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
+ if $cc try.c $ccflags \
+ $i_time $i_systime $d_systimekernel $s_timeval \
+ -o try >/dev/null 2>&1 ; then
+ set X $i_time $i_systime $d_systimekernel $s_timeval
+ shift
+ flags="$*"
+ echo Succeeded with $flags
+ fi
+ ;;
+ esac
+ done
+ done
+ done
+done
+case "$flags" in
+*SYSTIMEKERNEL*) d_systimekernel="$define";;
+*) d_systimekernel="$undef";;
+esac
+case "$flags" in
+*I_TIME*) i_time="$define";;
+*) i_time="$undef";;
+esac
+case "$flags" in
+*I_SYSTIME*) i_systime="$define";;
+*) i_systime="$undef";;
+esac
+$rm -f try.c try
: see if this is a varargs system
echo " "
@@ -2120,10 +2189,10 @@ fi
echo " "
if $test -r /usr/include/sys/dir.h ; then
i_sysdir="$define"
- echo "sysdir.h found."
+ echo "sys/dir.h found."
else
i_sysdir="$undef"
- echo "No sysdir.h found."
+ echo "No sys/dir.h found."
fi
: see if ioctl defs are in sgtty/termio or sys/ioctl
@@ -2136,6 +2205,27 @@ else
echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
fi
+: see if this is a sys/ndir.h system
+echo " "
+xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
+if test -f $xxx; then
+ i_sysndir="$define"
+ echo "sys/ndir.h found."
+else
+ i_sysndir="$undef"
+ echo "No sys/ndir.h found."
+fi
+
+: see if this is DG/UX with a funky utime.h
+echo " "
+if $test -r /usr/include/utime.h ; then
+ i_utime="$define"
+ echo "utime.h found."
+else
+ i_utime="$undef"
+ echo "No utime.h found, but that's ok."
+fi
+
: see if this is a varargs system
echo " "
if $test -r /usr/include/varargs.h ; then
@@ -2347,6 +2437,21 @@ y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
*) mallocsrc=''; mallocobj='';;
esac
+: determine compiler compiler
+case "$yacc" in
+'') dflt=yacc;;
+*) dflt="$yacc";;
+esac
+cont=true
+ echo " "
+rp="Which compiler compiler (yacc or bison) will you use? [$dflt]"
+$echo $n "$rp $c"
+. myread
+case "$ans" in
+'') ans="$dflt";;
+esac
+yacc="$ans"
+
echo " "
echo "End of configuration questions."
echo " "
@@ -2439,6 +2544,7 @@ d_flock='$d_flock'
d_getgrps='$d_getgrps'
d_gethent='$d_gethent'
d_getpgrp='$d_getpgrp'
+d_getpgrp2='$d_getpgrp2'
d_getprior='$d_getprior'
d_htonl='$d_htonl'
d_index='$d_index'
@@ -2456,6 +2562,7 @@ d_rmdir='$d_rmdir'
d_setegid='$d_setegid'
d_seteuid='$d_seteuid'
d_setpgrp='$d_setpgrp'
+d_setpgrp2='$d_setpgrp2'
d_setprior='$d_setprior'
d_setregid='$d_setregid'
d_setresgid='$d_setresgid'
@@ -2470,12 +2577,9 @@ socketlib='$socketlib'
d_statblks='$d_statblks'
d_stdstdio='$d_stdstdio'
d_strctcpy='$d_strctcpy'
+d_strerror='$d_strerror'
d_symlink='$d_symlink'
d_syscall='$d_syscall'
-d_tminsys='$d_tminsys'
-i_systime='$i_systime'
-i_timetoo='$i_timetoo'
-i_systimetoo='$i_systimetoo'
d_varargs='$d_varargs'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
@@ -2496,6 +2600,11 @@ d_pwclass='$d_pwclass'
d_pwexpire='$d_pwexpire'
i_sysdir='$i_sysdir'
i_sysioctl='$i_sysioctl'
+i_sysndir='$i_sysndir'
+i_time='$i_time'
+i_systime='$i_systime'
+d_systimekernel='$d_systimekernel'
+i_utime='$i_utime'
i_varargs='$i_varargs'
i_vfork='$i_vfork'
intsize='$intsize'
@@ -2530,8 +2639,9 @@ stdchar='$stdchar'
uidtype='$uidtype'
voidflags='$voidflags'
defvoidused='$defvoidused'
-lib='$lib'
+yacc='$yacc'
privlib='$privlib'
+lib='$lib'
CONFIG=true
EOT
@@ -2549,6 +2659,7 @@ case "$ans" in
*) : in case they cannot read
eval $ans;;
esac
+: if this fails, just run all the .SH files by hand
. ./config.sh
echo " "