# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Aug 2 01:31:40 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Sun Oct 3 02:41:02 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_isascii=''
d_killpg=''
d_lchown=''
+d_ldbl_dig=''
d_link=''
d_locconv=''
d_lockf=''
d_wcstombs=''
d_wctomb=''
d_writev=''
-d_dbmclose64=''
-d_dbminit64=''
-d_delete64=''
-d_fetch64=''
-d_firstkey64=''
-d_nextkey64=''
-d_store64=''
dlext=''
cccdlflags=''
ccdlflags=''
intsize=''
longsize=''
shortsize=''
-d_dirent64_s=''
-d_flock64_s=''
-d_fstat64=''
-d_ftruncate64=''
-d_ino64_t=''
+d_fpos64_t=''
d_llseek=''
-d_lockf64=''
-d_lseek64=''
-d_lstat64=''
d_off64_t=''
-d_offset_t=''
-d_open64=''
-d_opendir64=''
-d_readdir64=''
-d_seekdir64=''
-d_stat64=''
-d_telldir64=''
-d_truncate64=''
libc=''
ldlibpthname=''
libperl=''
startperl=''
startsh=''
stdchar=''
-d_fgetpos64=''
-d_fopen64=''
-d_freopen64=''
-d_fseek64=''
-d_fseeko64=''
-d_fsetpos64=''
-d_ftell64=''
-d_ftello64=''
-d_tmpfile64=''
d_stdio_stream_array=''
stdio_stream_array=''
d_strtoull=''
sysman=''
trnl=''
+uidsign=''
uidtype=''
archname64=''
use64bits=''
+uselargefiles=''
+uselongdouble=''
+usemorebits=''
usemultiplicity=''
nm_opt=''
nm_so_opt=''
vendorprefixexp=''
defvoidused=''
voidflags=''
+pm_apiversion=''
+xs_apiversion=''
CONFIG=''
define='define'
al="$al M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM"
al="$al M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_XENIX"
al="$al NeXT OCS88 OSF1 PARISC PC532 PORTAR POSIX"
-al="$al PWB R3000 RES RISC6000 RT Sun386i SVR3 SVR4"
+al="$al PWB R3000 RES RISC6000 RT Sun386i SVR3 SVR4 SVR5"
al="$al SYSTYPE_BSD SYSTYPE_SVR4 SYSTYPE_SYSV Tek4132 Tek4300"
al="$al UMAXV USGr4 USGr4_2 UTEK UTS UTek UnicomPBB UnicomPBD Utek"
al="$al VMS Xenix286"
: List of libraries we want.
: If anyone needs -lnet, put it in a hint file.
libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
-libswanted="$libswanted dld ld sun m rt c cposix posix"
+libswanted="$libswanted dld ld sun m c cposix posix"
libswanted="$libswanted ndir dir crypt sec"
libswanted="$libswanted ucb bsd BSD PW x"
: We probably want to search /usr/shlib before most other libraries.
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
- optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
+ optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
extractsh=''
override=''
knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
$startsh
EOS
esac
shift
;;
+ -A)
+ shift
+ xxx=''
+ yyy="$1"
+ zzz=''
+ uuu=undef
+ case "$yyy" in
+ *=*) zzz=`echo $yyy|sed 's!=.*!!'`
+ case "$zzz" in
+ *:*) zzz='' ;;
+ *) xxx=append
+ zzz=" "`echo $yyy|sed 's!^[^=]*=!!'`
+ yyy=`echo $yyy|sed 's!=.*!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ '') case "$yyy" in
+ *:*) xxx=`echo $yyy|sed 's!:.*!!'`
+ yyy=`echo $yyy|sed 's!^[^:]*:!!'`
+ zzz=`echo $yyy|sed 's!^[^=]*=!!'`
+ yyy=`echo $yyy|sed 's!=.*!!'` ;;
+ *) xxx=`echo $yyy|sed 's!:.*!!'`
+ yyy=`echo $yyy|sed 's!^[^:]*:!!'` ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ append)
+ echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh ;;
+ clear)
+ echo "$yyy=''" >> posthint.sh ;;
+ define)
+ case "$zzz" in
+ '') zzz=define ;;
+ esac
+ echo "$yyy='$zzz'" >> posthint.sh ;;
+ eval)
+ echo "eval \"$yyy=$zzz\"" >> posthint.sh ;;
+ prepend)
+ echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh ;;
+ undef)
+ case "$zzz" in
+ '') zzz="$uuu" ;;
+ esac
+ echo "$yyy=$zzz" >> posthint.sh ;;
+ *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
+ esac
+ ;;
-V) echo "$me generated by metaconfig 3.0 PL70." >&2
- exit 0;;
+ exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
*) break;;
true)
cat >&2 <<EOM
Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
- [-U symbol] [-U symbol=]
+ [-U symbol] [-U symbol=] [-A command: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.
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
+ -A : manipulate symbol after the platform specific hints have been applied:
+ -A symbol=value append " "value to symbol
+ -A append:symbol=value append value to symbol
+ -A define:symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
-V : print version number and exit (with a zero status).
EOM
exit 1
: run the defines and the undefines, if any, but leave the file out there...
touch optdef.sh
. ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+touch posthint.sh
: set package name
package=perl5
mips) osname=mips_osf1 ;;
esac
;;
- uts) osname=uts
+ unixware) osname=svr5
+ osvers="$4"
+ ;;
+ uts) osname=uts
osvers="$3"
;;
qnx) osname=qnx
*) osvers="$ans" ;;
esac
+
+. ./posthint.sh
+
: who configured the system
cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
cf_by=`(logname) 2>/dev/null`
1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
+
+case "$usemorebits" in
+"$define"|true|[yY]*)
+ use64bits="$define"
+ uselongdouble="$define"
+ usemorebits="$define"
+ ;;
+*) usemorebits="$undef"
+ ;;
+esac
+
+
+cat <<EOM
+
+Perl can be built to understand large files (files larger than 2 gigabytes)
+on some systems. To do so, Configure must be run with -Duselargefiles.
+
+If this doesn't make any sense to you, just accept the default.
+EOM
+case "$uselargefiles" in
+"$define"|true|[yY]*) dflt='y' ;;
+*) dflt='n' ;;
+esac
+rp='Try to understand large files?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set uselargefiles
+eval $setvar
+case "$uselargefiles" in
+"$define") use64bits="$define" ;;
+esac
+
cat <<EOM
Perl can be built to take advantage of explicit 64-bit interfaces,
on some systems. To do so, Configure must be run with -Duse64bits.
-If this doesn't make any sense to you, just accept the default 'n'.
+If this doesn't make any sense to you, just accept the default.
EOM
case "$use64bits" in
$define|true|[yY]*) dflt='y';;
if $test -r $rsrc/patchlevel.h;then
patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h`
subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h`
+ apiversion=`awk '/define[ ]+PERL_APIVERSION/ {print $3}' $rsrc/patchlevel.h`
else
patchlevel=0
subversion=0
+ apiversion=0
fi
$echo $n "(You have $package" $c
case "$package" in
echo $baserev $patchlevel $subversion | \
$awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`
fi
-: Figure out perl API version. Perhaps this should be in patchlevel.h
-if test "$subversion" -lt 50; then
- apiversion=`LC_ALL=C; export LC_ALL; \
- LANGUAGE=C; export LANGUAGE; \
- echo $baserev $patchlevel | \
- $awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
-else
- apiversion="$version"
-fi
: determine installation style
: For now, try to deduce it from prefix unless it is already set.
privlibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installprivlib=`echo $privlibexp | sed 's#^$prefix#$installprefix#'`
+ installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
else
installprivlib="$privlibexp"
fi
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installarchlib=`echo $archlibexp | sed 's#^$prefix#$installprefix#'`
+ installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
else
installarchlib="$archlibexp"
fi
: Binary compatibility with 5.005 is not possible for builds
: with advanced features
case "$usethreads$usemultiplicity" in
-*define*) bincompat5005="$undef" ;;
+*define*)
+ bincompat5005="$undef"
+ d_bincompat5005="$undef"
+ ;;
*) $cat <<EOM
Perl 5.006 can be compiled for binary compatibility with 5.005.
set d_bincompat5005
eval $setvar
case "$d_bincompat5005" in
- "$define") bincompat5005="$define" ;;
- *) bincompat5005="$undef" ;;
+ "$define")
+ bincompat5005="$define"
+ ;;
+ *) bincompat5005="$undef"
+ d_bincompat5005="$undef"
+ ;;
esac
;;
esac
EOT
cd ..
if test ! -f cppstdin; then
- echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+ if test "X$osname" = "Xaix" -a "X$gccversion" = X; then
+ # AIX cc -E doesn't show the absolute headerfile
+ # locations but we'll cheat by using the -M flag.
+ echo 'cat >.$$.c; rm -f .$$.u; '"$cc"' ${1+"$@"} -M -c .$$.c 2>/dev/null; test -s .$$.u && awk '"'"'$2 ~ /\.h$/ { print "# 0 \""$2"\"" }'"'"' .$$.u; rm -f .$$.o .$$.u; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' > cppstdin
+ else
+ echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+ fi
else
echo "Keeping your $hint cppstdin wrapper."
fi
*) libs="$ans";;
esac
-: determine optimize, if desired, or use for debug flag also
+: determine optimization, if desired, or use for debug flag also
case "$optimize" in
' '|$undef) dflt='none';;
'') dflt='-O';;
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".
+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?"
: We will not override a previous value, but we might want to
: augment a hint file
case "$hint" in
-none|recommended)
+default|recommended)
case "$gccversion" in
1*) dflt='-fpcc-struct-return' ;;
esac
fi
;;
esac
+ case "$gccversion" in
+ 1*) ;;
+ 2.[0-8]*) ;;
+ ?*) echo " "
+ echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
+ echo 'int main(void) { return 0; }' > gcctest.c
+ if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
+ echo "Yes, it does." 2>&1
+ case "$ccflags" in
+ *strict-aliasing*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt -fno-strict-aliasing" ;;
+ esac
+ else
+ echo "Nope, it doesn't, but that's ok." 2>&1
+ fi
+ ;;
+ esac
;;
esac
esac
case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$ccflags $dflt" ;;
*) dflt="$ccflags";;
esac
vendorlibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installvendorlib=`echo $vendorlibexp | $sed 's#^$prefix#$installprefix#'`
+ installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
else
installvendorlib="$vendorlibexp"
fi
: Change installation prefix, if necessary.
: XXX Bug? -- ignores Configure -Dinstallprefix setting.
if $test X"$prefix" != X"$installprefix"; then
- installbin=`echo $binexp | sed 's#^$prefix#$installprefix#'`
+ installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
else
installbin="$binexp"
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installman1dir=`echo $man1direxp | $sed 's#^$prefix#$installprefix#'`
+ installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
else
installman1dir="$man1direxp"
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installman3dir=`echo $man3direxp | $sed 's#^$prefix#$installprefix#'`
+ installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
else
installman3dir="$man3direxp"
fi
scriptdirexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installscript=`echo $scriptdirexp | sed 's#^$prefix#$installprefix#'`
+ installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
else
installscript="$scriptdirexp"
fi
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
sitearchexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installsitearch=`echo $sitearchexp | sed 's#^$prefix#$installprefix#'`
+ installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
else
installsitearch="$sitearchexp"
fi
cat <<EOM
+Perl can be built to take advantage of long doubles which
+(if available) may give more accuracy and range for floating point
+numbers. To do so, Configure must be run with -Duselongdouble.
+
+If this doesn't make any sense to you, just accept the default 'n'.
+EOM
+case "$uselongdouble" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
+rp='Try to use long doubles if available?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set uselongdouble
+eval $setvar
+
+case "$uselongdouble" in
+"$define"|true|[yY]*)
+: Look for a hint-file generated 'call-back-unit'. If the
+: user has specified that long doubles should be used,
+: we may need to set or change some other defaults.
+ if $test -f uselongdouble.cbu; then
+ echo "Your platform has some specific hints for long doubles, using them..."
+ . ./uselongdouble.cbu
+ else
+ $cat <<EOM
+(Your platform doesn't have any specific hints for long doubles.)
+EOM
+ fi
+ ;;
+esac
+
+cat <<EOM
+
Previous version of $package used the standard IO mechanisms as defined
in <stdio.h>. Versions 5.003_02 and later of perl allow alternate IO
mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still
case "$use64bits" in
"$define" )
echo " "
- echo $n "Checking to see if your system supports int64_t...$c" >&4
+ $echo $n "Checking to see if your system supports int64_t...$c" >&4
$cat >try.c <<EOCP
#include <sys/types.h>
#$i_inttypes I_INTTYPES
: check for long long
echo " "
-echo $n "Checking to see if your system supports long long...$c" >&4
+$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 " "
-case "$d_longlong" in
-$define)
+if $test X"$intsize" = X8 -o X"$longsize" = X8 -o X"$d_int64t" = X"$define" -o X"$d_longlong" = X"$define"; then
echo "Checking how to print 64-bit integers..." >&4
#include <sys/types.h>
#include <stdio.h>
int main() {
- long long q = 12345678901;
+ long long q = 12345678901LL; /* AIX cc requires the LL prefix. */
printf("%lld\n", q);
}
EOCP
echo "Cannot figure out how to print 64-bit integers." >&4
fi
-;;
-esac # case "$d_longlong"
+$rm -f try try.*
+
+fi # intsize -o longsize -o d_int64t -o d_longlong
case "$sPRId64" in
'') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
;;
esac
-$rm -f try try.*
-
: check for length of double
echo " "
case "$doublesize" in
: check for long doubles
echo " "
-echo $n "Checking to see if your system supports long doubles...$c" >&4
+$echo $n "Checking to see if your system supports long double...$c" >&4
echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
val="$define"
echo " "
-case "$d_longdbl" in
-$define)
+if $test X"$d_longdbl" = X"$define"; then
echo "Checking how to print long doubles..." >&4
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3Lf\n", d);
+ printf("%.3llf\n", d);
}
EOCP
set try
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
- sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
- echo "We will use %Lf."
+ sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+ sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
+ echo "We will use %llf."
;;
esac
fi
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3lf\n", d);
+ printf("%.3Lf\n", d);
}
EOCP
set try
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
- sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
- echo "We will use %lf."
+ sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
+ sPRIFldbl='"LF"'; sPRIGldbl='"LG"'; sPRIEldbl='"LE"';
+ echo "We will use %Lf."
;;
esac
fi
#include <stdio.h>
int main() {
long double d = 123.456;
- printf("%.3llf\n", d);
+ printf("%.3lf\n", d);
}
EOCP
set try
yyy=`./try$exe_ext`
case "$yyy" in
123.456)
- sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
- sPRIFldbl='"llF"'; sPRIGldbl='"llG"'; sPRIEldbl='"llE"';
- echo "We will use %llf."
+ sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
+ sPRIFldbl='"lF"'; sPRIGldbl='"lG"'; sPRIEldbl='"lE"';
+ echo "We will use %lf."
;;
esac
fi
echo "Cannot figure out how to print long doubles." >&4
fi
-;;
-esac # case "$d_longdbl"
+$rm -f try try.*
+
+fi # d_longdbl
case "$sPRIfldbl" in
'') d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
;;
esac
-$rm -f try try.*
-
: Initialize h_fcntl
h_fcntl=false
set d_dbl_dig
eval $setvar
-
-if $test X"$use64bits" = X"$define"; then
- : see if dbminit64 exists
- set dbminit64 d_dbminit64
- eval $inlibc
-
- : see if dbmclose64 exists
- set dbmclose64 d_dbmclose64
- eval $inlibc
-
- : see if fetch64 exists
- set fetch64 d_fetch64
- eval $inlibc
-
- : see if store64 exists
- set store64 d_store64
- eval $inlibc
-
- : see if delete64 exists
- set delete64 d_delete64
- eval $inlibc
-
- : see if firstkey64 exists
- set firstkey64 d_firstkey64
- eval $inlibc
-
- : see if nextkey64 exists
- set nextkey64 d_nextkey64
- eval $inlibc
-else
- val="$undef"
- for xxx in d_dbminit64 d_dbmclose64 d_fetch64 d_store64 d_delete64 d_firstkey64 d_nextkey64
- do
- set $xxx
- eval $setvar
- done
-fi
-
: see if difftime exists
set difftime d_difftime
eval $inlibc
-: see if sys/stat.h is available
-set sys/stat.h i_sysstat
-eval $inhdr
-
: see if this is a dirent system
echo " "
if xinc=`./findhdr dirent.h`; $test "$xinc"; then
eval $setvar
$rm -f try.c
-
-if $test X"$use64bits" = X"$define"; then
- : see if fstat64 exists
- set fstat64 d_fstat64
- eval $inlibc
-
- : see if ftruncate64 exists
- set ftruncate64 d_ftruncate64
- eval $inlibc
-
- : see if lockf64 exists
- set lockf64 d_lockf64
- eval $inlibc
-
- : see if llseek exists
- set llseek d_llseek
- eval $inlibc
-
- : see if lseek64 exists
- set lseek64 d_lseek64
- eval $inlibc
-
- : see if lstat64 exists
- set lstat64 d_lstat64
- eval $inlibc
-
- : see if open64 exists
- set open64 d_open64
- eval $inlibc
-
- : see if opendir64 exists
- set opendir64 d_opendir64
- eval $inlibc
-
- : see if readdir64 exists
- set readdir64 d_readdir64
- eval $inlibc
-
- : see if seekdir64 exists
- set seekdir64 d_seekdir64
- eval $inlibc
-
- : see if stat64 exists
- set stat64 d_stat64
- eval $inlibc
-
- : see if telldir64 exists
- set telldir64 d_telldir64
- eval $inlibc
-
- : see if truncate64 exists
- set truncate64 d_truncate64
- eval $inlibc
-
- : check for off64_t
- echo " "
- echo $n "Checking to see if your system supports off64_t...$c" >&4
- $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-off64_t foo() { off64_t x; x = 7; return x; }'
-EOCP
- 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 -f try.*
- set d_off64_t
- eval $setvar
-
- : check for offset_t
- echo " "
- echo $n "Checking to see if your system supports offset_t...$c" >&4
- $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <unistd.h>
-offset_t foo() { offset_t x; x = 7; return x; }'
-EOCP
- 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 -f try.*
- set d_offset_t
- eval $setvar
-
- : check for ino64_t
- echo " "
- echo $n "Checking to see if your system supports ino64_t...$c" >&4
- val="$undef"
- case "$i_sysstat" in
- "$define" )
- $cat >try.c <<EOCP
-#include <sys/types.h>
-#include <sys/stat.h>
-ino64_t foo() { ino64_t x; x = 7; return x; }'
-EOCP
- if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
- val="$define"
- fi
- $rm -f try.*
- ;;
- esac
- if $test "X$val" = X"$define"; then
- echo " Yup, it does." >&4
- else
- echo " Nope, it doesn't." >&4
- fi
- set d_ino64_t
- eval $setvar
-
- : check for struct flock64
- echo " "
- echo "Checking to see if your system supports struct flock64..." >&4
- if $h_fcntl; then
- set d_flock64_s flock64 l_len define fcntl.h
- eval $hasfield
- else
- val="$undef"
- set d_flock64_s
- eval $setvar
- fi
- case "$d_flock64_s" in
- "$define") echo "Yup, it does." >&4
- ;;
- *) echo "Nope, it doesn't." >&4
- ;;
- esac
-
- : check for struct dirent64
- echo " "
- echo "Checking to see if your system supports struct dirent64..." >&4
- set d_dirent64_s dirent64 d_off $i_dirent dirent.h
- eval $hasfield
- case "$d_dirent64_s" in
- "$define") echo "Yup, it does." >&4
- ;;
- *) echo "Nope, it doesn't." >&4
- ;;
- esac
-
-else
- val="$undef"
- for xxx in d_fstat64 d_ftruncate64 d_lockf64 d_lseek64 d_lstat64 d_open64 d_opendir64 d_readdir64 d_seekdir64 d_stat64 d_telldir64 d_truncate64 d_off64_t d_offset_t d_ino64_t d_flock64_s d_dirent64_s
- do
- set $xxx
- eval $setvar
- done
-fi
-
: see if dlerror exists
xxx_runnm="$runnm"
runnm=false
esac
else
echo "I can't compile and run the test program." >&4
+ echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
fi
;;
esac
set fgetpos d_fgetpos
eval $inlibc
-
-if $test X"$use64bits" = X"$define"; then
- : see if fgetpos64 exists
- set fgetpos64 d_fgetpos64
- eval $inlibc
-
- : see if fopen64 exists
- set freopen64 d_fopen64
- eval $inlibc
-
- : see if freopen64 exists
- set freopen64 d_freopen64
- eval $inlibc
-
- : see if fseek64 exists
- set fseek64 d_fseek64
- eval $inlibc
-
- : see if fseeko64 exists
- set fseeko64 d_fseeko64
- eval $inlibc
-
- : see if fsetpos64 exists
- set fsetpos64 d_fsetpos64
- eval $inlibc
-
- : see if ftell64 exists
- set ftell64 d_ftell64
- eval $inlibc
-
- : see if ftello64 exists
- set ftello64 d_ftello64
- eval $inlibc
-
- : see if tmpfile64 exists
- set tmpfile64 d_tmpfile64
- eval $inlibc
-else
- val="$undef"
- for xxx in d_fgetpos64 d_fopen64 d_freopen64 d_fseek64 d_fseeko64 d_fsetpos64 d_ftell64 d_ftello64 d_tmpfile64
- do
- set $xxx
- eval $setvar
- done
-fi
-
: see if flock exists
set flock d_flock
eval $inlibc
set fpathconf d_fpathconf
eval $inlibc
+
+: see if llseek exists
+set llseek d_llseek
+eval $inlibc
+
+: check for off64_t
+echo " "
+$echo $n "Checking to see if your system supports off64_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <unistd.h>
+off64_t foo() { off64_t x; x = 7; return x; }'
+EOCP
+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 -f try.*
+set d_off64_t
+eval $setvar
+
+: check for fpos64_t
+echo " "
+$echo $n "Checking to see if your system supports fpos64_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/stdio.h>
+fpos64_t foo() { fpos64_t x; x = 7; return x; }'
+EOCP
+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 -f try.*
+set d_fpos64_t
+eval $setvar
+
: see if fseeko exists
set fseeko d_fseeko
eval $inlibc
set d_lchown
eval $setvar
+: See if number of significant digits in a double precision number is known
+echo " "
+$cat >ldbl_dig.c <<EOM
+#$i_limits I_LIMITS
+#$i_float I_FLOAT
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+#ifdef I_FLOAT
+#include <float.h>
+#endif
+#ifdef LDBL_DIG
+printf("Contains LDBL_DIG");
+#endif
+EOM
+$cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
+if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
+ echo "LDBL_DIG found." >&4
+ val="$define"
+else
+ echo "LDBL_DIG NOT found." >&4
+ val="$undef"
+fi
+$rm -f ldbl_dig.?
+set d_ldbl_dig
+eval $setvar
+
: see if link exists
set link d_link
eval $inlibc
eval $inlibc
: see if POSIX threads are available
-if test "X$usethreads" = "X$define"; then
- set pthread.h i_pthread
- eval $inhdr
-else
- i_pthread="$undef"
-fi
+set pthread.h i_pthread
+eval $inhdr
+
int main()
{
struct sigaction act, oact;
+ act.sa_flags = 0;
+ oact.sa_handler = 0;
}
EOP
set try
eval $setvar
$rm -f try.c try
+: see if sys/stat.h is available
+set sys/stat.h i_sysstat
+eval $inhdr
+
: see if stat knows about block sizes
echo " "
set d_statblks stat st_blocks $i_sysstat sys/stat.h
skipping the byteorder check.
EOM
- byteorder=''
+ byteorder='0xffff'
;;
*)
case "$byteorder" in
In the following, larger digits indicate more significance. A big-endian
machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
-machines may have weird orders like 3412. A Cray will report 87654321. If
-the test program works the default is probably right.
+machines may have weird orders like 3412. A Cray will report 87654321,
+an Alpha will report 12345678. If the test program works the default is
+probably right.
I'm now running the test program...
EOM
$cat >try.c <<'EOCP'
echo "You have EBCDIC." >&4
val="$define"
else
- echo "Nope, no EBCDIC. Assuming ASCII or some ISO Latin, or UTF." >&4
+ echo "Nope, no EBCDIC, probably ASCII or some ISO Latin." >&4
fi
else
echo "I'm unable to compile the test program." >&4
set pid_t pidtype int stdio.h sys/types.h
eval $typedef_ask
+: Find earliest binary compatible site_perl subdirectory perl can use.
+case "$bincompat5005" in
+"$define") xs_apiversion='5.005' ;;
+*) xs_apiversion=$apiversion ;; # The current site_perl version.
+esac
+: Find earliest pure perl site_perl subdirectory perl can use.
+: The versioned directories started at 5.005.
+pm_apiversion='5.005'
+
: check for length of pointer
echo " "
case "$ptrsize" in
;;
esac
+echo " "
+case "$uidtype" in
+*_t) zzz="$uidtype" ;;
+*) zzz="uid" ;;
+esac
+echo "Checking the sign of $zzz..." >&4
+cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+ $uidtype foo = -1;
+ if (foo < 0)
+ printf("-1\n");
+ else
+ printf("1\n");
+}
+EOCP
+set try
+if eval $compile; then
+ yyy=`./try`
+ case "$yyy" in
+ '') uidsign=1
+ echo "(I can't execute the test program--guessing unsigned.)" >&4
+ ;;
+ *) uidsign=$yyy
+ case "$uidsign" in
+ 1) echo "Your $zzz is unsigned." ;;
+ -1) echo "Your $zzz is signed." ;;
+ esac
+ ;;
+ esac
+else
+ uidsign=1
+ echo "(I can't compile the test program--guessing unsigned.)" >&4
+fi
+
+
: see if dbm.h is available
: see if dbmclose exists
set dbmclose d_dbmclose
echo " "
echo "Stripping down executable paths..." >&4
for file in $loclist $trylist; do
- if test X$file != Xln -a X$file != Xar -o X$osname != Xos2; then
- eval $file="\$file"
- fi
+ eval temp=\$$file
+ eval $file=`basename $temp`
done
;;
esac
d_csh='$d_csh'
d_cuserid='$d_cuserid'
d_dbl_dig='$d_dbl_dig'
-d_dbmclose64='$d_dbmclose64'
-d_dbminit64='$d_dbminit64'
-d_delete64='$d_delete64'
d_difftime='$d_difftime'
-d_dirent64_s='$d_dirent64_s'
d_dirnamlen='$d_dirnamlen'
d_dlerror='$d_dlerror'
d_dlopen='$d_dlopen'
d_fd_macros='$d_fd_macros'
d_fd_set='$d_fd_set'
d_fds_bits='$d_fds_bits'
-d_fetch64='$d_fetch64'
-d_fgetpos64='$d_fgetpos64'
d_fgetpos='$d_fgetpos'
-d_firstkey64='$d_firstkey64'
d_flexfnam='$d_flexfnam'
-d_flock64_s='$d_flock64_s'
d_flock='$d_flock'
-d_fopen64='$d_fopen64'
d_fork='$d_fork'
d_fpathconf='$d_fpathconf'
-d_freopen64='$d_freopen64'
-d_fseek64='$d_fseek64'
-d_fseeko64='$d_fseeko64'
+d_fpos64_t='$d_fpos64_t'
d_fseeko='$d_fseeko'
-d_fsetpos64='$d_fsetpos64'
d_fsetpos='$d_fsetpos'
-d_fstat64='$d_fstat64'
d_fstatfs='$d_fstatfs'
d_fstatvfs='$d_fstatvfs'
-d_ftell64='$d_ftell64'
-d_ftello64='$d_ftello64'
d_ftello='$d_ftello'
d_ftime='$d_ftime'
-d_ftruncate64='$d_ftruncate64'
d_getgrent='$d_getgrent'
d_getgrps='$d_getgrps'
d_gethbyaddr='$d_gethbyaddr'
d_htonl='$d_htonl'
d_index='$d_index'
d_inetaton='$d_inetaton'
-d_ino64_t='$d_ino64_t'
d_int64t='$d_int64t'
d_iovec_s='$d_iovec_s'
d_isascii='$d_isascii'
d_killpg='$d_killpg'
d_lchown='$d_lchown'
+d_ldbl_dig='$d_ldbl_dig'
d_link='$d_link'
d_llseek='$d_llseek'
d_locconv='$d_locconv'
-d_lockf64='$d_lockf64'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
d_longlong='$d_longlong'
-d_lseek64='$d_lseek64'
-d_lstat64='$d_lstat64'
d_lstat='$d_lstat'
d_madvise='$d_madvise'
d_mblen='$d_mblen'
d_msync='$d_msync'
d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
-d_nextkey64='$d_nextkey64'
d_nice='$d_nice'
d_off64_t='$d_off64_t'
-d_offset_t='$d_offset_t'
d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
d_oldpthreads='$d_oldpthreads'
d_oldsock='$d_oldsock'
d_open3='$d_open3'
-d_open64='$d_open64'
-d_opendir64='$d_opendir64'
d_pathconf='$d_pathconf'
d_pause='$d_pause'
d_phostname='$d_phostname'
d_pwgecos='$d_pwgecos'
d_pwpasswd='$d_pwpasswd'
d_pwquota='$d_pwquota'
-d_readdir64='$d_readdir64'
d_readdir='$d_readdir'
d_readlink='$d_readlink'
d_readv='$d_readv'
d_sanemcmp='$d_sanemcmp'
d_sched_yield='$d_sched_yield'
d_scm_rights='$d_scm_rights'
-d_seekdir64='$d_seekdir64'
d_seekdir='$d_seekdir'
d_select='$d_select'
d_sem='$d_sem'
d_sigsetjmp='$d_sigsetjmp'
d_socket='$d_socket'
d_sockpair='$d_sockpair'
-d_stat64='$d_stat64'
d_statblks='$d_statblks'
d_statfs='$d_statfs'
d_statfsflags='$d_statfsflags'
d_stdio_stream_array='$d_stdio_stream_array'
d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
-d_store64='$d_store64'
d_strchr='$d_strchr'
d_strcoll='$d_strcoll'
d_strctcpy='$d_strctcpy'
d_system='$d_system'
d_tcgetpgrp='$d_tcgetpgrp'
d_tcsetpgrp='$d_tcsetpgrp'
-d_telldir64='$d_telldir64'
d_telldir='$d_telldir'
d_telldirproto='$d_telldirproto'
d_time='$d_time'
d_times='$d_times'
-d_tmpfile64='$d_tmpfile64'
-d_truncate64='$d_truncate64'
d_truncate='$d_truncate'
d_tzname='$d_tzname'
d_umask='$d_umask'
phostname='$phostname'
pidtype='$pidtype'
plibpth='$plibpth'
+pm_apiversion='$pm_apiversion'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
tr='$tr'
trnl='$trnl'
troff='$troff'
+uidsign='$uidsign'
uidtype='$uidtype'
uname='$uname'
uniq='$uniq'
use64bits='$use64bits'
usedl='$usedl'
+uselargefiles='$uselargefiles'
+uselongdouble='$uselongdouble'
+usemorebits='$usemorebits'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
usenm='$usenm'
vi='$vi'
voidflags='$voidflags'
xlibpth='$xlibpth'
+xs_apiversion='$xs_apiversion'
zcat='$zcat'
zip='$zip'
EOT