summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xConfigure5331
-rw-r--r--MANIFEST98
-rw-r--r--Makefile649
-rw-r--r--Makefile.SH2
-rw-r--r--README11
-rw-r--r--all0
-rw-r--r--arg.c8
-rw-r--r--array.c2
-rw-r--r--cmd.h2
-rw-r--r--config.h190
-rw-r--r--config.h.SH161
-rw-r--r--config_H (renamed from config.H)0
-rw-r--r--config_h.SH209
-rw-r--r--form.c2
-rw-r--r--hints/3b1.sh15
-rw-r--r--hints/3b1cc88
-rw-r--r--hints/README.hints318
-rw-r--r--hints/aix.sh518
-rw-r--r--hints/altos486.sh3
-rw-r--r--hints/amigaos.sh55
-rw-r--r--hints/apollo.sh55
-rw-r--r--hints/atheos.sh35
-rw-r--r--hints/aux_3.sh22
-rw-r--r--hints/beos.sh62
-rw-r--r--hints/broken-db.msg14
-rw-r--r--hints/bsdos.sh130
-rw-r--r--hints/convexos.sh12
-rw-r--r--hints/cxux.sh106
-rw-r--r--hints/cygwin.sh42
-rw-r--r--hints/darwin.sh148
-rw-r--r--hints/dcosx.sh188
-rw-r--r--hints/dec_osf.sh523
-rw-r--r--hints/dgux.sh239
-rw-r--r--hints/dos_djgpp.sh76
-rw-r--r--hints/dynix.sh7
-rw-r--r--hints/dynixptx.sh60
-rw-r--r--hints/epix.sh66
-rw-r--r--hints/esix4.sh36
-rw-r--r--hints/fps.sh1
-rw-r--r--hints/freebsd.sh256
-rw-r--r--hints/genix.sh1
-rw-r--r--hints/gnu.sh33
-rw-r--r--hints/greenhills.sh1
-rw-r--r--hints/hpux.sh598
-rw-r--r--hints/i386.sh1
-rw-r--r--hints/irix_4.sh45
-rw-r--r--hints/irix_5.sh55
-rw-r--r--hints/irix_6.sh361
-rw-r--r--hints/irix_6_0.sh64
-rw-r--r--hints/irix_6_1.sh64
-rw-r--r--hints/isc.sh44
-rw-r--r--hints/isc_2.sh25
-rw-r--r--hints/linux.sh284
-rw-r--r--hints/lynxos.sh19
-rw-r--r--hints/machten.sh279
-rw-r--r--hints/machten_2.sh94
-rw-r--r--hints/mint.sh94
-rw-r--r--hints/mips.sh14
-rw-r--r--hints/mpc.sh1
-rw-r--r--hints/mpeix.sh163
-rw-r--r--hints/ncr_tower.sh16
-rw-r--r--hints/netbsd.sh146
-rw-r--r--hints/newsos4.sh33
-rw-r--r--hints/next_3.sh141
-rw-r--r--hints/next_3_0.sh53
-rw-r--r--hints/next_4.sh102
-rw-r--r--hints/nonstopux.sh20
-rw-r--r--hints/openbsd.sh134
-rw-r--r--hints/opus.sh1
-rw-r--r--hints/os2.sh484
-rw-r--r--hints/os390.sh218
-rw-r--r--hints/posix-bc.sh172
-rw-r--r--hints/powerux.sh218
-rw-r--r--hints/qnx.sh249
-rw-r--r--hints/rhapsody.sh77
-rw-r--r--hints/sco.sh243
-rw-r--r--hints/sco_2_3_0.sh2
-rw-r--r--hints/sco_2_3_1.sh2
-rw-r--r--hints/sco_2_3_2.sh2
-rw-r--r--hints/sco_2_3_3.sh3
-rw-r--r--hints/sco_2_3_4.sh5
-rw-r--r--hints/solaris_2.sh603
-rw-r--r--hints/stellar.sh2
-rw-r--r--hints/sunos_4_0.sh2
-rw-r--r--hints/sunos_4_1.sh84
-rw-r--r--hints/super-ux.sh20
-rw-r--r--hints/svr4.sh163
-rw-r--r--hints/svr5.sh226
-rw-r--r--hints/t001.c90
-rw-r--r--hints/ti1500.sh1
-rw-r--r--hints/titanos.sh38
-rw-r--r--hints/ultrix_4.sh70
-rw-r--r--hints/umips.sh39
-rw-r--r--hints/unicos.sh54
-rw-r--r--hints/unicosmk.sh46
-rw-r--r--hints/unisysdynix.sh1
-rw-r--r--hints/utekv.sh12
-rw-r--r--hints/uts.sh32
-rw-r--r--hints/uwin.sh36
-rw-r--r--hints/vmesa.sh336
-rw-r--r--hints/vos.sh145
-rwxr-xr-xmakedepend126
-rw-r--r--makedepend.SH2
-rwxr-xr-xmakedir58
-rw-r--r--patchlevel.h2
-rw-r--r--perl.h2
-rw-r--r--perl.y1
-rw-r--r--perly.c7
-rw-r--r--stab.c10
-rwxr-xr-x[-rw-r--r--]t/TEST4
-rwxr-xr-x[-rw-r--r--]t/base.cond0
-rwxr-xr-x[-rw-r--r--]t/base.if0
-rwxr-xr-x[-rw-r--r--]t/base.lex0
-rwxr-xr-x[-rw-r--r--]t/base.pat0
-rwxr-xr-x[-rw-r--r--]t/base.term2
-rwxr-xr-x[-rw-r--r--]t/cmd.elsif0
-rwxr-xr-x[-rw-r--r--]t/cmd.for0
-rwxr-xr-x[-rw-r--r--]t/cmd.mod0
-rwxr-xr-x[-rw-r--r--]t/cmd.subval0
-rwxr-xr-x[-rw-r--r--]t/cmd.while0
-rwxr-xr-x[-rw-r--r--]t/comp.cmdopt0
-rwxr-xr-x[-rw-r--r--]t/comp.cpp0
-rwxr-xr-x[-rw-r--r--]t/comp.decl0
-rwxr-xr-x[-rw-r--r--]t/comp.multiline0
-rwxr-xr-x[-rw-r--r--]t/comp.script0
-rwxr-xr-x[-rw-r--r--]t/comp.term0
-rwxr-xr-x[-rw-r--r--]t/io.argv0
-rwxr-xr-x[-rw-r--r--]t/io.fs0
-rwxr-xr-x[-rw-r--r--]t/io.inplace0
-rwxr-xr-x[-rw-r--r--]t/io.print0
-rwxr-xr-x[-rw-r--r--]t/io.tell0
-rwxr-xr-x[-rw-r--r--]t/op.append0
-rwxr-xr-x[-rw-r--r--]t/op.auto0
-rwxr-xr-x[-rw-r--r--]t/op.chop0
-rwxr-xr-x[-rw-r--r--]t/op.cond0
-rwxr-xr-x[-rw-r--r--]t/op.crypt0
-rwxr-xr-x[-rw-r--r--]t/op.do0
-rwxr-xr-x[-rw-r--r--]t/op.each0
-rwxr-xr-x[-rw-r--r--]t/op.eval0
-rwxr-xr-x[-rw-r--r--]t/op.exec0
-rwxr-xr-x[-rw-r--r--]t/op.exp0
-rwxr-xr-x[-rw-r--r--]t/op.flip2
-rwxr-xr-x[-rw-r--r--]t/op.fork0
-rwxr-xr-x[-rw-r--r--]t/op.goto0
-rwxr-xr-x[-rw-r--r--]t/op.int0
-rwxr-xr-x[-rw-r--r--]t/op.join0
-rwxr-xr-x[-rw-r--r--]t/op.list0
-rwxr-xr-x[-rw-r--r--]t/op.magic0
-rwxr-xr-x[-rw-r--r--]t/op.oct0
-rwxr-xr-x[-rw-r--r--]t/op.ord0
-rwxr-xr-x[-rw-r--r--]t/op.pat0
-rwxr-xr-x[-rw-r--r--]t/op.push0
-rwxr-xr-x[-rw-r--r--]t/op.repeat0
-rwxr-xr-x[-rw-r--r--]t/op.sleep0
-rwxr-xr-x[-rw-r--r--]t/op.split0
-rwxr-xr-x[-rw-r--r--]t/op.sprintf0
-rwxr-xr-x[-rw-r--r--]t/op.stat0
-rwxr-xr-x[-rw-r--r--]t/op.subst0
-rwxr-xr-x[-rw-r--r--]t/op.time4
-rwxr-xr-x[-rw-r--r--]t/op.unshift0
l---------t/perl1
-rw-r--r--util.c2
-rw-r--r--util.h2
163 files changed, 15240 insertions, 1286 deletions
diff --git a/Configure b/Configure
index 991f3bbae1..e4fa1a27fc 100755
--- a/Configure
+++ b/Configure
@@ -1,257 +1,1113 @@
#! /bin/sh
#
-# If these # comments don't work, trim them. Don't worry about any other
+# 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 cut out the prototypical config.h from the end of Configure
-# and edit it to reflect your system. Some packages may include samples
+# (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.)
#
-# $Header: Configure,v 1.0.1.6 88/02/02 11:20:07 root Exp $
+# Yes, you may rip this off to use in other distribution packages. This
+# script belongs to the public domain and cannot be copyrighted.
#
-# Yes, you may rip this off to use in other distribution packages.
-# (Note: this Configure script was generated automatically. Rather than
-# working with this copy of Configure, you may wish to get metaconfig.)
+# (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.)
+#
+
+# $Id: Configure 821 2002-10-22 11:14:00Z richardc $
+#
+# Generated on Mon Aug 5 21:38:20 BST 2002 [metaconfig 3.0 PL70]
+
+cat >/tmp/c1$$ <<EOF
+ARGGGHHHH!!!!!
+
+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.)
-: sanity checks
-PATH='.:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc'
-export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
+[End of diatribe. We now return you to your regularly scheduled programming...]
+EOF
+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...
+EOF
+
+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
+me=$0
+case "$0" in
+*/*)
+ me=`echo $0 | sed -e 's!.*/\(.*\)!\1!' 2>/dev/null`
+ test "$me" || me=$0
+ ;;
+esac
-if test ! -t 0; then
- echo "Say 'sh Configure', not 'sh <Configure'"
- exit 1
+: Proper PATH separator
+p_=:
+: On OS/2 this directory should exist if this is not floppy only system :-]
+if test -d c:/.; then
+ p_=\;
+ PATH=`cmd /c "echo %PATH%" | tr '\\\\' / `
+ OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'`
fi
-(alias) >/dev/null 2>&1 && \
- echo "(I see you are using the Korn shell. Some ksh's blow up on Configure," && \
- echo "especially on exotic machines. If yours does, try the Bourne shell instead.)"
+: 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"
-if test ! -d ../UU; then
- if test ! -d UU; then
- mkdir UU
- fi
- cd UU
+for p in $paths
+do
+ case "$p_$PATH$p_" in
+ *$p_$p$p_*) ;;
+ *) test -d $p && PATH=$PATH$p_$p ;;
+ esac
+done
+
+PATH=.$p_$PATH
+export PATH
+
+: shall we be using ksh?
+inksh=''
+needksh=''
+avoidksh=''
+newsh=/bin/ksh
+changesh=''
+if (PATH=.; alias -x) >/dev/null 2>&1; then
+ inksh=true
fi
+if test -f /hp-ux -a -f /bin/ksh; then
+ needksh='to avoid sh bug in "here document" expansion'
+fi
+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"
+ newsh=/usr/bin/bsh
+ fi
+fi
+case "$inksh/$needksh" in
+/[a-z]*)
+ unset ENV
+ changesh=true
+ reason="$needksh"
+ ;;
+esac
+case "$inksh/$avoidksh" in
+true/[a-z]*)
+ changesh=true
+ reason="$avoidksh"
+ ;;
+esac
+case "$inksh/$needksh-$avoidksh-" in
+true/--)
+ 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.)
+EOM
+ ;;
+esac
+case "$changesh" in
+true)
+ echo "(Feeding myself to $newsh $reason.)"
+ case "$0" in
+ Configure|*/Configure) exec $newsh $0 "$@";;
+ *) exec $newsh Configure "$@";;
+ esac
+ ;;
+esac
+
+: Configure runs within the UU subdirectory
+test -d UU || mkdir UU
+unset CDPATH
+cd UU && rm -f ./*
+d_bsd=''
d_eunice=''
+d_xenix=''
eunicefix=''
-define=''
-loclist=''
-expr=''
-sed=''
-echo=''
+Mcc=''
+ar=''
+awk=''
+bash=''
+bison=''
+byacc=''
cat=''
-rm=''
-mv=''
+chgrp=''
+chmod=''
+chown=''
+comm=''
+compress=''
cp=''
-tail=''
-tr=''
-mkdir=''
-sort=''
-uniq=''
+cpio=''
+cpp=''
+csh=''
+date=''
+echo=''
+egrep=''
+emacs=''
+expr=''
+find=''
+flex=''
+gcc=''
grep=''
-trylist=''
-test=''
+gzip=''
inews=''
-egrep=''
+ksh=''
+less=''
+line=''
+lint=''
+ln=''
+lp=''
+lpr=''
+ls=''
+mail=''
+mailx=''
+make=''
+mkdir=''
more=''
+mv=''
+nroff=''
+perl=''
pg=''
-Mcc=''
+pmake=''
+pr=''
+rm=''
+rmail=''
+sed=''
+sendmail=''
+shar=''
+sleep=''
+smail=''
+sort=''
+submit=''
+tail=''
+tar=''
+tbl=''
+test=''
+touch=''
+tr=''
+troff=''
+uname=''
+uniq=''
+uuname=''
vi=''
-mailx=''
-mail=''
-Log=''
+zcat=''
+zip=''
+hint=''
+myuname=''
+osname=''
+osvers=''
+Author=''
+Date=''
Header=''
+Id=''
+Locker=''
+Log=''
+RCSfile=''
+Revision=''
+Source=''
+State=''
+archobjs=''
+firstmakefile=''
+afs=''
bin=''
+binexp=''
+installbin=''
cc=''
+gccversion=''
+ccflags=''
+cppflags=''
+ldflags=''
+lkflags=''
+locincpth=''
+optimize=''
+cf_by=''
+cf_time=''
contains=''
-cpp=''
+cpplast=''
cppminus=''
+cpprun=''
+cppstdin=''
d_bcopy=''
+d_bzero=''
d_charsprf=''
+cryptlib=''
d_crypt=''
-d_index=''
+d_gnulibc=''
+d_portable=''
+d_rename=''
+d_select=''
+d_stat=''
d_statblks=''
+d_stdio_cnt_lval=''
+d_stdio_ptr_lval=''
+d_stdiobase=''
d_stdstdio=''
+stdio_base=''
+stdio_bufsiz=''
+stdio_cnt=''
+stdio_filbuf=''
+stdio_ptr=''
+d_index=''
+d_strchr=''
d_strctcpy=''
d_symlink=''
+d_system=''
+clocktype=''
+d_times=''
d_tminsys=''
d_vfork=''
+usevfork=''
d_voidsig=''
+signal_t=''
+i_malloc=''
+i_stdlib=''
+i_string=''
+strings=''
+i_systimes=''
+lib=''
+libexp=''
libc=''
libnm=''
-mallocsrc=''
+glibpth=''
+libpth=''
+loclibpth=''
+plibpth=''
+xlibpth=''
+libs=''
+lns=''
+d_mymalloc=''
+freetype=''
mallocobj=''
+mallocsrc=''
+malloctype=''
usemymalloc=''
-mansrc=''
+installmansrc=''
manext=''
+mansrc=''
+mansrcexp=''
+huge=''
+large=''
+medium=''
models=''
-split=''
small=''
-medium=''
-large=''
-huge=''
-ccflags=''
-ldflags=''
-n=''
+split=''
c=''
+n=''
package=''
-spitshell=''
-shsharp=''
+spackage=''
+prefix=''
+prefixexp=''
+prototype=''
+sh=''
+so=''
sharpbang=''
+shsharp=''
+spitshell=''
+src=''
startsh=''
stdchar=''
-voidflags=''
+sysman=''
+nm_opt=''
+nm_so_opt=''
+runnm=''
+usenm=''
+incpath=''
+mips=''
+mips_type=''
+usrinc=''
defvoidused=''
+voidflags=''
CONFIG=''
+define='define'
+undef='undef'
+smallmach='pdp11 i8086 z8000 i80286 iAPX286'
+rmlist=''
+
+: We must find out about Eunice early
+eunicefix=':'
+if test -f /etc/unixtovms; then
+ eunicefix=/etc/unixtovms
+fi
+if test -f /etc/unixtovms.exe; then
+ eunicefix=/etc/unixtovms.exe
+fi
+
+: No trailing extension on UNIX executables
+_exe=''
+: Extra object files, if any, needed on this platform.
+archobjs=''
+gccversion=''
+: Possible local include directories to search.
+: Set locincpth to "" in a hint file to defeat local include searches.
+locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
+locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+:
+: no include file wanted by default
+inclwanted=''
+
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+
+: Possible local library directories to search.
+loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+: general looking path for locating libraries
+glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
+glibpth="$glibpth /lib /usr/lib $xlibpth"
+glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
+glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+
+: Private path used by Configure to find libraries. Its value
+: is prepended to libpth. This variable takes care of special
+: machines, like the mips. Usually, it should be empty.
+plibpth=''
+
+: default library list
+libswanted=''
+: full support for void wanted by default
+defvoidused=15
+
+
+: Find the basic shell for Bourne shell scripts
+case "$sh" in
+'')
+ case "$SYSTYPE" in
+ *bsd*|sys5*) xxx="/$SYSTYPE/bin/sh";;
+ *) xxx='/bin/sh';;
+ esac
+ if test -f "$xxx"; then
+ sh="$xxx"
+ else
+ : Build up a list and do a single loop so we can 'break' out.
+ pth=`echo $PATH | sed -e "s/$p_/ /g"`
+ for xxx in sh bash ksh pdksh ash; do
+ for p in $pth; do
+ try="$try ${p}/${xxx}"
+ done
+ done
+ for xxx in $try; do
+ if test -f "$xxx"; then
+ sh="$xxx";
+ break
+ elif test -f "$xxx.exe"; then
+ sh="$xxx";
+ break
+ fi
+ done
+ fi
+ ;;
+esac
+
+case "$sh" in
+'') cat <<EOM >&2
+$me: Fatal Error: I can't find a Bourne Shell anywhere.
+
+Usually it's in /bin/sh. How did you even get this far?
+Please contact me () at perl1-porters@perl.org and
+we'll try to straighten this all out.
+EOM
+ exit 1
+ ;;
+esac
+
+: see if sh knows # comments
+if `$sh -c '#' >/dev/null 2>&1`; then
+ shsharp=true
+ spitshell=cat
+ xcat=/bin/cat
+ test -f $xcat || xcat=/usr/bin/cat
+ echo "#!$xcat" >try
+ $eunicefix try
+ chmod +x try
+ ./try > today
+ if test -s today; then
+ sharpbang='#!'
+ else
+ echo "#! $xcat" > try
+ $eunicefix try
+ chmod +x try
+ ./try > today
+ if test -s today; then
+ sharpbang='#! '
+ else
+ sharpbang=': use '
+ fi
+ fi
+else
+ echo " "
+ echo "Your $sh doesn't grok # comments--I will strip them later on."
+ shsharp=false
+ cd ..
+ echo "exec grep -v '^[ ]*#'" >spitshell
+ chmod +x spitshell
+ $eunicefix spitshell
+ spitshell=`pwd`/spitshell
+ cd UU
+ echo "I presume that if # doesn't work, #! won't work either!"
+ sharpbang=': use '
+fi
+rm -f try today
+
+: figure out how to guarantee sh startup
+case "$startsh" in
+'') startsh=${sharpbang}${sh} ;;
+*)
+esac
+cat >try <<EOSS
+$startsh
+set abc
+test "$?abc" != 1
+EOSS
+
+chmod +x try
+$eunicefix try
+if ./try; then
+ : echo "Yup, it does."
+else
+ echo "Hmm... '$startsh' does not guarantee sh startup..."
+ echo "You may have to fix up the shell scripts to make sure $sh runs them."
+fi
+rm -f try
+
+: produce awk script to parse command line options
+cat >options.awk <<'EOF'
+BEGIN {
+ optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
+
+ len = length(optstr);
+ for (i = 1; i <= len; i++) {
+ c = substr(optstr, i, 1);
+ if (i < len) a = substr(optstr, i + 1, 1); else a = "";
+ if (a == ":") {
+ arg[c] = 1;
+ i++;
+ }
+ opt[c] = 1;
+ }
+}
+{
+ expect = 0;
+ str = $0;
+ if (substr(str, 1, 1) != "-") {
+ printf("'%s'\n", str);
+ next;
+ }
+ len = length($0);
+ for (i = 2; i <= len; i++) {
+ c = substr(str, i, 1);
+ if (!opt[c]) {
+ printf("-%s\n", substr(str, i));
+ next;
+ }
+ printf("-%s\n", c);
+ if (arg[c]) {
+ if (i < len)
+ printf("'%s'\n", substr(str, i + 1));
+ else
+ expect = 1;
+ next;
+ }
+ }
+}
+END {
+ if (expect)
+ print "?";
+}
+EOF
+
+: process the command line options
+set X `for arg in "$@"; do echo "X$arg"; done |
+ sed -e s/X// | awk -f options.awk`
+eval "set $*"
+shift
+rm -f options.awk
+
+: set up default values
+fastread=''
+reuseval=false
+config_sh=''
+alldone=''
+error=''
+silent=''
+extractsh=''
+override=''
+knowitall=''
+rm -f optdef.sh
+cat >optdef.sh <<EOS
+$startsh
+EOS
+
+
+: option parsing
+while test $# -gt 0; do
+ case "$1" in
+ -d) shift; fastread=yes;;
+ -e) shift; alldone=cont;;
+ -f)
+ shift
+ cd ..
+ if test -r "$1"; then
+ config_sh="$1"
+ else
+ echo "$me: cannot read config file $1." >&2
+ error=true
+ fi
+ cd UU
+ shift;;
+ -h) shift; error=true;;
+ -r) shift; reuseval=true;;
+ -s) shift; silent=true; realsilent=true;;
+ -E) shift; alldone=exit;;
+ -K) shift; knowitall=true;;
+ -O) shift; override=true;;
+ -S) shift; silent=true; extractsh=true;;
+ -D)
+ shift
+ case "$1" in
+ *=)
+ echo "$me: use '-U symbol=', not '-D symbol='." >&2
+ echo "$me: ignoring -D $1" >&2
+ ;;
+ *=*) echo "$1" | \
+ sed -e "s/'/'\"'\"'/g" -e "s/=\(.*\)/='\1'/" >> optdef.sh;;
+ *) echo "$1='define'" >> optdef.sh;;
+ esac
+ shift
+ ;;
+ -U)
+ shift
+ case "$1" in
+ *=) echo "$1" >> optdef.sh;;
+ *=*)
+ echo "$me: use '-D symbol=val', not '-U symbol=val'." >&2
+ echo "$me: ignoring -U $1" >&2
+ ;;
+ *) echo "$1='undef'" >> optdef.sh;;
+ esac
+ shift
+ ;;
+ -V) echo "$me generated by metaconfig 3.0 PL70." >&2
+ exit 0;;
+ --) break;;
+ -*) echo "$me: unknown option $1" >&2; shift; error=true;;
+ *) break;;
+ esac
+done
+
+case "$error" in
+true)
+ cat >&2 <<EOM
+Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
+ [-U symbol] [-U symbol=]
+ -d : use defaults for all answers.
+ -e : go on without questioning past the production of config.sh.
+ -f : specify an alternate default configuration file.
+ -h : print this help message and exit (with an error status).
+ -r : reuse C symbols value if possible (skips costly nm extraction).
+ -s : silent mode, only echoes questions and essential information.
+ -D : define symbol to have some value:
+ -D symbol symbol gets the value 'define'
+ -D symbol=value symbol gets the value 'value'
+ -E : stop at the end of questions, after having produced config.sh.
+ -K : do not use unless you know what you are doing.
+ -O : let -D and -U override definitions from loaded configuration file.
+ -S : perform variable substitutions on all .SH files (can mix with -f)
+ -U : undefine symbol:
+ -U symbol symbol gets the value 'undef'
+ -U symbol= symbol gets completely empty
+ -V : print version number and exit (with a zero status).
+EOM
+ exit 1
+ ;;
+esac
+
+: Sanity checks
+case "$fastread$alldone" in
+yescont|yesexit) ;;
+*)
+ if test ! -t 0; then
+ echo "Say 'sh Configure', not 'sh <Configure'"
+ exit 1
+ fi
+ ;;
+esac
+
+exec 4>&1
+case "$silent" in
+true) exec 1>/dev/null;;
+esac
+
+: run the defines and the undefines, if any, but leave the file out there...
+touch optdef.sh
+. ./optdef.sh
+
: set package name
package=perl
+first=`echo $package | sed -e 's/^\(.\).*/\1/'`
+last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
+case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
+*) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
+esac
-echo " "
-echo "Beginning of configuration questions for $package kit."
-: Eunice requires " " instead of "", can you believe it
-echo " "
-
-define='define'
-undef='/*undef'
-libpth='/usr/lib /usr/local/lib /lib'
-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
-attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr"
-attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200"
-attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
-pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib"
-defvoidused=7
-
-: some greps do not return status, grrr.
+: Some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
- contains=contains
+ contains=contains
elif grep grimblepritz grimble >/dev/null 2>&1 ; then
- contains=grep
+ contains=grep
else
- contains=contains
+ contains=contains
fi
rm -f grimble
: the following should work in any shell
case "$contains" in
contains*)
- echo " "
- echo "AGH! Grep doesn't return a status. Attempting remedial action."
- cat >contains <<'EOSS'
+ echo " "
+ echo "AGH! Grep doesn't return a status. Attempting remedial action."
+ cat >contains <<'EOSS'
grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp
EOSS
-chmod 755 contains
+chmod +x contains
esac
: first determine how to suppress newline on echo command
+echo " "
echo "Checking echo to see how to suppress newlines..."
(echo "hi there\c" ; echo " ") >.echotmp
if $contains c .echotmp >/dev/null 2>&1 ; then
- echo "...using -n."
- n='-n'
- c=''
+ echo "...using -n."
+ n='-n'
+ c=''
else
- cat <<'EOM'
+ cat <<'EOM'
...using \c
EOM
- n=''
- c='\c'
+ n=''
+ c='\c'
fi
-echo $n "Type carriage return to continue. Your cursor should be here-->$c"
-read ans
+echo $n "The star should be here-->$c"
+echo '*'
rm -f .echotmp
+: compute the number of columns on the terminal for proper question formatting
+case "$COLUMNS" in
+'') COLUMNS='80';;
+esac
+
+: set up the echo used in my read
+myecho="case \"\$xxxm\" in
+'') echo $n \"\$rp $c\" >&4;;
+*) case \"\$rp\" in
+ '') echo $n \"[\$xxxm] $c\";;
+ *)
+ if test \`echo \"\$rp [\$xxxm] \" | wc -c\` -ge $COLUMNS; then
+ echo \"\$rp\" >&4
+ echo $n \"[\$xxxm] $c\" >&4
+ else
+ echo $n \"\$rp [\$xxxm] $c\" >&4
+ fi
+ ;;
+ esac;;
+esac"
+
: now set up to do reads with possible shell escape and default assignment
cat <<EOSC >myread
+$startsh
+xxxm=\$dflt
+$myecho
ans='!'
+case "\$fastread" in
+yes) case "\$dflt" in
+ '') ;;
+ *) ans='';
+ case "\$silent-\$rp" in
+ true-) ;;
+ *) echo " " >&4;;
+ esac;;
+ esac;;
+*) case "\$silent" in
+ true) case "\$rp" in
+ '') ans='';;
+ esac;;
+ esac;;
+esac
while expr "X\$ans" : "X!" >/dev/null; do
- read ans
- case "\$ans" in
- !)
- sh
+ read answ
+ set x \$xxxm
+ shift
+ aok=''; eval "ans=\\"\$answ\\"" && aok=y
+ case "\$answ" in
+ "!")
+ sh 1>&4
+ echo " "
+ $myecho
+ ;;
+ !*)
+ set x \`expr "X\$ans" : "X!\(.*\)\$"\`
+ shift
+ sh 1>&4 -c "\$*"
+ echo " "
+ $myecho
+ ;;
+ "\$ans")
+ case "\$ans" in
+ \\&*)
+ set x \`expr "X\$ans" : "X&\(.*\)\$"\`
+ shift
+ case "\$1" in
+ -d)
+ fastread=yes
+ echo "(OK, I'll run with -d after this question.)" >&4
+ ;;
+ -*)
+ echo "*** Sorry, \$1 not supported yet." >&4
+ ;;
+ esac
+ $myecho
+ ans=!
+ ;;
+ esac;;
+ *)
+ case "\$aok" in
+ y)
+ echo "*** Substitution done -- please confirm."
+ xxxm="\$ans"
+ ans=\`echo $n "\$ans$c" | tr '\012' ' '\`
+ xxxm="\$ans"
+ ans=!
+ ;;
+ *)
+ echo "*** Error -- try again."
+ ans=!
+ ;;
+ esac
+ $myecho
+ ;;
+ esac
+ case "\$ans\$xxxm\$nostick" in
+ '')
+ ans=!
+ $myecho
+ ;;
+ esac
+done
+case "\$ans" in
+'') ans="\$xxxm";;
+esac
+EOSC
+
+: Find the path to the source tree
+case "$src" in
+'') src=`echo $0 | sed -e 's%/[^/][^/]*$%%'`;;
+esac
+case "$src" in
+'')
+ src=.
+ rsrc=..
+ ;;
+/*) rsrc="$src/..";;
+*) rsrc="../$src";;
+esac
+if test -f $rsrc/Configure && \
+ $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
+then
+ : found it, so we are ok.
+else
+ rsrc=''
+ for src in . .. ../.. ../../.. ../../../..; do
+ if test -f ../$src/Configure && \
+ $contains "^package=$package" ../$src/Configure >/dev/null 2>&1
+ then
+ rsrc=../$src
+ break
+ fi
+ done
+fi
+case "$rsrc" in
+'')
echo " "
- echo $n "\$rp $c"
+ dflt=
+ rp="Directory where sources for $package are located?"
+ . ./myread
+ src="$ans"
+ rsrc="$src"
+ if test -f $rsrc/Configure && \
+ $contains "^package=$package" $rsrc/Configure >/dev/null 2>&1
+ then
+ echo "Ok, I've found them under $src"
+ else
+ echo "Sorry, I can't seem to be able to locate $package sources." >&4
+ exit 1
+ fi
;;
- !*)
- set \`expr "X\$ans" : "X!\(.*\)\$"\`
- sh -c "\$*"
+../.) ;;
+*)
echo " "
- echo $n "\$rp $c"
+ echo "Sources for $package found in $src" >&4
;;
- esac
+esac
+
+: script used to extract .SH files with variable substitutions
+cat >extract <<'EOS'
+CONFIG=true
+echo "Doing variable substitutions on .SH files..."
+if test -f $src/MANIFEST; then
+ set x `awk '{print $1}' <$src/MANIFEST | grep '\.SH'`
+else
+ echo "(Looking for .SH files under the source directory.)"
+ set x `(cd $src; find . -name "*.SH" -print)`
+fi
+shift
+case $# in
+0) set x `(cd $src; echo *.SH)`; shift;;
+esac
+if test ! -f $src/$1; then
+ shift
+fi
+mkdir_p='
+name=$1;
+create="";
+while test $name; do
+ if test ! -d "$name"; then
+ create="$name $create";
+ name=`echo $name | sed -e "s|^[^/]*$||"`;
+ name=`echo $name | sed -e "s|\(.*\)/.*|\1|"`;
+ else
+ name="";
+ fi;
+done;
+for file in $create; do
+ mkdir $file;
done
-rp='Your answer:'
-case "\$ans" in
-'') ans="\$dflt";;
+'
+for file in $*; do
+ case "$src" in
+ ".")
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (cd $dir && . ./$file)
+ ;;
+ *)
+ . ./$file
+ ;;
+ esac
+ ;;
+ *)
+ case "$file" in
+ */*)
+ dir=`expr X$file : 'X\(.*\)/'`
+ file=`expr X$file : 'X.*/\(.*\)'`
+ (set x $dir; shift; eval $mkdir_p)
+ sh <$src/$dir/$file
+ ;;
+ *)
+ sh <$src/$file
+ ;;
+ esac
+ ;;
+ esac
+done
+if test -f $src/config_h.SH; then
+ if test ! -f config.h; then
+ : oops, they left it out of MANIFEST, probably, so do it anyway.
+ . $src/config_h.SH
+ fi
+fi
+EOS
+
+: extract files and exit if asked to do so
+case "$extractsh" in
+true)
+ case "$realsilent" in
+ true) ;;
+ *) exec 1>&4;;
+ esac
+ case "$config_sh" in
+ '') config_sh='config.sh'; config="$rsrc/config.sh";;
+ /*) config="$config_sh";;
+ *) config="$rsrc/$config_sh";;
+ esac
+ echo " "
+ echo "Fetching answers from $config_sh..."
+ . $config
+ test "$override" && . ./optdef.sh
+ echo " "
+ cd ..
+ . UU/extract
+ rm -rf UU
+ echo "Done."
+ exit 0
+ ;;
esac
-EOSC
+
+: Eunice requires " " instead of "", can you believe it
+echo " "
+: Here we go...
+echo "Beginning of configuration questions for $package."
+
+trap 'echo " "; test -d ../UU && rm -rf X $rmlist; exit 1' 1 2 3 15
+
+: Now test for existence of everything in MANIFEST
+echo " "
+if test -f $rsrc/MANIFEST; then
+ echo "First let's make sure your kit is complete. Checking..." >&4
+ awk '$1 !~ /PACK[A-Z]+/ {print $1}' $rsrc/MANIFEST | split -50
+ rm -f missing
+ tmppwd=`pwd`
+ for filelist in x??; do
+ (cd $rsrc; ls `cat $tmppwd/$filelist` >/dev/null 2>>$tmppwd/missing)
+ done
+ if test -s missing; then
+ cat missing >&4
+ cat >&4 <<'EOM'
+
+THIS PACKAGE SEEMS TO BE INCOMPLETE.
+
+You have the option of continuing the configuration process, despite the
+distinct possibility that your kit is damaged, by typing 'y'es. If you
+do, don't blame me if something goes wrong. I advise you to type 'n'o
+and contact the author (perl1-porters@perl.org).
+
+EOM
+ echo $n "Continue? [n] $c" >&4
+ read ans
+ case "$ans" in
+ y*)
+ echo "Continuing..." >&4
+ rm -f missing
+ ;;
+ *)
+ echo "ABORTING..." >&4
+ kill $$
+ ;;
+ esac
+ else
+ echo "Looks good..."
+ fi
+else
+ echo "There is no MANIFEST file. I hope your kit is complete !"
+fi
+rm -f missing x??
+
+: create .config dir to save info across Configure sessions
+test -d ../.config || mkdir ../.config
+cat >../.config/README <<EOF
+This directory created by Configure to save information that should
+persist across sessions for $package.
+
+You may safely delete it if you wish.
+EOF
: general instructions
-cat <<EOH
+needman=true
+firsttime=true
+user=`(logname) 2>/dev/null`
+case "$user" in
+'') user=`whoami 2>&1`;;
+esac
+if $contains "^$user\$" ../.config/instruct >/dev/null 2>&1; then
+ firsttime=false
+ echo " "
+ rp='Would you like to see the instructions?'
+ dflt=n
+ . ./myread
+ case "$ans" in
+ [yY]*) ;;
+ *) needman=false;;
+ esac
+fi
+if $needman; then
+ cat <<EOH
This installation shell script will examine your system and ask you questions
-to determine how the $package package should be installed. If you get stuck
-on a question, you may use a ! shell escape to start a subshell or execute
-a command. Many of the questions will have default answers in square
-brackets--typing carriage return will give you the default.
+to determine how the perl package should be installed. If you get
+stuck on a question, you may use a ! shell escape to start a subshell or
+execute a command. Many of the questions will have default answers in square
+brackets; typing carriage return will give you the default.
-On some of the questions which ask for file or directory names you are
-allowed to use the ~name construct to specify the login directory belonging
-to "name", even if you don't have a shell which knows about that. Questions
-where this is allowed will be marked "(~name ok)".
+On some of the questions which ask for file or directory names you are allowed
+to use the ~name construct to specify the login directory belonging to "name",
+even if you don't have a shell which knows about that. Questions where this is
+allowed will be marked "(~name ok)".
EOH
-rp="[Type carriage return to continue]"
-echo $n "$rp $c"
-. myread
-cat <<EOH
-
-Much effort has been expended to ensure that this shell script will run
-on any Unix system. If despite that it blows up on you, your best bet is
-to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov)
-know how I blew it. If you can't run Configure for some reason, you'll have
-to generate a config.sh file by hand.
-
-This installation script affects things in two ways: 1) it may do direct
-variable substitutions on some of the files included in this kit, and
+ rp=''
+ dflt='Type carriage return to continue'
+ . ./myread
+ cat <<'EOH'
+
+The prompter used in this script allows you to use shell variables and
+backticks in your answers. You may use $1, $2, etc... to refer to the words
+in the default answer, as if the default line was a set of arguments given to a
+script shell. This means you may also use $* to repeat the whole default line,
+so you do not have to re-type everything to add something to the default.
+
+Everytime there is a substitution, you will have to confirm. If there is an
+error (e.g. an unmatched backtick), the default answer will remain unchanged
+and you will be prompted again.
+
+If you are in a hurry, you may run 'Configure -d'. This will bypass nearly all
+the questions and use the computed defaults (or the previous answers if there
+was already a config.sh file). Type 'Configure -h' for a list of options.
+You may also start interactively and then answer '& -d' at any prompt to turn
+on the non-interactive behaviour for the remaining of the execution.
+
+EOH
+ . ./myread
+ cat <<EOH
+
+Much effort has been expended to ensure that this shell script will run on any
+Unix system. If despite that it blows up on yours, your best bet is to edit
+Configure and run it again. If you can't run Configure for some reason,
+you'll have to generate a config.sh file by hand. Whatever problems you
+have, let me (perl1-porters@perl.org) know how I blew it.
+
+This installation script affects things in two ways:
+
+1) it may do direct variable substitutions on some of the files included
+ in this kit.
2) it builds a config.h file for inclusion in C programs. You may edit
-any of these files as the need arises after running this script.
+ any of these files as the need arises after running this script.
If you make a mistake on a question, there is no easy way to back up to it
-currently. The easiest thing to do is to edit config.sh and rerun all the
-SH files. Configure will offer to let you do this before it runs the SH files.
+currently. The easiest thing to do is to edit config.sh and rerun all the SH
+files. Configure will offer to let you do this before it runs the SH files.
EOH
-rp="[Type carriage return to continue]"
-echo $n "$rp $c"
-. myread
-
-: get old answers, if there is a config file out there
-if test -f ../config.sh; then
- echo " "
- dflt=y
- rp="I see a config.sh file. Did Configure make it on THIS system? [$dflt]"
- echo $n "$rp $c"
- . myread
- case "$ans" in
- n*) echo "OK, I'll ignore it.";;
- *) echo "Fetching default answers from your old config.sh file..."
- tmp="$n"
- ans="$c"
- . ../config.sh
- n="$tmp"
- c="$ans"
- ;;
- esac
+ dflt='Type carriage return to continue'
+ . ./myread
+ case "$firsttime" in
+ true) echo $user >>../.config/instruct;;
+ esac
fi
: find out where common programs are
echo " "
-echo "Locating common programs..."
+echo "Locating common programs..." >&4
cat <<EOSC >loc
$startsh
case \$# in
@@ -262,546 +1118,2989 @@ shift
dflt=\$1
shift
for dir in \$*; do
- case "\$thing" in
- .)
+ case "\$thing" in
+ .)
if test -d \$dir/\$thing; then
- echo \$dir
- exit 0
+ echo \$dir
+ exit 0
fi
;;
- *)
- if test -f \$dir/\$thing; then
- echo \$dir/\$thing
- exit 0
+ *)
+ for thisthing in \$dir/\$thing; do
+ : just loop through to pick last item
+ done
+ if test -f \$thisthing; then
+ echo \$thisthing
+ exit 0
+ elif test -f \$dir/\$thing.exe; then
+ : on Eunice apparently
+ echo \$dir/\$thing
+ exit 0
fi
;;
- esac
+ esac
done
echo \$dflt
exit 1
EOSC
-chmod 755 loc
+chmod +x loc
$eunicefix loc
loclist="
-expr
-sed
-echo
+awk
cat
-rm
-mv
cp
-tr
+echo
+expr
+grep
mkdir
+mv
+rm
+sed
sort
+touch
+tr
uniq
-grep
"
trylist="
-test
-egrep
Mcc
+cpp
+date
+egrep
+ln
+nroff
+test
+uname
"
+pth=`echo $PATH | sed -e "s/$p_/ /g"`
+pth="$pth /lib /usr/lib"
for file in $loclist; do
- xxx=`loc $file $file $pth`
- eval $file=$xxx
- eval _$file=$xxx
- case "$xxx" in
- /*)
- echo $file is in $xxx.
- ;;
- *)
- echo "I don't know where $file is. I hope it's in everyone's PATH."
- ;;
- esac
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't know where '$file' is, and my life depends on it." >&4
+ echo "Go find a public domain implementation or fix your PATH setting!" >&4
+ exit 1
+ ;;
+ esac
done
echo " "
echo "Don't worry if any of the following aren't found..."
-ans=offhand
+say=offhand
for file in $trylist; do
- xxx=`loc $file $file $pth`
- eval $file=$xxx
- eval _$file=$xxx
- case "$xxx" in
- /*)
- echo $file is in $xxx.
- ;;
- *)
- echo "I don't see $file out there, $ans."
- ans=either
- ;;
- esac
+ eval xxx=\$$file
+ case "$xxx" in
+ /*|?:[\\/]*)
+ if test -f "$xxx"; then
+ : ok
+ else
+ echo "WARNING: no $xxx -- ignoring your setting for $file." >&4
+ xxx=`./loc $file $file $pth`
+ fi
+ ;;
+ '') xxx=`./loc $file $file $pth`;;
+ *) xxx=`./loc $xxx $xxx $pth`;;
+ esac
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+ ?:[\\/]*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't see $file out there, $say."
+ say=either
+ ;;
+ esac
done
case "$egrep" in
egrep)
- echo "Substituting grep for egrep."
- egrep=$grep
- ;;
+ echo "Substituting grep for egrep."
+ egrep=$grep
+ ;;
+esac
+case "$ln" in
+ln)
+ echo "Substituting cp for ln."
+ ln=$cp
+ ;;
esac
case "$test" in
test)
- echo "Hopefully test is built into your sh."
- ;;
-/bin/test)
- echo " "
- dflt=n
- rp="Is your "'"'"test"'"'" built into sh? [$dflt] (OK to guess)"
- echo $n "$rp $c"
- . myread
- case "$ans" in
- y*) test=test ;;
- esac
- ;;
+ echo "Hopefully test is built into your sh."
+ ;;
*)
- test=test
- ;;
+ if `sh -c "PATH= test true" >/dev/null 2>&1`; then
+ echo "Using the test built into your sh."
+ test=test
+ _test=test
+ fi
+ ;;
esac
case "$echo" in
echo)
- echo "Hopefully echo is built into your sh."
- ;;
-/bin/echo)
- echo " "
- echo "Checking compatibility between /bin/echo and builtin echo (if any)..."
- $echo $n "hi there$c" >foo1
- echo $n "hi there$c" >foo2
- if cmp foo1 foo2 >/dev/null 2>&1; then
- echo "They are compatible. In fact, they may be identical."
- else
- case "$n" in
- '-n') n='' c='\c' ans='\c' ;;
- *) n='-n' c='' ans='-n' ;;
- esac
- cat <<FOO
+ echo "Hopefully echo is built into your sh."
+ ;;
+'') ;;
+*)
+ echo " "
+echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
+ $echo $n "hi there$c" >foo1
+ echo $n "hi there$c" >foo2
+ if cmp foo1 foo2 >/dev/null 2>&1; then
+ echo "They are compatible. In fact, they may be identical."
+ else
+ case "$n" in
+ '-n') n='' c='\c';;
+ *) n='-n' c='';;
+ esac
+ cat <<FOO
They are not compatible! You are probably running ksh on a non-USG system.
-I'll have to use /bin/echo instead of the builtin, since Bourne shell doesn't
+I'll have to use $echo instead of the builtin, since Bourne shell doesn't
have echo built in and we may have to run some Bourne shell scripts. That
-means I'll have to use $ans to suppress newlines now. Life is ridiculous.
+means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
FOO
- rp="Your cursor should be here-->"
- $echo $n "$rp$c"
- . myread
- fi
- $rm -f foo1 foo2
- ;;
-*)
- : cross your fingers
- echo=echo
- ;;
+ $echo $n "The star should be here-->$c"
+ $echo "*"
+ fi
+ $rm -f foo1 foo2
+ ;;
esac
-rmlist="$rmlist loc"
-: get list of predefined functions in a handy place
+: determine whether symbolic links are supported
echo " "
-if test -f /lib/libc.a; then
- echo "Your C library is in /lib/libc.a. You're normal."
- libc=/lib/libc.a
+$touch blurfl
+if $ln -s blurfl sym > /dev/null 2>&1 ; then
+ echo "Symbolic links are supported." >&4
+ lns="$ln -s"
else
- ans=`loc libc.a blurfl/dyick $libpth`
- if test -f $ans; then
- echo "Your C library is in $ans, of all places."
- libc=$ans
- else
- if test -f "$libc"; then
- echo "Your C library is in $libc, like you said before."
+ echo "Symbolic links are NOT supported." >&4
+ lns="$ln"
+fi
+$rm -f blurfl sym
+
+: see whether [:lower:] and [:upper:] are supported character classes
+echo " "
+up='[A-Z]'
+low='[a-z]'
+case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
+ABYZ)
+ echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
+ up='[:upper:]'
+ low='[:lower:]'
+ ;;
+*)
+ echo "Your tr only supports [a-z] and [A-Z] to convert case." >&4
+ ;;
+esac
+: set up the translation script tr, must be called with ./tr of course
+cat >tr <<EOSC
+$startsh
+case "\$1\$2" in
+'[A-Z][a-z]') exec $tr '$up' '$low';;
+'[a-z][A-Z]') exec $tr '$low' '$up';;
+esac
+exec $tr "\$@"
+EOSC
+chmod +x tr
+$eunicefix tr
+
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
+myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
+ ./tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+newmyuname="$myuname"
+dflt=n
+case "$knowitall" in
+'')
+ if test -f ../config.sh; then
+ if $contains myuname= ../config.sh >/dev/null 2>&1; then
+ eval "`grep myuname= ../config.sh`"
+ fi
+ if test "X$myuname" = "X$newmyuname"; then
+ dflt=y
+ fi
+ fi
+ ;;
+*) dflt=y;;
+esac
+
+: Get old answers from old config file if Configure was run on the
+: same system, otherwise use the hints.
+hint=default
+cd ..
+if test -f config.sh; then
+ echo " "
+ rp="I see a config.sh file. Shall I use it to set the defaults?"
+ . UU/myread
+ case "$ans" in
+ n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
+ *) echo "Fetching default answers from your old config.sh file..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ tmp_sh="$sh"
+ . ./config.sh
+ cp config.sh UU
+ n="$tmp_n"
+ c="$tmp_c"
+ : Older versions did not always set $sh. Catch re-use of such
+ : an old config.sh.
+ case "$sh" in
+ '') sh="$tmp_sh" ;;
+ esac
+ hint=previous
+ ;;
+ esac
+fi
+if test ! -f config.sh; then
+ $cat <<EOM
+
+First time through, eh? I have some defaults handy for the following systems:
+
+EOM
+ (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4
+ dflt=''
+ : Half the following guesses are probably wrong... If you have better
+ : tests or hints, please send them to perl1-porters@perl.org
+ : The metaconfig authors would also appreciate a copy...
+ $test -f /irix && osname=irix
+ $test -f /xenix && osname=sco_xenix
+ $test -f /dynix && osname=dynix
+ $test -f /dnix && osname=dnix
+ $test -f /lynx.os && osname=lynxos
+ $test -f /unicos && osname=unicos && osvers=`$uname -r`
+ $test -f /unicosmk.ar && osname=unicosmk && osvers=`$uname -r`
+ $test -f /bin/mips && /bin/mips && osname=mips
+ $test -d /NextApps && set X `hostinfo | grep 'NeXT Mach.*:' | \
+ $sed -e 's/://' -e 's/\./_/'` && osname=next && osvers=$4
+ $test -d /usr/apollo/bin && osname=apollo
+ $test -f /etc/saf/_sactab && osname=svr4
+ $test -d /usr/include/minix && osname=minix
+ if $test -d /MachTen; then
+ osname=machten
+ if $test -x /sbin/version; then
+ osvers=`/sbin/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ elif $test -x /usr/etc/version; then
+ osvers=`/usr/etc/version | $awk '{print $2}' |
+ $sed -e 's/[A-Za-z]$//'`
+ else
+ osvers="$2.$3"
+ fi
+ fi
+ if $test -f $uname; then
+ set X $myuname
+ shift
+
+ case "$5" in
+ fps*) osname=fps ;;
+ mips*)
+ case "$4" in
+ umips) osname=umips ;;
+ *) osname=mips ;;
+ esac;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ news*) osname=news ;;
+ i386*)
+ if $test -f /etc/kconfig; then
+ osname=isc
+ if test "$lns" = "ln -s"; then
+ osvers=4
+ elif $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=3
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ osvers=2
+ fi
+ fi
+ ;;
+ esac
+
+ case "$1" in
+ aix) osname=aix
+ tmp=`( (oslevel) 2>/dev/null || echo "not found") 2>&1`
+ case "$tmp" in
+ 'not found') osvers="$4"."$3" ;;
+ '<3240'|'<>3240') osvers=3.2.0 ;;
+ '=3240'|'>3240'|'<3250'|'<>3250') osvers=3.2.4 ;;
+ '=3250'|'>3250') osvers=3.2.5 ;;
+ *) osvers=$tmp;;
+ esac
+ ;;
+ *dc.osx) osname=dcosx
+ osvers="$3"
+ ;;
+ dnix) osname=dnix
+ osvers="$3"
+ ;;
+ domainos) osname=apollo
+ osvers="$3"
+ ;;
+ dgux) osname=dgux
+ osvers="$3"
+ ;;
+ dynixptx*) osname=dynixptx
+ osvers="$3"
+ ;;
+ freebsd) osname=freebsd
+ osvers="$3" ;;
+ genix) osname=genix ;;
+ hp*) osname=hpux
+ case "$3" in
+ *.08.*) osvers=9 ;;
+ *.09.*) osvers=9 ;;
+ *.10.*) osvers=10 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ irix*) osname=irix
+ case "$3" in
+ 4*) osvers=4 ;;
+ 5*) osvers=5 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ linux) osname=linux
+ case "$3" in
+ 1*) osvers=1 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ netbsd*) osname=netbsd
+ osvers="$3"
+ ;;
+ bsd386) osname=bsd386
+ osvers=`$uname -r`
+ ;;
+ next*) osname=next ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ sunos) osname=sunos
+ case "$3" in
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ titanos) osname=titanos
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
+ *) osvers="$3" ;;
+ esac
+ ;;
+ ultrix) osname=ultrix
+ osvers="$3"
+ ;;
+ osf1|mls+) case "$5" in
+ alpha)
+ osname=dec_osf
+ osvers=`echo "$3" | sed 's/^[vt]//'`
+ ;;
+ hp*) osname=hp_osf1 ;;
+ mips) osname=mips_osf1 ;;
+ esac
+ ;;
+ uts) osname=uts
+ osvers="$3"
+ ;;
+ qnx) osname=qnx
+ osvers="$4"
+ ;;
+ $2) case "$osname" in
+ *isc*) ;;
+ *freebsd*) ;;
+ svr*)
+ : svr4.x or possibly later
+ case "svr$3" in
+ ${osname}*)
+ osname=svr$3
+ osvers=$4
+ ;;
+ esac
+ case "$osname" in
+ svr4.0)
+ : Check for ESIX
+ if test -f /stand/boot ; then
+ eval `grep '^INITPROG=[a-z/0-9]*$' /stand/boot`
+ if test -n "$INITPROG" -a -f "$INITPROG"; then
+ isesix=`strings -a $INITPROG|grep 'ESIX SYSTEM V/386 Release 4.0'`
+ if test -n "$isesix"; then
+ osname=esix4
+ fi
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ *) if test -f /etc/systemid; then
+ osname=sco
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f sco_$1_$2_$3.sh; then
+ osvers=$1.$2.$3
+ elif $test -f sco_$1_$2.sh; then
+ osvers=$1.$2
+ elif $test -f sco_$1.sh; then
+ osvers=$1
+ fi
+ else
+ case "$osname" in
+ '') : Still unknown. Probably a generic Sys V.
+ osname="sysv"
+ osvers="$3"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ *) case "$osname" in
+ '') : Still unknown. Probably a generic BSD.
+ osname="$1"
+ osvers="$3"
+ ;;
+ esac
+ ;;
+ esac
else
- cat <<EOM
+ if test -f /vmunix -a -f $src/hints/news_os.sh; then
+ (what /vmunix | UU/tr '[A-Z]' '[a-z]') > UU/kernel.what 2>&1
+ if $contains news-os UU/kernel.what >/dev/null 2>&1; then
+ osname=news_os
+ fi
+ $rm -f UU/kernel.what
+ elif test -d c:/.; then
+ set X $myuname
+ osname=os2
+ osvers="$5"
+ fi
+ fi
+
+ : Now look for a hint file osname_osvers, unless one has been
+ : specified already.
+ case "$hintfile" in
+ ''|' ')
+ file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+ : Also try without trailing minor version numbers.
+ xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
+ xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
+ xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
+ xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+ case "$file" in
+ '') dflt=none ;;
+ *) case "$osvers" in
+ '') dflt=$file
+ ;;
+ *) if $test -f $src/hints/$file.sh ; then
+ dflt=$file
+ elif $test -f $src/hints/$xfile.sh ; then
+ dflt=$xfile
+ elif $test -f $src/hints/$xxfile.sh ; then
+ dflt=$xxfile
+ elif $test -f $src/hints/$xxxfile.sh ; then
+ dflt=$xxxfile
+ elif $test -f $src/hints/$xxxxfile.sh ; then
+ dflt=$xxxxfile
+ elif $test -f "$src/hints/${osname}.sh" ; then
+ dflt="${osname}"
+ else
+ dflt=none
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ dflt=`echo $hintfile | $sed 's/\.sh$//'`
+ ;;
+ esac
+
+ $cat <<EOM
+
+You may give one or more space-separated answers, or "none" if appropriate.
+If your OS version has no hints, DO NOT give a wrong version -- say "none".
+
+EOM
+ rp="Which of these apply, if any?"
+ . UU/myread
+ tans=$ans
+ for file in $tans; do
+ if $test -f $src/hints/$file.sh; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
+ elif $test X$tans = X -o X$tans = Xnone ; then
+ : nothing
+ else
+ : Give one chance to correct a possible typo.
+ echo "$file.sh does not exist"
+ dflt=$file
+ rp="hint to use instead?"
+ . UU/myread
+ for file in $ans; do
+ if $test -f "$src/hints/$file.sh"; then
+ . $src/hints/$file.sh
+ $cat $src/hints/$file.sh >> UU/config.sh
+ elif $test X$ans = X -o X$ans = Xnone ; then
+ : nothing
+ else
+ echo "$file.sh does not exist -- ignored."
+ fi
+ done
+ fi
+ done
+
+ hint=recommended
+ : Remember our hint file for later.
+ if $test -f "$src/hints/$file.sh" ; then
+ hintfile="$file"
+ else
+ hintfile=''
+ fi
+fi
+cd UU
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ tmp_n="$n"
+ tmp_c="$c"
+ cd ..
+ cp $config_sh config.sh 2>/dev/null
+ chmod +w config.sh
+ . ./config.sh
+ cd UU
+ cp ../config.sh .
+ n="$tmp_n"
+ c="$tmp_c"
+ hint=previous
+ ;;
+esac
+test "$override" && . ./optdef.sh
+myuname="$newmyuname"
+
+: Restore computed paths
+for file in $loclist $trylist; do
+ eval $file="\$_$file"
+done
+
+: who configured the system
+cf_time=`$date 2>&1`
+cf_by=`(logname) 2>/dev/null`
+case "$cf_by" in
+"")
+ cf_by=`(whoami) 2>/dev/null`
+ case "$cf_by" in
+ "") cf_by=unknown ;;
+ esac ;;
+esac
+
+: decide how portable to be
+case "$d_portable" in
+"$define") dflt=y;;
+*) dflt=n;;
+esac
+$cat <<'EOH'
-I can't seem to find your C library. I've looked in the following places:
+I can set things up so that your shell scripts and binaries are more portable,
+at what may be a noticable cost in performance. In particular, if you
+ask to be portable, the following happens:
- $libpth
+ 1) Shell scripts will rely on the PATH variable rather than using
+ the paths derived above.
+ 2) ~username interpretations will be done at run time rather than
+ by Configure.
+
+EOH
+rp="Do you expect to run these scripts and binaries on multiple machines?"
+. ./myread
+case "$ans" in
+ y*) d_portable="$define"
+ ;;
+ *) d_portable="$undef" ;;
+esac
+
+: set up shell script to do ~ expansion
+cat >filexp <<EOSS
+$startsh
+: expand filename
+case "\$1" in
+ ~/*|~)
+ echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
+ ;;
+ ~*)
+ if $test -f /bin/csh; then
+ /bin/csh -f -c "glob \$1"
+ failed=\$?
+ echo ""
+ exit \$failed
+ else
+ name=\`$expr x\$1 : '..\([^/]*\)'\`
+ dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
+ if $test ! -d "\$dir"; then
+ me=\`basename \$0\`
+ echo "\$me: can't locate home directory for: \$name" >&2
+ exit 1
+ fi
+ case "\$1" in
+ */*)
+ echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
+ ;;
+ *)
+ echo \$dir
+ ;;
+ esac
+ fi
+ ;;
+*)
+ echo \$1
+ ;;
+esac
+EOSS
+chmod +x filexp
+$eunicefix filexp
+
+: now set up to get a file name
+cat <<EOS >getfile
+$startsh
+EOS
+cat <<'EOSC' >>getfile
+tilde=''
+fullpath=''
+already=''
+skip=''
+none_ok=''
+exp_file=''
+nopath_ok=''
+orig_rp="$rp"
+orig_dflt="$dflt"
+
+case "$fn" in
+*\(*)
+ expr $fn : '.*(\(.*\)).*' | tr ',' '\012' >getfile.ok
+ fn=`echo $fn | sed 's/(.*)//'`
+ ;;
+esac
+
+case "$fn" in
+*:*)
+ loc_file=`expr $fn : '.*:\(.*\)'`
+ fn=`expr $fn : '\(.*\):.*'`
+ ;;
+esac
+
+case "$fn" in
+*~*) tilde=true;;
+esac
+case "$fn" in
+*/*) fullpath=true;;
+esac
+case "$fn" in
+*+*) skip=true;;
+esac
+case "$fn" in
+*n*) none_ok=true;;
+esac
+case "$fn" in
+*e*) exp_file=true;;
+esac
+case "$fn" in
+*p*) nopath_ok=true;;
+esac
+
+case "$fn" in
+*f*) type='File';;
+*d*) type='Directory';;
+*l*) type='Locate';;
+esac
+
+what="$type"
+case "$what" in
+Locate) what='File';;
+esac
+
+case "$exp_file" in
+'')
+ case "$d_portable" in
+ "$define") ;;
+ *) exp_file=true;;
+ esac
+ ;;
+esac
+
+cd ..
+while test "$type"; do
+ redo=''
+ rp="$orig_rp"
+ dflt="$orig_dflt"
+ case "$tilde" in
+ true) rp="$rp (~name ok)";;
+ esac
+ . UU/myread
+ if test -f UU/getfile.ok && \
+ $contains "^$ans\$" UU/getfile.ok >/dev/null 2>&1
+ then
+ value="$ans"
+ ansexp="$ans"
+ break
+ fi
+ case "$ans" in
+ none)
+ value=''
+ ansexp=''
+ case "$none_ok" in
+ true) type='';;
+ esac
+ ;;
+ *)
+ case "$tilde" in
+ '') value="$ans"
+ ansexp="$ans";;
+ *)
+ value=`UU/filexp $ans`
+ case $? in
+ 0)
+ if test "$ans" != "$value"; then
+ echo "(That expands to $value on this system.)"
+ fi
+ ;;
+ *) value="$ans";;
+ esac
+ ansexp="$value"
+ case "$exp_file" in
+ '') value="$ans";;
+ esac
+ ;;
+ esac
+ case "$fullpath" in
+ true)
+ case "$ansexp" in
+ /*) value="$ansexp" ;;
+ *)
+ redo=true
+ case "$already" in
+ true)
+ echo "I shall only accept a full path name, as in /bin/ls." >&4
+ echo "Use a ! shell escape if you wish to check pathnames." >&4
+ ;;
+ *)
+ echo "Please give a full path name, starting with slash." >&4
+ case "$tilde" in
+ true)
+ echo "Note that using ~name is ok provided it expands well." >&4
+ already=true
+ ;;
+ esac
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$redo" in
+ '')
+ case "$type" in
+ File)
+ if test -f "$ansexp"; then
+ type=''
+ elif test -r "$ansexp" || (test -h "$ansexp") >/dev/null 2>&1
+ then
+ echo "($value is not a plain file, but that's ok.)"
+ type=''
+ fi
+ ;;
+ Directory)
+ if test -d "$ansexp"; then
+ type=''
+ fi
+ ;;
+ Locate)
+ if test -d "$ansexp"; then
+ echo "(Looking for $loc_file in directory $value.)"
+ value="$value/$loc_file"
+ ansexp="$ansexp/$loc_file"
+ fi
+ if test -f "$ansexp"; then
+ type=''
+ fi
+ case "$nopath_ok" in
+ true) case "$value" in
+ */*) ;;
+ *) echo "Assuming $value will be in people's path."
+ type=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+
+ case "$skip" in
+ true) type='';
+ esac
+
+ case "$type" in
+ '') ;;
+ *)
+ if test "$fastread" = yes; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ rp="$what $value doesn't exist. Use that name anyway?"
+ . UU/myread
+ dflt=''
+ case "$ans" in
+ y*) type='';;
+ *) echo " ";;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+done
+cd UU
+ans="$value"
+rp="$orig_rp"
+dflt="$orig_dflt"
+rm -f getfile.ok
+EOSC
+
+: determine root of directory hierarchy where package will be installed.
+case "$prefix" in
+'')
+ dflt=`./loc . /usr/local /usr/local /local /opt /usr`
+ ;;
+*)
+ dflt="$prefix"
+ ;;
+esac
+$cat <<EOM
+
+By default, $package will be installed in $dflt/bin, manual
+pages under $dflt/man, etc..., i.e. with $dflt as prefix for
+all installation directories. Typically set to /usr/local, but you
+may choose /usr if you wish to install $package among your system
+binaries. If you wish to have binaries under /bin but manual pages
+under /usr/local/man, that's ok: you will be prompted separately
+for each of the installation directories, the prefix being only used
+to set the defaults.
-None of these seems to contain your C library. What is the full name
EOM
- dflt=None
- $echo $n "of your C library? $c"
- rp='C library full name?'
- . myread
- libc="$ans"
+fn=d~
+rp='Installation prefix to use?'
+. ./getfile
+oldprefix=''
+case "$prefix" in
+'') ;;
+*)
+ case "$ans" in
+ "$prefix") ;;
+ *) oldprefix="$prefix";;
+ esac
+ ;;
+esac
+prefix="$ans"
+prefixexp="$ansexp"
+
+: 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'
+
+: is AFS running?
+echo " "
+case "$afs" in
+$define|true) afs=true ;;
+$undef|false) afs=false ;;
+*) if test -d /afs; then
+ afs=true
+ else
+ afs=false
fi
- fi
+ ;;
+esac
+if $afs; then
+ echo "AFS may be running... I'll be extra cautious then..." >&4
+else
+ echo "AFS does not seem to be running..." >&4
fi
+
+: determine where public executables go
echo " "
-$echo $n "Extracting names from $libc for later perusal...$c"
-if ar t $libc > libc.list; then
- echo "done"
+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
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+executables reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installbin" in
+ '') dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installbin";;
+ esac
+ fn=de~
+ rp='Where will public executables be installed?'
+ . ./getfile
+ installbin="$ans"
else
- echo " "
- echo "The archiver doesn't think $libc is a reasonable library."
- echo "Trying nm instead..."
- if nm -g $libc > libc.list; then
- echo "Done. Maybe this is Unicos, or an Apollo?"
- else
- echo "That didn't work either. Giving up."
- exit 1
- fi
+ installbin="$binexp"
fi
-rmlist="$rmlist libc.list"
+
+: set the prefixup variable, to restore leading tilda escape
+prefixup='case "$prefixexp" in
+"$prefix") ;;
+*) eval "$1=\`echo \$$1 | sed \"s,^$prefixexp,$prefix,\"\`";;
+esac'
+
+: 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 " "
+fn=d~
+rp='Where do you want to put the public libraries?'
+. ./getfile
+lib="$ans"
+libexp="$ansexp"
+
+: determine where manual pages are on this system
+echo " "
+case "$sysman" in
+'')
+ syspath='/usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1'
+ syspath="$syspath /usr/man/u_man/man1 /usr/share/man/man1"
+ syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
+ syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
+ sysman=`./loc . /usr/man/man1 $syspath`
+ ;;
+esac
+if $test -d "$sysman"; then
+ echo "System manual is in $sysman." >&4
+else
+ echo "Could not find manual pages in source form." >&4
+fi
+
+: determine where manual pages go
+set mansrc mansrc none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages available in source form.
+EOM
+case "$nroff" in
+nroff)
+ echo "However, you don't have nroff, so they're probably useless to you."
+ case "$mansrc" in
+ '') mansrc="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$mansrc" in
+'')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/man1 /opt/man/man1 /usr/man/manl"
+ lookpath="$lookpath /usr/man/local/man1 /usr/man/l_man/man1"
+ lookpath="$lookpath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
+ lookpath="$lookpath /usr/man/man.L"
+ mansrc=`./loc . $prefixexp/man/man1 $lookpath`
+ if $test -d "$mansrc"; then
+ dflt="$mansrc"
+ else
+ dflt="$sysman"
+ fi
+ set dflt
+ eval $prefixup
+ ;;
+' ') dflt=none;;
+*) dflt="$mansrc"
+ ;;
+esac
+echo " "
+fn=dn~
+rp='Where do the manual pages (source) go?'
+. ./getfile
+if test "X$mansrcexp" != "X$ansexp"; then
+ installmansrc=''
+fi
+mansrc="$ans"
+mansrcexp="$ansexp"
+case "$mansrc" in
+'') mansrc=' '
+ installmansrc='';;
+esac
+if $afs && $test "$mansrc"; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installmansrc" in
+ '') dflt=`echo $mansrcexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installmansrc";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installmansrc="$ans"
+else
+ installmansrc="$mansrcexp"
+fi
+
+case "$mansrc" in
+' ') manext='0';;
+*l) manext=l;;
+*n) manext=n;;
+*o) manext=l;;
+*p) manext=n;;
+*C) manext=C;;
+*L) manext=L;;
+*L1) manext=L1;;
+*) manext=1;;
+esac
+
+: see what memory models we can support
+case "$models" in
+'')
+ $cat >pdp11.c <<'EOP'
+main() {
+#ifdef pdp11
+ exit(0);
+#else
+ exit(1);
+#endif
+}
+EOP
+ cc -o pdp11 pdp11.c >/dev/null 2>&1
+ if ./pdp11 2>/dev/null; then
+ dflt='unsplit split'
+ else
+ tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
+ case "$tans" in
+ X) dflt='none';;
+ *) if $test -d /lib/small || $test -d /usr/lib/small; then
+ dflt='small'
+ else
+ dflt=''
+ fi
+ if $test -d /lib/medium || $test -d /usr/lib/medium; then
+ dflt="$dflt medium"
+ fi
+ if $test -d /lib/large || $test -d /usr/lib/large; then
+ dflt="$dflt large"
+ fi
+ if $test -d /lib/huge || $test -d /usr/lib/huge; then
+ dflt="$dflt huge"
+ fi
+ esac
+ fi;;
+*) dflt="$models";;
+esac
+$cat <<EOM
+
+Some systems have different model sizes. On most systems they are called
+small, medium, large, and huge. On the PDP11 they are called unsplit and
+split. If your system doesn't support different memory models, say "none".
+If you wish to force everything to one memory model, say "none" here and
+put the appropriate flags later when it asks you for other cc and ld flags.
+Venix systems may wish to put "none" and let the compiler figure things out.
+(In the following question multiple model names should be space separated.)
+
+EOM
+rp="Which memory models are supported?"
+. ./myread
+models="$ans"
+
+case "$models" in
+none)
+ small=''
+ medium=''
+ large=''
+ huge=''
+ unsplit=''
+ split=''
+ ;;
+*split)
+ case "$split" in
+ '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
+ $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
+ dflt='-i'
+ else
+ dflt='none'
+ fi;;
+ *) dflt="$split";;
+ esac
+ rp="What flag indicates separate I and D space?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';;
+ esac
+ split="$tans"
+ unsplit='';;
+*large*|*small*|*medium*|*huge*)
+ case "$models" in
+ *large*)
+ case "$large" in
+ '') dflt='-Ml';;
+ *) dflt="$large";;
+ esac
+ rp="What flag indicates large model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ large="$tans";;
+ *) large='';;
+ esac
+ case "$models" in
+ *huge*) case "$huge" in
+ '') dflt='-Mh';;
+ *) dflt="$huge";;
+ esac
+ rp="What flag indicates huge model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ huge="$tans";;
+ *) huge="$large";;
+ esac
+ case "$models" in
+ *medium*) case "$medium" in
+ '') dflt='-Mm';;
+ *) dflt="$medium";;
+ esac
+ rp="What flag indicates medium model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ medium="$tans";;
+ *) medium="$large";;
+ esac
+ case "$models" in
+ *small*) case "$small" in
+ '') dflt='none';;
+ *) dflt="$small";;
+ esac
+ rp="What flag indicates small model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ small="$tans";;
+ *) small='';;
+ esac
+ ;;
+*)
+ echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4
+ ;;
+esac
: make some quick guesses about what we are up against
echo " "
$echo $n "Hmm... $c"
-if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then
- echo "Looks kind of like a BSD system, but we'll see..."
- echo exit 0 >bsd
- echo exit 1 >usg
- echo exit 1 >v7
-elif $contains fcntl libc.list >/dev/null 2>&1 ; then
- echo "Looks kind of like a USG system, but we'll see..."
- echo exit 1 >bsd
- echo exit 0 >usg
- echo exit 1 >v7
+echo exit 1 >bsd
+echo exit 1 >usg
+echo exit 1 >v7
+echo exit 1 >osf1
+echo exit 1 >eunice
+echo exit 1 >xenix
+echo exit 1 >venix
+echo exit 1 >os2
+d_bsd="$undef"
+$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
+if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
+then
+ echo "Looks kind of like an OSF/1 system, but we'll see..."
+ echo exit 0 >osf1
+elif test `echo abc | tr a-z A-Z` = Abc ; then
+ xxx=`./loc addbib blurfl $pth`
+ if $test -f $xxx; then
+ echo "Looks kind of like a USG system with BSD features, but we'll see..."
+ echo exit 0 >bsd
+ echo exit 0 >usg
+ else
+ if $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like an extended USG system, but we'll see..."
+ else
+ echo "Looks kind of like a USG system, but we'll see..."
+ fi
+ echo exit 0 >usg
+ fi
+elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like a BSD system, but we'll see..."
+ d_bsd="$define"
+ echo exit 0 >bsd
else
- echo "Looks kind of like a version 7 system, but we'll see..."
- echo exit 1 >bsd
- echo exit 1 >usg
- echo exit 0 >v7
+ echo "Looks kind of like a Version 7 system, but we'll see..."
+ echo exit 0 >v7
fi
-if $contains vmssystem libc.list >/dev/null 2>&1 ; then
- cat <<'EOI'
+case "$eunicefix" in
+*unixtovms*)
+ $cat <<'EOI'
There is, however, a strange, musty smell in the air that reminds me of
something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
EOI
- echo "exit 0" >eunice
- eunicefix=unixtovms
- d_eunice="$define"
+ echo exit 0 >eunice
+ d_eunice="$define"
: it so happens the Eunice I know will not run shell scripts in Unix format
-else
- echo " "
- echo "Congratulations. You aren't running Eunice."
- eunicefix=':'
- d_eunice="$undef"
- echo "exit 1" >eunice
-fi
+ ;;
+*)
+ echo " "
+ echo "Congratulations. You aren't running Eunice."
+ d_eunice="$undef"
+ ;;
+esac
+case "$p_" in
+:) ;;
+*)
+ $cat <<'EOI'
+I have the feeling something is not exactly right, however...don't tell me...
+lemme think...does HAL ring a bell?...no, of course, you're only running OS/2!
+EOI
+ echo exit 0 >os2
+ ;;
+esac
if test -f /xenix; then
- echo "Actually, this looks more like a XENIX system..."
- echo "exit 0" >xenix
+ echo "Actually, this looks more like a XENIX system..."
+ echo exit 0 >xenix
+ d_xenix="$define"
else
- echo " "
- echo "It's not Xenix..."
- echo "exit 1" >xenix
+ echo " "
+ echo "It's not Xenix..."
+ d_xenix="$undef"
fi
-chmod 755 xenix
+chmod +x xenix
+$eunicefix xenix
if test -f /venix; then
- echo "Actually, this looks more like a VENIX system..."
- echo "exit 0" >venix
+ echo "Actually, this looks more like a VENIX system..."
+ echo exit 0 >venix
else
- echo " "
- if xenix; then
- : null
- else
- echo "Nor is it Venix..."
- fi
- echo "exit 1" >venix
+ echo " "
+ if ./xenix; then
+ : null
+ else
+ echo "Nor is it Venix..."
+ fi
fi
-chmod 755 bsd usg v7 eunice venix xenix
-$eunicefix bsd usg v7 eunice venix xenix
-rmlist="$rmlist bsd usg v7 eunice venix xenix"
+chmod +x bsd usg v7 osf1 eunice xenix venix os2
+$eunicefix bsd usg v7 osf1 eunice xenix venix os2
+$rm -f foo
-: see if sh knows # comments
+: see if we need a special compiler
echo " "
-echo "Checking your sh to see if it knows about # comments..."
-if sh -c '#' >/dev/null 2>&1 ; then
- echo "Your sh handles # comments correctly."
- shsharp=true
- spitshell=cat
- echo " "
- echo "Okay, let's see if #! works on this system..."
- echo "#!/bin/echo hi" > try
- $eunicefix try
- chmod 755 try
- try > today
- if test -s today; then
- echo "It does."
- sharpbang='#!'
- else
- echo "#! /bin/echo hi" > try
- $eunicefix try
- chmod 755 try
- try > today
- if test -s today; then
- echo "It does."
- sharpbang='#! '
+if ./usg; then
+ case "$cc" in
+ '') case "$Mcc" in
+ /*) dflt='Mcc';;
+ *) case "$large" in
+ -M*) dflt='cc';;
+ *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
+ if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
+ dflt='cc'
+ else
+ dflt='cc -M'
+ fi
+ else
+ dflt='cc'
+ fi;;
+ esac;;
+ esac;;
+ *) dflt="$cc";;
+ esac
+ $cat <<'EOM'
+On some systems the default C compiler will not resolve multiple global
+references that happen to have the same name. On some such systems the "Mcc"
+command may be used to force these to be resolved. On other systems a "cc -M"
+command is required. (Note that the -M flag on other systems indicates a
+memory model to use!) If you have the Gnu C compiler, you might wish to use
+that instead.
+
+EOM
+ rp="What command will force resolution on this system?"
+ . ./myread
+ cc="$ans"
+else
+ case "$cc" in
+ '') dflt=cc;;
+ *) dflt="$cc";;
+ esac
+ rp="Use which C compiler?"
+ . ./myread
+ cc="$ans"
+fi
+echo " "
+echo "Checking for GNU cc in disguise and/or its version number..." >&4
+$cat >gccvers.c <<EOM
+#include <stdio.h>
+int main() {
+#ifdef __GNUC__
+#ifdef __VERSION__
+ printf("%s\n", __VERSION__);
+#else
+ printf("%s\n", "1");
+#endif
+#endif
+ exit(0);
+}
+EOM
+if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
+ gccversion=`./gccvers`
+ case "$gccversion" in
+ '') echo "You are not using GNU cc." ;;
+ *) echo "You are using GNU cc $gccversion." ;;
+ esac
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
+ '')
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
+fi
+$rm -f gccvers*
+case "$gccversion" in
+1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
+esac
+
+: What should the include directory be ?
+echo " "
+$echo $n "Hmm... $c"
+dflt='/usr/include'
+incpath=''
+mips_type=''
+if $test -f /bin/mips && /bin/mips; then
+ echo "Looks like a MIPS system..."
+ $cat >usr.c <<'EOCP'
+#ifdef SYSTYPE_BSD43
+/bsd43
+#endif
+EOCP
+ if $cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then
+ dflt='/bsd43/usr/include'
+ incpath='/bsd43'
+ mips_type='BSD 4.3'
else
- echo "It doesn't."
- sharpbang=': use '
+ mips_type='System V'
fi
- fi
+ $rm -f usr.c usr.out
+ echo "and you're compiling with the $mips_type compiler and libraries."
+ xxx_prompt=y
+ echo "exit 0" >mips
else
- echo "Your sh doesn't grok # comments--I will strip them later on."
- shsharp=false
- echo "exec grep -v '^#'" >spitshell
- chmod 755 spitshell
- $eunicefix spitshell
- spitshell=`pwd`/spitshell
- echo "I presume that if # doesn't work, #! won't work either!"
- sharpbang=': use '
+ echo "Doesn't look like a MIPS system."
+ xxx_prompt=n
+ echo "exit 1" >mips
fi
+chmod +x mips
+$eunicefix mips
+case "$usrinc" in
+'') ;;
+*) dflt="$usrinc";;
+esac
+case "$xxx_prompt" in
+y) fn=d/
+ echo " "
+ rp='Where are the include files you want to use?'
+ . ./getfile
+ usrinc="$ans"
+ ;;
+*) usrinc="$dflt"
+ ;;
+esac
-: figure out how to guarantee sh startup
+: Set private lib path
+case "$plibpth" in
+'') if ./mips; then
+ plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ fi;;
+esac
+case "$libpth" in
+' ') dlist='';;
+'') dlist="$loclibpth $plibpth $glibpth";;
+*) dlist="$libpth";;
+esac
+
+: Now check and see which directories actually exist, avoiding duplicates
+libpth=''
+for xxx in $dlist
+do
+ if $test -d $xxx; then
+ case " $libpth " in
+ *" $xxx "*) ;;
+ *) libpth="$libpth $xxx";;
+ esac
+ fi
+done
+$cat <<'EOM'
+
+Some systems have incompatible or broken versions of libraries. Among
+the directories listed in the question below, please remove any you
+know not to be holding relevant libraries, and add any that are needed.
+Say "none" for none.
+
+EOM
+case "$libpth" in
+'') dflt='none';;
+*)
+ set X $libpth
+ shift
+ dflt=${1+"$@"}
+ ;;
+esac
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
+esac
+
+: compute shared library extension
+case "$so" in
+'')
+ if xxx=`./loc libc.sl X $libpth`; $test -f "$xxx"; then
+ dflt='sl'
+ else
+ dflt='so'
+ fi
+ ;;
+*) dflt="$so";;
+esac
+$cat <<EOM
+
+On some systems, shared libraries may be available. Answer 'none' if
+you want to suppress searching of shared libraries for the remaining
+of this configuration.
+
+EOM
+rp='What is the file extension used for shared libraries?'
+. ./myread
+so="$ans"
+
+: Define several unixisms.
+: Hints files or command line option can be used to override them.
+case "$_a" in
+'') _a='.a';;
+esac
+case "$_o" in
+'') _o='.o';;
+esac
+
+: Looking for optional libraries
echo " "
-echo "Checking out how to guarantee sh startup..."
-startsh=$sharpbang'/bin/sh'
-echo "Let's see if '$startsh' works..."
-cat >try <<EOSS
+echo "Checking for optional libraries..." >&4
+case "$libs" in
+' '|'') dflt='';;
+*) dflt="$libs";;
+esac
+case "$libswanted" in
+'') libswanted='c_s';;
+esac
+for thislib in $libswanted; do
+
+ if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib (shared)."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
+ echo "Found -l$thislib (shared)."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
+ echo "Found -l${thislib}_s."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l${thislib}_s";;
+ esac
+ elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
+ echo "Found -l$thislib."
+ case " $dflt " in
+ *"-l$thislib "*);;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ else
+ echo "No -l$thislib."
+ fi
+done
+set X $dflt
+shift
+dflt="$*"
+case "$libs" in
+'') dflt="$dflt";;
+*) dflt="$libs";;
+esac
+case "$dflt" in
+' '|'') dflt='none';;
+esac
+
+$cat <<EOM
+
+Some versions of Unix support shared libraries, which make executables smaller
+but make load time slightly longer.
+
+On some systems, mostly System V Release 3's, the shared library is included
+by putting the option "-lc_s" as the last thing on the 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 " "
+rp="Any additional libraries?"
+. ./myread
+case "$ans" in
+none) libs=' ';;
+*) libs="$ans";;
+esac
+
+: set up the script used to warn in case of inconsistency
+cat <<EOS >whoa
$startsh
-set abc
-test "$?abc" != 1
-EOSS
+EOS
+cat <<'EOSC' >>whoa
+dflt=y
+echo " "
+echo "*** WHOA THERE!!! ***" >&4
+echo " The $hint value for \$$var on this machine was \"$was\"!" >&4
+rp=" Keep the $hint value?"
+. ./myread
+case "$ans" in
+y) td=$was; tu=$was;;
+esac
+EOSC
-chmod 755 try
-$eunicefix try
-if try; then
- echo "Yup, it does."
-else
- echo "Nope. You may have to fix up the shell scripts to make sure sh runs them."
-fi
-rm -f try today
+: function used to set $1 to $val
+setvar='var=$1; eval "was=\$$1"; td=$define; tu=$undef;
+case "$val$was" in
+$define$undef) . ./whoa; eval "$var=\$td";;
+$undef$define) . ./whoa; eval "$var=\$tu";;
+*) eval "$var=$val";;
+esac'
: see how we invoke the C preprocessor
echo " "
-echo "Now, how can we feed standard input to your C preprocessor..."
+echo "Now, how can we feed standard input to your C preprocessor..." >&4
cat <<'EOT' >testcpp.c
#define ABC abc
#define XYZ xyz
ABC.XYZ
EOT
-echo 'Maybe "/lib/cpp" will work...'
-/lib/cpp <testcpp.c >testcpp.out 2>&1
-if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- cpp='/lib/cpp'
- cppminus='';
+cd ..
+echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+chmod 755 cppstdin
+wrapper=`pwd`/cppstdin
+ok='false'
+cd UU
+
+if $test "X$cppstdin" != "X" && \
+ $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+then
+ echo "You used to use $cppstdin $cppminus so we'll use that again."
+ case "$cpprun" in
+ '') echo "But let's see if we can live without a wrapper..." ;;
+ *)
+ if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
+ ok='true'
+ else
+ echo "(However, $cpprun $cpplast does not work, let's see...)"
+ fi
+ ;;
+ esac
else
- echo 'Nope, maybe "/lib/cpp -" will work...'
- /lib/cpp - <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
+ case "$cppstdin" in
+ '') ;;
+ *)
+ echo "Good old $cppstdin $cppminus does not seem to be of any help..."
+ ;;
+ esac
+fi
+
+if $ok; then
+ : nothing
+elif echo 'Maybe "'"$cc"' -E" will work...'; \
+ $cc -E <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yup, it does."
+ x_cpp="$cc -E"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
+ $cc -E - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
echo "Yup, it does."
- cpp='/lib/cpp'
- cppminus='-';
- else
- echo 'No such luck...maybe "cc -E" will work...'
- cc -E <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "It works!"
- cpp='cc -E'
- cppminus='';
+ x_cpp="$cc -E"
+ x_minus='-';
+elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
+ $cc -P <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Yipee, that works!"
+ x_cpp="$cc -P"
+ x_minus='';
+elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
+ $cc -P - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "At long last!"
+ x_cpp="$cc -P"
+ x_minus='-';
+elif echo 'No such luck, maybe "'$cpp'" will work...'; \
+ $cpp <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "It works!"
+ x_cpp="$cpp"
+ x_minus='';
+elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
+ $cpp - <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "Hooray, it works! I was beginning to wonder."
+ x_cpp="$cpp"
+ x_minus='-';
+elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
+ $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ x_cpp="$wrapper"
+ x_minus=''
+ echo "Eureka!"
+else
+ dflt=''
+ rp="No dice. I can't find a C preprocessor. Name one:"
+ . ./myread
+ x_cpp="$ans"
+ x_minus=''
+ $x_cpp <testcpp.c >testcpp.out 2>&1
+ if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
+ echo "OK, that will do." >&4
else
- echo 'Nixed again...maybe "cc -E -" will work...'
- cc -E - <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Hooray, it works! I was beginning to wonder."
- cpp='cc -E'
- cppminus='-';
- else
- echo 'Nope...maybe "cc -P" will work...'
- cc -P <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, that does."
- cpp='cc -P'
- cppminus='';
+echo "Sorry, I can't get that to work. Go find one and rerun Configure." >&4
+ exit 1
+ fi
+fi
+
+case "$ok" in
+false)
+ cppstdin="$x_cpp"
+ cppminus="$x_minus"
+ cpprun="$x_cpp"
+ cpplast="$x_minus"
+ set X $x_cpp
+ shift
+ case "$1" in
+ "$cpp")
+ echo "Perhaps can we force $cc -E using a wrapper..."
+ if $wrapper <testcpp.c >testcpp.out 2>&1; \
+ $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
+ then
+ echo "Yup, we can."
+ cppstdin="$wrapper"
+ cppminus='';
else
- echo 'Nope...maybe "cc -P -" will work...'
- cc -P - <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, that does."
- cpp='cc -P'
- cppminus='-';
- else
- echo 'Hmm...perhaps you already told me...'
- case "$cpp" in
- '') ;;
- *) $cpp $cppminus <testcpp.c >testcpp.out 2>&1;;
+ echo "Nope, we'll have to live without it..."
+ fi
+ ;;
+ esac
+ case "$cpprun" in
+ "$wrapper")
+ cpprun=''
+ cpplast=''
+ ;;
+ esac
+ ;;
+esac
+
+case "$cppstdin" in
+"$wrapper") ;;
+*) $rm -f $wrapper;;
+esac
+$rm -f testcpp.c testcpp.out
+
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' ') dflt='none';;
+'') dflt='-O';;
+*) dflt="$optimize";;
+esac
+$cat <<EOH
+
+Some C compilers have problems with their optimizers. By default, $package
+compiles with the -O flag to use the optimizer. Alternately, you might want
+to use the symbolic debugger, which uses the -g flag (on traditional Unix
+systems). Either flag can be specified here. To use neither flag, specify
+the word "none".
+
+EOH
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+case "$optimize" in
+'none') optimize=" ";;
+esac
+
+dflt=''
+: We will not override a previous value, but we might want to
+: augment a hint file
+case "$hint" in
+none|recommended)
+ case "$gccversion" in
+ 1*) dflt='-fpcc-struct-return' ;;
+ esac
+ case "$optimize" in
+ *-g*) dflt="$dflt -DDEBUGGING";;
+ esac
+ case "$gccversion" in
+ 2*) if test -d /etc/conf/kconfig.d &&
+ $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+ then
+ dflt="$dflt -posix"
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+case "$mips_type" in
+*BSD*|'') inclwanted="$locincpth $usrinc";;
+*) inclwanted="$locincpth $inclwanted $usrinc/bsd";;
+esac
+for thisincl in $inclwanted; do
+ if $test -d $thisincl; then
+ if $test x$thisincl != x$usrinc; then
+ case "$dflt" in
+ *$thisincl*);;
+ *) dflt="$dflt -I$thisincl";;
esac
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Hooray, you did! I was beginning to wonder."
+ fi
+ fi
+done
+
+inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+ xxx=true;
+elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+ xxx=true;
+else
+ xxx=false;
+fi;
+if $xxx; then
+ case "$dflt" in
+ *$2*);;
+ *) dflt="$dflt -D$2";;
+ esac;
+fi'
+
+if ./osf1; then
+ set signal.h __LANGUAGE_C__; eval $inctest
+else
+ set signal.h LANGUAGE_C; eval $inctest
+fi
+
+case "$hint" in
+none|recommended) dflt="$ccflags $dflt" ;;
+*) dflt="$ccflags";;
+esac
+
+case "$dflt" in
+''|' ') dflt=none;;
+esac
+$cat <<EOH
+
+Your C compiler may want other flags. For this question you should include
+-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+but you should NOT include libraries or ld flags like -lwhatever. If you
+want $package to honor its debug switch, you should include -DDEBUG here.
+
+To use no flags, specify the word "none".
+
+EOH
+set X $dflt
+shift
+dflt=${1+"$@"}
+rp="Any additional cc flags?"
+. ./myread
+case "$ans" in
+none) ccflags='';;
+*) ccflags="$ans";;
+esac
+
+: the following weeds options from ccflags that are of no interest to cpp
+cppflags="$ccflags"
+case "$gccversion" in
+1*) cppflags="$cppflags -D__GNUC__"
+esac
+case "$mips_type" in
+'');;
+*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+esac
+case "$cppflags" in
+'');;
+*)
+ echo " "
+ echo "Let me guess what the preprocessor flags are..." >&4
+ set X $cppflags
+ shift
+ cppflags=''
+ $cat >cpp.c <<'EOM'
+#define BLURFL foo
+
+BLURFL xx LFRULB
+EOM
+ previous=''
+ for flag in $*
+ do
+ case "$flag" in
+ -*) ftry="$flag";;
+ *) ftry="$previous $flag";;
+ esac
+ if $cppstdin -DLFRULB=bar $ftry $cppminus <cpp.c \
+ >cpp1.out 2>/dev/null && \
+ $cpprun -DLFRULB=bar $ftry $cpplast <cpp.c \
+ >cpp2.out 2>/dev/null && \
+ $contains 'foo.*xx.*bar' cpp1.out >/dev/null 2>&1 && \
+ $contains 'foo.*xx.*bar' cpp2.out >/dev/null 2>&1
+ then
+ cppflags="$cppflags $ftry"
+ previous=''
+ else
+ previous="$flag"
+ fi
+ done
+ set X $cppflags
+ shift
+ cppflags=${1+"$@"}
+ case "$cppflags" in
+ *-*) echo "They appear to be: $cppflags";;
+ esac
+ $rm -f cpp.c cpp?.out
+ ;;
+esac
+
+: flags used in final linking phase
+case "$ldflags" in
+'') if ./venix; then
+ dflt='-i -z'
+ else
+ dflt=''
+ fi
+ case "$ccflags" in
+ *-posix*) dflt="$dflt -posix" ;;
+ esac
+ ;;
+*) dflt="$ldflags";;
+esac
+
+: Try to guess additional flags to pick up local libraries.
+for thislibdir in $libpth; do
+ case " $loclibpth " in
+ *" $thislibdir "*)
+ case "$dflt " in
+ *"-L$thislibdir "*) ;;
+ *) dflt="$dflt -L$thislibdir" ;;
+ esac
+ ;;
+ esac
+done
+
+case "$dflt" in
+'') dflt='none' ;;
+esac
+
+$cat <<EOH
+
+Your C linker may need flags. For this question you should
+include -L/whatever and any other flags used by the C linker, but you
+should NOT include libraries like -lwhatever.
+
+Make sure you include the appropriate -L/path flags if your C linker
+does not normally search all of the directories you specified above,
+namely
+ $libpth
+To use no flags, specify the word "none".
+
+EOH
+
+rp="Any additional ld flags (NOT including libraries)?"
+. ./myread
+case "$ans" in
+none) ldflags='';;
+*) ldflags="$ans";;
+esac
+rmlist="$rmlist pdp11"
+
+: coherency check
+echo " "
+echo "Checking your choice of C compiler and flags for coherency..." >&4
+set X $cc $optimize $ccflags $ldflags try.c -o try
+shift
+$cat >try.msg <<EOM
+I've tried to compile and run a simple program with:
+
+ $*
+ ./try
+
+and I got the following output:
+
+EOM
+$cat > try.c <<'EOF'
+#include <stdio.h>
+main() { exit(0); }
+EOF
+dflt=y
+if sh -c "$cc $optimize $ccflags try.c -o try $ldflags" >>try.msg 2>&1; then
+ if sh -c './try' >>try.msg 2>&1; then
+ dflt=n
+ else
+ echo "The program compiled OK, but exited with status $?." >>try.msg
+ rp="You have a problem. Shall I abort Configure"
+ dflt=y
+ fi
+else
+ echo "I can't compile the test program." >>try.msg
+ rp="You have a BIG problem. Shall I abort Configure"
+ dflt=y
+fi
+case "$dflt" in
+y)
+ $cat try.msg
+ case "$knowitall" in
+ '')
+ echo "(The supplied flags might be incorrect with this C compiler.)"
+ ;;
+ *) dflt=n;;
+ esac
+ echo " "
+ . ./myread
+ case "$ans" in
+ n*|N*) ;;
+ *) echo "Ok. Stopping Configure." >&4
+ exit 1
+ ;;
+ esac
+ ;;
+n) echo "OK, that should do.";;
+esac
+$rm -f try try.* core
+
+echo " "
+echo "Checking for GNU C Library..." >&4
+cat >gnulibc.c <<EOM
+int
+main()
+{
+ return __libc_main();
+}
+EOM
+if $cc $ccflags $ldflags -o gnulibc gnulibc.c $libs >/dev/null 2>&1 && \
+ ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+ val="$define"
+ echo "You are using the GNU C Library"
+else
+ val="$undef"
+ echo "You are not using the GNU C Library"
+fi
+$rm -f gnulibc*
+set d_gnulibc
+eval $setvar
+
+: see if nm is to be used to determine whether a symbol is defined or not
+case "$usenm" in
+'')
+ case "$d_gnulibc" in
+ $define)
+ dflt=n
+ ;;
+ *)
+ dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+ if $test $dflt -gt 20; then
+ dflt=y
+ else
+ dflt=n
+ fi
+ ;;
+ esac
+ ;;
+*)
+ case "$usenm" in
+ true) dflt=y;;
+ *) dflt=n;;
+ esac
+ ;;
+esac
+$cat <<EOM
+
+I can use 'nm' to extract the symbols from your C libraries. This is a time
+consuming task which may generate huge output on the disk (up to 3 megabytes)
+but that should make the symbols extraction faster. The alternative is to skip
+the 'nm' extraction part and to compile a small test program instead to
+determine whether each symbol is present. If you have a fast C compiler and/or
+if your 'nm' output cannot be parsed, this may be the best solution.
+You shouldn't let me use 'nm' if you have the GNU C Library.
+
+EOM
+rp='Shall I use nm to extract C symbols from the libraries?'
+. ./myread
+case "$ans" in
+n|N) usenm=false;;
+*) usenm=true;;
+esac
+
+runnm=$usenm
+case "$reuseval" in
+true) runnm=false;;
+esac
+
+: nm options which may be necessary
+case "$nm_opt" in
+'') if $test -f /mach_boot; then
+ nm_opt=''
+ elif $test -d /usr/ccs/lib; then
+ nm_opt='-p'
+ elif $test -f /dgux; then
+ nm_opt='-p'
+ else
+ nm_opt=''
+ fi;;
+esac
+
+: nm options which may be necessary for shared libraries but illegal
+: for archive libraries. Thank you, Linux.
+case "$nm_so_opt" in
+'') case "$myuname" in
+ *linux*)
+ if nm --help | $grep 'dynamic' > /dev/null 2>&1; then
+ nm_so_opt='--dynamic'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+case "$runnm" in
+true)
+: get list of predefined functions in a handy place
+echo " "
+case "$libc" in
+'') libc=unknown
+ case "$libs" in
+ *-lc_s*) libc=`./loc libc_s$_a $libc $libpth`
+ esac
+ ;;
+esac
+libnames='';
+case "$libs" in
+'') ;;
+*) for thislib in $libs; do
+ case "$thislib" in
+ -lc|-lc_s)
+ : Handle C library specially below.
+ ;;
+ -l*)
+ thislib=`echo $thislib | $sed -e 's/^-l//'`
+ if try=`./loc lib$thislib.$so.'*' X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib$_a X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc $thislib$_a X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
+ :
+ elif try=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$try"; then
+ :
+ else
+ try=''
+ fi
+ libnames="$libnames $try"
+ ;;
+ *) libnames="$libnames $thislib" ;;
+ esac
+ done
+ ;;
+esac
+xxx=normal
+case "$libc" in
+unknown)
+ set /lib/libc.$so
+ for xxx in $libpth; do
+ $test -r $1 || set $xxx/libc.$so
+ $test -r $1 || \
+ set `echo blurfl; echo /usr/lib/libc.$so.[0-9]* | \
+ tr ' ' '\012' | egrep -v '\.[A-Za-z]*$' | $sed -e '
+ h
+ s/[0-9][0-9]*/0000&/g
+ s/0*\([0-9][0-9][0-9][0-9][0-9]\)/\1/g
+ G
+ s/\n/ /' | \
+ sort | $sed -e 's/^.* //'`
+ eval set \$$#
+ done
+ $test -r $1 || set /usr/ccs/lib/libc.$so
+ $test -r $1 || set /lib/libsys_s$_a
+ ;;
+*)
+ set blurfl
+ ;;
+esac
+if $test -r "$1"; then
+ echo "Your (shared) C library seems to be in $1."
+ libc="$1"
+elif $test -r /lib/libc && $test -r /lib/clib; then
+ echo "Your C library seems to be in both /lib/clib and /lib/libc."
+ xxx=apollo
+ libc='/lib/clib /lib/libc'
+ if $test -r /lib/syslib; then
+ echo "(Your math library is in /lib/syslib.)"
+ libc="$libc /lib/syslib"
+ fi
+elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ echo "Your C library seems to be in $libc, as you said before."
+elif $test -r $incpath/usr/lib/libc$_a; then
+ libc=$incpath/usr/lib/libc$_a;
+ echo "Your C library seems to be in $libc. That's fine."
+elif $test -r /lib/libc$_a; then
+ libc=/lib/libc$_a;
+ echo "Your C library seems to be in $libc. You're normal."
+else
+ if tans=`./loc libc$_a blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
+ libnames="$libnames "`./loc clib blurfl/dyick $libpth`
+ elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Slibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Mlibc$_a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ else
+ tans=`./loc Llibc$_a blurfl/dyick $xlibpth`
+ fi
+ if $test -r "$tans"; then
+ echo "Your C library seems to be in $tans, of all places."
+ libc=$tans
+ else
+ libc='blurfl'
+ fi
+fi
+if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ dflt="$libc"
+ cat <<EOM
+
+If the guess above is wrong (which it might be if you're using a strange
+compiler, or your machine supports multiple models), you can override it here.
+
+EOM
+else
+ dflt=''
+ echo $libpth | tr ' ' '\012' | sort | uniq > libpath
+ cat >&4 <<EOM
+I can't seem to find your C library. I've looked in the following places:
+
+EOM
+ $sed 's/^/ /' libpath
+ cat <<EOM
+
+None of these seems to contain your C library. I need to get its name...
+
+EOM
+fi
+fn=f
+rp='Where is your C library?'
+. ./getfile
+libc="$ans"
+
+echo " "
+echo $libc $libnames | tr ' ' '\012' | sort | uniq > libnames
+set X `cat libnames`
+shift
+xxx=files
+case $# in 1) xxx=file; esac
+echo "Extracting names from the following $xxx for later perusal:" >&4
+echo " "
+$sed 's/^/ /' libnames >&4
+echo " "
+$echo $n "This may take a while...$c" >&4
+
+for file in $*; do
+ case $file in
+ *$so*) nm $nm_so_opt $nm_opt $file 2>/dev/null;;
+ *) nm $nm_opt $file 2>/dev/null;;
+ esac
+done >libc.tmp
+
+$echo $n ".$c"
+$grep fprintf libc.tmp > libc.ptf
+xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
+xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
+xxx='[ADTSIW]'
+if com="$sed -n -e 's/__IO//' -e 's/^.* $xxx *_[_.]*//p' -e 's/^.* $xxx *//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
+ -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/.*\.text n\ \ \ \.//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+else
+ nm -p $* 2>/dev/null >libc.tmp
+ $grep fprintf libc.tmp > libc.ptf
+ if com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\
+ eval $xscan; $contains '^fprintf$' libc.list >/dev/null 2>&1
+ then
+ nm_opt='-p'
+ eval $xrun
+ else
+ echo " "
+ echo "nm didn't seem to work right. Trying ar instead..." >&4
+ com=''
+ if ar t $libc > libc.tmp; then
+ for thisname in $libnames; do
+ ar t $thisname >>libc.tmp
+ done
+ $sed -e "s/\\$_o\$//" < libc.tmp > libc.list
+ echo "Ok." >&4
+ else
+ echo "ar didn't seem to work right." >&4
+ echo "Maybe this is a Cray...trying bld instead..." >&4
+ if bld t $libc | $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" > libc.list
+ then
+ for thisname in $libnames; do
+ bld t $libnames | \
+ $sed -e 's/.*\///' -e "s/\\$_o:.*\$//" >>libc.list
+ ar t $thisname >>libc.tmp
+ done
+ echo "Ok." >&4
else
- echo 'Uh-uh. Time to get fancy...'
- echo 'Trying (cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
- cpp='(cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)'
- cppminus='';
- $cpp <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Eureka!."
- else
- dflt=blurfl
- $echo $n "No dice. I can't find a C preprocessor. Name one: $c"
- rp='Name a C preprocessor:'
- . myread
- cpp="$ans"
- $cpp <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "OK, that will do."
- else
- echo "Sorry, I can't get that to work. Go find one."
- exit 1
- fi
- fi
+ echo "That didn't work either. Giving up." >&4
+ exit 1
fi
- fi
fi
- fi
fi
- fi
fi
-rm -f testcpp.c testcpp.out
+nm_extract="$com"
+if $test -f /lib/syscalls.exp; then
+ echo " "
+ echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
+ $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
+fi
+;;
+esac
+$rm -f libnames libpath
+
+: is a C symbol defined?
+csym='tlook=$1;
+case "$3" in
+-v) tf=libc.tmp; tc=""; tdc="";;
+-a) tf=libc.tmp; tc="[0]"; tdc="[]";;
+*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";;
+esac;
+tx=yes;
+case "$reuseval-$4" in
+true-) ;;
+true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;;
+esac;
+case "$tx" in
+yes)
+ case "$runnm" in
+ true)
+ if $contains $tlook $tf >/dev/null 2>&1;
+ then tval=true;
+ else tval=false;
+ fi;;
+ *)
+ echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c;
+ if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1;
+ then tval=true;
+ else tval=false;
+ fi;
+ $rm -f t t.c;;
+ esac;;
+*)
+ case "$tval" in
+ $define) tval=true;;
+ *) tval=false;;
+ esac;;
+esac;
+eval "$2=$tval"'
+
+: define an is-in-libc? function
+inlibc='echo " "; td=$define; tu=$undef;
+sym=$1; var=$2; eval "was=\$$2";
+tx=yes;
+case "$reuseval$was" in
+true) ;;
+true*) tx=no;;
+esac;
+case "$tx" in
+yes)
+ set $sym tres -f;
+ eval $csym;
+ case "$tres" in
+ true)
+ echo "$sym() found." >&4;
+ case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
+ *)
+ echo "$sym() NOT found." >&4;
+ case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
+ esac;;
+*)
+ case "$was" in
+ $define) echo "$sym() found." >&4;;
+ *) echo "$sym() NOT found." >&4;;
+ esac;;
+esac'
: see if bcopy exists
+set bcopy d_bcopy
+eval $inlibc
+
+: see if bzero exists
+set bzero d_bzero
+eval $inlibc
+
+: see if sprintf is declared as int or pointer to char
echo " "
-if $contains bcopy libc.list >/dev/null 2>&1; then
- echo 'bcopy() found.'
- d_bcopy="$define"
+$cat >ucbsprf.c <<'EOF'
+main()
+{
+ int sprintf();
+ char buf[10];
+ exit((unsigned long)sprintf(buf,"%s","foo") > 10L);
+}
+EOF
+if $cc ucbsprf.c -o ucbsprf >/dev/null 2>&1 && ./ucbsprf; then
+ echo "Your sprintf() returns (int)." >&4
+ val="$undef"
else
- echo 'bcopy() not found.'
- d_bcopy="$undef"
+ echo "Your sprintf() returns (char*)." >&4
+ val="$define"
fi
+set d_charsprf
+eval $setvar
+$rm -f ucbsprf*
-: see if sprintf is declared as int or pointer to char
+: see if crypt exists
echo " "
-if $contains 'char.*sprintf' /usr/include/stdio.h >/dev/null 2>&1 ; then
- echo "Your sprintf() returns (char*)."
- d_charsprf="$define"
+if set crypt val -f d_crypt; eval $csym; $val; then
+ echo 'crypt() found.' >&4
+ val="$define"
+ cryptlib=''
else
- echo "Your sprintf() returns (int)."
- d_charsprf="$undef"
+ cryptlib=`./loc Slibcrypt$_a "" $xlibpth`
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Mlibcrypt$_a "" $xlibpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc Llibcrypt$_a "" $xlibpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ cryptlib=`./loc libcrypt$_a "" $libpth`
+ else
+ cryptlib=-lcrypt
+ fi
+ if $test -z "$cryptlib"; then
+ echo 'crypt() NOT found.' >&4
+ val="$undef"
+ else
+ val="$define"
+ fi
fi
+set d_crypt
+eval $setvar
-: see if crypt exists
+: see if rename exists
+set rename d_rename
+eval $inlibc
+
+: see if select exists
+set select d_select
+eval $inlibc
+
+: see if stat exists
+set stat d_stat
+eval $inlibc
+
+: determine filename position in cpp output
echo " "
-if $contains crypt libc.list >/dev/null 2>&1; then
- echo 'crypt() found.'
- d_crypt="$define"
+echo "Computing filename position in cpp output for #include directives..." >&4
+echo '#include <stdio.h>' > foo.c
+$cat >fieldn <<EOF
+$startsh
+$cppstdin $cppflags $cppminus <foo.c 2>/dev/null | \
+$grep '^[ ]*#.*stdio\.h' | \
+while read cline; do
+ pos=1
+ set \$cline
+ while $test \$# -gt 0; do
+ if $test -r \`echo \$1 | $tr -d '"'\`; then
+ echo "\$pos"
+ exit 0
+ fi
+ shift
+ pos=\`expr \$pos + 1\`
+ done
+done
+EOF
+chmod +x fieldn
+fieldn=`./fieldn`
+$rm -f foo.c fieldn
+case $fieldn in
+'') pos='???';;
+1) pos=first;;
+2) pos=second;;
+3) pos=third;;
+*) pos="${fieldn}th";;
+esac
+echo "Your cpp writes the filename in the $pos field of the line."
+
+: locate header file
+$cat >findhdr <<EOF
+$startsh
+wanted=\$1
+name=''
+if test -f $usrinc/\$wanted; then
+ echo "$usrinc/\$wanted"
+ exit 0
+fi
+awkprg='{ print \$$fieldn }'
+echo "#include <\$wanted>" > foo\$\$.c
+$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
+$grep "^[ ]*#.*\$wanted" | \
+while read cline; do
+ name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
+ case "\$name" in
+ */\$wanted) echo "\$name"; exit 0;;
+ *) name='';;
+ esac;
+done;
+$rm -f foo\$\$.c;
+case "\$name" in
+'') exit 1;;
+esac
+EOF
+chmod +x findhdr
+
+: see if stat knows about block sizes
+echo " "
+xxx=`./findhdr sys/stat.h`
+if $contains 'st_blocks;' "$xxx" >/dev/null 2>&1 ; then
+ if $contains 'st_blksize;' "$xxx" >/dev/null 2>&1 ; then
+ echo "Your stat() knows about block sizes." >&4
+ val="$define"
+ else
+ echo "Your stat() doesn't know about block sizes." >&4
+ val="$undef"
+ fi
else
- echo 'crypt() not found.'
- d_crypt="$undef"
+ echo "Your stat() doesn't know about block sizes." >&4
+ val="$undef"
fi
+set d_statblks
+eval $setvar
-: index or strcpy
+: see if _ptr and _cnt from stdio act std
echo " "
-dflt=y
-if $contains index libc.list >/dev/null 2>&1 ; then
- echo "Your system appears to use index() and rindex() rather than strchr()"
- $echo $n "and strrchr(). Is this correct? [$dflt] $c"
- rp='index() rather than strchr()? [$dflt]'
- . myread
- case "$ans" in
- n*|f*) d_index="$define" ;;
- *) d_index="$undef" ;;
- esac
+if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
+ echo "(Looks like you have stdio.h from Linux.)"
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_IO_read_ptr)'
+ ptr_lval=$define
+ ;;
+ *) ptr_lval=$d_stdio_ptr_lval;;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
+ cnt_lval=$undef
+ ;;
+ *) cnt_lval=$d_stdio_cnt_lval;;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_IO_read_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_IO_read_end - (fp)->_IO_read_base)';;
+ esac
+else
+ case "$stdio_ptr" in
+ '') stdio_ptr='((fp)->_ptr)'
+ ptr_lval=$define
+ ;;
+ *) ptr_lval=$d_stdio_ptr_lval;;
+ esac
+ case "$stdio_cnt" in
+ '') stdio_cnt='((fp)->_cnt)'
+ cnt_lval=$define
+ ;;
+ *) cnt_lval=$d_stdio_cnt_lval;;
+ esac
+ case "$stdio_base" in
+ '') stdio_base='((fp)->_base)';;
+ esac
+ case "$stdio_bufsiz" in
+ '') stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)';;
+ esac
+fi
+: test whether _ptr and _cnt really work
+echo "Checking how std your stdio is..." >&4
+$cat >try.c <<EOP
+#include <stdio.h>
+#define FILE_ptr(fp) $stdio_ptr
+#define FILE_cnt(fp) $stdio_cnt
+main() {
+ FILE *fp = fopen("try.c", "r");
+ char c = getc(fp);
+ if (
+ 18 <= FILE_cnt(fp) &&
+ strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
+ )
+ exit(0);
+ exit(1);
+}
+EOP
+val="$undef"
+if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then
+ if ./try; then
+ echo "Your stdio acts pretty std."
+ val="$define"
+ else
+ echo "Your stdio isn't very std."
+ fi
else
- echo "Your system appears to use strchr() and strrchr() rather than index()"
- $echo $n "and rindex(). Is this correct? [$dflt] $c"
- rp='strchr() rather than index()? [$dflt]'
- . myread
- case "$ans" in
- n*|f*) d_index="$undef" ;;
- *) d_index="$define" ;;
- esac
+ echo "Your stdio doesn't appear very std."
fi
+$rm -f try.c try
+set d_stdstdio
+eval $setvar
-: see if stat knows about block sizes
+: see which of string.h or strings.h is needed
echo " "
-if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
- if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
- echo "Your stat knows about block sizes."
- d_statblks="$define"
- else
- echo "Your stat doesn't know about block sizes."
- d_statblks="$undef"
- fi
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+ echo "Using <string.h> instead of <strings.h>." >&4
+ val="$define"
else
- echo "Your stat doesn't know about block sizes."
- d_statblks="$undef"
+ val="$undef"
+ strings=`./findhdr strings.h`
+ if $test "$strings" && $test -r "$strings"; then
+ echo "Using <strings.h> instead of <string.h>." >&4
+ else
+ echo "No string header found -- You'll surely have problems." >&4
+ fi
fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*) strings=`./findhdr string.h`;;
+esac
-: see if stdio is really std
+: index or strchr
echo " "
-if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
- if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then
- echo "Your stdio is pretty std."
- d_stdstdio="$define"
- else
- echo "Your stdio isn't very std."
- d_stdstdio="$undef"
- fi
+if set index val -f; eval $csym; $val; then
+ if set strchr val -f d_strchr; eval $csym; $val; then
+ if $contains strchr "$strings" >/dev/null 2>&1 ; then
+ val="$define"
+ vali="$undef"
+ echo "strchr() found." >&4
+ else
+ val="$undef"
+ vali="$define"
+ echo "index() found." >&4
+ fi
+ else
+ val="$undef"
+ vali="$define"
+ echo "index() found." >&4
+ fi
else
- echo "Your stdio isn't very std."
- d_stdstdio="$undef"
+ if set strchr val -f d_strchr; eval $csym; $val; then
+ val="$define"
+ vali="$undef"
+ echo "strchr() found." >&4
+ else
+ echo "No index() or strchr() found!" >&4
+ val="$undef"
+ vali="$undef"
+ fi
fi
+set d_strchr; eval $setvar
+val="$vali"
+set d_index; eval $setvar
: check for structure copying
echo " "
-echo "Checking to see if your C compiler can copy structs..."
+echo "Checking to see if your C compiler can copy structs..." >&4
$cat >try.c <<'EOCP'
main()
{
struct blurfl {
- int dyick;
+ int dyick;
} foo, bar;
foo = bar;
}
EOCP
-if cc -c try.c >/dev/null 2>&1 ; then
- d_strctcpy="$define"
- echo "Yup, it can."
+if $cc -c try.c >/dev/null 2>&1 ; then
+ val="$define"
+ echo "Yup, it can."
else
- d_strctcpy="$undef"
- echo "Nope, it can't."
+ val="$undef"
+ echo "Nope, it can't."
fi
+set d_strctcpy
+eval $setvar
$rm -f try.*
-: see if struct tm is defined in sys/time.h
+: see if symlink exists
+set symlink d_symlink
+eval $inlibc
+
+: see if system exists
+set system d_system
+eval $inlibc
+
+: define an is-a-typedef? function
+typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+ $rm -f temp.c;
+ for inc in $inclist; do
+ echo "#include <$inc>" >>temp.c;
+ done;
+ $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+ if $contains $type temp.E >/dev/null 2>&1; then
+ eval "$var=\$type";
+ else
+ eval "$var=\$def";
+ fi;
+ $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
+: define an alternate in-header-list? function
+inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
+cont=true; xxf="echo \"<\$1> found.\" >&4";
+case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
+*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
+esac;
+case $# in 4) instead=instead;; *) instead="at last";; esac;
+while $test "$cont"; do
+ xxx=`./findhdr $1`
+ var=$2; eval "was=\$$2";
+ if $test "$xxx" && $test -r "$xxx";
+ then eval $xxf;
+ eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
+ cont="";
+ else eval $xxnf;
+ eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
+ set $yyy; shift; shift; yyy=$@;
+ case $# in 0) cont="";;
+ 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
+ xxnf="echo \"and I did not find <\$1> either.\" >&4";;
+ *) xxf="echo \"but I found <\$1\> instead.\" >&4";
+ xxnf="echo \"there is no <\$1>, ...\" >&4";;
+ esac;
+done;
+while $test "$yyy";
+do set $yyy; var=$2; eval "was=\$$2";
+ eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
+ set $yyy; shift; shift; yyy=$@;
+done'
+
+: see if this is a sys/times.h system
+set sys/times.h i_systimes
+eval $inhdr
+
+: see if times exists
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 set times val -f d_times; eval $csym; $val; then
+ echo 'times() found.' >&4
+ d_times="$define"
+ inc=''
+ case "$i_systimes" in
+ "$define") inc='sys/times.h';;
+ esac
+ set clock_t clocktype long stdio.h sys/types.h $inc
+ eval $typedef
+ dflt="$clocktype"
+ echo " "
+ rp="What type is returned by times() on this system?"
+ . ./myread
+ clocktype="$ans"
else
- echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
- d_tminsys="$define"
+ echo 'times() NOT found, hope that will do.' >&4
+ d_times="$undef"
+ clocktype='int'
fi
-: see if there is a vfork
+: see if struct tm is defined in sys/time.h
echo " "
-if $contains vfork libc.list >/dev/null 2>&1 ; then
- echo "vfork() found."
- d_vfork="$undef"
+if $contains 'struct tm' `./findhdr time.h` >/dev/null 2>&1 ; then
+ echo "You have struct tm defined in <time.h> rather than <sys/time.h>." >&4
+ val="$undef"
else
- echo "No vfork() found--will use fork() instead."
- d_vfork="$define"
+ echo "You have struct tm defined in <sys/time.h> rather than <time.h>." >&4
+ val="$define"
fi
+set d_tminsys
+eval $setvar
+
+: backward compatibility for d_hvfork
+if test X$d_hvfork != X; then
+ d_vfork="$d_hvfork"
+ d_hvfork=''
+fi
+: see if there is a vfork
+val=''
+set vfork val
+eval $inlibc
+
+: Ok, but do we want to use it. vfork is reportedly unreliable in
+: perl on Solaris 2.x, and probably elsewhere.
+case "$val" in
+$define)
+ echo " "
+ case "$usevfork" in
+ false) dflt='n';;
+ *) dflt='y';;
+ esac
+ rp="Some systems have problems with vfork(). Do you want to use it?"
+ . ./myread
+ case "$ans" in
+ y|Y) ;;
+ *)
+ echo "Ok, we won't use vfork()."
+ val="$undef"
+ ;;
+ esac
+ ;;
+esac
+set d_vfork
+eval $setvar
+case "$d_vfork" in
+$define) usevfork='true';;
+*) usevfork='false';;
+esac
: see if signal is declared as pointer to function returning int or void
echo " "
-if $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then
- echo "You have void (*signal())() instead of int."
- d_voidsig="$define"
+xxx=`./findhdr signal.h`
+$test "$xxx" && $cppstdin $cppminus $cppflags < $xxx >$$.tmp 2>/dev/null
+if $contains 'int.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have int (*signal())() instead of void." >&4
+ val="$undef"
+elif $contains 'void.*\*[ ]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have void (*signal())() instead of int." >&4
+ val="$define"
+elif $contains 'extern[ ]*[(\*]*signal' $$.tmp >/dev/null 2>&1 ; then
+ echo "You have int (*signal())() instead of void." >&4
+ val="$undef"
else
- echo "You have int (*signal())() instead of void."
- d_voidsig="$undef"
+ case "$d_voidsig" in
+ '')
+ echo "I can't determine whether signal handler returns void or int..." >&4
+ dflt=void
+ rp="What type does your signal handler return?"
+ . ./myread
+ case "$ans" in
+ v*) val="$define";;
+ *) val="$undef";;
+ esac;;
+ "$define")
+ echo "As you already told me, signal handler returns void." >&4;;
+ *)
+ echo "As you already told me, signal handler returns int." >&4;;
+ esac
fi
+set d_voidsig
+eval $setvar
+case "$d_voidsig" in
+"$define") signal_t="void";;
+*) signal_t="int";;
+esac
+$rm -f $$.tmp
+
+: preserve RCS keywords in files with variable substitution, grrr
+Header='$Header'
+Id='$Id'
+Log='$Log'
: check for void type
echo " "
-$cat <<EOM
-Checking to see how well your C compiler groks the void type...
-
+echo "Checking to see how well your C compiler groks the void type..." >&4
+echo " "
+$cat >&4 <<EOM
Support flag bits are:
1: basic void declarations.
2: arrays of pointers to functions returning void.
4: operations between pointers to and addresses of void functions.
-
+ 8: generic void pointers.
EOM
+echo " "
case "$voidflags" in
'')
- $cat >try.c <<'EOCP'
+ $cat >try.c <<'EOCP'
#if TRY & 1
-void main() {
+void sub() {
#else
-main() {
+sub() {
+#endif
+ extern void moo(); /* function returning void */
+ void (*goo)(); /* ptr to func returning void */
+#if TRY & 8
+ void *hue; /* generic ptr */
#endif
- extern void *moo();
- void (*goo)();
#if TRY & 2
void (*foo[10])();
#endif
@@ -813,649 +4112,505 @@ main() {
#endif
exit(0);
}
+main() { sub(); }
EOCP
- if cc -S -DTRY=7 try.c >.out 2>&1 ; then
- voidflags=7
- echo "It appears to support void fully."
- if $contains warning .out >/dev/null 2>&1; then
- echo "However, you might get some warnings that look like this:"
- $cat .out
- fi
- else
- echo "Hmm, you compiler has some difficulty with void. Checking further..."
- if cc -S -DTRY=1 try.c >/dev/null 2>&1 ; then
- echo "It supports 1..."
- if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
- voidflags=3
- echo "And it supports 2 but not 4."
- else
- echo "It doesn't support 2..."
- if cc -S -DTRY=3 try.c >/dev/null 2>&1 ; then
- voidflags=5
- echo "But it supports 4."
- else
- voidflags=1
- echo "And it doesn't support 4."
+ if $cc $ccflags -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
+ voidflags=$defvoidused
+ echo "It appears to support void to the level $package wants ($defvoidused)."
+ if $contains warning .out >/dev/null 2>&1; then
+ echo "However, you might get some warnings that look like this:"
+ $cat .out
fi
- fi
else
- echo "There is no support at all for void."
- voidflags=0
+echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
+ if $cc $ccflags -c -DTRY=1 try.c >/dev/null 2>&1; then
+ echo "It supports 1..."
+ if $cc $ccflags -c -DTRY=3 try.c >/dev/null 2>&1; then
+ echo "It also supports 2..."
+ if $cc $ccflags -c -DTRY=7 try.c >/dev/null 2>&1; then
+ voidflags=7
+ echo "And it supports 4 but not 8 definitely."
+ else
+ echo "It doesn't support 4..."
+ if $cc $ccflags -c -DTRY=11 try.c >/dev/null 2>&1; then
+ voidflags=11
+ echo "But it supports 8."
+ else
+ voidflags=3
+ echo "Neither does it support 8."
+ fi
+ fi
+ else
+ echo "It does not support 2..."
+ if $cc $ccflags -c -DTRY=13 try.c >/dev/null 2>&1; then
+ voidflags=13
+ echo "But it supports 4 and 8."
+ else
+ if $cc $ccflags -c -DTRY=5 try.c >/dev/null 2>&1; then
+ voidflags=5
+ echo "And it supports 4 but has not heard about 8."
+ else
+ echo "However it supports 8 but not 4."
+ fi
+ fi
+ fi
+ else
+ echo "There is no support at all for void."
+ voidflags=0
+ fi
fi
- fi
esac
-dflt="$voidflags";
-rp="Your void support flags add up to what? [$dflt]"
-$echo $n "$rp $c"
-. myread
-voidflags="$ans"
+case "$voidflags" in
+"$defvoidused") ;;
+*)
+ dflt="$voidflags";
+ rp="Your void support flags add up to what?"
+ . ./myread
+ voidflags="$ans"
+ ;;
+esac
$rm -f try.* .out
-: see what type of char stdio uses.
+: see if we should include -lnm
echo " "
-if $contains 'unsigned.*char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then
- echo "Your stdio uses unsigned chars."
- stdchar="unsigned char"
+if $test -r /usr/lib/libnm$_a || $test -r /usr/local/lib/libnm$_a ; then
+ echo "New math library found." >&4
+ libnm='-lnm'
else
- echo "Your stdio uses signed chars."
- stdchar="char"
-fi
-
-: preserve RCS keywords in files with variable substitution, grrr
-Log='$Log'
-Header='$Header'
-
-: set up shell script to do ~ expansion
-cat >filexp <<EOSS
-$startsh
-: expand filename
-case "\$1" in
- ~/*|~)
- echo \$1 | $sed "s|~|\${HOME-\$LOGDIR}|"
- ;;
- ~*)
- if $test -f /bin/csh; then
- /bin/csh -f -c "glob \$1"
- echo ""
- else
- name=\`$expr x\$1 : '..\([^/]*\)'\`
- dir=\`$sed -n -e "/^\${name}:/{s/^[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\).*"'\$'"/\1/" -e p -e q -e '}' </etc/passwd\`
- if $test ! -d "\$dir"; then
- me=\`basename \$0\`
- echo "\$me: can't locate home directory for: \$name" >&2
- exit 1
- fi
- case "\$1" in
- */*)
- echo \$dir/\`$expr x\$1 : '..[^/]*/\(.*\)'\`
- ;;
+ ans=`./loc libnm$_a x $libpth`
+ case "$ans" in
+ x)
+ echo "No nm library found--the normal math library will have to do." >&4
+ libnm=''
+ ;;
*)
- echo \$dir
- ;;
+ echo "New math library found in $ans." >&4
+ libnm="$ans"
+ ;;
esac
- fi
- ;;
-*)
- echo \$1
- ;;
-esac
-EOSS
-chmod 755 filexp
-$eunicefix filexp
+fi
-: determine where public executables go
-case "$bin" in
-'')
- dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
- ;;
-*) dflt="$bin"
- ;;
-esac
-cont=true
-while $test "$cont" ; do
- echo " "
- rp="Where do you want to put the public executables? [$dflt]"
- $echo $n "$rp $c"
- . myread
- bin="$ans"
- bin=`filexp $bin`
- if test -d $bin; then
- cont=''
- else
- dflt=n
- rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]"
- $echo $n "$rp $c"
- . myread
- dflt=''
- case "$ans" in
- y*) cont='';;
- esac
- fi
-done
+: see if this is a malloc.h system
+set malloc.h i_malloc
+eval $inhdr
-: determine where manual pages go
-case "$mansrc" in
-'')
- dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1`
- ;;
-*) dflt="$mansrc"
- ;;
-esac
-cont=true
-while $test "$cont" ; do
- echo " "
- rp="Where do the manual pages (source) go? [$dflt]"
- $echo $n "$rp $c"
- . myread
- mansrc=`filexp "$ans"`
- if test -d $mansrc; then
- cont=''
- else
- dflt=n
- rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]"
- $echo $n "$rp $c"
- . myread
- dflt=''
- case "$ans" in
- y*) cont='';;
- esac
- fi
-done
-case "$mansrc" in
-*l)
- manext=l
- ;;
-*n)
- manext=n
- ;;
-*)
- manext=1
- ;;
-esac
+: see if stdlib is available
+set stdlib.h i_stdlib
+eval $inhdr
-: get C preprocessor symbols handy
+: determine which malloc to compile in
echo " "
-echo $attrlist | $tr '[ - ]' '[\012-\012]' >Cppsym.know
-$cat <<EOSS >Cppsym
-$startsh
-case "\$1" in
--l) list=true
- shift
- ;;
-esac
-unknown=''
-case "\$list\$#" in
-1|2)
- for sym do
- if $contains "^\$1$" Cppsym.true >/dev/null 2>&1; then
- exit 0
- elif $contains "^\$1$" Cppsym.know >/dev/null 2>&1; then
- :
- else
- unknown="\$unknown \$sym"
- fi
- done
- set X \$unknown
- shift
- ;;
-esac
-case \$# in
-0) exit 1;;
-esac
-echo \$* | $tr '[ - ]' '[\012-\012]' | $sed -e 's/\(.*\)/\\
-#ifdef \1\\
-exit 0; _ _ _ _\1\\ \1\\
-#endif\\
-/' >/tmp/Cppsym\$\$
-echo exit 1 >>/tmp/Cppsym\$\$
-$cpp $cppminus </tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$
-case "\$list" in
-true) awk 'NF > 5 {print substr(\$6,2,100)}' </tmp/Cppsym2\$\$ ;;
-*)
- sh /tmp/Cppsym2\$\$
- status=\$?
- ;;
-esac
-$rm -f /tmp/Cppsym\$\$ /tmp/Cppsym2\$\$
-exit \$status
-EOSS
-chmod 755 Cppsym
-$eunicefix Cppsym
-echo "Your C preprocessor defines the following symbols:"
-Cppsym -l $attrlist >Cppsym.true
-cat Cppsym.true
-rmlist="$rmlist Cppsym Cppsym.know Cppsym.true"
-
-: see what memory models we can support
-case "$models" in
-'')
- if Cppsym pdp11; then
- dflt='unsplit split'
- else
- ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
- case "$ans" in
- X) dflt='none';;
- *) if $test -d /lib/small || $test -d /usr/lib/small; then
- dflt='small'
- else
- dflt=''
- fi
- if $test -d /lib/medium || $test -d /usr/lib/medium; then
- dflt="$dflt medium"
- fi
- if $test -d /lib/large || $test -d /usr/lib/large; then
- dflt="$dflt large"
- fi
- if $test -d /lib/huge || $test -d /usr/lib/huge; then
- dflt="$dflt huge"
- fi
- esac
- fi
- ;;
-*) dflt="$models" ;;
+case "$usemymalloc" in
+''|y*|true) dflt='y' ;;
+n*|false) dflt='n' ;;
+*) dflt="$usemymalloc" ;;
esac
-$cat <<EOM
-
-Some systems have different model sizes. On most systems they are called
-small, medium, large, and huge. On the PDP11 they are called unsplit and
-split. If your system doesn't support different memory models, say "none".
-If you wish to force everything to one memory model, say "none" here and
-put the appropriate flags later when it asks you for other cc and ld flags.
-Venix systems may wish to put "none" and let the compiler figure things out.
-(In the following question multiple model names should be space separated.)
-
-EOM
-rp="Which models are supported? [$dflt]"
-$echo $n "$rp $c"
-. myread
-models="$ans"
-
-case "$models" in
-none)
- small=''
- medium=''
- large=''
- huge=''
- unsplit=''
- split=''
- ;;
-*split)
- case "$split" in
- '')
- if $contains '-i' $mansrc/ld.1 >/dev/null 2>&1 || \
- $contains '-i' $mansrc/cc.1 >/dev/null 2>&1; then
- dflt='-i'
- else
- dflt='none'
- fi
- ;;
- *) dflt="$split";;
- esac
- rp="What flag indicates separate I and D space? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- none) ans='';;
- esac
- split="$ans"
- unsplit=''
- ;;
-*large*|*small*|*medium*|*huge*)
- case "$model" in
- *large*)
- case "$large" in
- '') dflt='-Ml';;
- *) dflt="$large";;
- esac
- rp="What flag indicates large model? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- none) ans='';
- esac
- large="$ans"
- ;;
- *) large='';;
- esac
- case "$model" in
- *huge*)
- case "$huge" in
- '') dflt='-Mh';;
- *) dflt="$huge";;
- esac
- rp="What flag indicates huge model? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- none) ans='';
- esac
- huge="$ans"
- ;;
- *) huge="$large";;
- esac
- case "$model" in
- *medium*)
- case "$medium" in
- '') dflt='-Mm';;
- *) dflt="$medium";;
- esac
- rp="What flag indicates medium model? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- none) ans='';
- esac
- medium="$ans"
- ;;
- *) medium="$large";;
- esac
- case "$model" in
- *small*)
- case "$small" in
- '') dflt='none';;
- *) dflt="$small";;
- esac
- rp="What flag indicates small model? [$dflt]"
- $echo $n "$rp $c"
- . myread
- case "$ans" in
- none) ans='';
+rp="Do you wish to attempt to use the malloc that comes with $package?"
+. ./myread
+usemymalloc="$ans"
+case "$ans" in
+y*|true)
+ usemymalloc='y'
+ mallocsrc='malloc.c'
+ mallocobj="malloc$_o"
+ d_mymalloc="$define"
+ case "$libs" in
+ *-lmalloc*)
+ : Remove malloc from list of libraries to use
+ echo "Removing unneeded -lmalloc from library list" >&4
+ set `echo X $libs | $sed -e 's/-lmalloc / /' -e 's/-lmalloc$//'`
+ shift
+ libs="$*"
+ echo "libs = $libs" >&4
+ ;;
esac
- small="$ans"
;;
- *) small='';;
- esac
- ;;
*)
- echo "Unrecognized memory models--you may have to edit Makefile.SH"
- ;;
-esac
-
-case "$ccflags" in
-'') dflt='none';;
-*) dflt="$ccflags";;
-esac
-echo " "
-rp="Any additional cc flags? [$dflt]"
-$echo $n "$rp $c"
-. myread
-case "$ans" in
-none) ans='';
-esac
-ccflags="$ans"
-
-case "$ldflags" in
-'') if venix; then
- dflt='-i -z'
- else
- dflt='none'
- fi
- ;;
-*) dflt="$ldflags";;
-esac
-echo " "
-rp="Any additional ld flags? [$dflt]"
-$echo $n "$rp $c"
-. myread
-case "$ans" in
-none) ans='';
+ usemymalloc='n'
+ mallocsrc=''
+ mallocobj=''
+ d_mymalloc="$undef"
+ ;;
esac
-ldflags="$ans"
-: see if we need a special compiler
+: Cruising for prototypes
echo " "
-if usg; then
- case "$cc" in
- '')
- case "$Mcc" in
- /*) dflt='Mcc'
- ;;
- *)
- case "$large" in
- -M*)
- dflt='cc'
- ;;
- *)
- if $contains '\-M' $mansrc/cc.1 >/dev/null 2>&1 ; then
- dflt='cc -M'
- else
- dflt='cc'
- fi
- ;;
- esac
- ;;
- esac
- ;;
- *) dflt="$cc";;
- esac
- $cat <<'EOM'
-
-On some systems the default C compiler will not resolve multiple global
-references that happen to have the same name. On some such systems the
-"Mcc" command may be used to force these to be resolved. On other systems
-a "cc -M" command is required. (Note that the -M flag on other systems
-indicates a memory model to use!) What command will force resolution on
-EOM
- $echo $n "this system? [$dflt] $c"
- rp="Command to resolve multiple refs? [$dflt]"
- . myread
- cc="$ans"
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+main(int argc, char *argv[]) {
+ exit(0);}
+EOCP
+if $cc $ccflags -c prototype.c >prototype.out 2>&1 ; then
+ echo "Your C compiler appears to support function prototypes."
+ val="$define"
else
- echo "Not a USG system--assuming cc can resolve multiple definitions."
- cc=cc
+ echo "Your C compiler doesn't seem to understand function prototypes."
+ val="$undef"
fi
+set prototype
+eval $setvar
+$rm -f prototype*
-: see if symlink exists
+: see what type of char stdio uses.
echo " "
-if $contains symlink libc.list >/dev/null 2>&1; then
- echo 'symlink() found.'
- d_symlink="$define"
+if $contains 'unsigned.*char.*_ptr;' `./findhdr stdio.h` >/dev/null 2>&1 ; then
+ echo "Your stdio uses unsigned chars." >&4
+ stdchar="unsigned char"
else
- echo 'symlink() not found.'
- d_symlink="$undef"
+ echo "Your stdio uses signed chars." >&4
+ stdchar="char"
fi
-: see if we should include -lnm
+: end of configuration questions
echo " "
-if $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then
- echo "New math library found."
- libnm='-lnm'
-else
- ans=`loc libnm.a x $libpth`
- case "$ans" in
- x)
- echo "No nm library found--the normal math library will have to do."
- libnm=''
- ;;
- *)
- echo "New math library found in $ans."
- libnm="$ans"
- ;;
- esac
+echo "End of configuration questions."
+echo " "
+
+: back to where it started
+if test -d ../UU; then
+ cd ..
fi
-: determine which malloc to compile in
-echo " "
-case "$usemymalloc" in
-'')
- if bsd || v7; then
- dflt='y'
- else
- dflt='n'
- fi
- ;;
-*) dflt="$usemymalloc"
- ;;
-esac
-rp="Do you wish to attempt to use the malloc that comes with $package? [$dflt]"
-$echo $n "$rp $c"
-. myread
-case "$ans" in
-'') ans=$dflt;;
-esac
-usemymalloc="$ans"
-case "$ans" in
-y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
-*) mallocsrc=''; mallocobj='';;
-esac
+: configuration may be patched via a 'config.over' file
+if $test -f config.over; then
+ echo " "
+ dflt=y
+ rp='I see a config.over file. Do you wish to load it?'
+ . UU/myread
+ case "$ans" in
+ n*) echo "OK, I'll ignore it.";;
+ *) . ./config.over
+ echo "Configuration override changes have been loaded."
+ ;;
+ esac
+fi
-echo " "
-echo "End of configuration questions."
-echo " "
+: in case they want portability, strip down executable paths
+case "$d_portable" in
+"$define")
+ echo " "
+ echo "Stripping down executable paths..." >&4
+ for file in $loclist $trylist; do
+ eval $file="\$file"
+ done
+ ;;
+esac
: create config.sh file
echo " "
-if test -d ../UU; then
- cd ..
-fi
-echo "Creating config.sh..."
+echo "Creating config.sh..." >&4
$spitshell <<EOT >config.sh
$startsh
-# config.sh
-# This file was produced by running the Configure script.
+#
+# This file was produced by running the Configure script. It holds all the
+# definitions figured out by Configure. Should you modify one of these values,
+# do not forget to propagate your changes by running "Configure -der". You may
+# instead choose to run each of the .SH files by yourself, or "Configure -S".
+#
-d_eunice='$d_eunice'
-eunicefix='$eunicefix'
-define='$define'
-loclist='$loclist'
-expr='$expr'
-sed='$sed'
-echo='$echo'
-cat='$cat'
-rm='$rm'
-mv='$mv'
-cp='$cp'
-tail='$tail'
-tr='$tr'
-mkdir='$mkdir'
-sort='$sort'
-uniq='$uniq'
-grep='$grep'
-trylist='$trylist'
-test='$test'
-inews='$inews'
-egrep='$egrep'
-more='$more'
-pg='$pg'
-Mcc='$Mcc'
-vi='$vi'
-mailx='$mailx'
-mail='$mail'
-Log='$Log'
+# Package name : $package
+# Source directory : $src
+# Configuration time: $cf_time
+# Configured by : $cf_by
+# Target system : $myuname
+
+Author='$Author'
+Date='$Date'
Header='$Header'
+Id='$Id'
+Locker='$Locker'
+Log='$Log'
+Mcc='$Mcc'
+RCSfile='$RCSfile'
+Revision='$Revision'
+Source='$Source'
+State='$State'
+afs='$afs'
+ar='$ar'
+archobjs='$archobjs'
+awk='$awk'
+bash='$bash'
bin='$bin'
+binexp='$binexp'
+bison='$bison'
+byacc='$byacc'
+c='$c'
+cat='$cat'
cc='$cc'
+ccflags='$ccflags'
+cf_by='$cf_by'
+cf_time='$cf_time'
+chgrp='$chgrp'
+chmod='$chmod'
+chown='$chown'
+clocktype='$clocktype'
+comm='$comm'
+compress='$compress'
contains='$contains'
+cp='$cp'
+cpio='$cpio'
cpp='$cpp'
+cppflags='$cppflags'
+cpplast='$cpplast'
cppminus='$cppminus'
+cpprun='$cpprun'
+cppstdin='$cppstdin'
+cryptlib='$cryptlib'
+csh='$csh'
d_bcopy='$d_bcopy'
+d_bsd='$d_bsd'
+d_bzero='$d_bzero'
d_charsprf='$d_charsprf'
d_crypt='$d_crypt'
+d_eunice='$d_eunice'
+d_gnulibc='$d_gnulibc'
d_index='$d_index'
+d_mymalloc='$d_mymalloc'
+d_portable='$d_portable'
+d_rename='$d_rename'
+d_select='$d_select'
+d_stat='$d_stat'
d_statblks='$d_statblks'
+d_stdio_cnt_lval='$d_stdio_cnt_lval'
+d_stdio_ptr_lval='$d_stdio_ptr_lval'
+d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
+d_strchr='$d_strchr'
d_strctcpy='$d_strctcpy'
d_symlink='$d_symlink'
+d_system='$d_system'
+d_times='$d_times'
d_tminsys='$d_tminsys'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
+d_xenix='$d_xenix'
+date='$date'
+defvoidused='$defvoidused'
+echo='$echo'
+egrep='$egrep'
+emacs='$emacs'
+eunicefix='$eunicefix'
+expr='$expr'
+find='$find'
+firstmakefile='$firstmakefile'
+flex='$flex'
+freetype='$freetype'
+gcc='$gcc'
+gccversion='$gccversion'
+glibpth='$glibpth'
+grep='$grep'
+gzip='$gzip'
+hint='$hint'
+huge='$huge'
+i_malloc='$i_malloc'
+i_stdlib='$i_stdlib'
+i_string='$i_string'
+i_systimes='$i_systimes'
+incpath='$incpath'
+inews='$inews'
+installbin='$installbin'
+installmansrc='$installmansrc'
+ksh='$ksh'
+large='$large'
+ldflags='$ldflags'
+less='$less'
+lib='$lib'
libc='$libc'
+libexp='$libexp'
libnm='$libnm'
-mallocsrc='$mallocsrc'
+libpth='$libpth'
+libs='$libs'
+line='$line'
+lint='$lint'
+lkflags='$lkflags'
+ln='$ln'
+lns='$lns'
+locincpth='$locincpth'
+loclibpth='$loclibpth'
+lp='$lp'
+lpr='$lpr'
+ls='$ls'
+mail='$mail'
+mailx='$mailx'
+make='$make'
mallocobj='$mallocobj'
-usemymalloc='$usemymalloc'
-mansrc='$mansrc'
+mallocsrc='$mallocsrc'
+malloctype='$malloctype'
manext='$manext'
-models='$models'
-split='$split'
-small='$small'
+mansrc='$mansrc'
+mansrcexp='$mansrcexp'
medium='$medium'
-large='$large'
-huge='$huge'
-ccflags='$ccflags'
-ldflags='$ldflags'
+mips='$mips'
+mips_type='$mips_type'
+mkdir='$mkdir'
+models='$models'
+more='$more'
+mv='$mv'
+myuname='$myuname'
n='$n'
-c='$c'
+nm_opt='$nm_opt'
+nm_so_opt='$nm_so_opt'
+nroff='$nroff'
+optimize='$optimize'
+osname='$osname'
+osvers='$osvers'
package='$package'
-spitshell='$spitshell'
-shsharp='$shsharp'
+perl='$perl'
+pg='$pg'
+plibpth='$plibpth'
+pmake='$pmake'
+pr='$pr'
+prefix='$prefix'
+prefixexp='$prefixexp'
+prototype='$prototype'
+rm='$rm'
+rmail='$rmail'
+runnm='$runnm'
+sed='$sed'
+sendmail='$sendmail'
+sh='$sh'
+shar='$shar'
sharpbang='$sharpbang'
+shsharp='$shsharp'
+signal_t='$signal_t'
+sleep='$sleep'
+smail='$smail'
+small='$small'
+so='$so'
+sort='$sort'
+spackage='$spackage'
+spitshell='$spitshell'
+split='$split'
+src='$src'
startsh='$startsh'
stdchar='$stdchar'
+stdio_base='$stdio_base'
+stdio_bufsiz='$stdio_bufsiz'
+stdio_cnt='$stdio_cnt'
+stdio_filbuf='$stdio_filbuf'
+stdio_ptr='$stdio_ptr'
+strings='$strings'
+submit='$submit'
+sysman='$sysman'
+tail='$tail'
+tar='$tar'
+tbl='$tbl'
+test='$test'
+touch='$touch'
+tr='$tr'
+troff='$troff'
+uname='$uname'
+uniq='$uniq'
+usemymalloc='$usemymalloc'
+usenm='$usenm'
+usevfork='$usevfork'
+usrinc='$usrinc'
+uuname='$uuname'
+vi='$vi'
voidflags='$voidflags'
-defvoidused='$defvoidused'
-CONFIG=true
+xlibpth='$xlibpth'
+zcat='$zcat'
+zip='$zip'
EOT
-
-CONFIG=true
-echo " "
-dflt=''
-echo "If you didn't make any mistakes, then just type a carriage return here."
-rp="If you need to edit config.sh, do it as a shell escape here:"
-$echo $n "$rp $c"
-. UU/myread
-case "$ans" in
-'') ;;
-*) : in case they cannot read
- eval $ans;;
-esac
+: add special variables
+$test -f $src/patchlevel.h && \
+awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+echo "CONFIG=true" >>config.sh
-echo " "
-echo "Doing variable substitutions on .SH files..."
-set x `awk '{print $1}' <MANIFEST | $grep '\.SH'`
-shift
-case $# in
-0) set x *.SH; shift;;
-esac
-if test ! -f $1; then
- shift
+: propagate old symbols
+if $test -f UU/config.sh; then
+ <UU/config.sh sort | uniq >UU/oldconfig.sh
+ sed -n 's/^\([a-zA-Z_0-9]*\)=.*/\1/p' config.sh config.sh UU/oldconfig.sh |\
+ sort | uniq -u >UU/oldsyms
+ set X `cat UU/oldsyms`
+ shift
+ case $# in
+ 0) ;;
+ *)
+ cat <<EOM
+Hmm...You had some extra variables I don't know about...I'll try to keep 'em...
+EOM
+ echo "# Variables propagated from previous config.sh file." >>config.sh
+ for sym in `cat UU/oldsyms`; do
+ echo " Propagating $hint variable "'$'"$sym..."
+ eval 'tmp="$'"${sym}"'"'
+ echo "$tmp" | \
+ sed -e "s/'/'\"'\"'/g" -e "s/^/$sym='/" -e "s/$/'/" >>config.sh
+ done
+ ;;
+ esac
fi
-for file in $*; do
- case "$file" in
- */*)
- dir=`$expr X$file : 'X\(.*\)/'`
- file=`$expr X$file : 'X.*/\(.*\)'`
- (cd $dir && . $file)
+
+: Finish up by extracting the .SH files
+case "$alldone" in
+exit)
+ $rm -rf UU
+ echo "Done."
+ exit 0
;;
- *)
- . $file
+cont)
;;
- esac
-done
-if test -f config.h.SH; then
- if test ! -f config.h; then
- : oops, they left it out of MANIFEST, probably, so do it anyway.
- . config.h.SH
- fi
-fi
+'')
+ dflt=''
+ nostick=true
+ $cat <<EOM
+
+If you'd like to make any changes to the config.sh file before I begin
+to configure things, do it as a shell escape now (e.g. !vi config.sh).
+
+EOM
+ rp="Press return or use a shell escape to edit config.sh:"
+ . UU/myread
+ nostick=''
+ case "$ans" in
+ '') ;;
+ *) : in case they cannot read
+ sh 1>&4 -c "$ans";;
+ esac
+ ;;
+esac
-if $contains '^depend:' Makefile >/dev/null 2>&1; then
- dflt=n
- $cat <<EOM
+: if this fails, just run all the .SH files by hand
+. ./config.sh
+
+echo " "
+exec 1>&4
+. ./UU/extract
+
+if $contains '^depend:' [Mm]akefile >/dev/null 2>&1; then
+ dflt=y
+ case "$silent" in
+ true) ;;
+ *)
+ $cat <<EOM
Now you need to generate make dependencies by running "make depend".
You might prefer to run it in background: "make depend > makedepend.out &"
It can take a while, so you might not want to run it right now.
EOM
- rp="Run make depend now? [$dflt]"
- $echo $n "$rp $c"
- . UU/myread
- case "$ans" in
- y*) make depend
+ ;;
+ esac
+ rp="Run make depend now?"
+ . UU/myread
+ case "$ans" in
+ y*)
+ make depend && echo "Now you must run a make."
+ ;;
+ *)
+ echo "You must run 'make depend' then 'make'."
+ ;;
+ esac
+elif test -f [Mm]akefile; then
+ echo " "
echo "Now you must run a make."
- ;;
- *) echo "You must run 'make depend' then 'make'."
- ;;
- esac
-elif test -f Makefile; then
- echo " "
- echo "Now you must run a make."
else
- echo "Done."
+ echo "Done."
fi
-$rm -f kit*isdone
-cd UU && $rm -f $rmlist
-: end of Configure
+$rm -f kit*isdone ark*isdone
+$rm -rf UU
+
+: End of Configure
+
diff --git a/MANIFEST b/MANIFEST
index 085b831183..e069b72c65 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,7 +1,3 @@
-After all the perl kits are run you should have the following files:
-
-Filename Kit Description
--------- --- -----------
Configure 6 Run this first
EXTERN.h 10 Included before foreign .h files
INTERN.h 10 Included before domestic .h files
@@ -15,14 +11,101 @@ array.c 6 Numerically subscripted arrays
array.h 10 Public declarations for the above
cmd.c 7 Command interpreter
cmd.h 9 Public declarations for the above
-config.H 9 Sample config.h
-config.h.SH 9 Produces config.h.
+config_H 9 Sample config.h
+config_h.SH 9 Produces config.h.
dump.c 8 Debugging output
form.c 8 Format processing
form.h 10 Public declarations for the above
handy.h 10 Handy definitions
hash.c 9 Associative arrays
hash.h 10 Public declarations for the above
+hints/3b1.sh
+hints/3b1cc
+hints/README.hints
+hints/aix.sh
+hints/altos486.sh
+hints/amigaos.sh
+hints/apollo.sh
+hints/atheos.sh
+hints/aux_3.sh
+hints/beos.sh
+hints/broken-db.msg
+hints/bsdos.sh
+hints/convexos.sh
+hints/cxux.sh
+hints/cygwin.sh
+hints/darwin.sh
+hints/dcosx.sh
+hints/dec_osf.sh
+hints/dgux.sh
+hints/dos_djgpp.sh
+hints/dynix.sh
+hints/dynixptx.sh
+hints/epix.sh
+hints/esix4.sh
+hints/fps.sh
+hints/freebsd.sh
+hints/genix.sh
+hints/gnu.sh
+hints/greenhills.sh
+hints/hpux.sh
+hints/i386.sh
+hints/irix_4.sh
+hints/irix_5.sh
+hints/irix_6.sh
+hints/irix_6_0.sh
+hints/irix_6_1.sh
+hints/isc.sh
+hints/isc_2.sh
+hints/linux.sh
+hints/lynxos.sh
+hints/machten.sh
+hints/machten_2.sh
+hints/mint.sh
+hints/mips.sh
+hints/mpc.sh
+hints/mpeix.sh
+hints/ncr_tower.sh
+hints/netbsd.sh
+hints/newsos4.sh
+hints/next_3.sh
+hints/next_3_0.sh
+hints/next_4.sh
+hints/nonstopux.sh
+hints/openbsd.sh
+hints/opus.sh
+hints/os2.sh
+hints/os390.sh
+hints/posix-bc.sh
+hints/powerux.sh
+hints/qnx.sh
+hints/rhapsody.sh
+hints/sco.sh
+hints/sco_2_3_0.sh
+hints/sco_2_3_1.sh
+hints/sco_2_3_2.sh
+hints/sco_2_3_3.sh
+hints/sco_2_3_4.sh
+hints/solaris_2.sh
+hints/stellar.sh
+hints/sunos_4_0.sh
+hints/sunos_4_1.sh
+hints/super-ux.sh
+hints/svr4.sh
+hints/svr5.sh
+hints/t001.c
+hints/ti1500.sh
+hints/titanos.sh
+hints/ultrix_4.sh
+hints/umips.sh
+hints/unicos.sh
+hints/unicosmk.sh
+hints/unisysdynix.sh
+hints/utekv.sh
+hints/uts.sh
+hints/uwin.sh
+hints/vmesa.sh
+hints/vos.sh
makedepend.SH 9 Precursor to makedepend
makedir.SH 10 Precursor to makedir
malloc.c 7 A version of malloc you might not want
@@ -31,6 +114,8 @@ perl.h 9 Global declarations
perl.man.1 5 The manual page(s), first half
perl.man.2 4 The manual page(s), second half
perl.y 5 Yacc grammar for perl
+perldb
+perldb.man
perly.c 2 The perl compiler
search.c 6 String matching
search.h 10 Public declarations for the above
@@ -69,6 +154,7 @@ t/op.cond 10 See if conditional expressions work
t/op.crypt 10 See if crypt works
t/op.do 10 See if subroutines work
t/op.each 10 See if associative iterators work
+t/op.eval
t/op.exec 10 See if exec and system work
t/op.exp 10 See if math functions work
t/op.flip 10 See if range operator works
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..7faeed1791
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,649 @@
+# $Header: Makefile.SH,v 1.0.1.5 88/02/02 11:20:49 root Exp $
+#
+# $Log: Makefile.SH,v $
+# Revision 1.0.1.5 88/02/02 11:20:49 root
+# patch13: added d_symlink dependency, changed TEST to ./perl TEST.
+#
+# Revision 1.0.1.4 88/01/28 10:17:59 root
+# patch8: added perldb.man
+#
+# Revision 1.0.1.3 88/01/26 14:14:52 root
+# Added mallocsrc stuff.
+#
+# Revision 1.0.1.2 88/01/26 08:46:04 root
+# patch 4: make depend didn't work right if . wasn't in PATH.
+#
+# Revision 1.0.1.1 88/01/24 03:55:18 root
+# patch 2: remove extra Log lines.
+#
+# Revision 1.0 87/12/18 16:11:50 root
+# Initial revision
+#
+
+CC = cc
+bin = /usr/local/perl1.0.15/bin
+lib = /usr/local/perl1.0.15/lib
+mansrc = /usr/local/perl1.0.15/man/man1
+manext = 1
+CFLAGS = -I/usr/local/include -O
+LDFLAGS = -L/usr/local/lib
+SMALL =
+LARGE =
+mallocsrc =
+mallocobj =
+SLN = ln -s
+
+libs = /usr/lib/libcrypt.a -lm
+
+public = perl perldb
+
+private =
+
+manpages = perl.man perldb.man
+
+util =
+
+sh = Makefile.SH makedepend.SH
+
+h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h
+h2 = hash.h perl.h search.h spat.h stab.h str.h util.h
+
+h = $(h1) $(h2)
+
+c1 = arg.c array.c cmd.c dump.c form.c hash.c $(mallocsrc)
+c2 = search.c stab.c str.c util.c version.c
+
+c = $(c1) $(c2)
+
+obj1 = arg.o array.o cmd.o dump.o form.o hash.o $(mallocobj)
+obj2 = search.o stab.o str.o util.o version.o
+
+obj = $(obj1) $(obj2)
+
+lintflags = -phbvxac
+
+addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
+
+# grrr
+SHELL = /bin/sh
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(LARGE) $*.c
+
+all: $(public) $(private) $(util)
+ touch all
+
+perl: $(obj) perl.o
+ $(CC) $(LDFLAGS) $(LARGE) $(obj) perl.o $(libs) -o perl
+
+perl.c: perl.y
+ @ echo Expect 2 shift/reduce errors...
+ yacc perl.y
+ mv y.tab.c perl.c
+
+perl.o: perl.c perly.c perl.h EXTERN.h search.h util.h INTERN.h handy.h
+ $(CC) -c $(CFLAGS) $(LARGE) perl.c
+
+# if a .h file depends on another .h file...
+$(h):
+ touch $@
+
+perl.man: perl.man.1 perl.man.2
+ cat perl.man.1 perl.man.2 >perl.man
+
+install: perl perl.man
+# won't work with csh
+ export PATH || exit 1
+ - mv $(bin)/perl $(bin)/perl.old
+ - if test `pwd` != $(bin); then cp $(public) $(bin); fi
+ cd $(bin); \
+for pub in $(public); do \
+chmod 755 `basename $$pub`; \
+done
+ - test $(bin) = /bin || rm -f /bin/perl
+ - test $(bin) = /bin || ln -s $(bin)/perl /bin || cp $(bin)/perl /bin
+# chmod 755 makedir
+# - makedir `filexp $(lib)`
+# - \
+#if test `pwd` != `filexp $(lib)`; then \
+#cp $(private) `filexp $(lib)`; \
+#fi
+# cd `filexp $(lib)`; \
+#for priv in $(private); do \
+#chmod 755 `basename $$priv`; \
+#done
+ - if test `pwd` != $(mansrc); then \
+for page in $(manpages); do \
+cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
+done; \
+fi
+
+clean:
+ rm -f *.o
+
+realclean:
+ rm -f perl *.orig */*.orig *.o core $(addedbyconf)
+
+# The following lint has practically everything turned on. Unfortunately,
+# you have to wade through a lot of mumbo jumbo that can't be suppressed.
+# If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
+# for that spot.
+
+lint:
+ lint $(lintflags) $(defs) $(c) > perl.fuzz
+
+depend: makedepend
+ ./makedepend
+
+test: perl
+ chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.*
+ cd t && (rm -f perl; $(SLN) ../perl .) && ./perl TEST
+
+clist:
+ echo $(c) | tr ' ' '\012' >.clist
+
+hlist:
+ echo $(h) | tr ' ' '\012' >.hlist
+
+shlist:
+ echo $(sh) | tr ' ' '\012' >.shlist
+
+# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
+# If this runs make out of memory, delete /usr/include lines.
+arg.o: /usr/include/_G_config.h
+arg.o: /usr/include/asm/ptrace.h
+arg.o: /usr/include/asm/sigcontext.h
+arg.o: /usr/include/bits/endian.h
+arg.o: /usr/include/bits/pthreadtypes.h
+arg.o: /usr/include/bits/sched.h
+arg.o: /usr/include/bits/select.h
+arg.o: /usr/include/bits/setjmp.h
+arg.o: /usr/include/bits/sigaction.h
+arg.o: /usr/include/bits/sigcontext.h
+arg.o: /usr/include/bits/siginfo.h
+arg.o: /usr/include/bits/signum.h
+arg.o: /usr/include/bits/sigset.h
+arg.o: /usr/include/bits/sigstack.h
+arg.o: /usr/include/bits/sigthread.h
+arg.o: /usr/include/bits/stat.h
+arg.o: /usr/include/bits/stdio_lim.h
+arg.o: /usr/include/bits/sys_errlist.h
+arg.o: /usr/include/bits/time.h
+arg.o: /usr/include/bits/types.h
+arg.o: /usr/include/bits/wchar.h
+arg.o: /usr/include/bits/wordsize.h
+arg.o: /usr/include/ctype.h
+arg.o: /usr/include/endian.h
+arg.o: /usr/include/features.h
+arg.o: /usr/include/gconv.h
+arg.o: /usr/include/gnu/stubs.h
+arg.o: /usr/include/libio.h
+arg.o: /usr/include/setjmp.h
+arg.o: /usr/include/signal.h
+arg.o: /usr/include/stdio.h
+arg.o: /usr/include/sys/cdefs.h
+arg.o: /usr/include/sys/select.h
+arg.o: /usr/include/sys/stat.h
+arg.o: /usr/include/sys/sysmacros.h
+arg.o: /usr/include/sys/times.h
+arg.o: /usr/include/sys/types.h
+arg.o: /usr/include/time.h
+arg.o: /usr/include/wchar.h
+arg.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+arg.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+arg.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+arg.o: EXTERN.h
+arg.o: arg.c
+arg.o: arg.h
+arg.o: array.h
+arg.o: cmd.h
+arg.o: config.h
+arg.o: form.h
+arg.o: handy.h
+arg.o: hash.h
+arg.o: perl.h
+arg.o: search.h
+arg.o: spat.h
+arg.o: stab.h
+arg.o: str.h
+arg.o: util.h
+array.o: /usr/include/_G_config.h
+array.o: /usr/include/bits/endian.h
+array.o: /usr/include/bits/pthreadtypes.h
+array.o: /usr/include/bits/sched.h
+array.o: /usr/include/bits/select.h
+array.o: /usr/include/bits/setjmp.h
+array.o: /usr/include/bits/sigset.h
+array.o: /usr/include/bits/stat.h
+array.o: /usr/include/bits/stdio_lim.h
+array.o: /usr/include/bits/sys_errlist.h
+array.o: /usr/include/bits/time.h
+array.o: /usr/include/bits/types.h
+array.o: /usr/include/bits/wchar.h
+array.o: /usr/include/ctype.h
+array.o: /usr/include/endian.h
+array.o: /usr/include/features.h
+array.o: /usr/include/gconv.h
+array.o: /usr/include/gnu/stubs.h
+array.o: /usr/include/libio.h
+array.o: /usr/include/setjmp.h
+array.o: /usr/include/stdio.h
+array.o: /usr/include/sys/cdefs.h
+array.o: /usr/include/sys/select.h
+array.o: /usr/include/sys/stat.h
+array.o: /usr/include/sys/sysmacros.h
+array.o: /usr/include/sys/times.h
+array.o: /usr/include/sys/types.h
+array.o: /usr/include/time.h
+array.o: /usr/include/wchar.h
+array.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+array.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+array.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+array.o: EXTERN.h
+array.o: arg.h
+array.o: array.c
+array.o: array.h
+array.o: cmd.h
+array.o: config.h
+array.o: form.h
+array.o: handy.h
+array.o: hash.h
+array.o: perl.h
+array.o: search.h
+array.o: spat.h
+array.o: stab.h
+array.o: str.h
+array.o: util.h
+cmd.o: /usr/include/_G_config.h
+cmd.o: /usr/include/bits/endian.h
+cmd.o: /usr/include/bits/pthreadtypes.h
+cmd.o: /usr/include/bits/sched.h
+cmd.o: /usr/include/bits/select.h
+cmd.o: /usr/include/bits/setjmp.h
+cmd.o: /usr/include/bits/sigset.h
+cmd.o: /usr/include/bits/stat.h
+cmd.o: /usr/include/bits/stdio_lim.h
+cmd.o: /usr/include/bits/sys_errlist.h
+cmd.o: /usr/include/bits/time.h
+cmd.o: /usr/include/bits/types.h
+cmd.o: /usr/include/bits/wchar.h
+cmd.o: /usr/include/ctype.h
+cmd.o: /usr/include/endian.h
+cmd.o: /usr/include/features.h
+cmd.o: /usr/include/gconv.h
+cmd.o: /usr/include/gnu/stubs.h
+cmd.o: /usr/include/libio.h
+cmd.o: /usr/include/setjmp.h
+cmd.o: /usr/include/stdio.h
+cmd.o: /usr/include/sys/cdefs.h
+cmd.o: /usr/include/sys/select.h
+cmd.o: /usr/include/sys/stat.h
+cmd.o: /usr/include/sys/sysmacros.h
+cmd.o: /usr/include/sys/times.h
+cmd.o: /usr/include/sys/types.h
+cmd.o: /usr/include/time.h
+cmd.o: /usr/include/wchar.h
+cmd.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+cmd.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+cmd.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+cmd.o: EXTERN.h
+cmd.o: arg.h
+cmd.o: array.h
+cmd.o: cmd.c
+cmd.o: cmd.h
+cmd.o: config.h
+cmd.o: form.h
+cmd.o: handy.h
+cmd.o: hash.h
+cmd.o: perl.h
+cmd.o: search.h
+cmd.o: spat.h
+cmd.o: stab.h
+cmd.o: str.h
+cmd.o: util.h
+dump.o: /usr/include/_G_config.h
+dump.o: /usr/include/bits/endian.h
+dump.o: /usr/include/bits/pthreadtypes.h
+dump.o: /usr/include/bits/sched.h
+dump.o: /usr/include/bits/select.h
+dump.o: /usr/include/bits/setjmp.h
+dump.o: /usr/include/bits/sigset.h
+dump.o: /usr/include/bits/stat.h
+dump.o: /usr/include/bits/stdio_lim.h
+dump.o: /usr/include/bits/sys_errlist.h
+dump.o: /usr/include/bits/time.h
+dump.o: /usr/include/bits/types.h
+dump.o: /usr/include/bits/wchar.h
+dump.o: /usr/include/ctype.h
+dump.o: /usr/include/endian.h
+dump.o: /usr/include/features.h
+dump.o: /usr/include/gconv.h
+dump.o: /usr/include/gnu/stubs.h
+dump.o: /usr/include/libio.h
+dump.o: /usr/include/setjmp.h
+dump.o: /usr/include/stdio.h
+dump.o: /usr/include/sys/cdefs.h
+dump.o: /usr/include/sys/select.h
+dump.o: /usr/include/sys/stat.h
+dump.o: /usr/include/sys/sysmacros.h
+dump.o: /usr/include/sys/times.h
+dump.o: /usr/include/sys/types.h
+dump.o: /usr/include/time.h
+dump.o: /usr/include/wchar.h
+dump.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+dump.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+dump.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+dump.o: EXTERN.h
+dump.o: arg.h
+dump.o: array.h
+dump.o: cmd.h
+dump.o: config.h
+dump.o: dump.c
+dump.o: form.h
+dump.o: handy.h
+dump.o: hash.h
+dump.o: perl.h
+dump.o: search.h
+dump.o: spat.h
+dump.o: stab.h
+dump.o: str.h
+dump.o: util.h
+form.o: /usr/include/_G_config.h
+form.o: /usr/include/bits/endian.h
+form.o: /usr/include/bits/pthreadtypes.h
+form.o: /usr/include/bits/sched.h
+form.o: /usr/include/bits/select.h
+form.o: /usr/include/bits/setjmp.h
+form.o: /usr/include/bits/sigset.h
+form.o: /usr/include/bits/stat.h
+form.o: /usr/include/bits/stdio_lim.h
+form.o: /usr/include/bits/sys_errlist.h
+form.o: /usr/include/bits/time.h
+form.o: /usr/include/bits/types.h
+form.o: /usr/include/bits/wchar.h
+form.o: /usr/include/ctype.h
+form.o: /usr/include/endian.h
+form.o: /usr/include/features.h
+form.o: /usr/include/gconv.h
+form.o: /usr/include/gnu/stubs.h
+form.o: /usr/include/libio.h
+form.o: /usr/include/setjmp.h
+form.o: /usr/include/stdio.h
+form.o: /usr/include/sys/cdefs.h
+form.o: /usr/include/sys/select.h
+form.o: /usr/include/sys/stat.h
+form.o: /usr/include/sys/sysmacros.h
+form.o: /usr/include/sys/times.h
+form.o: /usr/include/sys/types.h
+form.o: /usr/include/time.h
+form.o: /usr/include/wchar.h
+form.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+form.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+form.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+form.o: EXTERN.h
+form.o: arg.h
+form.o: array.h
+form.o: cmd.h
+form.o: config.h
+form.o: form.c
+form.o: form.h
+form.o: handy.h
+form.o: hash.h
+form.o: perl.h
+form.o: search.h
+form.o: spat.h
+form.o: stab.h
+form.o: str.h
+form.o: util.h
+hash.o: /usr/include/_G_config.h
+hash.o: /usr/include/bits/endian.h
+hash.o: /usr/include/bits/pthreadtypes.h
+hash.o: /usr/include/bits/sched.h
+hash.o: /usr/include/bits/select.h
+hash.o: /usr/include/bits/setjmp.h
+hash.o: /usr/include/bits/sigset.h
+hash.o: /usr/include/bits/stat.h
+hash.o: /usr/include/bits/stdio_lim.h
+hash.o: /usr/include/bits/sys_errlist.h
+hash.o: /usr/include/bits/time.h
+hash.o: /usr/include/bits/types.h
+hash.o: /usr/include/bits/wchar.h
+hash.o: /usr/include/ctype.h
+hash.o: /usr/include/endian.h
+hash.o: /usr/include/features.h
+hash.o: /usr/include/gconv.h
+hash.o: /usr/include/gnu/stubs.h
+hash.o: /usr/include/libio.h
+hash.o: /usr/include/setjmp.h
+hash.o: /usr/include/stdio.h
+hash.o: /usr/include/sys/cdefs.h
+hash.o: /usr/include/sys/select.h
+hash.o: /usr/include/sys/stat.h
+hash.o: /usr/include/sys/sysmacros.h
+hash.o: /usr/include/sys/times.h
+hash.o: /usr/include/sys/types.h
+hash.o: /usr/include/time.h
+hash.o: /usr/include/wchar.h
+hash.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+hash.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+hash.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+hash.o: EXTERN.h
+hash.o: arg.h
+hash.o: array.h
+hash.o: cmd.h
+hash.o: config.h
+hash.o: form.h
+hash.o: handy.h
+hash.o: hash.c
+hash.o: hash.h
+hash.o: perl.h
+hash.o: search.h
+hash.o: spat.h
+hash.o: stab.h
+hash.o: str.h
+hash.o: util.h
+search.o: /usr/include/_G_config.h
+search.o: /usr/include/bits/endian.h
+search.o: /usr/include/bits/pthreadtypes.h
+search.o: /usr/include/bits/sched.h
+search.o: /usr/include/bits/select.h
+search.o: /usr/include/bits/setjmp.h
+search.o: /usr/include/bits/sigset.h
+search.o: /usr/include/bits/stat.h
+search.o: /usr/include/bits/stdio_lim.h
+search.o: /usr/include/bits/sys_errlist.h
+search.o: /usr/include/bits/time.h
+search.o: /usr/include/bits/types.h
+search.o: /usr/include/bits/wchar.h
+search.o: /usr/include/ctype.h
+search.o: /usr/include/endian.h
+search.o: /usr/include/features.h
+search.o: /usr/include/gconv.h
+search.o: /usr/include/gnu/stubs.h
+search.o: /usr/include/libio.h
+search.o: /usr/include/setjmp.h
+search.o: /usr/include/stdio.h
+search.o: /usr/include/sys/cdefs.h
+search.o: /usr/include/sys/select.h
+search.o: /usr/include/sys/stat.h
+search.o: /usr/include/sys/sysmacros.h
+search.o: /usr/include/sys/times.h
+search.o: /usr/include/sys/types.h
+search.o: /usr/include/time.h
+search.o: /usr/include/wchar.h
+search.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+search.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+search.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+search.o: EXTERN.h
+search.o: INTERN.h
+search.o: arg.h
+search.o: array.h
+search.o: cmd.h
+search.o: config.h
+search.o: form.h
+search.o: handy.h
+search.o: hash.h
+search.o: perl.h
+search.o: search.c
+search.o: search.h
+search.o: spat.h
+search.o: stab.h
+search.o: str.h
+search.o: util.h
+stab.o: /usr/include/_G_config.h
+stab.o: /usr/include/asm/ptrace.h
+stab.o: /usr/include/asm/sigcontext.h
+stab.o: /usr/include/bits/endian.h
+stab.o: /usr/include/bits/pthreadtypes.h
+stab.o: /usr/include/bits/sched.h
+stab.o: /usr/include/bits/select.h
+stab.o: /usr/include/bits/setjmp.h
+stab.o: /usr/include/bits/sigaction.h
+stab.o: /usr/include/bits/sigcontext.h
+stab.o: /usr/include/bits/siginfo.h
+stab.o: /usr/include/bits/signum.h
+stab.o: /usr/include/bits/sigset.h
+stab.o: /usr/include/bits/sigstack.h
+stab.o: /usr/include/bits/sigthread.h
+stab.o: /usr/include/bits/stat.h
+stab.o: /usr/include/bits/stdio_lim.h
+stab.o: /usr/include/bits/sys_errlist.h
+stab.o: /usr/include/bits/time.h
+stab.o: /usr/include/bits/types.h
+stab.o: /usr/include/bits/wchar.h
+stab.o: /usr/include/bits/wordsize.h
+stab.o: /usr/include/ctype.h
+stab.o: /usr/include/endian.h
+stab.o: /usr/include/features.h
+stab.o: /usr/include/gconv.h
+stab.o: /usr/include/gnu/stubs.h
+stab.o: /usr/include/libio.h
+stab.o: /usr/include/setjmp.h
+stab.o: /usr/include/signal.h
+stab.o: /usr/include/stdio.h
+stab.o: /usr/include/sys/cdefs.h
+stab.o: /usr/include/sys/select.h
+stab.o: /usr/include/sys/stat.h
+stab.o: /usr/include/sys/sysmacros.h
+stab.o: /usr/include/sys/times.h
+stab.o: /usr/include/sys/types.h
+stab.o: /usr/include/time.h
+stab.o: /usr/include/wchar.h
+stab.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+stab.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+stab.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+stab.o: EXTERN.h
+stab.o: arg.h
+stab.o: array.h
+stab.o: cmd.h
+stab.o: config.h
+stab.o: form.h
+stab.o: handy.h
+stab.o: hash.h
+stab.o: perl.h
+stab.o: search.h
+stab.o: spat.h
+stab.o: stab.c
+stab.o: stab.h
+stab.o: str.h
+stab.o: util.h
+str.o: /usr/include/_G_config.h
+str.o: /usr/include/bits/endian.h
+str.o: /usr/include/bits/pthreadtypes.h
+str.o: /usr/include/bits/sched.h
+str.o: /usr/include/bits/select.h
+str.o: /usr/include/bits/setjmp.h
+str.o: /usr/include/bits/sigset.h
+str.o: /usr/include/bits/stat.h
+str.o: /usr/include/bits/stdio_lim.h
+str.o: /usr/include/bits/sys_errlist.h
+str.o: /usr/include/bits/time.h
+str.o: /usr/include/bits/types.h
+str.o: /usr/include/bits/wchar.h
+str.o: /usr/include/ctype.h
+str.o: /usr/include/endian.h
+str.o: /usr/include/features.h
+str.o: /usr/include/gconv.h
+str.o: /usr/include/gnu/stubs.h
+str.o: /usr/include/libio.h
+str.o: /usr/include/setjmp.h
+str.o: /usr/include/stdio.h
+str.o: /usr/include/sys/cdefs.h
+str.o: /usr/include/sys/select.h
+str.o: /usr/include/sys/stat.h
+str.o: /usr/include/sys/sysmacros.h
+str.o: /usr/include/sys/times.h
+str.o: /usr/include/sys/types.h
+str.o: /usr/include/time.h
+str.o: /usr/include/wchar.h
+str.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+str.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+str.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+str.o: EXTERN.h
+str.o: arg.h
+str.o: array.h
+str.o: cmd.h
+str.o: config.h
+str.o: form.h
+str.o: handy.h
+str.o: hash.h
+str.o: perl.h
+str.o: search.h
+str.o: spat.h
+str.o: stab.h
+str.o: str.c
+str.o: str.h
+str.o: util.h
+util.o: /usr/include/_G_config.h
+util.o: /usr/include/bits/endian.h
+util.o: /usr/include/bits/pthreadtypes.h
+util.o: /usr/include/bits/sched.h
+util.o: /usr/include/bits/select.h
+util.o: /usr/include/bits/setjmp.h
+util.o: /usr/include/bits/sigset.h
+util.o: /usr/include/bits/stat.h
+util.o: /usr/include/bits/stdio_lim.h
+util.o: /usr/include/bits/sys_errlist.h
+util.o: /usr/include/bits/time.h
+util.o: /usr/include/bits/types.h
+util.o: /usr/include/bits/wchar.h
+util.o: /usr/include/ctype.h
+util.o: /usr/include/endian.h
+util.o: /usr/include/features.h
+util.o: /usr/include/gconv.h
+util.o: /usr/include/gnu/stubs.h
+util.o: /usr/include/libio.h
+util.o: /usr/include/setjmp.h
+util.o: /usr/include/stdio.h
+util.o: /usr/include/sys/cdefs.h
+util.o: /usr/include/sys/select.h
+util.o: /usr/include/sys/stat.h
+util.o: /usr/include/sys/sysmacros.h
+util.o: /usr/include/sys/times.h
+util.o: /usr/include/sys/types.h
+util.o: /usr/include/time.h
+util.o: /usr/include/wchar.h
+util.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stdarg.h
+util.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/stddef.h
+util.o: /usr/lib/gcc-lib/powerpc-linux/2.95.4/include/va-ppc.h
+util.o: EXTERN.h
+util.o: INTERN.h
+util.o: arg.h
+util.o: array.h
+util.o: cmd.h
+util.o: config.h
+util.o: form.h
+util.o: handy.h
+util.o: hash.h
+util.o: perl.h
+util.o: search.h
+util.o: spat.h
+util.o: stab.h
+util.o: str.h
+util.o: util.c
+util.o: util.h
+version.o: patchlevel.h
+version.o: version.c
+Makefile: Makefile.SH config.sh ; /bin/sh Makefile.SH
+makedepend: makedepend.SH config.sh ; /bin/sh makedepend.SH
+# WARNING: Put nothing here or make depend will gobble it up!
diff --git a/Makefile.SH b/Makefile.SH
index 8845396539..b0ec91c82a 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -55,7 +55,7 @@ mallocsrc = $mallocsrc
mallocobj = $mallocobj
SLN = $sln
-libs = $libnm -lm
+libs = $libs $cryptlib $libnm -lm
!GROK!THIS!
cat >>Makefile <<'!NO!SUBS!'
diff --git a/README b/README
index b5d95e1776..75e3acf5e6 100644
--- a/README
+++ b/README
@@ -68,16 +68,13 @@ Installation
"make install" to create the awk to perl and sed to perl translators.
9) IMPORTANT! Help save the world! Communicate any problems and suggested
- patches to me, lwall@jpl-devvax.jpl.nasa.gov (Larry Wall), so we can
- keep the world in sync. If you have a problem, there's someone else
- out there who either has had or will have the same problem.
+ patches to perl1-porters@perl.org so we can keep the world in sync.
+ If you have a problem, there's someone else out there who either has
+ had or will have the same problem.
If possible, send in patches such that the patch program will apply them.
Context diffs are the best, then normal diffs. Don't send ed scripts--
I've probably changed my copy since the version you have.
- Watch for perl patches in comp.sources.bugs. Patches will generally be
- in a form usable by the patch program. If you are just now bringing up
- perl and aren't sure how many patches there are, write to me and I'll
- send any you don't have. Your current patch level is shown in patchlevel.h.
+ Your current patch level is shown in patchlevel.h.
diff --git a/all b/all
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/all
diff --git a/arg.c b/arg.c
index 74da53c1da..abbb304300 100644
--- a/arg.c
+++ b/arg.c
@@ -1057,7 +1057,7 @@ STR ***retary;
apush(ary,str_make(str_get(hiterval(entry))));
}
if (retary) { /* array wanted */
- sarg = (STR**)saferealloc((char*)sarg,(max+2)*sizeof(STR*));
+ sarg = (STR**)safemalloc((max+2)*sizeof(STR*));
sarg[0] = Nullstr;
sarg[max+1] = Nullstr;
for (i = 1; i <= max; i++)
@@ -1084,7 +1084,7 @@ STR ***retary;
if (retary) { /* array wanted */
if (entry) {
- sarg = (STR**)saferealloc((char*)sarg,4*sizeof(STR*));
+ sarg = (STR**)safemalloc(4*sizeof(STR*));
sarg[0] = Nullstr;
sarg[3] = Nullstr;
sarg[1] = mystr = str_make(hiterkey(entry));
@@ -1092,7 +1092,7 @@ STR ***retary;
*retary = sarg;
}
else {
- sarg = (STR**)saferealloc((char*)sarg,2*sizeof(STR*));
+ sarg = (STR**)safemalloc(2*sizeof(STR*));
sarg[0] = Nullstr;
sarg[1] = retstr = Nullstr;
*retary = sarg;
@@ -1959,7 +1959,7 @@ STR ***retary; /* where to return an array to, null if nowhere */
retary = Null(STR***); /* do_stat already did retary */
goto donumset;
case O_CRYPT:
-#ifdef CRYPT
+#ifdef HAS_CRYPT
tmps = str_get(sarg[1]);
str_set(str,crypt(tmps,str_get(sarg[2])));
#else
diff --git a/array.c b/array.c
index 156b78378f..eb29917a9e 100644
--- a/array.c
+++ b/array.c
@@ -34,7 +34,7 @@ STR *val;
if (key < 0)
return FALSE;
if (key > ar->ary_max) {
- int newmax = key + ar->ary_max / 5;
+ int newmax = key + ar->ary_max;
ar->ary_array = (STR**)saferealloc((char*)ar->ary_array,
(newmax+1) * sizeof(STR*));
diff --git a/cmd.h b/cmd.h
index 9a019f2c74..14a5dbd419 100644
--- a/cmd.h
+++ b/cmd.h
@@ -111,7 +111,7 @@ struct cmd {
EXT CMD *main_root INIT(Nullcmd);
EXT CMD *eval_root INIT(Nullcmd);
-EXT struct compcmd {
+struct compcmd {
CMD *comp_true;
CMD *comp_alt;
};
diff --git a/config.h b/config.h
new file mode 100644
index 0000000000..333d4bbc62
--- /dev/null
+++ b/config.h
@@ -0,0 +1,190 @@
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from config.sh, which is generally produced by
+ * 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.SH 821 2002-10-22 11:14:00Z richardc $
+ */
+
+/*
+ * Package name : perl
+ * Source directory : .
+ * Configuration time: Wed Dec 18 15:31:08 PST 2002
+ * Configured by : schwern
+ * Target system : linux blackrider 2.4.19 #1 wed nov 13 02:17:13 est 2002 ppc 740750 gnulinux
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* EUNICE:
+ * This symbol, if defined, indicates that the program is being compiled
+ * under the EUNICE package under VMS. The program will need to handle
+ * things like files that don't go away the first time you unlink them,
+ * due to version numbering. It will also need to compensate for lack
+ * of a respectable link() command.
+ */
+/*#define EUNICE / **/
+
+/* CPP:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp".
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPP "/usr/bin/cpp"
+#define CPPMINUS "-"
+
+/* SED:
+ * Your sed binary
+ */
+#define SED "/bin/sed"
+
+/* CHARSPRINTF:
+ * This symbol is defined if this system declares "char *sprintf()" in
+ * stdio.h. The trend seems to be to declare it as "int sprintf()". It
+ * is up to the package author to declare sprintf correctly based on the
+ * symbol.
+ */
+/*#define CHARSPRINTF / **/
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+#define HAS_CRYPT /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#define HAS_RENAME /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#define HAS_SELECT /**/
+
+/* HAS_STAT:
+ * This symbol, if defined, indicates that the stat routine is
+ * available to get file status.
+ */
+#define HAS_STAT /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+/*#define USE_STAT_BLOCKS / **/
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+/*#define USE_STDIO_PTR / **/
+#ifdef USE_STDIO_PTR
+#if defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
+#endif
+#endif
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#define USE_STRUCT_COPY /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#define HAS_SYSTEM /**/
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* TM_IN_SYS:
+ * This symbol is defined if this system declares "struct tm" in
+ * in <sys/time.h> rather than <time.h>. We can't just say
+ * -I/usr/include/sys because some systems have both time files, and
+ * the -I trick gets the wrong one.
+ */
+/*#define TM_IN_SYS / **/
+
+/* VOIDSIG:
+ * This symbol is defined if this system declares "void (*signal(...))()" in
+ * signal.h. The old way was to declare it as "int (*signal(...))()". It
+ * is up to the package author to declare things correctly based on the
+ * symbol.
+ */
+#define VOIDSIG /**/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#define CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR char /**/
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED 15
+#endif
+#define VOIDFLAGS 15
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+#endif
diff --git a/config.h.SH b/config.h.SH
deleted file mode 100644
index a1778a4568..0000000000
--- a/config.h.SH
+++ /dev/null
@@ -1,161 +0,0 @@
-case $CONFIG in
-'')
- if test ! -f config.sh; then
- ln ../config.sh . || \
- ln ../../config.sh . || \
- ln ../../../config.sh . || \
- (echo "Can't find config.sh."; exit 1)
- echo "Using config.sh from above..."
- fi
- . config.sh
- ;;
-esac
-echo "Extracting config.h (with variable substitutions)"
-cat <<!GROK!THIS! >config.h
-/* config.h
- * This file was produced by running the config.h.SH script, which
- * gets its values from config.sh, which is generally produced by
- * 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.
- */
-
-
-/* EUNICE:
- * This symbol, if defined, indicates that the program is being compiled
- * under the EUNICE package under VMS. The program will need to handle
- * things like files that don't go away the first time you unlink them,
- * due to version numbering. It will also need to compensate for lack
- * of a respectable link() command.
- */
-/* VMS:
- * This symbol, if defined, indicates that the program is running under
- * VMS. It is currently only set in conjunction with the EUNICE symbol.
- */
-#$d_eunice EUNICE /**/
-#$d_eunice VMS /**/
-
-/* CPP:
- * This symbol contains the first part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. Typical value of "cc -E" or "/lib/cpp".
- */
-/* CPPMINUS:
- * This symbol contains the second part of the string which will invoke
- * the C preprocessor on the standard input and produce to standard
- * output. This symbol will have the value "-" if CPP needs a minus
- * to specify standard input, otherwise the value is "".
- */
-#define CPP "$cpp"
-#define CPPMINUS "$cppminus"
-
-/* BCOPY:
- * This symbol, if defined, indicates that the bcopy routine is available
- * to copy blocks of memory. Otherwise you should probably use memcpy().
- */
-#$d_bcopy BCOPY /**/
-
-/* CHARSPRINTF:
- * This symbol is defined if this system declares "char *sprintf()" in
- * stdio.h. The trend seems to be to declare it as "int sprintf()". It
- * is up to the package author to declare sprintf correctly based on the
- * symbol.
- */
-#$d_charsprf CHARSPRINTF /**/
-
-/* CRYPT:
- * This symbol, if defined, indicates that the crypt routine is available
- * to encrypt passwords and the like.
- */
-#$d_crypt CRYPT /**/
-
-/* index:
- * This preprocessor symbol is defined, along with rindex, if the system
- * uses the strchr and strrchr routines instead.
- */
-/* rindex:
- * This preprocessor symbol is defined, along with index, if the system
- * uses the strchr and strrchr routines instead.
- */
-#$d_index index strchr /* cultural */
-#$d_index rindex strrchr /* differences? */
-
-/* STATBLOCKS:
- * This symbol is defined if this system has a stat structure declaring
- * st_blksize and st_blocks.
- */
-#$d_statblks STATBLOCKS /**/
-
-/* STDSTDIO:
- * This symbol is defined if this system has a FILE structure declaring
- * _ptr and _cnt in stdio.h.
- */
-#$d_stdstdio STDSTDIO /**/
-
-/* STRUCTCOPY:
- * This symbol, if defined, indicates that this C compiler knows how
- * to copy structures. If undefined, you'll need to use a block copy
- * routine of some sort instead.
- */
-#$d_strctcpy STRUCTCOPY /**/
-
-/* SYMLINK:
- * This symbol, if defined, indicates that the symlink routine is available
- * to create symbolic links.
- */
-#$d_symlink SYMLINK /**/
-
-/* TMINSYS:
- * This symbol is defined if this system declares "struct tm" in
- * in <sys/time.h> rather than <time.h>. We can't just say
- * -I/usr/include/sys because some systems have both time files, and
- * the -I trick gets the wrong one.
- */
-#$d_tminsys TMINSYS /**/
-
-/* vfork:
- * This symbol, if defined, remaps the vfork routine to fork if the
- * vfork() routine isn't supported here.
- */
-#$d_vfork vfork fork /**/
-
-/* VOIDSIG:
- * This symbol is defined if this system declares "void (*signal())()" in
- * signal.h. The old way was to declare it as "int (*signal())()". It
- * is up to the package author to declare things correctly based on the
- * symbol.
- */
-#$d_voidsig VOIDSIG /**/
-
-/* STDCHAR:
- * This symbol is defined to be the type of char used in stdio.h.
- * It has the values "unsigned char" or "char".
- */
-#define STDCHAR $stdchar /**/
-
-/* VOIDFLAGS:
- * This symbol indicates how much support of the void type is given by this
- * compiler. What various bits mean:
- *
- * 1 = supports declaration of void
- * 2 = supports arrays of pointers to functions returning void
- * 4 = supports comparisons between pointers to void functions and
- * addresses of void functions
- *
- * The package designer should define VOIDUSED to indicate the requirements
- * of the package. This can be done either by #defining VOIDUSED before
- * including config.h, or by defining defvoidused in Myinit.U. If the
- * level of void support necessary is not present, defines void to int.
- */
-#ifndef VOIDUSED
-#define VOIDUSED $defvoidused
-#endif
-#define VOIDFLAGS $voidflags
-#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
-#$define void int /* is void to be avoided? */
-#$define M_VOID /* Xenix strikes again */
-#endif
-
-!GROK!THIS!
diff --git a/config.H b/config_H
index bb9eb6b09a..bb9eb6b09a 100644
--- a/config.H
+++ b/config_H
diff --git a/config_h.SH b/config_h.SH
new file mode 100644
index 0000000000..fb37fac75c
--- /dev/null
+++ b/config_h.SH
@@ -0,0 +1,209 @@
+case $CONFIG 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 config.sh."; exit 1
+ fi
+ . $TOP/config.sh
+ ;;
+esac
+case "$0" in
+*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
+esac
+echo "Extracting config.h (with variable substitutions)"
+sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
+/*
+ * This file was produced by running the config_h.SH script, which
+ * gets its values from config.sh, which is generally produced by
+ * 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.SH 821 2002-10-22 11:14:00Z richardc $
+ */
+
+/*
+ * Package name : $package
+ * Source directory : $src
+ * Configuration time: $cf_time
+ * Configured by : $cf_by
+ * Target system : $myuname
+ */
+
+#ifndef _config_h_
+#define _config_h_
+
+/* EUNICE:
+ * This symbol, if defined, indicates that the program is being compiled
+ * under the EUNICE package under VMS. The program will need to handle
+ * things like files that don't go away the first time you unlink them,
+ * due to version numbering. It will also need to compensate for lack
+ * of a respectable link() command.
+ */
+#$d_eunice EUNICE /**/
+
+/* CPP:
+ * This symbol contains the first part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. Typical value of "cc -E" or "/lib/cpp".
+ */
+/* CPPMINUS:
+ * This symbol contains the second part of the string which will invoke
+ * the C preprocessor on the standard input and produce to standard
+ * output. This symbol will have the value "-" if CPPSTDIN needs a minus
+ * to specify standard input, otherwise the value is "".
+ */
+#define CPP "$cpp"
+#define CPPMINUS "$cppminus"
+
+/* SED:
+ * Your sed binary
+ */
+#define SED "$sed"
+
+/* CHARSPRINTF:
+ * This symbol is defined if this system declares "char *sprintf()" in
+ * stdio.h. The trend seems to be to declare it as "int sprintf()". It
+ * is up to the package author to declare sprintf correctly based on the
+ * symbol.
+ */
+#$d_charsprf CHARSPRINTF /**/
+
+/* HAS_CRYPT:
+ * This symbol, if defined, indicates that the crypt routine is available
+ * to encrypt passwords and the like.
+ */
+#$d_crypt HAS_CRYPT /**/
+
+/* HAS_RENAME:
+ * This symbol, if defined, indicates that the rename routine is available
+ * to rename files. Otherwise you should do the unlink(), link(), unlink()
+ * trick.
+ */
+#$d_rename HAS_RENAME /**/
+
+/* HAS_SELECT:
+ * This symbol, if defined, indicates that the select routine is
+ * available to select active file descriptors. If the timeout field
+ * is used, <sys/time.h> may need to be included.
+ */
+#$d_select HAS_SELECT /**/
+
+/* HAS_STAT:
+ * This symbol, if defined, indicates that the stat routine is
+ * available to get file status.
+ */
+#$d_stat HAS_STAT /**/
+
+/* USE_STAT_BLOCKS:
+ * This symbol is defined if this system has a stat structure declaring
+ * st_blksize and st_blocks.
+ */
+#$d_statblks USE_STAT_BLOCKS /**/
+
+/* USE_STDIO_PTR:
+ * This symbol is defined if the _ptr and _cnt fields (or similar)
+ * of the stdio FILE structure can be used to access the stdio buffer
+ * for a file handle. If this is defined, then the FILE_ptr(fp)
+ * and FILE_cnt(fp) macros will also be defined and should be used
+ * to access these fields.
+ */
+#$d_stdstdio USE_STDIO_PTR /**/
+#ifdef USE_STDIO_PTR
+#if defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE)
+#endif
+#endif
+
+/* USE_STRUCT_COPY:
+ * This symbol, if defined, indicates that this C compiler knows how
+ * to copy structures. If undefined, you'll need to use a block copy
+ * routine of some sort instead.
+ */
+#$d_strctcpy USE_STRUCT_COPY /**/
+
+/* HAS_SYSTEM:
+ * This symbol, if defined, indicates that the system routine is
+ * available to issue a shell command.
+ */
+#$d_system HAS_SYSTEM /**/
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#$d_times HAS_TIMES /**/
+
+/* TM_IN_SYS:
+ * This symbol is defined if this system declares "struct tm" in
+ * in <sys/time.h> rather than <time.h>. We can't just say
+ * -I/usr/include/sys because some systems have both time files, and
+ * the -I trick gets the wrong one.
+ */
+#$d_tminsys TM_IN_SYS /**/
+
+/* VOIDSIG:
+ * This symbol is defined if this system declares "void (*signal(...))()" in
+ * signal.h. The old way was to declare it as "int (*signal(...))()". It
+ * is up to the package author to declare things correctly based on the
+ * symbol.
+ */
+#$d_voidsig VOIDSIG /**/
+
+/* CAN_PROTOTYPE:
+ * If defined, this macro indicates that the C compiler can handle
+ * function prototypes.
+ */
+/* _:
+ * This macro is used to declare function parameters for folks who want
+ * to make declarations with prototypes using a different style than
+ * the above macros. Use double parentheses. For example:
+ *
+ * int main _((int argc, char *argv[]));
+ */
+#$prototype CAN_PROTOTYPE /**/
+#ifdef CAN_PROTOTYPE
+#define _(args) args
+#else
+#define _(args) ()
+#endif
+
+/* STDCHAR:
+ * This symbol is defined to be the type of char used in stdio.h.
+ * It has the values "unsigned char" or "char".
+ */
+#define STDCHAR $stdchar /**/
+
+/* VOIDFLAGS:
+ * This symbol indicates how much support of the void type is given by this
+ * compiler. What various bits mean:
+ *
+ * 1 = supports declaration of void
+ * 2 = supports arrays of pointers to functions returning void
+ * 4 = supports comparisons between pointers to void functions and
+ * addresses of void functions
+ * 8 = suports declaration of generic void pointers
+ *
+ * The package designer should define VOIDUSED to indicate the requirements
+ * of the package. This can be done either by #defining VOIDUSED before
+ * including config.h, or by defining defvoidused in Myinit.U. If the
+ * latter approach is taken, only those flags will be tested. If the
+ * level of void support necessary is not present, defines void to int.
+ */
+#ifndef VOIDUSED
+#define VOIDUSED $defvoidused
+#endif
+#define VOIDFLAGS $voidflags
+#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+#define void int /* is void to be avoided? */
+#define M_VOID /* Xenix strikes again */
+#endif
+
+#endif
+!GROK!THIS!
diff --git a/form.c b/form.c
index 8894621c9f..0c7af03cea 100644
--- a/form.c
+++ b/form.c
@@ -17,7 +17,7 @@
#define CHKLEN(allow) \
if (d - orec->o_str + (allow) >= curlen) { \
curlen = d - orec->o_str; \
- GROWSTR(&orec->o_str,&orec->o_len,orec->o_len + (allow)); \
+ GROWSTR(&orec->o_str,&orec->o_len,orec->o_len + (allow) + 1); \
d = orec->o_str + curlen; /* in case it moves */ \
curlen = orec->o_len - 2; \
}
diff --git a/hints/3b1.sh b/hints/3b1.sh
new file mode 100644
index 0000000000..991348af3e
--- /dev/null
+++ b/hints/3b1.sh
@@ -0,0 +1,15 @@
+d_voidsig='undef'
+d_tosignal='int'
+gidtype='int'
+groupstype='int'
+uidtype='int'
+# Note that 'Configure' is run from 'UU', hence the strange 'ln'
+# command.
+for i in .. ../x2p
+do
+ rm -f $i/3b1cc
+ ln ../hints/3b1cc $i
+done
+echo "\nIf you want to use the 3b1 shared libraries, complete this script then" >&4
+echo "read the header in 3b1cc. [Type carriage return to continue]\c" >&4
+read vch
diff --git a/hints/3b1cc b/hints/3b1cc
new file mode 100644
index 0000000000..0001e046b8
--- /dev/null
+++ b/hints/3b1cc
@@ -0,0 +1,88 @@
+# To incorporate the 7300/3b1 shared library, run this script in place
+# of 'CC'.
+# You can skip this is you have the shcc program installed as cc in
+# your path.
+# First: Run 'Configure' through to the end and run 'make depend'.
+# Second: Edit 'makefile' ( not Makefile ) and set CC = 3b1cc.
+# Third: Edit 'x2p/makefile' and set CC = 3b1cc.
+#
+# Do not use '3b1cc' as the default compiler. The call to the default
+# compiler is used by 'perl' and will not be available when running
+# 'perl'.
+#
+# Note: This script omits libraries which are redundant in the shared
+# library. It is an excerpt from a grander version available upon
+# request from "zebra!vern" or "vern@zebra.alphacdc.com".
+
+CC="cc"
+LIBS=
+INCL=
+
+LD="ld"
+SHAREDLIB="/lib/crt0s.o /lib/shlib.ifile"
+
+# Local variables
+COBJS=
+LOBJS=
+TARG=
+FLAGS=
+CMD=
+
+# These are libraries which are incorporated in the shared library
+OMIT="-lmalloc"
+
+# These routines are in libc.a but not in the shared library
+if [ ! -f vsprintf.o -o ! -f doprnt.o ]
+then
+ echo "Extracting vsprintf.o from libc.a"
+ ar -x /lib/libc.a vsprintf.o doprnt.o
+fi
+
+CMD="$CC"
+while [ $# -gt 0 ]
+do
+ case $1 in
+ -c) CFLAG=$1;;
+ -o) CFLAG=$1
+ shift
+ TARG="$1";;
+ -l*) match=false
+ for i in $OMIT
+ do
+ [ "$i" = "$1" ] && match=true
+ done
+ [ "$match" != false ] || LIBS="$LIBS $1";;
+ -*) FLAGS="$FLAGS $1";;
+ *.c) COBJS="$COBJS $1";;
+ *.o) LOBJS="$LOBJS $1";;
+ *) TARG="$1";;
+ esac
+ shift
+done
+
+if [ -n "$COBJS" ]
+then
+ CMD="$CMD $FLAGS $INCL $LPATHS $LIBS $COBJS $CFLAG $TARG"
+elif [ -n "$LOBJS" ]
+then
+ LOBJS="$LOBJS vsprintf.o doprnt.o"
+ CMD="$LD -r $LOBJS $LPATHS $LIBS -o temp.o"
+ echo "\t$CMD"
+ $CMD
+ CMD="$LD -s temp.o $SHAREDLIB -o $TARG"
+ echo "\t$CMD"
+ $CMD
+ ccrslt=$?
+ if [ $ccrslt -ne 0 ]
+ then
+ exit $ccrslt
+ fi
+ CMD="rm -f temp.o"
+else
+ exit 1
+fi
+echo "\t$CMD"
+$CMD
+ccrslt=$?
+rm -f $$.c
+exit $ccrslt
diff --git a/hints/README.hints b/hints/README.hints
new file mode 100644
index 0000000000..1d0f35cccd
--- /dev/null
+++ b/hints/README.hints
@@ -0,0 +1,318 @@
+=head1 NAME
+
+README.hints
+
+=head1 DESCRIPTION
+
+These files are used by Configure to set things which Configure either
+can't or doesn't guess properly. Most of these hint files have been
+tested with at least some version of perl5, but some are still left
+over from perl4.
+
+Please send any problems or suggested changes to perlbug@perl.org.
+
+=head1 Hint file naming convention.
+
+Each hint file name should have only
+one '.'. (This is for portability to non-unix file systems.) Names
+should also fit in <= 14 characters, for portability to older SVR3
+systems. File names are of the form $osname_$osvers.sh, with all '.'
+changed to '_', and all characters (such as '/') that don't belong in
+Unix filenames omitted.
+
+For example, consider Sun OS 4.1.3. Configure determines $osname=sunos
+(all names are converted to lower case) and $osvers=4.1.3. Configure
+will search for an appropriate hint file in the following order:
+
+ sunos_4_1_3.sh
+ sunos_4_1.sh
+ sunos_4.sh
+ sunos.sh
+
+If you need to create a hint file, please try to use as general a name
+as possible and include minor version differences inside case or test
+statements. For example, for IRIX 6.X, we have the following hints
+files:
+
+ irix_6_0.sh
+ irix_6_1.sh
+ irix_6.sh
+
+That is, 6.0 and 6.1 have their own special hints, but 6.2, 6.3, and
+up are all handled by the same irix_6.sh. That way, we don't have to
+make a new hint file every time the IRIX O/S is upgraded.
+
+If you need to test for specific minor version differences in your
+hints file, be sure to include a default choice. (See aix.sh for one
+example.) That way, if you write a hint file for foonix 3.2, it might
+still work without any changes when foonix 3.3 is released.
+
+Please also comment carefully on why the different hints are needed.
+That way, a future version of Configure may be able to automatically
+detect what is needed.
+
+A glossary of config.sh variables is in the file Porting/Glossary.
+
+=head1 Setting variables
+
+=head2 Optimizer
+
+If you want to set a variable, try to allow for Configure command-line
+overrides. For example, suppose you think the default optimizer
+setting to be -O2 for a particular platform. You should allow for
+command line overrides with something like
+
+ case "$optimize" in
+ '') optimize='-O2' ;;
+ esac
+
+or, if your system has a decent test(1) command,
+
+ test -z "$optimize" && optimize='-O2'
+
+This allows the user to select a different optimization level, e.g.
+-O6 or -g.
+
+=head2 Compiler and Linker flags
+
+If you want to set $ccflags or $ldflags, you should append to the existing
+value to allow Configure command-line settings, e.g. use
+
+ ccflags="$ccflags -DANOTHER_OPTION_I_NEED"
+
+so that the user can do something like
+
+ sh Configure -Dccflags='FIX_NEGATIVE_ZERO'
+
+and have the FIX_NEGATIVE_ZERO value preserved by the hints file.
+
+=head2 Libraries
+
+Configure will attempt to use the libraries listed in the variable
+$libswanted. If necessary, you should remove broken libraries from
+that list, or add additional libraries to that list. You should
+*not* simply set $libs -- that ignores the possibilities of local
+variations. For example, a setting of libs='-lgdbm -lm -lc' would
+fail if another user were to try to compile Perl on a system without
+GDBM but with Berkeley DB. See hints/dec_osf.sh and hints/solaris_2.sh
+for examples.
+
+=head2 Other
+
+In general, try to avoid hard-wiring something that Configure will
+figure out anyway. Also try to allow for Configure command-line
+overrides.
+
+=head1 Working around compiler bugs
+
+Occasionally, the root cause of a bug in perl turns out to be due to a bug
+in the compiler. Often, changing the compilation options (particularly the
+optimization level) can work around the bug. However, if you try to do
+this on the command line, you will be changing the compilation options for
+every component of perl, which can really hurt perl's performance.
+Instead, consider placing a test case into the hints directory to detect
+whether the compiler bug is present, and add logic to the hints file to
+take a specific and appropriate action
+
+=head2 Test-case conventions
+
+Test cases should be named "tNNN.c", where NNN is the next unused sequence
+number. The test case must be executable and should display a message
+containing the word "fails" when the compiler bug is present. It should
+display the word "works" with the compiler bug is not present. The test
+cases should be liberally commented and may be used by any hints file that
+needs them. See the first hints file (t001.c) for an example.
+
+=head2 Hint file processing
+
+The hint file must define a call-back unit (see below) that will compile,
+link, and run the test case, and then check for the presence of the string
+"fails" in the output. If it finds this string, it sets a special variable
+to specify the compilation option(s) for the specific perl source file that
+is affected by the bug.
+
+The special variable is named "XXX_cflags" where "XXX" is the name of
+the source file (without the ".c" suffix). The value of this variable
+is the string "optimize=YYY", where "YYY" is the compilation option
+necessary to work around the bug. The default value of this variable
+is "-O" (letter O), which specifies that the C compiler should compile
+the source program at the default optimization level. If you can
+avoid the compiler bug by disabling optimization, just reset the
+"optimize" variable to the null string. Sometimes a bug is present at
+a higher optimization level (say, O3) and not present at a lower
+optimization level (say, O1). In this case, you should specify the
+highest optimization level at which the bug is not present, so that
+you will retain as many of the benefits of code optimization as
+possible.
+
+For example, if the pp_pack.c source file must be compiled at
+optimization level 0 to work around a problem on a particular
+platform, one of the statements
+
+ pp_pack_cflags="optimize=-O0" or
+ pp_pack_cflags="optimize="
+
+will do the trick, since level 0 is equivalent to no optimization.
+(In case your printer or display device does not distinguish the
+letter O from the digit 0, that is the letter O followed by the digit
+0). You can specify any compiler option or set of options here, not
+just optimizer options. These options are appended to the list of all
+other compiler options, so you should be able to override almost any
+compiler option prepared by Configure. (Obviously this depends on how
+the compiler treats conflicting options, but most seem to go with the
+last value specified on the command line).
+
+You should also allow for the XXX_cflags variable to be overridden on the
+command line.
+
+See the vos.sh hints file for an extended example of these techniques.
+
+=head1 Hint file tricks
+
+=head2 Printing critical messages
+
+[This is still experimental]
+
+If you have a *REALLY* important message that the user ought to see at
+the end of the Configure run, you can store it in the file
+'config.msg'. At the end of the Configure run, Configure will display
+the contents of this file. Currently, the only place this is used is
+in Configure itself to warn about the need to set LD_LIBRARY_PATH if
+you are building a shared libperl.so.
+
+To use this feature, just do something like the following
+
+ $cat <<EOM | $tee -a ../config.msg >&4
+
+ This is a really important message. Be sure to read it
+ before you type 'make'.
+ EOM
+
+This message will appear on the screen as the hint file is being
+processed and again at the end of Configure.
+
+Please use this sparingly.
+
+=head2 Propagating variables to config.sh
+
+Sometimes, you want an extra variable to appear in config.sh. For
+example, if your system can't compile toke.c with the optimizer on,
+you can put
+
+ toke_cflags='optimize=""'
+
+at the beginning of a line in your hints file. Configure will then
+extract that variable and place it in your config.sh file. Later,
+while compiling toke.c, the cflags shell script will eval $toke_cflags
+and hence compile toke.c without optimization.
+
+Note that for this to work, the variable you want to propagate must
+appear in the first column of the hint file. It is extracted by
+Configure with a simple sed script, so beware that surrounding case
+statements aren't any help.
+
+By contrast, if you don't want Configure to propagate your temporary
+variable, simply indent it by a leading tab in your hint file.
+
+For example, prior to 5.002, a bug in scope.c led to perl crashing
+when compiled with -O in AIX 4.1.1. The following "obvious"
+workaround in hints/aix.sh wouldn't work as expected:
+
+ case "$osvers" in
+ 4.1.1)
+ scope_cflags='optimize=""'
+ ;;
+ esac
+
+because Configure doesn't parse the surrounding 'case' statement, it
+just blindly propagates any variable that starts in the first column.
+For this particular case, that's probably harmless anyway.
+
+Three possible fixes are:
+
+=over
+
+=item 1
+
+Create an aix_4_1_1.sh hint file that contains the scope_cflags
+line and then sources the regular aix hints file for the rest of
+the information.
+
+=item 2
+
+Do the following trick:
+
+ scope_cflags='case "$osvers" in 4.1*) optimize=" ";; esac'
+
+Now when $scope_cflags is eval'd by the cflags shell script, the
+case statement is executed. Of course writing scripts to be eval'd is
+tricky, especially if there is complex quoting. Or,
+
+=item 3
+
+Write directly to Configure's temporary file UU/config.sh.
+You can do this with
+
+ case "$osvers" in
+ 4.1.1)
+ echo "scope_cflags='optimize=\"\"'" >> UU/config.sh
+ scope_cflags='optimize=""'
+ ;;
+ esac
+
+Note you have to both write the definition to the temporary
+UU/config.sh file and set the variable to the appropriate value.
+
+This is sneaky, but it works. Still, if you need anything this
+complex, perhaps you should create the separate hint file for
+aix 4.1.1.
+
+=back
+
+=head2 Call-backs
+
+=over 4
+
+=item Compiler-related flags
+
+The settings of some things, such as optimization flags, may depend on
+the particular compiler used. For example, consider the following:
+
+ case "$cc" in
+ *gcc*) ccflags="$ccflags -posix"
+ ldflags="$ldflags -posix"
+ ;;
+ *) ccflags="$ccflags -Xp -D_POSIX_SOURCE"
+ ldflags="$ldflags -Xp"
+ ;;
+ esac
+
+However, the hints file is processed before the user is asked which
+compiler should be used. Thus in order for these hints to be useful,
+the user must specify sh Configure -Dcc=gcc on the command line, as
+advised by the INSTALL file.
+
+For versions of perl later than 5.004_61, this problem can
+be circumvented by the use of "call-back units". That is, the hints
+file can tuck this information away into a file UU/cc.cbu. Then,
+after Configure prompts the user for the C compiler, it will load in
+and run the UU/cc.cbu "call-back" unit. See hints/solaris_2.sh for an
+example.
+
+=item Future status
+
+I hope this "call-back" scheme is simple enough to use but powerful
+enough to deal with most situations. Still, there are certainly cases
+where it's not enough. For example, for aix we actually change
+compilers if we are using threads.
+
+I'd appreciate feedback on whether this is sufficiently general to be
+helpful, or whether we ought to simply continue to require folks to
+say things like "sh Configure -Dcc=gcc -Dusethreads" on the command line.
+
+=back
+
+Have the appropriate amount of fun :-)
+
+ Andy Dougherty doughera@lafayette.edu (author)
+ Paul Green paul.green@stratus.com (compiler bugs)
diff --git a/hints/aix.sh b/hints/aix.sh
new file mode 100644
index 0000000000..09ca0a4b57
--- /dev/null
+++ b/hints/aix.sh
@@ -0,0 +1,518 @@
+# hints/aix.sh
+# AIX 3.x.x hints thanks to Wayne Scott <wscott@ichips.intel.com>
+# AIX 4.1 hints thanks to Christopher Chan-Nui <channui@austin.ibm.com>.
+# AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and
+# Jarkko Hietaniemi <jhi@iki.fi>.
+# AIX 4.3.x LP64 build by Steven Hirsch <hirschs@btv.ibm.com>
+# Merged on Mon Feb 6 10:22:35 EST 1995 by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+
+#
+# Contact dfavor@corridor.com for any of the following:
+#
+# - AIX 43x and above support
+# - gcc + threads support
+# - socks support
+#
+# Apr 99 changes:
+#
+# - use nm in AIX 43x and above
+# - gcc + threads now builds
+# [(added support for socks) Jul 99 SOCKS support rewritten]
+#
+# Notes:
+#
+# - shared libperl support is tricky. if ever libperl.a ends up
+# in /usr/local/lib/* it can override any subsequent builds of
+# that same perl release. to make sure you know where the shared
+# libperl.a is coming from do a 'dump -Hv perl' and check all the
+# library search paths in the loader header.
+#
+# it would be nice to warn the user if a libperl.a exists that is
+# going to override the current build, but that would be complex.
+#
+# better yet, a solid fix for this situation should be developed.
+#
+
+# Configure finds setrgid and setruid, but they're useless. The man
+# pages state:
+# setrgid: The EPERM error code is always returned.
+# setruid: The EPERM error code is always returned. Processes cannot
+# reset only their real user IDs.
+d_setrgid='undef'
+d_setruid='undef'
+
+alignbytes=8
+
+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.
+
+# AIX 4.3.* and above default to using nm for symbol extraction
+case "$osvers" in
+ 3.*|4.1.*|4.2.*)
+ case "$usenm" in
+ '') usenm='undef'
+ esac
+ case "$usenativedlopen" in
+ '') usenativedlopen='false'
+ esac
+ ;;
+ *)
+ case "$usenm" in
+ '') usenm='true'
+ esac
+ case "$usenativedlopen" in
+ '') usenativedlopen='true'
+ esac
+ ;;
+esac
+
+so="a"
+# AIX itself uses .o (libc.o) but we prefer compatibility
+# with the rest of the world and with rest of the scripting
+# languages (Tcl, Python) and related systems (SWIG).
+# Stephanie Beals <bealzy@us.ibm.com>
+dlext="so"
+
+# Take possible hint from the environment. If 32-bit is set in the
+# environment, we can override it later. If set for 64, the
+# 'sizeof' test sees a native 64-bit architecture and never looks back.
+case "$OBJECT_MODE" in
+32)
+ cat >&4 <<EOF
+
+You have OBJECT_MODE=32 set in the environment.
+I take this as a hint you do not want to
+build for a 64-bit address space. You will be
+given the opportunity to change this later.
+EOF
+ ;;
+64)
+ cat >&4 <<EOF
+
+You have OBJECT_MODE=64 set in the environment.
+This forces a full 64-bit build. If that is
+not what you intended, please terminate this
+program, unset it and restart.
+EOF
+ ;;
+*) ;;
+esac
+
+# Trying to set this breaks the POSIX.c compilation
+
+# Make setsockopt work correctly. See man page.
+# ccflags='-D_BSD=44'
+
+# uname -m output is too specific and not appropriate here
+case "$archname" in
+'') archname="$osname" ;;
+esac
+
+cc=${cc:-cc}
+
+case "$osvers" in
+3*) d_fchmod=undef
+ ccflags="$ccflags -D_ALL_SOURCE"
+ ;;
+*) # These hints at least work for 4.x, possibly other systems too.
+ ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
+ case "$cc" in
+ *gcc*) ;;
+ *) ccflags="$ccflags -qmaxmem=16384 -qnoansialias" ;;
+ esac
+ nm_opt='-B'
+ ;;
+esac
+
+# These functions don't work like Perl expects them to.
+d_setregid='undef'
+d_setreuid='undef'
+
+# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
+#
+# Tell perl which symbols to export for dynamic linking.
+cccdlflags='none' # All AIX code is position independent
+cc_type=xlc
+case "$cc" in
+*gcc*)
+ cc_type=gcc
+ ccdlflags='-Xlinker'
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//`
+ fi
+ ;;
+*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -v '\.msg\.[A-Za-z_]*\.' | awk '{print $2}'`
+ case "$ccversion" in
+ '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$' | awk '{print $2}'`
+ ;;
+ *.*.*.*.*.*.*) # Ahhrgg, more than one C compiler installed
+ first_cc_path=`which ${cc:-cc}`
+ case "$first_cc_path" in
+ *vac*)
+ cc_type=vac ;;
+ /usr/bin/cc) # Check the symlink
+ if [ -h $first_cc_path ] ; then
+ ls -l $first_cc_path > reflect
+ if grep -i vac reflect >/dev/null 2>&1 ; then
+ cc_type=vac
+ fi
+ rm -f reflect
+ fi
+ ;;
+ esac
+ ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | awk '{print $2}' | head -1`
+ ;;
+ esac
+ case "$ccversion" in
+ 3.6.6.0)
+ optimize='none'
+ ;;
+ 4.4.0.0|4.4.0.1|4.4.0.2)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is outdated.
+***
+*** Please upgrade to at least 4.4.0.3.
+***
+EOF
+ ;;
+ 5.0.0.0)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is known to have too many optimizer
+*** bugs to compile a working Perl.
+***
+*** Consider upgrading your C compiler, or getting the GNU cc (gcc).
+***
+*** Cannot continue, aborting.
+EOF
+ exit 1
+ ;;
+ 5.0.1.0)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is known to have optimizer problems
+*** when compiling regcomp.c.
+***
+*** Disabling optimization for that file but consider upgrading
+*** your C compiler.
+***
+EOF
+regcomp_cflags='optimize='
+ ;;
+ esac
+esac
+# the required -bE:$installarchlib/CORE/perl.exp is added by
+# libperl.U (Configure) later.
+
+case "$ldlibpthname" in
+'') ldlibpthname=LIBPATH ;;
+esac
+
+# The first 3 options would not be needed if dynamic libs. could be linked
+# with the compiler instead of ld.
+# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
+# -bE:$(BASEEXT).exp Export these symbols. This file contains only one
+# symbol: boot_$(EXP) can it be auto-generated?
+case "$osvers" in
+3*)
+ lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc"
+ ;;
+*)
+ lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -bnoentry -lc"
+ ;;
+esac
+# AIX 4.2 (using latest patchlevels on 20001130) has a broken bind
+# library (getprotobyname and getprotobynumber are outversioned by
+# the same calls in libc, at least for xlc version 3...
+case "`oslevel`" in
+ 4.2.1.*)
+ case "$ccversion" in # Don't know if needed for gcc
+ 3.1.4.*|5.0.2.*) # libswanted "bind ... c ..." => "... c bind ..."
+ set `echo X "$libswanted "| sed -e 's/ bind\( .*\) \([cC]\) / \1 \2 bind /'`
+ shift
+ libswanted="$*"
+ ;;
+ esac
+ ;;
+ esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="$ccflags -DNEED_PTHREAD_INIT"
+ case "$cc" in
+ *gcc*)
+echo "GCC $gccversion disabling some _r functions" >&4
+ case "$gccversion" in
+ 3*) d_drand48_r='undef'
+ d_endgrent_r='undef'
+ d_endpwent_r='undef'
+ d_getgrent_r='undef'
+ d_getpwent_r='undef'
+ d_random_r='undef'
+ d_srand48_r='undef'
+ d_strerror_r='undef'
+ ;;
+ esac
+ ;;
+ cc_r) ;;
+ cc|xl[cC]_r)
+ echo >&4 "Switching cc to cc_r because of POSIX threads."
+ # xlc_r has been known to produce buggy code in AIX 4.3.2.
+ # (e.g. pragma/overload core dumps) Let's suspect xlC_r, too.
+ # --jhi@iki.fi
+ cc=cc_r
+
+ case "`oslevel`" in
+ 4.2.1.*) i_crypt='undef' ;;
+ esac
+ ;;
+ '')
+ cc=cc_r
+ ;;
+ *)
+ cat >&4 <<EOM
+*** For pthreads you should use the AIX C compiler cc_r.
+*** (now your compiler was set to '$cc')
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+
+ # c_rify libswanted.
+ set `echo X "$libswanted "| sed -e 's/ \([cC]\) / \1_r /g'`
+ shift
+ libswanted="$*"
+ # c_rify lddlflags.
+ set `echo X "$lddlflags "| sed -e 's/ \(-l[cC]\) / \1_r /g'`
+ shift
+ lddlflags="$*"
+
+ # Insert pthreads to libswanted, before any libc or libC.
+ set `echo X "$libswanted "| sed -e 's/ \([cC]_r\) / pthreads \1 /'`
+ shift
+ libswanted="$*"
+ # Insert pthreads to lddlflags, before any libc or libC.
+ set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]_r\) / -lpthreads \1 /'`
+ shift
+ lddlflags="$*"
+
+ ;;
+esac
+EOCBU
+
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use large files.
+cat > UU/uselargefiles.cbu <<'EOCBU'
+case "$uselargefiles" in
+''|$define|true|[yY]*)
+ # Configure should take care of use64bitint and use64bitall being
+ # defined before uselargefiles.cbu is consulted.
+ if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then
+# Keep these at the left margin.
+ccflags_uselargefiles="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ldflags_uselargefiles="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ else
+# Keep these at the left margin.
+ccflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`"
+ldflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`"
+ fi
+ # _Somehow_ in AIX 4.3.1.0 the above getconf call manages to
+ # insert(?) *something* to $ldflags so that later (in Configure) evaluating
+ # $ldflags causes a newline after the '-b64' (the result of the getconf).
+ # (nothing strange shows up in $ldflags even in hexdump;
+ # so it may be something (a bug) in the shell, instead?)
+ # Try it out: just uncomment the below line and rerun Configure:
+# echo >&4 "AIX 4.3.1.0 $ldflags_uselargefiles mystery" ; exit 1
+ # Just don't ask me how AIX does it, I spent hours wondering.
+ # Therefore the line re-evaluating ldflags_uselargefiles: it seems to fix
+ # the whatever it was that AIX managed to break. --jhi
+ ldflags_uselargefiles="`echo $ldflags_uselargefiles`"
+ if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then
+# Keep this at the left margin.
+libswanted_uselargefiles="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ else
+# Keep this at the left margin.
+libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ fi
+ case "$ccflags_uselargefiles$ldflags_uselargefiles$libs_uselargefiles" in
+ '');;
+ *) ccflags="$ccflags $ccflags_uselargefiles"
+ ldflags="$ldflags $ldflags_uselargefiles"
+ libswanted="$libswanted $libswanted_uselargefiles"
+ ;;
+ esac
+ case "$gccversion" in
+ '') ;;
+ *) # Remove xlc-spefific -qflags.
+ ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
+ ldflags="`echo $ldflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
+ # Move xld-spefific -bflags.
+ ccflags="`echo $ccflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ ldflags="`echo ' '$ldflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ lddlflags="`echo ' '$lddlflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ ld='gcc'
+ echo >&4 "(using ccflags $ccflags)"
+ echo >&4 "(using ldflags $ldflags)"
+ echo >&4 "(using lddlflags $lddlflags)"
+ ;;
+ esac
+ ;;
+esac
+EOCBU
+
+# This script UU/use64bitint.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use 64 bit integers.
+cat > UU/use64bitint.cbu <<'EOCBU'
+case "$use64bitint" in
+$define|true|[yY]*)
+ case "`oslevel`" in
+ 3.*|4.[012].*)
+ cat >&4 <<EOM
+AIX `oslevel` does not support 64-bit interfaces.
+You should upgrade to at least AIX 4.3.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+EOCBU
+
+cat > UU/use64bitall.cbu <<'EOCBU'
+# This script UU/use64bitall.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to be maximally 64-bitty.
+case "$use64bitall" in
+$define|true|[yY]*)
+ case "`oslevel`" in
+ 3.*|4.[012].*)
+ cat >&4 <<EOM
+AIX `oslevel` does not support 64-bit interfaces.
+You should upgrade to at least AIX 4.3.
+EOM
+ exit 1
+ ;;
+ esac
+ echo " "
+ echo "Checking the CPU width of your hardware..." >&4
+ $cat >size.c <<EOCP
+#include <stdio.h>
+#include <sys/systemcfg.h>
+int main (void)
+{
+ printf("%d\n",_system_configuration.width);
+ return(0);
+}
+EOCP
+ set size
+ if eval $compile_ok; then
+ qacpuwidth=`./size`
+ echo "You are running on $qacpuwidth bit hardware."
+ else
+ dflt="32"
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the width of your CPU (in bits)?"
+ . ./myread
+ qacpuwidth="$ans"
+ fi
+ $rm -f size.c size
+ case "$qacpuwidth" in
+ 32*)
+ cat >&4 <<EOM
+Bzzzt! At present, you can only perform a
+full 64-bit build on a 64-bit machine.
+EOM
+ exit 1
+ ;;
+ esac
+ qacflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ qaldflags="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ # See jhi's comments above regarding this re-eval. I've
+ # seen similar weirdness in the form of:
+ #
+# 1506-173 (W) Option lm is not valid. Enter xlc for list of valid options.
+ #
+ # error messages from 'cc -E' invocation. Again, the offending
+ # string is simply not detectable by any means. Since it doesn't
+ # do any harm, I didn't pursue it. -- sh
+ qaldflags="`echo $qaldflags`"
+ qalibs="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ # -q32 and -b32 may have been set by uselargefiles or user.
+ # Remove them.
+ ccflags="`echo $ccflags | sed -e 's@-q32@@'`"
+ ldflags="`echo $ldflags | sed -e 's@-b32@@'`"
+ # Tell archiver to use large format. Unless we remove 'ar'
+ # from 'trylist', the Configure script will just reset it to 'ar'
+ # immediately prior to writing config.sh. This took me hours
+ # to figure out.
+ trylist="`echo $trylist | sed -e 's@^ar @@' -e 's@ ar @ @g' -e 's@ ar$@@'`"
+ ar="ar -X64"
+ nm_opt="-X64 $nm_opt"
+ # Note: Placing the 'qacflags' variable into the 'ldflags' string
+ # is NOT a typo. ldflags is passed to the C compiler for final
+ # linking, and it wants -q64 (-b64 is for ld only!).
+ case "$qacflags$qaldflags$qalibs" in
+ '');;
+ *) ccflags="$ccflags $qacflags"
+ ldflags="$ldflags $qacflags"
+ lddlflags="$qaldflags $lddlflags"
+ libswanted="$libswanted $qalibs"
+ ;;
+ esac
+ case "$ccflags" in
+ *-DUSE_64_BIT_ALL*) ;;
+ *) ccflags="$ccflags -DUSE_64_BIT_ALL";;
+ esac
+ case "$archname64" in
+ ''|64*) archname64=64all ;;
+ esac
+ longsize="8"
+ qacflags=''
+ qaldflags=''
+ qalibs=''
+ qacpuwidth=''
+ ;;
+esac
+EOCBU
+
+if test $usenativedlopen = 'true'
+then
+ ccflags="$ccflags -DUSE_NATIVE_DLOPEN"
+ case "$cc" in
+ *gcc*) ldflags="$ldflags -Wl,-brtl" ;;
+ *) ldflags="$ldflags -brtl" ;;
+ esac
+else
+ case `oslevel` in
+ 4.2.*) ;; # libC_r has broke gettimeofday
+ *) # If the C++ libraries, libC and libC_r, are available we will
+ # prefer them over the vanilla libc, because the libC contain
+ # loadAndInit() and terminateAndUnload() which work correctly
+ # with C++ statics while libc load() and unload() do not. See
+ # ext/DynaLoader/dl_aix.xs. The C-to-C_r switch is done by
+ # usethreads.cbu, if needed.
+ if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then
+ # Cify libswanted.
+ set `echo X "$libswanted "| sed -e 's/ c / C c /'`
+ shift
+ libswanted="$*"
+ # Cify lddlflags.
+ set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'`
+ shift
+ lddlflags="$*"
+ fi
+ esac
+fi
+
+# EOF
diff --git a/hints/altos486.sh b/hints/altos486.sh
new file mode 100644
index 0000000000..b85f907e34
--- /dev/null
+++ b/hints/altos486.sh
@@ -0,0 +1,3 @@
+: have heard of problems with -lc_s on Altos 486
+set `echo " $libswanted " | sed "s/ c_s / /"`
+libswanted="$*"
diff --git a/hints/amigaos.sh b/hints/amigaos.sh
new file mode 100644
index 0000000000..c5ba6ff591
--- /dev/null
+++ b/hints/amigaos.sh
@@ -0,0 +1,55 @@
+# hints/amigaos.sh
+#
+# talk to pueschel@imsdd.meb.uni-bonn.de if you want to change this file.
+#
+# misc stuff
+archname='m68k-amigaos'
+cc='gcc'
+firstmakefile='GNUmakefile'
+usenm='true'
+d_fork='undef' # available but ENOSYS
+
+usemymalloc='n'
+useperlio='true'
+d_eofnblk='define'
+groupstype='int'
+
+# libs
+
+libpth="$prefix/lib /local/lib"
+glibpth="$libpth"
+xlibpth="$libpth"
+
+# This should remove unwanted libraries instead of limiting the set
+# to just these few. E.g. what about Berkeley DB?
+libswanted='gdbm m dld'
+so=' '
+libs='-lm'
+
+# compiler & linker flags
+# Respect command-line values.
+
+ccflags="$ccflags -DAMIGAOS"
+case "$optimize" in
+'') optimize='-O2 -fomit-frame-pointer';;
+esac
+dlext='o'
+# Are these two different from the defaults?
+cccdlflags='none'
+ccdlflags='none'
+lddlflags='-oformat a.out-amiga -r'
+
+# uncomment the following settings if you are compiling for an 68020+ system
+# and want a residentable executable instead of dynamic loading
+
+# usedl='n'
+# ccflags='-DAMIGAOS -mstackextend -m68020 -resident32'
+# ldflags='-m68020 -resident32'
+
+# AmigaOS always reports only two links to directories, even if they
+# contain subdirectories. Consequently, we use this variable to stop
+# File::Find using the link count to determine whether there are
+# subdirectories to be searched. This will generate a harmless message:
+# Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+# Propagating recommended variable dont_use_nlink
+dont_use_nlink='define'
diff --git a/hints/apollo.sh b/hints/apollo.sh
new file mode 100644
index 0000000000..05f433dfc1
--- /dev/null
+++ b/hints/apollo.sh
@@ -0,0 +1,55 @@
+# Info from Johann Klasek <jk@auto.tuwien.ac.at>
+# Merged by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Last revised Tue Mar 16 19:12:22 EET 1999 by
+# Jarkko Hietaniemi <jhi@iki.fi>
+
+# uname -a looks like
+# DomainOS newton 10.4.1 bsd4.3 425t
+
+# We want to use both BSD includes and some of the features from the
+# /sys5 includes.
+ccflags="$ccflags -A cpu,mathchip -I`pwd`/apollo -I/usr/include -I/sys5/usr/include"
+
+# When Apollo runs a script with "#!", it sets argv[0] to the script name.
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+
+# These adjustments are necessary (why?) to compile malloc.c.
+freetype='void'
+i_malloc='undef'
+malloctype='void *'
+
+# This info is left over from perl4.
+cat <<'EOF' >&4
+Some tests may fail unless you use 'chacl -B'. Also, op/stat
+test 2 may fail occasionally because Apollo doesn't guarantee
+that mtime will be equal to ctime on a newly created unmodified
+file. Finally, the sleep test will sometimes fail. See the
+sleep(3) man page to learn why.
+
+See hints/apollo.sh for hints on running h2ph.
+
+And a note on ccflags:
+
+ Lastly, while -A cpu,mathchip generates optimal code for your DN3500
+ running sr10.3, be aware that you should be using -A cpu,mathlib_sr10
+ if your perl must also run on any machines running sr10.0, sr10.1, or
+ sr10.2. The -A cpu,mathchip option generates code that doesn't work on
+ pre-sr10.3 nodes. See the cc(1) man page for more details.
+ -- Steve Vinoski
+
+EOF
+
+# Running h2ph, on the other hand, presents a challenge.
+
+#The perl header files have to be generated with following commands
+
+#sed 's|/usr/include|/sys5/usr/include|g' h2ph >h2ph.new && chmod +x h2ph.new
+#(set cdir=`pwd`; cd /sys5/usr/include; $cdir/h2ph.new sys/* )
+#(set cdir=`pwd`; cd /usr/include; $cdir/h2ph * sys/* machine/*)
+
+#The SYS5 headers (only sys) are overlayed by the BSD headers. It seems
+#all ok, but once I am going into details, a lot of limitations from
+#'h2ph' are coming up. Lines like "#define NODEV (dev_t)(-1)" result in
+#syntax errors as converted by h2ph.
+
+# Generally, h2ph might need a lot of help.
diff --git a/hints/atheos.sh b/hints/atheos.sh
new file mode 100644
index 0000000000..c3acdbb910
--- /dev/null
+++ b/hints/atheos.sh
@@ -0,0 +1,35 @@
+# AtheOS hints file ( http://www.atheos.cx/ )
+# Kurt Skauen, kurt@atheos.cx
+
+prefix="/usr/perl5"
+
+libpth='/system/libs /usr/lib'
+usrinc='/include'
+
+libs=' '
+
+d_htonl='define'
+d_htons='define'
+d_ntohl='define'
+d_ntohs='define'
+
+d_locconv='undef'
+
+# POSIX and BSD functions are scattered over several non-standard libraries
+# in AtheOS, so I figured it would be safer to let the linker figure out
+# which symbols are available.
+
+usenm='false'
+
+# Hopefully, the native malloc knows better than perl's.
+usemymalloc='n'
+
+# AtheOS native FS does not support hard-links, but link() is defined
+# (for other FS's).
+
+d_link='undef'
+dont_use_nlink='define'
+
+ld='gcc'
+cc='gcc'
+
diff --git a/hints/aux_3.sh b/hints/aux_3.sh
new file mode 100644
index 0000000000..aa3150afbe
--- /dev/null
+++ b/hints/aux_3.sh
@@ -0,0 +1,22 @@
+# hints/aux_3.sh
+#
+# Improved by Jake Hamby <jehamby@lightside.com> to support both Apple CC
+# and GNU CC. Tested on A/UX 3.1.1 with GCC 2.6.3.
+# Now notifies of problem with version of dbm shipped with A/UX
+# Last modified
+# Sun Jan 5 11:16:41 WET 1997
+
+case "$cc" in
+*gcc*) optimize='-O2'
+ ccflags="$ccflags -D_POSIX_SOURCE"
+ echo "Setting hints for GNU CC."
+ ;;
+*) optimize='-O'
+ ccflags="$ccflags -B/usr/lib/big/ -DPARAM_NEEDS_TYPES -D_POSIX_SOURCE"
+ POSIX_cflags='ccflags="$ccflags -ZP -Du_long=U32"'
+ echo "Setting hints for Apple's CC. If you plan to use"
+ echo "GNU CC, please rerun this Configure script as:"
+ echo "./Configure -Dcc=gcc"
+ ;;
+esac
+test -r ./broken-db.msg && . ./broken-db.msg
diff --git a/hints/beos.sh b/hints/beos.sh
new file mode 100644
index 0000000000..49d85716ab
--- /dev/null
+++ b/hints/beos.sh
@@ -0,0 +1,62 @@
+# BeOS hints file
+# $Id: beos.sh 821 2002-10-22 11:14:00Z richardc $
+
+if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi
+# If this fails, that's all right - it's only for PPC.
+
+prefix="/boot/home/config"
+
+#cpp="mwcc -e"
+
+libpth='/boot/beos/system/lib /boot/home/config/lib'
+usrinc='/boot/develop/headers/posix'
+locinc='/boot/develop/headers/ /boot/home/config/include'
+
+libc='/boot/beos/system/lib/libroot.so'
+libs=' '
+
+d_bcmp='define'
+d_bcopy='define'
+d_bzero='define'
+d_index='define'
+#d_htonl='define' # It exists, but much hackery would be required to support.
+# a bunch of extra includes would have to be added, and it's only used at
+# one place in the non-socket perl code.
+
+#these are all in libdll.a, which my version of nm doesn't know how to parse.
+#if I can get it to both do that, and scan multiple library files, perhaps
+#these can be gotten rid of.
+
+usemymalloc='n'
+# Hopefully, Be's malloc knows better than perl's.
+
+d_link='undef'
+dont_use_nlink='define'
+# no posix (aka hard) links for us!
+
+d_syserrlst='undef'
+# the array syserrlst[] is useless for the most part.
+# large negative numbers really kind of suck in arrays.
+
+# Sockets didn't use to be real sockets but BONE changes this.
+# How does one test for BONEness?
+if [ ! -f /some/bone/file.h ]; then
+ d_socket='undef'
+ d_gethbyaddr='undef'
+ d_gethbyname='undef'
+ d_getsbyname='undef'
+fi
+
+ld='gcc'
+
+export PATH="$PATH:$PWD/beos"
+
+case "$ldlibpthname" in
+'') ldlibpthname=LIBRARY_PATH ;;
+esac
+
+# the waitpid() wrapper
+archobjs="beos.o"
+test -f beos.c || cp beos/beos.c .
+
+
diff --git a/hints/broken-db.msg b/hints/broken-db.msg
new file mode 100644
index 0000000000..92ba0776bf
--- /dev/null
+++ b/hints/broken-db.msg
@@ -0,0 +1,14 @@
+# Several OSs come with an old version of the DB library which fails
+# on a few of the db-recno.t tests. This file is sourced by the hints
+# files for those OSs.
+
+cat <<EOF >&4
+
+Unless you've upgraded your DB library manually you will see failures in
+db-recno tests 51, 53 and 55. The behavior these tests are checking is
+broken in the DB library which is included with the OS. You can ignore
+the errors if you're never going to use the broken functionality (recno
+databases with a modified bval), otherwise you'll have to upgrade your
+DB library or OS.
+
+EOF
diff --git a/hints/bsdos.sh b/hints/bsdos.sh
new file mode 100644
index 0000000000..f16a56efc7
--- /dev/null
+++ b/hints/bsdos.sh
@@ -0,0 +1,130 @@
+# hints/bsdos.sh
+#
+# hints file for BSD/OS (adapted from bsd386.sh)
+# Original by Neil Bowers <neilb@khoros.unm.edu>; Tue Oct 4 12:01:34 EDT 1994
+# Updated by Tony Sanders <sanders@bsdi.com>; Sat Aug 23 12:47:45 MDT 1997
+# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet.
+# Estimated for 4.0) SYSV IPC tested Ok so I re-enabled.
+#
+# Updated to work in post-4.0 by Todd C. Miller <millert@openbsd.org>
+#
+# Updated for threads by "Timur I. Bakeyev" <bsdi@listserv.bat.ru>
+#
+# To override the compiler on the command line:
+# ./Configure -Dcc=gcc2
+#
+# The BSD/OS distribution is built with:
+# ./Configure -des -Dbsdos_distribution=defined
+
+signal_t='void'
+d_voidsig='define'
+
+usemymalloc='n'
+
+# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions.
+# See <A HREF="http://www.bsdi.com/bsdi-man?setuid">http://www.bsdi.com/bsdi-man?setuid</A>(2)
+d_setregid='undef'
+d_setreuid='undef'
+d_setrgid='undef'
+d_setruid='undef'
+
+# we don't want to use -lnm, since exp() is busted (in 1.1 anyway)
+set `echo X "$libswanted "| sed -e 's/ nm / /'`
+shift
+libswanted="$*"
+
+# X libraries are in their own tree
+glibpth="$glibpth /usr/X11/lib"
+ldflags="$ldflags -L/usr/X11/lib"
+
+case "$optimize" in
+'') optimize='-O2' ;;
+esac
+
+case "$bsdos_distribution" in
+''|undef|false) ;;
+*)
+ d_dosuid='define'
+ d_portable='undef'
+ prefix='/usr/contrib'
+ perlpath='/usr/bin/perl5'
+ startperl='#!/usr/bin/perl5'
+ scriptdir='/usr/contrib/bin'
+ privlib='/usr/libdata/perl5'
+ man1dir='/usr/contrib/man/man1'
+ man3dir='/usr/contrib/man/man3'
+ # phlib added by BSDI -- we share the *.ph include dir with perl4
+ phlib="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
+ phlibexp="/usr/libdata/perl5/site_perl/$(arch)-$osname/include"
+ ;;
+esac
+
+case "$osvers" in
+1.0*)
+ # Avoid problems with HUGE_VAL in POSIX in 1.0's cc.
+ POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"'
+ ;;
+1.1*)
+ # Use gcc2
+ case "$cc" in
+ '') cc='gcc2' ;;
+ esac
+ ;;
+2.0*|2.1*|3.0*|3.1*)
+ so='o'
+
+ # default to GCC 2.X w/shared libraries
+ case "$cc" in
+ '') cc='shlicc2'
+ cccdlflags=' ' ;; # Avoid the dreaded -fpic
+ esac
+
+ # default ld to shared library linker
+ case "$ld" in
+ '') ld='shlicc2'
+ lddlflags='-r' ;; # this one is necessary
+ esac
+
+ # Must preload the static shared libraries.
+ libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
+ libswanted="rpc curses termcap $libswanted"
+ ;;
+4.*)
+ # ELF dynamic link libraries starting in 4.0
+ useshrplib='true'
+ so='so'
+ dlext='so'
+
+ case "$cc" in
+ '') cc='cc' # cc is gcc2 in 4.0
+ cccdlflags="-fPIC"
+ ;;
+ esac
+
+ case "$ld" in
+ '') ld='ld'
+ lddlflags="-shared -x $lddlflags" ;;
+ esac
+ # Due usage of static pointer from crt.o
+ libswanted="util $libswanted" ;;
+esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ case "$osvers" in
+ 3.*|4.*) ccflags="-D_REENTRANT $ccflags"
+ ;;
+ *) cat <<EOM >&4
+I did not know that BSD/OS $osvers supports POSIX threads.
+
+Feel free to tell perlbug@perl.org otherwise.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+EOCBU
diff --git a/hints/convexos.sh b/hints/convexos.sh
new file mode 100644
index 0000000000..9f6d702b06
--- /dev/null
+++ b/hints/convexos.sh
@@ -0,0 +1,12 @@
+# convexos.sh
+# Thanks to David Starks-Browning <dstarks@rc.tudelft.nl>
+# Date: Tue, 17 Jan 1995 10:45:03 -0500 (EST)
+# Subject: Re: Hints for ConvexOS 10.2
+#
+# uname -a output looks like
+# ConvexOS xxxx C38xx 10.2 convex
+# Configure may incorrectly assign $3 to $osvers.
+#
+set X $myuname
+shift
+osvers=$4
diff --git a/hints/cxux.sh b/hints/cxux.sh
new file mode 100644
index 0000000000..e3ac086e23
--- /dev/null
+++ b/hints/cxux.sh
@@ -0,0 +1,106 @@
+#! /local/gnu/bin/bash
+# Hints for the CX/UX 7.1 operating system running on Concurrent (formerly
+# Harris) NightHawk machines. written by Tom.Horsley@mail.ccur.com
+#
+# This config is setup for dynamic linking and the Concurrent C compiler.
+
+# Check some things and print warnings if this isn't going to work...
+#
+case ${SDE_TARGET:-ELF} in
+ [Cc][Oo][Ff][Ff]|[Oo][Cc][Ss]) echo ''
+ echo '' >&2
+ echo WARNING: Do not build perl 5 with the SDE_TARGET set to >&2
+ echo generate coff object - perl 5 must be built in the ELF >&2
+ echo environment. >&2
+ echo '' >&2
+ echo '';;
+ [Ee][Ll][Ff]) : ;;
+ *) echo '' >&2
+ echo 'Unknown SDE_TARGET value: '$SDE_TARGET >&2
+ echo '' >&2 ;;
+esac
+
+case `uname -r` in
+ [789]*) : ;;
+ *) echo ''
+ echo '' >&2
+ echo WARNING: Perl 5 requires shared library support, it cannot >&2
+ echo be built on releases of CX/UX prior to 7.0 with this hints >&2
+ echo file. You\'ll have to do a separate port for the statically >&2
+ echo linked COFF environment. >&2
+ echo '' >&2
+ echo '';;
+esac
+
+# Internally at Concurrent, we use a source management tool which winds up
+# giving us read-only copies of source trees that are mostly symbolic links.
+# That upsets the perl build process when it tries to edit opcode.h and
+# embed.h or touch perly.c or perly.h, so turn those files into "real" files
+# when Configure runs. (If you already have "real" source files, this won't
+# do anything).
+#
+if [ -x /usr/local/mkreal ]
+then
+ for i in '.' '..'
+ do
+ for j in embed.h opcode.h perly.h perly.c
+ do
+ if [ -h $i/$j ]
+ then
+ ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j )
+ fi
+ done
+ done
+fi
+
+# We DO NOT want -lmalloc
+#
+libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /'`
+
+# Stick the low-level elf library path in first.
+#
+glibpth="/usr/sde/elf/usr/lib $glibpth"
+
+# Need to use Concurrent cc for most of these options to be meaningful (if
+# you want to get this to work with gcc, you're on your own :-). Passing
+# -Bexport to the linker when linking perl is important because it leaves
+# the interpreter internal symbols visible to the shared libs that will be
+# loaded on demand (and will try to reference those symbols). The -u option
+# to drag 'sigaction' into the perl main program is to make sure it gets
+# defined for the posix shared library (for some reason sigaction is static,
+# rather than being defined in libc.so.1). The 88110compat option makes sure
+# the code will run on both 88100 and 88110 machines. The define is added to
+# trigger a work around for a compiler bug which shows up in pp.c.
+#
+cc='/bin/cc -Xa -Qtarget=M88110compat -DCXUX_BROKEN_CONSTANT_CONVERT'
+cccdlflags='-Zelf -Zpic'
+ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
+lddlflags='-Zlink=so'
+
+# Configure imagines that it sees a pw_quota field, but it is really in a
+# different structure than the one it thinks it is looking at.
+d_pwquota='undef'
+
+# Configure sometimes finds what it believes to be ndbm header files on the
+# system and imagines that we have the NDBM library, but we really don't.
+# There is something there that once resembled ndbm, but it is purely
+# for internal use in some tool and has been hacked beyond recognition
+# (or even function :-)
+#
+i_ndbm='undef'
+
+# Don't use the perl malloc
+#
+d_mymalloc='undef'
+usemymalloc='n'
+
+cat <<'EOM' >&4
+
+WARNING: If you are using ksh to run the Configure script, you may find it
+failing in mysterious ways (such as failing to find library routines which
+are known to exist). Configure seems to push ksh beyond its limits
+sometimes. Try using env to strip unnecessary things out of the environment
+and run Configure with /sbin/sh. That sometimes seems to produce more
+accurate results.
+
+EOM
diff --git a/hints/cygwin.sh b/hints/cygwin.sh
new file mode 100644
index 0000000000..e88cab7930
--- /dev/null
+++ b/hints/cygwin.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+# cygwin.sh - hints for building perl using the Cygwin environment for Win32
+#
+
+# not otherwise settable
+exe_ext='.exe'
+firstmakefile='GNUmakefile'
+case "$ldlibpthname" in
+'') ldlibpthname=PATH ;;
+esac
+archobjs='cygwin.o'
+
+# mandatory (overrides incorrect defaults)
+test -z "$cc" && cc='gcc'
+if test -z "$plibpth"
+then
+ plibpth=`gcc -print-file-name=libc.a`
+ plibpth=`dirname $plibpth`
+ plibpth=`cd $plibpth && pwd`
+fi
+so='dll'
+# - eliminate -lc, implied by gcc and a symlink to libcygwin.a
+libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
+# - eliminate -lm, symlink to libcygwin.a
+libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
+test -z "$optimize" && optimize='-O2'
+ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
+# - otherwise i686-cygwin
+archname='cygwin'
+
+# dynamic loading
+# - otherwise -fpic
+cccdlflags=' '
+ld='ld2'
+
+# Win9x problem with non-blocking read from a closed pipe
+d_eofnblk='define'
+
+# strip exe's and dll's
+#ldflags="$ldflags -s"
+#ccdlflags="$ccdlflags -s"
+#lddlflags="$lddlflags -s"
diff --git a/hints/darwin.sh b/hints/darwin.sh
new file mode 100644
index 0000000000..518af30026
--- /dev/null
+++ b/hints/darwin.sh
@@ -0,0 +1,148 @@
+##
+# Darwin (Mac OS) hints
+# Wilfredo Sanchez <wsanchez@mit.edu>
+##
+
+##
+# Paths
+##
+
+# BSD paths
+case "$prefix" in
+'')
+ # Default install; use non-system directories
+ prefix='/usr/local'; # Built-in perl uses /usr
+ siteprefix='/usr/local';
+ vendorprefix='/usr/local'; usevendorprefix='define';
+
+ # Where to put modules.
+ privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl
+ sitelib='/Library/Perl';
+ vendorlib='/Network/Library/Perl';
+ ;;
+'/usr')
+ # We are building/replacing the built-in perl
+ siteprefix='/usr/local';
+ vendorprefix='/usr/local'; usevendorprefix='define';
+
+ # Where to put modules.
+ privlib='/System/Library/Perl';
+ sitelib='/Library/Perl';
+ vendorlib='/Network/Library/Perl';
+ ;;
+esac
+
+# 4BSD uses ${prefix}/share/man, not ${prefix}/man.
+man1dir="${prefix}/share/man/man1";
+man3dir="${prefix}/share/man/man3";
+
+##
+# Tool chain settings
+##
+
+# Since we can build fat, the archname doesn't need the processor type
+archname='darwin';
+
+# nm works.
+usenm='true';
+
+# Optimize.
+if [ "x$optimize" = 'x' ]; then
+ optimize='-O3'
+fi
+
+# -pipe: makes compilation go faster.
+# -fno-common: we don't like commons. Common symbols are not allowed
+# in MH_DYLIB binaries, which is what libperl.dylib is. You will fail
+# to link without that option, unless you otherwise eliminate all commons
+# by, for example, initializing all globals.
+# --Fred Sánchez
+ccflags="${ccflags} -pipe -fno-common"
+
+# At least on Darwin 1.3.x:
+#
+# # define INT32_MIN -2147483648
+# int main () {
+# double a = INT32_MIN;
+# printf ("INT32_MIN=%g\n", a);
+# return 0;
+# }
+# will output:
+# INT32_MIN=2.14748e+09
+# Note that the INT32_MIN has become positive.
+# INT32_MIN is set in /usr/include/stdint.h by:
+# #define INT32_MIN -2147483648
+# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
+# seems to work. INT64_MIN seems to be similarly broken.
+# -- Nicholas Clark, Ken Williams, and Edward Moy
+#
+ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN"
+
+# cppflags='-traditional-cpp';
+# avoid Apple's cpp precompiler, better for extensions
+cppflags="${cppflags} -no-cpp-precomp"
+# and ccflags needs them aswell since we don't use cpp directly
+ccflags="${ccflags} -no-cpp-precomp"
+
+# Known optimizer problems.
+case "`cc -v 2>&1`" in
+*"3.1 20020105"*) toke_cflags='optimize=""' ;;
+esac
+
+# Shared library extension is .dylib.
+# Bundle extension is .bundle.
+ld='cc';
+so='dylib';
+dlext='bundle';
+dlsrc='dl_dyld.xs'; usedl='define';
+cccdlflags=' '; # space, not empty, because otherwise we get -fpic
+# ldflag: -flat_namespace is only available since OS X 10.1 (Darwin 1.4.1)
+# - but not in 10.0.x (Darwin 1.3.x)
+# -- Kay Roepke
+case "$osvers" in
+1.[0-3].*) ;;
+*) ldflags="${ldflags} -flat_namespace" ;;
+esac
+lddlflags="${ldflags} -bundle -undefined suppress";
+ldlibpthname='DYLD_LIBRARY_PATH';
+useshrplib='true';
+
+##
+# System libraries
+##
+
+# vfork works
+usevfork='true';
+
+# malloc works
+usemymalloc='n';
+
+##
+# Build process
+##
+
+# Locales aren't feeling well.
+LC_ALL=C; export LC_ALL;
+LANG=C; export LANG;
+
+# Case-insensitive filesystems don't get along with Makefile and
+# makefile in the same place. Since Darwin uses GNU make, this dodges
+# the problem.
+firstmakefile=GNUmakefile;
+
+#
+# The libraries are not threadsafe as of OS X 10.1.
+#
+# Fix when Apple fixes libc.
+#
+case "$usethreads$useithreads$use5005threads" in
+*define*)
+cat <<EOM >&4
+
+*** Warning, there might be problems with your libraries with
+*** regards to threading. The test ext/threads/t/libc.t is likely
+*** to fail.
+
+EOM
+ ;;
+esac
diff --git a/hints/dcosx.sh b/hints/dcosx.sh
new file mode 100644
index 0000000000..c1b0d0ac42
--- /dev/null
+++ b/hints/dcosx.sh
@@ -0,0 +1,188 @@
+# hints/dcosx.sh
+# Last modified: Thu Jan 16 11:38:12 EST 1996
+# Stephen Zander <stephen.zander@interlock.mckesson.com>
+# hints for DC/OSx (Pyramid) & SINIX (Seimens: dc/osx rebadged)
+# Based on the hints/solaris_2.sh file
+
+# See man vfork.
+usevfork=false
+
+d_suidsafe=define
+
+# Avoid all libraries in /usr/ucblib.
+set `echo $glibpth | sed -e 's@/usr/ucblib@@'`
+glibpth="$*"
+
+# Remove bad libraries.
+# -lucb contains incompatible routines.
+set `echo " $libswanted " | sed -e 's@ ucb @ @'`
+libswanted="$*"
+
+# Here's another draft of the perl5/solaris/gcc sanity-checker.
+
+case $PATH in
+*/usr/ucb*:/usr/bin:*|*/usr/ucb*:/usr/bin) cat <<END >&2
+
+NOTE: /usr/ucb/cc does not function properly.
+Remove /usr/ucb from your PATH.
+
+END
+;;
+esac
+
+
+# Check that /dev/fd is mounted. If it is not mounted, let the
+# user know that suid scripts may not work.
+/usr/bin/df /dev/fd 2>&1 > /dev/null
+case $? in
+0) ;;
+*)
+ cat <<END >&4
+
+NOTE: Your system does not have /dev/fd mounted. If you want to
+be able to use set-uid scripts you must ask your system administrator
+to mount /dev/fd.
+
+END
+ ;;
+esac
+
+
+# See if libucb can be found in /usr/lib. If it is, warn the user
+# that this may cause problems while building Perl extensions.
+/usr/bin/ls /usr/lib/libucb* >/dev/null 2>&1
+case $? in
+0)
+ cat <<END >&4
+
+NOTE: libucb has been found in /usr/lib. libucb should reside in
+/usr/ucblib. You may have trouble while building Perl extensions.
+
+END
+;;
+esac
+
+
+# See if make(1) is GNU make(1).
+# If it is, make sure the setgid bit is not set.
+make -v > make.vers 2>&1
+if grep GNU make.vers > /dev/null 2>&1; then
+ tmp=`/usr/bin/ksh -c "whence make"`
+ case "`/usr/bin/ls -l $tmp`" in
+ ??????s*)
+ cat <<END >&2
+
+NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id
+bit set. You must either rearrange your PATH to put /usr/ccs/bin before the
+GNU utilities or you must ask your system administrator to disable the
+set-group-id bit on GNU make.
+
+END
+ ;;
+ esac
+fi
+rm -f make.vers
+
+# If the C compiler is gcc:
+# - check the fixed-includes
+# - check as(1) and ld(1), they should not be GNU
+# If the C compiler is not gcc:
+# - check as(1) and ld(1), they should not be GNU
+# - increase the optimizing level to prevent object size warnings
+#
+# Watch out in case they have not set $cc.
+case "`${cc:-cc} -v 2>&1`" in
+*gcc*)
+ #
+ # Using gcc.
+ #
+ #echo Using gcc
+
+ # Get gcc to share its secrets.
+ echo 'main() { return 0; }' > try.c
+ verbose=`${cc:-cc} -v -o try try.c 2>&1`
+ rm -f try try.c
+ tmp=`echo "$verbose" | grep '^Reading' |
+ awk '{print $NF}' | sed 's/specs$/include/'`
+
+ # Determine if the fixed-includes look like they'll work.
+ # Doesn't work anymore for gcc-2.7.2.
+
+ # See if as(1) is GNU as(1). GNU as(1) won't work for this job.
+ case $verbose in
+ */usr/ccs/bin/as*) ;;
+ *)
+ cat <<END >&2
+
+NOTE: You are using GNU as(1). GNU as(1) will not build Perl.
+You must arrange to use /usr/ccs/bin/as, perhaps by setting
+GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command.
+
+END
+ ;;
+ esac
+
+ # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job.
+ case $verbose in
+ */usr/ccs/bin/ld*) ;;
+ *)
+ cat <<END >&2
+
+NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl.
+You must arrange to use /usr/ccs/bin/ld, perhaps by setting
+GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command.
+
+END
+ ;;
+ esac
+
+ ;; #using gcc
+*)
+ optimize='-O -K Olimit:3064'
+ #
+ # Not using gcc.
+ #
+ #echo Not using gcc
+
+ # See if as(1) is GNU as(1). GNU as(1) won't work for this job.
+ case `as --version < /dev/null 2>&1` in
+ *GNU*)
+ cat <<END >&2
+
+NOTE: You are using GNU as(1). GNU as(1) will not build Perl.
+You must arrange to use /usr/ccs/bin, perhaps by adding it to the
+beginning of your PATH.
+
+END
+ ;;
+ esac
+
+ # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job.
+ case `ld --version < /dev/null 2>&1` in
+ *GNU*)
+ cat <<END >&2
+
+NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl.
+You must arrange to use /usr/ccs/bin, perhaps by adding it to the
+beginning of your PATH
+
+END
+ ;;
+ esac
+
+ ;; #not using gcc
+esac
+
+# as --version or ld --version might dump core.
+rm -f core
+
+# DC/OSx hides certain functions in a libc that looks dynamic but isn't
+# because of this we reinclude -lc when building dynamic extenstions
+libc='/usr/ccs/lib/libc.so'
+lddlflags='-G -lc'
+
+# DC/OSx gets overenthusiastic with symbol removal when building dynamically
+ccdlflags='-Blargedynsym'
+
+# System malloc is safer when using third part libs
+usemymalloc='n'
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
new file mode 100644
index 0000000000..b3872fac12
--- /dev/null
+++ b/hints/dec_osf.sh
@@ -0,0 +1,523 @@
+# hints/dec_osf.sh
+
+# * If you want to debug perl or want to send a
+# stack trace for inclusion into an bug report, call
+# Configure with the additional argument -Doptimize=-g2
+# or uncomment this assignment to "optimize":
+#
+#optimize=-g2
+#
+# If you want both to optimise and debug with the DEC cc
+# you must have -g3, e.g. "-O4 -g3", and (re)run Configure.
+#
+# * gcc can always have both -g and optimisation on.
+#
+# * debugging optimised code, no matter what compiler
+# one is using, can be surprising and confusing because of
+# the optimisation tricks like code motion, code removal,
+# loop unrolling, and inlining. The source code and the
+# executable code simply do not agree any more while in
+# mid-execution, the optimiser only cares about the results.
+#
+# * Configure will automatically add the often quoted
+# -DDEBUGGING for you if the -g is specified.
+#
+# * There is even more optimisation available in the new
+# (GEM) DEC cc: -O5 and -fast. "man cc" will tell more about them.
+# The jury is still out whether either or neither help for Perl
+# and how much. Based on very quick testing, -fast boosts
+# raw data copy by about 5-15% (-fast brings in, among other
+# things, inlined, ahem, fast memcpy()), while on the other
+# hand searching things (index, m//, s///), seems to get slower.
+# Your mileage will vary.
+#
+# * The -std is needed because the following compiled
+# without the -std and linked with -lm
+#
+# #include <math.h>
+# #include <stdio.h>
+# int main(){short x=10,y=sqrt(x);printf("%d\n",y);}
+#
+# will in Digital UNIX 3.* and 4.0b print 0 -- and in Digital
+# UNIX 4.0{,a} dump core: Floating point exception in the printf(),
+# the y has become a signaling NaN.
+#
+# * Compilation warnings like:
+#
+# "Undefined the ANSI standard macro ..."
+#
+# can be ignored, at least while compiling the POSIX extension
+# and especially if using the sfio (the latter is not a standard
+# part of Perl, never mind if it says little to you).
+#
+
+# If using the DEC compiler we must find out the DEC compiler style:
+# the style changed between Digital UNIX (aka DEC OSF/1) 3 and
+# Digital UNIX 4. The old compiler was originally from Ultrix and
+# the MIPS company, the new compiler is originally from the VAX world
+# and it is called GEM. Many of the options we are going to use depend
+# on the compiler style.
+
+cc=${cc:-cc}
+
+case "`$cc -v 2>&1 | grep cc`" in
+*gcc*) isgcc=gcc ;;
+esac
+
+# do NOT, I repeat, *NOT* take away the leading tabs
+# Configure Black Magic (TM)
+ # reset
+ _DEC_cc_style=
+case "$isgcc" in
+gcc) if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ set $gccversion
+ if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 3 \) \) \); then
+ cat >&4 <<EOF
+
+*** Your cc seems to be gcc and its version ($gccversion) seems to be
+*** less than 2.95.3. This is not a good idea since old versions of gcc
+*** are known to produce buggy code when compiling Perl (and no doubt for
+*** other programs, too).
+***
+*** Therefore, I strongly suggest upgrading your gcc. (Why don't you use
+*** the vendor cc is also a good question. It comes with the operating
+*** system and produces good code.)
+
+Cannot continue, aborting.
+
+EOF
+ exit 1
+ fi
+ if test "$1" -eq 2 -a "$2" -eq 95 -a "$3" -le 2; then
+ cat >&4 <<EOF
+
+*** Note that as of gcc 2.95.2 (19991024) and Perl 5.6.0 (March 2000)
+*** if the said Perl is compiled with the said gcc the lib/sdbm test
+*** may dump core (meaning that the SDBM_File extension is unusable).
+*** As this core dump never happens with the vendor cc, this is most
+*** probably a lingering bug in gcc. Therefore unless you have a better
+*** gcc installation you are still better off using the vendor cc.
+
+Since you explicitly chose gcc, I assume that you know what are doing.
+
+EOF
+ fi
+ ;;
+*) # compile something small: taint.c is fine for this.
+ ccversion=`cc -V | awk '/(Compaq|DEC) C/ {print $3}' | grep '^V'`
+ # the main point is the '-v' flag of 'cc'.
+ case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in
+ */gemc_cc*) # we have the new DEC GEM CC
+ _DEC_cc_style=new
+ ;;
+ *) # we have the old MIPS CC
+ _DEC_cc_style=old
+ ;;
+ esac
+ # cleanup
+ rm -f taint$$.o
+ ;;
+esac
+
+# be nauseatingly ANSI
+case "$isgcc" in
+gcc) ccflags="$ccflags -ansi"
+ ;;
+*) ccflags="$ccflags -std"
+ ;;
+esac
+
+# for gcc the Configure knows about the -fpic:
+# position-independent code for dynamic loading
+
+# we want optimisation
+
+case "$optimize" in
+'') case "$isgcc" in
+ gcc) optimize='-O3' ;;
+ *) case "$_DEC_cc_style" in
+ new) optimize='-O4' ;;
+ old) optimize='-O2 -Olimit 3200' ;;
+ esac
+ ccflags="$ccflags -D_INTRINSICS"
+ ;;
+ esac
+ ;;
+esac
+
+# we want dynamic fp rounding mode, and we want ieee exception semantics
+case "$isgcc" in
+gcc) ;;
+*) case "$_DEC_cc_style" in
+ new) ccflags="$ccflags -fprm d -ieee" ;;
+ esac
+ ;;
+esac
+
+# Make glibpth agree with the compiler suite. Note that /shlib
+# is not here. That's on purpose. Even though that's where libc
+# really lives from V4.0 on, the linker (and /sbin/loader) won't
+# look there by default. The sharable /sbin utilities were all
+# built with "-Wl,-rpath,/shlib" to get around that. This makes
+# no attempt to figure out the additional location(s) searched by
+# gcc, since not all versions of gcc are easily coerced into
+# revealing that information.
+glibpth="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc"
+glibpth="$glibpth /usr/lib /usr/local/lib /var/shlib"
+
+# dlopen() is in libc
+libswanted="`echo $libswanted | sed -e 's/ dl / /'`"
+
+# libPW contains nothing useful for perl
+libswanted="`echo $libswanted | sed -e 's/ PW / /'`"
+
+# libnet contains nothing useful for perl here, and doesn't work
+libswanted="`echo $libswanted | sed -e 's/ net / /'`"
+
+# libbsd contains nothing used by perl that is not already in libc
+libswanted="`echo $libswanted | sed -e 's/ bsd / /'`"
+
+# libc need not be separately listed
+libswanted="`echo $libswanted | sed -e 's/ c / /'`"
+
+# ndbm is already in libc
+libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`"
+
+# the basic lddlflags used always
+lddlflags='-shared -expect_unresolved "*"'
+
+# Fancy compiler suites use optimising linker as well as compiler.
+# <spider@Orb.Nashua.NH.US>
+case "`uname -r`" in
+*[123].*) # old loader
+ lddlflags="$lddlflags -O3"
+ ;;
+*) if $test "X$optimize" = "X$undef"; then
+ lddlflags="$lddlflags -msym"
+ else
+ case "`/usr/sbin/sizer -v`" in
+ *4.0D*)
+ # QAR 56761: -O4 + .so may produce broken code,
+ # fixed in 4.0E or better.
+ ;;
+ *)
+ lddlflags="$lddlflags $optimize"
+ ;;
+ esac
+ # -msym: If using a sufficiently recent /sbin/loader,
+ # keep the module symbols with the modules.
+ lddlflags="$lddlflags -msym -std"
+ fi
+ ;;
+esac
+# Yes, the above loses if gcc does not use the system linker.
+# If that happens, let me know about it. <jhi@iki.fi>
+
+
+# If debugging or (old systems and doing shared)
+# then do not strip the lib, otherwise, strip.
+# As noted above the -DDEBUGGING is added automagically by Configure if -g.
+case "$optimize" in
+ *-g*) ;; # left intentionally blank
+*) case "`uname -r`" in
+ *[123].*)
+ case "$useshrplib" in
+ false|undef|'') lddlflags="$lddlflags -s" ;;
+ esac
+ ;;
+ *) lddlflags="$lddlflags -s"
+ ;;
+ esac
+ ;;
+esac
+
+#
+# Make embedding in things like INN and Apache more memory friendly.
+# Keep it overridable on the Configure command line, though, so that
+# "-Uuseshrplib" prevents this default.
+#
+
+case "$_DEC_cc_style.$useshrplib" in
+ new.) useshrplib="$define" ;;
+esac
+
+# The EFF_ONLY_OK from <sys/access.h> is present but dysfunctional for
+# [RWX]_OK as of Digital UNIX 4.0[A-D]?. If and when this gets fixed,
+# please adjust this appropriately. See also pp_sys.c just before the
+# emulate_eaccess().
+
+# Fixed in V5.0A.
+case "`/usr/sbin/sizer -v`" in
+*5.0[A-Z]*|*5.[1-9]*|*[6-9].[0-9]*)
+ : ok
+ ;;
+*)
+# V5.0 or previous
+pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"'
+ ;;
+esac
+
+# The off_t is already 8 bytes, so we do have largefileness.
+
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ # Threads interfaces changed with V4.0.
+ case "$isgcc" in
+ gcc) ccflags="-D_REENTRANT $ccflags" ;;
+ *) case "`uname -r`" in
+ *[123].*) ccflags="-threads $ccflags" ;;
+ *) ccflags="-pthread $ccflags" ;;
+ esac
+ ;;
+ esac
+ case "`uname -r`" in
+ *[123].*) libswanted="$libswanted pthreads mach exc c_r" ;;
+ *) libswanted="$libswanted pthread exc" ;;
+ esac
+
+ case "$usemymalloc" in
+ '')
+ usemymalloc='n'
+ ;;
+ esac
+ # These symbols are renamed in <time.h> so
+ # that the Configure hasproto doesn't see them.
+ d_asctime_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ ;;
+esac
+EOCBU
+
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+case "$uselongdouble" in
+$define|true|[yY]*)
+ case "`/usr/sbin/sizer -v`" in
+ *[1-4].0*) cat >&4 <<EOF
+
+***
+*** Sorry, you cannot use long doubles in pre-V5.0 releases of Tru64.
+***
+
+Cannot continue, aborting.
+
+EOF
+ exit 1
+ ;;
+ *)
+ # Test whether libc's been fixed yet.
+ cat >try.c <<\TRY
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ unsigned long uvmax = ~0UL;
+ long double ld = uvmax + 0.0L;
+ char buf1[30], buf2[30];
+
+ (void) sprintf(buf1, "%lu", uvmax);
+ (void) sprintf(buf2, "%.0Lf", ld);
+ return strcmp(buf1, buf2) != 0;
+}
+TRY
+ # Don't bother trying to work with Configure's idea of
+ # cc and the various flags. This might not work as-is
+ # with gcc -- but we're testing libc, not the compiler.
+ if cc -o try -std try.c && ./try
+ then
+ : ok
+ else
+ cat <<\UGLY >&4
+!
+Warning! Your libc has not yet been patched so that its "%Lf" format for
+printing long doubles shows all the significant digits. You will get errors
+in the t/op/numconvert test because of this. (The data is still good
+internally, and the "%e" format of printf() or sprintf() in perl will still
+produce valid results.) See README.tru64 for additional details.
+
+Continuing anyway.
+!
+UGLY
+ fi
+ $rm -f try try.c
+ esac
+ ;;
+esac
+EOCBU
+
+case "`/usr/sbin/sizer -v`" in
+*[1-4].0*) d_modfl=undef ;; # must wait till 5.0
+esac
+
+# Keep those leading tabs.
+ needusrshlib=''
+ old_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+for p in $loclibpth
+do
+ if test -n "`ls $p/libdb.so* 2>/dev/null`"; then
+ needusrshlib=yes
+ fi
+ if test -d $p; then
+ echo "Appending $p to LD_LIBRARY_PATH." >& 4
+ case "$LD_LIBRARY_PATH" in
+ '') LD_LIBRARY_PATH=$p ;;
+ *) LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
+ esac
+ fi
+done
+case "$LD_LIBRARY_PATH" in
+"$old_LD_LIBRARY_PATH") ;;
+*) echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4 ;;
+esac
+# This is evil but I can't think of a nice workaround:
+# the /usr/shlib/libdb.so needs to be seen first,
+# or running Configure will fail.
+if test -n "$needusrshlib"; then
+ echo "Prepending /usr/shlib to loclibpth." >& 4
+ loclibpth="/usr/shlib $loclibpth"
+ echo "loclibpth is now $loclibpth." >& 4
+fi
+
+#
+# Unset temporary variables no more needed.
+#
+
+unset _DEC_cc_style
+
+#
+# History:
+#
+# perl5.005_51:
+#
+# September-1998 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Added the -DNO_EFF_ONLY_OK flag ('use filetest;' support).
+#
+# perl5.004_57:
+#
+# 19-Dec-1997 Spider Boardman <spider@Orb.Nashua.NH.US>
+#
+# * Newer Digital UNIX compilers enforce signaling for NaN without
+# -ieee. Added -fprm d at the same time since it's friendlier for
+# embedding.
+#
+# * Fixed the library search path to match cc, ld, and /sbin/loader.
+#
+# * Default to building -Duseshrplib on newer systems. -Uuseshrplib
+# still overrides.
+#
+# * Fix -pthread additions for useshrplib. ld has no -pthread option.
+#
+#
+# perl5.004_04:
+#
+# 19-Sep-1997 Spider Boardman <spider@Orb.Nashua.NH.US>
+#
+# * libnet on Digital UNIX is for JAVA, not for sockets.
+#
+#
+# perl5.003_28:
+#
+# 22-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Restructuring Spider's suggestions.
+#
+# * Older Digital UNIXes cannot handle -Olimit ... for $lddlflags.
+#
+# * ld -s cannot be used in older Digital UNIXes when doing shared.
+#
+#
+# 21-Feb-1997 Spider Boardman <spider@Orb.Nashua.NH.US>
+#
+# * -hidden removed.
+#
+# * -DSTANDARD_C removed.
+#
+# * -D_INTRINSICS added. (that -fast does not seem to buy much confirmed)
+#
+# * odbm not in libc, only ndbm. Therefore dbm back to $libswanted.
+#
+# * -msym for the newer runtime loaders.
+#
+# * $optimize also in $lddflags.
+#
+#
+# perl5.003_27:
+#
+# 18-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * unset _DEC_cc_style and more commentary on -std.
+#
+#
+# perl5.003_26:
+#
+# 15-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * -std and -ansi.
+#
+#
+# perl5.003_24:
+#
+# 30-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Fixing the note on -DDEBUGGING.
+#
+# * Note on -O5 -fast.
+#
+#
+# perl5.003_23:
+#
+# 26-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Notes on how to do both optimisation and debugging.
+#
+#
+# 25-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi>
+#
+# * Remove unneeded libraries from $libswanted: PW, bsd, c, dbm
+#
+# * Restructure the $lddlflags build.
+#
+# * $optimize based on which compiler we have.
+#
+#
+# perl5.003_22:
+#
+# 23-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+#
+# * Added comments 'how to create a debugging version of perl'
+#
+# * Fixed logic of this script to prevent stripping of shared
+# objects by the loader (see ld man page for -s) is debugging
+# is set via the -g switch.
+#
+#
+# 21-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+#
+# * now 'dl' is always removed from libswanted. Not only if
+# optimize is an empty string.
+#
+#
+# 17-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+#
+# * Removed 'dl' from libswanted: When the FreePort binary
+# translator for Sun binaries is installed Configure concludes
+# that it should use libdl.x.yz.fpx.so :-(
+# Because the dlopen, dlclose,... calls are in the
+# C library it not necessary at all to check for the
+# dl library. Therefore dl is removed from libswanted.
+#
+#
+# 1-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de>
+#
+# * Set -Olimit to 3200 because perl_yylex.c got too big
+# for the optimizer.
+#
diff --git a/hints/dgux.sh b/hints/dgux.sh
new file mode 100644
index 0000000000..6735edea7c
--- /dev/null
+++ b/hints/dgux.sh
@@ -0,0 +1,239 @@
+# $Id: dgux.sh 821 2002-10-22 11:14:00Z richardc $
+
+# This is a hints file for DGUX, which is EMC's Data General's Unix. It
+# was originally developed with version 5.4.3.10 of the OS, and then was
+# later updated running under version 4.11.2 (running on m88k hardware).
+# The gross features should work with versions going back to 2.nil but
+# some tweaking will probably be necessary.
+#
+# DGUX is an SVR4 derivative. It ships with gcc as the standard
+# compiler. Since version 3.0 it has shipped with Perl 4.036
+# installed in /usr/bin, which is kind of neat. Be careful when you
+# install that you don't overwrite the system version, though (by
+# answering yes to the question about installing perl as /usr/bin/perl),
+# as it would suck to try to get support if the vendor learned that you
+# were physically replacing the system binaries.
+#
+# -Roderick Schertler <roderick@argon.org>
+
+# The standard system compiler is gcc, but invoking it as cc changes its
+# behavior. I have to pick one name or the other so I can get the
+# dynamic loading switches right (they vary depending on this). I'm
+# picking gcc because there's no way to get at the optimization options
+# and so on when you call it cc.
+
+##########################################
+# Modified by Takis Psarogiannakopoulos
+# Universirty of Cambridge
+# Centre for Mathematical Sciences
+# Department of Pure Mathematics
+# Wilberforce road
+# Cambridge CB3 0WB , UK
+# e-mail <takis@XFree86.Org>
+# Use GCC-2.95.2/3 rev (DG/UX) for threads
+# This compiler supports the -pthread switch
+# to link correctly DG/UX 's -lthread.
+# March 2002
+###########################################
+
+cc=gcc
+ccflags="-DDGUX -D_DGUX_SOURCE"
+# Debug build. If using GNU as,ld use the flag -gstabs+
+# ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING"
+# Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX)
+# even if you debugging the program!
+optimize="-mno-legend -O2"
+
+archname="ix86-dgux"
+libpth="/usr/lib"
+
+#####################################
+# <takis@XFree86.Org>
+# Change this if you want.
+# prefix =/usr/local
+#####################################
+
+prefix=/usr/local
+perlpath="$prefix/bin/perl58"
+startperl="#! $prefix/bin/perl58"
+privlib="$prefix/lib/perl58"
+man1dir="$prefix/man/man1"
+man3dir="$prefix/man/man3"
+
+sitearch="$prefix/lib/perl58/$archname"
+sitelib="$prefix/lib/perl58"
+
+#Do not overwrite by default /usr/bin/perl of DG/UX
+installusrbinperl="$undef"
+
+# Configure may fail to find lstat()
+# function in <sys/stat.h>.
+d_lstat='define'
+
+# Internal (perl) malloc is causing serious problems and
+# test failures in DG/UX. Most notable Embed.t
+# So for perl-5.7.3 and on do NOT use.
+# I have no time to investigate more.
+# <takis@XFree86.Org>
+
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+case "$uselongdouble" in
+'') uselongdouble='y' ;;
+esac
+
+#usevfork=true
+usevfork=false
+
+# DG has this thing set up with symlinks which point to different places
+# depending on environment variables (see elink(5)) and the compiler and
+# related tools use them to access different development environments
+# (COFF, ELF, m88k BCS and so on), see sde(5). The upshot, however, is
+# that when a normal program tries to access one of these elinks it sees
+# no such file (like stat()ting a mis-directed symlink). Setting
+# $plibpth to explicitly include the place to which the elinks point
+# allows Configure to find libraries which vary based on the development
+# environment.
+#
+# Starting with version 4.10 (the first time the OS supported Intel
+# hardware) all libraries are accessed with this mechanism.
+#
+# The default $TARGET_BINARY_INTERFACE changed with version 4.10. The
+# system now comes with a link named /usr/sde/default which points to
+# the proper entry, but older versions lacked this and used m88kdgux
+# directly.
+
+: && sde_path=${SDE_PATH:-/usr}/sde # hide from Configure
+while : # dummy loop
+do
+ if [ -n "$TARGET_BINARY_INTERFACE" ]
+ then set X "$TARGET_BINARY_INTERFACE"
+ else set X default dg m88k_dg ix86_dg m88kdgux m88kdguxelf
+ fi
+ shift
+ default_sde=$1
+ for sde
+ do
+ [ -d "$sde_path/$sde" ] && break 2
+ done
+ cat <<END >&2
+
+NOTE: I can't figure out what SDE is used by default on this machine (I
+didn't find a likely directory under $sde_path). This is bad news. If
+this is a R4.10 or newer system I'm not going to be able to find any of
+your libraries, if this system is R3.10 or older I won't be able to find
+the math library. You should re-run Configure with the environment
+variable TARGET_BINARY_INTERFACE set to the proper value for this
+machine, see sde(5) and the notes in hints/dgux.sh.
+
+END
+ sde=$default_sde
+ break
+done
+
+plibpth="$plibpth $sde_path/$sde/usr/lib"
+unset sde_path default_sde sde
+
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+libperl="libperl58.so"
+
+# Many functions (eg, gethostent(), killpg(), getpriority(), setruid()
+# dbm_*(), and plenty more) are defined in -ldgc. Usually you don't
+# need to know this (it seems that libdgc.so is searched automatically
+# by ld), but Configure needs to check it otherwise it will report all
+# those functions as missing.
+
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+# libswanted="dgc gdbm $libswanted"
+#libswanted="dbm posix $libswanted"
+# Do *NOT* add there the malloc native
+# DG/UX library!
+libswanted="dbm posix resolv socket nsl dl m"
+
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+mydomain='.localhost'
+cf_by=`(whoami) 2>/dev/null`
+cf_email="$cf_by@localhost"
+
+# Dynamic loading works using the dlopen() functions. Note that dlfcn.h
+# used to be broken, it declared _dl*() rather than dl*(). This was the
+# case up to 3.10, it has been fixed in 4.11. I'm not sure if it was
+# fixed in 4.10. If you have the older header just ignore the warnings
+# (since pointers and integers have the same format on m88k).
+
+# usedl=true
+usedl=false
+
+# For cc rather than gcc the flags would be `-K PIC' for compiling and
+# -G for loading. I haven't tested this.
+
+#####################################
+# <takis@XFree86.Org>
+# Use -fPIC instead -fpic
+#####################################
+
+cccdlflags=-fPIC
+#We must use gcc
+ld="gcc"
+lddlflags="-shared"
+
+############################################################################
+# DGUX Posix 4A Draft 10 Thread support
+# <takis@XFree86.Org>
+# use Configure -Dusethreads to enable
+############################################################################
+
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="$ccflags"
+ # DG/UX has this for sure! Main Configure fails to
+ # detect it but it is needed!
+ d_pthread_atfork='define'
+ shift
+ # DG/UX's sched_yield is in -lrte
+ # Do *NOT* add there the malloc native
+ # DG/UX library!
+ libswanted="dbm posix resolv socket nsl dl m rte"
+ archname="ix86-dgux-thread"
+ sitearch="$prefix/lib/perl58/$archname"
+ sitelib="$prefix/lib/perl58"
+ case "$cc" in
+ *gcc*)
+ #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
+ #### Otherwise take out the switch -pthread
+ #### And add manually the -D_POSIX4A_DRAFT10_SOURCE flag.
+ ld="gcc"
+ ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE"
+ # Debug build : use -DS flag on command line perl
+ # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread"
+ cccdlflags='-fPIC'
+ lddlflags="-shared"
+ #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
+ #### Otherwise take out the switch -pthread
+ #### And add manually the -lthread library.
+ ldflags="$ldflags -pthread"
+ ;;
+
+ *)
+ echo "Not supported DG/UX cc and threads !"
+ ;;
+ esac
+esac
+EOCBU
+
+# "./Configure -d" can't figure this out easily
+d_suidsafe='define'
+
+###################################################
diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh
new file mode 100644
index 0000000000..3ae9d22ae1
--- /dev/null
+++ b/hints/dos_djgpp.sh
@@ -0,0 +1,76 @@
+# hints file for dos/djgpp v2.xx
+# Original by Laszlo Molnar <molnarl@cdata.tvnet.hu>
+
+# 971015 - archname changed from 'djgpp' to 'dos-djgpp'
+# 971210 - threads support
+# 000222 - added -DPERL_EXTERNAL_GLOB to ccflags
+
+archname='dos-djgpp'
+archobjs='djgpp.o'
+path_sep=\;
+startsh="#! /bin/sh"
+
+cc='gcc'
+ld='gcc'
+usrinc="$DJDIR/include"
+
+libpth="$DJDIR/lib"
+libc="$libpth/libc.a"
+
+so='none'
+usedl='n'
+
+firstmakefile='GNUmakefile'
+exe_ext='.exe'
+
+randbits=31
+lns='cp'
+
+usenm='true'
+
+# this reportedly causes compile errors in system includes
+i_ieeefp='undef'
+
+d_link='undef' # these are empty functions in libc.a
+d_symlink='undef'
+d_fork='undef'
+d_pipe='undef'
+
+startperl='#!perl'
+
+case "X$optimize" in
+ X)
+ optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+ ldflags='-s'
+ ;;
+ X*)
+ ldflags=' '
+ ;;
+esac
+ccflags="$ccflags -DPERL_EXTERNAL_GLOB"
+usemymalloc='n'
+timetype='time_t'
+
+prefix=$DJDIR
+privlib=$prefix/lib/perl5
+archlib=$privlib
+sitelib=$privlib/site
+sitearch=$sitelib
+
+eagain='EAGAIN'
+rd_nodata='-1'
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
+
+useperlio='undef'
+uselargefiles='undef'
diff --git a/hints/dynix.sh b/hints/dynix.sh
new file mode 100644
index 0000000000..4bdb804f53
--- /dev/null
+++ b/hints/dynix.sh
@@ -0,0 +1,7 @@
+# If this doesn't work, try specifying 'none' for hints.
+d_castneg=undef
+libswanted=`echo $libswanted | sed -e 's/socket /socket seq /'`
+
+# Reported by Craig Milo Rogers <Rogers@ISI.EDU>
+# Date: Tue, 30 Jan 96 15:29:26 PST
+d_casti32=undef
diff --git a/hints/dynixptx.sh b/hints/dynixptx.sh
new file mode 100644
index 0000000000..b08dbc29d7
--- /dev/null
+++ b/hints/dynixptx.sh
@@ -0,0 +1,60 @@
+# Sequent Dynix/Ptx v. 4 hints
+# Created 1996/03/15 by Brad Howerter, bhower@wgc.woodward.com
+
+# Modified 1998/11/10 by Martin J. Bligh, mbligh@sequent.com
+# to incorporate work done by Kurtis D. Rader & myself.
+
+# Use Configure -Dcc=gcc to use gcc.
+
+# cc wants -G for dynamic loading
+lddlflags='-G'
+
+# Remove inet to avoid this error in Configure, which causes Configure
+# to be unable to figure out return types:
+# dynamic linker: ./ssize: can't find libinet.so,
+# link with -lsocket instead of -linet
+
+libswanted=`echo $libswanted | sed -e 's/ inet / /'`
+
+# Configure defaults to usenm='y', which doesn't work very well
+usenm='n'
+
+# removed d_vfork='define'; we can't use it any more ...
+
+case "$optimize" in
+'') optimize='-Wc,-O3 -W0,-xstring' ;;
+esac
+
+# We override d_socket because it's very hard for Configure to get it right
+# in Dynix/Ptx, for several reasons.
+# (1) the socket interface is in libsocket.so -- this wouldn't be so hard
+# for Configure to fathom...but it gets more tangled.
+# (2) if the system has been patched there can be libsocket.so.1.FOO.BAR,
+# the FOO.BAR being the old version of the system before the patching.
+# Configure picks up the old broken version.
+# (3) libsocket.so points to either libsocket.so.1 (v4.2)
+# or libsocket.so.1.1 (v4.4) The socket call in libsocket.so.1.1
+# (BSD socket library) is called bsd_socket(), and has a macro wrapper
+# to hide this.
+# This information kindly provided by Martin J. Bligh of Sequent.
+# As he puts it:
+# "Sequent has unusual capabilities, taking it above and beyond
+# the complexity of any other vendor" :-)
+#
+# Jarkko Hietaniemi November 1998
+
+case "$osvers" in
+4.[45]*) # configure doesn't find sockets, as they're in libsocket, not libc
+ d_socket='define'
+ d_oldsock='undef'
+ d_sockpair='define'
+ ;;
+4.2*) # on ptx/TCP 4.2, we can use BSD sockets, but they're not the default.
+ cppflags="$cppflags -Wc,+bsd-socket"
+ ccflags="$ccflags -Wc,+bsd-socket"
+ ldflags="$ldflags -Wc,+bsd-socket"
+ d_socket='define'
+ d_oldsock='undef'
+ d_sockpair='define'
+ ;;
+esac
diff --git a/hints/epix.sh b/hints/epix.sh
new file mode 100644
index 0000000000..dcad3c5d47
--- /dev/null
+++ b/hints/epix.sh
@@ -0,0 +1,66 @@
+# epix.sh
+# Hint file for EP/IX on CDC RISC boxes.
+#
+# From: Stanley Donald Capelik <sd9sdc@hp100.den.mmc.com>
+# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Last modified: Mon May 8 15:29:18 EDT 1995
+#
+# This hint file appears to be based on the svr4 hints for perl5.000,
+# with some CDC-specific additions. I've tried to updated it to
+# match the 5.001 svr4 hints, which allow for dynamic loading,
+# but I have no way of testing the resulting file.
+#
+# There were also some contradictions that I've tried to straighten
+# out, but I'm not sure I got them all right.
+#
+# Edit config.sh to change shmattype from 'char *' to 'void *'"
+
+# Use Configure -Dcc=gcc to use gcc.
+case "$cc" in
+'') cc='/bin/cc3.11'
+ test -f $cc || cc='/usr/ccs/bin/cc'
+ ;;
+esac
+
+usrinc='/svr4/usr/include'
+
+# Various things that Configure apparently doesn't get right.
+strings='/svr4/usr/include/string.h'
+timeincl='/svr4/usr/include/sys/time.h '
+libc='/svr4/usr/lib/libc.a'
+glibpth="/svr4/usr/lib /svr4/usr/lib/cmplrs/cc /usr/ccs/lib /svr4/lib /svr4/usr/ucblib $glibpth"
+osname='epix2'
+archname='epix2'
+d_suidsafe='define' # "./Configure -d" can't figure this out easilly
+d_flock='undef'
+
+# Old version had this, but I'm not sure why since the old version
+# also mucked around with libswanted. This is also definitely wrong
+# if the user is trying to use DB_File or GDBM_File.
+# libs='-lsocket -lnsl -ldbm -ldl -lc -lcrypt -lm -lucb'
+
+# We include support for using libraries in /usr/ucblib, but the setting
+# of libswanted excludes some libraries found there. You may want to
+# prevent "ucb" from being removed from libswanted and see if perl will
+# build on your system.
+ldflags="$ldflags -non_shared -systype svr4 -L/svr4/usr/lib -L/svr4/usr/lib/cmplrs/cc -L/usr/ccs/lib -L/svr4/usr/ucblib"
+ccflags="$ccflags -systype svr4 -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude"
+cppflags="$ccflags -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude"
+
+# Don't use problematic libraries:
+
+libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
+# libmalloc.a - Probably using Perl's malloc() anyway.
+# libucb.a - Remove it if you have problems ld'ing. We include it because
+# it is needed for ODBM_File and NDBM_File extensions.
+if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library:
+ # Use the "native" counterparts, not the BSD emulation stuff:
+ d_bcmp='undef'; d_bcopy='undef'; d_bzero='undef'; d_safebcpy='undef'
+ d_index='undef'; d_killpg='undef'; d_getprior='undef'; d_setprior='undef'
+ d_setlinebuf='undef'; d_setregid='undef'; d_setreuid='undef'
+fi
+
+lddlflags="-G $ldflags" # Probably needed for dynamic loading
+# We _do_ want the -L paths in ldflags, but we don't want the -non_shared.
+lddlflags=`echo $lddlflags | sed 's/-non_shared//'`
+
diff --git a/hints/esix4.sh b/hints/esix4.sh
new file mode 100644
index 0000000000..b1d697cccb
--- /dev/null
+++ b/hints/esix4.sh
@@ -0,0 +1,36 @@
+# hints/esix4.sh
+# Original esix4 hint file courtesy of
+# Kevin O'Gorman ( kevin@kosman.UUCP, kevin%kosman.uucp@nrc.com )
+#
+# Use Configure -Dcc=gcc to use gcc.
+
+# Why can't we just use PATH? It contains /usr/ccs/bin.
+case "$cc" in
+'') cc='/bin/cc'
+ test -f $cc || cc='/usr/ccs/bin/cc'
+ ;;
+esac
+
+ldflags="$ldflags -L/usr/ccs/lib -L/usr/ucblib"
+test -d /usr/local/man || mansrc='none'
+# Do we really need to tell cc to look in /usr/include?
+ccflags="$ccflags -I/usr/include -I/usr/ucbinclude"
+libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' `
+d_index='undef'
+d_suidsafe=define
+usevfork='false'
+if test "$osvers" = "3.0"; then
+ d_gconvert='undef'
+ grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >esix$$
+ if test -s esix$$; then
+ cat <<EOM >&2
+
+WARNING: You are likely to have problems compiling the Socket extension
+unless you fix the unterminated comment for AF_OSI in the file
+/usr/include/sys/socket.h.
+
+EOM
+ fi
+ rm -f esix$$
+fi
+
diff --git a/hints/fps.sh b/hints/fps.sh
new file mode 100644
index 0000000000..7726790ac0
--- /dev/null
+++ b/hints/fps.sh
@@ -0,0 +1 @@
+ccflags="$ccflags -J"
diff --git a/hints/freebsd.sh b/hints/freebsd.sh
new file mode 100644
index 0000000000..4a01430017
--- /dev/null
+++ b/hints/freebsd.sh
@@ -0,0 +1,256 @@
+# Original based on info from
+# Carl M. Fongheiser <cmf@ins.infonet.net>
+# Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT)
+#
+# Additional 1.1.5 defines from
+# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
+# Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET)
+#
+# Additional 2.* defines from
+# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
+# Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST)
+#
+# Additional 2.0.5 and 2.1 defined from
+# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net>
+# Date: Fri, 12 May 1995 14:30:38 +0200 (MET DST)
+#
+# Additional 2.2 defines from
+# Mark Murray <mark@grondar.za>
+# Date: Wed, 6 Nov 1996 09:44:58 +0200 (MET)
+#
+# Modified to ensure we replace -lc with -lc_r, and
+# to put in place-holders for various specific hints.
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Date: Tue Mar 10 16:07:00 EST 1998
+#
+# Support for FreeBSD/ELF
+# Ollivier Robert <roberto@keltia.freenix.fr>
+# Date: Wed Sep 2 16:22:12 CEST 1998
+#
+# The two flags "-fpic -DPIC" are used to indicate a
+# will-be-shared object. Configure will guess the -fpic, (and the
+# -DPIC is not used by perl proper) but the full define is included to
+# be consistent with the FreeBSD general shared libs building process.
+#
+# setreuid and friends are inherently broken in all versions of FreeBSD
+# before 2.1-current (before approx date 4/15/95). It is fixed in 2.0.5
+# and what-will-be-2.1
+#
+
+case "$osvers" in
+0.*|1.0*)
+ usedl="$undef"
+ ;;
+1.1*)
+ malloctype='void *'
+ groupstype='int'
+ d_setregid='undef'
+ d_setreuid='undef'
+ d_setrgid='undef'
+ d_setruid='undef'
+ ;;
+2.0-release*)
+ d_setregid='undef'
+ d_setreuid='undef'
+ d_setrgid='undef'
+ d_setruid='undef'
+ ;;
+#
+# Trying to cover 2.0.5, 2.1-current and future 2.1/2.2
+# It does not covert all 2.1-current versions as the output of uname
+# changed a few times.
+#
+# Even though seteuid/setegid are available, they've been turned off
+# because perl isn't coded with saved set[ug]id variables in mind.
+# In addition, a small patch is requried to suidperl to avoid a security
+# problem with FreeBSD.
+#
+2.0.5*|2.0-built*|2.1*)
+ usevfork='true'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
+ d_setregid='define'
+ d_setreuid='define'
+ d_setegid='undef'
+ d_seteuid='undef'
+ test -r ./broken-db.msg && . ./broken-db.msg
+ ;;
+#
+# 2.2 and above have phkmalloc(3).
+# don't use -lmalloc (maybe there's an old one from 1.1.5.1 floating around)
+2.2*)
+ usevfork='true'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
+ libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ d_setregid='define'
+ d_setreuid='define'
+ d_setegid='undef'
+ d_seteuid='undef'
+ ;;
+*) usevfork='true'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
+ libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ ;;
+esac
+
+# Dynamic Loading flags have not changed much, so they are separated
+# out here to avoid duplicating them everywhere.
+case "$osvers" in
+0.*|1.0*) ;;
+
+1*|2*) cccdlflags='-DPIC -fpic'
+ lddlflags="-Bshareable $lddlflags"
+ ;;
+
+*)
+ objformat=`/usr/bin/objformat`
+ if [ x$objformat = xelf ]; then
+ libpth="/usr/lib /usr/local/lib"
+ glibpth="/usr/lib /usr/local/lib"
+ ldflags="-Wl,-E "
+ lddlflags="-shared "
+ else
+ if [ -e /usr/lib/aout ]; then
+ libpth="/usr/lib/aout /usr/local/lib /usr/lib"
+ glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
+ fi
+ lddlflags='-Bshareable'
+ fi
+ cccdlflags='-DPIC -fpic'
+ ;;
+esac
+
+case "$osvers" in
+0*|1*|2*|3*) ;;
+
+*)
+ ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
+ if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
+ usenm=false
+ fi
+ ;;
+esac
+
+cat <<'EOM' >&4
+
+Some users have reported that Configure halts when testing for
+the O_NONBLOCK symbol with a syntax error. This is apparently a
+sh error. Rerunning Configure with ksh apparently fixes the
+problem. Try
+ ksh Configure [your options]
+
+EOM
+
+# From: Anton Berezin <tobez@plab.ku.dk>
+# To: perl5-porters@perl.org
+# Subject: [PATCH 5.005_54] Configure - hints/freebsd.sh signal handler type
+# Date: 30 Nov 1998 19:46:24 +0100
+# Message-ID: <864srhhvcv.fsf@lion.plab.ku.dk>
+
+signal_t='void'
+d_voidsig='define'
+
+# set libperl.so.X.X for 2.2.X
+case "$osvers" in
+2.2*)
+ # unfortunately this code gets executed before
+ # the equivalent in the main Configure so we copy a little
+ # from Configure XXX Configure should be fixed.
+ if $test -r $src/patchlevel.h;then
+ patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
+ subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
+ else
+ patchlevel=0
+ subversion=0
+ fi
+ libperl="libperl.so.$patchlevel.$subversion"
+ unset patchlevel
+ unset subversion
+ ;;
+esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
+ case "$osvers" in
+ 0*|1*|2.0*|2.1*) cat <<EOM >&4
+I did not know that FreeBSD $osvers supports POSIX threads.
+
+Feel free to tell perlbug@perl.org otherwise.
+EOM
+ exit 1
+ ;;
+
+ 2.2.[0-7]*)
+ cat <<EOM >&4
+POSIX threads are not supported well by FreeBSD $osvers.
+
+Please consider upgrading to at least FreeBSD 2.2.8,
+or preferably to the most recent -RELEASE or -STABLE
+version (see http://www.freebsd.org/releases/).
+
+(While 2.2.7 does have pthreads, it has some problems
+ with the combination of threads and pipes and therefore
+ many Perl tests will either hang or fail.)
+EOM
+ exit 1
+ ;;
+
+ *)
+ if [ ! -r "$lc_r" ]; then
+ cat <<EOM >&4
+POSIX threads should be supported by FreeBSD $osvers --
+but your system is missing the shared libc_r.
+(/sbin/ldconfig -r doesn't find any).
+
+Consider using the latest STABLE release.
+EOM
+ exit 1
+ fi
+ ldflags="-pthread $ldflags"
+ case "$osvers" in
+ 4.*) # 4.x has gethostbyaddr_r but it is
+ # "Temporary function, not threadsafe"...
+ d_gethostbyaddr_r="undef"
+ d_gethostbyaddr_r_proto="undef"
+ ;;
+ esac
+ ;;
+
+ esac
+
+ set `echo X "$libswanted "| sed -e 's/ c / c_r /'`
+ shift
+ libswanted="$*"
+ # Configure will probably pick the wrong libc to use for nm scan.
+ # The safest quick-fix is just to not use nm at all...
+ usenm=false
+
+ case "$osvers" in
+ 2.2.8*)
+ # ... but this does not apply for 2.2.8 - we know it's safe
+ libc="$lc_r"
+ usenm=true
+ ;;
+ esac
+
+ unset lc_r
+
+ # Even with the malloc mutexes the Perl malloc does not
+ # seem to be threadsafe in FreeBSD?
+ usemymalloc=n
+
+esac
+EOCBU
+
diff --git a/hints/genix.sh b/hints/genix.sh
new file mode 100644
index 0000000000..16b6879b46
--- /dev/null
+++ b/hints/genix.sh
@@ -0,0 +1 @@
+i_varargs=undef
diff --git a/hints/gnu.sh b/hints/gnu.sh
new file mode 100644
index 0000000000..927bceab9d
--- /dev/null
+++ b/hints/gnu.sh
@@ -0,0 +1,33 @@
+# hints/gnu.sh
+# Last modified: Thu Dec 10 20:47:28 CET 1998
+# Mark Kettenis <kettenis@phys.uva.nl>
+
+# libnsl is unusable on the Hurd.
+# XXX remove this once SUNRPC is implemented.
+set `echo X "$libswanted "| sed -e 's/ nsl / /'`
+shift
+libswanted="$*"
+
+case "$optimize" in
+'') optimize='-O2' ;;
+esac
+
+# Flags needed to produce shared libraries.
+lddlflags='-shared'
+
+# Flags needed by programs that use dynamic linking.
+ccdlflags='-Wl,-E'
+
+# The following routines are only available as stubs in GNU libc.
+# XXX remove this once metaconf detects the GNU libc stubs.
+d_msgctl='undef'
+d_msgget='undef'
+d_msgrcv='undef'
+d_msgsnd='undef'
+d_semctl='undef'
+d_semget='undef'
+d_semop='undef'
+d_shmat='undef'
+d_shmctl='undef'
+d_shmdt='undef'
+d_shmget='undef'
diff --git a/hints/greenhills.sh b/hints/greenhills.sh
new file mode 100644
index 0000000000..da6fcc95b0
--- /dev/null
+++ b/hints/greenhills.sh
@@ -0,0 +1 @@
+ccflags="$ccflags -X18"
diff --git a/hints/hpux.sh b/hints/hpux.sh
new file mode 100644
index 0000000000..71705163d4
--- /dev/null
+++ b/hints/hpux.sh
@@ -0,0 +1,598 @@
+#!/usr/bin/sh
+
+### SYSTEM ARCHITECTURE
+
+# Determine the architecture type of this system.
+# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
+ xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
+if [ "$xxOsRevMajor" -ge 10 ]; then
+ # This system is running >= 10.x
+
+ # Tested on 10.01 PA1.x and 10.20 PA[12].x.
+ # Idea: Scan /usr/include/sys/unistd.h for matches with
+ # "#define CPU_* `getconf # CPU_VERSION`" to determine CPU type.
+ # Note the text following "CPU_" is used, *NOT* the comment.
+ #
+ # ASSUMPTIONS: Numbers will continue to be defined in hex -- and in
+ # /usr/include/sys/unistd.h -- and the CPU_* #defines will be kept
+ # up to date with new CPU/OS releases.
+ xxcpu=`getconf CPU_VERSION`; # Get the number.
+ xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
+ archname=`sed -n -e "s/^#[[:space:]]*define[[:space:]]*CPU_//p" /usr/include/sys/unistd.h |
+ sed -n -e "s/[[:space:]]*$xxcpu[[:space:]].*//p" |
+ sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`;
+else
+ # This system is running <= 9.x
+ # Tested on 9.0[57] PA and [78].0 MC680[23]0. Idea: After removing
+ # MC6888[12] from context string, use first CPU identifier.
+ #
+ # ASSUMPTION: Only CPU identifiers contain no lowercase letters.
+ archname=`getcontext | tr ' ' '\012' | grep -v '[a-z]' | grep -v MC688 |
+ sed -e 's/HP-//' -e 1q`;
+ selecttype='int *'
+ fi
+
+# For some strange reason, the u32align test from Configure hangs in
+# HP-UX 10.20 since the December 2001 patches. So hint it to avoid
+# the test.
+if [ "$xxOsRevMajor" -le 10 ]; then
+ d_u32align=$define
+ fi
+
+echo "Archname is $archname"
+
+# Fix XSlib (CPAN) confusion when re-using a prefix but changing from ILP32
+# to LP64 builds. They're NOT binary compatible, so quit claiming they are.
+archname64=LP64
+
+
+### HP-UX OS specific behaviour
+
+# -ldbm is obsolete and should not be used
+# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
+# -lPW is obsolete and should not be used
+# The libraries crypt, malloc, ndir, and net are empty.
+set `echo "X $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'`
+shift
+libswanted="$*"
+
+cc=${cc:-cc}
+ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar.
+full_ar=$ar # I repeat, no GNU ar. arrr.
+
+set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'`
+shift
+ cc_cppflags="$* -D_HPUX_SOURCE"
+cppflags="-Aa -D__STDC_EXT__ $cc_cppflags"
+
+case "$prefix" in
+ "") prefix='/opt/perl5' ;;
+ esac
+
+ gnu_as=no
+ gnu_ld=no
+case `$cc -v 2>&1`"" in
+ *gcc*) ccisgcc="$define"
+ ccflags="$cc_cppflags"
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case "$gccversion" in
+ [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-(
+ ccflags="$ccflags -DUINT32_MAX_BROKEN"
+ ;;
+ 3*) # GCC (both 32bit and 64bit) will define __STDC_EXT__
+ # by default when using GCC 3.0 and newer versions of
+ # the compiler.
+ cppflags="$cc_cppflags"
+ ;;
+ esac
+ case "`getconf KERNEL_BITS 2>/dev/null`" in
+ *64*)
+ echo "main(){}">try.c
+ case "$gccversion" in
+ 3*)
+ case "$archname" in
+ PA-RISC*)
+ case "$ccflags" in
+ *-mpa-risc*) ;;
+ *) ccflags="$ccflags -mpa-risc-2-0" ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) # gcc with gas will not accept +DA2.0
+ case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in
+ *"+DA2.0"*) # gas
+ gnu_as=yes
+ ;;
+ *) # HPas
+ ccflags="$ccflags -Wa,+DA2.0"
+ ;;
+ esac
+ ;;
+ esac
+ # gcc with gld will not accept +vnocompatwarnings
+ case "`$cc -o try -Wl,+vnocompatwarnings try.c 2>&1`" in
+ *"+vnocompat"*) # gld
+ gnu_ld=yes
+ ;;
+ *) # HPld
+ case "$gccversion" in
+ [12]*)
+ # Why not 3 as well here?
+ # Since not relevant to IA64, not changed.
+ ldflags="$ldflags -Wl,+vnocompatwarnings"
+ ccflags="$ccflags -Wl,+vnocompatwarnings"
+ ;;
+ esac
+ ;;
+ esac
+ rm -f try.c
+ ;;
+ esac
+ ;;
+ *) ccisgcc=''
+ ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'`
+ case "$ccflags" in
+ "-Ae "*) ;;
+ *) ccflags="-Ae $cc_cppflags -Wl,+vnocompatwarnings" ;;
+ esac
+ # Needed because cpp does only support -Aa (not -Ae)
+ cpplast='-'
+ cppminus='-'
+ cppstdin='cc -E -Aa -D__STDC_EXT__'
+ cpprun=$cppstdin
+# case "$d_casti32" in
+# "") d_casti32='undef' ;;
+# esac
+ ;;
+ esac
+
+# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+
+### 64 BITNESS
+
+# Some gcc versions do native 64 bit long (e.g. 2.9-hppa-000310 and gcc-3.0)
+# We have to force 64bitness to go search the right libraries
+ gcc_64native=no
+case "$ccisgcc" in
+ $define|true|[Yy])
+ echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c
+ $cc -o try $ccflags $ldflags try.c
+ if [ "`try`" = "8" ]; then
+ cat <<EOM >&4
+
+*** This version of gcc uses 64 bit longs. -Duse64bitall is
+*** implicitly set to enable continuation
+EOM
+ use64bitall=$define
+ gcc_64native=yes
+ fi
+ ;;
+ esac
+
+case "$use64bitall" in
+ $define|true|[yY]*) use64bitint="$define" ;;
+ esac
+
+case "$usemorebits" in
+ $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+ esac
+
+case "$archname" in
+ IA64*)
+ # While here, override so=sl auto-detection
+ so='so'
+ ;;
+ *)
+ case "$uselongdouble" in
+ *) ;;
+ $define|true|[yY]*)
+ cat <<EOM >&4
+
+*** long doubles are not (yet) supported on HP-UX (any version)
+*** Until it does, we cannot continue, aborting.
+EOM
+ exit 1 ;;
+ esac
+ ;;
+ esac
+
+case "$use64bitint" in
+ $define|true|[Yy])
+
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+*** 64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+*** You need at least HP-UX 11.0.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+
+ # Set libc and the library paths
+ case "$archname" in
+ PA-RISC*)
+ loclibpth="$loclibpth /lib/pa20_64"
+ libc='/lib/pa20_64/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux64"
+ libc='/usr/lib/hpux64/libc.so' ;;
+ esac
+ if [ ! -f "$libc" ]; then
+ cat <<EOM >&4
+
+*** You do not seem to have the 64-bit libc.
+*** I cannot find the file $libc.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+
+ case "$ccisgcc" in
+ $define|true|[Yy])
+ # For the moment, don't care that it ain't supported (yet)
+ # by gcc (up to and including 2.95.3), cause it'll crash
+ # anyway. Expect auto-detection of 64-bit enabled gcc on
+ # HP-UX soon, including a user-friendly exit
+ case $gcc_64native in
+ no) case "$gccversion" in
+ [123]*) ccflags="$ccflags -mlp64"
+ case "$archname" in
+ PA-RISC*)
+ ldflags="$ldflags -Wl,+DD64"
+ ;;
+ IA64*)
+ ldflags="$ldflags -mlp64"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ ;;
+ esac
+
+ # Reset the library checker to make sure libraries
+ # are the right type
+ # (NOTE: on IA64, this doesn't work with .a files.)
+ libscheck='case "`/usr/bin/file $xxx`" in
+ *ELF-64*|*LP64*|*PA-RISC2.0*) ;;
+ *) xxx=/no/64-bit$xxx ;;
+ esac'
+
+ ;;
+
+ *) # Not in 64-bit mode
+
+ case "$archname" in
+ PA-RISC*)
+ libc='/lib/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux32"
+ libc='/usr/lib/hpux32/libc.so' ;;
+ esac
+ ;;
+ esac
+
+# By setting the deferred flag below, this means that if you run perl
+# on a system that does not have the required shared library that you
+# linked it with, it will die when you try to access a symbol in the
+# (missing) shared library. If you would rather know at perl startup
+# time that you are missing an important shared library, switch the
+# comments so that immediate, rather than deferred loading is
+# performed. Even with immediate loading, you can postpone errors for
+# undefined (or multiply defined) routines until actual access by
+# adding the "nonfatal" option.
+# ccdlflags="-Wl,-E -Wl,-B,immediate $ccdlflags"
+# ccdlflags="-Wl,-E -Wl,-B,immediate,-B,nonfatal $ccdlflags"
+if [ "$gnu_ld" = "yes" ]; then
+ ccdlflags="-Wl,-E $ccdlflags"
+else
+ ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
+ fi
+
+
+### COMPILER SPECIFICS
+
+## Local restrictions (point to README.hpux to lift these)
+
+## Optimization limits
+cat >try.c <<EOF
+#include <sys/resource.h>
+
+int main ()
+{
+ struct rlimit rl;
+ int i = getrlimit (RLIMIT_DATA, &rl);
+ printf ("%d\n", rl.rlim_cur / (1024 * 1024));
+ } /* main */
+EOF
+$cc -o try $ccflags $ldflags try.c
+ maxdsiz=`try`
+rm -f try try.c core
+if [ $maxdsiz -le 64 ]; then
+ # 64 Mb is probably not enough to optimize toke.c
+ # and regexp.c with -O2
+ cat <<EOM >&4
+Your kernel limits the data section of your programs to $maxdsiz Mb,
+which is (sadly) not enough to fully optimize some parts of the
+perl binary. I'll try to use a lower optimization level for
+those parts. If you are a sysadmin, and you *do* want full
+optimization, raise the 'maxdsiz' kernel configuration parameter
+to at least 0x08000000 (128 Mb) and rebuild your kernel.
+EOM
+regexec_cflags=''
+doop_cflags=''
+ fi
+
+case "$ccisgcc" in
+ $define|true|[Yy])
+
+ case "$optimize" in
+ "") optimize="-g -O" ;;
+ *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
+ esac
+ #ld="$cc"
+ ld=/usr/bin/ld
+ cccdlflags='-fPIC'
+ #lddlflags='-shared'
+ lddlflags='-b'
+ case "$optimize" in
+ *-g*-O*|*-O*-g*)
+ # gcc without gas will not accept -g
+ echo "main(){}">try.c
+ case "`$cc $optimize -c try.c 2>&1`" in
+ *"-g option disabled"*)
+ set `echo "X $optimize " | sed -e 's/ -g / /'`
+ shift
+ optimize="$*"
+ ;;
+ esac
+ ;;
+ esac
+ if [ $maxdsiz -le 64 ]; then
+ case "$optimize" in
+ *O2*) opt=`echo "$optimize" | sed -e 's/O2/O1/'`
+ toke_cflags="$toke_cflags;optimize=\"$opt\""
+ regexec_cflags="optimize=\"$opt\""
+ ;;
+ esac
+ fi
+ ;;
+
+ *) # HP's compiler cannot combine -g and -O
+ case "$optimize" in
+ "") optimize="+O2 +Onolimit" ;;
+ *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
+ esac
+ case "$optimize" in
+ *-O*|\
+ *O2*) opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'`
+ ;;
+ *) opt="$optimize"
+ ;;
+ esac
+ if [ $maxdsiz -le 64 ]; then
+ toke_cflags="$toke_cflags;optimize=\"$opt\""
+ regexec_cflags="optimize=\"$opt\""
+ fi
+ case "$archname" in
+ IA64*)
+ doop_cflags="optimize=\"$opt\""
+ ;;
+ esac
+ ld=/usr/bin/ld
+ cccdlflags='+Z'
+ lddlflags='-b +vnocompatwarnings'
+ ;;
+ esac
+
+## LARGEFILES
+
+#case "$uselargefiles-$ccisgcc" in
+# "$define-$define"|'-define')
+# cat <<EOM >&4
+#
+#*** I'm ignoring large files for this build because
+#*** I don't know how to do use large files in HP-UX using gcc.
+#
+#EOM
+# uselargefiles="$undef"
+# ;;
+# esac
+
+cat >UU/uselargefiles.cbu <<'EOCBU'
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use large files.
+case "$uselargefiles" in
+ ""|$define|true|[yY]*)
+ # there are largefile flags available via getconf(1)
+ # but we cheat for now. (Keep that in the left margin.)
+ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ case " $ccflags " in
+ *" $ccflags_uselargefiles "*) ;;
+ *) ccflags="$ccflags $ccflags_uselargefiles" ;;
+ esac
+
+ if test -z "$ccisgcc" -a -z "$gccversion"; then
+ # The strict ANSI mode (-Aa) doesn't like large files.
+ ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'`
+ case "$ccflags" in
+ *-Ae*) ;;
+ *) ccflags="$ccflags -Ae" ;;
+ esac
+ fi
+ ;;
+ esac
+EOCBU
+
+# THREADING
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat >UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+ $define|true|[yY]*)
+ if [ "$xxOsRevMajor" -lt 10 ]; then
+ cat <<EOM >&4
+
+HP-UX $xxOsRevMajor cannot support POSIX threads.
+Consider upgrading to at least HP-UX 11.
+Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+
+ if [ "$xxOsRevMajor" -eq 10 ]; then
+ # Under 10.X, a threaded perl can be built
+ if [ -f /usr/include/pthread.h ]; then
+ if [ -f /usr/lib/libcma.sl ]; then
+ # DCE (from Core OS CD) is installed
+
+ # Check if it is pristine, or patched
+ cmavsn=`what /usr/lib/libcma.sl 2>&1 | grep 1996`
+ if [ ! -z "$cmavsn" ]; then
+ cat <<EOM >&4
+
+***************************************************************************
+
+Perl will support threading through /usr/lib/libcma.sl from
+the HP DCE package, but the version found is too old to be
+reliable.
+
+If you are not depending on this specific version of the library,
+consider to upgrade using patch PHSS_23672 (read README.hpux)
+
+***************************************************************************
+
+(sleeping for 10 seconds...)
+EOM
+ sleep 10
+ fi
+
+ # It needs # libcma and OLD_PTHREADS_API. Also
+ # <pthread.h> needs to be #included before any
+ # other includes (in perl.h)
+
+ # HP-UX 10.X uses the old pthreads API
+ d_oldpthreads="$define"
+
+ # include libcma before all the others
+ libswanted="cma $libswanted"
+
+ # tell perl.h to include <pthread.h> before other
+ # include files
+ ccflags="$ccflags -DPTHREAD_H_FIRST"
+# First column on purpose:
+# this is not a standard Configure variable
+# but we need to get this noticed.
+pthread_h_first="$define"
+
+ # HP-UX 10.X seems to have no easy
+ # way of detecting these *time_r protos.
+ d_gmtime_r_proto='define'
+ gmtime_r_proto='REENTRANT_PROTO_I_TS'
+ d_localtime_r_proto='define'
+ localtime_r_proto='REENTRANT_PROTO_I_TS'
+
+ # Avoid the poisonous conflicting (and irrelevant)
+ # prototypes of setkey().
+ i_crypt="$undef"
+
+ # CMA redefines select to cma_select, and cma_select
+ # expects int * instead of fd_set * (just like 9.X)
+ selecttype='int *'
+
+ elif [ -f /usr/lib/libpthread.sl ]; then
+ # PTH package is installed
+ libswanted="pthread $libswanted"
+ else
+ libswanted="no_threads_available"
+ fi
+ else
+ libswanted="no_threads_available"
+ fi
+
+ if [ $libswanted = "no_threads_available" ]; then
+ cat <<EOM >&4
+
+In HP-UX 10.X for POSIX threads you need both of the files
+/usr/include/pthread.h and either /usr/lib/libcma.sl or /usr/lib/libpthread.sl.
+Either you must upgrade to HP-UX 11 or install a posix thread library:
+
+ DCE-CoreTools from HP-UX 10.20 Hardware Extensions 3.0 CD (B3920-13941)
+
+or
+
+ PTH package from e.g. http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html
+
+Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+ else
+ # 12 may want upping the _POSIX_C_SOURCE datestamp...
+ ccflags=" -D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags"
+ set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+ shift
+ libswanted="$*"
+ fi
+
+ ;;
+ esac
+EOCBU
+
+# The mysterious io_xs memory corruption in 11.00 32bit seems to get
+# fixed by not using Perl's malloc. Flip side is performance loss.
+# So we want mymalloc for all situations possible
+usemymalloc='y'
+case "$usethreads" in
+ $define|true|[yY]*) usemymalloc='n' ;;
+ *) case "$ccisgcc" in
+ $undef|false|[nN]*)
+ case "$use64bitint" in
+ $undef|false|[nN]*)
+ case "$ccflags" in
+ *-DDEBUGGING*) ;;
+ *) usemymalloc='n' ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+
+usemymalloc='n'
+case "$useperlio" in
+ $undef|false|[nN]*) usemymalloc='y' ;;
+ esac
+
+# fpclassify() is a macro, the library call is Fpclassify
+# Similarly with the others below.
+d_fpclassify='define'
+d_isnan='define'
+d_isinf='define'
+d_isfinite='define'
+d_unordered='define'
+# Next one(s) need the leading tab. These are special 'hint' symbols that
+# are not to be propagated to config.sh, all related to pthreads draft 4
+# interfaces.
+case "$d_oldpthreads" in
+ ''|$undef)
+ d_crypt_r_proto='undef'
+ d_getgrent_r_proto='undef'
+ d_getpwent_r_proto='undef'
+ d_strerror_r_proto='undef'
+ ;;
+ esac
diff --git a/hints/i386.sh b/hints/i386.sh
new file mode 100644
index 0000000000..0a810ffea8
--- /dev/null
+++ b/hints/i386.sh
@@ -0,0 +1 @@
+ldflags='-L/usr/ucblib'
diff --git a/hints/irix_4.sh b/hints/irix_4.sh
new file mode 100644
index 0000000000..5c5bdb2f0d
--- /dev/null
+++ b/hints/irix_4.sh
@@ -0,0 +1,45 @@
+#irix_4.sh
+# Last modified Fri May 5 14:06:37 EDT 1995
+optimize='-O1'
+
+# Does Configure really get these wrong? Why?
+d_voidsig=define
+d_charsprf=undef
+
+case "$cc" in
+*gcc*) ccflags="$ccflags -D_BSD_TYPES" ;;
+*) ccflags="$ccflags -ansiposix -signed" ;;
+esac
+
+# This hint due thanks Hershel Walters <walters@smd4d.wes.army.mil>
+# Date: Tue, 31 Jan 1995 16:32:53 -0600 (CST)
+# Subject: IRIX4.0.4(.5? 5.0?) problems
+# I don't know if they affect versions of perl other than 5.000 or
+# versions of IRIX other than 4.0.4.
+#
+cat <<'EOM' >&4
+If you have problems, you might have try including
+ -DSTANDARD_C -cckr
+in ccflags.
+EOM
+
+case "$usethreads" in
+$define|true|[yY]*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support POSIX threads.
+You should upgrade to at least IRIX 6.2 with pthread patches.
+EOM
+ exit 1
+ ;;
+esac
+
+case " $use64bits $use64bitint $use64bitall " in
+*" $define "*|*" true "*|*" [yY] "*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+esac
+
diff --git a/hints/irix_5.sh b/hints/irix_5.sh
new file mode 100644
index 0000000000..f895bcc5f6
--- /dev/null
+++ b/hints/irix_5.sh
@@ -0,0 +1,55 @@
+# irix_5.sh
+# Tue Jan 9 16:04:38 EST 1996
+# Add note about socket patch.
+#
+# Tue Jan 2 14:52:36 EST 1996
+# Apparently, there's a stdio bug that can lead to memory
+# corruption using perl's malloc, but not SGI's malloc.
+usemymalloc='n'
+
+ld=ld
+i_time='define'
+
+case "$cc" in
+*gcc*) ccflags="$ccflags -D_BSD_TYPES" ;;
+*) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000" ;;
+esac
+
+lddlflags="-shared"
+# For some reason we don't want -lsocket -lnsl or -ldl. Can anyone
+# contribute an explanation?
+set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
+shift
+libswanted="$*"
+
+# Date: Fri, 22 Dec 1995 11:49:17 -0800
+# From: Matthew Black <black@csulb.edu>
+# Subject: sockets broken under IRIX 5.3? YES...how to fix
+# Anyone attempting to use perl4 or perl5 with SGI IRIX 5.3 may discover
+# that sockets are essentially broken. The syslog interface for perl also
+# fails because it uses the broken socket interface. This problem was
+# reported to SGI as bug #255347 and it can be fixed by installing
+# patchSG0000596. The patch can be downloaded from Advantage OnLine (SGI's
+# WWW server) or from the Support Advantage 9/95 Patch CDROM. Thanks to Tom
+# Christiansen and others who provided assistance.
+
+case "$usethreads" in
+$define|true|[yY]*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support POSIX threads.
+You should upgrade to at least IRIX 6.2 with pthread patches.
+EOM
+ exit 1
+ ;;
+esac
+
+case " $use64bits $use64bitint $use64bitall " in
+*" $define "*|*" true "*|*" [yY] "*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+esac
+
diff --git a/hints/irix_6.sh b/hints/irix_6.sh
new file mode 100644
index 0000000000..8b14e54d55
--- /dev/null
+++ b/hints/irix_6.sh
@@ -0,0 +1,361 @@
+# hints/irix_6.sh
+#
+# original from Krishna Sethuraman, krishna@sgi.com
+#
+# Modified Mon Jul 22 14:52:25 EDT 1996
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# with help from Dean Roehrich <roehrich@cray.com>.
+# cc -n32 update info from Krishna Sethuraman, krishna@sgi.com.
+# additional update from Scott Henry, scotth@sgi.com
+
+# Futzed with by John Stoffel <jfs@fluent.com> on 4/24/1997
+# - assumes 'cc -n32' by default
+# - tries to check for various compiler versions and do the right
+# thing when it can
+# - warnings turned off (-n32 messages):
+# 1184 - "=" is used where where "==" may have been intended
+# 1552 - variable "foo" set but never used
+
+# Tweaked by Chip Salzenberg <chip@perl.com> on 5/13/97
+# - don't assume 'cc -n32' if the n32 libm.so is missing
+
+# Threaded by Jarkko Hietaniemi <jhi@iki.fi> on 11/18/97
+# - POSIX threads knowledge by IRIX version
+
+# gcc-enabled by Kurt Starsinic <kstar@isinet.com> on 3/24/1998
+
+# 64-bitty by Jarkko Hietaniemi on 9/1998
+
+# Use sh Configure -Dcc='cc -n32' to try compiling with -n32.
+# or -Dcc='cc -n32 -mips3' (or -mips4) to force (non)portability
+# Don't bother with -n32 unless you have the 7.1 or later compilers.
+# But there's no quick and light-weight way to check in 6.2.
+
+# NOTE: some IRIX cc versions, e.g. 7.3.1.1m (try cc -version) have
+# been known to have issues (coredumps) when compiling perl.c.
+# If you've used -OPT:fast_io=ON and this happens, try removing it.
+# If that fails, or you didn't use that, then try adjusting other
+# optimization options (-LNO, -INLINE, -O3 to -O2, etcetera).
+# The compiler bug has been reported to SGI.
+# -- Allen Smith <easmith@beatrice.rutgers.edu>
+
+# Let's assume we want to use 'cc -n32' by default, unless the
+# necessary libm is missing (which has happened at least twice)
+case "$cc" in
+'') case "$use64bitall" in
+ "$define"|true|[yY]*) test -f /usr/lib64/libm.so && cc='cc -64' ;;
+ *) test -f /usr/lib32/libm.so && cc='cc -n32' ;;
+ esac
+esac
+
+cc=${cc:-cc}
+
+case "$cc" in
+*gcc*) ;;
+*) ccversion=`cc -version 2>&1` ;;
+esac
+
+case "$use64bitint" in
+$define|true|[yY]*)
+ case "`uname -r`" in
+ [1-5]*|6.[01])
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+case "$use64bitall" in
+"$define"|true|[yY]*)
+ case "`uname -s`" in
+ IRIX)
+ cat >&4 <<EOM
+You cannot use -Duse64bitall in 32-bit IRIX, sorry.
+
+Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Check for which compiler we're using
+
+case "$cc" in
+*"cc -n32"*)
+
+ # If a library is requested to link against, make sure the
+ # objects in the library are of the same ABI we are compiling
+ # against. Albert Chin-A-Young <china@thewrittenword.com>
+ libscheck='case "$xxx" in
+*.a) /bin/ar p $xxx `/bin/ar t $xxx | sed q` >$$.o;
+ case "`/usr/bin/file $$.o`" in
+ *N32*) rm -f $$.o ;;
+ *) rm -f $$.o; xxx=/no/n32$xxx ;;
+ esac ;;
+*) case "`/usr/bin/file $xxx`" in
+ *N32*) ;;
+ *) xxx=/no/n32$xxx ;;
+ esac ;;
+esac'
+
+ # NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker
+ ldflags=' -L/usr/local/lib32 -L/usr/local/lib'
+ cccdlflags=' '
+ # From: David Billinghurst <David.Billinghurst@riotinto.com.au>
+ # If you get complaints about so_locations then change the following
+ # line to something like:
+ # lddlflags="-n32 -shared -check_registry /usr/lib32/so_locations"
+ lddlflags="-n32 -shared"
+ libc='/usr/lib32/libc.so'
+ plibpth='/usr/lib32 /lib32 /usr/ccs/lib'
+ ;;
+*"cc -64"*)
+
+ loclibpth="$loclibpth /usr/lib64"
+ libscheck='case "`/usr/bin/file $xxx`" in
+*64-bit*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+ # NOTE: -L/usr/lib64 -L/lib64 are automatically selected by the linker
+ ldflags=' -L/usr/local/lib64 -L/usr/local/lib'
+ cccdlflags=' '
+ # From: David Billinghurst <David.Billinghurst@riotinto.com.au>
+ # If you get complaints about so_locations then change the following
+ # line to something like:
+ # lddlflags="-64 -shared -check_registry /usr/lib64/so_locations"
+ lddlflags="-64 -shared"
+ libc='/usr/lib64/libc.so'
+ plibpth='/usr/lib64 /lib64 /usr/ccs/lib'
+ ;;
+*gcc*)
+ 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"
+ ldflags="$ldflags -mabi=64 -L/usr/lib64"
+ lddlflags="$lddlflags -mabi=64"
+ ;;
+ *) ccflags="$ccflags -DIRIX32_SEMUN_BROKEN_BY_GCC"
+ ;;
+ esac
+ ;;
+*)
+ # this is needed to force the old-32 paths
+ # since the system default can be changed.
+ ccflags="$ccflags -32 -D_BSD_TYPES -D_BSD_TIME -Olimit 3100"
+ optimize='-O'
+ ;;
+esac
+
+# Settings common to both native compiler modes.
+case "$cc" in
+*"cc -n32"*|*"cc -64"*)
+ ld=$cc
+
+ # perl's malloc can return improperly aligned buffer
+ # which (under 5.6.0RC1) leads into really bizarre bus errors
+ # and freak test failures (lib/safe1 #18, for example),
+ # even more so with -Duse64bitall: for example lib/io_linenumtb.
+ # fails under the harness but succeeds when run separately,
+ # under make test pragma/warnings #98 fails, and lib/io_dir
+ # apparently coredumps (the last two don't happen under
+ # the harness. Helmut Jarausch is seeing bus errors from
+ # miniperl, as was Scott Henry with snapshots from just before
+ # the RC1. --jhi
+ usemymalloc='undef'
+#malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"'
+
+ nm_opt='-p'
+ nm_so_opt='-p'
+
+ # Warnings to turn off because the source code hasn't
+ # been cleaned up enough yet to satisfy the IRIX cc.
+ # 1184: "=" is used where where "==" may have been intended.
+ # 1552: The variable "foobar" is set but never used.
+ woff=1184,1552
+
+ # Perl 5.004_57 introduced new qsort code into pp_ctl.c that
+ # makes IRIX cc prior to 7.2.1 to emit bad code.
+ # so some serious hackery follows to set pp_ctl flags correctly.
+
+ # Check for which version of the compiler we're running
+ case "`$cc -version 2>&1`" in
+ *7.0*) # Mongoose 7.0
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0"
+ optimize='none'
+ ;;
+ *7.1*|*7.2|*7.20) # Mongoose 7.1+
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0"
+ optimize='-O3'
+# This is a temporary fix for 5.005.
+# Leave pp_ctl_cflags line at left margin for Configure. See
+# hints/README.hints, especially the section
+# =head2 Propagating variables to config.sh
+pp_ctl_cflags='optimize=-O'
+ ;;
+ *7.*) # Mongoose 7.2.1+
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0:space=ON"
+ optimize='-O3'
+ ;;
+ *6.2*) # Ragnarok 6.2
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
+ optimize='none'
+ ;;
+ *) # Be safe and not optimize
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0"
+ optimize='none'
+ ;;
+ esac
+
+# this is to accommodate the 'modules' capability of the
+# 7.2 MIPSPro compilers, which allows for the compilers to be installed
+# in a nondefault location. Almost everything works as expected, but
+# /usr/include isn't caught properly. Hence see the /usr/include/pthread.h
+# change below to include TOOLROOT (a modules environment variable),
+# and the following code. Additional
+# code to accommodate the 'modules' environment should probably be added
+# here if possible, or be inserted as a ${TOOLROOT} reference before
+# absolute paths (again, see the pthread.h change below).
+# -- krishna@sgi.com, 8/23/98
+
+ if [ "X${TOOLROOT}" != "X" ]; then
+ # we cant set cppflags because it gets overwritten
+ # we dont actually need $TOOLROOT/usr/include on the cc line cuz the
+ # modules functionality already includes it but
+ # XXX - how do I change cppflags in the hints file?
+ ccflags="$ccflags -I${TOOLROOT}/usr/include"
+ usrinc="${TOOLROOT}/usr/include"
+ fi
+
+ ;;
+esac
+
+# Don't groan about unused libraries.
+ldflags="$ldflags -Wl,-woff,84"
+
+# workaround for an optimizer bug
+case "`$cc -version 2>&1`" in
+*7.2.*) op_cflags='optimize=-O1'; opmini_cflags='optimize=-O1' ;;
+*7.3.1.*) op_cflags='optimize=-O2'; opmini_cflags='optimize=-O2' ;;
+esac
+
+# We don't want these libraries.
+# Socket networking is in libc, these are not installed by default,
+# and just slow perl down. (scotth@sgi.com)
+set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
+shift
+libswanted="$*"
+
+# Irix 6.5.6 seems to have a broken header <sys/mode.h>
+# don't include that (it doesn't contain S_IFMT, S_IFREG, et al)
+
+i_sysmode="$undef"
+
+# I have conflicting reports about the sun, crypt, bsd, and PW
+# libraries on Irix 6.2.
+#
+# One user rerports:
+# Don't need sun crypt bsd PW under 6.2. You *may* need to link
+# with these if you want to run perl built under 6.2 on a 5.3 machine
+# (I haven't checked)
+#
+# Another user reported that if he included those libraries, a large number
+# of the tests failed (approx. 20-25) and he would get a core dump. To
+# make things worse, test results were inconsistent, i.e., some of the
+# tests would pass some times and fail at other times.
+# The safest thing to do seems to be to eliminate them.
+#
+# Actually, the only libs that you want are '-lm'. Everything else
+# you need is in libc. You do also need '-lbsd' if you choose not
+# to use the -D_BSD_* defines. Note that as of 6.2 the only
+# difference between '-lmalloc' and '-lc' malloc is the debugging
+# and control calls, which aren't used by perl. -- scotth@sgi.com
+
+set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' -e 's/ PW / /' -e 's/ malloc / /'`
+shift
+libswanted="$*"
+
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ if test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then
+ case "`uname -r`" in
+ [1-5].*|6.[01])
+ cat >&4 <<EOM
+IRIX `uname -r` does not support POSIX threads.
+You should upgrade to at least IRIX 6.2 with pthread patches.
+EOM
+ ;;
+ 6.2)
+ cat >&4 <<EOM
+IRIX 6.2 can have the POSIX threads.
+However, the following IRIX patches (or their replacements) MUST be installed:
+ 1404 Irix 6.2 Posix 1003.1b man pages
+ 1645 IRIX 6.2 & 6.3 POSIX header file updates
+ 2000 Irix 6.2 Posix 1003.1b support modules
+ 2254 Pthread library fixes
+ 2401 6.2 all platform kernel rollup
+IMPORTANT:
+ Without patch 2401, a kernel bug in IRIX 6.2 will
+ cause your machine to panic and crash when running
+ threaded perl. IRIX 6.3 and up should be OK.
+EOM
+ ;;
+ [67].*)
+ cat >&4 <<EOM
+IRIX `uname -r` should have the POSIX threads.
+But, somehow, you do not seem to have them installed.
+EOM
+ ;;
+ esac
+ cat >&4 <<EOM
+Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+ set `echo X "$libswanted "| sed -e 's/ c / pthread /'`
+ ld="${cc:-cc}"
+ shift
+ libswanted="$*"
+
+ usemymalloc='n'
+
+ # These are hidden behind a _POSIX1C ifdef that would
+ # require including <pthread.h> for the Configure hasproto
+ # to see these.
+ d_asctime_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ ;;
+esac
+EOCBU
+
+# The -n32 makes off_t to be 8 bytes, so we should have largefileness.
+
+# Until we figure out what to be probe for in Configure (ditto for hpux.sh)
+case "$usemorebits" in # Need to expand this now, then.
+$define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+esac
+case "$use64bitint" in
+$define|true|[yY]*) ;;
+*) d_casti32='undef' ;;
+esac
+
+# Helmut Jarausch reports that Perl's malloc is rather unusable
+# with IRIX, and SGI confirms the problem.
+usemymalloc=${usemymalloc:-false}
diff --git a/hints/irix_6_0.sh b/hints/irix_6_0.sh
new file mode 100644
index 0000000000..50498af718
--- /dev/null
+++ b/hints/irix_6_0.sh
@@ -0,0 +1,64 @@
+# irix_6.sh
+# from Krishna Sethuraman, krishna@sgi.com
+# Date: Wed Jan 18 11:40:08 EST 1995
+# added `-32' to force compilation in 32-bit mode.
+# otherwise, copied from irix_5.sh.
+
+# Perl built with this hints file under IRIX 6.0.1 passes
+# all tests (`make test').
+
+# Tue Jan 2 14:52:36 EST 1996
+# Apparently, there's a stdio bug that can lead to memory
+# corruption using perl's malloc, but not SGI's malloc.
+usemymalloc='n'
+
+ld=ld
+i_time='define'
+cc="cc -32"
+ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000"
+lddlflags="-32 -shared"
+
+# We don't want these libraries. Anyone know why?
+set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
+shift
+libswanted="$*"
+#
+# The following might be of interest if you wish to try 64-bit mode:
+# irix_6_64bit.sh
+# Krishna Sethuraman, krishna@sgi.com
+# taken from irix_5.sh . Changes from irix_5.sh:
+# Olimit and nested comments (warning 1009) no longer accepted
+# -OPT:fold_arith_limit so POSIX module will optimize
+# no 64bit versions of sun, crypt, nsl, socket, dl dso's available
+# as of IRIX 6.0.1 so omit those from libswanted line via `sed'.
+
+# perl 5 built with this hints file passes most tests (`make test').
+# Fails on op/subst test only. (built and tested under IRIX 6.0.1).
+
+# i_time='define'
+# ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -woff 1009 -OPT:fold_arith_limit=1046"
+# lddlflags="-shared"
+# set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ sun / /' -e 's/ crypt / /' -e 's/ nsl / /' -e 's/ dl / /'`
+# shift
+# libswanted="$*"
+
+case "$usethreads" in
+$define|true|[yY]*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support POSIX threads.
+You should upgrade to at least IRIX 6.2 with pthread patches.
+EOM
+ exit 1
+ ;;
+esac
+
+case " $use64bits $use64bitint $use64bitall " in
+*" $define "*|*" true "*|*" [yY] "*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+esac
+
diff --git a/hints/irix_6_1.sh b/hints/irix_6_1.sh
new file mode 100644
index 0000000000..50498af718
--- /dev/null
+++ b/hints/irix_6_1.sh
@@ -0,0 +1,64 @@
+# irix_6.sh
+# from Krishna Sethuraman, krishna@sgi.com
+# Date: Wed Jan 18 11:40:08 EST 1995
+# added `-32' to force compilation in 32-bit mode.
+# otherwise, copied from irix_5.sh.
+
+# Perl built with this hints file under IRIX 6.0.1 passes
+# all tests (`make test').
+
+# Tue Jan 2 14:52:36 EST 1996
+# Apparently, there's a stdio bug that can lead to memory
+# corruption using perl's malloc, but not SGI's malloc.
+usemymalloc='n'
+
+ld=ld
+i_time='define'
+cc="cc -32"
+ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000"
+lddlflags="-32 -shared"
+
+# We don't want these libraries. Anyone know why?
+set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
+shift
+libswanted="$*"
+#
+# The following might be of interest if you wish to try 64-bit mode:
+# irix_6_64bit.sh
+# Krishna Sethuraman, krishna@sgi.com
+# taken from irix_5.sh . Changes from irix_5.sh:
+# Olimit and nested comments (warning 1009) no longer accepted
+# -OPT:fold_arith_limit so POSIX module will optimize
+# no 64bit versions of sun, crypt, nsl, socket, dl dso's available
+# as of IRIX 6.0.1 so omit those from libswanted line via `sed'.
+
+# perl 5 built with this hints file passes most tests (`make test').
+# Fails on op/subst test only. (built and tested under IRIX 6.0.1).
+
+# i_time='define'
+# ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -woff 1009 -OPT:fold_arith_limit=1046"
+# lddlflags="-shared"
+# set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ sun / /' -e 's/ crypt / /' -e 's/ nsl / /' -e 's/ dl / /'`
+# shift
+# libswanted="$*"
+
+case "$usethreads" in
+$define|true|[yY]*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support POSIX threads.
+You should upgrade to at least IRIX 6.2 with pthread patches.
+EOM
+ exit 1
+ ;;
+esac
+
+case " $use64bits $use64bitint $use64bitall " in
+*" $define "*|*" true "*|*" [yY] "*)
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+esac
+
diff --git a/hints/isc.sh b/hints/isc.sh
new file mode 100644
index 0000000000..cdfe91c605
--- /dev/null
+++ b/hints/isc.sh
@@ -0,0 +1,44 @@
+# isc.sh
+# Interactive Unix Versions 3 and 4.
+# Compile perl entirely in posix mode.
+# Andy Dougherty doughera@lafcol.lafayette.edu
+# Wed Oct 5 15:57:37 EDT 1994
+#
+# Use Configure -Dcc=gcc to use gcc
+#
+
+# We don't want to explicitly mention -lc (since we're using POSIX mode.)
+# We also don't want -lx (the Xenix compatability libraries.) The only
+# thing that it seems to pick up is chsize(), which has been reported to
+# not work. chsize() can also be implemented via fcntl() in perl (if you
+# define -D_SYSV3). We'll leave in -lPW since it's harmless. Some
+# extension might eventually need it for alloca, though perl doesn't use
+# it.
+
+set `echo X "$libswanted "| sed -e 's/ c / /' -e 's/ x / /'`
+shift
+libswanted="$*"
+
+case "$cc" in
+*gcc*) ccflags="$ccflags -posix"
+ ldflags="$ldflags -posix"
+ ;;
+*) ccflags="$ccflags -Xp -D_POSIX_SOURCE"
+ ldflags="$ldflags -Xp"
+ ;;
+esac
+
+# getsockname() and getpeername() return 256 for no good reason
+ccflags="$ccflags -DBOGUS_GETNAME_RETURN=256"
+
+# rename(2) can't rename long filenames
+d_rename=undef
+
+# for ext/IPC/SysV/SysV.xs
+ccflags="$ccflags -DPERL_ISC"
+
+# You can also include -D_SYSV3 to pick up "traditionally visible"
+# symbols hidden by name-space pollution rules. This raises some
+# compilation "redefinition" warnings, but they appear harmless.
+# ccflags="$ccflags -D_SYSV3"
+
diff --git a/hints/isc_2.sh b/hints/isc_2.sh
new file mode 100644
index 0000000000..d8ca7dc63a
--- /dev/null
+++ b/hints/isc_2.sh
@@ -0,0 +1,25 @@
+# isc_2.sh
+# Interactive Unix Version 2.2
+# Compile perl entirely in posix mode.
+# Andy Dougherty doughera@lafcol.lafayette.edu
+# Wed Oct 5 15:57:37 EDT 1994
+#
+# Use Configure -Dcc=gcc to use gcc
+#
+set `echo X "$libswanted "| sed -e 's/ c / /'`
+shift
+libswanted="$*"
+case "$cc" in
+*gcc*) ccflags="$ccflags -posix"
+ ldflags="$ldflags -posix"
+ ;;
+*) ccflags="$ccflags -Xp -D_POSIX_SOURCE"
+ ldflags="$ldflags -Xp"
+ ;;
+esac
+# Compensate for conflicts in <net/errno.h>
+doio_cflags='ccflags="$ccflags -DENOTSOCK=103"'
+pp_sys_cflags='ccflags="$ccflags -DENOTSOCK=103"'
+
+# for ext/IPC/SysV/SysV.xs
+ccflags="$ccflags -DPERL_ISC"
diff --git a/hints/linux.sh b/hints/linux.sh
new file mode 100644
index 0000000000..7dccc1cc07
--- /dev/null
+++ b/hints/linux.sh
@@ -0,0 +1,284 @@
+# hints/linux.sh
+# Original version by rsanders
+# Additional support by Kenneth Albanowski <kjahds@kjahds.com>
+#
+# ELF support by H.J. Lu <hjl@nynexst.com>
+# Additional info from Nigel Head <nhead@ESOC.bitnet>
+# and Kenneth Albanowski <kjahds@kjahds.com>
+#
+# Consolidated by Andy Dougherty <doughera@lafayette.edu>
+#
+# Updated Thu Feb 8 11:56:10 EST 1996
+
+# Updated Thu May 30 10:50:22 EDT 1996 by <doughera@lafayette.edu>
+
+# Updated Fri Jun 21 11:07:54 EDT 1996
+# NDBM support for ELF renabled by <kjahds@kjahds.com>
+
+# No version of Linux supports setuid scripts.
+d_suidsafe='undef'
+
+# Debian and Red Hat, and perhaps other vendors, provide both runtime and
+# development packages for some libraries. The runtime packages contain shared
+# libraries with version information in their names (e.g., libgdbm.so.1.7.3);
+# the development packages supplement this with versionless shared libraries
+# (e.g., libgdbm.so).
+#
+# If you want to link against such a library, you must install the development
+# version of the package.
+#
+# These packages use a -dev naming convention in both Debian and Red Hat:
+# libgdbmg1 (non-development version of GNU libc 2-linked GDBM library)
+# libgdbmg1-dev (development version of GNU libc 2-linked GDBM library)
+# So make sure that for any libraries you wish to link Perl with under
+# Debian or Red Hat you have the -dev packages installed.
+#
+# Some operating systems (e.g., Solaris 2.6) will link to a versioned shared
+# library implicitly. For example, on Solaris, `ld foo.o -lgdbm' will find an
+# appropriate version of libgdbm, if one is available; Linux, however, doesn't
+# do the implicit mapping.
+ignore_versioned_solibs='y'
+
+# BSD compatability library no longer needed
+# 'kaffe' has a /usr/lib/libnet.so which is not at all relevent for perl.
+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.)
+# 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
+
+# The system malloc() is about as fast and as frugal as perl's.
+# Since the system malloc() has been the default since at least
+# 5.001, we might as well leave it that way. --AD 10 Jan 2002
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+case "$optimize" in
+'') # If we have modern enough gcc and well-supported enough CPU,
+ # crank up the optimization level.
+ case "`${cc:-gcc} -v 2>&1`" in
+ *"gcc version 2.95"*|*"gcc version 3."*)
+ case "`arch 2>&1`" in
+ i?86|ppc) optimize='-O3' ;;
+ esac
+ ;;
+ esac
+ case "$optimize" in
+ '') optimize='-O2' ;;
+ esac
+ ;;
+esac
+
+# Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com>
+# for this test.
+cat >try.c <<'EOM'
+/* Test for whether ELF binaries are produced */
+#include <fcntl.h>
+#include <stdlib.h>
+main() {
+ char buffer[4];
+ int i=open("a.out",O_RDONLY);
+ if(i==-1)
+ exit(1); /* fail */
+ if(read(i,&buffer[0],4)<4)
+ exit(1); /* fail */
+ if(buffer[0] != 127 || buffer[1] != 'E' ||
+ buffer[2] != 'L' || buffer[3] != 'F')
+ exit(1); /* fail */
+ exit(0); /* succeed (yes, it's ELF) */
+}
+EOM
+if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then
+ cat <<'EOM' >&4
+
+You appear to have ELF support. I'll try to use it for dynamic loading.
+If dynamic loading doesn't work, read hints/linux.sh for further information.
+EOM
+
+else
+ cat <<'EOM' >&4
+
+You don't have an ELF gcc. I will use dld if possible. If you are
+using a version of DLD earlier than 3.2.6, or don't have it at all, you
+should probably upgrade. If you are forced to use 3.2.4, you should
+uncomment a couple of lines in hints/linux.sh and restart Configure so
+that shared libraries will be disallowed.
+
+EOM
+ lddlflags="-r $lddlflags"
+ # These empty values are so that Configure doesn't put in the
+ # Linux ELF values.
+ ccdlflags=' '
+ cccdlflags=' '
+ ccflags="-DOVR_DBL_DIG=14 $ccflags"
+ so='sa'
+ dlext='o'
+ nm_so_opt=' '
+ ## If you are using DLD 3.2.4 which does not support shared libs,
+ ## uncomment the next two lines:
+ #ldflags="-static"
+ #so='none'
+
+ # In addition, on some systems there is a problem with perl and NDBM
+ # which causes AnyDBM and NDBM_File to lock up. This is evidenced
+ # in the tests as AnyDBM just freezing. Apparently, this only
+ # happens on a.out systems, so we disable NDBM for all a.out linux
+ # systems. If someone can suggest a more robust test
+ # that would be appreciated.
+ #
+ # More info:
+ # Date: Wed, 7 Feb 1996 03:21:04 +0900
+ # From: Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp>
+ #
+ # I tried compiling with DBM support and sure enough things locked up
+ # just as advertised. Checking into it, I found that the lockup was
+ # during the call to dbm_open. Not *in* dbm_open -- but between the call
+ # to and the jump into.
+ #
+ # To make a long story short, making sure that the *.a and *.sa pairs of
+ # /usr/lib/lib{m,db,gdbm}.{a,sa}
+ # were perfectly in sync took care of it.
+ #
+ # This will generate a harmless Whoa There! message
+ case "$d_dbm_open" in
+ '') cat <<'EOM' >&4
+
+Disabling ndbm. This will generate a Whoa There message in Configure.
+Read hints/linux.sh for further information.
+EOM
+ # You can override this with Configure -Dd_dbm_open
+ d_dbm_open=undef
+ ;;
+ esac
+fi
+
+rm -f try.c a.out
+
+if /bin/sh -c exit; then
+ echo ''
+ echo 'You appear to have a working bash. Good.'
+else
+ cat << 'EOM' >&4
+
+*********************** Warning! *********************
+It would appear you have a defective bash shell installed. This is likely to
+give you a failure of op/exec test #5 during the test phase of the build,
+Upgrading to a recent version (1.14.4 or later) should fix the problem.
+******************************************************
+EOM
+
+fi
+
+# On SPARClinux,
+# The following csh consistently coredumped in the test directory
+# "/home/mikedlr/perl5.003_94/t", though not most other directories.
+
+#Name : csh Distribution: Red Hat Linux (Rembrandt)
+#Version : 5.2.6 Vendor: Red Hat Software
+#Release : 3 Build Date: Fri May 24 19:42:14 1996
+#Install date: Thu Jul 11 16:20:14 1996 Build Host: itchy.redhat.com
+#Group : Shells Source RPM: csh-5.2.6-3.src.rpm
+#Size : 184417
+#Description : BSD c-shell
+
+# For this reason I suggest using the much bug-fixed tcsh for globbing
+# where available.
+
+# November 2001: That warning's pretty old now and probably not so
+# relevant, especially since perl now uses File::Glob for globbing.
+# We'll still look for tcsh, but tone down the warnings.
+# Andy Dougherty, Nov. 6, 2001
+if $csh -c 'echo $version' >/dev/null 2>&1; then
+ echo 'Your csh is really tcsh. Good.'
+else
+ if xxx=`./UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then
+ echo "Found tcsh. I'll use it for globbing."
+ # We can't change Configure's setting of $csh, due to the way
+ # Configure handles $d_portable and commands found in $loclist.
+ # We can set the value for CSH in config.h by setting full_csh.
+ full_csh=$xxx
+ elif [ -f "$csh" ]; then
+ echo "Couldn't find tcsh. Csh-based globbing might be broken."
+ fi
+fi
+
+# Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu>
+# Message-Id: <33EF1634.B36B6500@pobox.com>
+#
+# The DR2 of MkLinux (osname=linux,archname=ppc-linux) may need
+# special flags passed in order for dynamic loading to work.
+# instead of the recommended:
+#
+# ccdlflags='-rdynamic'
+#
+# it should be:
+# ccdlflags='-Wl,-E'
+#
+# So if your DR2 (DR3 came out summer 1998, consider upgrading)
+# has problems with dynamic loading, uncomment the
+# following three lines, make distclean, and re-Configure:
+#case "`uname -r | sed 's/^[0-9.-]*//'``arch`" in
+#'osfmach3ppc') ccdlflags='-Wl,-E' ;;
+#esac
+
+case "`uname -r`" in
+sparc-linux)
+ case "$cccdlflags" in
+ *-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;;
+ *) cccdlflags="$cccdlflags -fPIC" ;;
+ esac
+ ;;
+esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags"
+ set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+ shift
+ libswanted="$*"
+
+ # Somehow at least in Debian 2.2 these manage to escape
+ # the #define forest of <features.h> and <time.h> so that
+ # the hasproto macro of Configure doesn't see these protos,
+ # even with the -D_GNU_SOURCE.
+
+ d_asctime_r_proto="$define"
+ d_crypt_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ d_random_r_proto="$define"
+
+ ;;
+esac
+EOCBU
+
+cat > UU/uselargefiles.cbu <<'EOCBU'
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use large files.
+case "$uselargefiles" in
+''|$define|true|[yY]*)
+# Keep this in the left margin.
+ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ ccflags="$ccflags $ccflags_uselargefiles"
+ ;;
+esac
+EOCBU
diff --git a/hints/lynxos.sh b/hints/lynxos.sh
new file mode 100644
index 0000000000..0023e831b0
--- /dev/null
+++ b/hints/lynxos.sh
@@ -0,0 +1,19 @@
+#
+# LynxOS hints
+#
+# These hints were submitted by:
+# Greg Seibert
+# seibert@Lynx.COM
+# and
+# Ed Mooring
+# mooring@lynx.com
+#
+
+cc='gcc'
+so='none'
+usemymalloc='n'
+d_union_semun='define'
+ccflags="$ccflags -DEXTRA_F_IN_SEMUN_BUF -D__NO_INCLUDE_WARN__"
+
+# When LynxOS runs a script with "#!" it sets argv[0] to the script name
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
diff --git a/hints/machten.sh b/hints/machten.sh
new file mode 100644
index 0000000000..3a311a1746
--- /dev/null
+++ b/hints/machten.sh
@@ -0,0 +1,279 @@
+#! /bin/bash
+# machten.sh
+# This is for MachTen 4.1.4. It might work on other versions and variants
+# too. If it doesn't, tell me, and I'll try to fix it -- domo@computer.org
+#
+# Users of earlier MachTen versions might need a fixed tr from ftp.tenon.com.
+# This should be described in the MachTen release notes.
+#
+# MachTen 2.x has its own hint file.
+#
+# The original version of this file was put together by Andy Dougherty
+# <doughera@lafcol.lafayette.edu> based on comments from lots of
+# folks, especially
+# Mark Pease <peasem@primenet.com>
+# Martijn Koster <m.koster@webcrawler.com>
+# Richard Yeh <rcyeh@cco.caltech.edu>
+#
+# Deny system's false claims to support mmap() and munmap(); note
+# also that Sys V IPC (re)disabled by jhi due to continuing inadequacy
+# -- Dominic Dunlop <domo@computer.org> 001111
+# Remove dynamic loading libraries from search; enable SysV IPC with
+# MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions
+# -- Dominic Dunlop <domo@computer.org> 000224
+# Disable shadow password file access: MT 4.1.1 has necessary library
+# functions, but not header file (or documentation)
+# -- Dominic Dunlop <domo@computer.org> 990804
+# For now, explicitly disable dynamic loading -- MT 4.1.1 has it,
+# but these hints do not yet support it.
+# Define NOTEDEF_MACHTEN to undo gratuitous Tenon hack to signal.h.
+# -- Dominic Dunlop <domo@computer.org> 9800802
+# Completely disable SysV IPC pending more complete support from Tenon
+# -- Dominic Dunlop <domo@computer.org> 980712
+# Use vfork and perl's malloc by default
+# -- Dominic Dunlop <domo@computer.org> 980630
+# Raise perl's stack size again; cut down reg_infty; document
+# -- Dominic Dunlop <domo@computer.org> 980619
+# Use of semctl() can crash system: disable -- Dominic Dunlop 980506
+# Raise stack size further; slight tweaks to accomodate MT 4.1
+# -- Dominic Dunlop <domo@computer.org> 980211
+# Raise perl's stack size -- Dominic Dunlop <domo@tcp.ip.lu> 970922
+# Reinstate sigsetjmp iff version is 4.0.3 or greater; use nm
+# (assumes Configure change); prune libswanted -- Dominic Dunlop 970113
+# Warn about test failure due to old Berkeley db -- Dominic Dunlop 970105
+# Do not use perl's malloc; SysV IPC OK -- Neil Cutcliffe, Tenon 961030
+# File::Find's use of link count disabled by Dominic Dunlop 960528
+# Perl's use of sigsetjmp etc. disabled by Dominic Dunlop 960521
+#
+# Comments, questions, and improvements welcome!
+#
+# MachTen 4.1.1's support for shadow password file access is incomplete:
+# disable its use completely.
+d_getspnam=${d_getspnam:-undef}
+
+# MachTen 4.1.1 does support dynamic loading, but perl doesn't
+# know how to use it yet.
+usedl=${usedl:-undef}
+
+# MachTen 4.1.1 may have an unhelpful hack in /usr/include/signal.h.
+# Undo it if so.
+if grep NOTDEF_MACHTEN /usr/include/signal.h > /dev/null
+then
+ ccflags="$ccflags -DNOTDEF_MACHTEN"
+fi
+
+# Power MachTen is a real memory system and its standard malloc
+# has been optimized for this. Using this malloc instead of Perl's
+# malloc may result in significant memory savings. In particular,
+# unlike most UNIX memory allocation subsystems, MachTen's free()
+# really does return unneeded process data memory to the system.
+# However, MachTen's malloc() is woefully slow -- maybe 100 times
+# slower than perl's own, so perl's own is usually the better
+# choice. In order to use perl's malloc(), the sbrk() system call
+# must be simulated using MachTen's malloc(). See malloc.c for
+# precise details of how this is achieved. Recent improvements
+# to perl's malloc() currently crash MachTen, and so are disabled
+# by -DPLAIN_MALLOC and -DNO_FANCY_MALLOC.
+usemymalloc=${usemymalloc:-y}
+
+# Older versions of MachTen malloc() data on a two-byte boundary, which
+# works, but slows down operations on long, float and double data.
+# Perl's malloc() can compensate if SYSTEM_ALLOC_ALIGNMENT is suitably
+# defined.
+if expr "$osvers" \< "4.1" >/dev/null
+then
+system_alloc_alignment=" -DSYSTEM_ALLOC_ALIGNMENT=2"
+fi
+# Do not wrap the following long line
+malloc_cflags='ccflags="$ccflags -DPLAIN_MALLOC -DNO_FANCY_MALLOC -DUSE_PERL_SBRK$system_alloc_alignment"'
+
+# When MachTen does a fork(), it immediately copies the whole of
+# the parent process' data space for the child. This can be
+# expensive. Using vfork() where appropriate avoids this cost.
+d_vfork=${d_vfork:-define}
+
+# Specify a high level of optimization (-O3 wouldn't do much more)
+optimize=${optimize:--O2 -fomit-frame-pointer}
+
+# Make symbol table listings les voluminous
+nmopts=-gp
+
+# Set reg_infty -- the maximum allowable number of repeats in regular
+# expressions such as /a{1,$max_repeats}/, and the maximum number of
+# times /a*/ will match. Setting this too high without having a stack
+# large enough to accommodate deep recursion in the regular expression
+# engine allows perl to crash your Mac due to stack overrun if it
+# encounters a pathological regular expression. The default is a
+# compromise between capability and required stack size (see below).
+# You may override the default value from the Configure command-line
+# like this:
+#
+# Configure -Dreg_infty=16368 ...
+
+reg_infty=${reg_infty:-2047}
+
+# If you want to have many perl processes active simultaneously --
+# processing CGI forms -- for example, you should opt for a small stack.
+# For safety, you should set reg_infty no larger than the corresponding
+# value given in this table:
+#
+# Stack size reg_infty value supported
+# ---------- -------------------------
+# 128k 2**8-1 (256)
+# 256k 2**9-1 (511)
+# 512k 2**10-1 (1023)
+# 1M 2**11-1 (2047)
+# ...
+# 16M 2**15-1 (32767) (perl's default value)
+
+# This script selects a safe stack size based on the value of reg_infty
+# specified above. However, you may choose to take a risk and set
+# stack size lower: pathological regular expressions are rare in real-world
+# programs. But be aware that, if perl does encounter one, it WILL
+# crash your system. Do not set stack size lower than 96k unless
+# you want perl's installation tests ( make test ) to crash your system.
+#
+# You may override the default value from the Configure command-line
+# by specifying the required size in kilobytes like this:
+#
+# Configure -Dstack_size=96
+
+if [ "X$stack_size" = 'X' ]
+then
+ stack_size=128
+ X=`expr $reg_infty / 256`
+
+ while [ $X -gt 0 ]
+ do
+ X=`expr $X / 2`
+ stack_size=`expr $stack_size \* 2`
+ done
+ X=`expr $stack_size \* 1024`
+fi
+
+ldflags="$ldflags -Xlstack=$X"
+ccflags="$ccflags -DREG_INFTY=$reg_infty"
+
+# Install in /usr/local by default
+prefix='/usr/local'
+
+# At least on PowerMac, doubles must be aligned on 8 byte boundaries.
+# I don't know if this is true for all MachTen systems, or how to
+# determine this automatically.
+alignbytes=8
+
+# 4.0.2 and earlier had a problem with perl's use of sigsetjmp and
+# friends. Use setjmp and friends instead.
+expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef'
+
+# System V IPC before MachTen 4.1.4 is incomplete (missing msg function
+# prototypes, no ftok()), buggy (semctl(.., .., IPC_STATUS, ..) hangs
+# system), and undocumented. Claim it's not there at all before 4.1.4.
+if expr "$osvers" \< "4.1.4" >/dev/null
+then
+d_msg=${d_msg:-undef}
+d_sem=${d_sem:-undef}
+d_shm=${d_shm:-undef}
+fi
+
+
+# As of MachTen 4.1.4 the msg* and shm* are in libc but unimplemented
+# (an attempt to use them causes a runtime error)
+# XXX Configure probe for really functional msg*() is needed XXX
+# XXX Configure probe for really functional shm*() is needed XXX
+if test "$d_msg" = ""; then
+ d_msgget=${d_msgget:-undef}
+ d_msgctl=${d_msgctl:-undef}
+ d_msgsnd=${d_msgsnd:-undef}
+ d_msgrcv=${d_msgrcv:-undef}
+ case "$d_msgget$d_msgsnd$d_msgctl$d_msgrcv" in
+ *"undef"*) d_msg="$undef" ;;
+ esac
+fi
+if test "$d_shm" = ""; then
+ d_shmat=${d_shmat:-undef}
+ d_shmdt=${d_shmdt:-undef}
+ d_shmget=${d_shmget:-undef}
+ d_shmctl=${d_shmctl:-undef}
+ case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in
+ *"undef"*) d_shm="$undef" ;;
+ esac
+fi
+
+# MachTen has stubs for mmap and munmap(), but they just result in the
+# caller being killed on the grounds of "Bad system call"
+d_mmap=${d_mmap:-undef}
+d_munmap=${d_munmap:-undef}
+
+# Get rid of some extra libs which it takes Configure a tediously
+# long time never to find on MachTen, or which break perl
+set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \
+ -e 's/ inet / /' -e 's/ nsl / /' -e 's/ nm / /' -e 's/ malloc / /' \
+ -e 's/ ld / /' -e 's/ sun / /' -e 's/ posix / /' \
+ -e 's/ cposix / /' -e 's/ crypt / /' -e 's/ dl / /' -e 's/ dld / /' \
+ -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'`
+shift
+libswanted="$*"
+
+# While link counts on MachTen 4.1's fast file systems work correctly,
+# on Macintosh Heirarchical File Systems, (and on HFS+)
+# MachTen always reports ony two links to directories, even if they
+# contain subdirectories. Consequently, we use this variable to stop
+# File::Find using the link count to determine whether there are
+# subdirectories to be searched. This will generate a harmless message:
+# Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+# Propagating recommended variable dont_use_nlink
+dont_use_nlink=define
+
+cat <<EOM >&4
+
+During Configure, you may see the message
+
+*** WHOA THERE!!! ***
+ The recommended value for \$d_msg on this machine was "undef"!
+ Keep the recommended value? [y]
+
+as well as similar messages concerning \$d_sem and \$d_shm. Select the
+default answers: MachTen 4.1 appears to provide System V IPC support,
+but it is incomplete and buggy: perl should be built without it.
+Similar considerations apply to memory mapping of files, controlled
+by \$d_mmap and \$d_munmap.
+
+Similarly, when you see
+
+*** WHOA THERE!!! ***
+ The recommended value for \$d_vfork on this machine was "define"!
+ Keep the recommended value? [y]
+
+select the default answer: vfork() works, and avoids expensive data
+copying.
+
+You may also see "WHOA THERE!!!" messages concerning \$d_getspnam.
+Select the default answer: MachTen's support for shadow password
+file access is incomplete, and should not be used.
+
+At the end of Configure, you will see a harmless message
+
+Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+ Propagating recommended variable dont_use_nlink
+ Propagating recommended variable nmopts
+ Propagating recommended variable malloc_cflags...
+ Propagating recommended variable reg_infty
+ Propagating recommended variable system_alloc_alignment
+Read the File::Find documentation for more information about dont_use_nlink
+
+Your perl will be built with a stack size of ${stack_size}k and a regular
+expression repeat count limit of $reg_infty. If you want alternative
+values, see the file hints/machten.sh for advice on how to change them.
+
+Tests
+ io/fs test 4 and
+ op/stat test 3
+may fail since MachTen may not return a useful nlinks field to stat
+on directories.
+
+EOM
+expr "$osvers" \< "4.1" >/dev/null && test -r ./broken-db.msg && \
+ . ./broken-db.msg
+
+unset stack_size X
diff --git a/hints/machten_2.sh b/hints/machten_2.sh
new file mode 100644
index 0000000000..bc7dde4e3f
--- /dev/null
+++ b/hints/machten_2.sh
@@ -0,0 +1,94 @@
+# machten.sh
+# This file has been put together by Mark Pease <peasem@primenet.com>
+# Comments, questions, and improvements welcome!
+#
+# MachTen does not support dynamic loading. If you wish to, you
+# can fetch, compile, and install the dld package.
+# This ought to work with the ext/DynaLoader/dl_dld.xs in the
+# perl5 package. Have fun!
+# Some possible locations for dld:
+# ftp-swiss.ai.mit.edu:pub/scm/dld-3.2.7.tar.gz
+# prep.ai.mit.edu:/pub/gnu/jacal/dld-3.2.7.tar.gz
+# ftp.cs.indiana.edu:/pub/scheme-repository/imp/SCM-support/dld-3.2.7.tar.gz
+# tsx-11.mit.edu:/pub/linux/sources/libs/dld-3.2.7.tar.gz
+#
+# Original version was for MachTen 2.1.1.
+# Last modified by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Tue Aug 13 12:31:01 EDT 1996
+#
+# Warning about tests which no longer fail
+# fixed by Tom Phoenix <rootbeer@teleport.com>
+# March 5, 1997
+#
+# Locale, optimization, and malloc changes by Tom Phoenix Mar 15, 1997
+#
+# groupstype change and note about t/lib/findbin.t by Tom, Mar 24, 1997
+
+# MachTen's ability to have valid filepaths beginning with "//" may
+# be causing lib/FindBin.pm to fail. I don't know how to fix it, but
+# the reader is encouraged to do so! :-) -- Tom
+
+# There seem to be some hard-to-diagnose problems under MachTen's
+# malloc, so we'll use Perl's. If you have problems which Perl's
+# malloc's diagnostics can't help you with, you may wish to use
+# MachTen's malloc after all.
+case "$usemymalloc" in
+'') usemymalloc='y' ;;
+esac
+
+# I (Tom Phoenix) don't know how to test for locales on MachTen. (If
+# you do, please fix this hints file!) But since mine didn't come
+# with locales working out of the box, I'll assume that's the case
+# for most folks.
+case "$d_setlocale" in
+'') d_setlocale=undef
+esac
+
+# MachTen doesn't have secure setid scripts
+d_suidsafe='undef'
+
+# groupstype should be gid_t, as near as I can tell, but it only
+# seems to work right when it's int.
+groupstype='int'
+
+case "$optimize" in
+'') optimize='-O2' ;;
+esac
+
+so='none'
+# These are useful only if you have DLD, but harmless otherwise.
+# Make sure gcc doesn't use -fpic.
+cccdlflags=' ' # That's an empty space.
+lddlflags='-r'
+dlext='o'
+
+# MachTen does not support POSIX enough to compile the POSIX module.
+useposix=false
+
+#MachTen might have an incomplete Berkeley DB implementation.
+i_db=$undef
+
+#MachTen versions 2.X have no hard links. This variable is used
+# by File::Find.
+# This will generate a harmless message:
+# Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+# Propagating recommended variable dont_use_nlink
+# Without this, tests io/fs #4 and op/stat #3 will fail.
+dont_use_nlink=define
+
+cat <<'EOM' >&4
+
+During Configure, you may get two "WHOA THERE" messages, for $d_setlocale
+and $i_db being 'undef'. You may keep the undef value.
+
+At the end of Configure, you will see a harmless message
+
+Hmm...You had some extra variables I don't know about...I'll try to keep 'em.
+ Propagating recommended variable dont_use_nlink
+
+Read the File::Find documentation for more information.
+
+It's possible that test t/lib/findbin.t will fail on some configurations
+of MachTen.
+
+EOM
diff --git a/hints/mint.sh b/hints/mint.sh
new file mode 100644
index 0000000000..b9a7886f9a
--- /dev/null
+++ b/hints/mint.sh
@@ -0,0 +1,94 @@
+# hints/mint.sh
+#
+# talk to gufl0000@stud.uni-sb.de if you want to change this file.
+# Please read the README.mint file.
+#
+# misc stuff
+
+case `uname -m` in
+ atarist*) archname="m68000-mint"
+ ;;
+ *) archname="m68k-mint"
+ ;;
+esac
+
+here=`pwd | tr -d '\015'`
+
+cc='gcc'
+
+# The weird include path is really to work around some bugs in
+# broken system header files.
+ccflags="$ccflags -D__MINT__ -Uatarist -DDEBUGGING -I$here/../mint"
+
+# libs
+
+libpth="$prefix/lib /usr/lib /usr/local/lib"
+glibpth="$libpth"
+xlibpth="$libpth"
+
+libswanted='gdbm socket port m'
+so='none'
+
+#
+# compiler & linker flags
+#
+optimize='-O2 -fomit-frame-pointer -fno-defer-pop -fstrength-reduce'
+
+# The setlocale function in the MiNTLib is actually a bad joke. We
+# lend a workaround from Ultrix. If neither LC_ALL nor LANG is
+# set in the environment, perl won't complain. If one is set to
+# anything but "C" you will see a warning. Note that you can
+# still use the GNU extension "$LANGUAGE" if you want to use
+# the i18n features of some GNU packages.
+util_cflags='ccflags="$ccflags -DLOCALE_ENVIRON_REQUIRED"'
+
+#
+# Some good answers to the questions in Configure:
+# Does Configure really get all these wrong?
+usenm='true'
+d_suidsafe='true'
+clocktype='long'
+usevfork='true'
+d_fsetpos='fpos_t'
+gidtype='gid_t'
+groupstype='gid_t'
+lseektype='long'
+modetype='mode_t'
+sizetype='size_t'
+timetype='time_t'
+uidtype='uid_t'
+
+# Don't remove that leading tab character (Configure Black Magic (TM)).
+ broken_pwd=
+case "`/bin/pwd|tr -d xy|tr '\015\012' 'xy'`" in
+*xy) broken_pwd=yes ;;
+esac
+
+if test X"$broken_pwd" = Xyes
+then
+ echo " "
+ echo "*** Building fixed 'pwd'... (as described in README.mint) ***"
+ echo " "
+ cd mint
+ make pwd
+ cd ..
+ if test -x mint/pwd -a -w /usr/bin
+ then
+ echo " "
+ echo "*** Installing fixed 'pwd'... ***"
+ echo " "
+ cd mint
+ make install
+ cd ..
+ if cmp -s mint/pwd /usr/bin/pwd
+ then
+ echo "*** Installed fixed 'pwd' successfully. ***"
+ else
+ echo "*** Failed to install fixed 'pwd'. Aborting. ***"
+ exit 1
+ fi
+ else
+ echo "*** Cannot install fixed 'pwd'. Aborting. ***"
+ exit 1
+ fi
+fi
diff --git a/hints/mips.sh b/hints/mips.sh
new file mode 100644
index 0000000000..bc0b7e8073
--- /dev/null
+++ b/hints/mips.sh
@@ -0,0 +1,14 @@
+perl_cflags='optimize="-g"'
+d_volatile=undef
+d_castneg=undef
+cc=cc
+glibpth="/usr/lib/cmplrs/cc $glibpth"
+groupstype=int
+nm_opt='-B'
+case $PATH in
+*bsd*:/bin:*) cat <<END >&4
+NOTE: Some people have reported having much better luck with Mips CC than
+with the BSD cc. Put /bin first in your PATH if you have difficulties.
+END
+;;
+esac
diff --git a/hints/mpc.sh b/hints/mpc.sh
new file mode 100644
index 0000000000..da6fcc95b0
--- /dev/null
+++ b/hints/mpc.sh
@@ -0,0 +1 @@
+ccflags="$ccflags -X18"
diff --git a/hints/mpeix.sh b/hints/mpeix.sh
new file mode 100644
index 0000000000..5126bcf3b8
--- /dev/null
+++ b/hints/mpeix.sh
@@ -0,0 +1,163 @@
+# The MPE/iX linker doesn't complain about unresolved symbols, and so the only
+# way to test for unresolved symbols in a program is by attempting to run it.
+# But this is slow, and fraught with problems, so the better solution is to use
+# nm.
+#
+# MPE/iX lacks a fully functional native nm, so we need to use our fake nm
+# script which will extract the symbol info from the native link editor and
+# reformat into something nm-like.
+#
+# Created for 5.003 by Mark Klein, mklein@dis.com.
+# Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu.
+# Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu.
+# Revised for 5.6.0 by Mark Bixby, mbixby@power.net.
+# Revised for 5.7.3 by Mark Bixby, mark@bixby.org.
+# Revised for 5.8.0 by Mark Bixby, mark@bixby.org.
+#
+osname='mpeix'
+osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'`
+#
+# Force Configure to use our wrapper mpeix/nm script
+#
+PATH="$PWD/mpeix:$PATH"
+nm="$PWD/mpeix/nm"
+_nm=$nm
+nm_opt='-configperl'
+usenm='true'
+#
+# Work around the broken inline cat bug that corrupts here docs
+#
+alias -x cat=/bin/cat
+#
+# Various directory locations.
+#
+# Which ones of these does Configure get wrong?
+test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP"
+archname='PA-RISC1.1'
+bin="$prefix"
+installman1dir="$prefix/man/man1"
+installman3dir="$prefix/man/man3"
+man1dir="$prefix/man/man1"
+man3dir="$prefix/man/man3"
+perlpath="$prefix/PERL"
+scriptdir="$prefix"
+startperl="#!$prefix/perl"
+startsh='#!/bin/sh'
+#
+# Compiling.
+#
+test -z "$cc" && cc='gcc'
+cccdlflags='none'
+ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL -DIS_SOCKET_CLIB_ITSELF"
+locincpth="$locincpth /usr/local/include /usr/contrib/include /BINDFW/CURRENT/include /SYSLOG/PUB"
+test -z "$optimize" && optimize="-O2"
+ranlib='/bin/true'
+# Special compiling options for certain source files.
+# But what if you want -g?
+regcomp_cflags='optimize=-O'
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+#
+# Linking.
+#
+lddlflags='-b'
+# Delete bsd and BSD from the library list. Remove other randomly ordered
+# libraries and then re-add them in their proper order (the MPE linker is
+# order-sensitive). Add additional MPE-specific libraries.
+for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do
+ set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"`
+ libswanted="$*"
+done
+libswanted="$libswanted bind syslog curses svipc socket str m c"
+loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BINDFW/CURRENT/lib /SYSLOG/PUB"
+#
+# External functions and data items.
+#
+# Q: Does Configure *really* get *all* of these wrong?
+#
+# A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE,
+# but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're
+# useless, let's just tell Perl to avoid them. Also, a few data items are
+# 'undef' because while they may exist in structures, they are uninitialized.
+#
+# The 'define' cases are a bit weirder. MPE has a libc.a, libc.sl, and two
+# special kernel shared libraries, /SYS/PUB/XL and /SYS/PUB/NL. Much of what
+# is in libc.a is duplicated within XL and NL, so when we created libc.sl, we
+# omitted the duplicated functions. Since Configure end ups scanning libc.sl,
+# we need to 'define' the functions that had been removed.
+#
+# We don't want to scan XL or NL because we would find way too many POSIX or
+# Unix named functions that are really vanilla MPE functions that do something
+# completely different than on POSIX or Unix.
+d_crypt='define'
+d_dbmclose='undef'
+d_difftime='define'
+d_dlerror='undef'
+d_dlopen='undef'
+d_Gconvert='gcvt((x),(n),(b))'
+d_getnbyaddr='define'
+d_getnbyname='define'
+d_getpbyname='define'
+d_getpbynumber='define'
+d_getsbyname='define'
+d_getsbyport='define'
+d_gettimeod='undef'
+d_inetaton='undef'
+d_link='undef'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memchr='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_pwage='undef'
+d_pwcomment='undef'
+d_pwgecos='undef'
+d_pwpasswd='undef'
+d_setegid='undef'
+d_seteuid='undef'
+d_setitimer='undef'
+d_setpgid='undef'
+d_setsid='undef'
+d_setvbuf='define'
+d_statblks='undef'
+d_strchr='define'
+d_strcoll='define'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strtod='define'
+d_strtol='define'
+d_strtoul='define'
+d_strxfrm='define'
+d_syserrlst='define'
+d_time='define'
+d_wcstombs='define'
+d_wctomb='define'
+#
+# Include files.
+#
+i_gdbm='undef' # the port is currently incomplete
+i_termios='undef' # we have termios, but not the full set (just tcget/setattr)
+i_time='define'
+i_systime='undef'
+i_systimek='undef'
+timeincl='/usr/include/time.h'
+#
+# Data types.
+#
+timetype='time_t'
+#
+# Functionality.
+#
+uselargefiles="$undef"
+#
+# Expected functionality provided in mpeix.c.
+#
+archobjs='mpeix.o'
+
+# Help gmake find mpeix.c
+test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c
+
+d_gettimeod='define'
+d_truncate='define'
diff --git a/hints/ncr_tower.sh b/hints/ncr_tower.sh
new file mode 100644
index 0000000000..7ddb9230e9
--- /dev/null
+++ b/hints/ncr_tower.sh
@@ -0,0 +1,16 @@
+# For SysV release 2, there are no directory functions defined. To
+# prevent compile errors, acquire the functions written by Doug Gwynn.
+# They are contained in dirent.tar.gz and can be accessed from gnu
+# repositories, as well as other places.
+#
+# The following hints have been verified to work with PERL5 (001m) on
+# SysVr2 with the following caveat(s):
+# 1. Maximum User program space (MAXSPACE) must be at least 2MB.
+# 2. The directory functions mentioned above have been installed.
+#
+optimize='-O0'
+ccflags="$ccflags -W2,-Sl,1500 -W0,-Sp,350,-Ss,2500 -Wp,-Sd,30"
+d_mkdir=$undef
+usemymalloc='y'
+useposix='false'
+so='none'
diff --git a/hints/netbsd.sh b/hints/netbsd.sh
new file mode 100644
index 0000000000..741413ed4f
--- /dev/null
+++ b/hints/netbsd.sh
@@ -0,0 +1,146 @@
+# hints/netbsd.sh
+#
+# Please check with packages@netbsd.org before making modifications
+# to this file.
+
+case "$archname" in
+'')
+ archname=`uname -m`-${osname}
+ ;;
+esac
+
+# NetBSD keeps dynamic loading dl*() functions in /usr/lib/crt0.o,
+# so Configure doesn't find them (unless you abandon the nm scan).
+# Also, NetBSD 0.9a was the first release to introduce shared
+# libraries.
+#
+case "$osvers" in
+0.9|0.8*)
+ usedl="$undef"
+ ;;
+*)
+ case `uname -m` in
+ pmax)
+ # NetBSD 1.3 and 1.3.1 on pmax shipped an `old' ld.so,
+ # which will not work.
+ case "$osvers" in
+ 1.3|1.3.1)
+ d_dlopen=$undef
+ ;;
+ esac
+ ;;
+ esac
+ if test -f /usr/libexec/ld.elf_so; then
+ # ELF
+ d_dlopen=$define
+ d_dlerror=$define
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ lddlflags="--whole-archive -shared $lddlflags"
+ rpathflag="-Wl,-rpath,"
+ #
+ # Include the whole libgcc.a into the perl executable so
+ # that certain symbols needed by loadable modules built as
+ # C++ objects (__eh_alloc, __pure_virtual, etc.) will always
+ # be defined.
+ #
+ # XXX This should be obsoleted by gcc-3.0.
+ #
+ ccdlflags="-Wl,-whole-archive -lgcc -Wl,-no-whole-archive \
+ -Wl,-E $ccdlflags"
+ elif test -f /usr/libexec/ld.so; then
+ # a.out
+ d_dlopen=$define
+ d_dlerror=$define
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ lddlflags="-Bshareable $lddlflags"
+ rpathflag="-R"
+ else
+ d_dlopen=$undef
+ rpathflag=
+ fi
+ ;;
+esac
+
+# netbsd had these but they don't really work as advertised, in the
+# versions listed below. if they are defined, then there isn't a
+# way to make perl call setuid() or setgid(). if they aren't, then
+# ($<, $>) = ($u, $u); will work (same for $(/$)). this is because
+# you can not change the real userid of a process under 4.4BSD.
+# netbsd fixed this in 1.3.2.
+case "$osvers" in
+0.9*|1.[012]*|1.3|1.3.1)
+ d_setregid="$undef"
+ d_setreuid="$undef"
+ ;;
+esac
+
+# These are obsolete in any netbsd.
+d_setrgid="$undef"
+d_setruid="$undef"
+
+# there's no problem with vfork.
+usevfork=true
+
+# This is there but in machine/ieeefp_h.
+ieeefp_h="define"
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ lpthread=
+ for xxx in pthread; do
+ for yyy in $loclibpth $plibpth $glibpth dummy; do
+ zzz=$yyy/lib$xxx.a
+ if test -f "$zzz"; then
+ lpthread=$xxx
+ break;
+ fi
+ zzz=$yyy/lib$xxx.so
+ if test -f "$zzz"; then
+ lpthread=$xxx
+ break;
+ fi
+ zzz=`ls $yyy/lib$xxx.so.* 2>/dev/null`
+ if test "X$zzz" != X; then
+ lpthread=$xxx
+ break;
+ fi
+ done
+ if test "X$lpthread" != X; then
+ break;
+ fi
+ done
+ if test "X$lpthread" != X; then
+ # Add -lpthread.
+ libswanted="$libswanted $lpthread"
+ # There is no libc_r as of NetBSD 1.5.2, so no c -> c_r.
+ # This will be revisited when NetBSD gains a native pthreads
+ # implementation.
+ else
+ echo "$0: No POSIX threads library (-lpthread) found. " \
+ "You may want to install GNU pth. Aborting." >&4
+ exit 1
+ fi
+ unset lpthread
+ ;;
+esac
+EOCBU
+
+# Set sensible defaults for NetBSD: look for local software in
+# /usr/pkg (NetBSD Packages Collection) and in /usr/local.
+#
+loclibpth="/usr/pkg/lib /usr/local/lib"
+locincpth="/usr/pkg/include /usr/local/include"
+case "$rpathflag" in
+'')
+ ldflags=
+ ;;
+*)
+ ldflags=
+ for yyy in $loclibpth; do
+ ldflags="$ldflags $rpathflag$yyy"
+ done
+ ;;
+esac
diff --git a/hints/newsos4.sh b/hints/newsos4.sh
new file mode 100644
index 0000000000..5cbcc531e2
--- /dev/null
+++ b/hints/newsos4.sh
@@ -0,0 +1,33 @@
+#
+# hints file for NEWS-OS 4.x
+#
+
+echo
+echo 'Compiling Tips:'
+echo 'When you have found that ld complains "multiple defined" error'
+echo 'on linking /lib/libdbm.a, do following instructions.'
+echo ' cp /lib/libdbm.a dbm.o (copy current libdbm.a)'
+echo ' ar cr libdbm.a dbm.o (make archive)'
+echo ' mv /lib/libdbm.a /lib/libdbm.a.backup (backup original library)'
+echo ' cp libdbm.a /lib (copy newer one)'
+echo ' ranlib /lib/libdbm.a (ranlib for later use)'
+echo
+
+# No shared library.
+so='none'
+# Umm.. I like gcc.
+cc='gcc'
+# Configure does not find out where is libm.
+plibpth='/usr/lib/cmplrs/cc'
+# times() returns 'struct tms'
+clocktype='struct tms'
+# getgroups(2) returns integer (not gid_t)
+groupstype='int'
+# time(3) returns long (not time_t)
+timetype='long'
+# filemode type is int (not mode_t)
+modetype='int'
+# using sprintf(3) instead of gcvt(3)
+gconvert_preference=sprintf
+# No POSIX.
+useposix='false'
diff --git a/hints/next_3.sh b/hints/next_3.sh
new file mode 100644
index 0000000000..d142de5e76
--- /dev/null
+++ b/hints/next_3.sh
@@ -0,0 +1,141 @@
+# This file has been put together by Anno Siegel <siegel@zrz.TU-Berlin.DE>,
+# Andreas Koenig <k@franz.ww.TU-Berlin.DE> and Gerd Knops <gerti@BITart.com>.
+# Comments, questions, and improvements welcome!
+#
+# These hints work for NeXT 3.2 and 3.3. 3.0 has its own
+# special hint file.
+#
+
+######################################################################
+# THE MALLOC STORY
+######################################################################
+# 1994:
+# the simple program `for ($i=1;$i<38771;$i++){$t{$i}=123}' fails
+# with Larry's malloc on NS 3.2 due to broken sbrk()
+#
+# setting usemymalloc='n' was the solution back then. Later came
+# reports that perl would run unstable on 3.2:
+#
+# 1996:
+# From about perl5.002beta1h perl became unstable on the
+# NeXT. Intermittent coredumps were frequent on 3.2 OS. There were
+# reports, that the developer version of 3.3 didn't have problems, so it
+# seemed pretty obvious that we had to work around an malloc bug in 3.2.
+# This hints file reflects a patch to perl5.002_01 that introduces a
+# home made sbrk routine (remember, NeXT's sbrk _never_ worked). This
+# sbrk makes it possible to run perl with its own malloc. Thanks to
+# Ilya who showed me the way to his sbrk for OS/2!!
+#
+# The whole malloc desaster lead to a failing gdbm test. It is far
+# beyond my understanding, why GDBM_File breaks with the "fix", but in
+# general I consider it better to have a working perl with broken GDBM
+# than no perl at all.
+#
+# So, this hintsfile is using perl's malloc. If you want to turn
+# perl's malloc off, you need to remove '-DUSE_PERL_SBRK'
+# from the ccflags and set usemymalloc to 'n'.
+#
+# 1997:
+# From perl5.003_22 the malloc bug has no impact any more. We can run
+# a perl without a special sbrk. Apparently Chip Salzenberg, the hero
+# of 5.004 anyway, earned another trophy during Australien Open.
+#
+# use the following two lines to enable USE_PERL_SBRK. Try this if you
+# encounter intermittent core dumps:
+#ccflags='-DUSE_NEXT_CTYPE -DUSE_PERL_SBRK'
+#usemymalloc='y'
+# use the following two lines if you have perl5.003_22 or better and
+# do not encounter intermittent core dumps.
+
+ccflags="$ccflags -DUSE_NEXT_CTYPE"
+usemymalloc='n'
+
+######################################################################
+# End of the MALLOC story
+######################################################################
+
+ldflags='-u libsys_s'
+libswanted='dbm gdbm db'
+
+lddlflags='-nostdlib -r'
+# Give cccdlflags an empty value since Configure will detect we are
+# using GNU cc and try to specify -fpic for cccdlflags.
+cccdlflags=' '
+
+######################################################################
+# MAB support
+######################################################################
+# By default we will build for all architectures your development
+# environment supports. If you only want to build for the platform
+# you are on, simply comment or remove the line below.
+#
+# If you want to build for specific architectures, change the line
+# below to something like
+#
+# archs='m68k i386'
+#
+archs=`/bin/lipo -info /usr/lib/libm.a | sed -n 's/^[^:]*:[^:]*: //p'`
+
+#
+# leave the following part alone
+#
+archcount=`echo $archs |wc -w`
+if [ $archcount -gt 1 ]
+then
+ for d in $archs
+ do
+ mabflags="$mabflags -arch $d"
+ done
+ ccflags="$ccflags $mabflags"
+ ldflags="$ldflags $mabflags"
+ lddlflags="$lddlflags $mabflags"
+ archname='next-fat'
+fi
+######################################################################
+# END MAB support
+######################################################################
+ld='cc'
+
+i_utime='undef'
+groupstype='int'
+direntrytype='struct direct'
+d_strcoll='undef'
+d_uname='define'
+#
+# At least on m68k there are situations when memcmp doesn't behave
+# as expected. So we'll use perl's memcmp.
+#
+d_sanemcmp='undef'
+# setpgid() is in the posix library, but we don't use -posix, so
+# we don't see it. ext/POSIX/POSIX.xs *does* use -posix, so
+# setpgid is still available as POSIX::setpgid.
+# See ext/POSIX/POSIX/hints/next.pl.
+d_setpgid='undef'
+d_setsid='define'
+d_tcgetpgrp='define'
+d_tcsetpgrp='define'
+
+#
+# On some NeXT machines, the timestamp put by ranlib is not correct, and
+# this may cause useless recompiles. Fix that by adding a sleep before
+# running ranlib. The '5' is an empirical number that's "long enough."
+#
+ranlib='sleep 5; /bin/ranlib'
+
+#
+# There where reports that the compiler on HPPA machines
+# fails with the -O flag on pp.c.
+# Compiling pp.c with -O for HPPA machines results in a broken perl.
+# This is true whether we're on an HPPA machine or cross-compiling
+# for one.
+pp_cflags='optimize=""'
+
+# The SysV IPC is optional (ftp://ftp.nluug.nl/pub/comp/next/SysVIPC/)
+# Gerben_Wierda@RnA.nl
+if [ -f /usr/local/lib/libIPC.a ]; then
+ libswanted="$libswanted IPC"
+ # As of Sep 1998 d_msg wasn't supported in that library,
+ # only d_sem and d_shm, but Configure should be able to
+ # figure that out. --jhi
+ # Note also the next3 ext/IPC/SysV hints file.
+fi
diff --git a/hints/next_3_0.sh b/hints/next_3_0.sh
new file mode 100644
index 0000000000..b444578830
--- /dev/null
+++ b/hints/next_3_0.sh
@@ -0,0 +1,53 @@
+# This file has been put together by Anno Siegel <siegel@zrz.TU-Berlin.DE>
+# and Andreas Koenig <k@franz.ww.TU-Berlin.DE>. Comments, questions, and
+# improvements welcome!
+
+# This file was modified to work on NS 3.0 by Kevin White
+# <klwhite@magnus.acs.ohio-state.edu>, based on suggestions by Andreas
+# Koenig and Andy Dougherty.
+
+echo With NS 3.0 you won\'t be able to use the POSIX module. >&4
+echo Be aware that some of the tests that are run during \"make test\" >&4
+echo will fail due to the lack of POSIX support on this system. >&4
+echo >&4
+echo Also, if you have the GDBM installed, make sure the header file >&4
+echo is located at a place on the system where the C compiler will >&4
+echo find it. By default, it is placed in /usr/local/include/gdbm.h. >&4
+echo It will not be found there. Try moving it to >&4
+echo /NextDeveloper/Headers/bsd/gdbm.h. >&4
+
+ccflags="$ccflags -DUSE_NEXT_CTYPE -DNEXT30_NO_ATTRIBUTE"
+POSIX_cflags='ccflags="-posix $ccflags"'
+useposix='undef'
+ldflags="$ldflags -u libsys_s"
+libswanted="$libswanted dbm gdbm db"
+#
+lddlflags='-r'
+# Give cccdlflags an empty value since Configure will detect we are
+# using GNU cc and try to specify -fpic for cccdlflags.
+cccdlflags=' '
+#
+i_utime='undef'
+groupstype='int'
+direntrytype='struct direct'
+d_strcoll='undef'
+# the simple program `for ($i=1;$i<38771;$i++){$t{$i}=123}' fails
+# with Larry's malloc on NS 3.2 due to broken sbrk()
+usemymalloc='n'
+d_uname='define'
+
+# Thanks to Etienne Grossman <etienne@isr.isr.ist.utl.pt> for sending
+# the correct values for perl5.003_11 for the following 4
+# variables. For older version all four were defined.
+d_setsid='undef'
+d_tcgetpgrp='undef'
+d_tcsetpgrp='undef'
+d_setpgid='undef'
+
+#
+# On some NeXT machines, the timestamp put by ranlib is not correct, and
+# this may cause useless recompiles. Fix that by adding a sleep before
+# running ranlib. The '5' is an empirical number that's "long enough."
+# (Thanks to Andreas Koenig <k@franz.ww.tu-berlin.de>)
+ranlib='sleep 5; /bin/ranlib'
+
diff --git a/hints/next_4.sh b/hints/next_4.sh
new file mode 100644
index 0000000000..d5c8ba7d64
--- /dev/null
+++ b/hints/next_4.sh
@@ -0,0 +1,102 @@
+# Posix support has been removed from NextStep
+#
+useposix='undef'
+
+libpth='/lib /usr/lib /usr/local/lib'
+libswanted=' '
+libc='/NextLibrary/Frameworks/System.framework/System'
+
+ldflags="$ldflags -dynamic -prebind"
+lddlflags="$lddlflags -dynamic -bundle -undefined suppress"
+ccflags="$ccflags -dynamic -fno-common -DUSE_NEXT_CTYPE -DUSE_PERL_SBRK"
+cccdlflags='none'
+ld='cc'
+#optimize='-g -O'
+
+######################################################################
+# MAB support
+######################################################################
+# By default we will build for all architectures your development
+# environment supports. If you only want to build for the platform
+# you are on, simply comment or remove the line below.
+#
+# If you want to build for specific architectures, change the line
+# below to something like
+#
+# archs='m68k i386'
+#
+
+# On m68k machines, toke.c cannot be compiled at all for i386 and it can
+# only be compiled for m68k itself without optimization (this is under
+# OPENSTEP 4.2).
+#
+if [ `hostinfo | grep 'NeXT Mach.*:' | sed 's/.*RELEASE_//'` = M68K ]
+then
+ echo "Cross compilation is impossible on m68k hardware under OS 4"
+ echo "Forcing architecture to m68k only"
+ toke_cflags='optimize=""'
+ archs='m68k'
+else
+ archs=`/bin/lipo -info /usr/lib/libm.a | sed -n 's/^[^:]*:[^:]*: //p'`
+fi
+
+#
+# leave the following part alone
+#
+archcount=`echo $archs |wc -w`
+if [ $archcount -gt 1 ]
+then
+ for d in $archs
+ do
+ mabflags="$mabflags -arch $d"
+ done
+ ccflags="$ccflags $mabflags"
+ ldflags="$ldflags $mabflags"
+ lddlflags="$lddlflags $mabflags"
+fi
+######################################################################
+# END MAB support
+######################################################################
+
+useshprlib='true'
+dlext='bundle'
+so='dylib'
+
+#
+# The default prefix would be '/usr/local'. But since many people are
+# likely to have still 3.3 machines on their network, we do not want
+# to overwrite possibly existing 3.3 binaries.
+# You can use Configure -Dprefix=/foo/bar to override this, or simply
+# remove the lines below.
+#
+case "$prefix" in
+'') prefix='/usr/local/OPENSTEP' ;;
+esac
+
+archname='OPENSTEP-Mach'
+
+#
+# At least on m68k there are situations when memcmp doesn't behave
+# as expected. So we'll use perl's memcmp.
+#
+d_sanemcmp='undef'
+
+d_strcoll='undef'
+i_dbm='define'
+i_utime='undef'
+groupstype='int'
+direntrytype='struct direct'
+
+usemymalloc='y'
+clocktype='int'
+
+#
+# On some NeXT machines, the timestamp put by ranlib is not correct, and
+# this may cause useless recompiles. Fix that by adding a sleep before
+# running ranlib. The '5' is an empirical number that's "long enough."
+# (Thanks to Andreas Koenig <k@franz.ww.tu-berlin.de>)
+ranlib='sleep 5; /bin/ranlib'
+
+case "$ldlibpthname" in
+'') ldlibpthname=DYLD_LIBRARY_PATH ;;
+esac
diff --git a/hints/nonstopux.sh b/hints/nonstopux.sh
new file mode 100644
index 0000000000..025030fc9a
--- /dev/null
+++ b/hints/nonstopux.sh
@@ -0,0 +1,20 @@
+# tom_bates@att.net
+# mips-compaq-nonstopux
+
+. $src/hints/svr4.sh
+
+case "$cc" in
+ *gcc*)
+ ccflags='-fno-strict-aliasing'
+ lddlflags='-shared'
+ ldflags=''
+ ;;
+ *)
+ cc="cc -Xa -Olimit 4096"
+ malloctype="void *"
+ ;;
+esac
+
+libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'`
+glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'`
+
diff --git a/hints/openbsd.sh b/hints/openbsd.sh
new file mode 100644
index 0000000000..4839d049c5
--- /dev/null
+++ b/hints/openbsd.sh
@@ -0,0 +1,134 @@
+# hints/openbsd.sh
+#
+# hints file for OpenBSD; Todd Miller <millert@openbsd.org>
+# Edited to allow Configure command-line overrides by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+#
+# To build with distribution paths, use:
+# ./Configure -des -Dopenbsd_distribution=defined
+#
+
+# OpenBSD has a better malloc than perl...
+test "$usemymalloc" || usemymalloc='n'
+
+# Currently, vfork(2) is not a real win over fork(2) but this will
+# change starting with OpenBSD 2.7.
+usevfork='true'
+
+# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions
+# in 4.4BSD. Configure will find these but they are just emulated
+# and do not have the same semantics as in 4.3BSD.
+d_setregid=$undef
+d_setreuid=$undef
+d_setrgid=$undef
+d_setruid=$undef
+
+#
+# Not all platforms support dynamic loading...
+# For the case of "$openbsd_distribution", the hints file
+# needs to know whether we are using dynamic loading so that
+# it can set the libperl name appropriately.
+# Allow command line overrides.
+#
+ARCH=`arch | sed 's/^OpenBSD.//'`
+case "${ARCH}-${osvers}" in
+alpha-2.[0-8]|mips-2.[0-8]|powerpc-2.[0-7]|m88k-*|vax-*)
+ test -z "$usedl" && usedl=$undef
+ ;;
+*)
+ test -z "$usedl" && usedl=$define
+ # We use -fPIC here because -fpic is *NOT* enough for some of the
+ # extensions like Tk on some OpenBSD platforms (ie: sparc)
+ cccdlflags="-DPIC -fPIC $cccdlflags"
+ case "$osvers" in
+ [01].*|2.[0-7]|2.[0-7].*)
+ lddlflags="-Bshareable $lddlflags"
+ ;;
+ 2.[8-9]|3.0)
+ ld=${cc:-cc}
+ lddlflags="-shared -fPIC $lddlflags"
+ ;;
+ *) # from 3.1 onwards
+ ld=${cc:-cc}
+ lddlflags="-shared -fPIC $lddlflags"
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ ;;
+ esac
+
+ # We need to force ld to export symbols on ELF platforms.
+ # Without this, dlopen() is crippled.
+ ELF=`${cc:-cc} -dM -E - </dev/null | grep __ELF__`
+ test -n "$ELF" && ldflags="-Wl,-E $ldflags"
+ ;;
+esac
+
+#
+# Tweaks for various versions of OpenBSD
+#
+case "$osvers" in
+2.5)
+ # OpenBSD 2.5 has broken odbm support
+ i_dbm=$undef
+ ;;
+esac
+
+# OpenBSD doesn't need libcrypt but many folks keep a stub lib
+# around for old NetBSD binaries.
+libswanted=`echo $libswanted | sed 's/ crypt / /'`
+
+# Configure can't figure this out non-interactively
+d_suidsafe=$define
+
+# cc is gcc so we can do better than -O
+# Allow a command-line override, such as -Doptimize=-g
+case ${ARCH} in
+m88k)
+ optimize='-O0'
+ ;;
+*)
+ test "$optimize" || optimize='-O2'
+ ;;
+esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ # any openbsd version dependencies with pthreads?
+ ccflags="-pthread $ccflags"
+ ldflags="-pthread $ldflags"
+ # Add -lpthread. Also change from -lc to -lc_r
+ libswanted="$libswanted pthread"
+ libswanted=`echo " $libswanted "| sed -e 's/ c / c_r /' -e 's/^ //' -e 's/ $//'`
+ # This is strange.
+ usevfork="$undef"
+esac
+EOCBU
+
+# When building in the OpenBSD tree we use different paths
+# This is only part of the story, the rest comes from config.over
+case "$openbsd_distribution" in
+''|$undef|false) ;;
+*)
+ # We put things in /usr, not /usr/local
+ prefix='/usr'
+ prefixexp='/usr'
+ sysman='/usr/share/man/man1'
+ libpth='/usr/lib'
+ glibpth='/usr/lib'
+ # Local things, however, do go in /usr/local
+ siteprefix='/usr/local'
+ siteprefixexp='/usr/local'
+ # Ports installs non-std libs in /usr/local/lib so look there too
+ locincpth='/usr/local/include'
+ loclibpth='/usr/local/lib'
+ # Link perl with shared libperl
+ if [ "$usedl" = "$define" -a -r shlib_version ]; then
+ useshrplib=true
+ libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}`
+ fi
+ ;;
+esac
+
+# end
diff --git a/hints/opus.sh b/hints/opus.sh
new file mode 100644
index 0000000000..da6fcc95b0
--- /dev/null
+++ b/hints/opus.sh
@@ -0,0 +1 @@
+ccflags="$ccflags -X18"
diff --git a/hints/os2.sh b/hints/os2.sh
new file mode 100644
index 0000000000..77085a89b4
--- /dev/null
+++ b/hints/os2.sh
@@ -0,0 +1,484 @@
+#! /bin/sh
+# hints/os2.sh
+# This file reflects the tireless work of
+# Ilya Zakharevich <ilya@math.ohio-state.edu>
+#
+# Trimmed and comments added by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Exactly what is required beyond a standard OS/2 installation?
+# (see in README.os2)
+
+# Note that symbol extraction code gives wrong answers (sometimes?) on
+# gethostent and setsid.
+
+# Optimization (GNU make 3.74 cannot be loaded :-():
+emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
+emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
+emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
+
+path_sep=\;
+
+if test -f $sh.exe; then sh=$sh.exe; fi
+
+startsh="#!$sh"
+cc='gcc'
+
+# Make denser object files and DLL
+case "X$optimize" in
+ X)
+ optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s"
+ ld_dll_optimize="-s"
+ ;;
+esac
+
+# Get some standard things (indented to avoid putting in config.sh):
+ oifs="$IFS"
+ IFS=" ;"
+ set $MANPATH
+ tryman="$@"
+ set $LIBRARY_PATH
+ libemx="$@"
+ set $C_INCLUDE_PATH
+ usrinc="$@"
+ IFS="$oifs"
+ tryman="`./UU/loc . /man $tryman`"
+ tryman="`echo $tryman | tr '\\\' '/'`"
+
+ # indented to avoid having it *two* times at start
+ libemx="`./UU/loc os2.a /emx/lib $libemx`"
+
+usrinc="`./UU/loc stdlib.h /emx/include $usrinc`"
+usrinc="`dirname $usrinc | tr '\\\' '/'`"
+libemx="`dirname $libemx | tr '\\\' '/'`"
+
+if test -d $tryman/man1; then
+ sysman="$tryman/man1"
+else
+ sysman="`./UU/loc . /man/man1 c:/man/man1 c:/usr/man/man1 d:/man/man1 d:/usr/man/man1 e:/man/man1 e:/usr/man/man1 f:/man/man1 f:/usr/man/man1 g:/man/man1 g:/usr/man/man1 /usr/man/man1`"
+fi
+
+emxpath="`dirname $libemx`"
+if test ! -d "$emxpath"; then
+ emxpath="`./UU/loc . /emx c:/emx d:/emx e:/emx f:/emx g:/emx h:/emx /emx`"
+fi
+
+if test ! -d "$libemx"; then
+ libemx="$emxpath/lib"
+fi
+if test ! -d "$libemx"; then
+ if test -d "$LIBRARY_PATH"; then
+ libemx="$LIBRARY_PATH"
+ else
+ libemx="`./UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`"
+ fi
+fi
+
+if test ! -d "$usrinc"; then
+ if test -d "$emxpath/include"; then
+ usrinc="$emxpath/include"
+ else
+ if test -d "$C_INCLUDE_PATH"; then
+ usrinc="$C_INCLUDE_PATH"
+ else
+ usrinc="`./UU/loc . X c:/emx/include d:/emx/include e:/emx/include f:/emx/include g:/emx/include h:/emx/include /emx/include`"
+ fi
+ fi
+fi
+
+rsx="`./UU/loc rsx.exe undef $pth`"
+
+if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi
+
+# Acute backslashitis:
+libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`"
+libpth="$libpth $libemx/mt $libemx"
+
+set `cmd /c emxrev -f emxlibcm`
+emxcrtrev=$5
+# indented to not put it into config.sh
+ _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev
+
+so='dll'
+
+# Additional definitions:
+
+firstmakefile='GNUmakefile'
+exe_ext='.exe'
+
+# We provide it
+i_dlfcn='define'
+
+# The default one uses exponential notation between 0.0001 and 0.1
+d_Gconvert='gcvt_os2((x),(n),(b))'
+
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+# If we will use them, let Configure choose us a Gconvert.
+case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in
+"$define:$define:$define:$define") d_Gconvert='' ;;
+esac
+EOCBU
+
+# -Zomf build has a problem with _exit() *flushing*, so the test
+# gets confused:
+fflushNULL="define"
+
+aout_d_shrplib='undef'
+aout_useshrplib='false'
+aout_obj_ext='.o'
+aout_lib_ext='.a'
+aout_ar='ar'
+aout_plibext='.a'
+aout_lddlflags="-Zdll $ld_dll_optimize"
+# Cannot have 32000K stack: get SYS0170 ?!
+if [ $emxcrtrev -ge 50 ]; then
+ aout_ldflags='-Zexe -Zsmall-conv -Zstack 16000'
+else
+ aout_ldflags='-Zexe -Zstack 16000'
+fi
+
+# To get into config.sh:
+aout_ldflags="$aout_ldflags"
+
+aout_d_fork='define'
+aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
+aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
+aout_use_clib='c'
+aout_usedl='undef'
+aout_archobjs="os2.o dl_os2.o"
+# Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless
+aout_extra_static_ext="OS2::DLL"
+
+# variable which have different values for aout compile
+used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
+
+if [ "$emxaout" != "" ]; then
+ d_shrplib="$aout_d_shrplib"
+ useshrplib="$aout_useshrplib"
+ obj_ext="$aout_obj_ext"
+ lib_ext="$aout_lib_ext"
+ ar="$aout_ar"
+ plibext="$aout_plibext"
+ if [ $emxcrtrev -lt 50 ]; then
+ d_fork="$aout_d_fork"
+ fi
+ lddlflags="$aout_lddlflags"
+ ldflags="$aout_ldflags"
+ ccflags="$aout_ccflags"
+ cppflags="$aout_cppflags"
+ use_clib="$aout_use_clib"
+ usedl="$aout_usedl"
+else
+ d_shrplib='define'
+ useshrplib='true'
+ obj_ext='.obj'
+ lib_ext='.lib'
+ ar='emxomfar'
+ plibext='.lib'
+ if [ $emxcrtrev -ge 50 ]; then
+ d_fork='define'
+ else
+ d_fork='undef'
+ fi
+ lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2"
+ # Recursive regmatch may eat 2.5M of stack alone.
+ ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e:2'
+ if [ $emxcrtrev -ge 50 ]; then
+ ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
+ else
+ ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK $_defemxcrtrev"
+ fi
+ use_clib='c_import'
+ usedl='define'
+fi
+
+# indented to miss config.sh
+ _ar="$ar"
+
+# To get into config.sh (should start at the beginning of line)
+# or you can put it into config.over.
+plibext="$plibext"
+# plibext is not needed anymore. Just directly set $libperl.
+libperl="libperl${plibext}"
+
+#libc="/emx/lib/st/c_import$lib_ext"
+libc="$libemx/mt/$use_clib$lib_ext"
+
+if test -r "$libemx/c_alias$lib_ext"; then
+ libnames="$libemx/c_alias$lib_ext"
+fi
+# otherwise puts -lc ???
+
+# [Maybe we should just remove c from $libswanted ?]
+
+# Test would pick up wrong rand, so we hardwire the value for random()
+libs='-lsocket -lm -lbsd'
+randbits=31
+archobjs="os2$obj_ext dl_os2$obj_ext"
+
+# Run files without extension with sh:
+EXECSHELL=sh
+
+cccdlflags='-Zdll'
+dlsrc='dl_dlopen.xs'
+ld='gcc'
+
+#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.'
+
+# for speedup: (some patches to ungetc are also needed):
+# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails
+
+stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"`
+d_stdstdio='define'
+d_stdiobase='define'
+d_stdio_ptr_lval='define'
+d_stdio_cnt_lval='define'
+
+if test "$stdstdunder" = 0; then
+ stdio_ptr='((fp)->ptr)'
+ stdio_cnt='((fp)->rcount)'
+ stdio_base='((fp)->buffer)'
+ stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)'
+ ccflags="$ccflags -DMYTTYNAME"
+ myttyname='define'
+else
+ stdio_ptr='((fp)->_ptr)'
+ stdio_cnt='((fp)->_rcount)'
+ stdio_base='((fp)->_buffer)'
+ stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)'
+fi
+
+# to put into config.sh
+myttyname="$myttyname"
+
+# To have manpages installed
+nroff='nroff.cmd'
+# above will be overwritten otherwise, indented to avoid config.sh
+ _nroff='nroff.cmd'
+
+# should be handled automatically by Configure now.
+ln='cp'
+# Will be rewritten otherwise, indented to not put in config.sh
+ _ln='cp'
+lns='cp'
+
+nm_opt='-p'
+
+####### We define these functions ourselves
+
+d_strtoll='define'
+d_strtoull='define'
+d_getprior='define'
+d_setprior='define'
+
+# The next two are commented. pdksh handles #!, extproc gives no path part.
+# sharpbang='extproc '
+# shsharp='false'
+
+# Commented:
+#startsh='extproc ksh\\n#! sh'
+
+# Find patch:
+gnupatch='patch'
+if (gnupatch -v || gnupatch --version) 2>&1 >/dev/null; then
+ gnupatch=gnupatch
+else
+ if (gpatch -v || gpatch --version) 2>&1 >/dev/null; then
+ gnupatch=gpatch
+ else
+ # They may have a special PATH during configuring
+ if (patch -v || patch --version) 2>&1 >/dev/null; then
+ gnupatch="`./UU/loc patch.exe undef $pth`"
+ fi
+ fi
+fi
+
+for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do
+ if test -z "$pager"; then
+ pager="`./UU/loc $f '' $pth`"
+ fi
+done
+if test -z "$pager"; then
+ pager='cmd /c more'
+fi
+
+# Apply patches if needed
+case "$0$running_c_cmd" in
+ *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
+ if test "Xyes" = "X$configure_cmd_loop"; then
+ cat <<EOC >&2
+!!!
+!!! PANIC: Loop of self-invocations detected, aborting!
+!!!
+EOC
+ exit 20
+ fi
+ configure_cmd_loop=yes
+ export configure_cmd_loop
+
+ configure_needs_patch=''
+ if test -s ./os2/diff.configure; then
+ if ! grep "^#OS2-PATCH-APPLIED" ./Configure > /dev/null; then
+ configure_needs_patch=yes
+ fi
+ fi
+ if test -n "$configure_needs_patch"; then
+ # Not patched!
+ # Restore the initial command line arguments
+ if test -f ./Configure.cmd ; then
+ cat <<EOC >&2
+!!!
+!!! I see that what is running is ./Configure.
+!!! ./Configure is not patched, but ./Configure.cmd exists.
+!!!
+!!! You are supposed to run Configure.cmd, not Configure
+!!! after an automagic patching.
+!!!
+!!! If you insist on running Configure, you may
+!!! patch it manually from ./os2/diff.configure.
+!!!
+!!! However, I went through incredible hoolahoops, and I expect I can
+!!! auto-restart Configure.cmd myself. I will start it with arguments:
+!!!
+!!! Configure.cmd $args_exp
+!!!
+EOC
+ rp='Do you want to auto-restart Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
+ eval "set X $args_exp";
+ shift;
+ # Restore the output
+ exec Configure.cmd "$@" 1>&2
+ exit 2
+ fi
+ cat <<EOC >&2
+!!!
+!!! You did not patch ./Configure!
+!!! I can create Configure.cmd and patch it from ./os2/diff.configure with the command
+!!!
+!!! $gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch
+EOC
+ rp='Do you want to auto-patch Configure to Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
+ ($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2
+ cat <<EOC >&2
+!!!
+!!! The report of patching is copied to 00_auto_patch.
+!!! Now we need to restart Configure.cmd with all the options.
+!!!
+EOC
+ echo "extproc sh" > Configure.ctm
+ ( cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd ) || (echo "!!! Failure to add extproc-line to Configure.cmd." >&2 ; exit 21)
+ cat <<EOC >&2
+!!! I went through incredible hoolahoops, and I expect I can
+!!! auto-restart Configure.cmd myself. I will start it with arguments:
+!!!
+!!! Configure.cmd $args_exp
+!!!
+EOC
+ rp='Do you want to auto-restart Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
+ eval "set X $args_exp";
+ shift;
+ exec Configure.cmd "$@" 1>&2
+ exit 2
+ else
+ if test -s ./os2/diff.configure; then
+ echo "!!! Apparently we are running a patched Configure." >&2
+ else
+ echo "!!! Apparently there is no need to patch Configure." >&2
+ fi
+ fi
+ ;;
+ *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
+esac
+
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="-Zmt $ccflags"
+ cppflags="-Zmt $cppflags" # Do we really need to set this?
+ aout_ccflags="-DUSE_THREADS $aout_ccflags"
+ aout_cppflags="-DUSE_THREADS $aout_cppflags"
+ aout_lddlflags="-Zmt $aout_lddlflags"
+ aout_ldflags="-Zmt $aout_ldflags"
+ ;;
+esac
+EOCBU
+
+if test -z "$cryptlib"; then
+ cryptlib=`UU/loc crypt$lib_ext "" $libpth`
+ if $test -n "$cryptlib"; then
+ cryptlib=-lcrypt
+ else
+ cryptlib=`UU/loc ufc$lib_ext "" $libpth`
+ if $test -n "$cryptlib"; then
+ cryptlib=-lufc
+ fi
+ fi
+fi
+if test -n "$cryptlib"; then
+ libs="$libs $cryptlib"
+ # d_crypt=define
+fi
+
+# Now install the external modules. We are in the ./hints directory.
+
+cd ./os2/OS2
+
+if ! test -d ../../ext/OS2 ; then
+ mkdir ../../ext/OS2
+fi
+
+cp -rfu * ../../ext/OS2/
+
+# Install tests:
+
+cp -uf ../*.t ../../t/lib
+for xxx in * ; do
+ if $test -d $xxx/t; then
+ cp -uf $xxx/t/*.t ../../t/lib
+ else
+ if $test -d $xxx; then
+ cd $xxx
+ for yyy in * ; do
+ if $test -d $yyy/t; then
+ cp -uf $yyy/t/*.t ../../t/lib
+ fi
+ done
+ cd ..
+ fi
+ fi
+done
+
+case "$ldlibpthname" in
+'') ldlibpthname=none ;;
+esac
+
+# Now go back
+cd ../..
+cp os2/*.t t/lib
diff --git a/hints/os390.sh b/hints/os390.sh
new file mode 100644
index 0000000000..38d02c3fad
--- /dev/null
+++ b/hints/os390.sh
@@ -0,0 +1,218 @@
+# hints/os390.sh
+#
+# OS/390 hints by David J. Fiander <davidf@mks.com>
+#
+# OS/390 OpenEdition Release 3 Mon Sep 22 1997 thanks to:
+#
+# John Goodyear <johngood@us.ibm.com>
+# John Pfuntner <pfuntner@vnet.ibm.com>
+# Len Johnson <lenjay@ibm.net>
+# Bud Huff <BAHUFF@us.oracle.com>
+# Peter Prymmer <pvhp@forte.com>
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Tim Bunce <Tim.Bunce@ig.co.uk>
+#
+# as well as the authors of the aix.sh file
+#
+
+# To get ANSI C, we need to use c89, and ld doesn't exist
+# You can override this with Configure -Dcc=gcc -Dld=ld.
+case "$cc" in
+'') cc='c89' ;;
+esac
+case "$ld" in
+'') ld='c89' ;;
+esac
+
+# -DMAXSIG=38 maximum signal number
+# -DOEMVS is used in place of #ifdef __MVS__ in certain places.
+# -D_OE_SOCKETS alters system headers.
+# -D_XOPEN_SOURCE_EXTENDEDA alters system headers.
+# c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again.
+# YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant.
+# -DEBCDIC should come from Configure and need not be mentioned here.
+# Prepend your favorites with Configure -Dccflags=your_favorites
+case "$ccflags" in
+'') ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;;
+*) ccflags="$ccflags -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;;
+esac
+
+# Turning on optimization breaks perl.
+# You can override this with Configure -Doptimize='-O' or somesuch.
+case "$optimize" in
+'') optimize='none' ;;
+esac
+
+# To link via definition side decks we need the dll option
+# You can override this with Configure -Ucccdlflags or somesuch.
+case "$cccdlflags" in
+'') cccdlflags='-W 0,dll' ;;
+esac
+
+case "$so" in
+'') so='a' ;;
+esac
+
+case "$alignbytes" in
+'') alignbytes=8 ;;
+esac
+
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+# On OS/390, libc.a doesn't really hold anything at all,
+# so running nm on it is pretty useless.
+# You can override this with Configure -Dusenm.
+case "$usenm" in
+'') usenm='false' ;;
+esac
+
+# Setting ldflags='-Wl,EDIT=NO' will get rid of the symbol
+# information at the end of the executable (=> smaller binaries).
+# Override this option with -Dldflags='whatever else you wanted'.
+case "$ldflags" in
+'') ldflags='-Wl,EDIT=NO' ;;
+esac
+
+# In order to build with dynamic be sure to specify:
+# Configure -Dusedl
+# Do not forget to add $archlibexp/CORE to your LIBPATH.
+# You might want to override some of this with things like:
+# Configure -Dusedl -Ddlext=so -Ddlsrc=dl_dllload.xs.
+case "$usedl" in
+'')
+ usedl='n'
+ case "$dlext" in
+ '') dlext='none' ;;
+ esac
+ ;;
+define)
+ case "$useshrplib" in
+ '') useshrplib='true' ;;
+ esac
+ case "$dlsrc" in
+ '') dlsrc='dl_dllload.xs' ;;
+ esac
+ # For performance use 'so' at or beyond v2.8, 'dll' for 2.7 and prior versions
+ case "`uname -v`x`uname -r`" in
+ 02x0[89].*|02x1[0-9].*|[0-9][3-9]x*)
+ so='so'
+ case "$dlext" in
+ '') dlext='so' ;;
+ esac
+ ;;
+ *)
+ so='dll'
+ case "$dlext" in
+ '') dlext='dll' ;;
+ esac
+ ;;
+ esac
+ libperl="libperl.$so"
+ ccflags="$ccflags -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll"
+ cccdlflags='-c -Wc,dll,EXPORTALL'
+ # The following will need to be modified for the installed libperl.x.
+ # The modification to Config.pm is done by the installperl script after the build and test.
+ ccdlflags="-W l,dll `pwd`/libperl.x"
+ lddlflags="-W l,dll `pwd`/libperl.x"
+ ;;
+esac
+# even on static builds using LIBPATH should be OK.
+case "$ldlibpthname" in
+'') ldlibpthname=LIBPATH ;;
+esac
+
+# Header files to include.
+# You can override these with Configure -Ui_time -Ui_systime.
+case "$i_time" in
+'') i_time='define' ;;
+esac
+case "$i_systime" in
+'') i_systime='define' ;;
+esac
+
+# (from aix.sh)
+# uname -m output is too specific and not appropriate here
+# osname should come from Configure
+# You can override this with Configure -Darchname='s390' but please don't.
+case "$archname" in
+'') archname="$osname" ;;
+esac
+
+# We have our own cppstdin script. This is not a variable since
+# Configure sees the presence of the script file.
+# We put system header -D definitions in so that Configure
+# can find the shmat() prototype in <sys/shm.h> and various
+# other things. Unfortunately, cppflags occurs too late to be of
+# value external to the script. This may need to be revisited
+# under a compiler other than c89.
+case "$usedl" in
+define)
+echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -D_SHR_ENVIRON -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin
+ ;;
+*)
+echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin
+ ;;
+esac
+
+#
+# Note that Makefile.SH employs a bare yacc command to generate
+# perly.[hc] and a2p.[hc], hence you may wish to:
+#
+# alias yacc='myyacc'
+#
+# Then if you would like to use myyacc and skip past the
+# following warnings try invoking Configure like so:
+#
+# sh Configure -Dbyacc=yacc
+#
+# This trick ought to work even if your yacc is byacc.
+#
+if test "X$byacc" = "Xbyacc" ; then
+ if test -e /etc/yyparse.c ; then
+ : we should be OK - perhaps do a test -r?
+ else
+ cat <<EOWARN >&4
+
+Warning. You do not have a copy of yyparse.c, the default
+yacc parser template file, in place in /etc.
+EOWARN
+ if test -e /samples/yyparse.c ; then
+ cat <<EOWARN >&4
+
+There does appear to be a template file in /samples though.
+Please run:
+
+ cp /samples/yyparse.c /etc
+
+before attempting to Configure the build of $package.
+
+EOWARN
+ else
+ cat <<EOWARN >&4
+
+There does not appear to be one in /samples either.
+If you feel you can make use of an alternate yacc-like
+parser generator then please read the comments in the
+hints/os390.sh file carefully.
+
+EOWARN
+ fi
+ exit 1
+ fi
+fi
+
+# Most of the time gcvt() seems to work fine but
+# sometimes values like 0.1, 0.2, come out as "10", "20",
+# a trivial Perl demonstration snippet is 'print 0.1'.
+# The -W 0,float(ieee) seems to be the switch breaking gcvt().
+# sprintf() seems to get things right(er).
+gconvert_preference=sprintf
+
+cat >config.arch<<'__CONFIG_ARCH__'
+# The '-W 0,float(ieee)' cannot be used during Configure as ldflags.
+
+ccflags="$ccflags -W 0,float(ieee)"
+
+__CONFIG_ARCH__
diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh
new file mode 100644
index 0000000000..683bbccaff
--- /dev/null
+++ b/hints/posix-bc.sh
@@ -0,0 +1,172 @@
+:
+# hints/posix-bc.sh
+#
+# BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de>
+#
+# Thanks to the authors of the os390.sh for the very first draft.
+#
+# You can modify almost any parameter set here using Configure with
+# the appropriate -D option.
+
+# remove this line if dynamic libraries are working for you:
+bs2000_ignoredl='y'
+
+# To get ANSI C, we need to use c89
+# You can override this with Configure -Dcc=gcc
+# (if you ever get a gcc ported to BS2000 ;-).
+case "$cc" in
+'') cc='c89' ;;
+esac
+
+# C-Flags:
+# -DPOSIX_BC
+# -DUSE_PURE_BISON
+# -D_XOPEN_SOURCE_EXTENDED alters system headers.
+# Prepend your favorites with Configure -Dccflags=your_favorites
+ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED"
+
+# Now, what kind of BS2000 system are we running on?
+echo
+if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
+ echo "You are running a BS2000 machine with Sunrise CPUs."
+ echo "Let's hope you have the matching RISC compiler as well."
+ ccflags="-K risc_4000 $ccflags"
+ bs2000_ldflags='-K risc_4000'
+else
+ echo "Seems like a standard 390 BS2000 machine to me."
+ bs2000_ldflags=''
+fi
+echo
+if [ -z "$bs2000_ignoredl" -a -e /usr/lib/libdl.a ]; then
+ echo "Wow, your BS2000 is State Of The Art and seems to support dynamic libraries."
+ echo "I just can't resist giving them a try."
+ bs2000_lddlflags='-Bsymbolic -Bdynamic'
+ # dynamic linkage of system libraries gave us runtime linker
+ # errors, so we use static linkage while generating our DLLs :-(
+# bs2000_lddlflags='-Bstatic'
+ bs2000_so='none'
+ bs2000_usedl='define'
+ bs2000_dlext='so'
+ case $bs2000_ldflags in
+ *risc_4000*)
+ bs2000_ld="perl_genso"
+ echo "
+Now you must buy everything they sell you, musn't you?
+Didn't somebody tell you that RISC machines and dynamic library support gives
+you helluva lot of configuration problems at the moment?
+Sigh. Now you'll expect me to fix it for you, eh?
+OK, OK, I'll give you a wrapper.
+Just copy $bs2000_ld anywhere into your path before you try to install
+additional modules!"
+
+cat > $bs2000_ld <<EOF
+#! /bin/sh
+#
+# Perl's wrapper for genso by Thomas.Dorner@start.de
+
+GENSO=/usr/bin/genso
+options=""
+params=""
+while [[ \$# -gt 0 ]]; do
+ case \$1 in
+ -K)
+ shift
+ ;;
+ -K*)
+ ;;
+ *.a)
+ lib=\${1##*/lib}
+ options="\$options -L\${1%/lib*.a} -l\${lib%.a}"
+ ;;
+ *.o)
+ params="\$params \$1"
+ ;;
+ *)
+ options="\$options \$1"
+ esac
+ shift
+done
+echo \$GENSO \$options \$params
+exec \$GENSO \$options \$params
+EOF
+
+ chmod +x $bs2000_ld
+ if [[ -w /usr/local/bin && ! -f /usr/local/bin/$bs2000_ld ]]; then
+ cp -p $bs2000_ld /usr/local/bin/$bs2000_ld
+ echo "(Actually I just did that as well, have a look into /usr/local/bin.)"
+ fi
+ ;;
+ *)
+ bs2000_ld='genso'
+ esac
+else
+ if [ -e /usr/lib/libdl.a ]; then
+ echo "Your BS2000 supports dynamic libraries, but you (or we ;-) decided to leave them alone."
+ else
+ echo "Your BS2000 does'n support dynamic libraries so we're just staying static."
+ fi
+ bs2000_ld='c89'
+ bs2000_lddlflags=''
+ bs2000_so='none'
+ bs2000_usedl='n'
+ bs2000_dlext='none'
+fi
+
+case "$ld" in
+'') ld=$bs2000_ld ;;
+esac
+
+# ccdlflags have yet to be determined.
+#case "$ccdlflags" in
+#'') ccdlflags='-c' ;;
+#esac
+
+# cccdlflags have yet to be determined.
+#case "$cccdlflags" in
+#'') cccdlflags='' ;;
+#esac
+
+case "$ldflags" in
+'') ldflags=$bs2000_ldflags ;;
+esac
+
+case "$lddlflags" in
+'') lddlflags=$bs2000_lddlflags ;;
+esac
+
+# Turning on optimization breaks perl (CORE-DUMP):
+# You can override this with Configure -Doptimize='-O' or somesuch.
+case "$optimize" in
+'') optimize='none' ;;
+esac
+
+# BS2000 doesn't use dynamic memory on its own (yet):
+case "$so" in
+'') so=$bs2000_so ;;
+esac
+
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+# On BS2000/Posix, libc.a does not really hold anything at all,
+# so running nm on it is pretty useless.
+# You can override this with Configure -Dusenm.
+case "$usenm" in
+'') usenm='false' ;;
+esac
+
+# Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs.
+case "$usedl" in
+'') usedl=$bs2000_usedl ;;
+esac
+case "$dlext" in
+'') dlext=$bs2000_dlext ;;
+esac
+#case "$dlsrc" in
+#'') dlsrc='none' ;;
+#esac
+#case "$ldlibpthname" in
+#'') ldlibpthname=LIBPATH ;;
+#esac
+
diff --git a/hints/powerux.sh b/hints/powerux.sh
new file mode 100644
index 0000000000..c95e0e9ef5
--- /dev/null
+++ b/hints/powerux.sh
@@ -0,0 +1,218 @@
+# Hints for the Power MAX OS operating system (formerly PowerUX - hence the
+# name) running on Concurrent (formerly Harris) NightHawk machines. Written
+# by Tom.Horsley@ccur.com
+#
+# This hint uses dynamic linking and the new Concurrent C compiler (based
+# on the Edison front end). This hint file was produced for a build of the
+# 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system
+# (but it should work on any Power MAX release using the newer "ec" (versus
+# "cc") compiler, and hopefully will also work for the upcoming 5.8
+# development release of perl).
+
+# First find out where the root of the source tree is located.
+
+SRCROOT=""
+if [ -f ./INSTALL ]
+then
+ SRCROOT="."
+else
+ if [ -f ../INSTALL ]
+ then
+ SRCROOT=".."
+ fi
+fi
+if [ -z "$SRCROOT" ]
+then
+ echo "powerux hint file cannot locate root perl source!" 1>&2
+ exit 2
+fi
+
+# We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so
+# fixup libswanted to reflect that desire (also need -lresolv if you want
+# DNS name lookup to work, which seems desirable :-).
+#
+libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /' -e 's/ PW / /' -e 's/ nsl / nsl gen resolv /'`
+
+# We DO NOT want /usr/ucblib in glibpth
+#
+glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'`
+
+# Yes, csh exists, but doesn't work worth beans, if perl tries to use it,
+# the glob test fails, so just pretend it isn't there...
+#
+d_csh='undef'
+
+# Need to use Concurrent ec for most of these options to be meaningful (if you
+# want to get this to work with gcc, you're on your own :-). Passing
+# -Bexport to the linker when linking perl is important because it leaves
+# the interpreter internal symbols visible to the shared libs that will be
+# loaded on demand (and will try to reference those symbols). The -usys_nerr
+# drags in some stuff from libc that perl proper doesn't reference but
+# some dynamically linked extension will need to be in the static part
+# of perl (there are probably more of these that might be useful, but
+# for the extensions I build, this turned out to be enough). The -uldexp
+# makes sure the custom ldexp.o I add to archobjs actually gets pulled
+# into perl from libperl.a
+#
+cc='/usr/ccs/bin/ec'
+cccdlflags='-Zpic'
+ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-Bexport'
+lddlflags='-Zlink=so'
+
+# Sigh... Various versions of Power MAX went out with a broken ldexp runtime
+# routine in libc (it is fixed for sure in the upcoming SR4 release, but
+# that hasn't made it out the door yet). Since libc is linked dynamically,
+# and the perl you build might try to run on one of the broken systems, we
+# need to statically link a corrected copy of ldexp.o into perl. What the
+# following code does is determine if the ldexp.o on the current system
+# works right. If it does, it simply extracts the ldexp.o from the system C
+# library and uses that .o file. If the system .o is broken, the btoa
+# encoded copy of a correct ldexp.o file included in this hint file is used
+# (what a pain...)
+#
+if [ ! -f $SRCROOT/ldexp.o ]
+then
+ echo Finding a correct copy of ldexp.o to link with... 1>&2
+ cat > $SRCROOT/UU/ldexptest.c <<'EOF'
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+int
+main(int argc, char ** argv) {
+ double result = pow(2.0, 38.0);
+ char buf[100];
+ sprintf(buf, "%g", result);
+ if (strncmp(buf, "inf", 3) == 0) {
+ exit(2);
+ }
+ return 0;
+}
+EOF
+ GOODLDEXP="no"
+ $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1
+ if [ $? -eq 0 ]
+ then
+ $SRCROOT/UU/ldexptest
+ if [ $? -eq 0 ]
+ then
+ LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'`
+ if [ -s "$LDEXPLIB" ]
+ then
+ if [ -f "$LDEXPLIB" ]
+ then
+ GOODLDEXP="yes"
+ fi
+ fi
+ fi
+ fi
+ if [ "$GOODLDEXP" = "yes" ]
+ then
+ echo Congratulations! The ldexp.o on this system looks good! 1>&2
+ echo Using ldexp.o from $LDEXPLIB 1>&2
+ ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o )
+ else
+ echo Sorry, the ldexp.o on this system is busted. 1>&2
+ echo Using the ldexp.o from the powerux hint file 1>&2
+ atob > $SRCROOT/ldexp.o << 'EOF'
+xbtoa Begin
+Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\
+s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB
+5)5`!%om?A7^")?Yj7aG]7#$DI``"/o5'0G]7#+A7^")?N:'+5\stBG]7#+Bl7KhF*(i2F9"RBA7^"
+)?YjFoARB"dA,nl2A7^")?YjFoARAnXB5)5`5\stBG]7#/Ec5c4B6@cmASu#Y5\stBG]7#/Ec5c4B6
+@cm@V'1dD?'ZQA7^")!+0)TBQ@HkEcQ&9!+p7_G]3XiCh[?cG%G]8Bl@kh?XIJhB4YFn@;GorEb0&q
+/p(ZLF9!q6ASbd-FC\s(@fS-%ASbd-A7]4mB4#IhDIieJz3$J<@IAd4EOoYQ5HuL$L3Pb]og;*c.rk
+Jf$0+\*`g>N$VfHC6nOeDcBJaNL<r#i5*<UF@H/I_sb5`,PtJ;sU43WK.'.>.[$5ct)L<TXBJ5b\68
+8,rVja<:P^38ac\OQ-<@b/"'sb2E>Fr#l&\JY<(2JcPk%3$A9`IAd7F:4N<e<U"H%5b\5i3FDgf;/_
+p@OmW2L8,rVjOok[aa<:P^b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<e6(.iX4J2ZSb2iU's-C.p6
+,!Blr#i5*3+2eP8,rVjJH5a9/J%m^4[8uI/!'`P5`#LiIF(:p4CCN1/WKr63FDgf5ck%!8,rVj4[8u
+I3T'l]4obQ_OlHEAJP#nB/d_RY5dCAdrg(%ob2E>F4eMcT^b#Nd5a26gb/"'sJY<(2JcPk%3$A9`IA
+d7F:4N<eb/"'s4J2ZS^a/s\JY<(2JcPk%3$A9`IAd7F:4N<eaKPXErt`*EJY<(25aVNob/"'sr#dCa
+IAd7Fb2E>FJcPk%3$A9`:4N<eb/"'sr#dDL4TGH^IAd7Fb2E>FJcPk%3$A9`:4N<eaQ`a*5b.lp4Wj
+_)b,G@@3Y;>Nrmh6n.M)S$6';3>OC8,cI;FEfb2E>FD1mE>OF[C2aT2B<JY<(2JcPk%r5^iGIAd7Fr
+&+S]b/"'s3$A9`:4N<eI'>pO3T0qs/VX)J4[;@g3<0$[I1UWg5car>8,rVj35>M<r#iM2OM_%ub/"'
+sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<eJY<(25_oC_4hq$tb)QH%3Y29438jhrrmh6.IulWT6(IuEO[
+/tTILlM+IAd7Fb2E>FI11W[4obQ_a\Vs;D1mE>OF[CBa^G0WJcPk%r@:\mr&.(kb/"'s3$A9`:4N<e
+b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<ezzzs*t(KzIt.Luz6-oT3z6SJK?J,fQL4qI\oz!!!!s!
+!!!$zz!s/HG!!!"\!!!!)s8W,W!!!*$!!!"@!!3-#!"]85q[3`2!<E3%!!!!"!!!!&!WW3#!!WNU!W
+rH*If]fT!sSf.!Cp$,"p9>V!<FMOCe,mh8j5@-)[6Co!W`<V"u5N)49bn;!W`<+-`^N""p9>V!<F,D
+Bh&@0If]WO"t'Ld!Y>A:>Q=d*zz"98E)zzzzzzzzzz!!!!\zz"9AJl!!!!dzz!rr<&!!!!ezz!!!!#
+!!!"(zz!rr<'!!!")!!!)]z!!!!#!!!";!!!!Mz!!!!#!!!"Jzz!rr<(!!!"Kzz!rr<)!!!"Lzz!!!
+!&!!!"^!!!"Dz!!!!&!!!"n!!!!%z!!!!&!!!#+!!!!;z!!!!&!!!#?!!!!+z!!!!&!!!#Uzz!rr<*
+!!!#Vz!!!)]&c_n5!!!#\zz&-)\1!!!#hzz&-)\1!!!#nzz&-)\1!!!$&zz&-)\1!!!"$!!!Q<z!!!
+"h!!!Q<z!!!#A!!!-Gz!!!#E!!!-Hz!!!#W!!!T=z!!!#e!!!-G!!!!A!!!$.!!!Q<z!!!$4!!!WUz
+!!!$<!!!ZVz!!!$D!!!WVz!!!$X!!!-G!!!!)!!!$\!!!-H!!!!)!!!%+!!!-G!!!!1!!!%/!!!-H!
+!!!1!!!%G!!!ZWz!!!&&!!!ZVz!!!&>!!!-H!!!!A!!!&F!!!-G!!!!9!!!&J!!!-H!!!!9!!!'[!!
+!Q<z!!!(<!!!-G!!!!I!!!(@!!!-H!!!!I!!!(l!!!-G!!!!A!!!(p!!!-H!!!!A!!!!)!!!3Gz!!!
+!-!!!'C!!!)]!!!!>!!!*Ezzzzzzzzzzz!!!!"!!!!$zz!!!!U!!!$Yzz!!!!"z!!!!*!!!!"!!!!'
+z!!!%=!!!)]zz!!!!1z!!!!0!!!!"!!!!#z!!!.(!!!!Qzz!!!!)z!!!!8!!!!"!!!!#z!!!.X!!!!
+Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!!
+#zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!!
+$<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!!
+!!-
+xbtoa End N 2436 984 E ad S 1bf43 R a7867666
+EOF
+ fi
+ ( cd $SRCROOT/UU ; rm -f ldexptest* )
+fi
+if [ -f $SRCROOT/ldexp.o ]
+then
+ archobjs='ldexp.o'
+fi
+
+# Configure sometime finds what it believes to be ndbm header files on the
+# system and imagines that we have the NDBM library, but we really don't.
+# There is something there that once resembled ndbm, but it is purely
+# for internal use in some tool and has been hacked beyond recognition
+# (or even function :-)
+#
+i_ndbm='undef'
+
+# I have no clue what perl thinks it wants <sys/mode.h> for, but if you
+# include it in a program in PowerMAX without first including <sys/vnode.h>
+# the code don't compile (apparently some other operating system has
+# something completely different in its sys/mode.h)
+#
+i_sysmode='undef'
+
+# There was a bug in memcmp (which was fixed a while ago) which sometimes
+# fails to provide the correct compare status (it is data dependant). I
+# don't wnat to figure out if you are building with the correct version or
+# not, so just pretend there is no memcmp (since perl has its own handy
+# substitute).
+#
+d_memcmp='undef'
+
+# Due to problems with dynamic linking (which I also hope will be fixed soon)
+# you can't build a libperl.so, the core has to be in the static part of the
+# perl executable.
+#
+useshrplib='false'
+
+# PowerMAX OS has support for a few different kinds of filesystems. The
+# newer "xfs" filesystem does *not* report a reasonable value in the
+# 'nlinks' field of stat() info for directories (in fact, it is always 1).
+# Since xfs is the only filesystem which supports partitions bigger than
+# 2gig and you can't hardly buy a disk that small anymore, xfs is coming in
+# to greater and greater use, so we pretty much have no choice but to
+# abandon all hope that number of links will mean anything.
+#
+dont_use_nlink=define
+
+# Configure comes up with the wrong type for these for some reason. The
+# pointers shouldn't have const in them. (And it looks like I have to
+# provide netdb_hlen_type as well becuase when I predefine the others it
+# comes up empty :-).
+#
+netdb_host_type='char *'
+netdb_name_type='char *'
+netdb_hlen_type='int'
+
+# Misc other flags that might be able to change, but I know these work right.
+#
+d_suidsafe='define'
+d_isascii='define'
+d_mymalloc='undef'
+usemymalloc='n'
+ssizetype='ssize_t'
+usevfork='false'
+
diff --git a/hints/qnx.sh b/hints/qnx.sh
new file mode 100644
index 0000000000..482c8ab0e5
--- /dev/null
+++ b/hints/qnx.sh
@@ -0,0 +1,249 @@
+#----------------------------------------------------------------
+# QNX hints
+#
+# Most of the hints in this file are for QNX4, which needed
+# more help. The QNX6 hints are located toward the bottom.
+#
+# perl-5.7.3 passes all tests under QNX4.24G
+# Watcom 10.6 with Beta/970211.wcc.update.tar.F
+# socket3r.lib Nov21 1996.
+# perl-5.7.3 fails 2 known tests under QNX6.1.0
+#
+# As with many unix ports, this one depends on a few "standard"
+# unix utilities which are not necessarily standard for QNX4.
+#
+# /bin/sh This is used heavily by Configure and then by
+# perl itself. QNX4's version is fine, but Configure
+# will choke on the 16-bit version, so if you are
+# running QNX 4.22, link /bin/sh to /bin32/ksh
+# ar This is the standard unix library builder.
+# We use wlib. With Watcom 10.6, when wlib is
+# linked as "ar", it behaves like ar and all is
+# fine. Under 9.5, a cover is required. One is
+# included in ../qnx
+# nm This is used (optionally) by configure to list
+# the contents of libraries. I will generate
+# a cover function on the fly in the UU directory.
+# cpp Configure and perl need a way to invoke a C
+# preprocessor. I have created a simple cover
+# for cc which does the right thing. Without this,
+# Configure will create its own wrapper which works,
+# but it doesn't handle some of the command line arguments
+# that perl will throw at it.
+# make You really need GNU make to compile this. GNU make
+# ships by default with QNX 4.23, but you can get it
+# from quics for earlier versions.
+#----------------------------------------------------------------
+# Outstanding Issues for QNX4:
+# There is no support for dynamically linked libraries in
+# QNX4.
+#
+# If you wish to compile with the Socket extension, you need
+# to have the TCP/IP toolkit, and you need to make sure that
+# -lsocket locates the correct copy of socket3r.lib. Beware
+# that the Watcom compiler ships with a stub version of
+# socket3r.lib which has very little functionality. Also
+# beware the order in which wlink searches directories for
+# libraries. You may have /usr/lib/socket3r.lib pointing to
+# the correct library, but wlink may pick up
+# /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
+# they both point to the correct library, that is,
+# /usr/tcptk/current/usr/lib/socket3r.lib.
+#
+# ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give
+# the same results. cwd calls `fullpath -t`, so if you
+# cd `fullpath -t` before running the test, it will
+# pass.
+#
+# lib/File/Find/taint.t will complain if '.' is in your
+# PATH. The PATH test is triggered because cwd calls
+# `fullpath -t`.
+#
+# ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to
+# the fact that the functionality to read back the non-blocking
+# status of a socket is not implemented in QNX's TCP/IP. This
+# has been reported to QNX and it may work with later versions
+# of TCP/IP.
+#
+# Older issues:
+# lib/posix.t test failed on test 17 because acos(1) != 0.
+# Resolved in 970211 Beta
+# lib/io_udp.t test hangs because of a bug in getsockname().
+# Fixed in latest BETA socket3r.lib
+#----------------------------------------------------------------
+# Outstanding Issues for QNX6:
+# The following tests are still failing as of 5.7.3:
+#
+# op/sprintf.........................FAILED at test 91
+# lib/Benchmark......................FAILED at test 26
+#
+# This is due to a bug in the C library's printf routine.
+# printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
+# '0.000000e+00'. QNX has acknowledged the bug and it should be
+# fixed in 6.2.0.
+#
+#----------------------------------------------------------------
+# These hints were submitted by:
+# Norton T. Allen
+# Harvard University Atmospheric Research Project
+# allen@huarp.harvard.edu
+#
+# If you have suggestions or changes, please let me know.
+#----------------------------------------------------------------
+
+echo ""
+echo "Some tests may fail. Please read the hints/qnx.sh file."
+echo ""
+
+#----------------------------------------------------------------
+# At present, all QNX4 systems are equivalent architectures,
+# so it is reasonable to call archname=x86-qnx rather than
+# making an unnecessary distinction between AT-qnx and PCI-qnx,
+# for example. I will use uname's architecture for Neutrino.
+#----------------------------------------------------------------
+set X `uname -a`
+shift
+[ "$1" != "QNX" ] && echo "uname doesn't look like QNX!"
+case $4 in
+ 42[2-9]) archname='x86-qnx';;
+ *) osname='nto'
+ osvers=$3
+ archname="$5-nto";;
+esac
+
+if [ "$osname" = "qnx" ]; then
+ #----------------------------------------------------------------
+ # QNX doesn't come with a csh and the ports of tcsh I've used
+ # don't work reliably:
+ #----------------------------------------------------------------
+ csh=''
+ d_csh='undef'
+ full_csh=''
+
+ #----------------------------------------------------------------
+ # setuid scripts are secure under QNX.
+ # (Basically, the same race conditions apply, but assuming
+ # the scripts are located in a secure directory, the methods
+ # for exploiting the race condition are defeated because
+ # the loader expands the script name fully before executing
+ # the interpreter.)
+ #----------------------------------------------------------------
+ d_suidsafe='define'
+
+ #----------------------------------------------------------------
+ # difftime is implemented as a preprocessor macro, so it doesn't show
+ # up in the libraries:
+ #----------------------------------------------------------------
+ d_difftime='define'
+
+ #----------------------------------------------------------------
+ # strtod is in the math library, but we can't tell Configure
+ # about the math library or it will confuse the linker
+ #----------------------------------------------------------------
+ d_strtod='define'
+
+ lib_ext='3r.lib'
+ libc='/usr/lib/clib3r.lib'
+
+ #----------------------------------------------------------------
+ # ccflags:
+ # I like to turn the warnings up high, but a few common
+ # constructs make a lot of noise, so I turn those warnings off.
+ # A few still remain...
+ #
+ # unix.h is required as a general rule for unixy applications.
+ #----------------------------------------------------------------
+ ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
+
+ #----------------------------------------------------------------
+ # ldflags:
+ # If you want debugging information, you must specify -g on the
+ # link as well as the compile. If optimize != -g, you should
+ # remove this.
+ #----------------------------------------------------------------
+ ldflags="-g -N1M"
+
+ so='none'
+ selecttype='fd_set *'
+
+ #----------------------------------------------------------------
+ # Add -lunix to list of libs. This is needed mainly so the nm
+ # search will find funcs in the unix lib. Including unix.h should
+ # automatically include the library without -l.
+ #----------------------------------------------------------------
+ libswanted="$libswanted unix"
+
+ if [ -z "`which ar 2>/dev/null`" ]; then
+ cat <<-'EOF' >&4
+ I don't see an 'ar', so I'm guessing you are running
+ Watcom 9.5 or earlier. You may want to install the ar
+ cover found in the qnx subdirectory of this distribution.
+ It might reasonably be placed in /usr/local/bin.
+
+ EOF
+ fi
+ #----------------------------------------------------------------
+ # Here is a nm script which fixes up wlib's output to look
+ # something like nm's, at least enough so that Configure can
+ # use it.
+ #----------------------------------------------------------------
+ if [ -z "`which nm 2>/dev/null`" ]; then
+ cat <<-EOF
+ Creating a quick-and-dirty nm cover for Configure to use:
+
+ EOF
+ cat >./UU/nm <<-'EOF'
+ #! /bin/sh
+ #__USAGE
+ #%C <lib> [<lib> ...]
+ # Designed to mimic Unix's nm utility to list
+ # defined symbols in a library
+ unset WLIB
+ for i in $*; do wlib $i; done |
+ awk '
+ /^ / {
+ for (i = 1; i <= NF; i++) {
+ sub("_$", "", $i)
+ print "000000 T " $i
+ }
+ }'
+ EOF
+ chmod +x ./UU/nm
+ fi
+
+ cppstdin=`which cpp 2>/dev/null`
+ if [ -n "$cppstdin" ]; then
+ cat <<-EOF >&4
+ I found a cpp at $cppstdin and will assume it is a good
+ thing to use. If this proves to be false, there is a
+ thin cover for cpp in the qnx subdirectory of this
+ distribution which you could move into your path.
+ EOF
+ cpprun="$cppstdin"
+ else
+ cat <<-EOF >&4
+
+ There is a cpp cover in the qnx subdirectory of this
+ distribution which works a little better than the
+ Configure default. You may wish to copy it to
+ /usr/local/bin or some other suitable location.
+ EOF
+ fi
+else
+ # $^O eq nto
+
+ ccflags='-DDLOPEN_WONT_DO_RELATIVE_PATHS'
+
+ # Options required to get dynamic linking to work
+ lddlflags='-shared'
+ ccdlflags='-Wl,-E'
+
+ # Somewhere in the build, something tries to throw a gcc
+ # option to $cc if it knows it invokes gcc. Our cc doesn't
+ # recognize that option, so we're better off setting cc=gcc.
+ cc='gcc'
+
+ # If we use perl's malloc, it dies with an invalid sbrk.
+ # This is probably worth tracking down someday.
+ usemymalloc='false'
+fi
diff --git a/hints/rhapsody.sh b/hints/rhapsody.sh
new file mode 100644
index 0000000000..96d57f2412
--- /dev/null
+++ b/hints/rhapsody.sh
@@ -0,0 +1,77 @@
+##
+# Rhapsody (Mac OS X Server) hints
+# Wilfredo Sanchez <wsanchez@mit.edu>
+##
+
+##
+# Paths
+##
+
+# BSD paths
+case "$prefix" in
+'')
+ prefix='/usr/local'; # Built-in perl uses /usr
+ siteprefix='/usr/local';
+ vendorprefix='/usr/local'; usevendorprefix='define';
+
+ # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
+ # Don't put man pages in ${prefix}/lib; that's goofy.
+ man1dir="${prefix}/share/man/man1";
+ man3dir="${prefix}/share/man/man3";
+
+ # Where to put modules.
+ # Built-in perl uses /System/Library/Perl
+ privlib='/Local/Library/Perl';
+ sitelib='/Local/Library/Perl';
+ vendorlib='/Network/Library/Perl';
+ ;;
+esac
+
+##
+# Tool chain settings
+##
+
+# Since we can build fat, the archname doesn't need the processor type
+archname='rhapsody';
+
+# nm works.
+usenm='true';
+
+# Libc is in libsystem.
+libc='/System/Library/Frameworks/System.framework/System';
+
+# Optimize.
+optimize='-O3';
+
+# XXX Unclear why we require -pipe and -fno-common here.
+ccflags="${ccflags} -pipe -fno-common"
+
+# cpp-precomp is problematic.
+cppflags='-traditional-cpp';
+
+# Shared library extension is .dylib.
+# Bundle extension is .bundle.
+ld='cc';
+so='dylib';
+dlext='bundle';
+dlsrc='dl_dyld.xs';
+usedl='define';
+cccdlflags='';
+lddlflags="${ldflags} -bundle -undefined suppress";
+ldlibpthname='DYLD_LIBRARY_PATH';
+useshrplib='true';
+
+##
+# System libraries
+##
+
+# vfork works
+usevfork='true';
+
+# malloc works
+usemymalloc='n';
+
+# Case-insensitive filesystems don't get along with Makefile and
+# makefile in the same place. Since Darwin uses GNU make, this dodges
+# the problem.
+firstmakefile=GNUmakefile;
diff --git a/hints/sco.sh b/hints/sco.sh
new file mode 100644
index 0000000000..1d1d5c2788
--- /dev/null
+++ b/hints/sco.sh
@@ -0,0 +1,243 @@
+# sco.sh
+# Courtesy of Joel Rosi-Schwartz <j.schwartz@agonet.it>
+###############################################################
+# Additional SCO version info from
+# Peter Wolfe <wolfe@teloseng.com>
+# Fri Jul 19 14:54:25 EDT 1996
+# and again Tue Sep 29 16:37:25 EDT 1998
+# by Andy Dougherty <doughera@lafayette.edu>
+# Mostly rewritten on
+# Tue Jan 19 23:00:00 CET 1999
+# by Francois Desarmenien <desar@club-internet.fr>
+# Modified by Boyd Gerber <gerberb@zenez.com>
+# Tue Sep 21 1999
+###############################################################
+#
+# To use cc, use sh Configure
+# To use gcc, use sh Configure -Dcc=gcc
+#
+# Default on 3.2v4 is to use static link (dynamic loading unsupported).
+# Default on 3.2v5 is to use dynamic loading.
+# To use static linkink instead, use to sh Configure -Dusedl=n
+#
+# Warning: - to use dynamic loading with gcc, you need gcc 2.8.0 or later
+# ******** - to compile with older releases of gcc, use Configure -Dusedl=n
+# or it wont compile properly
+#
+###############################################################
+# NOTES:
+# -----
+#
+# I Have removed inclusion of ODBM_File for OSR5
+# because it core dumps and make tests fails.
+#
+# Support for icc compiler has been removed, because it 'breaks'
+# a lot of code :-(
+#
+# It's *always* a good idea to first make a static link to be sure to
+# have all symbols resolved with the current choice of libraries, since
+# with dynamic linking, unresolved symbols are allowed an will be detected
+# only at runtime (when you try to load the module or worse, when you call
+# the symbol)
+#
+# The best choice of compiler on OSR 5 (3.2v5.*) seems to be gcc >= 2.8.0:
+# -You cannot optimize with genuine sco cc (miniperl core dumps),
+# so Perl is faster if compiled with gcc.
+# -Even optimized for speed, gcc generated code is smaller (!!!)
+# -gcc is free
+# -I use ld to link which is distributed with the core OS distribution, so you
+# don't need to buy the developement kit, just find someone kind enough to
+# give you a binary release of gcc.
+#
+#
+
+###############################################################
+# figure out what SCO version we are. The output of uname -X is
+# something like:
+# System = SCO_SV
+# Node = xxxxx
+# Release = 3.2v5.0.0
+# KernelID = 95/08/08
+# Machine = Pentium
+# BusType = ISA
+# Serial = xxxxx
+# Users = 5-user
+# OEM# = 0
+# Origin# = 1
+# NumCPU = 1
+
+# Use /bin/uname (because GNU uname may be first in $PATH and
+# it does not support -X) to figure out what SCO version we are:
+# Matching '^Release' is broken by locale setting:
+# matching '3.2v' should be enough -- FD
+case `/bin/uname -X | egrep '3\.2v'` in
+*3.2v4.*) scorls=3 ;; # OSR 3
+*3.2v5.*) scorls=5 ;; # OSR 5
+*)
+ # Future of SCO OSR is SCO UnixWare: there should not be new OSR releases
+ echo "************************************************************" >&4
+ echo "" >&4
+ echo " sco.sh hints file only supports:" >&4
+ echo "" >&4
+ echo " - SCO Unix 3.2v4.x (OSR 3)" >&4
+ echo " - SCO Unix 3.2v5.x (OSR 5)" >&4
+ echo "" >&4
+ echo "" >&4
+ echo " For UnixWare, use svr4.sh hints instead" >&4
+ echo " For UnixWare 7.*, use svr5.sh hints instead" >&4
+ echo "" >&4
+ echo "***********************************************************" >&4
+ exit
+;;
+esac
+
+###############################################################
+# Common fixes for all compilers an releases:
+
+###############################################################
+# What is true for SCO5 is true for SCO3 too today, so let's have a single
+# symbol for both
+ccflags="-U M_XENIX -D PERL_SCO"
+
+###############################################################
+# Compilers options section:
+if test "$scorls" = "3"
+then
+ dlext=''
+ case "$cc" in
+ *gcc*) optimize='-O2' ;;
+ *) ccflags="$ccflags -W0 -quiet"
+ optimize='-O' ;;
+ esac
+else
+ ###############################################################
+ # Need this in release 5 because of changed fpu exeption rules
+ ccflags="$ccflags -D HAS_FPSETMASK"
+
+ ###############################################################
+ # In Release 5, always compile ELF objects
+ case "$cc" in
+ *gcc*)
+ ccflags="$ccflags -melf"
+ optimize='-O2'
+ ;;
+ *)
+ ccflags="$ccflags -w0 -belf"
+ optimize='-O0'
+ ;;
+ esac
+ ###############################################################
+ # Dynamic loading section:
+ #
+ # We use ld to build shared libraries as it is always available
+ # and seems to work better than GNU's one on SCO
+ #
+ # ccdlflags : must tell the linker to export all global symbols
+ # cccdlflags: must tell the compiler to generate relocatable code
+ # lddlflags : must tell the linker to output a shared library
+ #
+ # /usr/local/lib is added for convenience, since 'foreign' libraries
+ # are usually put there in sco
+ #
+ if test "$usedl" != "n"; then
+ ld='ld'
+ case "$cc" in
+ *gcc*)
+ ccdlflags='-Xlinker -Bexport -L/usr/local/lib'
+ cccdlflags='-fpic'
+ lddlflags='-G -L/usr/local/lib'
+ ;;
+ *)
+ ccdlflags='-Bexport -L/usr/local/lib'
+ cccdlflags='-Kpic'
+ lddlflags='-G -L/usr/local/lib'
+ ;;
+ esac
+
+ ###############################################################
+ # Use dynamic loading
+ usedl='define'
+ dlext='so'
+ dlsrc='dl_dlopen.xs'
+
+ ###############################################################
+ # Force to define those symbols, as they are #defines and not
+ # catched by Configure, and they are useful
+ d_dlopen='define'
+ d_dlerror='define'
+ fi
+fi
+
+
+###############################################################
+# Various hints, common to all releases, to have it work better:
+
+###############################################################
+# We need to remove libdl, as libdl.so exists, but ld complains
+# it can't find libdl.a ! Bug or feature ? :-)
+libswanted=`echo " $libswanted " | sed -e 's/ dl / /'`
+set X $libswanted
+shift
+libswanted="$*"
+
+###############################################################
+# Remove libbind because it conflicts with libsocket.
+libswanted=`echo " $libswanted " | sed -e 's/ bind / /'`
+set X $libswanted
+shift
+libswanted="$*"
+
+###############################################################
+# Try to use libintl.a since it has strcoll and strxfrm
+libswanted="intl $libswanted"
+
+###############################################################
+# Try to use libdbm.nfs.a since it has dbmclose.
+if test -f /usr/lib/libdbm.nfs.a ; then
+ libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'`
+ set X $libswanted
+ shift
+ libswanted="$*"
+fi
+
+###############################################################
+# We disable ODBM_File if OSR5 because it's mostly broken
+# but keep it for ODT3 as it seems to work.
+if test "$scorls" = "5"; then
+ i_dbm='undef'
+fi
+
+###############################################################
+# We don't want Xenix cross-development libraries
+glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'`
+xlibpth=''
+
+###############################################################
+# I have received one report that nm extraction doesn't work if you're
+# using the scocc compiler. This system had the following 'myconfig'
+# uname='xxx xxx 3.2 2 i386 '
+# cc='scocc', optimize='-O'
+# You can override this with Configure -Dusenm.
+case "$usenm" in
+'') usenm='false' ;;
+esac
+
+###############################################################
+# If you want to use nm, you'll probably have to use nm -p. The
+# following does that for you:
+nm_opt='-p'
+
+###############################################################
+# I have received one report that you can't include utime.h in
+# pp_sys.c. Uncomment the following line if that happens to you:
+# i_utime=undef
+
+###############################################################
+# Perl 5.003_05 and later try to include both <time.h> and <sys/select.h>
+# in pp_sys.c, but that fails due to a redefinition of struct timeval.
+# This will generate a WHOA THERE. Accept the default.
+i_sysselct=$undef
+
+
+###############################################################
+#END of hint file
diff --git a/hints/sco_2_3_0.sh b/hints/sco_2_3_0.sh
new file mode 100644
index 0000000000..146363ab3d
--- /dev/null
+++ b/hints/sco_2_3_0.sh
@@ -0,0 +1,2 @@
+yacc='/usr/bin/yacc -Sm25000'
+i_dirent=undef
diff --git a/hints/sco_2_3_1.sh b/hints/sco_2_3_1.sh
new file mode 100644
index 0000000000..146363ab3d
--- /dev/null
+++ b/hints/sco_2_3_1.sh
@@ -0,0 +1,2 @@
+yacc='/usr/bin/yacc -Sm25000'
+i_dirent=undef
diff --git a/hints/sco_2_3_2.sh b/hints/sco_2_3_2.sh
new file mode 100644
index 0000000000..e113a4ec65
--- /dev/null
+++ b/hints/sco_2_3_2.sh
@@ -0,0 +1,2 @@
+yacc='/usr/bin/yacc -Sm25000'
+libswanted=`echo " $libswanted "| sed 's/ x / /'`
diff --git a/hints/sco_2_3_3.sh b/hints/sco_2_3_3.sh
new file mode 100644
index 0000000000..6d398fccf2
--- /dev/null
+++ b/hints/sco_2_3_3.sh
@@ -0,0 +1,3 @@
+yacc='/usr/bin/yacc -Sm25000'
+echo "NOTE: you may have problems due to a spurious semicolon on the strerror()" >&4
+echo "macro definition in /usr/include/string.h. If so, delete the semicolon." >&4
diff --git a/hints/sco_2_3_4.sh b/hints/sco_2_3_4.sh
new file mode 100644
index 0000000000..34bcadae5f
--- /dev/null
+++ b/hints/sco_2_3_4.sh
@@ -0,0 +1,5 @@
+yacc='/usr/bin/yacc -Sm25000'
+ccflags="$ccflags -UM_I86"
+usemymalloc='y'
+echo "NOTE: you may have problems due to a spurious semicolon on the strerror()" >&4
+echo "macro definition in /usr/include/string.h. If so, delete the semicolon." >&4
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
new file mode 100644
index 0000000000..2155e4959e
--- /dev/null
+++ b/hints/solaris_2.sh
@@ -0,0 +1,603 @@
+# hints/solaris_2.sh
+# Last modified: Mon Jan 29 12:52:28 2001
+# Lupe Christoph <lupe@lupe-christoph.de>
+# Based on version by:
+# Andy Dougherty <doughera@lafayette.edu>
+# Which was based on input from lots of folks, especially
+# Dean Roehrich <roehrich@ironwood-fddi.cray.com>
+# Additional input from Alan Burlison, Jarkko Hietaniemi,
+# and Richard Soderberg.
+#
+# See README.solaris for additional information.
+#
+# For consistency with gcc, we do not adopt Sun Marketing's
+# removal of the '2.' prefix from the Solaris version number.
+# (Configure tries to detect an old fixincludes and needs
+# this information.)
+
+# If perl fails tests that involve dynamic loading of extensions, and
+# you are using gcc, be sure that you are NOT using GNU as and ld. One
+# way to do that is to invoke Configure with
+#
+# sh Configure -Dcc='gcc -B/usr/ccs/bin/'
+#
+# (Note that the trailing slash is *required*.)
+# gcc will occasionally emit warnings about "unused prefix", but
+# these ought to be harmless. See below for more details.
+
+# See man vfork.
+usevfork=${usevfork:-false}
+
+# Solaris has secure SUID scripts
+d_suidsafe=${d_suidsafe:-define}
+
+# Several people reported problems with perl's malloc, especially
+# when use64bitall is defined or when using gcc.
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg01318.html
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg00465.html
+usemymalloc=${usemymalloc:-false}
+
+# Avoid all libraries in /usr/ucblib.
+# /lib is just a symlink to /usr/lib
+set `echo $glibpth | sed -e 's@/usr/ucblib@@' -e 's@ /lib @ @'`
+glibpth="$*"
+
+# Remove unwanted libraries. -lucb contains incompatible routines.
+# -lld and -lsec don't do anything useful. -lcrypt does not
+# really provide anything we need over -lc, so we drop it, too.
+# -lmalloc can cause a problem with GNU CC & Solaris. Specifically,
+# libmalloc.a may allocate memory that is only 4 byte aligned, but
+# GNU CC on the Sparc assumes that doubles are 8 byte aligned.
+# Thanks to Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>
+set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ malloc @ @' -e 's@ ucb @ @' -e 's@ sec @ @' -e 's@ crypt @ @'`
+libswanted="$*"
+
+# Look for architecture name. We want to suggest a useful default.
+case "$archname" in
+'')
+ if test -f /usr/bin/arch; then
+ archname=`/usr/bin/arch`
+ archname="${archname}-${osname}"
+ elif test -f /usr/ucb/arch; then
+ archname=`/usr/ucb/arch`
+ archname="${archname}-${osname}"
+ fi
+ ;;
+esac
+
+cat > UU/workshoplibpth.cbu << 'EOCBU'
+# This script UU/workshoplibpth.cbu will get 'called-back'
+# by other CBUs this script creates.
+case "$workshoplibpth_done" in
+ '') if test `uname -p` = "sparc"; then
+ case "$use64bitall" in
+ "$define"|true|[yY]*)
+ # add SPARC-specific 64 bit libraries
+ loclibpth="$loclibpth /usr/lib/sparcv9"
+ if test -n "$workshoplibs"; then
+ loclibpth=`echo $loclibpth | sed -e "s% $workshoplibs%%" `
+ for lib in $workshoplibs; do
+ # Logically, it should be sparcv9.
+ # But the reality fights back, it's v9.
+ loclibpth="$loclibpth $lib/sparcv9 $lib/v9"
+ done
+ fi
+ ;;
+ *) loclibpth="$loclibpth $workshoplibs"
+ ;;
+ esac
+ else
+ loclibpth="$loclibpth $workshoplibs"
+ fi
+ workshoplibpth_done="$define"
+ ;;
+esac
+EOCBU
+
+case "$cc" in
+'') if test -f /opt/SUNWspro/bin/cc; then
+ cc=/opt/SUNWspro/bin/cc
+ cat <<EOF >&4
+
+You specified no cc but you seem to have the Workshop compiler
+($cc) installed, using that.
+If you want something else, specify that in the command line,
+e.g. Configure -Dcc=gcc
+
+EOF
+ fi
+ ;;
+esac
+
+######################################################
+# General sanity testing. See below for excerpts from the Solaris FAQ.
+#
+# From roehrich@ironwood-fddi.cray.com Wed Sep 27 12:51:46 1995
+# Date: Thu, 7 Sep 1995 16:31:40 -0500
+# From: Dean Roehrich <roehrich@ironwood-fddi.cray.com>
+# To: perl5-porters@africa.nicoh.com
+# Subject: Re: On perl5/solaris/gcc
+#
+# Here's another draft of the perl5/solaris/gcc sanity-checker.
+
+case `type ${cc:-cc}` in
+*/usr/ucb/cc*) cat <<END >&4
+
+NOTE: Some people have reported problems with /usr/ucb/cc.
+If you have difficulties, please make sure the directory
+containing your C compiler is before /usr/ucb in your PATH.
+
+END
+;;
+esac
+
+
+# Check that /dev/fd is mounted. If it is not mounted, let the
+# user know that suid scripts may not work.
+df /dev/fd 2>&1 > /dev/null
+case $? in
+0) ;;
+*)
+ cat <<END >&4
+
+NOTE: Your system does not have /dev/fd mounted. If you want to
+be able to use set-uid scripts you must ask your system administrator
+to mount /dev/fd.
+
+END
+ ;;
+esac
+
+
+# See if libucb can be found in /usr/lib. If it is, warn the user
+# that this may cause problems while building Perl extensions.
+/usr/bin/ls /usr/lib/libucb* >/dev/null 2>&1
+case $? in
+0)
+ cat <<END >&4
+
+NOTE: libucb has been found in /usr/lib. libucb should reside in
+/usr/ucblib. You may have trouble while building Perl extensions.
+
+END
+;;
+esac
+
+# Use shell built-in 'type' command instead of /usr/bin/which to
+# avoid possible csh start-up problems and also to use the same shell
+# we'll be using to Configure and make perl.
+# The path name is the last field in the output, but the type command
+# has an annoying array of possible outputs, e.g.:
+# make is hashed (/opt/gnu/bin/make)
+# cc is /usr/ucb/cc
+# foo not found
+# use a command like type make | awk '{print $NF}' | sed 's/[()]//g'
+
+# See if make(1) is GNU make(1).
+# If it is, make sure the setgid bit is not set.
+make -v > make.vers 2>&1
+if grep GNU make.vers > /dev/null 2>&1; then
+ tmp=`type make | awk '{print $NF}' | sed 's/[()]//g'`
+ case "`/usr/bin/ls -lL $tmp`" in
+ ??????s*)
+ cat <<END >&2
+
+NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id
+bit set. You must either rearrange your PATH to put /usr/ccs/bin before the
+GNU utilities or you must ask your system administrator to disable the
+set-group-id bit on GNU make.
+
+END
+ ;;
+ esac
+fi
+rm -f make.vers
+
+cat > UU/cc.cbu <<'EOCBU'
+# This script UU/cc.cbu will get 'called-back' by Configure after it
+# has prompted the user for the C compiler to use.
+
+# If the C compiler is gcc:
+# - check the fixed-includes
+# - check as(1) and ld(1), they should not be GNU
+# (GNU as and ld 2.8.1 and later are reportedly ok, however.)
+# If the C compiler is not gcc:
+# - Check if it is the Workshop/Forte compiler.
+# If it is, prepare for 64 bit and long doubles.
+# - check as(1) and ld(1), they should not be GNU
+# (GNU as and ld 2.8.1 and later are reportedly ok, however.)
+#
+# Watch out in case they have not set $cc.
+
+# Perl compiled with some combinations of GNU as and ld may not
+# be able to perform dynamic loading of extensions. If you have a
+# problem with dynamic loading, be sure that you are using the Solaris
+# /usr/ccs/bin/as and /usr/ccs/bin/ld. You can do that with
+# sh Configure -Dcc='gcc -B/usr/ccs/bin/'
+# (note the trailing slash is required).
+# Combinations that are known to work with the following hints:
+#
+# gcc-2.7.2, GNU as 2.7, GNU ld 2.7
+# egcs-1.0.3, GNU as 2.9.1 and GNU ld 2.9.1
+# --Andy Dougherty <doughera@lafayette.edu>
+# Tue Apr 13 17:19:43 EDT 1999
+
+# Get gcc to share its secrets.
+echo 'main() { return 0; }' > try.c
+ # Indent to avoid propagation to config.sh
+ verbose=`${cc:-cc} -v -o try try.c 2>&1`
+
+if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
+ #
+ # Using gcc.
+ #
+
+ # See if as(1) is GNU as(1). GNU as(1) might not work for this job.
+ if echo "$verbose" | grep ' /usr/ccs/bin/as ' >/dev/null 2>&1; then
+ :
+ else
+ cat <<END >&2
+
+NOTE: You are using GNU as(1). GNU as(1) might not build Perl. If you
+have trouble, you can use /usr/ccs/bin/as by including -B/usr/ccs/bin/
+in your ${cc:-cc} command. (Note that the trailing "/" is required.)
+
+END
+ # Apparently not needed, at least for as 2.7 and later.
+ # cc="${cc:-cc} -B/usr/ccs/bin/"
+ fi
+
+ # See if ld(1) is GNU ld(1). GNU ld(1) might not work for this job.
+ # Recompute $verbose since we may have just changed $cc.
+ verbose=`${cc:-cc} -v -o try try.c 2>&1 | grep ld 2>&1`
+
+ if echo "$verbose" | grep ' /usr/ccs/bin/ld ' >/dev/null 2>&1; then
+ # Ok, gcc directly calls the Solaris /usr/ccs/bin/ld.
+ :
+ elif echo "$verbose" | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
+ # Hmm. gcc doesn't call /usr/ccs/bin/ld directly, but it
+ # does appear to be using it eventually. egcs-1.0.3's ld
+ # wrapper does this.
+ # All Solaris versions of ld I've seen contain the magic
+ # string used in the grep.
+ :
+ else
+ # No evidence yet of /usr/ccs/bin/ld. Some versions
+ # of egcs's ld wrapper call /usr/ccs/bin/ld in turn but
+ # apparently don't reveal that unless you pass in -V.
+ # (This may all depend on local configurations too.)
+
+ # Recompute verbose with -Wl,-v to find GNU ld if present
+ verbose=`${cc:-cc} -v -Wl,-v -o try try.c 2>&1 | grep ld 2>&1`
+
+ myld=`echo $verbose| grep ld | awk '/\/ld/ {print $1}'`
+ # This assumes that gcc's output will not change, and that
+ # /full/path/to/ld will be the first word of the output.
+ # Thus myld is something like /opt/gnu/sparc-sun-solaris2.5/bin/ld
+
+ # Allow that $myld may be '', due to changes in gcc's output
+ if ${myld:-ld} -V 2>&1 |
+ grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
+ # Ok, /usr/ccs/bin/ld eventually does get called.
+ :
+ else
+ echo "Found GNU ld='$myld'" >&4
+ cat <<END >&2
+
+NOTE: You are using GNU ld(1). GNU ld(1) might not build Perl. If you
+have trouble, you can use /usr/ccs/bin/ld by including -B/usr/ccs/bin/
+in your ${cc:-cc} command. (Note that the trailing "/" is required.)
+
+I will try to use GNU ld by passing in the -Wl,-E flag, but if that
+doesn't work, you should use -B/usr/ccs/bin/ instead.
+
+END
+ ccdlflags="$ccdlflags -Wl,-E"
+ lddlflags="$lddlflags -Wl,-E -G"
+ fi
+ fi
+
+else
+ #
+ # Not using gcc.
+ #
+
+ ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //p'`"
+ case "$ccversion" in
+ *WorkShop*) ccname=workshop ;;
+ *) ccversion='' ;;
+ esac
+
+ case "$ccname" in
+ workshop)
+ cat >try.c <<EOM
+#include <sunmath.h>
+int main() { return(0); }
+EOM
+ workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|sed -n '/ -Y /s%.* -Y "P,\(.*\)".*%\1%p'|tr ':' '\n'|grep '/SUNWspro/'`
+ . ./workshoplibpth.cbu
+ ;;
+ esac
+
+ # See if as(1) is GNU as(1). GNU might not work for this job.
+ case `as --version < /dev/null 2>&1` in
+ *GNU*)
+ cat <<END >&2
+
+NOTE: You are using GNU as(1). GNU as(1) might not build Perl.
+You must arrange to use /usr/ccs/bin/as, perhaps by adding /usr/ccs/bin
+to the beginning of your PATH.
+
+END
+ ;;
+ esac
+
+ # See if ld(1) is GNU ld(1). GNU ld(1) might not work for this job.
+ # ld --version doesn't properly report itself as a GNU tool,
+ # as of ld version 2.6, so we need to be more strict. TWP 9/5/96
+ # Sun's ld always emits the "Software Generation Utilities" string.
+ if ld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
+ # Ok, ld is /usr/ccs/bin/ld.
+ :
+ else
+ cat <<END >&2
+
+NOTE: You are apparently using GNU ld(1). GNU ld(1) might not build Perl.
+You should arrange to use /usr/ccs/bin/ld, perhaps by adding /usr/ccs/bin
+to the beginning of your PATH.
+
+END
+ fi
+
+fi
+
+# as --version or ld --version might dump core.
+rm -f try try.c
+rm -f core
+
+# XXX
+EOCBU
+
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="-D_REENTRANT $ccflags"
+
+ # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7
+ case `uname -r` in
+ 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;;
+ *) sched_yield_lib="rt";
+ esac
+ set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"`
+ shift
+ libswanted="$*"
+
+ # On Solaris 2.6 x86 there is a bug with sigsetjmp() and siglongjmp()
+ # when linked with the threads library, such that whatever positive
+ # value you pass to siglongjmp(), sigsetjmp() returns 1.
+ # Thanks to Simon Parsons <S.Parsons@ftel.co.uk> for this report.
+ # Sun BugID is 4117946, "sigsetjmp always returns 1 when called by
+ # siglongjmp in a MT program". As of 19980622, there is no patch
+ # available.
+ cat >try.c <<'EOM'
+ /* Test for sig(set|long)jmp bug. */
+ #include <setjmp.h>
+
+ main()
+ {
+ sigjmp_buf env;
+ int ret;
+
+ ret = sigsetjmp(env, 1);
+ if (ret) { return ret == 2; }
+ siglongjmp(env, 2);
+ }
+EOM
+ if test "`arch`" = i86pc -a `uname -r` = 5.6 && \
+ ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then
+ d_sigsetjmp=$undef
+ cat << 'EOM' >&2
+
+You will see a *** WHOA THERE!!! *** message from Configure for
+d_sigsetjmp. Keep the recommended value. See hints/solaris_2.sh
+for more information.
+
+EOM
+ fi
+
+ # These prototypes should be visible since we using
+ # -D_REENTRANT, but that does not seem to work.
+ # It does seem to work for getnetbyaddr_r, weirdly enough,
+ # and other _r functions. (Solaris 8)
+
+ d_ctermid_r_proto="$define"
+ d_gethostbyaddr_r_proto="$define"
+ d_gethostbyname_r_proto="$define"
+ d_getnetbyname_r_proto="$define"
+ d_getprotobyname_r_proto="$define"
+ d_getprotobynumber_r_proto="$define"
+ d_getservbyname_r_proto="$define"
+ d_getservbyport_r_proto="$define"
+
+ # Ditto. (Solaris 7)
+ d_readdir_r_proto="$define"
+ d_readdir64_r_proto="$define"
+ d_tmpnam_r_proto="$define"
+ d_ttyname_r_proto="$define"
+
+ ;;
+esac
+EOCBU
+
+cat > UU/uselargefiles.cbu <<'EOCBU'
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use large files.
+case "$uselargefiles" in
+''|$define|true|[yY]*)
+
+# Keep these in the left margin.
+ccflags_uselargefiles="`getconf LFS_CFLAGS 2>/dev/null`"
+ldflags_uselargefiles="`getconf LFS_LDFLAGS 2>/dev/null`"
+libswanted_uselargefiles="`getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+
+ ccflags="$ccflags $ccflags_uselargefiles"
+ ldflags="$ldflags $ldflags_uselargefiles"
+ libswanted="$libswanted $libswanted_uselargefiles"
+ ;;
+esac
+EOCBU
+
+# This is truly a mess.
+case "$usemorebits" in
+"$define"|true|[yY]*)
+ use64bitint="$define"
+ uselongdouble="$define"
+ ;;
+esac
+
+if test `uname -p` = "sparc"; then
+ cat > UU/use64bitint.cbu <<'EOCBU'
+# This script UU/use64bitint.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use 64 bit integers.
+case "$use64bitint" in
+"$define"|true|[yY]*)
+ case "`uname -r`" in
+ 5.[0-4])
+ cat >&4 <<EOM
+Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit integers.
+You should upgrade to at least Solaris 2.5.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+# gcc-2.8.1 on Solaris 8 with -Duse64bitint fails op/pat.t test 822
+# if we compile regexec.c with -O. Turn off optimization for that one
+# file. See hints/README.hints , especially
+# =head2 Propagating variables to config.sh, method 3.
+# A. Dougherty May 24, 2002
+case "$use64bitint" in
+"$define")
+ case "${gccversion}-${optimize}" in
+ 2.8*-O*)
+ # Honor a command-line override (rather unlikely)
+ case "$regexec_cflags" in
+ '') echo "Disabling optimization on regexec.c for gcc $gccversion" >&4
+ regexec_cflags='optimize='
+ echo "regexec_cflags='optimize=\"\"'" >> config.sh
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+EOCBU
+
+ cat > UU/use64bitall.cbu <<'EOCBU'
+# This script UU/use64bitall.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to be maximally 64 bitty.
+case "$use64bitall-$use64bitall_done" in
+"$define-"|true-|[yY]*-)
+ case "`uname -r`" in
+ 5.[0-6])
+ cat >&4 <<EOM
+Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit pointers.
+You should upgrade to at least Solaris 2.7.
+EOM
+ exit 1
+ ;;
+ esac
+ libc='/usr/lib/sparcv9/libc.so'
+ if test ! -f $libc; then
+ cat >&4 <<EOM
+
+I do not see the 64-bit libc, $libc.
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ fi
+ . ./workshoplibpth.cbu
+ case "$cc -v 2>/dev/null" in
+ *gcc*)
+ echo 'main() { return 0; }' > try.c
+ case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
+ *"m64 is not supported"*)
+ cat >&4 <<EOM
+
+Full 64-bit build is not supported by this gcc configuration.
+Check http://gcc.gnu.org/ for the latest news of availability
+of gcc for 64-bit Sparc.
+
+Cannot continue, aborting.
+
+EOM
+ exit 1
+ ;;
+ esac
+ ccflags="$ccflags -mcpu=v9 -m64"
+ if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then
+ ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ fi
+ # no changes to ld flags, as (according to man ld):
+ #
+ # There is no specific option that tells ld to link 64-bit
+ # objects; the class of the first object that gets processed
+ # by ld determines whether it is to perform a 32-bit or a
+ # 64-bit link edit.
+ ;;
+ *)
+ ccflags="$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ ldflags="$ldflags `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ lddlflags="$lddlflags -G `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ ;;
+ esac
+ libscheck='case "`/usr/bin/file $xxx`" in
+*64-bit*|*SPARCV9*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+
+ use64bitall_done=yes
+ ;;
+esac
+EOCBU
+
+ # Actually, we want to run this already now, if so requested,
+ # because we need to fix up things right now.
+ case "$use64bitall" in
+ "$define"|true|[yY]*)
+ # CBUs expect to be run in UU
+ cd UU; . ./use64bitall.cbu; cd ..
+ ;;
+ esac
+fi
+
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+case "$uselongdouble" in
+"$define"|true|[yY]*)
+ if test -f /opt/SUNWspro/lib/libsunmath.so; then
+ # Unfortunately libpth has already been set and
+ # searched, so we need to add in everything manually.
+ libpth="$libpth /opt/SUNWspro/lib"
+ libs="$libs -lsunmath"
+ ldflags="$ldflags -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
+ d_sqrtl=define
+ else
+ cat >&4 <<EOM
+
+The Sun Workshop math library is not installed; therefore I do not
+know how to do long doubles, sorry. I'm disabling the use of long
+doubles.
+EOM
+ uselongdouble="$undef"
+ fi
+ ;;
+esac
+EOCBU
+
+rm -f try.c try.o try a.out
diff --git a/hints/stellar.sh b/hints/stellar.sh
new file mode 100644
index 0000000000..23e15e9091
--- /dev/null
+++ b/hints/stellar.sh
@@ -0,0 +1,2 @@
+optimize="-O0"
+ccflags="$ccflags -nw"
diff --git a/hints/sunos_4_0.sh b/hints/sunos_4_0.sh
new file mode 100644
index 0000000000..56a87bf5be
--- /dev/null
+++ b/hints/sunos_4_0.sh
@@ -0,0 +1,2 @@
+ccflags="$ccflags -DFPUTS_BOTCH"
+i_unistd=$undef
diff --git a/hints/sunos_4_1.sh b/hints/sunos_4_1.sh
new file mode 100644
index 0000000000..af0bca1398
--- /dev/null
+++ b/hints/sunos_4_1.sh
@@ -0,0 +1,84 @@
+# hints/sunos_4_1.sh
+# Last modified: Wed May 27 11:00:02 EDT 1998
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+
+case "$cc" in
+*gcc*) usevfork=false
+ # GNU as and GNU ld might not work. See the INSTALL file.
+ ;;
+*) usevfork=true ;;
+esac
+
+# Configure will issue a WHOA warning. The problem is that
+# Configure finds getzname, not tzname. If you're in the System V
+# environment, you can set d_tzname='define' since tzname[] is
+# available in the System V environment.
+d_tzname='undef'
+
+# Configure will issue a WHOA warning. The problem is that unistd.h
+# contains incorrect prototypes for some functions in the usual
+# BSD-ish environment. In particular, it has
+# extern int getgroups(/* int gidsetsize, gid_t grouplist[] */);
+# but groupslist[] ought to be of type int, not gid_t.
+# This is only really a problem for perl if the
+# user is using gcc, and not running in the SysV environment.
+# The gcc fix-includes script exposes those incorrect prototypes.
+# There may be other examples as well. Volunteers are welcome to
+# track them all down :-). In the meantime, we'll just skip unistd.h
+# for SunOS in most of the code.
+# However, see ext/POSIX/hints/sunos_4.pl for one exception.
+i_unistd='undef'
+# See util.c for another: We need _SC_OPEN_MAX, which is in
+# <unistd.h>.
+
+# fflush(NULL) will core dump on SunOS 4.1.3. In util.c we'll
+# try explicitly fflushing all open files. Unfortunately,
+# on my SunOS 4.1.3 system, sysconf(_SC_OPEN_MAX) returns
+# 64, but only 32 of those file pointers can be accessed
+# directly by _iob[i]. The remainder are off in dynamically
+# allocated memory somewhere and I don't know to automatically
+# fflush() them. -- Andy Dougherty Wed May 26 15:25:22 EDT 1999
+util_cflags='ccflags="$ccflags -DPERL_FFLUSH_ALL_FOPEN_MAX=32"'
+
+cat << 'EOM' >&4
+
+You will probably see *** WHOA THERE!!! *** messages from Configure for
+d_tzname and i_unistd. Keep the recommended values. See
+hints/sunos_4_1.sh for more information.
+EOM
+
+# The correct setting of groupstype depends on which version of the C
+# library is used. If you are in the 'System V environment'
+# (i.e. you have /usr/5bin ahead of /usr/bin in your PATH), and
+# you use Sun's cc compiler, then you'll pick up /usr/5bin/cc, which
+# links against the C library in /usr/5lib. This library has
+# groupstype='gid_t'.
+# If you are in the normal BSDish environment, then you'll pick up
+# /usr/ucb/cc, which links against the C library in /usr/lib. That
+# library has groupstype='int'.
+#
+# If you are using gcc, it links against the C library in /usr/lib
+# independent of whether or not you are in the 'System V environment'.
+# If you want to use the System V libraries, then you need to
+# manually set groupstype='gid_t' and add explicit references to
+# /usr/5lib when Configure prompts you for where to look for libraries.
+#
+# Check if user is in a bsd or system 5 type environment
+if cat -b /dev/null 2>/dev/null
+then # bsd
+ groupstype='int'
+else # sys5
+ case "$cc" in
+ *gcc*) groupstype='int';; # gcc doesn't do anything special
+ *) groupstype='gid_t';; # /usr/5bin/cc pulls in /usr/5lib/ stuff.
+ esac
+fi
+
+# If you get the message "unresolved symbol '__lib_version' " while
+# linking, your system probably has the optional 'acc' compiler (and
+# libraries) installed, but you are using the bundled 'cc' compiler with
+# the unbundled libraries. The solution is either to use 'acc' and the
+# unbundled libraries (specifically /lib/libm.a), or 'cc' and the bundled
+# library.
+#
+# Thanks to William Setzer <William_Setzer@ncsu.edu> for this info.
diff --git a/hints/super-ux.sh b/hints/super-ux.sh
new file mode 100644
index 0000000000..8f9592b893
--- /dev/null
+++ b/hints/super-ux.sh
@@ -0,0 +1,20 @@
+# Len Makin <len@hpc.CSIRO.AU>
+
+# No dynamically loaded libraries
+so='none'
+
+case "$optimize" in
+# No compile option -O
+'') optimize='-h2' ;;
+esac
+
+# size_t is 32 bits. Next version of compiler will have -hsize_t64
+# enabling size_t to be 64 bits.
+# Current cc version 4.80 allows -hsubscript64 for 64 bit array subscripts.
+ccflags="$ccflags -hxint -hmath vector -hsubscript64"
+
+case "$usemymalloc" in
+'') # The perl malloc.c SHOULD work
+ usemymalloc='y'
+ ;;
+esac
diff --git a/hints/svr4.sh b/hints/svr4.sh
new file mode 100644
index 0000000000..b3be9ac40b
--- /dev/null
+++ b/hints/svr4.sh
@@ -0,0 +1,163 @@
+# svr4 hints, System V Release 4.x
+# Last modified 1996/10/25 by Tye McQueen, tye@metronet.com
+# Merged 1998/04/23 with perl5.004_04 distribution by
+# Andy Dougherty <doughera@lafayette.edu>
+
+# Use Configure -Dcc=gcc to use gcc.
+case "$cc" in
+'') cc='/bin/cc'
+ test -f $cc || cc='/usr/ccs/bin/cc'
+ ;;
+esac
+
+# We include support for using libraries in /usr/ucblib, but the setting
+# of libswanted excludes some libraries found there. If you run into
+# problems, you may have to remove "ucb" from libswanted. Just delete
+# the comment '#' from the sed command below.
+ldflags='-L/usr/ccs/lib -L/usr/ucblib'
+ccflags='-I/usr/include -I/usr/ucbinclude'
+# Don't use problematic libraries:
+libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
+# libmalloc.a - Probably using Perl's malloc() anyway.
+# libucb.a - Remove it if you have problems ld'ing. We include it because
+# it is needed for ODBM_File and NDBM_File extensions.
+
+if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library:
+ gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert().
+ # Use the "native" counterparts, not the BSD emulation stuff:
+ d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef'
+ d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
+ d_setlinebuf='undef'
+ # d_setregid='undef' d_setreuid='undef' # ???
+fi
+
+# UnixWare has /usr/lib/libc.so.1, /usr/lib/libc.so.1.1, and
+# /usr/ccs/lib/libc.so. Configure chooses libc.so.1.1 while it
+# appears that /usr/ccs/lib/libc.so contains more symbols:
+#
+# Try the following if you want to use nm-extraction. We'll just
+# skip the nm-extraction phase, since searching for all the different
+# library versions will be hard to keep up-to-date.
+#
+# if [ "" = "$libc" -a -f /usr/ccs/lib/libc.so -a \
+# -f /usr/lib/libc.so.1 -a -f /usr/lib/libc.so.1.1 ]; then
+# if nm -h /usr/ccs/lib/libc.so | egrep '\<_?select$' >/dev/null; then
+# if nm -h /usr/lib/libc.so.1 | egrep '\<_?select$'` >/dev/null ||
+# nm -h /usr/lib/libc.so.1.1 | egrep '\<_?select$'` >/dev/null; then
+# :
+# else
+# libc=/usr/ccs/lib/libc.so
+# fi
+# fi
+# fi
+#
+# Don't bother with nm. Just compile & link a small C program.
+case "$usenm" in
+'') usenm=false;;
+esac
+
+# Broken C-Shell tests (Thanks to Tye McQueen):
+# The OS-specific checks may be obsoleted by the this generic test.
+ sh_cnt=`sh -c 'echo /*' | wc -c`
+ csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c`
+ csh_cnt=`expr 1 + $csh_cnt`
+if [ "$sh_cnt" -ne "$csh_cnt" ]; then
+ echo "You're csh has a broken 'glob', disabling..." >&2
+ d_csh='undef'
+fi
+
+# Unixware-specific problems. The undocumented -X argument to uname
+# is probably a reasonable way of detecting UnixWare.
+# UnixWare has a broken csh. (This might already be detected above).
+# In Unixware 2.1.1 the fields in FILE* got renamed!
+# Unixware 1.1 can't cast large floats to 32-bit ints.
+# Configure can't detect memcpy or memset on Unixware 2 or 7
+#
+# Leave leading tabs on the next two lines so Configure doesn't
+# propagate these variables to config.sh
+ uw_ver=`uname -v`
+ uw_isuw=`uname -X 2>&1 | grep Release`
+
+if [ "$uw_isuw" = "Release = 4.2" ]; then
+ case $uw_ver in
+ 1.1)
+ d_casti32='undef'
+ ;;
+ esac
+fi
+if [ "$uw_isuw" = "Release = 4.2MP" ]; then
+ case $uw_ver in
+ 2.1)
+ d_csh='undef'
+ d_memcpy='define'
+ d_memset='define'
+ ;;
+ 2.1.*)
+ d_csh='undef'
+ d_memcpy='define'
+ d_memset='define'
+ stdio_cnt='((fp)->__cnt)'
+ d_stdio_cnt_lval='define'
+ stdio_ptr='((fp)->__ptr)'
+ d_stdio_ptr_lval='define'
+ ;;
+ esac
+fi
+if [ "$uw_isuw" = "Release = 5" ]; then
+ case $uw_ver in
+ 7)
+ d_csh='undef'
+ d_memcpy='define'
+ d_memset='define'
+ stdio_cnt='((fp)->__cnt)'
+ d_stdio_cnt_lval='define'
+ stdio_ptr='((fp)->__ptr)'
+ d_stdio_ptr_lval='define'
+ ;;
+ esac
+fi
+# End of Unixware-specific tests.
+
+# DDE SMES Supermax Enterprise Server
+case "`uname -sm`" in
+"UNIX_SV SMES")
+ # the *grent functions are in libgen.
+ libswanted="$libswanted gen"
+ # csh is broken (also) in SMES
+ # This may already be detected by the generic test above.
+ d_csh='undef'
+ case "$cc" in
+ *gcc*) ;;
+ *) # for cc we need -K PIC (not -K pic)
+ cccdlflags="$cccdlflags -K PIC"
+ ;;
+ esac
+ ;;
+esac
+
+# NCR MP-RAS. Thanks to Doug Hendricks for this info.
+# The output of uname -a looks like this
+# foo foo 4.0 3.0 3441 Pentium III(TM)-ISA/PCI
+# Similar errors reported for
+# foo foo 4.0 3.0 4400 pentium ii(tm)-isapci '
+
+# Configure sets osname=svr4.0, osvers=3.0, archname='3441-svr4.0'
+case "$myuname" in
+*3441*|*4400*isapci)
+ # With the NCR High Performance C Compiler R3.0c, miniperl fails
+ # t/op/regexp.t test 461 unless we compile with optimizie=-g.
+ # The whole O/S is being phased out, so more detailed probing
+ # is probably not warranted.
+ case "$optimize" in
+ '') optimize='-g' ;;
+ esac
+ ;;
+esac
+
+# Configure may fail to find lstat() since it's a static/inline function
+# in <sys/stat.h> on Unisys U6000 SVR4, UnixWare 2.x, and possibly other
+# SVR4 derivatives. (Though UnixWare has it in /usr/ccs/lib/libc.so.)
+d_lstat=define
+
+d_suidsafe='define' # "./Configure -d" can't figure this out easilly
+
diff --git a/hints/svr5.sh b/hints/svr5.sh
new file mode 100644
index 0000000000..47f7aff2c1
--- /dev/null
+++ b/hints/svr5.sh
@@ -0,0 +1,226 @@
+# svr5 hints, System V Release 5.x (UnixWare 7)
+# mods after mail fm Andy Dougherty
+# Reworked by hops@sco.com Sept/Oct 1999 for UW7.1 platform support
+# Boyd Gerber, gerberb@zenez.com 1999/09/21 for threads support.
+# Originally taken from svr4 hints.sh 21-Sep-98 hops@sco.com
+# which was version of 1996/10/25 by Tye McQueen, tye@metronet.com
+
+# Use Configure -Dusethreads to enable threads.
+# Use Configure -Dcc=gcc to use gcc.
+case "$cc" in
+*gcc*)
+ # "$gccversion" not set yet
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case $gccversion in
+ *2.95*)
+ ccflags='-fno-strict-aliasing'
+ # More optimisation provided in gcc-2.95 causes miniperl to segv.
+ # -fno-strict-aliasing is supposed to correct this but
+ # if it doesn't and you get segv when the build runs miniperl then
+ # disable optimisation as below
+ # optimize=' '
+ ;;
+ esac
+ ;;
+esac
+
+# Hardwire the processor to 586 for consistancy with autoconf
+# archname='i586-svr5'
+# -- seems this is generally disliked by perl porters so leave it to float
+
+# Our default setup excludes anything from /usr/ucblib (and consequently dbm)
+# as later modules assume symbols found are available in shared libs
+# On svr5 these are static archives which causes problems for
+# dynamic modules loaded later (and ucblib is a bad dream anyway)
+#
+# However there is a dbm library built from the ucb sources outside ucblib
+# at http://www.sco.com/skunkware (installing into /usr/local) so if we
+# detect this we'll use it. You can change the default
+# (to allow ucblib and its dbm or disallowing non ucb dbm) by
+# changing 'want_*' config values below to '' to disable or otherwise to enable
+
+# Leave leading tabs so Configure doesn't propagate variables to config.sh
+
+ want_ucb='' # don't use anything from /usr/ucblib - icky
+ want_dbm='yes' # use dbm if can find library in /usr/local/lib
+ want_gdbm='yes' # use gdbm if can find library in /usr/local/lib
+ want_udk70='' # link with old static libc pieces
+ # link with udk70 if building on 7.1 abd want resulting binary
+ # to run on uw7.0* - it will link in referenced static symbols
+ # of libc that are (now) in the shared libc.so on 7.1 but were
+ # not there in 7.0.
+ # There are still scenarios where this is still insufficient so
+ # overall it is preferable to get ptf7051e
+ # ftp://ftp.sco.com/SLS/ptf7051e.Z
+ # installed on any/all 7.0 systems and leave the above unset.
+
+if [ "$want_ucb" ] ; then
+ ldflags= '-L/usr/ucblib'
+ ccflags='-I/usr/ucbinclude'
+ # /usr/ccs/include and /usr/ccs/lib are used implicitly by cc as reqd
+else
+ libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'`
+ glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'`
+
+ # If see libdbm in /usr/local and not overidden assume its the
+ # non ucblib rebuild from skunkware and use it
+ if [ ! -f /usr/local/lib/libdbm.so -o ! "$want_dbm" ] ; then
+ i_dbm='undef'
+ libswanted=`echo " $libswanted " | sed -e 's/ dbm / /'`
+ fi
+fi
+
+if [ ! "$want_gdbm" ] ; then
+ i_gdbm='undef'
+ libswanted=`echo " $libswanted " | sed -e 's/ gdbm / /'`
+fi
+
+
+# Don't use problematic libraries:
+# libmalloc.a - Probably using Perl's malloc() anyway.
+# libc: on UW7 don't want -lc explicitly as native cc gives warnings/errors
+libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' -e 's/ c / /'`
+
+# remove /shlib and /lib from library search path as both symlink to /usr/lib
+# where runtime shared libc is
+glibpth=`echo " $glibpth " | sed -e 's/ \/shlib / /' -e 's/ \/lib / /'`
+
+# Don't use BSD emulation pieces (/usr/ucblib) regardless
+# these would probably be autonondetected anyway but ...
+gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert().
+d_bcopy='undef' d_bcmp='undef' d_bzero='undef' d_safebcpy='undef'
+d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
+d_setlinebuf='undef'
+d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1
+
+
+# Broken C-Shell tests (Thanks to Tye McQueen):
+# The OS-specific checks may be obsoleted by the this generic test.
+ sh_cnt=`sh -c 'echo /*' | wc -c`
+ csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c`
+ csh_cnt=`expr 1 + $csh_cnt`
+if [ "$sh_cnt" -ne "$csh_cnt" ]; then
+ echo "You're csh has a broken 'glob', disabling..." >&2
+ d_csh='undef'
+fi
+
+# Unixware-specific problems. UW7 give correctname with uname -s
+# UnixWare has a broken csh. (This might already be detected above).
+# Configure can't detect memcpy or memset on Unixware 2 or 7
+#
+# Leave leading tabs on the next two lines so Configure doesn't
+# propagate these variables to config.sh
+ uw_ver=`uname -v`
+ uw_isuw=`uname -s 2>&1`
+
+if [ "$uw_isuw" = "UnixWare" ]; then
+ case $uw_ver in
+ 7.1*)
+ d_csh='undef'
+ d_memcpy='define'
+ d_memset='define'
+ stdio_cnt='((fp)->__cnt)'
+ d_stdio_cnt_lval='define'
+ stdio_ptr='((fp)->__ptr)'
+ d_stdio_ptr_lval='define'
+
+ d_bcopy='define' # In /usr/lib/libc.so.1
+ d_setregid='define' # "
+ d_setreuid='define' # "
+
+ if [ -f /usr/ccs/lib/libcudk70.a -a "$want_udk70" ] ; then
+ libswanted=" $libswanted cudk70"
+ fi
+ ;;
+ 7*)
+ d_csh='undef'
+ d_memcpy='define'
+ d_memset='define'
+ stdio_cnt='((fp)->__cnt)'
+ d_stdio_cnt_lval='define'
+ stdio_ptr='((fp)->__ptr)'
+ d_stdio_ptr_lval='define'
+ ;;
+ esac
+fi
+# End of Unixware-specific tests.
+
+###############################################################
+# Dynamic loading section: Is default so it should just happen.
+# set below to explicitly force.
+# usedl='define'
+# dlext='so'
+# dlsrc='dl_dlopen.xs'
+#
+# ccdlflags : must tell the linker to export all global symbols
+# cccdlflags: must tell the compiler to generate relocatable code
+# lddlflags : must tell the linker to output a shared library
+
+# use shared perl lib if the user doesn't choose otherwise
+if test "x$useshrplib" = "x"; then
+ useshrplib='true'
+fi
+
+case "$cc" in
+ *gcc*)
+ ccdlflags='-Xlinker -Bexport '
+ cccdlflags='-fpic'
+ lddlflags='-G '
+ ;;
+
+ *)
+ ccdlflags='-Wl,-Bexport'
+ cccdlflags='-Kpic'
+ lddlflags='-G -Wl,-Bexport'
+ ;;
+esac
+
+############################################################################
+# Thread support
+# use Configure -Dusethreads to enable
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="$ccflags"
+ shift
+ libswanted="$*"
+ case "$cc" in
+ *gcc*)
+ ccflags="-D_REENTRANT $ccflags -fpic -pthread"
+ cccdlflags='-fpic'
+ lddlflags='-pthread -G '
+ ;;
+ *)
+ ccflags="-D_REENTRANT $ccflags -KPIC -Kthread"
+ ccdlflags='-Kthread -Wl,-Bexport'
+ cccdlflags='-KPIC -Kthread'
+ lddlflags='-G -Kthread -Wl,-Bexport '
+ ldflags='-Kthread'
+ ;;
+ esac
+esac
+EOCBU
+
+
+d_suidsafe='define' # "./Configure -d" can't figure this out easily
+
+################## final caveat msgs to builder ###############
+cat <<'EOM' >&4
+
+If you wish to use dynamic linking, you must use
+ LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH
+or
+ setenv LD_LIBRARY_PATH `pwd`
+before running make.
+
+If you are using shared libraries from /usr/local/lib
+for libdbm or libgdbm you may need to set
+ LD_RUN_PATH=/usr/local/lib; export LD_RUN_PATH
+in order for Configure to compile the simple test program
+
+EOM
diff --git a/hints/t001.c b/hints/t001.c
new file mode 100644
index 0000000000..51fdefda84
--- /dev/null
+++ b/hints/t001.c
@@ -0,0 +1,90 @@
+/* Beginning of modification history */
+/* Written 02-04-10 by Paul Green (Paul.Green@stratus.com) */
+/* End of modification history */
+
+/* This test case is extracted from Perl version 5.7.3. It is
+ in the Perl_unpack_str function of the pp_pack.c source file.
+
+ GCC 2.95.2 improperly assumes that it can compensate for an
+ extra fsub by performing a fadd. This would work in
+ fixed-point arithmetic, but does not work in floating-point
+ arithmetic.
+
+ This problem has been seen on HP-UX and on Stratus VOS, both
+ of which have an HP PA-RISC target (hppa1.1). The Stratus
+ bug number is gnu_g++-220. */
+
+/* #define _POSIX_C_SOURCE 199506L -- added by Configure */
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+void test(double *result)
+{
+ float afloat;
+ double adouble;
+ int checksum = 0;
+ unsigned cuv = 0;
+ double cdouble = 0.0;
+ const int bits_in_uv = 8 * sizeof(cuv);
+
+ checksum = 53;
+ cdouble = -1.0;
+
+ if (checksum) {
+ if (checksum > bits_in_uv) {
+ double trouble;
+
+ adouble = (double) (1 << (checksum & 15));
+
+ while (checksum >= 16) {
+ checksum -= 16;
+ adouble *= 65536.0;
+ }
+
+ /* At -O1, GCC 2.95.2 compiles the following loop
+ into:
+
+ L$0014
+ fcmp,dbl,>= %fr4,%fr0
+ ftest
+ b L$0014
+ fadd,dbl %fr4,%fr12,%fr4
+ fsub,dbl %fr4,%fr12,%fr4
+
+ This code depends on the floading-add and
+ floating-subtract retaining all of the
+ precision present in the operands. There is
+ no such guarantee when using floating-point,
+ as this test case demonstrates.
+
+ The code is okay at -O0. */
+
+ while (cdouble < 0.0)
+ cdouble += adouble;
+
+ cdouble = modf (cdouble / adouble, &trouble) * adouble;
+ }
+ }
+
+ *result = cdouble;
+}
+
+int main (int argc, char ** argv)
+{
+double value;
+
+ test (&value);
+
+ if (argc == 2 && !strcmp(argv[1],"-v"))
+ printf ("value = %.18e\n", value);
+
+ if (value != 9.007199254740991e+15) {
+ printf ("t001 fails!\n");
+ return -1;
+ }
+ else {
+ printf ("t001 works.\n");
+ return 0;
+ }
+}
diff --git a/hints/ti1500.sh b/hints/ti1500.sh
new file mode 100644
index 0000000000..69482d8680
--- /dev/null
+++ b/hints/ti1500.sh
@@ -0,0 +1 @@
+usemymalloc='n'
diff --git a/hints/titanos.sh b/hints/titanos.sh
new file mode 100644
index 0000000000..88a3e7a963
--- /dev/null
+++ b/hints/titanos.sh
@@ -0,0 +1,38 @@
+# Hints file (perl 4.019) for Kubota Pacific's Titan 3000 Series Machines.
+# Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991
+# p5ed by: Jarkko Hietaniemi <jhi@iki.fi> Aug 27 1994
+# NOTE: You should run Configure with tcsh (yes, tcsh).
+# Comments by Andy Dougherty <doughera@lafcol.lafayette.edu> 28 Mar 1995
+alignbytes="8"
+byteorder="4321"
+castflags='0'
+gidtype='ushort'
+groupstype='unsigned short'
+intsize='4'
+usenm='true'
+nm_opt='-eh'
+malloctype='void *'
+ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
+cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C"
+stdchar='unsigned char'
+#
+# Apparently there are some harmful libs in Configure's $libswanted.
+# Perl5.000 had: libs='-lnsl -ldbm -lPW -lmalloc -lm'
+# Unfortunately, this line prevents users from including things like
+# -lgdbm and -ldb, which they may or may not have or want.
+# We should probably fiddle with libswanted instead of libs.
+# And even there, we should only bother to delete harmful libraries.
+# However, I don't know what they are or why they should be deleted,
+# so this will have to do for now. --AD 28 Mar 1995
+libswanted='sfio nsl dbm gdbm db PW malloc m'
+#
+# Extensions: This system can not compile POSIX. We'll let Configure
+# figure out the others.
+useposix='n'
+#
+uidtype='ushort'
+voidflags='7'
+inclwanted='/usr/include /usr/include/net'
+# Setting libpth shouldn't be needed any more.
+# libpth='/usr/lib /usr/local/lib /lib'
+pth='. /bin /usr/bin /usr/ucb /usr/local/bin /usr/X11/bin /usr/lbin /etc /usr/lib'
diff --git a/hints/ultrix_4.sh b/hints/ultrix_4.sh
new file mode 100644
index 0000000000..aac5ce38f6
--- /dev/null
+++ b/hints/ultrix_4.sh
@@ -0,0 +1,70 @@
+# hints/ultrix_4.sh
+# Last updated by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Fri Feb 10 10:04:51 EST 1995
+#
+# Use Configure -Dcc=gcc to use gcc.
+#
+# This used to use -g, but that pulls in -DDEBUGGING by default.
+case "$optimize" in
+'')
+ # recent versions have a working compiler.
+ case "$osvers" in
+ *4.[45]*) optimize='-O2' ;;
+ *) optimize='none' ;;
+ esac
+ ;;
+esac
+
+# Some users have reported Configure runs *much* faster if you
+# replace all occurrences of /bin/sh by /bin/sh5
+# Something like:
+# sed 's!/bin/sh!/bin/sh5!g' Configure > Configure.sh5
+# Then run "sh5 Configure.sh5 [your options]"
+
+case "$myuname" in
+*risc*) cat <<EOF >&4
+Note that there is a bug in some versions of NFS on the DECStation that
+may cause utime() to work incorrectly. If so, regression test io/fs
+may fail if run under NFS. Ignore the failure.
+EOF
+esac
+
+# Compiler flags that depend on osversion:
+case "$cc" in
+*gcc*) ;;
+*)
+ case "$osvers" in
+ *4.1*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3800" ;;
+ *4.2*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3800"
+ # Prototypes sometimes cause compilation errors in 4.2.
+ prototype=undef
+ case "$myuname" in
+ *risc*) d_volatile=undef ;;
+ esac
+ ;;
+ *4.3*) ccflags="$ccflags -std1 -DLANGUAGE_C -Olimit 3800" ;;
+ *) ccflags="$ccflags -std -Olimit 3800" ;;
+ esac
+ ;;
+esac
+
+# Other settings that depend on $osvers:
+case "$osvers" in
+*4.1*) ;;
+*4.2*) libswanted=`echo $libswanted | sed 's/ malloc / /'` ;;
+*4.3*) ;;
+*) ranlib='ranlib' ;;
+esac
+
+# Settings that don't depend on $osvers:
+
+util_cflags='ccflags="$ccflags -DLOCALE_ENVIRON_REQUIRED"'
+groupstype='int'
+# This will cause a WHOA THERE warning, but it's accurate. The
+# configure test should be beefed up to try using the field when
+# it can't find any of the standardly-named fields.
+d_dirnamlen='define'
+
+# Ultrix can mmap only character devices, not regular files,
+# which is rather useless state of things for Perl.
+d_mmap='undef'
diff --git a/hints/umips.sh b/hints/umips.sh
new file mode 100644
index 0000000000..17d5ff4623
--- /dev/null
+++ b/hints/umips.sh
@@ -0,0 +1,39 @@
+# hints/umips.sh
+#
+# Mips R3030 / Bruker AspectSation running RISC/os (UMIPS) 4.52
+# compiling with gcc 2.7.2
+#
+# Created Sat Aug 17 00:17:15 MET DST 1996
+# by Guenter Schmidt <gsc@bruker.de>
+#
+# uname -a output looks like this:
+# xxx xxx 4_52 umips mips
+
+# Speculative notes on getting cc to work added by
+# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Tue Aug 20 21:51:49 EDT 1996
+
+# Recommend the GNU C Compiler
+case "$cc" in
+'') echo 'gcc 2.7.2 (or later) is recommended. Use Configure -Dcc=gcc' >&4
+ # The test with the native compiler not succeed:
+ # `sh cflags libperl.a miniperlmain.o` miniperlmain.c
+ # CCCMD = cc -c -I/usr/local/include -I/usr/include/bsd -DLANGUAGE_C -O
+ # ccom: Error: ./mg.h, line 12: redeclaration of formal parameter, sv
+ # int (*svt_set) (SV *sv, MAGIC* mg);
+ # ------------------------------------------^
+ # ccom: Error: ./mg.h, line 12: redeclaration of formal parameter, mg
+ # This is probably a result of incomplete prototype support.
+ prototype=undef
+ ;;
+esac
+
+# POSIX support in RiscOS is not useable
+useposix='false'
+
+# Will give WHOA message, but the prototype are defined in the GCC inc dirs
+case "$cc" in
+*gcc*) d_shmatprototype='define' ;;
+esac
+
+glibpth="$glibpth /usr/lib/cmplrs/cc"
diff --git a/hints/unicos.sh b/hints/unicos.sh
new file mode 100644
index 0000000000..2af5f283ed
--- /dev/null
+++ b/hints/unicos.sh
@@ -0,0 +1,54 @@
+case `uname -r` in
+6.1*) shellflags="-m+65536" ;;
+esac
+case "$optimize" in
+# If we used fastmd (the default) integer values would be limited to 46 bits.
+# --Mark P. Lutz
+'') optimize="$optimize -h nofastmd" ;;
+esac
+# The default is to die in runtime on math overflows.
+# Let's not do that. --jhi
+ccflags="$ccflags -h matherror=errno"
+
+# Cray floating point (cfp) CPUs need -h rounddiv
+# (It gives int((2/3)*3) a chance to be 2, not 1. --jhi)
+# (but IEEE CPUs, IEEE/ieee/CPE1 CPUs should not have -h rounddiv,
+# since the compiler on those CPUs doesn't even support the option.)
+if /etc/cpu -i | grep -q cfp
+then
+ ccflags="$ccflags -h rounddiv"
+fi
+
+# Avoid an optimizer bug where a volatile variables
+# isn't correctly saved and restored --Mark P. Lutz
+pp_ctl_cflags='ccflags="$ccflags -h scalar0 -h vector0"'
+# Otherwise the unpack %65c checksums will fail.
+pp_pack_cflags='optimize="$ccflags -h scalar0 -h vector0"'
+case "$usemymalloc" in
+'') # The perl malloc.c SHOULD work says Ilya.
+ # But for the time being (5.004_68), alas, it doesn't. --jhi
+ # usemymalloc='y'
+ # ccflags="$ccflags -DNO_RCHECK"
+ usemymalloc='n'
+ ;;
+esac
+# Configure gets fooled for some reason, these do not exist.
+d_getpgid='undef'
+d_setitimer='undef'
+# These exist but do not really work.
+d_setregid='undef'
+d_setreuid='undef'
+# No shared libraries.
+so='none'
+# Threads call-back unit.
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
diff --git a/hints/unicosmk.sh b/hints/unicosmk.sh
new file mode 100644
index 0000000000..6045fcfac9
--- /dev/null
+++ b/hints/unicosmk.sh
@@ -0,0 +1,46 @@
+case "$optimize" in
+'') optimize="-O1" ;;
+esac
+d_setregid='undef'
+d_setreuid='undef'
+case "$usemymalloc" in
+'') usemymalloc='y'
+ ccflags="$ccflags -DNO_RCHECK"
+ ;;
+esac
+# If somebody ignores the Cray PATH.
+case ":$PATH:" in
+*:/opt/ctl/bin:*) ;;
+'') case "$cc" in
+ '') test -x /opt/ctl/bin/cc && cc=/opt/ctl/bin/cc ;;
+ esac
+ ;;
+esac
+# As of UNICOS/mk 2.0.5.24 the shm* are in libc but unimplemented
+# (an attempt to use them causes a runtime error)
+# XXX Configure probe for really functional shm*() is needed XXX
+if test "$d_shm" = ""; then
+ d_shmat=${d_shmat:-undef}
+ d_shmdt=${d_shmdt:-undef}
+ d_shmget=${d_shmget:-undef}
+ d_shmctl=${d_shmctl:-undef}
+ case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in
+ *"undef"*) d_shm="$undef" ;;
+ esac
+fi
+# Otherwise the unpack %65c checksums will fail.
+pp_pack_cflags='optimize="-h scalar0 -h vector0"'
+# No shared libraries.
+so='none'
+# Threads call-back unit.
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
diff --git a/hints/unisysdynix.sh b/hints/unisysdynix.sh
new file mode 100644
index 0000000000..4251ba8d47
--- /dev/null
+++ b/hints/unisysdynix.sh
@@ -0,0 +1 @@
+d_waitpid=undef
diff --git a/hints/utekv.sh b/hints/utekv.sh
new file mode 100644
index 0000000000..95a31fdedf
--- /dev/null
+++ b/hints/utekv.sh
@@ -0,0 +1,12 @@
+# XD88/10 UTekV hints by Kaveh Ghazi (ghazi@caip.rutgers.edu) 2/11/92
+# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu> 4 Oct. 1994
+
+# The -X18 is only if you are using the Greenhills compiler.
+ccflags="$ccflags -X18"
+
+usemymalloc='y'
+
+echo " " >&4
+echo "NOTE: You may have to take out makefile dependencies on the files in" >&4
+echo "/usr/include (i.e. /usr/include/ctype.h) or the make will fail. A" >&4
+echo "simple 'grep -v /usr/include/ makefile' should suffice." >&4
diff --git a/hints/uts.sh b/hints/uts.sh
new file mode 100644
index 0000000000..eb0d78ce11
--- /dev/null
+++ b/hints/uts.sh
@@ -0,0 +1,32 @@
+archname='s390'
+archobjs='uts/strtol_wrap.o uts/sprintf_wrap.o'
+cc='cc -Xa'
+ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32 -DSPRINTF_E_BUG'
+cccdlflags='-pic'
+d_bincompat3='undef'
+d_csh='undef'
+d_lstat='define'
+d_suidsafe='define'
+dlsrc='dl_dlopen.xs'
+i_ieeefp='undef'
+ld='ld'
+lddlflags='-G -z text'
+libperl='libperl.so'
+libpth='/lib /usr/lib /usr/ccs/lib'
+libs='-lsocket -lnsl -ldl -lm'
+libswanted='m'
+prefix='/usr/local'
+toke_cflags='optimize=""'
+useshrplib='define'
+
+#################################
+# Some less routine stuff:
+#################################
+cc -g -Xa -c -pic -O uts/strtol_wrap.c -o uts/strtol_wrap.o
+cc -g -Xa -c -pic -O uts/sprintf_wrap.c -o uts/sprintf_wrap.o
+# Make POSIX a static extension.
+cat <<'EOSH' > config.over
+static_ext='POSIX B'
+dynamic_ext=`echo " $dynamic_ext " |
+ sed -e 's/ POSIX / /' -e 's/ B / /'`
+EOSH
diff --git a/hints/uwin.sh b/hints/uwin.sh
new file mode 100644
index 0000000000..c05d9eb8dc
--- /dev/null
+++ b/hints/uwin.sh
@@ -0,0 +1,36 @@
+#
+# hint file for U/WIN (UNIX for Windows 95/NT)
+#
+# created for U/WIN version 1.55
+# running under Windows NT 4.0 SP 3
+# using MSVC++ 5.0 for the compiler
+#
+# created by Joe Buehler (jbuehler@hekimian.com)
+#
+# for information about U/WIN see www.gtlinc.com
+#
+
+#ccflags=-D_BSDCOMPAT
+# confusion in Configure over preprocessor
+cppstdin=`pwd`/cppstdin
+cpprun=`pwd`/cppstdin
+# pwd.h confuses Configure
+d_pwcomment=undef
+d_pwgecos=define
+# work around case-insensitive file names
+firstmakefile=GNUmakefile
+# avoid compilation error
+i_utime=undef
+# compile/link flags
+ldflags=-g
+optimize=-g
+static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize attrs re"
+#static_ext=none
+# dynamic loading needs work
+usedl=undef
+# perl malloc will not work
+usemymalloc=n
+# cannot use nm
+usenm=undef
+# vfork() is buggy (as of 1.55 anyway)
+usevfork=false
diff --git a/hints/vmesa.sh b/hints/vmesa.sh
new file mode 100644
index 0000000000..5fad22bf8b
--- /dev/null
+++ b/hints/vmesa.sh
@@ -0,0 +1,336 @@
+# hints/vmesa.sh
+#
+# VM/ESA hints by Neale Ferguson (neale@mailbox.tabnsw.com.au)
+#
+# Currently (1999-Jan-09) Configure cannot be used in VM/ESA because
+# too many things are done differently in the C compiler environment.
+# Therefore the hints file is hand-crafted. --jhi@iki.fi
+#
+
+case "$archname" in
+'') archname="$osname" ;;
+esac
+bin='/usr/local/bin'
+binexp='/usr/local/bin'
+byacc='byacc'
+c='\c'
+cc='c89'
+ccflags="-D_OE_SOCKETS -DOLD_PTHREADS_API -DYYDYNAMIC -DDEBUGGING -I.." \
+ "-I/usr/local/include -W c,hwopts\\\(string\\\),langlvl\\\(ansi\\\)"
+clocktype='clock_t'
+cryptlib="n"
+d_Gconvert='gcvt((x),(n),(b))'
+d_access='define'
+d_alarm='define'
+d_archlib='define'
+# randbits='15'
+archobjs="vmesa.o"
+d_attribut='undef'
+d_bcmp='define'
+d_bcopy='define'
+d_bsd='undef'
+d_bsdgetpgrp='undef'
+d_bsdsetpgrp='undef'
+d_bzero='define'
+d_casti32='define'
+d_castneg='define'
+d_charvspr='undef'
+d_chown='define'
+d_chroot='undef'
+d_chsize='undef'
+d_closedir='define'
+d_const='define'
+d_crypt='undef'
+d_csh='undef'
+d_cuserid='define'
+d_dbl_dig='define'
+d_difftime='define'
+d_dirnamlen='undef'
+d_dlerror='define'
+d_dlopen='define'
+d_dlsymun='define'
+d_dosuid='undef'
+d_dup2='define'
+d_endgrent='undef'
+d_endpwent='undef'
+d_eofnblk='define'
+d_eunice='undef'
+d_fchmod='define'
+d_fchown='define'
+d_fcntl='define'
+d_fd_macros='define'
+d_fd_set='define'
+d_fds_bits='define'
+d_fgetpos='define'
+d_flexfnam='define'
+d_flock='undef'
+d_fork='undef'
+d_fpathconf='define'
+d_fsetpos='define'
+d_ftime='undef'
+d_getgrent='undef'
+d_gethent='define'
+d_gethname='undef'
+d_getlogin='define'
+d_getpgid='undef'
+d_getpgrp='define'
+d_getpgrp2='undef'
+d_getppid='define'
+d_getprior='undef'
+d_getpwent='undef'
+d_gettimeod='define'
+d_gnulibc='undef'
+d_htonl='define'
+d_index='define'
+d_inetaton='undef'
+d_isascii='define'
+d_killpg='define'
+d_link='define'
+d_locconv='define'
+d_lockf='define'
+d_longdbl='undef'
+d_longllong='undef'
+d_lstat='define'
+d_mblen='define'
+d_mbstowcs='define'
+d_mbtowc='define'
+d_memcmp='define'
+d_memcpy='define'
+d_memmove='define'
+d_memset='define'
+d_mkdir='define'
+d_mkfifo='define'
+d_mktime='define'
+d_msg='define'
+d_msgctl='define'
+d_msgget='define'
+d_msgrcv='define'
+d_msgsnd='define'
+d_mymalloc='undef'
+d_nice='undef'
+d_oldsock='undef'
+d_open3='define'
+d_pathconf='define'
+d_pause='define'
+d_phostname='undef'
+d_pipe='define'
+d_poll='undef'
+d_portable='define'
+d_pwage='undef'
+d_pwchange='undef'
+d_pwclass='undef'
+d_pwcomment='undef'
+d_pwexpire='undef'
+d_pwquota='undef'
+d_readdir='define'
+d_readlink='define'
+d_rename='define'
+d_rewinddir='define'
+d_rmdir='define'
+d_safebcpy='define'
+d_safemcpy='undef'
+d_sanemcmp='define'
+d_sched_yield='undef'
+d_seekdir='undef'
+d_select='define'
+d_sem='define'
+d_semctl='define'
+d_semctl_semid_ds='define'
+d_semget='define'
+d_semop='define'
+d_setegid='define'
+d_seteuid='define'
+d_setgrent='undef'
+d_setgrps='undef'
+d_setlinebuf='undef'
+d_setlocale='define'
+d_setpgid='define'
+d_setpgrp='define'
+d_setpgrp2='undef'
+d_setprior='undef'
+d_setpwent='undef'
+d_setregid='undef'
+d_setresgid='undef'
+d_setresuid='undef'
+d_setreuid='undef'
+d_setrgid='undef'
+d_setruid='undef'
+d_setsid='define'
+d_sfio='undef'
+d_shm='define'
+d_shmat='define'
+d_shmatprototype='define'
+d_shmctl='define'
+d_shmdt='define'
+d_shmget='define'
+d_sigaction='define'
+d_sigsetjmp='define'
+d_socket='define'
+d_sockpair='undef'
+d_statblks='undef'
+d_stdio_cnt_lval='undef'
+d_stdio_ptr_lval='undef'
+d_stdiobase='undef'
+d_stdstdio='undef'
+d_strchr='define'
+d_strcoll='define'
+d_strctcpy='undef'
+d_strerrm='strerror(e)'
+d_strerror='define'
+d_strtod='define'
+d_strtol='define'
+d_strtoul='define'
+d_strxfrm='define'
+d_suidsafe='undef'
+d_symlink='define'
+d_syscall='undef'
+d_sysconf='define'
+d_sysernlst="n"
+d_syserrlst='undef'
+d_system='define'
+d_tcgetpgrp='define'
+d_tcsetpgrp='define'
+d_telldir='undef'
+d_time='define'
+d_times='define'
+d_truncate='define'
+d_tzname='define'
+d_umask='define'
+d_uname='define'
+d_union_semun='undef'
+d_vfork='define'
+d_void_closedir='undef'
+d_voidsig='define'
+d_voidtty="n"
+d_volatile='define'
+d_vprintf='define'
+d_waitpid='define'
+d_wait4='undef'
+d_wcstombs='define'
+d_wctomb='define'
+d_xenix='undef'
+db_hashtype='u_int32_t'
+db_prefixtype='size_t'
+direntrytype='struct dirent'
+dlext='none'
+dlsrc='dl_vmesa.xs'
+dynamic_ext=''
+eagain='EAGAIN'
+ebcdic='define'
+exe_ext=''
+fpostype='fpos_t'
+freetype='void'
+groupstype='gid_t'
+h_fcntl='false'
+h_sysfile='true'
+hint='recommended'
+i_arpainet="define"
+i_bsdioctl="n"
+i_db='undef'
+i_dbm='define'
+i_dirent='define'
+i_dld='define'
+i_dlfcn='define'
+i_fcntl='undef'
+i_float='define'
+i_gdbm='define'
+i_grp='define'
+i_limits='define'
+i_locale='define'
+i_malloc='undef'
+i_math='define'
+i_memory='define'
+i_ndbm='define'
+i_neterrno='undef'
+i_niin='define'
+i_pwd='define'
+i_rpcsvcdbm='undef'
+i_sfio='undef'
+i_sgtty='undef'
+i_stdarg='define'
+i_stddef='define'
+i_stdlib='define'
+i_string='define'
+i_sysdir='define'
+i_sysfile='define'
+i_sysfilio='undef'
+i_sysin='undef'
+i_sysioctl='define'
+i_sysndir='undef'
+i_sysparam='undef'
+i_sysresrc='define'
+i_sysselct='undef'
+i_syssockio="n"
+i_sysstat='define'
+i_systime='define'
+i_systimek='undef'
+i_systimes='define'
+i_systypes='define'
+i_sysun='define'
+i_syswait='define'
+i_termio='undef'
+i_termios='define'
+i_time='undef'
+i_unistd='define'
+i_utime='define'
+i_values='undef'
+i_varargs='undef'
+i_varhdr='stdarg.h'
+i_vfork='undef'
+ld='c89'
+ldflags='-L/usr/local/lib -L.'
+lib_ext='.a'
+libc=''
+libperl='libperl.a'
+libpth='/usr/local/lib /lib /usr/lib'
+libs='-l//posxsock -l//vmmtlib -lgdbm -lxpg4'
+libswanted='gdbm'
+lint="n"
+locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
+loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
+make_set_make='#'
+make='gnumake'
+mallocobj=''
+mallocsrc=''
+malloctype='void *'
+netdb_hlen_type='size_t'
+netdb_host_type='char *'
+netdb_name_type='const char *'
+netdb_net_type='in_addr_t'
+o_nonblock='O_NONBLOCK'
+obj_ext='.o'
+optimize='undef'
+prefix='/usr/local'
+prefixexp='/usr/local'
+prototype='define'
+ranlib=':'
+rd_nodata='-1'
+scriptdir='/usr/local/bin'
+scriptdirexp='/usr/local/bin'
+selecttype='fd_set *'
+shmattype='void *'
+shrpenv=''
+signal_t='void'
+sig_name_init='"ZERO","HUP","INT","ABRT","ILL","POLL","URG","STOP","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","NUM18","CONT","CHLD","TTIN","TTOU","IO","QUIT","TSTP","TRAP","NUM27","WINCH","XCPU","XFSZ","VTALRM","PROF","NUM33","NUM34","NUM35","NUM36","NUM3","NUM38","NUM39","NUM40","NUM41","NUM42","NUM43","NUM44","NUM45","NUM46","NUM47","NUM48","NUM49","CLD"'
+sig_num_init='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,20 '
+sizetype='size_t'
+so='.a'
+ssizetype='ssize_t'
+static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Thread Time/HiRes Time/Piece attrs re'
+stdchar='char'
+stdio_cnt='(fp)->__countIn'
+stdio_ptr='(fp)->__bufPtr'
+timeincl='sys/time.h '
+timetype='time_t'
+uidtype='uid_t'
+usedl='define'
+usemymalloc='n'
+usenm='false'
+useopcode='true'
+useperlio='undef'
+useposix='true'
+usesfio='false'
+useshrplib='false'
+usethreads='y'
+usevfork='true'
+vi='x'
diff --git a/hints/vos.sh b/hints/vos.sh
new file mode 100644
index 0000000000..fcadaa66fd
--- /dev/null
+++ b/hints/vos.sh
@@ -0,0 +1,145 @@
+# $Id: vos.sh 821 2002-10-22 11:14:00Z richardc $
+
+# This is a hints file for Stratus VOS, using the POSIX environment
+# in VOS 14.4.0 and higher.
+#
+# VOS POSIX is based on POSIX.1-1996. It ships with gcc as the standard
+# compiler.
+#
+# Paul Green (Paul.Green@stratus.com)
+
+# C compiler and default options.
+cc=gcc
+ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L"
+
+# Make command.
+make="/system/gnu_library/bin/gmake"
+# indented to not put it into config.sh
+ _make="/system/gnu_library/bin/gmake"
+
+# Architecture name
+archname="hppa1.1"
+
+# Executable suffix.
+# No, this is not a typo. The ".pm" really is the native
+# executable suffix in VOS. Talk about cosmic resonance.
+_exe=".pm"
+
+# Object library paths.
+loclibpth="/system/stcp/object_library"
+loclibpth="$loclibpth /system/stcp/object_library/common"
+loclibpth="$loclibpth /system/stcp/object_library/net"
+loclibpth="$loclibpth /system/stcp/object_library/socket"
+loclibpth="$loclibpth /system/posix_object_library/sysv"
+loclibpth="$loclibpth /system/posix_object_library"
+loclibpth="$loclibpth /system/c_object_library"
+loclibpth="$loclibpth /system/object_library"
+glibpth="$loclibpth"
+
+# Include library paths
+locincpth="/system/stcp/include_library"
+locincpth="$locincpth /system/include_library/sysv"
+usrinc="/system/include_library"
+
+# Where to install perl5.
+prefix=/system/ported/perl5
+
+# Linker is gcc.
+ld="gcc"
+
+# No shared libraries.
+so="none"
+
+# Don't use nm.
+usenm="n"
+
+# Make the default be no large file support.
+uselargefiles="n"
+
+# Don't use malloc that comes with perl.
+usemymalloc="n"
+
+# Make bison the default compiler-compiler.
+yacc="/system/gnu_library/bin/bison"
+
+# VOS doesn't have (or need) a pager, but perl needs one.
+pager="/system/gnu_library/bin/cat.pm"
+
+# VOS has a bug that causes _exit() to flush all files.
+# This confuses the tests. Make 'em happy here.
+fflushNULL=define
+
+# VOS has a link() function but it is a dummy.
+d_link="undef"
+
+# VOS does not have truncate() but we supply one in vos.c
+d_truncate="define"
+archobjs="vos.o"
+
+# Help gmake find vos.c
+test -h vos.c || ln -s vos/vos.c vos.c
+
+# VOS returns a constant 1 for st_nlink when stat'ing a
+# directory. Therefore, we must set this variable to stop
+# File::Find using the link count to determine whether there are
+# subdirectories to be searched.
+dont_use_nlink=define
+
+# Tell Configure where to find the hosts file.
+hostcat="cat /system/stcp/hosts"
+
+# VOS does not have socketpair() but we supply one in vos.c
+d_sockpair="define"
+
+# Once we have the compiler flags defined, Configure will
+# execute the following call-back script. See hints/README.hints
+# for details.
+cat > UU/cc.cbu <<'EOCBU'
+# This script UU/cc.cbu will get 'called-back' by Configure after it
+# has prompted the user for the C compiler to use.
+
+# Compile and run the a test case to see if bug gnu_g++-220 is
+# present. If so, lower the optimization level when compiling
+# pp_pack.c. This works around a bug in unpack.
+
+echo " "
+echo "Testing whether bug gnu_g++-220 is fixed in your compiler..."
+
+# Try compiling the test case.
+if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then
+ gccbug=`$run ./t001`
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case "$gccbug" in
+ *fails*) cat >&4 <<EOF
+This C compiler ($gccversion) is known to have optimizer
+problems when compiling pp_pack.c. The Stratus bug number
+for this problem is gnu_g++-220.
+
+Disabling optimization for pp_pack.c.
+EOF
+ case "$pp_pack_cflags" in
+ '') pp_pack_cflags='optimize='
+ echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;;
+ *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;;
+ esac
+ ;;
+ *) echo "Your compiler is ok." >&4
+ ;;
+ esac
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
+ '')
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
+fi
+
+$rm -f t001$_o t001$_exe t001.kp
+EOCBU
diff --git a/makedepend b/makedepend
new file mode 100755
index 0000000000..38358aa7cd
--- /dev/null
+++ b/makedepend
@@ -0,0 +1,126 @@
+#!/bin/sh
+# $Header: makedepend.SH,v 1.0.1.1 88/02/02 11:24:05 root Exp $
+#
+# $Log: makedepend.SH,v $
+# Revision 1.0.1.1 88/02/02 11:24:05 root
+# patch13: removed spurious -I./h.
+#
+# Revision 1.0 87/12/18 17:54:32 root
+# Initial revision
+#
+#
+
+export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
+
+cat='/bin/cat'
+cp='/bin/cp'
+cpp='/usr/bin/cpp'
+echo='/bin/echo'
+egrep='/bin/egrep'
+expr='/usr/bin/expr'
+mv='/bin/mv'
+rm='/bin/rm'
+sed='/bin/sed'
+sort='/usr/bin/sort'
+test='test'
+tr='/usr/bin/tr'
+uniq='/usr/bin/uniq'
+
+$cat /dev/null >.deptmp
+$rm -f *.c.c c/*.c.c
+if test -f Makefile; then
+ mf=Makefile
+else
+ mf=makefile
+fi
+if test -f $mf; then
+ defrule=`<$mf sed -n \
+ -e '/^\.c\.o:.*;/{' \
+ -e 's/\$\*\.c//' \
+ -e 's/^[^;]*;[ ]*//p' \
+ -e q \
+ -e '}' \
+ -e '/^\.c\.o: *$/{' \
+ -e N \
+ -e 's/\$\*\.c//' \
+ -e 's/^.*\n[ ]*//p' \
+ -e q \
+ -e '}'`
+fi
+case "$defrule" in
+'') defrule='$(CC) -c $(CFLAGS)' ;;
+esac
+
+make clist || ($echo "Searching for .c files..."; \
+ $echo *.c */*.c | $tr ' ' '\012' | $egrep -v '\*' >.clist)
+for file in `$cat .clist`; do
+# for file in `cat /dev/null`; do
+ case "$file" in
+ *.c) filebase=`basename $file .c` ;;
+ *.y) filebase=`basename $file .c` ;;
+ esac
+ $echo "Finding dependencies for $filebase.o."
+ $sed -n <$file >$file.c \
+ -e "/^${filebase}_init(/q" \
+ -e '/^#/{' \
+ -e 's|/\*.*$||' \
+ -e 's|\\$||' \
+ -e p \
+ -e '}'
+ $cpp -I/usr/local/include -I. $file.c | \
+ $sed \
+ -e '/^# *[0-9]/!d' \
+ -e 's/^.*"\(.*\)".*$/'$filebase'.o: \1/' \
+ -e 's|: \./|: |' \
+ -e 's|\.c\.c|.c|' | \
+ $uniq | $sort | $uniq >> .deptmp
+done
+
+$sed <Makefile >Makefile.new -e '1,/^# AUTOMATICALLY/!d'
+
+make shlist || ($echo "Searching for .SH files..."; \
+ $echo *.SH */*.SH | $tr ' ' '\012' | $egrep -v '\*' >.shlist)
+if $test -s .deptmp; then
+ for file in `cat .shlist`; do
+ $echo `$expr X$file : 'X\(.*\).SH'`: $file config.sh \; \
+ /bin/sh $file >> .deptmp
+ done
+ $echo "Updating Makefile..."
+ $echo "# If this runs make out of memory, delete /usr/include lines." \
+ >> Makefile.new
+ $sed 's|^\(.*\.o:\) *\(.*/.*\.c\) *$|\1 \2; '"$defrule \2|" .deptmp \
+ >>Makefile.new
+else
+ make hlist || ($echo "Searching for .h files..."; \
+ $echo *.h */*.h | $tr ' ' '\012' | $egrep -v '\*' >.hlist)
+ $echo "You don't seem to have a proper C preprocessor. Using grep instead."
+ $egrep '^#include ' `cat .clist` `cat .hlist` >.deptmp
+ $echo "Updating Makefile..."
+ <.clist $sed -n \
+ -e '/\//{' \
+ -e 's|^\(.*\)/\(.*\)\.c|\2.o: \1/\2.c; '"$defrule \1/\2.c|p" \
+ -e d \
+ -e '}' \
+ -e 's|^\(.*\)\.c|\1.o: \1.c|p' >> Makefile.new
+ <.hlist $sed -n 's|\(.*/\)\(.*\)|s= \2= \1\2=|p' >.hsed
+ <.deptmp $sed -n 's|c:#include "\(.*\)".*$|o: \1|p' | \
+ $sed 's|^[^;]*/||' | \
+ $sed -f .hsed >> Makefile.new
+ <.deptmp $sed -n 's|c:#include <\(.*\)>.*$|o: /usr/include/\1|p' \
+ >> Makefile.new
+ <.deptmp $sed -n 's|h:#include "\(.*\)".*$|h: \1|p' | \
+ $sed -f .hsed >> Makefile.new
+ <.deptmp $sed -n 's|h:#include <\(.*\)>.*$|h: /usr/include/\1|p' \
+ >> Makefile.new
+ for file in `$cat .shlist`; do
+ $echo `$expr X$file : 'X\(.*\).SH`: $file config.sh \; \
+ /bin/sh $file >> Makefile.new
+ done
+fi
+$rm -f Makefile.old
+$cp Makefile Makefile.old
+$cp Makefile.new Makefile
+$rm Makefile.new
+$echo "# WARNING: Put nothing here or make depend will gobble it up!" >> Makefile
+$rm -f .deptmp `sed 's/\.c/.c.c/' .clist` .shlist .clist .hlist .hsed
+
diff --git a/makedepend.SH b/makedepend.SH
index 5a8d9794fe..8a9d426294 100644
--- a/makedepend.SH
+++ b/makedepend.SH
@@ -101,7 +101,7 @@ make shlist || ($echo "Searching for .SH files..."; \
$echo *.SH */*.SH | $tr ' ' '\012' | $egrep -v '\*' >.shlist)
if $test -s .deptmp; then
for file in `cat .shlist`; do
- $echo `$expr X$file : 'X\(.*\).SH`: $file config.sh \; \
+ $echo `$expr X$file : 'X\(.*\).SH'`: $file config.sh \; \
/bin/sh $file >> .deptmp
done
$echo "Updating Makefile..."
diff --git a/makedir b/makedir
new file mode 100755
index 0000000000..ab760230ba
--- /dev/null
+++ b/makedir
@@ -0,0 +1,58 @@
+#!/bin/sh
+# $Header: makedir.SH,v 1.0 87/12/18 13:05:32 root Exp $
+#
+# $Log: makedir.SH,v $
+# Revision 1.0 87/12/18 13:05:32 root
+# Initial revision
+#
+# Revision 4.3.1.1 85/05/10 11:35:14 lwall
+# Branch for patches.
+#
+# Revision 4.3 85/05/01 11:42:31 lwall
+# Baseline for release with 4.3bsd.
+#
+
+export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
+
+case $# in
+ 0)
+ /bin/echo "makedir pathname filenameflag"
+ exit 1
+ ;;
+esac
+
+: guarantee one slash before 1st component
+case $1 in
+ /*) ;;
+ *) set ./$1 $2 ;;
+esac
+
+: strip last component if it is to be a filename
+case X$2 in
+ X1) set `/bin/echo $1 | /bin/sed 's:\(.*\)/[^/]*$:\1:'` ;;
+ *) set $1 ;;
+esac
+
+: return reasonable status if nothing to be created
+if test -d "$1" ; then
+ exit 0
+fi
+
+list=''
+while true ; do
+ case $1 in
+ */*)
+ list="$1 $list"
+ set `echo $1 | /bin/sed 's:\(.*\)/:\1 :'`
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+set $list
+
+for dir do
+ /bin/mkdir $dir >/dev/null 2>&1
+done
diff --git a/patchlevel.h b/patchlevel.h
index f95be0eb07..69d9c2fd72 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1 +1 @@
-#define PATCHLEVEL 14
+#define PATCHLEVEL 15
diff --git a/perl.h b/perl.h
index 341afa8008..4c25a0cb9d 100644
--- a/perl.h
+++ b/perl.h
@@ -209,8 +209,6 @@ EXT jmp_buf eval_env;
EXT char *goto_targ INIT(Nullch); /* cmd_exec gets strange when set */
double atof();
-long time();
-struct tm *gmtime(), *localtime();
#ifdef EUNICE
#define UNLINK(f) while (unlink(f) >= 0)
diff --git a/perl.y b/perl.y
index b9a7a8e30e..5d91635ba2 100644
--- a/perl.y
+++ b/perl.y
@@ -69,7 +69,6 @@ char *tokename[] = {
%token <arg> RSTRING TRANS
%type <ival> prog decl format
-%type <stabval>
%type <cmdval> block lineseq line loop cond sideff nexpr else
%type <arg> expr sexpr term
%type <arg> condmod loopmod cexpr
diff --git a/perly.c b/perly.c
index d2119acc66..c6834b198e 100644
--- a/perly.c
+++ b/perly.c
@@ -51,7 +51,8 @@ register char **env;
#endif
case 'e':
if (!e_fp) {
- mktemp(e_tmpname);
+ e_tmpname = (char*) strdup(e_tmpname);
+ mkstemp(e_tmpname);
e_fp = fopen(e_tmpname,"w");
}
if (argv[1])
@@ -120,7 +121,7 @@ register char **env;
argv[0] = "";
if (preprocess) {
sprintf(buf, "\
-/bin/sed -e '/^[^#]/b' \
+%s -e '/^[^#]/b' \
-e '/^#[ ]*include[ ]/b' \
-e '/^#[ ]*define[ ]/b' \
-e '/^#[ ]*if[ ]/b' \
@@ -129,7 +130,7 @@ register char **env;
-e '/^#[ ]*endif/b' \
-e 's/^#.*//' \
%s | %s -C %s%s",
- argv[0], CPP, str_get(str), CPPMINUS);
+ SED, argv[0], CPP, str_get(str), CPPMINUS);
rsfp = popen(buf,"r");
}
else if (!*argv[0])
diff --git a/stab.c b/stab.c
index 845cec3b42..95064504d9 100644
--- a/stab.c
+++ b/stab.c
@@ -179,7 +179,13 @@ STR *str;
curoutstab->stab_io->top_stab = stabent(str_get(str),TRUE);
break;
case '~':
- safefree(curoutstab->stab_io->fmt_name);
+ /* FIXME: investigate more carefully. When the following
+ * safefree is allowed to happen the subsequent stabent call
+ * results in a segfault. Commenting it out is a cheap band-aid
+ * and probably a memory leak rolled into one
+ * -- richardc 2002-08-14
+ */
+ /* safefree(curoutstab->stab_io->fmt_name); */
curoutstab->stab_io->fmt_name = str_get(str);
curoutstab->stab_io->fmt_stab = stabent(str_get(str),TRUE);
break;
@@ -244,7 +250,7 @@ STR *str;
}
}
else if (stab == envstab && envname) {
- setenv(envname,str_get(str));
+ PL_setenv(envname,str_get(str));
/* And you'll never guess what the dog had */
safefree(envname); /* in its mouth... */
envname = Nullch;
diff --git a/t/TEST b/t/TEST
index 451bbe6be6..22135c68dc 100644..100755
--- a/t/TEST
+++ b/t/TEST
@@ -23,9 +23,11 @@ while (<config>) {
}
$bad = 0;
while ($test = shift) {
+ next if $test =~ m/,v$/;
+ next if $test =~ m/~$/;
print "$test...";
if ($sharpbang) {
- open(results,"$test|") || (print "can't run.\n");
+ open(results,"./$test|") || (print "can't run.\n");
} else {
open(script,"$test") || die "Can't run $test";
$_ = <script>;
diff --git a/t/base.cond b/t/base.cond
index b592b59855..b592b59855 100644..100755
--- a/t/base.cond
+++ b/t/base.cond
diff --git a/t/base.if b/t/base.if
index e5133a6428..e5133a6428 100644..100755
--- a/t/base.if
+++ b/t/base.if
diff --git a/t/base.lex b/t/base.lex
index 015f442c77..015f442c77 100644..100755
--- a/t/base.lex
+++ b/t/base.lex
diff --git a/t/base.pat b/t/base.pat
index d796b697fb..d796b697fb 100644..100755
--- a/t/base.pat
+++ b/t/base.pat
diff --git a/t/base.term b/t/base.term
index 509454f053..8068128f0f 100644..100755
--- a/t/base.term
+++ b/t/base.term
@@ -32,5 +32,5 @@ if ($x == '1') {print "ok 4\n";} else {print "not ok 4\n";}
open(try, "/dev/null") || (die "Can't open /dev/null.");
if (<try> eq '') {print "ok 5\n";} else {print "not ok 5\n";}
-open(try, "/etc/termcap") || (die "Can't open /etc/termcap.");
+open(try, "/etc/passwd") || (die "Can't open /etc/passwd.");
if (<try> ne '') {print "ok 6\n";} else {print "not ok 6\n";}
diff --git a/t/cmd.elsif b/t/cmd.elsif
index 51a7641d08..51a7641d08 100644..100755
--- a/t/cmd.elsif
+++ b/t/cmd.elsif
diff --git a/t/cmd.for b/t/cmd.for
index 769bec28bb..769bec28bb 100644..100755
--- a/t/cmd.for
+++ b/t/cmd.for
diff --git a/t/cmd.mod b/t/cmd.mod
index 96367e96e9..96367e96e9 100644..100755
--- a/t/cmd.mod
+++ b/t/cmd.mod
diff --git a/t/cmd.subval b/t/cmd.subval
index 2b4962f58a..2b4962f58a 100644..100755
--- a/t/cmd.subval
+++ b/t/cmd.subval
diff --git a/t/cmd.while b/t/cmd.while
index 585e27f708..585e27f708 100644..100755
--- a/t/cmd.while
+++ b/t/cmd.while
diff --git a/t/comp.cmdopt b/t/comp.cmdopt
index c459324fcc..c459324fcc 100644..100755
--- a/t/comp.cmdopt
+++ b/t/comp.cmdopt
diff --git a/t/comp.cpp b/t/comp.cpp
index ee7ad73f16..ee7ad73f16 100644..100755
--- a/t/comp.cpp
+++ b/t/comp.cpp
diff --git a/t/comp.decl b/t/comp.decl
index 649103ac14..649103ac14 100644..100755
--- a/t/comp.decl
+++ b/t/comp.decl
diff --git a/t/comp.multiline b/t/comp.multiline
index 9bf1be21e0..9bf1be21e0 100644..100755
--- a/t/comp.multiline
+++ b/t/comp.multiline
diff --git a/t/comp.script b/t/comp.script
index 0364d1901d..0364d1901d 100644..100755
--- a/t/comp.script
+++ b/t/comp.script
diff --git a/t/comp.term b/t/comp.term
index 83cce45cbd..83cce45cbd 100644..100755
--- a/t/comp.term
+++ b/t/comp.term
diff --git a/t/io.argv b/t/io.argv
index 8282a3d0a8..8282a3d0a8 100644..100755
--- a/t/io.argv
+++ b/t/io.argv
diff --git a/t/io.fs b/t/io.fs
index 996986cd39..996986cd39 100644..100755
--- a/t/io.fs
+++ b/t/io.fs
diff --git a/t/io.inplace b/t/io.inplace
index 2a245306c9..2a245306c9 100644..100755
--- a/t/io.inplace
+++ b/t/io.inplace
diff --git a/t/io.print b/t/io.print
index f183b14013..f183b14013 100644..100755
--- a/t/io.print
+++ b/t/io.print
diff --git a/t/io.tell b/t/io.tell
index 130b4c4780..130b4c4780 100644..100755
--- a/t/io.tell
+++ b/t/io.tell
diff --git a/t/op.append b/t/op.append
index 5972ac4533..5972ac4533 100644..100755
--- a/t/op.append
+++ b/t/op.append
diff --git a/t/op.auto b/t/op.auto
index 6ad44ce7ce..6ad44ce7ce 100644..100755
--- a/t/op.auto
+++ b/t/op.auto
diff --git a/t/op.chop b/t/op.chop
index c86ea9cf3e..c86ea9cf3e 100644..100755
--- a/t/op.chop
+++ b/t/op.chop
diff --git a/t/op.cond b/t/op.cond
index 7391e5893b..7391e5893b 100644..100755
--- a/t/op.cond
+++ b/t/op.cond
diff --git a/t/op.crypt b/t/op.crypt
index b28dda6aaa..b28dda6aaa 100644..100755
--- a/t/op.crypt
+++ b/t/op.crypt
diff --git a/t/op.do b/t/op.do
index 90fdae993d..90fdae993d 100644..100755
--- a/t/op.do
+++ b/t/op.do
diff --git a/t/op.each b/t/op.each
index 8e91950e4b..8e91950e4b 100644..100755
--- a/t/op.each
+++ b/t/op.each
diff --git a/t/op.eval b/t/op.eval
index 191571015c..191571015c 100644..100755
--- a/t/op.eval
+++ b/t/op.eval
diff --git a/t/op.exec b/t/op.exec
index 328e470889..328e470889 100644..100755
--- a/t/op.exec
+++ b/t/op.exec
diff --git a/t/op.exp b/t/op.exp
index 8a3a8b66af..8a3a8b66af 100644..100755
--- a/t/op.exp
+++ b/t/op.exp
diff --git a/t/op.flip b/t/op.flip
index 6a54b190b5..4aec51acfd 100644..100755
--- a/t/op.flip
+++ b/t/op.flip
@@ -17,7 +17,7 @@ if ($y eq '12E0123E0') {print "ok 7\n";} else {print "not ok 7\n";}
@a = ('a','b','c','d','e','f','g');
-open(of,'/etc/termcap');
+open(of,'/etc/passwd');
while (<of>) {
(3 .. 5) && $foo .= $_;
}
diff --git a/t/op.fork b/t/op.fork
index 5d6dee3157..5d6dee3157 100644..100755
--- a/t/op.fork
+++ b/t/op.fork
diff --git a/t/op.goto b/t/op.goto
index 45dfcf77d7..45dfcf77d7 100644..100755
--- a/t/op.goto
+++ b/t/op.goto
diff --git a/t/op.int b/t/op.int
index b358ad7cf5..b358ad7cf5 100644..100755
--- a/t/op.int
+++ b/t/op.int
diff --git a/t/op.join b/t/op.join
index f3555a63cc..f3555a63cc 100644..100755
--- a/t/op.join
+++ b/t/op.join
diff --git a/t/op.list b/t/op.list
index e0c90fa553..e0c90fa553 100644..100755
--- a/t/op.list
+++ b/t/op.list
diff --git a/t/op.magic b/t/op.magic
index 7696803127..7696803127 100644..100755
--- a/t/op.magic
+++ b/t/op.magic
diff --git a/t/op.oct b/t/op.oct
index 718a4d32b8..718a4d32b8 100644..100755
--- a/t/op.oct
+++ b/t/op.oct
diff --git a/t/op.ord b/t/op.ord
index a46ef78258..a46ef78258 100644..100755
--- a/t/op.ord
+++ b/t/op.ord
diff --git a/t/op.pat b/t/op.pat
index 1013610ae4..1013610ae4 100644..100755
--- a/t/op.pat
+++ b/t/op.pat
diff --git a/t/op.push b/t/op.push
index 01cbfbf6cf..01cbfbf6cf 100644..100755
--- a/t/op.push
+++ b/t/op.push
diff --git a/t/op.repeat b/t/op.repeat
index 1c03c31d9a..1c03c31d9a 100644..100755
--- a/t/op.repeat
+++ b/t/op.repeat
diff --git a/t/op.sleep b/t/op.sleep
index e32e62bf1b..e32e62bf1b 100644..100755
--- a/t/op.sleep
+++ b/t/op.sleep
diff --git a/t/op.split b/t/op.split
index a6bb1b47c8..a6bb1b47c8 100644..100755
--- a/t/op.split
+++ b/t/op.split
diff --git a/t/op.sprintf b/t/op.sprintf
index cb4e5c7b3a..cb4e5c7b3a 100644..100755
--- a/t/op.sprintf
+++ b/t/op.sprintf
diff --git a/t/op.stat b/t/op.stat
index c087c2484e..c087c2484e 100644..100755
--- a/t/op.stat
+++ b/t/op.stat
diff --git a/t/op.subst b/t/op.subst
index e431be8cec..e431be8cec 100644..100755
--- a/t/op.subst
+++ b/t/op.subst
diff --git a/t/op.time b/t/op.time
index 87ef2605d1..cddca55364 100644..100755
--- a/t/op.time
+++ b/t/op.time
@@ -14,7 +14,9 @@ if ($now > $beg && $now - $beg < 10){print "ok 1\n";} else {print "not ok 1\n";}
for ($i = 0; $i < 100000; $i++) {
($nowuser, $nowsys) = times;
- $i = 200000 if $nowuser > $beguser && $nowsys > $begsys;
+ # on os x 10.1.5 we can't get a value for systime
+ $i = 200000 if $nowuser > $beguser;
+# $i = 200000 if $nowuser > $beguser && $nowsys > $begsys;
last if time - $beg > 20;
}
diff --git a/t/op.unshift b/t/op.unshift
index 3008da5de9..3008da5de9 100644..100755
--- a/t/op.unshift
+++ b/t/op.unshift
diff --git a/t/perl b/t/perl
new file mode 120000
index 0000000000..f2271dea4a
--- /dev/null
+++ b/t/perl
@@ -0,0 +1 @@
+../perl \ No newline at end of file
diff --git a/util.c b/util.c
index 3572c4279c..bfa5240c95 100644
--- a/util.c
+++ b/util.c
@@ -223,7 +223,7 @@ static bool firstsetenv = TRUE;
extern char **environ;
void
-setenv(nam,val)
+PL_setenv(nam,val)
char *nam, *val;
{
register int i=envix(nam); /* where does it go? */
diff --git a/util.h b/util.h
index 4f92eeb43c..6022ba1ca9 100644
--- a/util.h
+++ b/util.h
@@ -28,7 +28,7 @@ void prexit();
char *get_a_line();
char *savestr();
int makedir();
-void setenv();
+void PL_setenv();
int envix();
void notincl();
char *getval();