summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 15:25:18 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-04-02 15:25:18 +0000
commitdc45a647708b6c5442e1362e6b6e7a2583c30346 (patch)
tree77eb71f3ede3b243141f6874d47e94606370b5f1 /Configure
parent67ce88566282df78bad77aeb9c4b93768bda70aa (diff)
downloadperl-dc45a647708b6c5442e1362e6b6e7a2583c30346.tar.gz
Andy Dougherty's configuration patches (Config_63-01 up to 04).
p4raw-id: //depot/perl@845
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure1328
1 files changed, 763 insertions, 565 deletions
diff --git a/Configure b/Configure
index af22c1b77f..461670a5cb 100755
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Mar 9 14:02:25 EST 1998 [metaconfig 3.0 PL70]
+# Generated on Tue Mar 31 15:49:57 EST 1998 [metaconfig 3.0 PL70]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -176,7 +176,6 @@ emacs=''
expr=''
find=''
flex=''
-gcc=''
grep=''
gzip=''
inews=''
@@ -332,10 +331,12 @@ aphostname=''
d_gethname=''
d_phostname=''
d_uname=''
+d_gethostprotos=''
d_getlogin=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
+d_getnetprotos=''
d_getpent=''
d_getpgid=''
d_getpgrp2=''
@@ -345,7 +346,9 @@ d_getppid=''
d_getprior=''
d_getpbyname=''
d_getpbynumber=''
+d_getprotoprotos=''
d_getsent=''
+d_getservprotos=''
d_getsbyname=''
d_getsbyport=''
d_gnulibc=''
@@ -358,6 +361,8 @@ d_locconv=''
d_lockf=''
d_longdbl=''
longdblsize=''
+d_longlong=''
+longlongsize=''
d_lstat=''
d_mblen=''
d_mbstowcs=''
@@ -1904,6 +1909,8 @@ EOM
*.08.*) osvers=9 ;;
*.09.*) osvers=9 ;;
*.10.*) osvers=10 ;;
+ *.11.*) osvers=11 ;;
+ *.12.*) osvers=12 ;;
*) osvers="$3" ;;
esac
;;
@@ -2277,8 +2284,8 @@ esac
set usethreads
eval $setvar
: Look for a hint-file generated 'call-back-unit'. Now that the
-: user has specified the compiler, we may need to set or change some
-: other defaults.
+: user has specified if a threading perl is to be built, we may need
+: to set or change some other defaults.
if $test -f usethreads.cbu; then
. ./usethreads.cbu
fi
@@ -3055,393 +3062,6 @@ else
echo "Could not find manual pages in source form." >&4
fi
-: determine where manual pages go
-set man1dir man1dir 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 "$man1dir" in
- '') man1dir="none";;
- esac;;
-esac
-echo "If you don't want the manual sources installed, answer 'none'."
-case "$man1dir" in
-' ') dflt=none
- ;;
-'')
- lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
- lookpath="$lookpath $prefixexp/man/p_man/man1"
- lookpath="$lookpath $prefixexp/man/u_man/man1"
- lookpath="$lookpath $prefixexp/man/man.1"
- case "$sysman" in
- */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
- *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
- esac
- set dflt
- eval $prefixup
- ;;
-*) dflt="$man1dir"
- ;;
-esac
-echo " "
-fn=dn+~
-rp="Where do the main $spackage manual pages (source) go?"
-. ./getfile
-if $test "X$man1direxp" != "X$ansexp"; then
- installman1dir=''
-fi
-man1dir="$ans"
-man1direxp="$ansexp"
-case "$man1dir" in
-'') man1dir=' '
- installman1dir='';;
-esac
-if $afs; 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 "$installman1dir" in
- '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman1dir";;
- esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman1dir="$ans"
-else
- installman1dir="$man1direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man1dir" in
-' ')
- man1ext='0'
- ;;
-*)
- rp="What suffix should be used for the main $spackage man pages?"
- case "$man1ext" in
- '') case "$man1dir" in
- *1) dflt=1 ;;
- *1p) dflt=1p ;;
- *1pm) dflt=1pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L1) dflt=L1;;
- *) dflt=1;;
- esac
- ;;
- *) dflt="$man1ext";;
- esac
- . ./myread
- man1ext="$ans"
- ;;
-esac
-
-: see if we can have long filenames
-echo " "
-rmlist="$rmlist /tmp/cf$$"
-$test -d /tmp/cf$$ || mkdir /tmp/cf$$
-first=123456789abcdef
-second=/tmp/cf$$/$first
-$rm -f $first $second
-if (echo hi >$first) 2>/dev/null; then
- if $test -f 123456789abcde; then
- echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
- val="$undef"
- else
- if (echo hi >$second) 2>/dev/null; then
- if $test -f /tmp/cf$$/123456789abcde; then
- $cat <<'EOM'
-That's peculiar... You can have filenames longer than 14 characters, but only
-on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
-I shall consider your system cannot support long filenames at all.
-EOM
- val="$undef"
- else
- echo 'You can have filenames longer than 14 characters.' >&4
- val="$define"
- fi
- else
- $cat <<'EOM'
-How confusing! Some of your filesystems are sane enough to allow filenames
-longer than 14 characters but some others like /tmp can't even think about them.
-So, for now on, I shall assume your kernel does not allow them at all.
-EOM
- val="$undef"
- fi
- fi
-else
- $cat <<'EOM'
-You can't have filenames longer than 14 chars. You can't even think about them!
-EOM
- val="$undef"
-fi
-set d_flexfnam
-eval $setvar
-$rm -rf /tmp/cf$$ 123456789abcde*
-
-: determine where library module manual pages go
-set man3dir man3dir none
-eval $prefixit
-$cat <<EOM
-
-$spackage has manual pages for many of the library modules.
-EOM
-
-case "$nroff" in
-nroff)
- $cat <<'EOM'
-However, you don't have nroff, so they're probably useless to you.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-case "$d_flexfnam" in
-undef)
- $cat <<'EOM'
-However, your system can't handle the long file names like File::Basename.3.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-echo "If you don't want the manual sources installed, answer 'none'."
-prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-case "$man3dir" in
-'') case "$prefix" in
- *$prog*) dflt=`echo $man1dir |
- $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
- *) dflt="$privlib/man/man3" ;;
- esac
- ;;
-' ') dflt=none;;
-*) dflt="$man3dir" ;;
-esac
-echo " "
-
-fn=dn+~
-rp="Where do the $package library man pages (source) go?"
-. ./getfile
-if test "X$man3direxp" != "X$ansexp"; then
- installman3dir=''
-fi
-
-man3dir="$ans"
-man3direxp="$ansexp"
-case "$man3dir" in
-'') man3dir=' '
- installman3dir='';;
-esac
-if $afs; 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 "$installman3dir" in
- '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman3dir";;
- esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman3dir="$ans"
-else
- installman3dir="$man3direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man3dir" in
-' ')
- man3ext='0'
- ;;
-*)
- rp="What suffix should be used for the $package library man pages?"
- case "$man3ext" in
- '') case "$man3dir" in
- *3) dflt=3 ;;
- *3p) dflt=3p ;;
- *3pm) dflt=3pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L3) dflt=L3;;
- *) dflt=3;;
- esac
- ;;
- *) dflt="$man3ext";;
- esac
- . ./myread
- man3ext="$ans"
- ;;
-esac
-
-: determine where public executable scripts go
-set scriptdir scriptdir
-eval $prefixit
-case "$scriptdir" in
-'')
- dflt="$bin"
- : guess some guesses
- $test -d /usr/share/scripts && dflt=/usr/share/scripts
- $test -d /usr/share/bin && dflt=/usr/share/bin
- $test -d /usr/local/script && dflt=/usr/local/script
- $test -d $prefixexp/script && dflt=$prefixexp/script
- set dflt
- eval $prefixup
- ;;
-*) dflt="$scriptdir"
- ;;
-esac
-$cat <<EOM
-
-Some installations have a separate directory just for executable scripts so
-that they can mount it across multiple architectures but keep the scripts in
-one spot. You might, for example, have a subdirectory of /usr/share for this.
-Or you might just lump your scripts in with all your other executables.
-
-EOM
-fn=d~
-rp='Where do you keep publicly executable scripts?'
-. ./getfile
-if $test "X$ansexp" != "X$scriptdirexp"; then
- installscript=''
-fi
-scriptdir="$ans"
-scriptdirexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-scripts 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 "$installscript" in
- '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installscript";;
- esac
- fn=de~
- rp='Where will public scripts be installed?'
- . ./getfile
- installscript="$ans"
-else
- installscript="$scriptdirexp"
-fi
-
-: determine where site specific libraries go.
-set sitelib sitelib
-eval $prefixit
-case "$sitelib" in
-'')
- prog=`echo $package | $sed 's/-*[0-9.]*$//'`
- dflt="$privlib/site_$prog" ;;
-*) dflt="$sitelib" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-site-specific extensions and modules. Some users find it convenient
-to place all local files in this directory rather than in the main
-distribution directory.
-
-EOM
-fn=d~+
-rp='Pathname for the site-specific library files?'
-. ./getfile
-if $test "X$sitelibexp" != "X$ansexp"; then
- installsitelib=''
-fi
-sitelib="$ans"
-sitelibexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific files 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 "$installsitelib" in
- '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitelib";;
- esac
- fn=de~
- rp='Where will site-specific files be installed?'
- . ./getfile
- installsitelib="$ans"
-else
- installsitelib="$sitelibexp"
-fi
-
-: determine where site specific architecture-dependent libraries go.
-xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
-: xxx is usuually lib/site_perl/archname.
-set sitearch sitearch none
-eval $prefixit
-case "$sitearch" in
-'') dflt="$sitelib/$archname" ;;
-*) dflt="$sitearch" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-architecture-dependent site-specific extensions and modules.
-
-EOM
-fn=nd~+
-rp='Pathname for the site-specific architecture-dependent library files?'
-. ./getfile
-if $test "X$sitearchexp" != "X$ansexp"; then
- installsitearch=''
-fi
-sitearch="$ans"
-sitearchexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific architecture-dependent library files 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 "$installsitearch" in
- '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitearch";;
- esac
- fn=de~
- rp='Where will site-specific architecture-dependent files be installed?'
- . ./getfile
- installsitearch="$ans"
-else
- installsitearch="$sitearchexp"
-fi
-
: see what memory models we can support
case "$models" in
'')
@@ -4341,7 +3961,12 @@ $rm -f try try.* core
compile='
mc_file=$1;
shift;
-$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs;'
echo " "
echo "Checking for GNU C Library..." >&4
@@ -4354,7 +3979,7 @@ main()
EOM
set gnulibc
if eval $compile && \
- ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+ ./gnulibc | $contains '^GNU C Library'; then
val="$define"
echo "You are using the GNU C Library"
else
@@ -4368,12 +3993,26 @@ eval $setvar
: see if nm is to be used to determine whether a symbol is defined or not
case "$usenm" in
'')
+ dflt=''
case "$d_gnulibc" in
- $define)
+ "$define")
+ echo " "
+ echo "nm probably won't work on the GNU C Library." >&4
dflt=n
;;
- *)
- dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+ esac
+ case "$dflt" in
+ '')
+ if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+ echo " "
+ echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
+ echo "'nm' won't be sufficient on this sytem." >&4
+ dflt=n
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ '') dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
if $test $dflt -gt 20; then
dflt=y
else
@@ -4384,26 +4023,28 @@ case "$usenm" in
;;
*)
case "$usenm" in
- true) dflt=y;;
+ true|$define) 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.
+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 probably shouldn't let me use 'nm' if you are using 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;;
+[Nn]*) usenm=false;;
*) usenm=true;;
esac
@@ -4666,12 +4307,27 @@ 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
+ if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
+ for thisname in $libnames $libc; do
$ar t $thisname >>libc.tmp
done
$sed -e "s/\\$_o\$//" < libc.tmp > libc.list
echo "Ok." >&4
+ elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+ # Repeat libc to extract forwarders to DLL entries too
+ for thisname in $libnames $libc; do
+ $ar tv $thisname >>libc.tmp
+ # Revision 50 of EMX has bug in $ar.
+ # it will not extract forwarders to DLL entries
+ # Use emximp which will extract exactly them.
+ emximp -o tmp.imp $thisname \
+ 2>/dev/null && \
+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+ < tmp.imp >>libc.tmp
+ $rm tmp.imp
+ done
+ $sed -e "s/\\$_o\$//" -e 's/^ \+//' < 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
@@ -4885,7 +4541,7 @@ $undef|n|false)
$define) dflt='y' ;;
esac
: Does a dl_xxx.xs file exist for this operating system
- $test -f ../$dldir/dl_${osname}.xs && dflt='y'
+ $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
;;
esac
rp="Do you wish to use dynamic loading?"
@@ -4895,7 +4551,7 @@ case "$ans" in
y*) usedl="$define"
case "$dlsrc" in
'')
- if $test -f ../$dldir/dl_${osname}.xs ; then
+ if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
dflt="$dldir/dl_${osname}.xs"
elif $test "$d_dlopen" = "$define" ; then
dflt="$dldir/dl_dlopen.xs"
@@ -4910,15 +4566,17 @@ y*) usedl="$define"
esac
echo "The following dynamic loading files are available:"
: Can not go over to $dldir because getfile has path hard-coded in.
- cd ..; ls -C $dldir/dl*.xs; cd UU
- rp="Source file to use for dynamic loading"
- fn="fne"
- . ./getfile
+ tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
+ rp="Source file to use for dynamic loading"
+ fn="fne"
+ # XXX This getfile call will fail the existence check if you try
+ # building away from $src (this is not supported yet).
+ . ./getfile
usedl="$define"
: emulate basename
dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
- $cat << EOM
+ $cat << EOM
Some systems may require passing special flags to $cc -c to
compile modules that will be used to create a shared library.
@@ -5135,11 +4793,11 @@ EOM
# Why does next4 have to be so different?
case "${osname}${osvers}" in
next4*) xxx='DYLD_LIBRARY_PATH' ;;
+ os2*) xxx='' ;; # Nothing special needed.
*) xxx='LD_LIBRARY_PATH' ;;
esac
- case "$osname" in
- os2) ;;
- *) $cat <<EOM | $tee -a ../config.msg >&4
+ if test X"$xxx" != "X"; then
+ $cat <<EOM | $tee -a ../config.msg >&4
To build perl, you must add the current working directory to your
$xxx environment variable before running make. You can do
@@ -5150,7 +4808,7 @@ for Bourne-style shells, or
for Csh-style shells. You *MUST* do this before running make.
EOM
- esac
+ fi
;;
*) useshrplib='false' ;;
esac
@@ -5296,6 +4954,250 @@ case "$shrpenv" in
'') shrpenv="$tmp_shrpenv" ;;
esac
+: determine where manual pages go
+set man1dir man1dir 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 "$man1dir" in
+ '') man1dir="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$man1dir" in
+' ') dflt=none
+ ;;
+'')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
+ lookpath="$lookpath $prefixexp/man/p_man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/man.1"
+ case "$sysman" in
+ */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
+ *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
+ esac
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$man1dir"
+ ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the main $spackage manual pages (source) go?"
+. ./getfile
+if $test "X$man1direxp" != "X$ansexp"; then
+ installman1dir=''
+fi
+man1dir="$ans"
+man1direxp="$ansexp"
+case "$man1dir" in
+'') man1dir=' '
+ installman1dir='';;
+esac
+if $afs; 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 "$installman1dir" in
+ '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman1dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman1dir="$ans"
+else
+ installman1dir="$man1direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man1dir" in
+' ')
+ man1ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the main $spackage man pages?"
+ case "$man1ext" in
+ '') case "$man1dir" in
+ *1) dflt=1 ;;
+ *1p) dflt=1p ;;
+ *1pm) dflt=1pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L1) dflt=L1;;
+ *) dflt=1;;
+ esac
+ ;;
+ *) dflt="$man1ext";;
+ esac
+ . ./myread
+ man1ext="$ans"
+ ;;
+esac
+
+: see if we can have long filenames
+echo " "
+rmlist="$rmlist /tmp/cf$$"
+$test -d /tmp/cf$$ || mkdir /tmp/cf$$
+first=123456789abcdef
+second=/tmp/cf$$/$first
+$rm -f $first $second
+if (echo hi >$first) 2>/dev/null; then
+ if $test -f 123456789abcde; then
+ echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
+ val="$undef"
+ else
+ if (echo hi >$second) 2>/dev/null; then
+ if $test -f /tmp/cf$$/123456789abcde; then
+ $cat <<'EOM'
+That's peculiar... You can have filenames longer than 14 characters, but only
+on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
+I shall consider your system cannot support long filenames at all.
+EOM
+ val="$undef"
+ else
+ echo 'You can have filenames longer than 14 characters.' >&4
+ val="$define"
+ fi
+ else
+ $cat <<'EOM'
+How confusing! Some of your filesystems are sane enough to allow filenames
+longer than 14 characters but some others like /tmp can't even think about them.
+So, for now on, I shall assume your kernel does not allow them at all.
+EOM
+ val="$undef"
+ fi
+ fi
+else
+ $cat <<'EOM'
+You can't have filenames longer than 14 chars. You can't even think about them!
+EOM
+ val="$undef"
+fi
+set d_flexfnam
+eval $setvar
+$rm -rf /tmp/cf$$ 123456789abcde*
+
+: determine where library module manual pages go
+set man3dir man3dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages for many of the library modules.
+EOM
+
+case "$nroff" in
+nroff)
+ $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+ $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$man3dir" in
+'') case "$prefix" in
+ *$prog*) dflt=`echo $man1dir |
+ $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt="$privlib/man/man3" ;;
+ esac
+ ;;
+' ') dflt=none;;
+*) dflt="$man3dir" ;;
+esac
+echo " "
+
+fn=dn+~
+rp="Where do the $package library man pages (source) go?"
+. ./getfile
+if test "X$man3direxp" != "X$ansexp"; then
+ installman3dir=''
+fi
+
+man3dir="$ans"
+man3direxp="$ansexp"
+case "$man3dir" in
+'') man3dir=' '
+ installman3dir='';;
+esac
+if $afs; 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 "$installman3dir" in
+ '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman3dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman3dir="$ans"
+else
+ installman3dir="$man3direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man3dir" in
+' ')
+ man3ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the $package library man pages?"
+ case "$man3ext" in
+ '') case "$man3dir" in
+ *3) dflt=3 ;;
+ *3p) dflt=3p ;;
+ *3pm) dflt=3pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L3) dflt=L3;;
+ *) dflt=3;;
+ esac
+ ;;
+ *) dflt="$man3ext";;
+ esac
+ . ./myread
+ man3ext="$ans"
+ ;;
+esac
+
: see if we have to deal with yellow pages, now NIS.
if $test -d /usr/etc/yp || $test -d /etc/yp; then
if $test -f /usr/etc/nibindd; then
@@ -5658,6 +5560,149 @@ case "$startperl" in
*) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
esac
+: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
+case "$scriptdir" in
+'')
+ dflt="$bin"
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+ $test -d /usr/local/script && dflt=/usr/local/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+$cat <<EOM
+
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot. You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+
+EOM
+fn=d~
+rp='Where do you keep publicly executable scripts?'
+. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+ installscript=''
+fi
+scriptdir="$ans"
+scriptdirexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+scripts 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 "$installscript" in
+ '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installscript";;
+ esac
+ fn=de~
+ rp='Where will public scripts be installed?'
+ . ./getfile
+ installscript="$ans"
+else
+ installscript="$scriptdirexp"
+fi
+
+: determine where site specific libraries go.
+set sitelib sitelib
+eval $prefixit
+case "$sitelib" in
+'')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ dflt="$privlib/site_$prog" ;;
+*) dflt="$sitelib" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+site-specific extensions and modules. Some users find it convenient
+to place all local files in this directory rather than in the main
+distribution directory.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific library files?'
+. ./getfile
+if $test "X$sitelibexp" != "X$ansexp"; then
+ installsitelib=''
+fi
+sitelib="$ans"
+sitelibexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific files 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 "$installsitelib" in
+ '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitelib";;
+ esac
+ fn=de~
+ rp='Where will site-specific files be installed?'
+ . ./getfile
+ installsitelib="$ans"
+else
+ installsitelib="$sitelibexp"
+fi
+
+: determine where site specific architecture-dependent libraries go.
+xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
+: xxx is usuually lib/site_perl/archname.
+set sitearch sitearch none
+eval $prefixit
+case "$sitearch" in
+'') dflt="$sitelib/$archname" ;;
+*) dflt="$sitearch" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+
+EOM
+fn=nd~+
+rp='Pathname for the site-specific architecture-dependent library files?'
+. ./getfile
+if $test "X$sitearchexp" != "X$ansexp"; then
+ installsitearch=''
+fi
+sitearch="$ans"
+sitearchexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific architecture-dependent library files 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 "$installsitearch" in
+ '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitearch";;
+ esac
+ fn=de~
+ rp='Where will site-specific architecture-dependent files be installed?'
+ . ./getfile
+ installsitearch="$ans"
+else
+ installsitearch="$sitearchexp"
+fi
+
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
@@ -6010,7 +6055,7 @@ main()
}
EOCP
set intsize
- if eval $compile && ./intsize > /dev/null; then
+ if eval $compile_ok && ./intsize > /dev/null; then
eval `./intsize`
echo "Your integers are $intsize bytes long."
echo "Your long integers are $longsize bytes long."
@@ -6120,7 +6165,7 @@ main()
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
yyy=$?
else
@@ -6208,7 +6253,7 @@ main()
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
castflags=$?
else
@@ -6662,7 +6707,7 @@ main() {
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
o_nonblock=`./try`
case "$o_nonblock" in
'') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
@@ -6686,7 +6731,9 @@ case "$eagain" in
#include <sys/types.h>
#include <signal.h>
#define MY_O_NONBLOCK $o_nonblock
+#ifndef errno /* XXX need better Configure test */
extern int errno;
+#endif
$signal_t blech(x) int x; { exit(3); }
EOCP
$cat >> try.c <<'EOCP'
@@ -6741,7 +6788,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
echo "$startsh" >mtry
echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
chmod +x mtry
@@ -6852,6 +6899,34 @@ eval $inlibc
set gethostent d_gethent
eval $inlibc
+hasproto='varname=$1; func=$2; shift; shift;
+while $test $# -ge 2; do
+ case "$1" in
+ $define) echo "#include <$2>";;
+ esac ;
+ shift 2;
+done > try.c;
+$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
+if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
+ echo "$func() prototype found.";
+ val="$define";
+else
+ echo "$func() prototype NOT found.";
+ val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm -f try.c tryout.c'
+
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
+: see if prototypes for various gethostxxx netdb.h functions are available
+echo " "
+set d_gethostprotos gethostent $i_netdb netdb.h
+eval $hasproto
+
: see if getlogin exists
set getlogin d_getlogin
eval $inlibc
@@ -6868,6 +6943,11 @@ eval $inlibc
set getnetent d_getnent
eval $inlibc
+: see if prototypes for various getnetxxx netdb.h functions are available
+echo " "
+set d_getnetprotos getnetent $i_netdb netdb.h
+eval $hasproto
+
: see if getprotobyname exists
set getprotobyname d_getpbyname
@@ -6897,6 +6977,11 @@ eval $inlibc
set getpriority d_getprior
eval $inlibc
+: see if prototypes for various getprotoxxx netdb.h functions are available
+echo " "
+set d_getprotoprotos getprotoent $i_netdb netdb.h
+eval $hasproto
+
: see if getservbyname exists
set getservbyname d_getsbyname
@@ -6910,6 +6995,11 @@ eval $inlibc
set getservent d_getsent
eval $inlibc
+: see if prototypes for various getservxxx netdb.h functions are available
+echo " "
+set d_getservprotos getservent $i_netdb netdb.h
+eval $hasproto
+
: see if gettimeofday or ftime exists
set gettimeofday d_gettimeod
eval $inlibc
@@ -7071,7 +7161,7 @@ eval $inlibc
echo " "
echo $n "Checking to see if your system supports long doubles...$c" >&4
echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c; then
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
val="$define"
echo " Yup, it does." >&4
else
@@ -7083,10 +7173,9 @@ set d_longdbl
eval $setvar
: check for length of long double
-echo " "
-
case "${d_longdbl}${longdblsize}" in
$define)
+ echo " "
$echo $n "Checking to see how big your long doubles are...$c" >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
@@ -7096,16 +7185,60 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
longdblsize=`./try`
+ $echo " $longdblsize bytes." >&4
else
dflt='8'
+ echo " "
echo "(I can't seem to compile the test program. Guessing...)"
rp="What is the size of a long double (in bytes)?"
. ./myread
longdblsize="$ans"
fi
- $echo " $longdblsize bytes."
+ ;;
+esac
+$rm -f try.c try
+
+: check for long long
+echo " "
+echo $n "Checking to see if your system supports long long...$c" >&4
+echo 'long long foo() { long long x; x = 7; return x; }' > try.c
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+ val="$define"
+ echo " Yup, it does." >&4
+else
+ val="$undef"
+ echo " Nope, it doesn't." >&4
+fi
+$rm try.*
+set d_longlong
+eval $setvar
+
+: check for length of long long
+case "${d_longlong}${longlongsize}" in
+$define)
+ echo " "
+ $echo $n "Checking to see how big your long longs are...$c" >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+ printf("%d\n", sizeof(long long));
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ longlongsize=`./try`
+ $echo " $longlongsize bytes." >&4
+ else
+ dflt='8'
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the size of a long long (in bytes)?"
+ . ./myread
+ longlongsize="$ans"
+ fi
;;
esac
$rm -f try.c try
@@ -7538,7 +7671,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7616,7 +7749,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7676,7 +7809,7 @@ exit(0);
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
@@ -7916,12 +8049,7 @@ echo " "
: see if we have sigaction
if set sigaction val -f d_sigaction; eval $csym; $val; then
echo 'sigaction() found.' >&4
- val="$define"
-else
- echo 'sigaction NOT found.' >&4
- val="$undef"
-fi
-$cat > try.c <<'EOP'
+ $cat > try.c <<'EOP'
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
@@ -7930,11 +8058,15 @@ main()
struct sigaction act, oact;
}
EOP
-set try
-if eval $compile; then
- :
+ set try
+ if eval $compile_ok; then
+ val="$define"
+ else
+ echo "But you don't seem to have a useable struct sigaction." >&4
+ val="$undef"
+ fi
else
- echo "But you don't seem to have a useable struct sigaction." >&4
+ echo 'sigaction NOT found.' >&4
val="$undef"
fi
set d_sigaction; eval $setvar
@@ -8008,7 +8140,7 @@ else
else
echo "You don't have Berkeley networking in libc$_a..." >&4
if test -f /usr/lib/libnet$_a; then
- ( (nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
+ ( ($nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
$ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
if $contains socket libc.list >/dev/null 2>&1; then
echo "...but the Wollongong group seems to have hacked it in." >&4
@@ -8310,6 +8442,34 @@ case "$varval" in
*) eval "$var=\$varval";;
esac'
+: define an is-a-typedef? function that prompts if the type is not available.
+typedef_ask='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;
+ echo " " ;
+ echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
+ if $contains $type temp.E >/dev/null 2>&1; then
+ echo "$type found." >&4;
+ eval "$var=\$type";
+ else
+ echo "$type NOT found." >&4;
+ dflt="$def";
+ . ./myread ;
+ eval "$var=\$ans";
+ fi;
+ $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
: see if this is a sys/times.h system
set sys/times.h i_systimes
eval $inhdr
@@ -8323,13 +8483,9 @@ if set times val -f d_times; eval $csym; $val; then
case "$i_systimes" in
"$define") inc='sys/times.h';;
esac
+ rp="What is the type returned by times() on this system?"
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"
+ eval $typedef_ask
else
echo 'times() NOT found, hope that will do.' >&4
d_times="$undef"
@@ -8472,7 +8628,7 @@ case "$d_closedir" in
int main() { return closedir(opendir(".")); }
EOM
set closedir
- if eval $compile; then
+ if eval $compile_ok; then
if ./closedir > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
@@ -8561,7 +8717,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try`
else
dflt='8'
@@ -8673,51 +8829,6 @@ set db.h i_db
eval $inhdr
case "$i_db" in
-define)
- : Check the return type needed for hash
- echo " "
- echo "Checking return type needed for hash for Berkeley DB ..." >&4
- $cat >try.c <<EOCP
-#$d_const HASCONST
-#ifndef HASCONST
-#define const
-#endif
-#include <sys/types.h>
-#include <db.h>
-
-#ifndef DB_VERSION_MAJOR
-u_int32_t hash_cb (ptr, size)
-const void *ptr;
-size_t size;
-{
-}
-HASHINFO info;
-main()
-{
- info.hash = hash_cb;
-}
-#endif
-EOCP
- if $cc $ccflags -c try.c >try.out 2>&1 ; then
- if $contains warning try.out >>/dev/null 2>&1 ; then
- db_hashtype='int'
- else
- db_hashtype='u_int32_t'
- fi
- else
- : XXX Maybe we should just give up here.
- db_hashtype=u_int32_t
- echo "Help: I can't seem to compile the db test program." >&4
- echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
- fi
- $rm -f try.*
- echo "Your version of Berkeley DB uses $db_hashtype for hash."
- ;;
-*) db_hashtype=u_int32_t
- ;;
-esac
-
-case "$i_db" in
$define)
: Check db version.
echo " "
@@ -8795,6 +8906,51 @@ esac
case "$i_db" in
define)
+ : Check the return type needed for hash
+ echo " "
+ echo "Checking return type needed for hash for Berkeley DB ..." >&4
+ $cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+
+#ifndef DB_VERSION_MAJOR
+u_int32_t hash_cb (ptr, size)
+const void *ptr;
+size_t size;
+{
+}
+HASHINFO info;
+main()
+{
+ info.hash = hash_cb;
+}
+#endif
+EOCP
+ if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $contains warning try.out >>/dev/null 2>&1 ; then
+ db_hashtype='int'
+ else
+ db_hashtype='u_int32_t'
+ fi
+ else
+ : XXX Maybe we should just give up here.
+ db_hashtype=u_int32_t
+ $cat try.out >&4
+ echo "Help: I can't seem to compile the db test program." >&4
+ echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
+ fi
+ $rm -f try.*
+ echo "Your version of Berkeley DB uses $db_hashtype for hash."
+ ;;
+*) db_hashtype=u_int32_t
+ ;;
+esac
+case "$i_db" in
+define)
: Check the return type needed for prefix
echo " "
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
@@ -8828,6 +8984,7 @@ EOCP
else
db_prefixtype='size_t'
: XXX Maybe we should just give up here.
+ $cat try.out >&4
echo "Help: I can't seem to compile the db test program." >&4
echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
fi
@@ -8946,7 +9103,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
doublesize=`./try`
$echo $doublesize >&4
else
@@ -8961,13 +9118,9 @@ esac
$rm -f try.c try
: see what type file positions are declared as in the library
-set fpos_t fpostype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$fpostype"
rp="What is the type for file position used by fsetpos()?"
-. ./myread
-fpostype="$ans"
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef_ask
: get csh whereabouts
case "$csh" in
@@ -8985,6 +9138,8 @@ esac
full_sed=$sed
: see what type gids are declared as in the kernel
+echo " "
+echo "Looking for the type for group ids returned by getgid()."
set gid_t gidtype xxx stdio.h sys/types.h
eval $typedef
case "$gidtype" in
@@ -8998,10 +9153,13 @@ xxx)
;;
*) dflt="$gidtype";;
esac
-echo " "
-rp="What is the type for group ids returned by getgid()?"
-. ./myread
-gidtype="$ans"
+case "$gidtype" in
+gid_t) echo "gid_t found." ;;
+*) rp="What is the type for group ids returned by getgid()?"
+ . ./myread
+ gidtype="$ans"
+ ;;
+esac
: see if getgroups exists
set getgroups d_getgrps
@@ -9021,11 +9179,11 @@ case "$d_getgrps$d_setgrps" in
*) dflt="$groupstype" ;;
esac
$cat <<EOM
-What is the type of the second argument to getgroups() and setgroups()?
+What type of pointer is the second argument to getgroups() and setgroups()?
Usually this is the same as group ids, $gidtype, but not always.
EOM
- rp='What type is the second argument to getgroups() and setgroups()?'
+ rp='What type pointer is the second argument to getgroups() and setgroups()?'
. ./myread
groupstype="$ans"
;;
@@ -9033,13 +9191,9 @@ EOM
esac
: see what type lseek is declared as in the kernel
+rp="What is the type used for lseek's offset on this system?"
set off_t lseektype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$lseektype"
-rp="What type is lseek's offset on this system declared as?"
-. ./myread
-lseektype="$ans"
+eval $typedef_ask
echo " "
echo "Checking if your $make program sets \$(MAKE)..." >&4
@@ -9062,13 +9216,9 @@ case "$make_set_make" in
esac
: see what type is used for mode_t
+rp="What is the type used for file modes for system calls (e.g. fchmod())?"
set mode_t modetype int stdio.h sys/types.h
-eval $typedef
-dflt="$modetype"
-echo " "
-rp="What type is used for file modes?"
-. ./myread
-modetype="$ans"
+eval $typedef_ask
: Cruising for prototypes
echo " "
@@ -9129,18 +9279,10 @@ EOSH
chmod +x protochk
$eunicefix protochk
-: see if this is a netdb.h system
-set netdb.h i_netdb
-eval $inhdr
-
: see what type is used for size_t
+rp="What is the type used for the length parameter for string functions?"
set size_t sizetype 'unsigned int' stdio.h sys/types.h
-eval $typedef
-dflt="$sizetype"
-echo " "
-rp="What type is used for the length parameter for string functions?"
-. ./myread
-sizetype="$ans"
+eval $typedef_ask
: check for type of arguments to gethostbyaddr.
if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
@@ -9295,19 +9437,15 @@ rp='What pager is used on your system?'
pager="$ans"
: see what type pids are declared as in the kernel
+rp="What is the type of process ids on this system?"
set pid_t pidtype int stdio.h sys/types.h
-eval $typedef
-dflt="$pidtype"
-echo " "
-rp="What type are process ids on this system declared as?"
-. ./myread
-pidtype="$ans"
+eval $typedef_ask
: check for length of pointer
echo " "
case "$ptrsize" in
'')
- echo "Checking to see how big your pointers are..." >&4
+ $echo $n "Checking to see how big your pointers are...$c" >&4
if test "$voidflags" -gt 7; then
echo '#define VOID_PTR char *' > try.c
else
@@ -9322,8 +9460,9 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
ptrsize=`./try`
+ $echo " $ptrsize bytes." >&4
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)" >&4
@@ -9368,7 +9507,7 @@ main()
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try$_exe`
else
dflt='?'
@@ -9665,9 +9804,10 @@ xxx="$xxx LOST PHONE PIPE POLL PROF PWR QUIT SEGV STKFLT STOP SYS TERM TRAP"
xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
: generate a few handy files for later
-$cat > signal.c <<'EOP'
+$cat > signal.c <<'EOCP'
#include <sys/types.h>
#include <signal.h>
+#include <stdio.h>
int main() {
/* Strange style to avoid deeply-nested #if/#else/#endif */
@@ -9722,7 +9862,10 @@ int main() {
printf("NSIG %d\n", NSIG);
-EOP
+#ifndef JUST_NSIG
+
+EOCP
+
echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
{
printf "#ifdef SIG"; printf $1; printf "\n"
@@ -9731,6 +9874,7 @@ echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
printf "#endif\n"
}
END {
+ printf "#endif /* JUST_NSIG */\n";
printf "}\n";
}
' >>signal.c
@@ -9767,22 +9911,69 @@ END {
EOP
$cat >signal_cmd <<EOS
$startsh
-$test -s signal.lst && exit 0
-if $cc $optimize $ccflags $ldflags -o signal signal.c $libs >/dev/null 2>&1; then
+if $test -s signal.lst; then
+ echo "Using your existing signal.lst file"
+ exit 0
+fi
+xxx="$xxx"
+EOS
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; then
./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
else
- echo "(I can't seem be able to compile the test program -- Guessing)"
+ echo "(I can't seem be able to compile the whole test program)" >&4
+ echo "(I'll try it in little pieces.)" >&4
+ set signal -DJUST_NSIG
+ if eval $compile_ok; then
+ ./signal$_exe > signal.nsg
+ $cat signal.nsg
+ else
+ echo "I can't seem to figure out how many signals you have." >&4
+ echo "Guessing 50." >&4
+ echo 'NSIG 50' > signal.nsg
+ fi
+ : Now look at all the signal names, one at a time.
+ for xx in `echo $xxx | $tr ' ' '\012' | $sort | $uniq`; do
+ $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+ set signal
+ if eval $compile; then
+ echo "SIG${xx} found."
+ ./signal$_exe >> signal.ls1
+ else
+ echo "SIG${xx} NOT found."
+ fi
+ done
+ if $test -s signal.ls1; then
+ $cat signal.nsg signal.ls1 |
+ $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+ fi
+
+fi
+if $test -s signal.lst; then
+ :
+else
+ echo "(AAK! I can't compile the test programs -- Guessing)" >&4
echo 'kill -l' >signal
- set X \`csh -f <signal\`
+ set X `csh -f <signal`
$rm -f signal
shift
- case \$# in
+ case $# in
0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
esac
- echo \$@ | $tr ' ' '\012' | \
- $awk '{ printf \$1; printf " %d\n", ++s; }' >signal.lst
+ echo $@ | $tr ' ' '\012' | \
+ $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst
fi
-$rm -f signal.c signal signal$_o
+$rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
EOS
chmod a+x signal_cmd
$eunicefix signal_cmd
@@ -9792,7 +9983,7 @@ echo " "
case "$sig_name_init" in
'')
echo "Generating a list of signal names and numbers..." >&4
- ./signal_cmd
+ . ./signal_cmd
sig_name=`$awk '{printf "%s ", $1}' signal.lst`
sig_name="ZERO $sig_name"
sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
@@ -9843,7 +10034,7 @@ main()
EOM
echo " "
set ssize
-if eval $compile && ./ssize > /dev/null; then
+if eval $compile_ok && ./ssize > /dev/null; then
ssizetype=`./ssize`
echo "I'll be using $ssizetype for functions returning a byte count." >&4
else
@@ -9877,13 +10068,9 @@ echo " "
if set time val -f d_time; eval $csym; $val; then
echo 'time() found.' >&4
val="$define"
+ rp="What is the type returned by time() on this system?"
set time_t timetype long stdio.h sys/types.h
- eval $typedef
- dflt="$timetype"
- echo " "
- rp="What type is returned by time() on this system?"
- . ./myread
- timetype="$ans"
+ eval $typedef_ask
else
echo 'time() not found, hope that will do.' >&4
val="$undef"
@@ -9893,6 +10080,8 @@ set d_time
eval $setvar
: see what type uids are declared as in the kernel
+echo " "
+echo "Looking for the type for user ids returned by getuid()."
set uid_t uidtype xxx stdio.h sys/types.h
eval $typedef
case "$uidtype" in
@@ -9906,10 +10095,13 @@ xxx)
;;
*) dflt="$uidtype";;
esac
-echo " "
-rp="What is the type for user ids returned by getuid()?"
-. ./myread
-uidtype="$ans"
+case "$uidtype" in
+uid_t) echo "uid_t found." ;;
+*) rp="What is the type for user ids returned by getuid()?"
+ . ./myread
+ uidtype="$ans"
+ ;;
+esac
: see if dbm.h is available
: see if dbmclose exists
@@ -10405,7 +10597,8 @@ eval $setvar
echo " "
echo "Looking for extensions..." >&4
-cd ../ext
+tdir=`pwd`
+cd $rsrc/ext
: If we are using the old config.sh, known_extensions may contain
: old or inaccurate or duplicate values.
known_extensions=''
@@ -10426,7 +10619,7 @@ for xxx in * ; do
known_extensions="$known_extensions $xxx/$yyy"
fi
done
- cd ..
+ cd ..
fi
fi
;;
@@ -10435,7 +10628,7 @@ done
set X $known_extensions
shift
known_extensions="$*"
-cd ../UU
+cd $tdir
: Now see which are supported on this system.
avail_ext=''
@@ -10779,10 +10972,12 @@ d_gethbyaddr='$d_gethbyaddr'
d_gethbyname='$d_gethbyname'
d_gethent='$d_gethent'
d_gethname='$d_gethname'
+d_gethostprotos='$d_gethostprotos'
d_getlogin='$d_getlogin'
d_getnbyaddr='$d_getnbyaddr'
d_getnbyname='$d_getnbyname'
d_getnent='$d_getnent'
+d_getnetprotos='$d_getnetprotos'
d_getpbyname='$d_getpbyname'
d_getpbynumber='$d_getpbynumber'
d_getpent='$d_getpent'
@@ -10791,9 +10986,11 @@ d_getpgrp2='$d_getpgrp2'
d_getpgrp='$d_getpgrp'
d_getppid='$d_getppid'
d_getprior='$d_getprior'
+d_getprotoprotos='$d_getprotoprotos'
d_getsbyname='$d_getsbyname'
d_getsbyport='$d_getsbyport'
d_getsent='$d_getsent'
+d_getservprotos='$d_getservprotos'
d_gettimeod='$d_gettimeod'
d_gnulibc='$d_gnulibc'
d_htonl='$d_htonl'
@@ -10805,6 +11002,7 @@ d_link='$d_link'
d_locconv='$d_locconv'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
+d_longlong='$d_longlong'
d_lstat='$d_lstat'
d_mblen='$d_mblen'
d_mbstowcs='$d_mbstowcs'
@@ -10953,7 +11151,6 @@ fpostype='$fpostype'
freetype='$freetype'
full_csh='$full_csh'
full_sed='$full_sed'
-gcc='$gcc'
gccversion='$gccversion'
gidtype='$gidtype'
glibpth='$glibpth'
@@ -11051,6 +11248,7 @@ lns='$lns'
locincpth='$locincpth'
loclibpth='$loclibpth'
longdblsize='$longdblsize'
+longlongsize='$longlongsize'
longsize='$longsize'
lp='$lp'
lpr='$lpr'