# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Jan 31 08:35:08 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Feb 24 03:13:49 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_ftime=''
d_gettimeod=''
d_Gconvert=''
+d_getcwd=''
d_getgrent=''
d_getgrps=''
d_gethbyaddr=''
d_gnulibc=''
d_hasmntopt=''
d_htonl=''
+d_iconv=''
d_inetaton=''
-d_int64t=''
+d_int64_t=''
d_isascii=''
d_killpg=''
d_lchown=''
d_memmove=''
d_memset=''
d_mkdir=''
+d_mkdtemp=''
d_mkfifo=''
+d_mkstemp=''
+d_mkstemps=''
d_mktime=''
+d_mmap=''
+mmaptype=''
+d_mprotect=''
d_msg=''
d_msgctl=''
d_msgget=''
d_msgrcv=''
d_msgsnd=''
+d_msync=''
+d_munmap=''
d_nice=''
d_open3=''
d_fpathconf=''
d_sockpair=''
sockethdr=''
socketlib=''
+d_socklen_t=''
d_sqrtl=''
d_statblks=''
d_statfs_f_flags=''
i_gdbm=''
d_grpasswd=''
i_grp=''
+i_iconv=''
i_inttypes=''
i_limits=''
i_locale=''
i_sysfilio=''
i_sysioctl=''
i_syssockio=''
+i_syslog=''
+i_sysmman=''
+i_sysmode=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
i_systypes=''
i_sysuio=''
i_sysun=''
+i_sysutsname=''
i_sysvfs=''
i_syswait=''
i_sgtty=''
xlibpth=''
ignore_versioned_solibs=''
libs=''
+libsdirs=''
+libsfiles=''
+libsfound=''
+libspath=''
lns=''
d_PRIEldbl=''
d_PRIFldbl=''
use64bits=''
uselargefiles=''
uselongdouble=''
-uselonglong=''
usemorebits=''
usemultiplicity=''
nm_opt=''
vendorprefixexp=''
defvoidused=''
voidflags=''
+pm_apiversion=''
+xs_apiversion=''
CONFIG=''
define='define'
groupstype=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
-
: Possible local library directories to search.
loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
-glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
-glibpth="$glibpth /lib /usr/lib $xlibpth"
+glibpth="/usr/lib/large /lib /usr/lib $xlibpth"
glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+test -f /shlib/libc.so && glibpth="/shlib $glibpth"
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
echo "$yyy=$zzz" >> posthint.sh ;;
*) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2 ;;
esac
+ shift
;;
-V) echo "$me generated by metaconfig 3.0 PL70." >&2
exit 0;;
: Try to determine whether config.sh was made on this system
case "$config_sh" in
'')
-myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+myuname=`$uname -a 2>/dev/null`
+$test -z "$myuname" && myuname=`hostname 2>/dev/null`
# tr '[A-Z]' '[a-z]' would not work in EBCDIC
# because the A-Z/a-z are not consecutive.
myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \
: specified already.
case "$hintfile" in
''|' ')
- file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+ file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
: Also try without trailing minor version numbers.
- xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
- xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
- xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
- xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+ xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
+ xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
+ xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
+ xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
case "$file" in
'') dflt=none ;;
*) case "$osvers" in
*) eval "$var=$val";;
esac'
+case "$usethreads" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
cat <<EOM
-Perl can be built to take advantage of threads, on some systems.
-To do so, Configure must be run with -Dusethreads.
+Perl can be built to take advantage of threads on some systems.
+To do so, Configure can be run with -Dusethreads.
Note that threading is a highly experimental feature, and
some known race conditions still remain. If you choose to try
it, be very sure to not actually deploy it for production
purposes. README.threads has more details, and is required
reading if you enable threads.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
-case "$usethreads" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Build a threading Perl?'
. ./myread
case "$ans" in
(ithreads) that has one interpreter per thread. Both are very
experimental. This arrangement exists to help developers work out
which one is better.
+
+If you're a casual user, you probably don't want interpreter-threads
+at this time. There doesn't yet exist a way to create threads from
+within Perl in this model, i.e., "use Thread;" will NOT work.
EOM
: Default to ithreads unless overridden on command line or with
: old config.sh
EOM
val="$define"
;;
-*)
- echo 'Normally you do not need this and you should answer no.'
- case "$usemultiplicity" in
+*) case "$usemultiplicity" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+ echo "If this doesn't make any sense to you, just accept the default '$dflt'."
rp='Build Perl for multiplicity?'
. ./myread
case "$ans" in
exit(0);
}
EOM
-if $cc -o gccvers gccvers.c; then
+if $cc $ldflags -o gccvers gccvers.c; then
gccversion=`./gccvers`
case "$gccversion" in
'') echo "You are not using GNU cc." ;;
'') firstmakefile='makefile';;
esac
+case "$usesocks" in
+$define|true|[yY]*) dflt='y';;
+*) dflt='n';;
+esac
cat <<EOM
Perl can be built to use the SOCKS proxy protocol library. To do so,
Configure must be run with -Dusesocks.
-Normally you do not need this and you should answer no.
-
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
-case "$usesocks" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Build Perl for SOCKS?'
. ./myread
case "$ans" in
libswanted="$libswanted socks5 socks5_sh"
;;
esac
+libsfound=''
+libsfiles=''
+libsdirs=''
+libspath=''
+for thisdir in $libpth $xlibpth; do
+ test -d $thisdir && libspath="$libspath $thisdir"
+done
for thislib in $libswanted; do
-
- if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`;
- $test -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- echo "Found -l$thislib (shared)."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
- esac
- elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
- echo "Found -l${thislib}_s."
- case " $dflt " in
- *"-l$thislib "*);;
- *) dflt="$dflt -l${thislib}_s";;
+ for thisdir in $libspath; do
+ xxx=''
+ if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
+ xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib.$so
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib${thislib}_s$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/Slib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if $test -f "$xxx"; then
+ case "$libstyle" in
+ shared) echo "Found -l$thislib (shared)." ;;
+ static) echo "Found -l$thislib." ;;
+ *) echo "Found -l$thislib ($libstyle)." ;;
esac
- elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
- echo "Found -l$thislib."
case " $dflt " in
*"-l$thislib "*);;
- *) dflt="$dflt -l$thislib";;
+ *) dflt="$dflt -l$thislib"
+ libsfound="$libsfound $xxx"
+ yyy=`basename $xxx`
+ libsfiles="$libsfiles $yyy"
+ yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
+ case " $libsdirs " in
+ *" $yyy "*) ;;
+ *) libsdirs="$libsdirs $yyy" ;;
+ esac
+ ;;
esac
- else
- echo "No -l$thislib."
+ break
+ fi
+ done
+ if $test ! -f "$xxx"; then
+ echo "No -l$thislib."
fi
done
set X $dflt
yyy=`./try`
case "$yyy" in
'') fpossize=4
- echo " "
+ echo " " >&4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes."
+ echo " $fpossize bytes." >&4
;;
esac
else
dflt="$longsize"
- echo " "
+ echo " " >&4
echo "(I can't compile the test program. Guessing...)" >&4
rp="What is the size of your file positions (in bytes)?"
. ./myread
You can have files larger than 2 gigabytes.
EOM
val="$define" ;;
-*) cat <<EOM
+*) case "$uselargefiles" in
+ "$undef"|false|[nN]*) dflt='n' ;;
+ *) dflt='y' ;;
+ 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.
+on some systems. To do so, Configure can be run with -Duselargefiles.
-If this doesn't make any sense to you, just accept the default 'y'.
+If this doesn't make any sense to you, just accept the default '$dflt'.
EOM
- case "$uselargefiles" in
- "$undef"|false|[nN]*) dflt='n' ;;
- *) dflt='y' ;;
- esac
rp='Try to understand large files, if available?'
. ./myread
case "$ans" in
You have natively 64-bit integers.
EOM
- val="$define" ;;
-*) cat <<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';;
+ *) dflt='n';;
+ esac
+cat <<EOM
Perl can be built to take advantage of 64-bit integer types
-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.
-EOM
- case "$use64bits" in
- $define|true|[yY]*) dflt='y';;
- *) dflt='n';;
- esac
- rp='Try to use 64-bit integers, if available?'
- . ./myread
- case "$ans" in
- y|Y) val="$define" ;;
- *) val="$undef" ;;
- esac
- ;;
+on some systems. To do so, Configure can be run with -Duse64bits.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
+ rp='Try to use 64-bit integers, if available?'
+ . ./myread
+ case "$ans" in
+ [yY]*) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
esac
set use64bits
eval $setvar
case "$gccversion" in
'') ;;
*) case "$ccflags" in
- *-DUSE_LONG_LONG*) ;;
+ *-DUSE_64_BITS*) ;;
*) $cat <<EOM
-But since you seem to be using gcc, I will now add -DUSE_LONG_LONG
-to the compilation flags.
+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_LONG_LONG"
+ ccflags="$ccflags -DUSE_64_BITS"
;;
esac
;;
test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
echo ".)"
case "$osname" in
-dos|cygwin|vms|win32)
+dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
version=`echo $baserev $patchlevel $subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
esac
case "$inc_version_list" in
''|' ')
- inc_version_list_init='""';;
+ inc_version_list_init='0';;
*) inc_version_list_init=`echo $inc_version_list |
- $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/"/'`
+ $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
;;
esac
$rm -f getverlist
. ./getfile
usedl="$define"
: emulate basename
- dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
+ dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
$cat << EOM
case "$lddlflags" in
'') case "$osname" in
beos) dflt='-nostart' ;;
- hpux) dflt='-b' ;;
+ hpux) dflt='-b +vnocompatwarnings' ;;
linux|irix*) dflt='-shared' ;;
next) dflt='none' ;;
solaris) dflt='-G' ;;
installsitebin="$sitebinexp"
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.
-
-If this doesn't make any sense to you, just accept the default 'n'.
-EOM
+: see if sqrtl exists
+set sqrtl d_sqrtl
+eval $inlibc
case "$ccflags" in
*-DUSE_LONG_DOUBLE*|*-DUSE_MORE_BITS*) uselongdouble="$define" ;;
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
+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.
+
+If this doesn't make any sense to you, just accept the default '$dflt'.
+EOM
rp='Try to use long doubles if available?'
. ./myread
case "$ans" in
;;
esac
-cat <<EOM
+case "$uselongdouble:$d_sqrtl" in
+$define:$undef)
+ $cat <<EOM >&4
-Perl can be built to take advantage of long longs which
-(if available) may give more range for integer numbers.
-
-If this doesn't make any sense to you, just accept the default 'n'.
+You requested the use of long doubles but you do not seem to have
+the mathematic functions for long doubles. I'm disabling the use
+of long doubles.
EOM
-
-case "$ccflags" in
-*-DUSE_LONG_LONG*) uselonglong="$define" ;;
+ uselongdouble=$undef
+ ;;
esac
-case "$uselonglong" in
+case "$useperlio" in
$define|true|[yY]*) dflt='y';;
*) dflt='n';;
esac
-rp='Try to use long longs if available?'
-. ./myread
-case "$ans" in
-y|Y) val="$define" ;;
-*) val="$undef" ;;
-esac
-set uselonglong
-eval $setvar
-
-case "$uselonglong" in
-true|[yY]*) uselonglong="$define" ;;
-esac
-
-case "$uselonglong" in
-$define)
-: Look for a hint-file generated 'call-back-unit'. If the
-: user has specified that long longs should be used,
-: we may need to set or change some other defaults.
- if $test -f uselonglong.cbu; then
- echo "Your platform has some specific hints for long longs, using them..."
- . ./uselonglong.cbu
- else
- $cat <<EOM
-(Your platform doesn't have any specific hints for long longs.)
-EOM
- fi
- ;;
-esac
-
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
problems with some extension modules. Using PerlIO with stdio is safe,
but it is slower than plain stdio and therefore is not the default.
-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 '$dflt'.
EOM
-case "$useperlio" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
rp='Use the experimental PerlIO abstraction layer?'
. ./myread
case "$ans" in
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo " " >&4
+ echo "You have long double."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo " " >&4
+ echo "You do not have long double."
fi
$rm try.*
set d_longdbl
#include <stdio.h>
+#define I_STDLIB $i_stdlib
#ifdef I_STDLIB
#include <stdlib.h>
#endif
$cat >try.c <<EOCP
#include <sys/types.h>
#include <unistd.h>
-int main() { off64_t x = 7; }'
+int main() { off64_t x = 7; }
EOCP
set try
if eval $compile; then
echo " "
echo "Checking to see if your system supports 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
set fseeko d_fseeko
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use fseek.)" ;;
+8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
esac
: see if fsetpos exists
set ftello d_ftello
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use ftell.)" ;;
+8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
esac
+: see if getcwd exists
+set getcwd d_getcwd
+eval $inlibc
+
: see if getgrent exists
set getgrent d_getgrent
eval $inlibc
set d_htonl
eval $setvar
+: see if iconv exists
+set iconv d_iconv
+eval $inlibc
+
: index or strchr
echo " "
if set index val -f; eval $csym; $val; then
set inet_aton d_inetaton
eval $inlibc
+: see if inttypes.h is available
+: we want a real compile instead of Inhdr because some systems
+: have an inttypes.h which includes non-existent headers
+echo " "
+$cat >try.c <<EOCP
+#include <inttypes.h>
+int main() {
+ static int32_t foo32 = 0x12345678;
+}
+EOCP
+set try
+if eval $compile; then
+ echo "<inttypes.h> found." >&4
+ val="$define"
+else
+ echo "<inttypes.h> NOT found." >&4
+ val="$undef"
+fi
+$rm -f try.c try
+set i_inttypes
+eval $setvar
+
+: check for int64_t
+echo " "
+$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
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+int main() { int64_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo " " >&4
+ echo "You have int64_t."
+else
+ val="$undef"
+ echo " " >&4
+ echo "You do not have int64_t."
+fi
+$rm -f try try.*
+set d_int64_t
+eval $setvar
+
: Look for isascii
echo " "
$cat >isascii.c <<'EOCP'
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo " " >&4
+ echo "You have have long long."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo " " >&4
+ echo "You do not have long long."
fi
$rm try.*
set d_longlong
set mkdir d_mkdir
eval $inlibc
+: see if mkdtemp exists
+set mkdtemp d_mkdtemp
+eval $inlibc
+
: see if mkfifo exists
set mkfifo d_mkfifo
eval $inlibc
+: see if mkstemp exists
+set mkstemp d_mkstemp
+eval $inlibc
+
+: see if mkstemps exists
+set mkstemps d_mkstemps
+eval $inlibc
+
: see if mktime exists
set mktime d_mktime
eval $inlibc
+: see if this is a sys/mman.h system
+set sys/mman.h i_sysmman
+eval $inhdr
+
+: see if mmap exists
+set mmap d_mmap
+eval $inlibc
+: see what shmat returns
+: default to something harmless
+mmaptype='void *'
+case "$i_sysmman$d_mmap" in
+"$define$define")
+ $cat >mmap.c <<'END'
+#include <sys/mman.h>
+void *mmap();
+END
+ if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
+ mmaptype='void *'
+ else
+ mmaptype='caddr_t'
+ fi
+ echo "and it returns ($mmaptype)." >&4
+ ;;
+esac
+
+
+
+: see if mprotect exists
+set mprotect d_mprotect
+eval $inlibc
+
: see if msgctl exists
set msgctl d_msgctl
eval $inlibc
set d_msg
eval $setvar
-: see if nice exists
-set nice d_nice
+: see if msync exists
+set msync d_msync
eval $inlibc
-: see if inttypes.h is available
-: we want a real compile instead of Inhdr because some systems
-: have an inttypes.h which includes non-existent headers
-echo " "
-$cat >try.c <<EOCP
-#include <inttypes.h>
-int main() {
- static int32_t foo32 = 0x12345678;
-}
-EOCP
-set try
-if eval $compile; then
- echo "<inttypes.h> found." >&4
- val="$define"
-else
- echo "<inttypes.h> NOT found." >&4
- val="$undef"
-fi
-$rm -f try.c try
-set i_inttypes
-eval $setvar
+: see if munmap exists
+set munmap d_munmap
+eval $inlibc
-: check for int64_t
-echo " "
-$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
-#ifdef I_INTTYPES
-#include <inttypes.h>
-#endif
-int main() { int64_t x = 7; }
-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_int64t
-eval $setvar
+: see if nice exists
+set nice d_nice
+eval $inlibc
echo " "
eval $setvar
quadkind=2
;;
- *) case "$uselonglong:$d_longlong:$longlongsize" in
- define:define:8)
+ *) case "$d_longlong:$longlongsize" in
+ define:8)
val='"long long"'
set quadtype
eval $setvar
eval $setvar
quadkind=3
;;
- *) case "$d_int64t" in
+ *) case "$d_int64_t" in
define)
val=int64_t
set quadtype
esac
case "$quadtype" in
-'') case "$uselonglong:$d_longlong:$longlongsize" in
- undef:define:8)
- echo "(You would have 'long long', but you are not using it.)" >&4 ;;
- *) echo "Alas, no 64-bit integer types in sight." >&4 ;;
- esac
+'') echo "Alas, no 64-bit integer types in sight." >&4
d_quad="$undef"
;;
*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then
eval $setvar
$rm -f try.c try
-: see if sqrtl exists
-set sqrtl d_sqrtl
-eval $inlibc
+: 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 " " >&4
+ echo "You have socklen_t."
+else
+ val="$undef"
+ echo " " >&4
+ echo "You do not have socklen_t."
+fi
+$rm -f try try.*
+set d_socklen_t
+eval $setvar
: see if sys/stat.h is available
set sys/stat.h i_sysstat
*)
case "$alignbytes" in
'') echo "Checking alignment constraints..." >&4
- $cat >try.c <<'EOCP'
+ if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
+ $cat >try.c <<'EOCP'
+typedef long double NV;
+EOCP
+ else
+ $cat >try.c <<'EOCP'
+typedef double NV;
+EOCP
+ fi
+ $cat >>try.c <<'EOCP'
#include <stdio.h>
struct foobar {
char foo;
- double bar;
+ NV bar;
} try_algn;
int main()
{
fi
fi
-if $test X"$sPRId64" = X -a X"$i_inttypes.h" = X"$define" -a X"$quadtype" = Xint64_t; then
+if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
$cat >try.c <<'EOCP'
#include <sys/types.h>
#include <inttypes.h>
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=$version ;; # 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
set i_fcntl
eval $setvar
+: see if this is a iconv.h system
+set iconv.h i_iconv
+eval $inhdr
+
: see if locale.h is available
set locale.h i_locale
eval $inhdr
set poll.h i_poll
eval $inhdr
-: get C preprocessor symbols handy
echo " "
$echo "Guessing which symbols your C compiler and preprocessor define..." >&4
$cat <<'EOSH' > Cppsym.know
./tr '[a-z]' '[A-Z]' < Cppsym.know > Cppsym.a
./tr '[A-Z]' '[a-z]' < Cppsym.know > Cppsym.b
$cat Cppsym.a Cppsym.b | $tr ' ' $trnl | sort | uniq > Cppsym.know
+$rm -f Cppsym.a Cppsym.b
+cat <<EOSH > Cppsym
+$startsh
+if $test \$# -gt 0; then
+ echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ if $test -s Cppsym.got; then
+ $rm -f Cppsym.got
+ exit 0
+ fi
+ $rm -f Cppsym.got
+ exit 1
+else
+ $tr " " "$trnl" | ./Cppsym.try
+ exit 0
+fi
+EOSH
+chmod +x Cppsym
+$eunicefix Cppsym
+cat <<EOSH > Cppsym.try
+$startsh
cat <<'EOCP' > try.c
#include <stdio.h>
int main() {
EOCP
-$awk 'length($1) > 0 {
- printf "#ifdef %s\nprintf(\"%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef _%s\nprintf(\"_%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s\nprintf(\"__%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s__\nprintf(\"__%s__\\n\");\n#endif\n", $1, $1 }' \
- Cppsym.know >> try.c
+$awk \\
+EOSH
+cat <<'EOSH' >> Cppsym.try
+'length($1) > 0 {
+ printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+}' >> try.c
echo '}' >> try.c
- set try
- eval $compile_ok && ./try$exe_ext > Cppsym.true
+EOSH
+cat <<EOSH >> Cppsym.try
+cc="$cc"
+optimize="$optimize"
+ccflags="$ccflags"
+ldflags="$ldflags"
+libs="$libs"
+exe_ext="$exe_ext"
+$cc $optimize $ccflags $ldflags -o try try.c $libs && ./try$exe_ext
+EOSH
+chmod +x Cppsym.try
+$eunicefix Cppsym.try
+./Cppsym < Cppsym.know > Cppsym.true
: now check the C compiler for additional symbols
postprocess_cc_v=''
case "$osname" in
$awk '/\=/ { print $0; next }
{ print $0"=1" }' ccsym.raw >ccsym.list
-$awk '{ print $0"=1" }' Cppsym.true >ccsym.true
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' Cppsym.true >ccsym.true
$comm -13 ccsym.true ccsym.list >ccsym.own
$comm -12 ccsym.true ccsym.list >ccsym.com
$comm -23 ccsym.true ccsym.list >ccsym.cpp
set i_sysioctl
eval $setvar
+
+: see if this is a syslog.h system
+set syslog.h i_syslog
+eval $inhdr
+
+
+: see if this is a sys/mode.h system
+set sys/mode.h i_sysmode
+eval $inhdr
+
: see if sys/resource.h has to be included
set sys/resource.h i_sysresrc
eval $inhdr
set sys/un.h i_sysun
eval $inhdr
+
+: see if this is a sys/utsname.h system
+set sys/utsname.h i_sysutsname
+eval $inhdr
+
: see if this is a syswait system
set sys/wait.h i_syswait
eval $inhdr
;;
NDBM_File|ndbm_fil)
case "$i_ndbm" in
- $define) avail_ext="$avail_ext $xxx" ;;
+ $define)
+ case "$osname-$use64bits" in
+ hpux-define)
+ case "$libs" in
+ *-lndbm*) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
+ *) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
esac
;;
ODBM_File|odbm_fil)
case "${i_dbm}${i_rpcsvcdbm}" in
- *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+ *"${define}"*)
+ case "$osname-$use64bits" in
+ hpux-define)
+ case "$libs" in
+ *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
+ *) avail_ext="$avail_ext $xxx" ;;
+ esac
+ ;;
esac
;;
POSIX|posix)
d_fstatvfs='$d_fstatvfs'
d_ftello='$d_ftello'
d_ftime='$d_ftime'
+d_getcwd='$d_getcwd'
d_getgrent='$d_getgrent'
d_getgrps='$d_getgrps'
d_gethbyaddr='$d_gethbyaddr'
d_grpasswd='$d_grpasswd'
d_hasmntopt='$d_hasmntopt'
d_htonl='$d_htonl'
+d_iconv='$d_iconv'
d_index='$d_index'
d_inetaton='$d_inetaton'
-d_int64t='$d_int64t'
+d_int64_t='$d_int64_t'
d_isascii='$d_isascii'
d_killpg='$d_killpg'
d_lchown='$d_lchown'
d_memmove='$d_memmove'
d_memset='$d_memset'
d_mkdir='$d_mkdir'
+d_mkdtemp='$d_mkdtemp'
d_mkfifo='$d_mkfifo'
+d_mkstemp='$d_mkstemp'
+d_mkstemps='$d_mkstemps'
d_mktime='$d_mktime'
+d_mmap='$d_mmap'
+d_mprotect='$d_mprotect'
d_msg='$d_msg'
d_msg_ctrunc='$d_msg_ctrunc'
d_msg_dontroute='$d_msg_dontroute'
d_msgget='$d_msgget'
d_msgrcv='$d_msgrcv'
d_msgsnd='$d_msgsnd'
+d_msync='$d_msync'
+d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
d_nice='$d_nice'
d_nv_preserves_uv='$d_nv_preserves_uv'
d_sigaction='$d_sigaction'
d_sigsetjmp='$d_sigsetjmp'
d_socket='$d_socket'
+d_socklen_t='$d_socklen_t'
d_sockpair='$d_sockpair'
d_sqrtl='$d_sqrtl'
d_statblks='$d_statblks'
i_float='$i_float'
i_gdbm='$i_gdbm'
i_grp='$i_grp'
+i_iconv='$i_iconv'
i_inttypes='$i_inttypes'
i_limits='$i_limits'
i_locale='$i_locale'
i_sysfilio='$i_sysfilio'
i_sysin='$i_sysin'
i_sysioctl='$i_sysioctl'
+i_syslog='$i_syslog'
+i_sysmman='$i_sysmman'
+i_sysmode='$i_sysmode'
i_sysmount='$i_sysmount'
i_sysndir='$i_sysndir'
i_sysparam='$i_sysparam'
i_systypes='$i_systypes'
i_sysuio='$i_sysuio'
i_sysun='$i_sysun'
+i_sysutsname='$i_sysutsname'
i_sysvfs='$i_sysvfs'
i_syswait='$i_syswait'
i_termio='$i_termio'
libperl='$libperl'
libpth='$libpth'
libs='$libs'
+libsdirs='$libsdirs'
+libsfiles='$libsfiles'
+libsfound='$libsfound'
+libspath='$libspath'
libswanted='$libswanted'
line='$line'
lint='$lint'
medium='$medium'
mips_type='$mips_type'
mkdir='$mkdir'
+mmaptype='$mmaptype'
models='$models'
modetype='$modetype'
more='$more'
phostname='$phostname'
pidtype='$pidtype'
plibpth='$plibpth'
+pm_apiversion='$pm_apiversion'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
useithreads='$useithreads'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'
-uselonglong='$uselonglong'
usemorebits='$usemorebits'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
vi='$vi'
voidflags='$voidflags'
xlibpth='$xlibpth'
+xs_apiversion='$xs_apiversion'
zcat='$zcat'
zip='$zip'
EOT