implement C<goto &func> and other fixes (via private mail)
[p5sagit/p5-mst-13.2.git] / Configure
index 702862d..175536c 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 Wed Sep 30 02:04:24 EET DST 1998 [metaconfig 3.0 PL70]
+# Generated on Thu Oct 22 10:24:53 EET DST 1998 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by jhi@iki.fi)
 
 cat >/tmp/c1$$ <<EOF
@@ -411,6 +411,7 @@ d_poll=''
 d_portable=''
 d_pthread_yield=''
 d_sched_yield=''
+sched_yield=''
 d_pthreads_created_joinable=''
 d_readdir=''
 d_rewinddir=''
@@ -639,6 +640,7 @@ libpth=''
 loclibpth=''
 plibpth=''
 xlibpth=''
+ignore_versioned_solibs=''
 libs=''
 lns=''
 lseeksize=''
@@ -793,8 +795,6 @@ glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
 : machines, like the mips.  Usually, it should be empty.
 plibpth=''
 
-: default library list
-libswanted=''
 : Possible local include directories to search.
 : Set locincpth to "" in a hint file to defeat local include searches.
 locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
@@ -873,6 +873,9 @@ _exe=''
 : Extra object files, if any, needed on this platform.
 archobjs=''
 groupstype=''
+: default library list
+libswanted=''
+ignore_versioned_solibs=''
 : full support for void wanted by default
 defvoidused=15
 
@@ -2110,6 +2113,9 @@ EOM
                bsd386) osname=bsd386
                        osvers=`$uname -r`
                        ;;
+                POSIX-BC | posix-bc ) osname=posix-bc
+                        osvers="$3"
+                        ;;
                powerux | power_ux | powermax_os | powermaxos | \
                powerunix | power_unix) osname=powerux
                        osvers="$3"
@@ -3571,7 +3577,11 @@ cat <<'EOT' >testcpp.c
 ABC.XYZ
 EOT
 cd ..
-echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+if test ! -f cppstdin; then
+       echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
+else
+       echo "Keeping your $hint cppstdin wrapper."
+fi
 chmod 755 cppstdin
 wrapper=`pwd`/cppstdin
 ok='false'
@@ -3822,7 +3832,8 @@ case "$libswanted" in
 esac
 for thislib in $libswanted; do
        
-       if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
+       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 "*);;
@@ -7829,7 +7840,7 @@ case "$use64bits" in
 #ifdef I_INTTYPES
 #include <inttypes.h>
 #endif
-int64_t foo() { int64_t x; x = 7; return x; }'
+int64_t foo() { int64_t x; x = 7; return x; }
 EOCP
        if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
                val="$define"
@@ -8152,39 +8163,75 @@ set poll d_poll
 eval $inlibc
 
 
-: see whether the various POSIXish _yields exist within given cccmd
+: see whether the various POSIXish _yields exist
 $cat >try.c <<EOP
 #include <pthread.h>
+#include <stdio.h>
 main() {
-       YIELD();
-       exit(0);
+#ifdef SCHED_YIELD
+       sched_yield();
+#else
+#ifdef PTHREAD_YIELD
+       pthread_yield();
+#else
+#ifdef PTHREAD_YIELD_NULL
+       pthread_yield(NULL);
+#endif
+#endif
+#endif
 }
 EOP
-: see if pthread_yield exists within given cccmd,
-: if we do not usethreads this may well end up undef.
-set try -DYIELD=pthread_yield
+: see if sched_yield exists
+set try -DSCHED_YIELD
 if eval $compile; then
     val="$define"
-    echo 'pthread_yield() found.' >&4
+    sched_yield='sched_yield()'
 else
     val="$undef"
-    echo 'pthread_yield() NOT found.' >&4
 fi
-set d_pthread_yield
+case "$usethreads" in
+$define)
+       case "$val" in
+       $define) echo 'sched_yield() found.' >&4        ;;
+       *)       echo 'sched_yield() NOT found.' >&4    ;;
+       esac
+esac
+set d_sched_yield
 eval $setvar
 
-: see if sched_yield exists within given cccmd,
-: if we do not usethreads this may well end up undef.
-set try -DYIELD=sched_yield
+: see if pthread_yield exists
+set try -DPTHREAD_YIELD
 if eval $compile; then
     val="$define"
-    echo 'sched_yield() found.' >&4
+    case "$sched_yield" in
+    '') sched_yield='pthread_yield()' ;;
+    esac
 else
-    val="$undef"
-    echo 'sched_yield() NOT found.' >&4
+    set try -DPTHREAD_YIELD_NULL
+    if eval $compile; then
+       val="$define"
+       case "$sched_yield" in
+       '') sched_yield='pthread_yield(NULL)' ;;
+       esac
+    else
+       val="$undef"
+    fi
 fi
-set d_sched_yield
+case "$usethreads" in
+$define)
+       case "$val" in
+       $define) echo 'pthread_yield() found.' >&4      ;;
+       *)       echo 'pthread_yield() NOT found.' >&4  ;;
+       esac
+       ;;
+esac
+set d_pthread_yield
 eval $setvar
+
+case "$sched_yield" in
+'') sched_yield=undef ;;
+esac
+
 $rm -f try try.*
 
 : test whether pthreads are created in joinable -- aka undetached -- state
@@ -8198,7 +8245,11 @@ int main() {
     int detachstate;
     printf("%s\n",
        pthread_attr_init(&attr) == 0 &&
+#if PTHREAD_ATTR_GETDETACHSTATE_INT
+        pthread_attr_getdetachstate(&attr) == 0 &&
+#else
         pthread_attr_getdetachstate(&attr, &detachstate) == 0 &&
+#endif
         detachstate == PTHREAD_CREATE_DETACHED ?
         "detached" : "joinable");
     exit(0);
@@ -8212,9 +8263,18 @@ EOCP
                        *) echo "Yup, they are." >&4 ;;
                esac
        else
-               echo " "
-               echo "(I can't execute the test program--assuming they are.)" >&4
-               yyy=joinable
+               set try -DPTHREAD_ATTR_GETDETACHSTATE_INT
+               if eval $compile; then
+                       yyy=`./try`
+                       case "$yyy" in
+                               detached) echo "Nope, they aren't." >&4 ;;
+                               *) echo "Yup, they are." >&4 ;;
+                       esac
+               else            
+                       echo " "
+                       echo "(I can't execute the test program--assuming they are.)" >&4
+                       yyy=joinable
+               fi
        fi
        $rm -f try try.*
        case "$yyy" in
@@ -10804,8 +10864,8 @@ EOM
                : The first arg can be int, unsigned, or size_t
                : The last arg may or may not be 'const'
                val=''
-               for xxx in 'fd_set *' 'int *'; do
-                       for nfd in 'int' 'size_t' 'unsigned' ; do
+               for xxx in 'fd_set *' 'int *' 'void *'; do
+                       for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do
                                for tmo in 'struct timeval *' 'const struct timeval *'; do
                                        case "$val" in
                                        '')     try="extern select _(($nfd, $xxx, $xxx, $xxx, $tmo));"
@@ -10867,13 +10927,13 @@ EOM
 #include <sys/select.h>
 #endif
 #include <stdio.h>
-#define S sizeof($selecttype)
+$selecttype b;
+#define S sizeof(*(b))
 #define MINBITS        64
 #define NBYTES (S * 8 > MINBITS ? S : MINBITS/8)
 #define NBITS  (NBYTES * 8)
 int main() {
     char s[NBYTES];
-    $selecttype b;
     struct timeval t;
     int i;
     FILE* fp;
@@ -10901,6 +10961,13 @@ EOCP
                if eval $compile_ok; then
                        selectminbits=`./try`
                        case "$selectminbits" in
+                       '')     cat >&4 <<EOM
+Cannot figure out on how many bits at a time your select() operates.
+I'll play safe and guess it is 32 bits.
+EOM
+                               selectminbits=32
+                               bits="32 bits"
+                               ;;
                        1)      bits="1 bit" ;;
                        *)      bits="$selectminbits bits" ;;
                        esac
@@ -12462,6 +12529,7 @@ i_values='$i_values'
 i_varargs='$i_varargs'
 i_varhdr='$i_varhdr'
 i_vfork='$i_vfork'
+ignore_versioned_solibs='$ignore_versioned_solibs'
 incpath='$incpath'
 inews='$inews'
 installarchlib='$installarchlib'
@@ -12570,6 +12638,7 @@ rd_nodata='$rd_nodata'
 rm='$rm'
 rmail='$rmail'
 runnm='$runnm'
+sched_yield='$sched_yield'
 scriptdir='$scriptdir'
 scriptdirexp='$scriptdirexp'
 sed='$sed'