# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Wed Feb 23 21:51:47 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sat Feb 26 00:48:15 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_flexfnam=''
d_flock=''
d_fork=''
+d_fpos64_t=''
d_fs_data_s=''
d_fseeko=''
d_fsetpos=''
d_gettimeod=''
d_Gconvert=''
d_getcwd=''
+d_getfsstat=''
d_getgrent=''
d_getgrps=''
d_gethbyaddr=''
longdblsize=''
d_longlong=''
longlongsize=''
+d_lseekproto=''
d_lstat=''
d_mblen=''
d_mbstowcs=''
d_msync=''
d_munmap=''
d_nice=''
+d_off64_t=''
d_open3=''
d_fpathconf=''
d_pathconf=''
intsize=''
longsize=''
shortsize=''
-d_fpos64_t=''
-d_off64_t=''
libc=''
ldlibpthname=''
libperl=''
api_version=''
api_versionstring=''
patchlevel=''
+revision=''
subversion=''
version=''
+perl5=''
perladmin=''
perlpath=''
d_nv_preserves_uv=''
siteprefixexp=''
sizetype=''
so=''
+socksizetype=''
sharpbang=''
shsharp=''
spitshell=''
uidtype=''
archname64=''
use64bits=''
+usefull64bits=''
uselargefiles=''
uselongdouble=''
usemorebits=''
more
nm
nroff
-perl
pg
test
uname
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+ echo " "
echo "If this doesn't make any sense to you, just accept the default '$dflt'."
rp='Build Perl for multiplicity?'
. ./myread
eval $typedef_ask
echo " "
-$echo $n "Checking to see how big your file offsets are...$c" >&4
+echo "Checking to see how big your file offsets are..." >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
set try
if eval $compile_ok; then
lseeksize=`./try`
- $echo " $lseeksize bytes." >&4
+ echo "Your file offsets are $lseeksize bytes long."
else
dflt=$longsize
echo " "
*_t) zzz="$fpostype" ;;
*) zzz="fpos_t" ;;
esac
-$echo $n "Checking the size of $zzz...$c" >&4
+echo "Checking the size of $zzz..." >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
yyy=`./try`
case "$yyy" in
'') fpossize=4
- echo " " >&4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes." >&4
+ echo "Your $zzz is $fpossize bytes long."
;;
esac
else
echo "Your platform has some specific hints for large file builds, using them..."
. ./uselfs.cbu
echo " "
- $echo $n "Rechecking to see how big your file offsets are...$c" >&4
+ echo "Rechecking to see how big your file offsets are..." >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
set try
if eval $compile_ok; then
lseeksize=`./try`
- $echo " $lseeksize bytes." >&4
+ $echo "Your file offsets are now $lseeksize bytes long."
else
dflt="$lseeksize"
echo " "
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes."
+ echo " $fpossize bytes." >&4
;;
esac
else
esac
-case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
+# Backward compatibility (uselonglong is deprecated).
+case "$uselonglong" in
+"$define"|true|[yY]*)
+ cat <<EOM >&4
+
+*** Configure -Duselonglong is deprecated, using the -Duse64bits instead.
+
+EOM
+ use64bits="$define"
+ ;;
+esac
+case "$ccflags" in
+*-DUSE_LONG_LONG*|*-DUSE_64_BITS*|*-DUSE_FULL_64_BITS*) use64bits="$define";;
+esac
+case "$usefull64bits" in
+"$define"|true|[yY]*) use64bits="$define" ;;
+esac
+
+case "$longsize" in
+8) cat <<EOM
-You have natively 64-bit integers.
+You have natively 64-bit long integers.
EOM
val="$define"
;;
-*) case "$ccflags" in
- *-DUSE_64_BITS*|*-DUSE_LONG_LONG*) use64bits="$define";;
- *) case "$uselonglong" in
- $define|true|[yY]*) use64bits="$define";;
- esac
- ;;
- esac
- case "$use64bits" in
- $define|true|[yY]*) dflt='y';;
+*) case "$use64bits" in
+ "$define"|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
-cat <<EOM
+ cat <<EOM
Perl can be built to take advantage of 64-bit integer types
on some systems. To do so, Configure can be run with -Duse64bits.
+Choosing this option will most probably introduce binary incompatibilities.
If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
set use64bits
eval $setvar
-case "$archname64" in
-'') archname64='' ;; # not a typo
-esac
+case "$usefull64bits" in
+"$define"|true|[yY]*) val="$define" ;;
+*) case "$use64bits" in
+ "$define") case "$longsize" in
+ 4) dflt='n'
+ cat <<EOM
+
+Since you chose 64-bitness you may want to try maximal 64-bitness.
+What you have chosen is minimal 64-bitness which means just enough
+to get 64-bit integers. The maximal means using as much 64-bitness
+as is possible on the platform. This in turn means even more binary
+incompatibilities. On the other hand, your platform may not have
+any more maximal 64-bitness than what you already have chosen.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+ rp='Try to use full 64-bit support, if available?'
+ . ./myread
+ case "$ans" in
+ [yY]*) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+ 8) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+ *) val="$undef" ;;
+ esac
+ ;;
+esac
+set usefull64bits
+eval $setvar
case "$use64bits" in
"$define"|true|[yY]*)
if $test -f use64bits.cbu; then
echo "Your platform has some specific hints for 64-bit builds, using them..."
. ./use64bits.cbu
- else
- $cat <<EOM
-(Your platform doesn't have any specific hints for 64-bit builds.)
-EOM
- case "$intsize:$longsize" in
-8:*|*:8) cat <<EOM
-(This is probably okay, as your system is a natively 64-bit system.)
-EOM
- ;;
- esac
- case "$gccversion" in
- '') ;;
- *) case "$ccflags" in
- *-DUSE_64_BITS*) ;;
- *) $cat <<EOM
-But since you seem to be using gcc, I will now add -DUSE_64_BITS
-to the compilation flags to get long longs.
-EOM
- ccflags="$ccflags -DUSE_64_BITS"
- ;;
- esac
- ;;
- esac
fi
+ case "$longsize" in
+ 4) case "$ccflags" in
+ *-DUSE_64_BITS*) ;;
+ *) ccflags="$ccflags -DUSE_64_BITS";;
+ esac
+ case "$archname64" in
+ '') archname64=64 ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+case "$usefull64bits" in
+"$define"|true|[yY]*)
+: Look for a hint-file generated 'call-back-unit'. If the
+: user has specified that a full 64-bit perl is to be built,
+: we may need to set or change some other defaults.
+ if $test -f usefull64bits.cbu; then
+ echo "Your platform has some specific hints for full 64-bit builds, using them..."
+ . ./usefull64bits.cbu
+ fi
+ case "$longsize" in
+ 4) case "$ccflags" in
+ *-DUSE_FULL_64_BITS*) ;;
+ *) ccflags="$ccflags -DUSE_FULL_64_BITS";;
+ esac
+ case "$archname64" in
+ ''|64) archname64=full64 ;;
+ esac
+ ;;
+ esac
;;
esac
esac;;
esac'
-: set the base revision
-baserev=5.0
-
: get the patchlevel
echo " "
echo "Getting the current patchlevel..." >&4
if $test -r $rsrc/patchlevel.h;then
+ revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h`
patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h`
api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h`
api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
else
+ revision=0
patchlevel=0
subversion=0
api_revision=0
api_version=0
api_subversion=0
fi
-$echo $n "(You have $package" $c
-case "$package" in
-"*$baserev") ;;
-*) $echo $n " $baserev" $c ;;
-esac
+$echo $n "(You have $package revision $revision" $c
$echo $n " patchlevel $patchlevel" $c
test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
echo ".)"
case "$osname" in
dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
- version=`echo $baserev $patchlevel $subversion | \
+ version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
;;
*)
- version=`echo $baserev $patchlevel $subversion | \
+ version=`echo $revision $patchlevel $subversion | \
$awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
api_versionstring=`echo $api_revision $api_version $api_subversion | \
$awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
rp='Do you want to configure vendor-specific add-on directories?'
case "$usevendorprefix" in
define|true|[yY]*) dflt=y ;;
-*) dflt=n ;;
+*) : User may have set vendorprefix directly on Configure command line.
+ case "$vendorprefix" in
+ ''|' ') dflt=n ;;
+ *) dflt=y ;;
+ esac
+ ;;
esac
. ./myread
case "$ans" in
*) dflt=$vendorprefix ;;
esac
. ./getfile
+ : XXX Prefixit unit does not yet support siteprefix and vendorprefix
oldvendorprefix=''
case "$vendorprefix" in
'') ;;
*) d_vendorlib="$define"
: determine where vendor-supplied modules go.
: Usual default is /usr/local/lib/perl5/vendor_perl/$version
- prog=`echo $package | $sed 's/-*[0-9.]*$//'`
- case "$installstyle" in
- *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
- *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+ case "$vendorlib" in
+ '')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ case "$installstyle" in
+ *lib/perl5*) dflt=$vendorprefix/lib/$package/vendor_$prog/$version ;;
+ *) dflt=$vendorprefix/lib/vendor_$prog/$version ;;
+ esac
+ ;;
+ *) dflt="$vendorlib"
+ ;;
esac
fn=d~+
rp='Pathname for the vendor-supplied library files?'
. ./getfile
vendorlib="$ans"
vendorlibexp="$ansexp"
- : Change installation prefix, if necessary.
- if $test X"$prefix" != X"$installprefix"; then
- installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
- else
- installvendorlib="$vendorlibexp"
- fi
;;
esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+ installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
+else
+ installvendorlib="$vendorlibexp"
+fi
: Cruising for prototypes
echo " "
installbin="$binexp"
fi
+: Find perl5.005 or later.
+echo "Looking for a previously installed perl5.005 or later... "
+case "$perl5" in
+'') for tdir in `echo "$binexp:$PATH" | $sed "s/$path_sep/ /g"`; do
+ : Check if this perl is recent and can load a simple module
+ if $test -x $tdir/perl && $tdir/perl -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+ perl5=$tdir/perl
+ break;
+ elif $test -x $tdir/perl5 && $tdir/perl5 -Mless -e 'use 5.005;' >/dev/null 2>&1; then
+ perl5=$tdir/perl
+ break;
+ fi
+ done
+ ;;
+*) perl5="$perl5"
+ ;;
+esac
+case "$perl5" in
+'') echo "None found. That's ok.";;
+*) echo "Using $perl5." ;;
+esac
+
$cat <<EOM
After $package is installed, you may wish to install various
*) dflt=$siteprefix ;;
esac
. ./getfile
+: XXX Prefixit unit does not yet support siteprefix and vendorprefix
oldsiteprefix=''
case "$siteprefix" in
'') ;;
-*)
- case "$ans" in
+*) case "$ans" in
"$prefix") ;;
*) oldsiteprefix="$prefix";;
esac
: The default "style" setting is made in installstyle.U
: XXX No longer works with Prefixit stuff.
prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-case "$installstyle" in
-*lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
-*) dflt=$siteprefix/lib/site_$prog/$version ;;
+case "$sitelib" in
+'') case "$installstyle" in
+ *lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;;
+ *) dflt=$siteprefix/lib/site_$prog/$version ;;
+ esac
+ ;;
+*) dflt="$sitelib"
+ ;;
esac
$cat <<EOM
sitelibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"`
+ installsitelib=`echo $sitelibexp | $sed "s#^$prefix#$installprefix#"`
else
installsitelib="$sitelibexp"
fi
: Determine list of previous versions to include in @INC
$cat > getverlist <<EOPL
-#!$perl -w
+#!$perl5 -w
use File::Basename;
\$api_versionstring = "$api_versionstring";
\$version = "$version";
# Can't have leading @ because metaconfig interprets it as a command!
;@inc_version_list=();
$stem=dirname($sitelib);
-# Redo to do opendir/readdir?
+# XXX Redo to do opendir/readdir?
if (-d $stem) {
chdir($stem);
;@candidates = glob("5.*");
EOPL
chmod +x getverlist
case "$inc_version_list" in
-'') if test -x $perl; then
- dflt=`$perl getverlist`
+'') if test -x "$perl5"; then
+ dflt=`$perl5 getverlist`
else
dflt='none'
fi
$undef) dflt='none' ;;
*) dflt="$inc_version_list" ;;
esac
+case "$dflt" in
+''|' ') dflt=none ;;
+esac
$cat <<'EOM'
In order to ease the process of upgrading, this version of perl
rp='List of earlier versions to include in @INC?'
. ./myread
case "$ans" in
-[Nn]one) inc_version_list=' ' ;;
+[Nn]one|''|' ') inc_version_list=' ' ;;
*) inc_version_list="$ans" ;;
esac
case "$inc_version_list" in
: sitelib default is /usr/local/lib/perl5/site_perl/$version
: sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname
: sitelib may have an optional trailing /share.
-tdflt=`echo $sitelib | $sed 's,/share$,,'`
-tdflt="$tdflt/$archname"
-set sitearch sitearch none
-eval $prefixit
case "$sitearch" in
-'') dflt="$tdflt" ;;
-*) dflt="$sitearch" ;;
+'') dflt=`echo $sitelib | $sed 's,/share$,,'`
+ dflt="$dflt/$archname"
+ ;;
+*) dflt="$sitearch"
+ ;;
esac
+set sitearch sitearch none
+eval $prefixit
$cat <<EOM
The installation process will also create a directory for
architecture-dependent site-specific extensions and modules.
EOM
-fn=nd~+
+fn=d~+
rp='Pathname for the site-specific architecture-dependent library files?'
. ./getfile
sitearch="$ans"
: determine where add-on public executables go
case "$sitebin" in
'') dflt=$siteprefix/bin ;;
-*) dflt=$sitebin ;;
+*) dflt=$sitebin ;;
esac
fn=d~
rp='Pathname where the add-on public executables should be installed?'
;;
*) d_vendorbin="$define"
: determine where vendor-supplied executables go.
- dflt=$vendorprefix/bin
+ case "$vendorbin" in
+ '') dflt=$vendorprefix/bin ;;
+ *) dflt="$vendorbin" ;;
+ esac
fn=d~+
rp='Pathname for the vendor-supplied executables directory?'
. ./getfile
vendorbin="$ans"
vendorbinexp="$ansexp"
- : Change installation prefix, if necessary.
- if $test X"$prefix" != X"$installprefix"; then
- installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
- else
- installvendorbin="$vendorbinexp"
- fi
;;
esac
+: Change installation prefix, if necessary.
+if $test X"$prefix" != X"$installprefix"; then
+ installvendorbin=`echo $vendorbinexp | $sed "s#^$prefix#$installprefix#"`
+else
+ installvendorbin="$vendorbinexp"
+fi
: check for length of double
echo " "
case "$doublesize" in
'')
- $echo $n "Checking to see how big your double precision numbers are...$c" >&4
+ echo "Checking to see how big your double precision numbers are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile_ok; then
doublesize=`./try`
- $echo " $doublesize bytes." >&4
+ echo "Your double is $doublesize bytes long."
else
dflt='8'
echo "(I can't seem to compile the test program. Guessing...)"
: check for long doubles
echo " "
-$echo $n "Checking to see if your system supports long double..." $c >&4
+echo "Checking to see if you have long double..." >&4
echo 'int main() { long double x = 7.0; }' > try.c
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo "You have long double."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo "You do not have long double."
fi
$rm try.*
set d_longdbl
case "${d_longdbl}${longdblsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long doubles are..." $c >&4
+ echo "Checking to see how big your long doubles are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile; then
longdblsize=`./try$exe_ext`
- $echo " $longdblsize bytes." >&4
+ echo "Your long doubles are $longdblsize bytes long."
else
dflt='8'
echo " "
eval $inlibc
-: check for off64_t
-echo " "
-echo "Checking to see if your system supports off64_t..." >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-int main() { off64_t x = 7; }'
-EOCP
-set try
-if eval $compile; then
- val="$define"
- echo "Yes, it does."
-else
- val="$undef"
- echo "No, it doesn't."
- case "$lseeksize" in
- 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
- esac
-fi
-$rm -f try.* try
-set d_off64_t
-eval $setvar
-
: check for fpos64_t
echo " "
-echo "Checking to see if your system supports fpos64_t..." >&4
+echo "Checking to see if you have fpos64_t..." >&4
$cat >try.c <<EOCP
-#include <sys/stdio.h>
-int main() { fpos64_t x x = 7; }'
+#include <stdio.h>
+int main() { fpos64_t x = 7; }
EOCP
set try
if eval $compile; then
val="$define"
- echo "Yes, it does."
+ echo "You have fpos64_t."
else
val="$undef"
- echo "No, it doesn't."
+ echo "You do not have fpos64_t."
case "$fpossize" in
8) echo "(Your fpos_t is 64 bits, so you could use that.)" ;;
esac
set getcwd d_getcwd
eval $inlibc
+
+: see if getfsstat exists
+set getfsstat d_getfsstat
+eval $inlibc
+
: see if getgrent exists
set getgrent d_getgrent
eval $inlibc
: check for int64_t
echo " "
-$echo $n "Checking to see if your system supports int64_t...$c" >&4
+echo "Checking to see if you have int64_t..." >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#$i_inttypes I_INTTYPES
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo "You have int64_t."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo "You do not have int64_t."
fi
$rm -f try try.*
set d_int64_t
: check for long long
echo " "
-$echo $n "Checking to see if your system supports long long..." $c >&4
+echo "Checking to see if you have long long..." >&4
echo 'int main() { long long x = 7; return 0; }' > try.c
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo "You have have long long."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo "You do not have long long."
fi
$rm try.*
set d_longlong
case "${d_longlong}${longlongsize}" in
$define)
echo " "
- $echo $n "Checking to see how big your long longs are..." $c >&4
+ echo "Checking to see how big your long longs are..." >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
int main()
set try
if eval $compile_ok; then
longlongsize=`./try$exe_ext`
- $echo " $longlongsize bytes." >&4
+ echo "Your long longs are $longlongsize bytes long."
else
dflt='8'
echo " "
esac
$rm -f try.* try
+: see if prototype for lseek is available
+echo " "
+set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
+eval $hasproto
+
: see if lstat exists
set lstat d_lstat
eval $inlibc
$rm -f try.* try
+
+: check for off64_t
+echo " "
+echo "Checking to see if you have off64_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <unistd.h>
+int main() { off64_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo "You have off64_t."
+else
+ val="$undef"
+ echo "You do not have off64_t."
+ case "$lseeksize" in
+ 8) echo "(Your off_t is 64 bits, so you could use that.)" ;;
+ esac
+fi
+$rm -f try.* try
+set d_off64_t
+eval $setvar
+
: see if POSIX threads are available
set pthread.h i_pthread
eval $inhdr
eval $setvar
$rm -f try.c try
-: check for socklen_t
-echo " "
-$echo $n "Checking to see if your system supports socklen_t...$c" >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#$d_socket HAS_SOCKET
-#ifdef HAS_SOCKET
-#include <sys/socket.h>
-#endif
-int main() { socklen_t x = 16; }
-EOCP
-set try
-if eval $compile; then
- val="$define"
- echo " Yes, it does." >&4
-else
- val="$undef"
- echo " No, it doesn't." >&4
-fi
-$rm -f try try.*
-set d_socklen_t
-eval $setvar
-
: see if sys/stat.h is available
set sys/stat.h i_sysstat
eval $inhdr
esac
+: set the base revision
+baserev=5.0
+
: check for ordering of bytes in a long
echo " "
case "$crosscompile$multiarch" in
echo "(I can't execute the test program--guessing $gidsize.)" >&4
;;
*) gidsize=$yyy
- echo "Your $zzz size is $gidsize bytes."
+ echo "Your $zzz is $gidsize bytes long."
;;
esac
else
echo " "
case "$ptrsize" in
'')
- $echo $n "Checking to see how big your pointers are...$c" >&4
+ echo "Checking to see how big your pointers are..." >&4
if test "$voidflags" -gt 7; then
echo '#define VOID_PTR char *' > try.c
else
set try
if eval $compile_ok; then
ptrsize=`./try`
- $echo " $ptrsize bytes." >&4
+ echo "Your pointers are $ptrsize bytes long."
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)" >&4
}'
$rm -f signal signal.c signal.awk signal.lst signal_cmd
+: check for socklen_t
+echo " "
+echo "Checking to see if you have socklen_t..." >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$d_socket HAS_SOCKET
+#ifdef HAS_SOCKET
+#include <sys/socket.h>
+#endif
+int main() { socklen_t x = 16; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo "You have socklen_t."
+else
+ val="$undef"
+ echo "You do not have socklen_t."
+ case "$sizetype" in
+ size_t) echo "(You do have size_t, that might work.)" ;;
+ esac
+fi
+$rm -f try try.*
+set d_socklen_t
+eval $setvar
+
+: check for type of the size argument to socket calls
+case "$d_socket" in
+"$define")
+ $cat <<EOM
+
+Checking to see what type is the last argument of accept().
+EOM
+ hdrs="$define sys/types.h $d_socket sys/socket.h"
+ yyy=''
+ case "$d_socklen_t" in
+ "$define") yyy="$yyy socklen_t"
+ esac
+ yyy="$yyy $sizetype int long"
+ for xxx in $yyy; do
+ case "$socksizetype" in
+ '') try="extern int accept(int, struct sockaddr *, $xxx *);"
+ if ./protochk "$try" $hdrs; then
+ echo "Your system accepts '$xxx *' for the last argument of accept()."
+ socksizetype="$xxx *"
+ fi
+ ;;
+ esac
+ done
+: In case none of those worked, prompt the user.
+ case "$socksizetype" in
+ '') rp='What is the type for the last argument to accept()?'
+ dflt='int *'
+ . ./myread
+ socksizetype=$ans
+ ;;
+ esac
+ ;;
+*) : no gethostbyaddr, so pick relatively harmless defaults
+ socksizetype='char *'
+ ;;
+esac
+
: see what type is used for signed size_t
set ssize_t ssizetype int stdio.h sys/types.h
eval $typedef
echo "(I can't execute the test program--guessing $uidsize.)" >&4
;;
*) uidsize=$yyy
- echo "Your $zzz size is $uidsize bytes."
+ echo "Your $zzz is $uidsize bytes long."
;;
esac
else
d_ftello='$d_ftello'
d_ftime='$d_ftime'
d_getcwd='$d_getcwd'
+d_getfsstat='$d_getfsstat'
d_getgrent='$d_getgrent'
d_getgrps='$d_getgrps'
d_gethbyaddr='$d_gethbyaddr'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
d_longlong='$d_longlong'
+d_lseekproto='$d_lseekproto'
d_lstat='$d_lstat'
d_mblen='$d_mblen'
d_mbstowcs='$d_mbstowcs'
passcat='$passcat'
patchlevel='$patchlevel'
path_sep='$path_sep'
+perl5='$perl5'
perl='$perl'
perladmin='$perladmin'
perlpath='$perlpath'
randseedtype='$randseedtype'
ranlib='$ranlib'
rd_nodata='$rd_nodata'
+revision='$revision'
rm='$rm'
rmail='$rmail'
runnm='$runnm'
so='$so'
sockethdr='$sockethdr'
socketlib='$socketlib'
+socksizetype='$socksizetype'
sort='$sort'
spackage='$spackage'
spitshell='$spitshell'
use5005threads='$use5005threads'
use64bits='$use64bits'
usedl='$usedl'
+usefull64bits='$usefull64bits'
useithreads='$useithreads'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'