# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Dec 12 17:09:05 EET 2001 [metaconfig 3.0 PL70]
+# Generated on Wed Dec 19 02:24:52 EET 2001 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
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"
+paths="$paths /system/gnu_library/bin"
for p in $paths
do
expr=''
find=''
flex=''
+gmake=''
grep=''
gzip=''
inews=''
spitshell=cat
xcat=/bin/cat
test -f $xcat || xcat=/usr/bin/cat
+ if test ! -f $xcat; then
+ for p in $paths; do
+ if test -f $p/cat; then
+ xcat=$p/cat
+ break
+ fi
+ done
+ if test ! -f $xcat; then
+ echo "Can't find cat anywhere!" >&4
+ exit 1
+ fi
+ fi
echo "#!$xcat" >sharp
$eunicefix sharp
chmod +x sharp
expr
grep
ls
-make
mkdir
rm
sed
gzip
less
ln
+make
more
nm
nroff
echo "Trying external '$test -h'." >&4
issymlink="$test -h"
if $test ! -h sym >/dev/null 2>&1; then
- echo "External '$test -h' is broken, too." >& 4
+ echo "External '$test -h' is broken, too." >&4
issymlink=''
fi
;;
$test -d /usr/apollo/bin && osname=apollo
$test -f /etc/saf/_sactab && osname=svr4
$test -d /usr/include/minix && osname=minix
+ $test -d /system && osname=vos
if $test -d /MachTen -o -d /MachTen_Folder; then
osname=machten
if $test -x /sbin/version; then
unixware) osname=svr5
osvers="$4"
;;
- uts) osname=uts
+ uts) osname=uts
osvers="$3"
;;
+ vos) osvers="$3"
+ ;;
$2) case "$osname" in
*isc*) ;;
*freebsd*) ;;
esac
echo "Your cpp writes the filename in the $pos field of the line."
+case "$osname" in
+vos) cppfilter="tr '\\\\>' '/' |" ;; # path component separator is >
+*) cppfilter='' ;;
+esac
: locate header file
$cat >findhdr <<EOF
$startsh
awkprg='{ print \$$fieldn }'
echo "#include <\$wanted>" > foo\$\$.c
$cppstdin $cppminus $cppflags < foo\$\$.c 2>/dev/null | \
-$grep "^[ ]*#.*\$wanted" | \
+$cppfilter $grep "^[ ]*#.*\$wanted" | \
while read cline; do
name=\`echo \$cline | $awk "\$awkprg" | $tr -d '"'\`
case "\$name" in
case "$d_suidsafe" in
"$define")
val="$undef"
- echo "No need to emulate SUID scripts since they are secure here." >& 4
+ echo "No need to emulate SUID scripts since they are secure here." >&4
;;
*)
$cat <<EOM
sockethdr="-I/usr/netinclude"
;;
esac
- echo "Found Berkeley sockets interface in lib$net." >& 4
+ echo "Found Berkeley sockets interface in lib$net." >&4
if $contains setsockopt libc.list >/dev/null 2>&1; then
d_oldsock="$undef"
else
echo " "
-echo "Checking the availability of certain socket constants..." >& 4
+echo "Checking the availability of certain socket constants..." >&4
for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
$cat >try.c <<EOF
;;
esac
-$rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.?
+$rm -f fred fred.* dyna.$dlext dyna.* tmp-dyna.*
set d_dlsymun
eval $setvar
*) strings=`./findhdr string.h`;;
esac
+: see if this is a sys/file.h system
+val=''
+set sys/file.h val
+eval $inhdr
+
+: do we need to include sys/file.h ?
+case "$val" in
+"$define")
+ echo " "
+ if $h_sysfile; then
+ val="$define"
+ echo "We'll be including <sys/file.h>." >&4
+ else
+ val="$undef"
+ echo "We won't be including <sys/file.h>." >&4
+ fi
+ ;;
+*)
+ h_sysfile=false
+ ;;
+esac
+set i_sysfile
+eval $setvar
+
+: see if fcntl.h is there
+val=''
+set fcntl.h val
+eval $inhdr
+
+: see if we can include fcntl.h
+case "$val" in
+"$define")
+ echo " "
+ if $h_fcntl; then
+ val="$define"
+ echo "We'll be including <fcntl.h>." >&4
+ else
+ val="$undef"
+ if $h_sysfile; then
+ echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
+ else
+ echo "We won't be including <fcntl.h>." >&4
+ fi
+ fi
+ ;;
+*)
+ h_fcntl=false
+ val="$undef"
+ ;;
+esac
+set i_fcntl
+eval $setvar
+
: check for non-blocking I/O stuff
case "$h_sysfile" in
true) echo "#include <sys/file.h>" > head.c;;
case "$o_nonblock" in
'')
$cat head.c > try.c
- $cat >>try.c <<'EOCP'
+ $cat >>try.c <<EOCP
#include <stdio.h>
#include <stdlib.h>
+#$i_fcntl I_FCNTL
+#ifdef I_FCNTL
+#include <fcntl.h>
+#endif
int main() {
#ifdef O_NONBLOCK
printf("O_NONBLOCK\n");
set flock d_flock
eval $inlibc
-: see if this is a sys/file.h system
-val=''
-set sys/file.h val
-eval $inhdr
-
-: do we need to include sys/file.h ?
-case "$val" in
-"$define")
- echo " "
- if $h_sysfile; then
- val="$define"
- echo "We'll be including <sys/file.h>." >&4
- else
- val="$undef"
- echo "We won't be including <sys/file.h>." >&4
- fi
- ;;
-*)
- h_sysfile=false
- ;;
-esac
-set i_sysfile
-eval $setvar
-
: see if prototype for flock is available
echo " "
set d_flockproto flock $i_sysfile sys/file.h
fi
case "$ivdformat" in
-'') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4
+'') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
exit 1
;;
esac
esac
echo " "
comp='yacc'
-if $test -f "$byacc"; then
+if $test -f "$byacc$_exe"; then
dflt="$byacc"
comp="byacc or $comp"
fi
-if $test -f "$bison"; then
+if $test -f "$bison$_exe"; then
comp="$comp or bison -y"
fi
rp="Which compiler compiler ($comp) shall I use?"
;;
esac
-: see if fcntl.h is there
-val=''
-set fcntl.h val
-eval $inhdr
-
-: see if we can include fcntl.h
-case "$val" in
-"$define")
- echo " "
- if $h_fcntl; then
- val="$define"
- echo "We'll be including <fcntl.h>." >&4
- else
- val="$undef"
- if $h_sysfile; then
- echo "We don't need to include <fcntl.h> if we include <sys/file.h>." >&4
- else
- echo "We won't be including <fcntl.h>." >&4
- fi
- fi
- ;;
-*)
- h_fcntl=false
- val="$undef"
- ;;
-esac
-set i_fcntl
-eval $setvar
-
: see if this is a fp.h system
set fp.h i_fp
eval $inhdr
gidsize='$gidsize'
gidtype='$gidtype'
glibpth='$glibpth'
+gmake='$gmake'
grep='$grep'
groupcat='$groupcat'
groupstype='$groupstype'