Integrate with Sarathy.
[p5sagit/p5-mst-13.2.git] / Configure
index 559eb24..202fa98 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
 #
-# Generated on Sat Oct 30 02:37:12 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Sun Nov  7 14:31:41 EET 1999 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -798,6 +798,7 @@ sPRIi64=''
 sPRIo64=''
 sPRIu64=''
 sPRIx64=''
+d_quad=''
 quadcase=''
 quadtype=''
 uquadtype=''
@@ -6832,7 +6833,8 @@ case "$doublesize" in
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(double));
+    printf("%d\n", (int)sizeof(double));
+    exit(0);
 }
 EOCP
        set try
@@ -7244,9 +7246,9 @@ case "$intsize" in
 #include <stdio.h>
 int main()
 {
-       printf("intsize=%d;\n", sizeof(int));
-       printf("longsize=%d;\n", sizeof(long));
-       printf("shortsize=%d;\n", sizeof(short));
+       printf("intsize=%d;\n", (int)sizeof(int));
+       printf("longsize=%d;\n", (int)sizeof(long));
+       printf("shortsize=%d;\n", (int)sizeof(short));
        exit(0);
 }
 EOCP
@@ -7935,6 +7937,28 @@ set d_open3
 eval $setvar
 $rm -f open3*
 
+: see which of string.h or strings.h is needed
+echo " "
+strings=`./findhdr string.h`
+if $test "$strings" && $test -r "$strings"; then
+       echo "Using <string.h> instead of <strings.h>." >&4
+       val="$define"
+else
+       val="$undef"
+       strings=`./findhdr strings.h`
+       if $test "$strings" && $test -r "$strings"; then
+               echo "Using <strings.h> instead of <string.h>." >&4
+       else
+               echo "No string header found -- You'll surely have problems." >&4
+       fi
+fi
+set i_string
+eval $setvar
+case "$i_string" in
+"$undef") strings=`./findhdr strings.h`;;
+*)       strings=`./findhdr string.h`;;
+esac
+
 : check for non-blocking I/O stuff
 case "$h_sysfile" in
 true) echo "#include <sys/file.h>" > head.c;;
@@ -7951,6 +7975,7 @@ case "$o_nonblock" in
 '')
        $cat head.c > try.c
        $cat >>try.c <<'EOCP'
+#include <stdio.h>
 int main() {
 #ifdef O_NONBLOCK
        printf("O_NONBLOCK\n");
@@ -7991,10 +8016,20 @@ case "$eagain" in
 #include <errno.h>
 #include <sys/types.h>
 #include <signal.h>
+#include <stdio.h> 
 #define MY_O_NONBLOCK $o_nonblock
 #ifndef errno  /* XXX need better Configure test */
 extern int errno;
 #endif
+#$i_unistd I_UNISTD
+#ifdef I_UNISTD
+#include <unistd.h>
+#endif
+#ifdef $i_string
+#include <string.h>
+#else
+#include <strings.h>
+#endif
 $signal_t blech(x) int x; { exit(3); }
 EOCP
        $cat >> try.c <<'EOCP'
@@ -8475,7 +8510,8 @@ $cat >try.c <<EOCP
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof($lseektype));
+    printf("%d\n", (int)sizeof($lseektype));
+    return(0); 
 }
 EOCP
 set try
@@ -8507,7 +8543,8 @@ cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($fpostype));
+    printf("%d\n", (int)sizeof($fpostype));
+    exit(0);
 }
 EOCP
 set try
@@ -8937,28 +8974,6 @@ esac
 set d_htonl
 eval $setvar
 
-: see which of string.h or strings.h is needed
-echo " "
-strings=`./findhdr string.h`
-if $test "$strings" && $test -r "$strings"; then
-       echo "Using <string.h> instead of <strings.h>." >&4
-       val="$define"
-else
-       val="$undef"
-       strings=`./findhdr strings.h`
-       if $test "$strings" && $test -r "$strings"; then
-               echo "Using <strings.h> instead of <string.h>." >&4
-       else
-               echo "No string header found -- You'll surely have problems." >&4
-       fi
-fi
-set i_string
-eval $setvar
-case "$i_string" in
-"$undef") strings=`./findhdr strings.h`;;
-*)       strings=`./findhdr string.h`;;
-esac
-
 : index or strchr
 echo " "
 if set index val -f; eval $csym; $val; then
@@ -9151,7 +9166,7 @@ eval $inlibc
 : check for long long
 echo " "
 $echo $n "Checking to see if your system supports long long..." $c >&4
-echo 'int main() { long long x = 7; }' > try.c
+echo 'int main() { long long x = 7; return 0; }' > try.c
 set try
 if eval $compile; then
        val="$define"
@@ -9173,7 +9188,8 @@ $define)
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(long long));
+    printf("%d\n", (int)sizeof(long long));
+    return(0);
 }
 EOCP
        set try
@@ -9534,6 +9550,65 @@ $define)
        ;;
 esac
 
+
+echo " "
+echo "Checking which 64-bit integer type to use..." >&4
+
+case "$intsize" in
+8) val=int
+   set quadtype
+   eval $setvar
+   val='"unsigned int"'
+   set uquadtype
+   eval $setvar
+   quadcase=1
+   ;;
+*) case "$longsize" in
+   8) val=long
+      set quadtype
+      eval $setvar
+      val='"unsigned long"'
+      set uquadtype
+      eval $setvar
+      quadcase=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
+        quadcase=3
+        ;;
+      *) case "$d_int64t" in
+         define)
+           val=int64_t
+           set quadtype
+           eval $setvar
+           val=uint64_t
+           set uquadtype
+           eval $setvar
+           quadcase=4
+           ;;
+         esac
+         ;;
+      esac
+      ;;
+   esac
+   ;;
+esac
+
+case "$quadtype" in
+'')    echo "Alas, no 64-bit integer types in sight." >&4
+       d_quad="$undef"
+       ;;
+*)     echo "Using '$quadtype' for 64-bit integers." >&4
+       d_quad="$define"
+       ;;
+esac
+
 : see if readdir and friends exist
 set readdir d_readdir
 eval $inlibc
@@ -10256,6 +10331,8 @@ int main()
     struct sigaction act, oact;
     act.sa_flags = 0;
     oact.sa_handler = 0;
+    /* so that act and oact are used */
+    exit(act.sa_flags == 0 &&  oact.sa_handler == 0);
 }
 EOP
        set try
@@ -10890,13 +10967,15 @@ EOM
        case "$alignbytes" in
        '') echo "Checking alignment constraints..." >&4
                $cat >try.c <<'EOCP'
+#include <stdio.h>
 struct foobar {
        char foo;
        double bar;
 } try_algn;
 int main()
 {
-       printf("%d\n", (char *)&try_algn.bar - (char *)&try_algn.foo);
+    printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
+    return(0);
 }
 EOCP
                set try
@@ -11682,7 +11761,8 @@ cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($gidtype));
+    printf("%d\n", (int)sizeof($gidtype));
+    exit(0);
 }
 EOCP
 set try
@@ -11739,71 +11819,17 @@ else
 fi
 
 
-
-echo " "
-echo "Checking which 64-bit integer type to use..." >&4
-
-case "$intsize" in
-8) val=int
-   set quadtype
-   eval $setvar
-   val='"unsigned int"'
-   set uquadtype
-   eval $setvar
-   quadcase=1
-   ;;
-*) case "$longsize" in
-   8) val=long
-      set quadtype
-      eval $setvar
-      val='"unsigned long"'
-      set uquadtype
-      eval $setvar
-      quadcase=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
-        quadcase=3
-        ;;
-      *) case "$d_int64t" in
-         define)
-           val=int64_t
-           set quadtype
-           eval $setvar
-           val=uint64_t
-           set uquadtype
-           eval $setvar
-           quadcase=4
-           ;;
-         esac
-         ;;
-      esac
-      ;;
-   esac
-   ;;
-esac
-
-case "$quadtype" in
-'') echo "Alas, no 64-bit integer types in sight."    >&4 ;;
-*)  echo "Using '$quadtype' for 64-bit integers." >&4 ;;
-esac
-
 : check for length of character
 echo " "
 case "$charsize" in
 '')
-       echo "Checking to see how big your characters are..." >&4
+       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", sizeof(char));
+    printf("%d\n", (int)sizeof(char));
+    exit(0);
 }
 EOCP
        set try
@@ -11827,8 +11853,8 @@ $rm -f try.c try
 echo " "
 $echo "Choosing the C types to be used for Perl's internal types..." >&4
 
-case "$use64bits:$quadtype" in
-define:?*)
+case "$use64bits:$d_quad:$quadtype" in
+define:define:?*)
        ivtype="$quadtype"
        uvtype="$uquadtype"
        ivsize=8
@@ -11990,9 +12016,9 @@ case "$i32type" in
 esac
 
 case "$i64type" in
-'')    case "$quadtype" in
-       '')     ;;
-       *)      i64type="$quadtype"
+'')    case "$d_quad:$quadtype" in
+       define:?*)
+               i64type="$quadtype"
                u64type="$uquadtype"
                i64size=8
                u64size=8
@@ -12517,8 +12543,8 @@ case "$ptrsize" in
 #include <stdio.h>
 int main()
 {
-       printf("%d\n", sizeof(VOID_PTR));
-       exit(0);
+    printf("%d\n", (int)sizeof(VOID_PTR));
+    exit(0);
 }
 EOCP
        set try
@@ -12830,7 +12856,7 @@ echo $xxx | $tr ' ' $trnl | $sort | $uniq | $awk '
 }
 END {
        printf "#endif /* JUST_NSIG */\n";
-       printf "}\n";
+       printf "exit(0);\n}\n";
 }
 ' >>signal.c
 $cat >signal.awk <<'EOP'
@@ -13082,7 +13108,8 @@ cat > try.c <<EOCP
 #include <sys/types.h>
 #include <stdio.h>
 int main() {
-    printf("%d\n", sizeof($uidtype));
+    printf("%d\n", (int)sizeof($uidtype));
+    exit(0);
 }
 EOCP
 set try
@@ -14256,6 +14283,7 @@ d_pwexpire='$d_pwexpire'
 d_pwgecos='$d_pwgecos'
 d_pwpasswd='$d_pwpasswd'
 d_pwquota='$d_pwquota'
+d_quad='$d_quad'
 d_readdir='$d_readdir'
 d_readlink='$d_readlink'
 d_rename='$d_rename'