Handle characters with high bit set
[p5sagit/p5-mst-13.2.git] / Configure
index 96b9376..e74287d 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -20,7 +20,7 @@
 
 # $Id: Head.U,v 3.0.1.8 1995/07/25 13:40:02 ram Exp $
 #
-# Generated on Fri Feb  9 14:09:07 EST 1996 [metaconfig 3.0 PL60]
+# Generated on Wed Feb 21 14:26:18 EST 1996 [metaconfig 3.0 PL60]
 
 cat >/tmp/c1$$ <<EOF
 ARGGGHHHH!!!!!
@@ -231,6 +231,7 @@ cc=''
 gccversion=''
 ccflags=''
 cppflags=''
+mab=''
 ldflags=''
 lkflags=''
 locincpth=''
@@ -362,6 +363,7 @@ shmattype=''
 d_shmctl=''
 d_shmdt=''
 d_shmget=''
+d_sigsetjmp=''
 d_sigaction=''
 d_sigintrp=''
 d_sigvec=''
@@ -570,6 +572,7 @@ ssizetype=''
 startperl=''
 startsh=''
 stdchar=''
+subversion=''
 sysman=''
 uidtype=''
 nm_opt=''
@@ -1011,7 +1014,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE.
 You have the option of continuing the configuration process, despite the
 distinct possibility that your kit is damaged, by typing 'y'es.  If you
 do, don't blame me if something goes wrong.  I advise you to type 'n'o
-and contact the author (lwall@sems.com).
+and contact the author (doughera@lafcol.lafayette.edu).
 
 EOM
                echo $n "Continue? [n] $c" >&4
@@ -1208,7 +1211,7 @@ Much effort has been expended to ensure that this shell script will run on any
 Unix system.  If despite that it blows up on yours, your best bet is to edit
 Configure and run it again.  If you can't run Configure for some reason,
 you'll have to generate a config.sh file by hand.  Whatever problems you
-have, let me (lwall@sems.com) know how I blew it.
+have, let me (doughera@lafcol.lafayette.edu) know how I blew it.
 
 This installation script affects things in two ways:
 
@@ -1552,7 +1555,7 @@ EOM
        cd hints; ls -C *.sh | $sed 's/\.sh/   /g' >&4
        dflt=''
        : Half the following guesses are probably wrong... If you have better
-       : tests or hints, please send them to lwall@sems.com
+       : tests or hints, please send them to doughera@lafcol.lafayette.edu
        : The metaconfig authors would also appreciate a copy...
        $test -f /irix && osname=irix
        $test -f /xenix && osname=sco_xenix
@@ -1636,7 +1639,7 @@ EOM
                        *)      osvers="$3" ;;
                        esac
                        ;;
-               irix) osname=irix
+               irix*) osname=irix
                        case "$3" in
                        4*) osvers=4 ;;
                        5*) osvers=5 ;;
@@ -1855,6 +1858,7 @@ cd UU
        tmp_c="$c"
        cd ..
        cp $config_sh config.sh 2>/dev/null
+       chmod +w config.sh
        . ./config.sh
        cd UU
        cp ../config.sh .
@@ -2305,10 +2309,12 @@ echo " "
 echo "Getting the current patchlevel..." >&4
 if $test -r ../patchlevel.h;then
        patchlevel=`awk '/PATCHLEVEL/ {print $3}' < ../patchlevel.h`
+       subversion=`awk '/SUBVERSION/ {print $3}' < ../patchlevel.h`
 else
        patchlevel=0
+       subversion=0
 fi
-echo "(You have $package $baserev PL$patchlevel.)"
+echo "(You have $package $baserev PL$patchlevel sub$subversion.)"
 
 : set the prefixup variable, to restore leading tilda escape
 prefixup='case "$prefixexp" in
@@ -2327,7 +2333,9 @@ case "$archlib" in
                set dflt
                eval $prefixup
                ;;
-       *)      version=`echo $baserev $patchlevel | $awk '{print $1 + $2/1000.0}'`
+       *)      version=`LC_ALL=C;export LC_ALL;\
+                   echo $baserev $patchlevel $subversion | \
+                   $awk '{print $1 + $2/1000.0 + $3/100000.0}'`
                dflt="$privlib/$archname/$version"
                ;;
        esac
@@ -4616,6 +4624,10 @@ $cat >try.c <<'EOP'
 #endif
 main() { 
        char buf[64]; 
+       /* This test must come first. <AlanBurlison@unn.unisys.com> */
+       Gconvert(0.1, 8, 0, buf);
+       if (buf[0] != '.' || buf[1] != '1' || buf[2] != '\0')
+               exit(1);
        Gconvert(1.0, 8, 0, buf); 
        if (buf[0] != '1' || buf[1] != '\0')
                exit(1);
@@ -5383,6 +5395,7 @@ EOM
                        hpux)   dflt='+z' ;;
                        next)   dflt='none' ;;
                        solaris|svr4*|esix*) dflt='-Kpic' ;;
+                       irix*)  dflt='-KPIC' ;;
                        sunos)  dflt='-pic' ;;
                        *)      dflt='none' ;;
                    esac ;;
@@ -5450,7 +5463,7 @@ EOM
     case "$lddlflags" in
     '') case "$osname" in
                        hpux)  dflt='-b' ;;
-                       linux)  dflt='-shared' ;;
+                       linux|irix*)    dflt='-shared' ;;
                        next)  dflt='none' ;;
                        solaris) dflt='-G' ;;
                        sunos) dflt='-assert nodefinitions' ;;
@@ -5641,7 +5654,8 @@ main()
 }
 EOM
        if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && 
-               $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 && 
+               mv dyna.o tmp-dyna.o > /dev/null 2>&1 &&
+               $ld $lddlflags -o dyna.$dlext tmp-dyna.o > /dev/null 2>&1 && 
                $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
                xxx=`./fred`
                case $xxx in
@@ -5659,7 +5673,7 @@ EOM
        ;;
 esac
                
-$rm -f fred fred.? dyna.$dlext dyna.?
+$rm -f fred fred.? dyna.$dlext dyna.? tmp-dyna.?
 
 set d_dlsymun
 eval $setvar
@@ -6619,6 +6633,50 @@ fi
 set sigaction d_sigaction
 eval $inlibc
 
+
+: see if sigsetjmp exists
+echo " "
+case "$d_sigsetjmp" in
+'')
+       $cat >set.c <<EOP
+#include <setjmp.h>
+sigjmp_buf env;
+int set = 1;
+main()
+{
+       if (sigsetjmp(env,1))
+               exit(set);
+       set = 0;
+       siglongjmp(env, 1);
+       exit(1);
+}
+EOP
+       if $cc $ccflags $ldflags set.c -o set $libs >/dev/null 2>&1; then
+               if ./set >/dev/null 2>&1; then
+                       echo "POSIX sigsetjmp found." >&4
+                       val="$define"
+               else
+                       $cat <<EOM
+Uh-Oh! You have POSIX sigsetjmp and siglongjmp, but they do not work properly!!
+EOM
+                       val="$undef"
+               fi
+       else
+               echo "Sigsetjmp not found." >&4
+               val="$undef"
+       fi
+       ;;
+*) val="$d_sigsetjmp"
+       case "$d_sigsetjmp" in
+       $define) echo "POSIX sigsetjmp found." >&4;;
+       $undef) echo "Sigsetjmp not found." >&4;;
+       esac
+       ;;
+esac
+set d_sigsetjmp
+eval $setvar
+$rm -f set.c set
+
 socketlib=''
 sockethdr=''
 : see whether socket exists
@@ -9053,6 +9111,7 @@ d_shmget='$d_shmget'
 d_shrplib='$d_shrplib'
 d_sigaction='$d_sigaction'
 d_sigintrp='$d_sigintrp'
+d_sigsetjmp='$d_sigsetjmp'
 d_sigvec='$d_sigvec'
 d_sigvectr='$d_sigvectr'
 d_socket='$d_socket'
@@ -9212,6 +9271,7 @@ lp='$lp'
 lpr='$lpr'
 ls='$ls'
 lseektype='$lseektype'
+mab='$mab'
 mail='$mail'
 mailx='$mailx'
 make='$make'
@@ -9312,6 +9372,7 @@ stdio_cnt='$stdio_cnt'
 stdio_ptr='$stdio_ptr'
 strings='$strings'
 submit='$submit'
+subversion='$subversion'
 sysman='$sysman'
 tail='$tail'
 tar='$tar'