# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Tue Jan 18 23:09:49 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Wed Jan 19 19:38:29 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
version=''
perladmin=''
perlpath=''
+d_nvpresuv=''
i16size=''
i16type=''
i32size=''
test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
echo ".)"
case "$osname" in
-dos|vms)
+dos|cygwin|vms|win32)
: 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 }'`
set nice d_nice
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 " Yes, it does." >&4
+else
+ val="$undef"
+ echo " No, it doesn't." >&4
+fi
+$rm -f try try.*
+set d_int64t
+eval $setvar
+
+
+echo " "
+echo "Checking which 64-bit integer type we could use..." >&4
+
+case "$intsize" in
+8) val=int
+ set quadtype
+ eval $setvar
+ val='"unsigned int"'
+ set uquadtype
+ eval $setvar
+ quadkind=1
+ ;;
+*) case "$longsize" in
+ 8) val=long
+ set quadtype
+ eval $setvar
+ val='"unsigned long"'
+ set uquadtype
+ eval $setvar
+ quadkind=2
+ ;;
+ *) case "$uselonglong:$d_longlong:$longlongsize" in
+ define:define:8)
+ val='"long long"'
+ set quadtype
+ eval $setvar
+ val='"unsigned long long"'
+ set uquadtype
+ eval $setvar
+ quadkind=3
+ ;;
+ *) case "$d_int64t" in
+ define)
+ val=int64_t
+ set quadtype
+ eval $setvar
+ val=uint64_t
+ set uquadtype
+ eval $setvar
+ quadkind=4
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+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
+ d_quad="$undef"
+ ;;
+*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then
+ verb="will"
+ else
+ verb="could"
+ fi
+ echo "We $verb use '$quadtype' for 64-bit integers." >&4
+ d_quad="$define"
+ ;;
+esac
+
+: check for length of character
+echo " "
+case "$charsize" in
+'')
+ echo "Checking to see how big your characters are (hey, you never know)..." >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", (int)sizeof(char));
+ exit(0);
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ dflt=`./try`
+ else
+ dflt='1'
+ echo "(I can't seem to compile the test program. Guessing...)"
+ fi
+ ;;
+*)
+ dflt="$charsize"
+ ;;
+esac
+rp="What is the size of a character (in bytes)?"
+. ./myread
+charsize="$ans"
+$rm -f try.c try
+
+
+echo " "
+$echo "Choosing the C types to be used for Perl's internal types..." >&4
+
+case "$use64bits:$d_quad:$quadtype" in
+define:define:?*)
+ ivtype="$quadtype"
+ uvtype="$uquadtype"
+ ivsize=8
+ uvsize=8
+ ;;
+*) ivtype="long"
+ uvtype="unsigned long"
+ ivsize=$longsize
+ uvsize=$longsize
+ ;;
+esac
+
+case "$uselongdouble:$d_longdbl" in
+define:define)
+ nvtype="long double"
+ nvsize=$longdblsize
+ ;;
+*) nvtype=double
+ nvsize=$doublesize
+ ;;
+esac
+
+$echo "(IV will be "$ivtype", $ivsize bytes)"
+$echo "(UV will be "$uvtype", $uvsize bytes)"
+$echo "(NV will be "$nvtype", $nvsize bytes)"
+
+$cat >try.c <<EOCP
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+#include <stdio.h>
+int main() {
+#ifdef INT8
+ int8_t i = INT8_MAX;
+ uint8_t u = UINT8_MAX;
+ printf("int8_t\n");
+#endif
+#ifdef INT16
+ int16_t i = INT16_MAX;
+ uint16_t i = UINT16_MAX;
+ printf("int16_t\n");
+#endif
+#ifdef INT32
+ int32_t i = INT32_MAX;
+ uint32_t u = UINT32_MAX;
+ printf("int32_t\n");
+#endif
+}
+EOCP
+
+case "$i8type" in
+'') case "$charsize" in
+ 1) i8type=char
+ u8type="unsigned char"
+ i8size=$charsize
+ u8size=$charsize
+ ;;
+ esac
+ ;;
+esac
+case "$i8type" in
+'') set try -DINT8
+ if eval $compile; then
+ case "`./try$exe_ext`" in
+ int8_t) i8type=int8_t
+ u8type=uint8_t
+ i8size=1
+ u8size=1
+ ;;
+ esac
+ fi
+ ;;
+esac
+case "$i8type" in
+'') if $test $charsize -ge 1; then
+ i8type=char
+ u8type="unsigned char"
+ i8size=$charsize
+ u8size=$charsize
+ fi
+ ;;
+esac
+
+case "$i16type" in
+'') case "$shortsize" in
+ 2) i16type=short
+ u16type="unsigned short"
+ i16size=$shortsize
+ u16size=$shortsize
+ ;;
+ esac
+ ;;
+esac
+case "$i16type" in
+'') set try -DINT16
+ if eval $compile; then
+ case "`./try$exe_ext`" in
+ int16_t)
+ i16type=int16_t
+ u16type=uint16_t
+ i16size=2
+ u16size=2
+ ;;
+ esac
+ fi
+ ;;
+esac
+case "$i16type" in
+'') if $test $shortsize -ge 2; then
+ i16type=short
+ u16type="unsigned short"
+ i16size=$shortsize
+ u16size=$shortsize
+ fi
+ ;;
+esac
+
+case "$i32type" in
+'') case "$longsize" in
+ 4) i32type=long
+ u32type="unsigned long"
+ i32size=$longsize
+ u32size=$longsize
+ ;;
+ *) case "$intsize" in
+ 4) i32type=int
+ u32type="unsigned int"
+ i32size=$intsize
+ u32size=$intsize
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+case "$i32type" in
+'') set try -DINT32
+ if eval $compile; then
+ case "`./try$exe_ext`" in
+ int32_t)
+ i32type=int32_t
+ u32type=uint32_t
+ i32size=4
+ u32size=4
+ ;;
+ esac
+ fi
+ ;;
+esac
+case "$i32type" in
+'') if $test $intsize -ge 4; then
+ i32type=int
+ u32type="unsigned int"
+ i32size=$intsize
+ u32size=$intsize
+ fi
+ ;;
+esac
+
+case "$i64type" in
+'') case "$d_quad:$quadtype" in
+ define:?*)
+ i64type="$quadtype"
+ u64type="$uquadtype"
+ i64size=8
+ u64size=8
+ ;;
+ esac
+ ;;
+esac
+
+$echo "Checking whether your NVs can preserve your UVs..." >&4
+$cat <<EOP >try.c
+#include <stdio.h>
+int main() {
+ $uvtype k = ($uvtype)~0, l;
+ $nvtype d;
+ l = k;
+ d = ($nvtype)l;
+ l = ($uvtype)d;
+ if (l == k)
+ printf("preserve\n");
+ exit(0);
+}
+EOP
+set try
+if eval $compile; then
+ case "`./try$exe_ext`" in
+ preserve) d_nvpresuv="$define" ;;
+ esac
+fi
+case "$d_nvpresuv" in
+$define) $echo "Yes, they can." 2>&1 ;;
+*) $echo "No, they can't." 2>&1
+ d_nvpresuv="$undef"
+ ;;
+esac
+
+$rm -f try.* try
+
: see if POSIX threads are available
set pthread.h i_pthread
eval $inhdr
val="$undef"
fi
set d_pwexpire
- eval $setvar
-
- if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
- val="$define"
- else
- val="$undef"
- fi
- set d_pwcomment
- eval $setvar
-
- if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
- val="$define"
- else
- val="$undef"
- fi
- set d_pwgecos
- eval $setvar
-
- if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
- val="$define"
- else
- val="$undef"
- fi
- set d_pwpasswd
- eval $setvar
-
- $rm -f $$.h
- ;;
-*)
- val="$undef";
- set d_pwquota; eval $setvar
- set d_pwage; eval $setvar
- set d_pwchange; eval $setvar
- set d_pwclass; eval $setvar
- set d_pwexpire; eval $setvar
- set d_pwcomment; eval $setvar
- set d_pwgecos; eval $setvar
- set d_pwpasswd; eval $setvar
- ;;
-esac
-
-: 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 " Yes, it does." >&4
-else
- val="$undef"
- echo " No, it doesn't." >&4
-fi
-$rm -f try try.*
-set d_int64t
-eval $setvar
-
-
-echo " "
-echo "Checking which 64-bit integer type we could use..." >&4
-
-case "$intsize" in
-8) val=int
- set quadtype
- eval $setvar
- val='"unsigned int"'
- set uquadtype
- eval $setvar
- quadkind=1
- ;;
-*) case "$longsize" in
- 8) val=long
- set quadtype
- eval $setvar
- val='"unsigned long"'
- set uquadtype
- eval $setvar
- quadkind=2
- ;;
- *) case "$uselonglong:$d_longlong:$longlongsize" in
- define:define:8)
- val='"long long"'
- set quadtype
- eval $setvar
- val='"unsigned long long"'
- set uquadtype
- eval $setvar
- quadkind=3
- ;;
- *) case "$d_int64t" in
- define)
- val=int64_t
- set quadtype
- eval $setvar
- val=uint64_t
- set uquadtype
- eval $setvar
- quadkind=4
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
-esac
+ eval $setvar
-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
- d_quad="$undef"
- ;;
-*) if test X"$use64bits" = Xdefine -o X"$longsize" = X8; then
- verb="will"
+ if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
+ val="$define"
else
- verb="could"
+ val="$undef"
fi
- echo "We $verb use '$quadtype' for 64-bit integers." >&4
- d_quad="$define"
+ set d_pwcomment
+ eval $setvar
+
+ if $contains 'pw_gecos' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwgecos
+ eval $setvar
+
+ if $contains 'pw_passwd' $$.h >/dev/null 2>&1; then
+ val="$define"
+ else
+ val="$undef"
+ fi
+ set d_pwpasswd
+ eval $setvar
+
+ $rm -f $$.h
+ ;;
+*)
+ val="$undef";
+ set d_pwquota; eval $setvar
+ set d_pwage; eval $setvar
+ set d_pwchange; eval $setvar
+ set d_pwclass; eval $setvar
+ set d_pwexpire; eval $setvar
+ set d_pwcomment; eval $setvar
+ set d_pwgecos; eval $setvar
+ set d_pwpasswd; eval $setvar
;;
esac
fi
-: check for length of character
-echo " "
-case "$charsize" in
-'')
- echo "Checking to see how big your characters are (hey, you never know)..." >&4
- $cat >try.c <<'EOCP'
-#include <stdio.h>
-int main()
-{
- printf("%d\n", (int)sizeof(char));
- exit(0);
-}
-EOCP
- set try
- if eval $compile_ok; then
- dflt=`./try`
- else
- dflt='1'
- echo "(I can't seem to compile the test program. Guessing...)"
- fi
- ;;
-*)
- dflt="$charsize"
- ;;
-esac
-rp="What is the size of a character (in bytes)?"
-. ./myread
-charsize="$ans"
-$rm -f try.c try
-
-
-echo " "
-$echo "Choosing the C types to be used for Perl's internal types..." >&4
-
-case "$use64bits:$d_quad:$quadtype" in
-define:define:?*)
- ivtype="$quadtype"
- uvtype="$uquadtype"
- ivsize=8
- uvsize=8
- ;;
-*) ivtype="long"
- uvtype="unsigned long"
- ivsize=$longsize
- uvsize=$longsize
- ;;
-esac
-
-case "$uselongdouble:$d_longdbl" in
-define:define)
- nvtype="long double"
- nvsize=$longdblsize
- ;;
-*) nvtype=double
- nvsize=$doublesize
- ;;
-esac
-
-echo "(IV will be "$ivtype", $ivsize bytes)"
-echo "(UV will be "$uvtype", $uvsize bytes)"
-echo "(NV will be "$nvtype", $nvsize bytes)"
-
-$cat >try.c <<EOCP
-#$i_inttypes I_INTTYPES
-#ifdef I_INTTYPES
-#include <inttypes.h>
-#endif
-#include <stdio.h>
-int main() {
-#ifdef INT8
- int8_t i = INT8_MAX;
- uint8_t u = UINT8_MAX;
- printf("int8_t\n");
-#endif
-#ifdef INT16
- int16_t i = INT16_MAX;
- uint16_t i = UINT16_MAX;
- printf("int16_t\n");
-#endif
-#ifdef INT32
- int32_t i = INT32_MAX;
- uint32_t u = UINT32_MAX;
- printf("int32_t\n");
-#endif
-}
-EOCP
-
-case "$i8type" in
-'') case "$charsize" in
- 1) i8type=char
- u8type="unsigned char"
- i8size=$charsize
- u8size=$charsize
- ;;
- esac
- ;;
-esac
-case "$i8type" in
-'') set try -DINT8
- if eval $compile; then
- case "`./try$exe_ext`" in
- int8_t) i8type=int8_t
- u8type=uint8_t
- i8size=1
- u8size=1
- ;;
- esac
- fi
- ;;
-esac
-case "$i8type" in
-'') if $test $charsize -ge 1; then
- i8type=char
- u8type="unsigned char"
- i8size=$charsize
- u8size=$charsize
- fi
- ;;
-esac
-
-case "$i16type" in
-'') case "$shortsize" in
- 2) i16type=short
- u16type="unsigned short"
- i16size=$shortsize
- u16size=$shortsize
- ;;
- esac
- ;;
-esac
-case "$i16type" in
-'') set try -DINT16
- if eval $compile; then
- case "`./try$exe_ext`" in
- int16_t)
- i16type=int16_t
- u16type=uint16_t
- i16size=2
- u16size=2
- ;;
- esac
- fi
- ;;
-esac
-case "$i16type" in
-'') if $test $shortsize -ge 2; then
- i16type=short
- u16type="unsigned short"
- i16size=$shortsize
- u16size=$shortsize
- fi
- ;;
-esac
-
-case "$i32type" in
-'') case "$longsize" in
- 4) i32type=long
- u32type="unsigned long"
- i32size=$longsize
- u32size=$longsize
- ;;
- *) case "$intsize" in
- 4) i32type=int
- u32type="unsigned int"
- i32size=$intsize
- u32size=$intsize
- ;;
- esac
- ;;
- esac
- ;;
-esac
-case "$i32type" in
-'') set try -DINT32
- if eval $compile; then
- case "`./try$exe_ext`" in
- int32_t)
- i32type=int32_t
- u32type=uint32_t
- i32size=4
- u32size=4
- ;;
- esac
- fi
- ;;
-esac
-case "$i32type" in
-'') if $test $intsize -ge 4; then
- i32type=int
- u32type="unsigned int"
- i32size=$intsize
- u32size=$intsize
- fi
- ;;
-esac
-
-case "$i64type" in
-'') case "$d_quad:$quadtype" in
- define:?*)
- i64type="$quadtype"
- u64type="$uquadtype"
- i64size=8
- u64size=8
- ;;
- esac
- ;;
-esac
-
-$rm -f try.* try
-
echo " "
if $test X"$quadtype" != X; then
case "$selecttype" in
'') case "$d_select" in
$define)
+ echo " "
$cat <<EOM
Checking to see what type of arguments are accepted by select().
EOM
d_msgsnd='$d_msgsnd'
d_mymalloc='$d_mymalloc'
d_nice='$d_nice'
+d_nvpresuv='$d_nvpresuv'
d_off64_t='$d_off64_t'
d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
d_oldpthreads='$d_oldpthreads'