Doc tweaks.
[p5sagit/p5-mst-13.2.git] / hints / dec_osf.sh
index 134a3aa..c588949 100644 (file)
@@ -147,7 +147,8 @@ esac
 
 # we want dynamic fp rounding mode, and we want ieee exception semantics
 case "$isgcc" in
-gcc)   case "$_DEC_cc_style" in
+gcc)   ;;
+*)     case "$_DEC_cc_style" in
        new)    ccflags="$ccflags -fprm d -ieee"        ;;
        esac
        ;;
@@ -282,6 +283,12 @@ $define|true|[yY]*)
                usemymalloc='n'
                ;;
        esac
+       # These symbols are renamed in <time.h> so
+       # that the Configure hasproto doesn't see them.
+       d_asctime_r_proto="$define"
+       d_ctime_r_proto="$define"
+       d_gmtime_r_proto="$define"
+       d_localtime_r_proto="$define"
        ;;
 esac
 EOCBU
@@ -303,8 +310,42 @@ Cannot continue, aborting.
 EOF
                exit 1
                ;;
+       *)
+               # Test whether libc's been fixed yet.
+               cat >try.c <<\TRY
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+       unsigned long uvmax = ~0UL;
+       long double ld = uvmax + 0.0L;
+       char buf1[30], buf2[30];
+
+       (void) sprintf(buf1, "%lu", uvmax);
+       (void) sprintf(buf2, "%.0Lf", ld);
+       return strcmp(buf1, buf2) != 0;
+}
+TRY
+               # Don't bother trying to work with Configure's idea of
+               # cc and the various flags.  This might not work as-is
+               # with gcc -- but we're testing libc, not the compiler.
+               if cc -o try -std try.c && ./try
+               then
+                       : ok
+               else
+                       cat <<\UGLY >&4
+!
+Warning!  Your libc has not yet been patched so that its "%Lf" format for
+printing long doubles shows all the significant digits.  You will get errors
+in the t/op/numconvert test because of this.  (The data is still good
+internally, and the "%e" format of printf() or sprintf() in perl will still
+produce valid results.)  See README.tru64 for additional details.
+
+Continuing anyway.
+!
+UGLY
+               fi
+               $rm -f try try.c
        esac
-       d_Gconvert='sprintf((b),"%.*Lg",(n),(x))'
        ;;
 esac
 EOCBU
@@ -313,6 +354,39 @@ case "`/usr/sbin/sizer -v`" in
 *[1-4].0*) d_modfl=undef ;; # must wait till 5.0
 esac
 
+case "$loclibpth" in
+'')    ;;
+*)
+       needusrshlib=''
+       case "$loclibpth" in
+       '') ;;
+       *)  for p in $loclibpth
+           do
+               if test -n "`ls $p/libdb.so* 2>/dev/null`"; then
+                   needusrshlib=yes
+               fi
+               if test -d $p; then
+                   echo "Appending $p to LD_LIBRARY_PATH." >& 4
+                   case "$LD_LIBRARY_PATH" in
+                   '') LD_LIBRARY_PATH=$p                  ;;
+                   *)  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
+                   esac
+               fi      
+           done
+           echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4
+           ;;
+       esac
+       # This is evil but I can't think of a nice workaround:
+       # the /usr/shlib/libdb.so needs to be seen first,
+       # or running Configure will fail.
+       if test -n "$needusrshlib"; then
+           echo "Prepending /usr/shlib to loclibpth." >& 4
+           loclibpth="/usr/shlib $loclibpth"
+           echo "loclibpth is now $loclibpth." >& 4
+       fi
+       ;;
+esac
+
 #
 # Unset temporary variables no more needed.
 #