This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Whitespace only: zap EOL spaces
[perl5.git] / Configure
index 69dd589..3d65fd2 100755 (executable)
--- a/Configure
+++ b/Configure
 # Yes, you may rip this off to use in other distribution packages. This
 # script belongs to the public domain and cannot be copyrighted.
 #
-# Note: this Configure script was generated automatically. Rather than
-# working with this copy of Configure, you may wish to get metaconfig.
-# The dist package (which contains metaconfig) is available via SVN:
-#     svn co https://svn.code.sf.net/p/dist/code/trunk/dist
+# Note: this Configure script was generated automatically by the tool
+# called "metaconfig". Rather than working with this copy of Configure,
+# you may wish to get metaconfig. Perl uses a modified version of this
+# tool, available in the "dist" folder in the checkout of the git repo
+#    $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
+# The original dist package (including metaconfig) is available via SVN:
+#    $ svn co https://svn.code.sf.net/p/dist/code/trunk/dist
 #
 # Though this script was generated by metaconfig from metaunits, it is
 # OK to send patches against Configure itself. It's up to the Configure
@@ -26,7 +29,6 @@
 #     $ git clone git://perl5.git.perl.org/metaconfig.git metaconfig
 #
 # See Porting/pumpkin.pod for more information on metaconfig.
-#
 
 # Generated using [metaconfig 3.5 PL0]
 # (with additional metaconfig patches by perlbug@perl.org)
@@ -67,7 +69,10 @@ EOF
        exit 1
 fi
 
-if test ! -c /dev/null ; then
+if test -f /sys/utilities/MultiView ; then
+       # AmigaOS, test -c for /dev/null is not useful
+       :
+elif test ! -c /dev/null ; then
        cat <<EOF
 ***
 *** I'm sorry, but /dev/null appears to be a file rather than a device.
@@ -373,12 +378,12 @@ d__fwalk=''
 d_access=''
 d_accessx=''
 d_acosh=''
-d_asinh=''
-d_atanh=''
 d_aintl=''
 d_alarm=''
 asctime_r_proto=''
 d_asctime_r=''
+d_asinh=''
+d_atanh=''
 d_attribute_deprecated=''
 d_attribute_format=''
 d_attribute_malloc=''
@@ -467,10 +472,11 @@ d_fchmod=''
 d_fchown=''
 d_fcntl=''
 d_fcntl_can_lock=''
-d_fdim=''
 d_fd_macros=''
 d_fd_set=''
 d_fds_bits=''
+d_fdclose=''
+d_fdim=''
 d_fegetround=''
 d_fgetpos=''
 d_finite=''
@@ -478,7 +484,6 @@ d_finitel=''
 d_flexfnam=''
 d_flock=''
 d_flockproto=''
-d_fdim=''
 d_fma=''
 d_fmax=''
 d_fmin=''
@@ -602,12 +607,14 @@ d_isfinite=''
 d_isfinitel=''
 d_isinf=''
 d_isinfl=''
+d_isless=''
 d_isnan=''
 d_isnanl=''
 d_isnormal=''
 d_j0=''
 d_j0l=''
 d_killpg=''
+d_lc_monetary_2008=''
 d_lchown=''
 d_ldbl_dig=''
 d_lgamma=''
@@ -615,24 +622,27 @@ d_lgamma_r=''
 d_libm_lib_version=''
 d_link=''
 d_llrint=''
+d_llrintl=''
 d_llround=''
+d_llroundl=''
 d_localtime_r=''
 d_localtime_r_needs_tzset=''
 localtime_r_proto=''
 d_locconv=''
-d_lc_monetary_2008=''
 d_lockf=''
-d_ldexpl=''
 d_log1p=''
 d_log2=''
 d_logb=''
+d_ldexpl=''
 d_longdbl=''
 longdblkind=''
 longdblsize=''
 d_longlong=''
 longlongsize=''
 d_lrint=''
+d_lrintl=''
 d_lround=''
+d_lroundl=''
 d_lseekproto=''
 d_lstat=''
 d_madvise=''
@@ -706,6 +716,9 @@ readdir_r_proto=''
 d_readlink=''
 d_readv=''
 d_recvmsg=''
+d_re_comp=''
+d_regcmp=''
+d_regcomp=''
 d_remainder=''
 d_remquo=''
 d_rename=''
@@ -772,6 +785,13 @@ d_shmctl=''
 d_shmdt=''
 d_shmget=''
 d_sigaction=''
+d_siginfo_si_errno=''
+d_siginfo_si_pid=''
+d_siginfo_si_uid=''
+d_siginfo_si_addr=''
+d_siginfo_si_status=''
+d_siginfo_si_band=''
+d_siginfo_si_value=''
 d_signbit=''
 d_sigprocmask=''
 d_sigsetjmp=''
@@ -808,6 +828,7 @@ d_srandom_r=''
 srandom_r_proto=''
 d_sresgproto=''
 d_sresuproto=''
+d_stat=''
 d_statblks=''
 d_statfs_f_flags=''
 d_statfs_s=''
@@ -856,6 +877,7 @@ d_system=''
 d_tcgetpgrp=''
 d_tcsetpgrp=''
 d_telldirproto=''
+d_tgamma=''
 d_time=''
 timetype=''
 d_asctime64=''
@@ -869,7 +891,6 @@ clocktype=''
 d_times=''
 d_tmpnam_r=''
 tmpnam_r_proto=''
-d_tgamma=''
 d_trunc=''
 d_truncate=''
 d_truncl=''
@@ -911,7 +932,6 @@ ld=''
 ld_can_script=''
 lddlflags=''
 usedl=''
-doublekind=''
 doublesize=''
 ebcdic=''
 fflushNULL=''
@@ -1053,6 +1073,10 @@ i_vfork=''
 d_inc_version_list=''
 inc_version_list=''
 inc_version_list_init=''
+doubleinfbytes=''
+doublenanbytes=''
+longdblinfbytes=''
+longdblnanbytes=''
 installprefix=''
 installprefixexp=''
 installstyle=''
@@ -1086,6 +1110,7 @@ d_PRIeldbl=''
 d_PRIfldbl=''
 d_PRIgldbl=''
 d_SCNfldbl=''
+doublekind=''
 sPRIEUldbl=''
 sPRIFUldbl=''
 sPRIGUldbl=''
@@ -1111,6 +1136,9 @@ installman3dir=''
 man3dir=''
 man3direxp=''
 man3ext=''
+doublemantbits=''
+longdblmantbits=''
+nvmantbits=''
 modetype=''
 multiarch=''
 mydomain=''
@@ -1298,7 +1326,6 @@ libswanted_uselargefiles=''
 uselargefiles=''
 uselongdouble=''
 usemorebits=''
-usequadmath=''
 usemultiplicity=''
 nm_opt=''
 nm_so_opt=''
@@ -1306,6 +1333,7 @@ runnm=''
 usenm=''
 usensgetexecutablepath=''
 useperlio=''
+usequadmath=''
 usesocks=''
 d_oldpthreads=''
 use5005threads=''
@@ -1444,8 +1472,8 @@ libswanted_uselargefiles=''
 : set usesocks on the Configure command line to enable socks.
 : List of libraries we want.
 : If anyone needs extra -lxxx, put those in a hint file.
-libswanted="socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun"
-libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
+libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
+libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
 : We probably want to search /usr/shlib before most other libraries.
 : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
 glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
@@ -1659,7 +1687,6 @@ alldone=''
 error=''
 silent=''
 extractsh=''
-override=''
 knowitall=''
 rm -f optdef.sh posthint.sh
 cat >optdef.sh <<EOS
@@ -1689,7 +1716,7 @@ while test $# -gt 0; do
        -s) shift; silent=true; realsilent=true;;
        -E) shift; alldone=exit;;
        -K) shift; knowitall=true;;
-       -O) shift; override=true;;
+       -O) shift;;
        -S) shift; silent=true; extractsh=true;;
        -D)
                shift
@@ -1798,7 +1825,7 @@ Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
          -Dprefix=/opt/perl5      choose your destination
   -E : stop at the end of questions, after having produced config.sh.
   -K : do not use unless you know what you are doing.
-  -O : let -D and -U override definitions from loaded configuration file.
+  -O : ignored for backward compatibility
   -S : perform variable substitutions on all .SH files (can mix with -f)
   -U : undefine symbol:
          -U symbol    symbol gets the value 'undef'
@@ -1845,6 +1872,11 @@ esac
 
 : run the defines and the undefines, if any, but leave the file out there...
 touch optdef.sh
+grep '\\' optdef.sh >/dev/null 2>&1
+if test $? = 0; then
+    echo "Configure does not support \\ in -D arguments"
+    exit 1
+fi
 . ./optdef.sh
 : create the posthint manipulation script and leave the file out there...
 touch posthint.sh
@@ -1853,8 +1885,8 @@ touch posthint.sh
 package='perl5'
 first=`echo $package | sed -e 's/^\(.\).*/\1/'`
 last=`echo $package | sed -e 's/^.\(.*\)/\1/'`
-case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
-ABYZ) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
+case "`echo AbyZ | tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
+ABYZ-abyz) spackage=`echo $first | tr '[:lower:]' '[:upper:]'`$last;;
 *) spackage=`echo $first | tr '[a-z]' '[A-Z]'`$last;;
 esac
 
@@ -2015,7 +2047,7 @@ true)
        echo "Fetching answers from $config_sh..."
        cd ..
        . $config_sh
-       test "$override" && . ./optdef.sh
+       . UU/optdef.sh
        echo " "
        . UU/extract
        rm -rf UU
@@ -2864,13 +2896,13 @@ $define|true|[yY]*)
                             }
                             {
                                 print "# dir = ", dir, "file = ", file
-                                mf[dir] = mf[dir]" "src"/"dir"/"file;
+                                mf[dir] = mf[dir]" "source"/"dir"/"file;
                             } END {
                                 for (d in mf) {
                                     if (d != ".") { print("mkdir -p "d) }
                                     print("ln -sf "mf[d]" "d);
                                 }
-                            }' src="$src" > UU/mksymlinks.$$
+                            }' source="$src" > UU/mksymlinks.$$
                        sh UU/mksymlinks.$$
                        rm UU/mksymlinks.$$
                        # Sanity check 1.
@@ -3186,8 +3218,8 @@ esac
 
 : see whether [:lower:] and [:upper:] are supported character classes
 echo " "
-case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`" in
-ABYZ)
+case "`echo AbyZ | $tr '[:lower:]' '[:upper:]' 2>/dev/null`"-"`echo AbyZ | $tr '[:upper:]' '[:lower:]' 2>/dev/null`" in
+ABYZ-abyz)
        echo "Good, your tr supports [:lower:] and [:upper:] to convert case." >&4
        up='[:upper:]'
        low='[:lower:]'
@@ -3335,8 +3367,9 @@ EOM
        $test -f /bin/mips && /bin/mips && osname=mips
        $test -d /usr/apollo/bin && osname=apollo
        $test -f /etc/saf/_sactab && osname=svr4
-       $test -d /usr/include/minix && osname=minix
+       $test -d /usr/include/minix && osname=minix && osvers=`$uname -r`
        $test -f /system/gnu_library/bin/ar.pm && osname=vos
+       $test -f /sys/utilities/MultiView && osname=amigaos
        if $test -d /MachTen -o -d /MachTen_Folder; then
                osname=machten
                if $test -x /sbin/version; then
@@ -3767,7 +3800,7 @@ cd UU
        hint=previous
        ;;
 esac
-test "$override" && . ./optdef.sh
+. ./optdef.sh
 
 : Restore computed paths
 for file in $loclist $trylist; do
@@ -4314,15 +4347,15 @@ case "$osname" in
 dos|vms)
        : XXX Should be a Configure test for double-dots in filenames.
        version=`echo $revision $patchlevel $subversion | \
-                $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
+                $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
        api_versionstring=`echo $api_revision $api_version $api_subversion | \
-                $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
+                $awk '{ printf "%d_%d_%d", $1, $2, $3 }'`
        ;;
 *)
        version=`echo $revision $patchlevel $subversion | \
-                $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
+                $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
        api_versionstring=`echo $api_revision $api_version $api_subversion | \
-                $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'`
+                $awk '{ printf "%d.%d.%d", $1, $2, $3 }'`
        ;;
 esac
 : Special case the 5.005_xx maintenance series, which used 5.005
@@ -4487,14 +4520,6 @@ esac
 set usemultiplicity
 eval $setvar
 
-: Check if usequadmath is requested
-case "$usequadmath" in
-"$define"|true|[yY]*)
-       usequadmath="$define"
-       ;;
-*)     usequadmath="$undef" ;;
-esac
-
 : Check if morebits is requested
 case "$usemorebits" in
 "$define"|true|[yY]*)
@@ -5202,6 +5227,12 @@ EOM
     esac
 fi
 
+: Check if quadmath is requested
+case "$usequadmath" in
+"$define"|true|[yY]*) usequadmath="$define" ;;
+*)                    usequadmath="$undef"  ;;
+esac
+
 : Looking for optional libraries
 echo " "
 echo "Checking for optional libraries..." >&4
@@ -5437,15 +5468,19 @@ default|recommended)
        # is to add the flag to the flags passed to the compiler at link time,
        # as that way the compiler can do the right implementation dependant
        # thing. (NWC)
-       case "$gccversion" in
-       ?*)     set stack-protector-strong -fstack-protector-strong
-               eval $checkccflag
-               case "$dflt" in
-               *-fstack-protector-strong*) ;; # It got added.
-               *) # Try the plain/older -fstack-protector.
-                  set stack-protector -fstack-protector
-                  eval $checkccflag
-                  ;;
+       case "$osname" in
+       amigaos) ;; # -fstack-protector builds but doesn't work
+       *)      case "$gccversion" in
+               ?*)     set stack-protector-strong -fstack-protector-strong
+                       eval $checkccflag
+                       case "$dflt" in
+                       *-fstack-protector-strong*) ;; # It got added.
+                       *) # Try the plain/older -fstack-protector.
+                          set stack-protector -fstack-protector
+                          eval $checkccflag
+                          ;;
+                       esac
+                       ;;
                esac
                ;;
        esac
@@ -5522,7 +5557,12 @@ esac
 : the following weeds options from ccflags that are of no interest to cpp
 case "$cppflags" in
 '') cppflags="$ccflags" ;;
-*)  cppflags="$cppflags $ccflags" ;;
+*)  set X $ccflags; shift
+    case " $cppflags " in
+    *" $1 "*) ;;  # Try to avoid doubling the cppflags.
+    *) cppflags="$cppflags $ccflags" ;;
+    esac
+    ;;
 esac
 case "$gccversion" in
 1*) cppflags="$cppflags -D__GNUC__"
@@ -5726,6 +5766,11 @@ $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;'
 echo " "
 echo "Computing filename position in cpp output for #include directives..." >&4
 case "$osname" in
+amigaos) fieldn=3 ;;  # Workaround for a bug in abc (pdksh).
+esac
+case "$fieldn" in
+'')
+case "$osname" in
 vos) testaccess=-e ;;
 *)   testaccess=-r ;;
 esac
@@ -5750,6 +5795,8 @@ EOF
 chmod +x fieldn
 fieldn=`./fieldn`
 $rm -f foo.c fieldn
+;;
+esac
 case $fieldn in
 '') pos='???';;
 1) pos=first;;
@@ -6828,93 +6875,6 @@ $rm_try
 set float.h i_float
 eval $inhdr
 
-echo " "
-$echo "Checking the kind of doubles you have..." >&4
-$cat <<EOP >try.c
-#$i_stdlib I_STDLIB
-#define DOUBLESIZE $doublesize
-#ifdef I_STDLIB
-#include <stdlib.h>
-#endif
-#include <stdio.h>
-static const double d = -0.1;
-int main() {
-  unsigned const char* b = (unsigned const char*)(&d);
-#if DOUBLESIZE == 4
-  if (b[0] == 0xCD && b[3] == 0xBD) {
-    /* IEEE 754 32-bit little-endian */
-    printf("1\n");
-    exit(0);
-  }
-  if (b[0] == 0xBD && b[3] == 0xCD) {
-    /* IEEE 754 32-bit big-endian */
-    printf("2\n");
-    exit(0);
-  }
-#endif
-#if DOUBLESIZE == 8
-  if (b[0] == 0x9A && b[7] == 0xBF) {
-    /* IEEE 754 64-bit little-endian */
-    printf("3\n");
-    exit(0);
-  }
-  if (b[0] == 0xBF && b[7] == 0x9A) {
-    /* IEEE 754 64-bit big-endian */
-    printf("4\n");
-    exit(0);
-  }
-  if (b[0] == 0x99 && b[3] == 0xBF && b[4] == 0x9A && b[7] == 0x99) {
-   /* ARM mixed endian: two little-endian 32-bit floats, in big endian order:
-    * 4 5 6 7 0 1 2 3 (MSB = 7, LSB = 0)
-    * 99 99 b9 bf 9a 99 99 99 */
-    printf("7\n");
-    exit(0);
-  }
-  if (b[0] == 0x99 && b[3] == 0x9A && b[4] == 0xBF && b[7] == 0x99) {
-   /* The opposite of case 7, mixed endian: two big-endian 32-bit floats,
-    * in little endian order: 3 2 1 0 7 6 5 4 (MSB = 7, LSB = 0)
-    * 99 99 99 9a bf b9 99 99 */
-    printf("8\n");
-    exit(0);
-  }
-#endif
-#if DOUBLESIZE == 16
-  if (b[0] == 0x9A && b[15] == 0xBF) {
-    /* IEEE 754 128-bit little-endian */
-    printf("5\n");
-    exit(0);
-  }
-  if (b[0] == 0xBF && b[15] == 0x9A) {
-    /* IEEE 754 128-bit big-endian */
-    printf("6\n");
-    exit(0);
-  }
-#endif
-  /* Rumoredly some old ARM processors have 'mixed endian' doubles,
-   * two 32-bit little endians stored in big-endian order. */
-  /* Then there are old mainframe/miniframe formats like VAX, IBM, and CRAY.
-   * Whether those environments can still build Perl is debatable. */
-  printf("-1\n"); /* unknown */
-  exit(0);
-}
-EOP
-set try
-if eval $compile; then
-    doublekind=`$run ./try`
-else
-    doublekind=-1
-fi
-case "$doublekind" in
-1) echo "You have IEEE 754 32-bit little endian doubles." >&4 ;;
-2) echo "You have IEEE 754 32-bit big endian doubles." >&4 ;;
-3) echo "You have IEEE 754 64-bit little endian doubles." >&4 ;;
-4) echo "You have IEEE 754 64-bit big endian doubles." >&4 ;;
-5) echo "You have IEEE 754 128-bit little endian doubles." >&4 ;;
-6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;;
-*) echo "Cannot figure out your double.  You VAX, or something?" >&4 ;;
-esac
-$rm_try
-
 : check for long doubles
 echo " "
 echo "Checking to see if you have long double..." >&4
@@ -6935,10 +6895,6 @@ eval $setvar
 set ldexpl d_ldexpl
 eval $inlibc
 
-: see if this is a quadmath.h system
-set quadmath.h i_quadmath
-eval $inhdr
-
 : check for length of long double
 case "${d_longdbl}${longdblsize}" in
 $define)
@@ -6973,7 +6929,6 @@ EOCP
 esac
 $rm_try
 
-echo " "
 $echo "Checking the kind of long doubles you have..." >&4
 case "$d_longdbl" in
 define)
@@ -6988,8 +6943,8 @@ $cat <<EOP >try.c
 #ifdef I_STDLIB
 #include <stdlib.h>
 #endif
-static const long double d = -0.1L;
 #include <stdio.h>
+static const long double d = -0.1L;
 int main() {
   unsigned const char* b = (unsigned const char*)(&d);
 #if DOUBLESIZE == LONGDBLSIZE
@@ -7009,17 +6964,26 @@ int main() {
   }
 #endif
 /* For alignment 32-bit platforms have the 80 bits in 12 bytes,
- * while 64-bits platforms have it in 16 bytes. */
+ * while 64-bits platforms have it in 16 bytes.  The trailing bytes
+ * cannot be trusted. */
 #if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12)
-  if (b[0] == 0xCD && b[9] == 0xBF && b[10] == 0x00) {
+  if (b[0] == 0xCD && b[9] == 0xBF) {
     /* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86)
      * or 16 (LP64, Linux and OS X), 4 or 6 bytes of padding.
      * Also known as "extended precision". */
     printf("3\n");
     exit(0);
   }
-  if (b[0] == 0xBF && b[9] == 0xCD && b[10] == 0x00) {
-    /* is there ever big-endian 80-bit, really? */
+  if (b[0] == 0xBF && b[9] == 0xCD) {
+    /* Is there ever big-endian 80-bit, really?
+     *
+     * The Motorola 68881 had another "extended precision" format:
+     * sign:1 exp:15 zero:16 integer:1 mantissa:63
+     * for total of 96 bits of bytes.  The zero bits were unused.
+     * See "M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL" for more details.
+     * If it ever becomes relevant, this format should be allocated
+     * a new doublekind code since it's quite different from the Intel x87.
+     */
     printf("4\n");
     exit(0);
   }
@@ -7028,17 +6992,35 @@ int main() {
   /* software "double double", the 106 is 53+53.
    * but irix thinks it is 107. */
   if (b[0] == 0x9A && b[7] == 0x3C && b[8] == 0x9A && b[15] == 0xBF) {
-    /* double double 128-bit little-endian,
+    /* double double 128-bit fully little-endian,
+     * little-endian doubles in little-endian order,
      * 9a 99 99 99 99 99 59 3c 9a 99 99 99 99 99 b9 bf */
     printf("5\n");
     exit(0);
   }
   if (b[0] == 0xBF && b[7] == 0x9A && b[8] == 0x3C && b[15] == 0x9A) {
-    /* double double 128-bit big-endian, e.g. PPC/Power and MIPS:
+    /* double double 128-bit fully big-endian,
+     * big-endian doubles in big-endian order,
+     * e.g. PPC/Power and MIPS:
      * bf b9 99 99 99 99 99 9a 3c 59 99 99 99 99 99 9a */
     printf("6\n");
     exit(0);
   }
+  if (b[0] == 0x9A && b[7] == 0xBF && b[8] == 0x9A && b[15] == 0x3C) {
+    /* double double 128-bit mixed endian.
+     * little-endian doubles in big-endian order,
+     * e.g. ppc64el,
+     * 9a 99 99 99 99 99 b9 bf 9a 99 99 99 99 99 59 3c */
+    printf("7\n");
+    exit(0);
+  }
+  if (b[0] == 0x3C && b[7] == 0x9A && b[8] == 0xBF && b[15] == 0x9A) {
+    /* double double 128-bit mixed endian,
+     * big-endian doubles in little-endian order,
+     * 3c 59 99 99 99 99 99 9a bf b9 99 99 99 99 99 9a */
+    printf("8\n");
+    exit(0);
+  }
 #endif
   printf("-1\n"); /* unknown */
   exit(0);
@@ -7059,242 +7041,96 @@ case "$longdblkind" in
 2) echo "You have IEEE 754 128-bit big endian long doubles." >&4 ;;
 3) echo "You have x86 80-bit little endian long doubles." >& 4 ;;
 4) echo "You have x86 80-bit big endian long doubles." >& 4 ;;
-5) echo "You have 128-bit little-endian double-double long doubles." >& 4 ;;
-6) echo "You have 128-bit big-endian double-double long doubles." >& 4 ;;
+5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >& 4 ;;
+6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;;
+7) echo "You have 128-bit mixed double-double long doubles (64-bit LEs in BE)." >& 4 ;;
+8) echo "You have 128-bit mixed double-double long doubles (64-bit BEs in LE)." >& 4 ;;
 *) echo "Cannot figure out your long double." >&4 ;;
 esac
 $rm_try
 
-: Check print/scan long double stuff
+: determine the architecture name
 echo " "
-
-if $test X"$d_longdbl" = X"$define"; then
-
-echo "Checking how to print long doubles..." >&4
-
-if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  double d = 123.456;
-  printf("%.3f\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`$run ./try`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
-                       sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
-                       echo "We will use %f."
-                       ;;
-               esac
+if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
+       tarch=`arch`"-$osname"
+elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
+       if uname -m > tmparch 2>&1 ; then
+               tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
+                       -e 's/$/'"-$osname/" tmparch`
+       else
+               tarch="$osname"
        fi
+       $rm -f tmparch
+else
+       tarch="$osname"
 fi
+case "$myarchname" in
+''|"$tarch") ;;
+*)
+       echo "(Your architecture name used to be $myarchname.)"
+       archname=''
+       ;;
+esac
+case "$targetarch" in
+'') ;;
+*)  archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
+esac
+myarchname="$tarch"
+case "$archname" in
+'') dflt="$tarch";;
+*) dflt="$archname";;
+esac
+rp='What is your architecture name'
+. ./myread
+archname="$ans"
 
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3Lf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`$run ./try`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
-                       sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
-                       echo "We will use %Lf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3llf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`$run ./try`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
-                       sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
-                       echo "We will use %llf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       $cat >try.c <<'EOCP'
-#include <sys/types.h>
-#include <stdio.h>
-int main() {
-  long double d = 123.456;
-  printf("%.3lf\n", d);
-}
-EOCP
-       set try
-       if eval $compile; then
-               yyy=`$run ./try`
-               case "$yyy" in
-               123.456)
-                       sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
-                       sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
-                       echo "We will use %lf."
-                       ;;
-               esac
-       fi
-fi
-
-if $test X"$sPRIfldbl" = X; then
-       echo "Cannot figure out how to print long doubles." >&4
-else
-       sSCNfldbl=$sPRIfldbl    # expect consistency
-fi
-
-$rm_try
-
-fi # d_longdbl
-
-case "$sPRIfldbl" in
-'')    d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
-       d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
-       d_SCNfldbl="$undef";
-       ;;
-*)     d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
-       d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
-       d_SCNfldbl="$define";
-       ;;
-esac
-
-: Before committing on uselongdouble, see whether that looks sane.
-if $test "$uselongdouble" = "$define"; then
-    message=""
-    echo " "
-    echo "Checking if your long double math functions work right..." >&4
-    $cat > try.c <<EOF
-#include <math.h>
-#include <stdio.h>
-int main() {
-  printf("%"$sPRIgldbl"\n", sqrtl(logl(expl(cosl(sinl(0.0L))))+powl(2.0L, 3.0L)));
-}
-EOF
-    case "$osname:$gccversion" in
-    aix:)      saveccflags="$ccflags"
-               ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
-    esac
-    set try
-    if eval $compile_ok; then
-      yyy=`$run ./try`
-    fi
-    case "$yyy" in
-    3) echo "Your long double math functions are working correctly." >&4 ;;
-    *) echo "Your long double math functions are broken, not using long doubles." >&4
-       uselongdouble=$undef
-       ;;
-    esac
-    $rm_try
-    case "$osname:$gccversion" in
-    aix:)      ccflags="$saveccflags" ;; # restore
-    esac
-fi
-
-: determine the architecture name
-echo " "
-if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
-       tarch=`arch`"-$osname"
-elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
-       if uname -m > tmparch 2>&1 ; then
-               tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
-                       -e 's/$/'"-$osname/" tmparch`
-       else
-               tarch="$osname"
-       fi
-       $rm -f tmparch
-else
-       tarch="$osname"
-fi
-case "$myarchname" in
-''|"$tarch") ;;
-*)
-       echo "(Your architecture name used to be $myarchname.)"
-       archname=''
-       ;;
-esac
-case "$targetarch" in
-'') ;;
-*)  archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;;
-esac
-myarchname="$tarch"
-case "$archname" in
-'') dflt="$tarch";;
-*) dflt="$archname";;
-esac
-rp='What is your architecture name'
-. ./myread
-archname="$ans"
-
-: optionally add API version to the architecture for versioned archlibs
-case "$useversionedarchname" in
-$define|true|[yY]*) dflt='y';;
-*)                  dflt='n';;
-esac
-rp='Add the Perl API version to your archname?'
-. ./myread
-case "$ans" in
-y|Y)   useversionedarchname="$define" ;;
-*)      useversionedarchname="$undef" ;;
-esac
-case "$useversionedarchname" in
-$define)
-        case "$archname" in
-        *-$api_versionstring)
-                echo "...and architecture name already has -$api_versionstring" >&4
-                ;;
-        *)
-                archname="$archname-$api_versionstring"
-                echo "...setting architecture name to $archname." >&4
-                ;;
-        esac
-        ;;
-esac
+: optionally add API version to the architecture for versioned archlibs
+case "$useversionedarchname" in
+$define|true|[yY]*) dflt='y';;
+*)                  dflt='n';;
+esac
+rp='Add the Perl API version to your archname?'
+. ./myread
+case "$ans" in
+y|Y)   useversionedarchname="$define" ;;
+*)      useversionedarchname="$undef" ;;
+esac
+case "$useversionedarchname" in
+$define)
+       case "$archname" in
+       *-$api_versionstring)
+               echo "...and architecture name already has -$api_versionstring" >&4
+               ;;
+       *)
+               archname="$archname-$api_versionstring"
+               echo "...setting architecture name to $archname." >&4
+               ;;
+       esac
+       ;;
+esac
 
 case "$usethreads" in
 $define)
        echo "Threads selected." >&4
        case "$archname" in
-        *-thread*) echo "...and architecture name already has -thread." >&4
-                ;;
-        *)      archname="$archname-thread"
-                echo "...setting architecture name to $archname." >&4
-                ;;
-        esac
+       *-thread*) echo "...and architecture name already has -thread." >&4
+               ;;
+       *)      archname="$archname-thread"
+               echo "...setting architecture name to $archname." >&4
+               ;;
+       esac
        ;;
 esac
 case "$usemultiplicity" in
 $define)
        echo "Multiplicity selected." >&4
        case "$archname" in
-        *-multi*) echo "...and architecture name already has -multi." >&4
-                ;;
-        *)      archname="$archname-multi"
-                echo "...setting architecture name to $archname." >&4
-                ;;
-        esac
+       *-multi*) echo "...and architecture name already has -multi." >&4
+               ;;
+       *)      archname="$archname-multi"
+               echo "...setting architecture name to $archname." >&4
+               ;;
+       esac
        ;;
 esac
 case "$use64bitint$use64bitall" in
@@ -7311,12 +7147,12 @@ case "$use64bitint$use64bitall" in
                "$define") echo "Maximal 64 bitness selected." >&4 ;;
                esac
                case "$archname" in
-               *-$archname64*) echo "...and architecture name already has $archname64." >&4
-                       ;;
-               *)      archname="$archname-$archname64"
-                       echo "...setting architecture name to $archname." >&4
-                       ;;
-               esac
+               *-$archname64*) echo "...and architecture name already has $archname64." >&4
+                       ;;
+               *)      archname="$archname-$archname64"
+                       echo "...setting architecture name to $archname." >&4
+                       ;;
+               esac
                ;;
        esac
 esac
@@ -7329,12 +7165,12 @@ $define)
                ;;
        *)
                case "$archname" in
-               *-ld*) echo "...and architecture name already has -ld." >&4
-                       ;;
-               *)      archname="$archname-ld"
-                       echo "...setting architecture name to $archname." >&4
-                       ;;
-               esac
+               *-ld*) echo "...and architecture name already has -ld." >&4
+                       ;;
+               *)      archname="$archname-ld"
+                       echo "...setting architecture name to $archname." >&4
+                       ;;
+               esac
                ;;
        esac
        ;;
@@ -7343,12 +7179,12 @@ case "$usequadmath" in
 $define)
        echo "quadmath selected." >&4
        case "$archname" in
-        *-ld*) echo "...and architecture name already has -quadmath." >&4
-                ;;
-        *)      archname="$archname-quadmath"
-                echo "...setting architecture name to $archname." >&4
+       *-ld*) echo "...and architecture name already has -quadmath." >&4
                ;;
-        esac
+       *)      archname="$archname-quadmath"
+               echo "...setting architecture name to $archname." >&4
+               ;;
+       esac
        ;;
 esac
 if $test -f archname.cbu; then
@@ -7863,7 +7699,7 @@ echo " "
 case "$ptrsize" in
 '')
        echo "Checking to see how big your pointers are..." >&4
-       $cat >>try.c <<EOCP
+       $cat >try.c <<EOCP
 #include <stdio.h>
 #$i_stdlib I_STDLIB
 #ifdef I_STDLIB
@@ -8260,7 +8096,7 @@ cat <<EOM
 Perl can be built to support DTrace on platforms that support it.
 DTrace is a diagnosis and performance analysis tool from Sun.
 
-If this doesn't make any sense to you, just accept the default '$dflt'.
+If this doesn't make any sense to you, just accept the default.
 EOM
 
 while $test 1 ; do
@@ -8484,6 +8320,7 @@ runnm=false
 : with g++ one needs -shared to get is-in-libc to work for dlopen
 case "$gccversion" in
 '')    ;;
+*Clang*)       ;;
 *)     case "$d_cplusplus" in
        "$define") ccflags="$ccflags -shared" ;;
        esac
@@ -8633,7 +8470,7 @@ int main() {
     exit(1); /* fail */
 }
 EOM
-       if $cc $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then
+       if $cc $ccflags $ldflags -o a.out try.c >/dev/null 2>&1 && $run ./a.out; then
            bin_ELF="$define"
        fi
        $rm_try
@@ -8970,12 +8807,9 @@ if "$useshrplib"; then
        freebsd|mirbsd|netbsd|openbsd|interix|dragonfly|bitrig)
                xxx="-Wl,-R$shrpdir"
                ;;
-       bsdos|linux|irix*|dec_osf|gnu*)
+       bsdos|linux|irix*|dec_osf|gnu*|haiku)
                xxx="-Wl,-rpath,$shrpdir"
                ;;
-       haiku)
-               # Haiku doesn't like the default, either.
-               ;;
        hpux*)
                # hpux doesn't like the default, either.
                tmp_shrpenv="env LDOPTS=\"+s +b${shrpdir}\""
@@ -10262,89 +10096,324 @@ esac
 set qgcvt d_qgcvt
 eval $inlibc
 
-: Check how to convert floats to strings.
-
-if test "X$d_Gconvert" = X; then
-
-echo " "
-echo "Checking for an efficient way to convert floats to strings."
-echo " " > try.c
-case "$uselongdouble" in
-"$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
-esac
-case "$d_longdbl" in
-"$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
-esac
-case "$d_PRIgldbl" in
-"$define") echo "#define HAS_PRIgldbl"    >>try.c ;;
-esac
-$cat >>try.c <<EOP
-#ifdef TRY_gconvert
-#define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
-char *myname = "gconvert";
-#endif
-#ifdef TRY_gcvt
-#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
-char *myname = "gcvt";
-#endif
-#ifdef TRY_qgcvt
-#define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
-char *myname = "qgcvt";
-#define DOUBLETYPE long double
-#endif
-#ifdef TRY_sprintf
-#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
-#ifdef HAS_PRIgldbl
-#define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
-#else
-#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
-#endif
-#else
-#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
-#endif
-char *myname = "sprintf";
-#endif
-
-#ifndef DOUBLETYPE
-#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
-#define DOUBLETYPE long double
-#else
-#define DOUBLETYPE double
-#endif
-#endif
-
-#include <stdio.h>
-
+: Check what kind of doubles your system has
+$echo "Checking the kind of doubles you have..." >&4
+$cat >try.c <<EOP
 #$i_stdlib I_STDLIB
+#define DOUBLESIZE $doublesize
 #ifdef I_STDLIB
 #include <stdlib.h>
 #endif
-#$i_string I_STRING
-#ifdef I_STRING
-#  include <string.h>
-#else
-#  include <strings.h>
+#include <stdio.h>
+static const double d = -0.1;
+int main() {
+  unsigned const char* b = (unsigned const char*)(&d);
+#if DOUBLESIZE == 4
+  if (b[0] == 0xCD && b[3] == 0xBD) {
+    /* IEEE 754 32-bit little-endian */
+    printf("1\n");
+    exit(0);
+  }
+  if (b[0] == 0xBD && b[3] == 0xCD) {
+    /* IEEE 754 32-bit big-endian */
+    printf("2\n");
+    exit(0);
+  }
 #endif
-
-int checkit(char *expect, char *got)
-{
-    if (strcmp(expect, got)) {
-               printf("%s oddity:  Expected %s, got %s\n",
-                       myname, expect, got);
-               exit(1);
-       }
-}
-
-int main()
-{
-       char buf[64];
-       buf[63] = '\0';
-
-       /* This must be 1st test on (which?) platform */
-       /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
-       Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
-       checkit("0.1", buf);
-
+#if DOUBLESIZE == 8
+  if (b[0] == 0x9A && b[7] == 0xBF) {
+    /* IEEE 754 64-bit little-endian */
+    printf("3\n");
+    exit(0);
+  }
+  if (b[0] == 0xBF && b[7] == 0x9A) {
+    /* IEEE 754 64-bit big-endian */
+    printf("4\n");
+    exit(0);
+  }
+  if (b[0] == 0x99 && b[3] == 0xBF && b[4] == 0x9A && b[7] == 0x99) {
+   /* ARM mixed endian: two little-endian 32-bit floats, in big endian order:
+    * 4 5 6 7 0 1 2 3 (MSB = 7, LSB = 0)
+    * 99 99 b9 bf 9a 99 99 99 */
+    printf("7\n");
+    exit(0);
+  }
+  if (b[0] == 0x99 && b[3] == 0x9A && b[4] == 0xBF && b[7] == 0x99) {
+   /* The opposite of case 7, mixed endian: two big-endian 32-bit floats,
+    * in little endian order: 3 2 1 0 7 6 5 4 (MSB = 7, LSB = 0)
+    * 99 99 99 9a bf b9 99 99 */
+    printf("8\n");
+    exit(0);
+  }
+#endif
+#if DOUBLESIZE == 16
+  if (b[0] == 0x9A && b[15] == 0xBF) {
+    /* IEEE 754 128-bit little-endian */
+    printf("5\n");
+    exit(0);
+  }
+  if (b[0] == 0xBF && b[15] == 0x9A) {
+    /* IEEE 754 128-bit big-endian */
+    printf("6\n");
+    exit(0);
+  }
+#endif
+  /* Then there are old mainframe/miniframe formats like VAX, IBM, and CRAY.
+   * Whether those environments can still build Perl is debatable. */
+  printf("-1\n"); /* unknown */
+  exit(0);
+}
+EOP
+set try
+if eval $compile; then
+    doublekind=`$run ./try`
+else
+    doublekind=-1
+fi
+case "$doublekind" in
+1) echo "You have IEEE 754 32-bit little endian doubles." >&4 ;;
+2) echo "You have IEEE 754 32-bit big endian doubles." >&4 ;;
+3) echo "You have IEEE 754 64-bit little endian doubles." >&4 ;;
+4) echo "You have IEEE 754 64-bit big endian doubles." >&4 ;;
+5) echo "You have IEEE 754 128-bit little endian doubles." >&4 ;;
+6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;;
+7) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit LEs in BE)." >&4 ;;
+8) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit BEs in LE)." >&4 ;;
+*) echo "Cannot figure out your double.  You VAX, or something?" >&4 ;;
+esac
+$rm_try
+
+: Check print/scan long double stuff
+echo " "
+
+if $test X"$d_longdbl" = X"$define"; then
+
+echo "Checking how to print long doubles..." >&4
+
+if $test X"$sPRIfldbl" = X -a X"$doublesize" = X"$longdblsize"; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  double d = 123.456;
+  printf("%.3f\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`$run ./try`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
+                       sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
+                       echo "We will use %f."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3Lf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`$run ./try`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
+                       sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
+                       echo "We will use %Lf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3llf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`$run ./try`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
+                       sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
+                       echo "We will use %llf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       $cat >try.c <<'EOCP'
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+  long double d = 123.456;
+  printf("%.3lf\n", d);
+}
+EOCP
+       set try
+       if eval $compile; then
+               yyy=`$run ./try`
+               case "$yyy" in
+               123.456)
+                       sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
+                       sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
+                       echo "We will use %lf."
+                       ;;
+               esac
+       fi
+fi
+
+if $test X"$sPRIfldbl" = X; then
+       echo "Cannot figure out how to print long doubles." >&4
+else
+       sSCNfldbl=$sPRIfldbl    # expect consistency
+fi
+
+$rm_try
+
+fi # d_longdbl
+
+case "$sPRIfldbl" in
+'')    d_PRIfldbl="$undef"; d_PRIgldbl="$undef"; d_PRIeldbl="$undef";
+       d_PRIFUldbl="$undef"; d_PRIGUldbl="$undef"; d_PRIEUldbl="$undef";
+       d_SCNfldbl="$undef";
+       ;;
+*)     d_PRIfldbl="$define"; d_PRIgldbl="$define"; d_PRIeldbl="$define";
+       d_PRIFUldbl="$define"; d_PRIGUldbl="$define"; d_PRIEUldbl="$define";
+       d_SCNfldbl="$define";
+       ;;
+esac
+
+: Before committing on uselongdouble, see whether that looks sane.
+if $test "$uselongdouble" = "$define"; then
+    message=""
+    echo " "
+    echo "Checking if your long double math functions work right..." >&4
+    $cat > try.c <<EOF
+#include <math.h>
+#include <stdio.h>
+int main() {
+  printf("%"$sPRIgldbl"\n", sqrtl(logl(expl(cosl(sinl(0.0L))))+powl(2.0L, 3.0L)));
+}
+EOF
+    case "$osname:$gccversion" in
+    aix:)      saveccflags="$ccflags"
+               ccflags="$ccflags -qlongdouble" ;; # to avoid core dump
+    esac
+    set try
+    if eval $compile_ok; then
+      yyy=`$run ./try`
+    fi
+    case "$yyy" in
+    3) echo "Your long double math functions are working correctly." >&4 ;;
+    *) echo "Your long double math functions are broken, not using long doubles." >&4
+       uselongdouble=$undef
+       ;;
+    esac
+    $rm_try
+    case "$osname:$gccversion" in
+    aix:)      ccflags="$saveccflags" ;; # restore
+    esac
+fi
+
+: Check how to convert floats to strings.
+
+if test "X$d_Gconvert" = X; then
+
+echo " "
+echo "Checking for an efficient way to convert floats to strings."
+echo " " > try.c
+case "$uselongdouble" in
+"$define") echo "#define USE_LONG_DOUBLE" >>try.c ;;
+esac
+case "$d_longdbl" in
+"$define") echo "#define HAS_LONG_DOUBLE" >>try.c ;;
+esac
+case "$d_PRIgldbl" in
+"$define") echo "#define HAS_PRIgldbl"    >>try.c ;;
+esac
+$cat >>try.c <<EOP
+#ifdef TRY_gconvert
+#define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
+char *myname = "gconvert";
+#endif
+#ifdef TRY_gcvt
+#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
+char *myname = "gcvt";
+#endif
+#ifdef TRY_qgcvt
+#define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
+char *myname = "qgcvt";
+#define DOUBLETYPE long double
+#endif
+#ifdef TRY_sprintf
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#ifdef HAS_PRIgldbl
+#define Gconvert(x,n,t,b) sprintf((b),"%.*"$sPRIgldbl,(n),(x))
+#else
+#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(double)(x))
+#endif
+#else
+#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
+#endif
+char *myname = "sprintf";
+#endif
+
+#ifndef DOUBLETYPE
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#define DOUBLETYPE long double
+#else
+#define DOUBLETYPE double
+#endif
+#endif
+
+#include <stdio.h>
+
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#$i_string I_STRING
+#ifdef I_STRING
+#  include <string.h>
+#else
+#  include <strings.h>
+#endif
+
+int checkit(char *expect, char *got)
+{
+    if (strcmp(expect, got)) {
+               printf("%s oddity:  Expected %s, got %s\n",
+                       myname, expect, got);
+               exit(1);
+       }
+}
+
+int main()
+{
+       char buf[64];
+       buf[63] = '\0';
+
+       /* This must be 1st test on (which?) platform */
+       /* Alan Burlison <AlanBurlsin@unn.unisys.com> */
+       Gconvert((DOUBLETYPE)0.1, 8, 0, buf);
+       checkit("0.1", buf);
+
        Gconvert((DOUBLETYPE)0.01, 8, 0, buf);
        checkit("0.01", buf);
 
@@ -10561,6 +10630,10 @@ $rm -f access*
 set accessx d_accessx
 eval $inlibc
 
+: see if acosh exists
+set acosh d_acosh
+eval $inlibc
+
 : see if aintl exists
 set aintl d_aintl
 eval $inlibc
@@ -10692,6 +10765,25 @@ set $varname;
 eval $setvar;
 $rm_try'
 
+: Define hasfield_t macro for Configure internal use
+hasfield_t='varname=$1; struct=$2; type=$3; field=$4; shift; shift; shift; shift;
+while $test $# -ge 2; do
+       case "$1" in
+       $define) echo "#include <$2>";;
+       esac ;
+    shift 2;
+done > try.c;
+echo "int main () { $struct foo; $type bar = foo.$field; }" >> try.c;
+set try;
+if eval $compile; then
+       val="$define";
+else
+       val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm_try'
+
 : see if we should include time.h, sys/time.h, or both
 echo " "
 if test "X$timeincl" = X; then
@@ -10867,6 +10959,14 @@ case "$d_asctime_r" in
        ;;
 esac
 
+: see if asinh exists
+set asinh d_asinh
+eval $inlibc
+
+: see if atanh exists
+set atanh d_atanh
+eval $inlibc
+
 : see if atolf exists
 set atolf d_atolf
 eval $inlibc
@@ -11593,7 +11693,7 @@ int main()
 EOCP
 set try
 if eval $compile_ok; then
-       $run ./try
+       $run ./try 2>/dev/null
        yyy=$?
 else
        echo "(I can't seem to compile the test program--assuming it can't)"
@@ -11693,7 +11793,7 @@ int main()
 EOCP
 set try
 if eval $compile_ok; then
-       $run ./try
+       $run ./try 2>/dev/null
        castflags=$?
 else
        echo "(I can't seem to compile the test program--assuming it can't)"
@@ -11711,6 +11811,10 @@ set d_castneg
 eval $setvar
 $rm_try
 
+: see if cbrt exists
+set cbrt d_cbrt
+eval $inlibc
+
 : see if vprintf exists
 echo " "
 if set vprintf val -f d_vprintf; eval $csym; $val; then
 set d_const
 eval $setvar
 
+: see if copysign exists
+set copysign d_copysign
+eval $inlibc
+
 : see if copysignl exists
 set copysignl d_copysignl
 eval $inlibc
@@ -13100,227 +13208,87 @@ case "$d_endservent_r" in
                ;;
        esac
        ;;
-*)     endservent_r_proto=0
-       ;;
-esac
-
-: Locate the flags for 'open()'
-echo " "
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#ifdef I_FCNTL
-#include <fcntl.h>
-#endif
-#ifdef I_SYS_FILE
-#include <sys/file.h>
-#endif
-#$i_stdlib I_STDLIB
-#ifdef I_STDLIB
-#include <stdlib.h>
-#endif
-int main() {
-       if(O_RDONLY);
-#ifdef O_TRUNC
-       exit(0);
-#else
-       exit(1);
-#endif
-}
-EOCP
-: check sys/file.h first to get FREAD on Sun
-if $test `./findhdr sys/file.h` && \
-               set try -DI_SYS_FILE && eval $compile; then
-       h_sysfile=true;
-       echo "<sys/file.h> defines the O_* constants..." >&4
-       if $run ./try; then
-               echo "and you have the 3 argument form of open()." >&4
-               val="$define"
-       else
-               echo "but not the 3 argument form of open().  Oh, well." >&4
-               val="$undef"
-       fi
-elif $test `./findhdr fcntl.h` && \
-               set try -DI_FCNTL && eval $compile; then
-       h_fcntl=true;
-       echo "<fcntl.h> defines the O_* constants..." >&4
-       if $run ./try; then
-               echo "and you have the 3 argument form of open()." >&4
-               val="$define"
-       else
-               echo "but not the 3 argument form of open().  Oh, well." >&4
-               val="$undef"
-       fi
-else
-       val="$undef"
-       echo "I can't find the O_* constant definitions!  You got problems." >&4
-fi
-set d_open3
-eval $setvar
-$rm_try
-
-: see if this is a sys/file.h system
-val=''
-set sys/file.h val
-eval $inhdr
-
-: do we need to include sys/file.h ?
-case "$val" in
-"$define")
-       echo " "
-       if $h_sysfile; then
-               val="$define"
-               echo "We'll be including <sys/file.h>." >&4
-       else
-               val="$undef"
-               echo "We won't be including <sys/file.h>." >&4
-       fi
-       ;;
-*)
-       h_sysfile=false
-       ;;
-esac
-set i_sysfile
-eval $setvar
-
-: see if acosh exists
-set acosh d_acosh
-eval $inlibc
-
-: see if asinh exists
-set asinh d_asinh
-eval $inlibc
-
-: see if atanh exists
-set atanh d_atanh
-eval $inlibc
-
-: see if cbrt exists
-set cbrt d_cbrt
-eval $inlibc
-
-: see if copysign exists
-set copysign d_copysign
-eval $inlibc
-
-: see if erf exists
-set erf d_erf
-eval $inlibc
-
-: see if erfc exists
-set erfc d_erfc
-eval $inlibc
-
-: see if exp2 exists
-set exp2 d_exp2
-eval $inlibc
-
-: see if expm1 exists
-set expm1 d_expm1
-eval $inlibc
-
-: see if fdim exists
-set fdim d_fdim
-eval $inlibc
-
-: see if fma exists
-set fma d_fma
-eval $inlibc
-
-: see if fmax exists
-set fmax d_fmax
-eval $inlibc
-
-: see if fmin exists
-set fmin d_fmin
-eval $inlibc
-
-: see if hypot exists
-set hypot d_hypot
-eval $inlibc
-
-: see if ilogb exists
-set ilogb d_ilogb
-eval $inlibc
-
-: see if lgamma exists
-set lgamma d_lgamma
-eval $inlibc
-
-: see if lgamma_r exists
-set lgamma_r d_lgamma_r
-eval $inlibc
-
-: see if llrint exists
-set llrint d_llrint
-eval $inlibc
-
-: see if llround exists
-set llround d_llround
-eval $inlibc
-
-: see if log1p exists
-set log1p d_log1p
-eval $inlibc
-
-: see if log2 exists
-set log2 d_log2
-eval $inlibc
-
-: see if logb exists
-set logb d_logb
-eval $inlibc
-
-: see if lrint exists
-set lrint d_lrint
-eval $inlibc
-
-: see if lround exists
-set lround d_lround
-eval $inlibc
-
-: see if nan exists
-set nan d_nan
-eval $inlibc
-
-: see if nearbyint exists
-set nearbyint d_nearbyint
-eval $inlibc
-
-: see if nextafter exists
-set nextafter d_nextafter
-eval $inlibc
-
-: see if nexttoward exists
-set nexttoward d_nexttoward
-eval $inlibc
-
-: see if remainder exists
-set remainder d_remainder
-eval $inlibc
-
-: see if remquo exists
-set remquo d_remquo
-eval $inlibc
-
-: see if rint exists
-set rint d_rint
-eval $inlibc
-
-: see if round exists
-set round d_round
-eval $inlibc
+*)     endservent_r_proto=0
+       ;;
+esac
 
-: see if scalbn exists
-set scalbn d_scalbn
-eval $inlibc
+: Locate the flags for 'open()'
+echo " "
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#ifdef I_FCNTL
+#include <fcntl.h>
+#endif
+#ifdef I_SYS_FILE
+#include <sys/file.h>
+#endif
+#$i_stdlib I_STDLIB
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+int main() {
+       if(O_RDONLY);
+#ifdef O_TRUNC
+       exit(0);
+#else
+       exit(1);
+#endif
+}
+EOCP
+: check sys/file.h first to get FREAD on Sun
+if $test `./findhdr sys/file.h` && \
+               set try -DI_SYS_FILE && eval $compile; then
+       h_sysfile=true;
+       echo "<sys/file.h> defines the O_* constants..." >&4
+       if $run ./try; then
+               echo "and you have the 3 argument form of open()." >&4
+               val="$define"
+       else
+               echo "but not the 3 argument form of open().  Oh, well." >&4
+               val="$undef"
+       fi
+elif $test `./findhdr fcntl.h` && \
+               set try -DI_FCNTL && eval $compile; then
+       h_fcntl=true;
+       echo "<fcntl.h> defines the O_* constants..." >&4
+       if $run ./try; then
+               echo "and you have the 3 argument form of open()." >&4
+               val="$define"
+       else
+               echo "but not the 3 argument form of open().  Oh, well." >&4
+               val="$undef"
+       fi
+else
+       val="$undef"
+       echo "I can't find the O_* constant definitions!  You got problems." >&4
+fi
+set d_open3
+eval $setvar
+$rm_try
 
-: see if tgamma exists
-set tgamma d_tgamma
-eval $inlibc
+: see if this is a sys/file.h system
+val=''
+set sys/file.h val
+eval $inhdr
 
-: see if trunc exists
-set trunc d_trunc
-eval $inlibc
+: do we need to include sys/file.h ?
+case "$val" in
+"$define")
+       echo " "
+       if $h_sysfile; then
+               val="$define"
+               echo "We'll be including <sys/file.h>." >&4
+       else
+               val="$undef"
+               echo "We won't be including <sys/file.h>." >&4
+       fi
+       ;;
+*)
+       h_sysfile=false
+       ;;
+esac
+set i_sysfile
+eval $setvar
 
 : see if fcntl.h is there
 val=''
@@ -13419,8 +13387,8 @@ echo " "
 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
 case "$eagain" in
 '')
-       case "$d_fork:$d_pipe" in
-       define:define)
+       case "$d_fork:$d_pipe:$d_alarm" in
+       define:define:define)
        $cat head.c > try.c
        $cat >>try.c <<EOCP
 #include <errno.h>
@@ -13589,6 +13557,22 @@ EOCP
 esac
 $rm_try head.c mtry
 
+: see if erf exists
+set erf d_erf
+eval $inlibc
+
+: see if erfc exists
+set erfc d_erfc
+eval $inlibc
+
+: see if exp2 exists
+set exp2 d_exp2
+eval $inlibc
+
+: see if expm1 exists
+set expm1 d_expm1
+eval $inlibc
+
 : see if _ptr and _cnt from stdio act std
 echo " "
 
@@ -14034,6 +14018,14 @@ EOM
 fi
 $rm_try
 
+: see if fdclose exists
+set fdclose d_fdclose
+eval $inlibc
+
+: see if fdim exists
+set fdim d_fdim
+eval $inlibc
+
 : see if fegetround exists
 set fegetround d_fegetround
 eval $inlibc
@@ -14059,6 +14051,18 @@ echo " "
 set d_flockproto flock $i_sysfile sys/file.h
 eval $hasproto
 
+: see if fma exists
+set fma d_fma
+eval $inlibc
+
+: see if fmax exists
+set fmax d_fmax
+eval $inlibc
+
+: see if fmin exists
+set fmin d_fmin
+eval $inlibc
+
 : see if fp_class exists
 set fp_class d_fp_class
 eval $inlibc
@@ -15743,6 +15747,14 @@ esac
 set d_htonl
 eval $setvar
 
+: see if hypot exists
+set hypot d_hypot
+eval $inlibc
+
+: see if ilogb exists
+set ilogb d_ilogb
+eval $inlibc
+
 : see if ilogbl exists
 set ilogbl d_ilogbl
 eval $inlibc
@@ -15974,6 +15986,31 @@ eval $inlibc
 set killpg d_killpg
 eval $inlibc
 
+: see if localeconv exists
+set localeconv d_locconv
+eval $inlibc
+
+: see if libc has the POSIX.1-2008 currency locale rules
+case "$d_locconv:$d_lc_monetary_2008" in
+$define:)
+       $cat >try.c <<EOCP
+#include <locale.h>
+int main() {
+       struct lconv *lc = localeconv();
+       char int_p_cs_precedes = lc->int_p_cs_precedes;
+       return 0;
+}
+EOCP
+       set try
+       if eval $compile; then
+               d_lc_monetary_2008="$define"
+       else
+               d_lc_monetary_2008="$undef"
+       fi;
+       $rm_try
+       ;;
+esac
+
 : see if lchown exists
 echo " "
 $cat > try.c <<'EOCP'
@@ -16033,6 +16070,14 @@ $rm -f ldbl_dig.?
 set d_ldbl_dig
 eval $setvar
 
+: see if lgamma exists
+set lgamma d_lgamma
+eval $inlibc
+
+: see if lgamma_r exists
+set lgamma_r d_lgamma_r
+eval $inlibc
+
 : check to see if math.h defines _LIB_VERSION
 d_libm_lib_version="$undef"
 case $i_math in
@@ -16053,110 +16098,34 @@ EOCP
            foo=`$run ./try`
            echo "Yes, it does ($foo)" >&4
            d_libm_lib_version="$define"
-       else
-           echo "No, it does not (probably harmless)" >&4
-           fi
-       $rm_try
-       ;;
-
-    esac
-
-: check for fpclassify
-echo " "
-echo "Checking to see if you have fpclassify..." >&4
-$cat >try.c <<EOCP
-#$i_math I_MATH
-#ifdef I_MATH
-#include <math.h>
-#endif
-int main() { return fpclassify(1.0) == FP_NORMAL ? 0 : 1; }
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo "You have fpclassify."
-else
-       val="$undef"
-       echo "You do not have fpclassify."
-fi
-$rm_try
-set d_fpclassify
-eval $setvar
-
-: check for isfinite
-echo " "
-echo "Checking to see if you have isfinite..." >&4
-$cat >try.c <<EOCP
-#$i_math I_MATH
-#ifdef I_MATH
-#include <math.h>
-#endif
-int main() { return isfinite(0.0); }
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo "You have isfinite."
-else
-       val="$undef"
-       echo "You do not have isfinite."
-fi
-$rm_try
-set d_isfinite
-eval $setvar
-
-: check for isinf
-echo " "
-echo "Checking to see if you have isinf..." >&4
-$cat >try.c <<EOCP
-#$i_math I_MATH
-#ifdef I_MATH
-#include <math.h>
-#endif
-int main() { return isinf(0.0); }
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo "You have isinf."
-else
-       val="$undef"
-       echo "You do not have isinf."
-fi
-$rm_try
-set d_isinf
-eval $setvar
-
-: check for isnan
-echo " "
-echo "Checking to see if you have isnan..." >&4
-$cat >try.c <<EOCP
-#$i_math I_MATH
-#ifdef I_MATH
-#include <math.h>
-#endif
-int main() { return isnan(0.0); }
-EOCP
-set try
-if eval $compile; then
-       val="$define"
-       echo "You have isnan."
-else
-       val="$undef"
-       echo "You do not have isnan."
-fi
-$rm_try
-set d_isnan
-eval $setvar
+       else
+           echo "No, it does not (probably harmless)" >&4
+           fi
+       $rm_try
+       ;;
 
-: see if this is a quadmath.h system
-set quadmath.h i_quadmath
-eval $inhdr
+    esac
 
 : see if link exists
 set link d_link
 eval $inlibc
 
+: see if llrint exists
+set llrint d_llrint
+eval $inlibc
+
+: see if llrintl exists
+set llrintl d_llrintl
+eval $inlibc
+
+: see if llround exists
+set llround d_llround
+eval $inlibc
+
+: see if llroundl exists
+set llroundl d_llroundl
+eval $inlibc
+
 : see if localtime_r exists
 set localtime_r d_localtime_r
 eval $inlibc
@@ -16276,33 +16245,36 @@ EOCP
 esac
 $rm_try
 
-: see if localeconv exists
-set localeconv d_locconv
+: see if lockf exists
+set lockf d_lockf
 eval $inlibc
 
-: see if libc has the POSIX.1-2008 currency locale rules
-case "$d_locconv:$d_lc_monetary_2008" in
-  $define:)
-       $cat >try.c <<EOCP
-#include <locale.h>
-int main() {
-       struct lconv *lc = localeconv();
-       char int_p_cs_precedes = lc->int_p_cs_precedes;
-       return 0;
-}
-EOCP
-       set try
-       if eval $compile; then
-               d_lc_monetary_2008="$define"
-       else
-               d_lc_monetary_2008="$undef"
-       fi;
-       $rm_try
-       ;;
-esac
+: see if log1p exists
+set log1p d_log1p
+eval $inlibc
 
-: see if lockf exists
-set lockf d_lockf
+: see if log2 exists
+set log2 d_log2
+eval $inlibc
+
+: see if logb exists
+set logb d_logb
+eval $inlibc
+
+: see if lrint exists
+set lrint d_lrint
+eval $inlibc
+
+: see if lrintl exists
+set lrintl d_lrintl
+eval $inlibc
+
+: see if lround exists
+set lround d_lround
+eval $inlibc
+
+: see if lroundl exists
+set lroundl d_lroundl
 eval $inlibc
 
 : see if prototype for lseek is available
@@ -16610,6 +16582,22 @@ eval $inlibc
 set munmap d_munmap
 eval $inlibc
 
+: see if nan exists
+set nan d_nan
+eval $inlibc
+
+: see if nearbyint exists
+set nearbyint d_nearbyint
+eval $inlibc
+
+: see if nextafter exists
+set nextafter d_nextafter
+eval $inlibc
+
+: see if nexttoward exists
+set nexttoward d_nexttoward
+eval $inlibc
+
 : see if nice exists
 set nice d_nice
 eval $inlibc
@@ -16622,6 +16610,10 @@ eval $inhdr
 set nl_langinfo d_nl_langinfo
 eval $inlibc
 
+: see if this is a quadmath.h system
+set quadmath.h i_quadmath
+eval $inhdr
+
 : check for volatile keyword
 echo " "
 echo 'Checking to see if your C compiler knows about "volatile"...' >&4
@@ -17232,14 +17224,21 @@ EOM
 set readlink d_readlink
 eval $inlibc
 
-: Check if exe is symlink to abs path of executing program
+: Check if there is a /proc symlink to the abs path of
+: the executing program.  We will honor hints of d_procselfexe=$undef
+: or procselfexe being non-empty, otherwise will try to determine both
+: if we have readlink.
+: AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
+: referenced, and AmigaOS does not have a proc filesystem anyway.
 echo " "
-procselfexe=''
 val="$undef"
-case "$d_readlink" in
-    "$define")
-       : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
-       : more tidy to avoid an extra level of symlink
+if $test "X$d_procselfexe" = Xundef; then
+       procselfexe=''
+elif $test "X$procselfexe" != X -a "X$procselfexe" != 'X '; then
+       val="$define"
+elif $test "X$d_readlink" = Xdefine; then
+        : NetBSD first as /proc/self is a symlink to /proc/curproc,
+        : and it feels more tidy to avoid an extra level of symlink
        set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
        while test $# -gt 0; do
            type=$1; try=$2
@@ -17255,8 +17254,7 @@ case "$d_readlink" in
                fi
            fi
        done
-       ;;
-esac
+fi
 $rm -f reflect
 set d_procselfexe
 eval $setvar
@@ -17586,14 +17584,56 @@ eval $inlibc
 set recvmsg d_recvmsg
 eval $inlibc
 
+: see if regcomp, regcmp, or re_comp exist, for regular pattern matching
+echo " "
+if set regcomp val -f d_regcomp; eval $csym; $val; then
+       echo 'regcomp() found.' >&4
+       d_regcomp="$define"
+       d_regcmp="$undef"
+       d_re_comp="$undef"
+elif set regcmp val -f d_regcmp; eval $csym; $val; then
+       echo 'regcmp() found.' >&4
+       d_regcmp="$define"
+       d_regcomp="$undef"
+       d_re_comp="$undef"
+elif set re_comp val -f d_re_comp; eval $csym; $val; then
+       echo 're_comp() found, assuming re_exec() also exists.' >&4
+       d_re_comp="$define"
+       d_regcomp="$undef"
+       d_regcmp="$undef"
+else
+       $cat >&4 <<EOM
+No regcomp(), regcmp() nor re_comp() found !! No regular pattern matching.
+EOM
+       d_regcmp="$undef"
+       d_re_comp="$undef"
+       d_regcomp="$undef"
+fi
+
+: see if remainder exists
+set remainder d_remainder
+eval $inlibc
+
+: see if remquo exists
+set remquo d_remquo
+eval $inlibc
+
 : see if rename exists
 set rename d_rename
 eval $inlibc
 
+: see if rint exists
+set rint d_rint
+eval $inlibc
+
 : see if rmdir exists
 set rmdir d_rmdir
 eval $inlibc
 
+: see if round exists
+set round d_round
+eval $inlibc
+
 : see if memory.h is available.
 val=''
 set memory.h val
@@ -17829,6 +17869,10 @@ echo " "
 set d_sbrkproto sbrk $i_unistd unistd.h
 eval $hasproto
 
+: see if scalbn exists
+set scalbn d_scalbn
+eval $inlibc
+
 : see if select exists
 set select d_select
 eval $inlibc
@@ -18927,6 +18971,10 @@ echo " "
 set d_sresuproto setresuid $i_unistd unistd.h
 eval $hasproto
 
+: see if stat exists
+set stat d_stat
+eval $inlibc
+
 : see if sys/stat.h is available
 set sys/stat.h i_sysstat
 eval $inhdr
@@ -19549,6 +19597,10 @@ echo " "
 set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h
 eval $hasproto
 
+: see if tgamma exists
+set tgamma d_tgamma
+eval $inlibc
+
 : see if time exists
 echo " "
 if test "X$d_time" = X -o X"$timetype" = X; then
@@ -19634,6 +19686,10 @@ case "$d_tmpnam_r" in
        ;;
 esac
 
+: see if trunc exists
+set trunc d_trunc
+eval $inlibc
+
 : see if truncate exists
 set truncate d_truncate
 eval $inlibc
@@ -20374,6 +20430,269 @@ EOCP
        ;;
 esac
 
+: Check what kind of inf/nan your system has
+$echo "Checking the kind of infinities and nans you have..." >&4
+$cat >try.c <<EOP
+#define DOUBLESIZE $doublesize
+#$d_longdbl HAS_LONG_DOUBLE
+#ifdef HAS_LONG_DOUBLE
+#define LONGDBLSIZE $longdblsize
+#define LONGDBLKIND $longdblkind
+#endif
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+#include <stdio.h>
+/* Note that whether the sign bit is on or off
+ * for NaN depends on the CPU/FPU, and possibly
+ * can be affected by the build toolchain.
+ *
+ * For example for older MIPS and HP-PA 2.0 the quiet NaN is:
+ * 0x7f, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
+ * 0x7f, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ * (respectively) as opposed to the more usual
+ * 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+ */
+static void bytes(unsigned char *p, unsigned int n) {
+  int i;
+  for (i = 0; i < n; i++) {
+    printf("0x%02x%s", p[i], i < n - 1 ? ", " : "\n");
+  }
+}
+int main(int argc, char *argv[]) {
+   /* We cannot use 1.0/0.0 and 0.0/0.0 (with L suffixes for long double)
+    * because some compilers are 'smart' and not only warn but refuse to
+    * compile such 'illegal' values. */
+   double dinf = exp(1e9);
+   double dnan = sqrt(-1.0);
+#ifdef HAS_LONG_DOUBLE
+   long double ldinf = (long double)exp(1e9);
+   long double ldnan = (long double)sqrt(-1.0);
+#endif
+  if (argc == 2) {
+    switch (argv[1][0]) {
+    case '1': bytes(&dinf, sizeof(dinf)); break;
+    case '2': bytes(&dnan, sizeof(dnan)); break;
+#ifdef HAS_LONG_DOUBLE
+# if LONG_DOUBLEKIND == 3 || LONG_DOUBLEKIND == 4
+/* the 80-bit long doubles might have garbage in their excess bytes */
+    memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10);
+# endif
+    case '3': bytes(&ldinf, sizeof(ldinf)); break;
+    case '4': bytes(&ldnan, sizeof(ldnan)); break;
+#endif
+    }
+  }
+  return 0;
+}
+EOP
+set try
+if eval $compile; then
+    doubleinfbytes=`$run ./try 1`
+    doublenanbytes=`$run ./try 2`
+    case "$d_longdbl" in
+    $define)
+      longdblinfbytes=`$run ./try 3`
+      longdblnanbytes=`$run ./try 4`
+      ;;
+    esac
+else
+    # Defaults in case the above test program failed.
+    case "$doublekind" in
+    1) # IEEE 754 32-bit LE
+       doubleinfbytes='0x00, 0x00, 0xf0, 0x7f'
+       doublenanbytes='0x00, 0x00, 0xf8, 0x7f'
+       ;;
+    2) # IEEE 754 32-bit BE
+       doubleinfbytes='0x7f, 0xf0, 0x00, 0x00'
+       doublenanbytes='0x7f, 0xf8, 0x00, 0x00'
+       ;;
+    3) # IEEE 754 64-bit LE
+       doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
+       doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
+       ;;
+    4) # IEEE 754 64-bit BE
+       doubleinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       doublenanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    5) # IEEE 754 128-bit LE
+       doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
+       doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
+       ;;
+    6) # IEEE 754 128-bit BE
+       doubleinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       doublenanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    7) # IEEE 754 64-bit mixed: 32-bit LEs in BE
+       doubleinfbytes='0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00'
+       doublenanbytes='0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    8) # IEEE 754 64-bit mixed: 32-bit BEs in LE
+       doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00'
+       doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00'
+       ;;
+    *) # No idea.
+       doubleinfbytes=$undef
+       doublenanbytes=$undef
+       ;;
+    esac
+    case "$longdblkind" in
+    1) # IEEE 754 128-bit LE
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f'
+       ;;
+    2) # IEEE 754 128-bit BE
+       longdblinfbytes='0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    3) # IEEE 754 80-bit LE, 12 or 16 bytes (x86)
+       case "$longdblsize" in
+       12) # x86 32-bit (96 bits, or 4 x 32, or 12 x 8)
+           longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00'
+           longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00'
+           ;;
+       16) # x86_64
+           longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           ;;
+       *)  # No idea.
+           longdblinfbytes=$undef
+           longdblnanbytes=$undef
+       ;;
+       esac
+       ;;
+    4) # IEEE 754 80-bit BE, 12 or 16 bytes
+       case "$longdblsize" in
+       12) # 32-bit system
+           longdblinfbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           longdblnanbytes='0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           ;;
+       16) # 64-bit system
+           longdblinfbytes='0x7f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           longdblnanbytes='0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+           ;;
+       *)  # No idea.
+           longdblinfbytes=$undef
+           longdblnanbytes=$undef
+       ;;
+       esac
+       ;;
+    5) # 128-bit LE-LE "double double"
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'
+       ;;
+    6) # 128-bit BE-BE "double double"
+       longdblinfbytes='0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    7) # 128-bit LE-BE "double double"
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    8) # 128-bit BE-LE "double double"
+       longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
+       ;;
+    *) # No idea.
+       longdblinfbytes=$undef
+       longdblnanbytes=$undef
+       ;;
+    esac
+fi
+$rm_try
+
+: Check the length of the double mantissa
+$echo "Checking how many mantissa bits your doubles have..." >&4
+$cat >try.c <<EOP
+#$i_float I_FLOAT
+#$i_sunmath I_SUNMATH
+#ifdef I_FLOAT
+# include <float.h>
+#endif
+#ifdef I_SUNMATH
+# include <sunmath.h>
+#endif
+#ifdef DBL_MANT_DIG
+# define BITS (DBL_MANT_DIG - 1) /* the implicit bit does not count */
+#endif
+#include <stdio.h>
+int main(int argc, char *argv[]) {
+#ifdef BITS
+  printf("%d\n", BITS);
+#endif
+  return 0;
+}
+EOP
+set try
+if eval $compile; then
+    doublemantbits=`$run ./try`
+else
+    doublemantbits="$undef"
+fi
+$rm_try
+
+: Check the length of the longdouble mantissa
+$echo "Checking how many mantissa bits your long doubles have..." >&4
+$cat >try.c <<EOP
+#$i_float I_FLOAT
+#$i_sunmath I_SUNMATH
+#ifdef I_FLOAT
+# include <float.h>
+#endif
+#ifdef I_SUNMATH
+# include <sunmath.h>
+#endif
+#$d_longdbl HAS_LONG_DOUBLE
+#if defined(HAS_LONG_DOUBLE) && defined(LDBL_MANT_DIG)
+# if ($longdblkind == 3) || ($longdblkind == 4) /* 80-bit extended precision */
+/* This format has no implicit bit.  Beware, however, that for
+ * this format the bare LDBL_MANT_DIG is misleading for inf/nan:
+ * the top three bits are used for inf (100) / qnan (11x) / snan (101),
+ * and the top bit must have been one since 387, zero is plain invalid.
+ * For normal fp values, the LDBL_MANT_DIG is fine, though. */
+#  define BITS LDBL_MANT_DIG
+# elif ($longdblkind == 5 || $longdblkind == 6 || $longdblkind == 7 || $longdblkind == 8) /* double double */
+/* LDBL_MANT_DIG of 106 (twice 53) would be logical, but for some
+ * reason e.g. Irix thinks 107.  But in any case, we want only
+ * the number of real bits, the implicit bits are of no interest.  */
+#  define BITS 2 * (DBL_MANT_DIG - 1)
+# else
+#  define BITS (LDBL_MANT_DIG - 1) /* the implicit bit does not count */
+# endif
+#endif
+#include <stdio.h>
+int main(int argc, char *argv[]) {
+#ifdef BITS
+  printf("%d\n", BITS);
+#endif
+  return 0;
+}
+EOP
+set try
+if eval $compile; then
+    longdblmantbits=`$run ./try`
+else
+    longdblmantbits="$undef"
+fi
+$rm_try
+
+: Check the length of the NV mantissa
+$echo "Checking how many mantissa bits your NVs have..." >&4
+if test "X$usequadmath" = "X$define"; then
+  nvmantbits=112 # 128-1-15
+else
+  if test "X$nvsize" = "X$doublesize"; then
+    nvmantbits="$doublemantbits"
+  else
+     if test "X$nvsize" = "X$longdblsize"; then
+       nvmantbits="$longdblmantbits"
+     else
+       nvmantbits="$undef"
+     fi
+  fi
+fi
+
 : How can we generate normalized random numbers ?
 echo " "
 echo "Using our internal random number implementation..." >&4
@@ -21509,7 +21828,7 @@ int check_min ()
 
 int main (int argc, char *argv[])
 {
-    fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t));
+    /* fprintf (stderr, "Sizeof time_t = %ld\n", sizeof (time_t)); */
     check_max ();
     check_min ();
     return (0);
@@ -21517,7 +21836,7 @@ int main (int argc, char *argv[])
 EOCP
        set try
        if eval $compile; then
-           eval `$run ./try`
+           eval `$run ./try 2>/dev/null`
        else
            echo "Cannot determine sGMTIME_max and sGMTIME_min." >&4
            fi
@@ -21598,7 +21917,7 @@ int main (int argc, char *argv[])
 EOCP
        set try
        if eval $compile; then
-           eval `$run ./try`
+           eval `$run ./try 2>/dev/null`
        else
            echo "Cannot determine sLOCALTIME_max and sLOCALTIME_min." >&4
            fi
@@ -21730,7 +22049,7 @@ int main() {
 EOCP
                set try
                if eval $compile_ok; then
-                       selectminbits=`$run ./try`
+                       selectminbits=`$run ./try 2>/dev/null`
                        case "$selectminbits" in
                        '')     cat >&4 <<EOM
 Cannot figure out on how many bits at a time your select() operates.
@@ -21764,6 +22083,8 @@ EOM
 esac
 
 : Trace out the files included by signal.h, then look for SIGxxx names.
+case "$sig_num_init" in
+'')
 if [ "X$fieldn" = X ]; then
        : Just make some guesses.  We check them later.
        xxx="$sysroot/usr/include/signal.h $sysroot/usr/include/sys/signal.h"
@@ -22027,6 +22348,8 @@ echo $sig_name | $awk \
 }'
 sig_size=`echo $sig_name | awk '{print NF}'`
 $rm -f signal signal.c signal.awk signal.lst signal_cmd
+;;
+esac
 
 : Check size of size
 echo " "
@@ -22400,6 +22723,40 @@ case "$uidsign" in
        ;;
 esac
 
+: see what siginfo fields we have
+case "$d_sigaction" in
+"$define")
+       echo "Checking if your siginfo_t has si_errno field...">&4
+       set d_siginfo_si_errno siginfo_t int si_errno $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_pid field...">&4
+       set d_siginfo_si_pid siginfo_t $pidtype si_pid $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_uid field...">&4
+       set d_siginfo_si_uid siginfo_t $uidtype si_uid $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_addr field...">&4
+       set d_siginfo_si_addr siginfo_t "void *" si_addr $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_status field...">&4
+       set d_siginfo_si_status siginfo_t int si_status $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_band field...">&4
+       set d_siginfo_si_band siginfo_t long si_band $d_sigaction signal.h
+       eval $hasfield_t;
+
+       echo "Checking if your siginfo_t has si_value field...">&4
+       set d_siginfo_si_value siginfo_t "union sigval" si_value $d_sigaction signal.h
+       eval $hasfield_t;
+
+       ;;
+esac
+
 : Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
 echo " "
 echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
@@ -23003,7 +23360,7 @@ fi
 
 : add -D_FORTIFY_SOURCE if feasible and not already there
 case "$gccversion" in
-4.*)   case "$optimize$ccflags" in
+[45].*)        case "$optimize$ccflags" in
        *-O*)   case "$ccflags$cppsymbols" in
                *_FORTIFY_SOURCE=*) # Don't add it again.
                        echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4
@@ -23013,11 +23370,11 @@ case "$gccversion" in
                        ;;
                esac
                ;;
-       *)      echo "You have gcc 4.* but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
+       *)      echo "You have gcc 4.* or later but not optimizing, not adding -D_FORTIFY_SOURCE." >&4
                ;;
        esac
        ;;
-*)     echo "You seem not to have gcc 4.*, not adding -D_FORTIFY_SOURCE." >&4
+*)     echo "You seem not to have gcc 4.* or later, not adding -D_FORTIFY_SOURCE." >&4
        ;;
 esac
 
@@ -23234,13 +23591,13 @@ find_extensions='
        case "$xxx" in
            DynaLoader|dynaload) ;;
            *)
-           this_ext=`echo $xxx | $sed -e s/-/\\\//g`;
+           this_ext=`echo "$xxx" | $sed -e s/-/\\\//g`;
            case "$this_ext" in
                Scalar/List/Utils) this_ext="List/Util" ;;
                PathTools)         this_ext="Cwd"       ;;
            esac;
-           echo " $xs_extensions $nonxs_extensions" > $tdir/$$.tmp;
-           if $contains " $this_ext " $tdir/$$.tmp; then
+           echo " $xs_extensions $nonxs_extensions" > "$tdir/$$.tmp";
+           if $contains " $this_ext " "$tdir/$$.tmp"; then
                echo >&4;
                echo "Duplicate directories detected for extension $xxx" >&4;
                echo "Configure cannot correctly recover from this - shall I abort?" >&4;
@@ -23258,15 +23615,15 @@ find_extensions='
                esac;
                echo "Ok.  You will need to correct config.sh before running make." >&4;
            fi;
-           $ls -1 $xxx > $tdir/$$.tmp;
-           if   $contains "\.xs$" $tdir/$$.tmp > /dev/null 2>&1; then
+           $ls -1 "$xxx" > "$tdir/$$.tmp";
+           if   $contains "\.xs$" "$tdir/$$.tmp" > /dev/null 2>&1; then
                xs_extensions="$xs_extensions $this_ext";
-           elif $contains "\.c$"  $tdir/$$.tmp > /dev/null 2>&1; then
+           elif $contains "\.c$"  "$tdir/$$.tmp" > /dev/null 2>&1; then
                xs_extensions="$xs_extensions $this_ext";
-           elif $test -d $xxx; then
+           elif $test -d "$xxx"; then
                nonxs_extensions="$nonxs_extensions $this_ext";
            fi;
-           $rm -f $tdir/$$.tmp;
+           $rm -f "$tdir/$$.tmp";
            ;;
        esac;
     done'
@@ -23296,6 +23653,11 @@ known_extensions=`echo $nonxs_extensions $xs_extensions  | tr ' ' $trnl | $sort
 avail_ext=''
 for xxx in $xs_extensions ; do
        case "$xxx" in
+       Amiga*)
+               case "$osname" in
+               amigaos) avail_ext="$avail_ext $xxx" ;;
+               esac
+               ;;
        DB_File|db_file)
                case "$i_db" in
                $define) avail_ext="$avail_ext $xxx" ;;
@@ -23365,9 +23727,14 @@ for xxx in $xs_extensions ; do
                esac
                ;;
        Sys/Syslog|sys/syslog)
-               : XXX syslog requires socket
-               case "$d_socket" in
-               true|$define|y) avail_ext="$avail_ext $xxx" ;;
+               case $osname in
+                       amigaos) ;; # not really very useful on AmigaOS
+                       *)
+                       : XXX syslog requires socket
+                       case "$d_socket" in
+                       true|$define|y) avail_ext="$avail_ext $xxx" ;;
+                       esac
+                       ;;
                esac
                ;;
        Thread|thread)
@@ -23911,6 +24278,7 @@ d_fcntl='$d_fcntl'
 d_fcntl_can_lock='$d_fcntl_can_lock'
 d_fd_macros='$d_fd_macros'
 d_fd_set='$d_fd_set'
+d_fdclose='$d_fdclose'
 d_fdim='$d_fdim'
 d_fds_bits='$d_fds_bits'
 d_fegetround='$d_fegetround'
@@ -24028,14 +24396,15 @@ d_isfinite='$d_isfinite'
 d_isfinitel='$d_isfinitel'
 d_isinf='$d_isinf'
 d_isinfl='$d_isinfl'
+d_isless='$d_isless'
 d_isnan='$d_isnan'
 d_isnanl='$d_isnanl'
 d_isnormal='$d_isnormal'
 d_j0='$d_j0'
 d_j0l='$d_j0l'
 d_killpg='$d_killpg'
-d_lchown='$d_lchown'
 d_lc_monetary_2008='$d_lc_monetary_2008'
+d_lchown='$d_lchown'
 d_ldbl_dig='$d_ldbl_dig'
 d_ldexpl='$d_ldexpl'
 d_lgamma='$d_lgamma'
@@ -24044,12 +24413,13 @@ d_libm_lib_version='$d_libm_lib_version'
 d_libname_unique='$d_libname_unique'
 d_link='$d_link'
 d_llrint='$d_llrint'
+d_llrintl='$d_llrintl'
 d_llround='$d_llround'
+d_llroundl='$d_llroundl'
 d_localtime64='$d_localtime64'
 d_localtime_r='$d_localtime_r'
 d_localtime_r_needs_tzset='$d_localtime_r_needs_tzset'
 d_locconv='$d_locconv'
-d_lgamma='$d_lgamma'
 d_lockf='$d_lockf'
 d_log1p='$d_log1p'
 d_log2='$d_log2'
@@ -24057,7 +24427,9 @@ d_logb='$d_logb'
 d_longdbl='$d_longdbl'
 d_longlong='$d_longlong'
 d_lrint='$d_lrint'
+d_lrintl='$d_lrintl'
 d_lround='$d_lround'
+d_lroundl='$d_lroundl'
 d_lseekproto='$d_lseekproto'
 d_lstat='$d_lstat'
 d_madvise='$d_madvise'
@@ -24139,12 +24511,15 @@ d_pwquota='$d_pwquota'
 d_qgcvt='$d_qgcvt'
 d_quad='$d_quad'
 d_random_r='$d_random_r'
+d_re_comp='$d_re_comp'
 d_readdir64_r='$d_readdir64_r'
 d_readdir='$d_readdir'
 d_readdir_r='$d_readdir_r'
 d_readlink='$d_readlink'
 d_readv='$d_readv'
 d_recvmsg='$d_recvmsg'
+d_regcmp='$d_regcmp'
+d_regcomp='$d_regcomp'
 d_remainder='$d_remainder'
 d_remquo='$d_remquo'
 d_rename='$d_rename'
@@ -24208,6 +24583,13 @@ d_shmctl='$d_shmctl'
 d_shmdt='$d_shmdt'
 d_shmget='$d_shmget'
 d_sigaction='$d_sigaction'
+d_siginfo_si_errno='$d_siginfo_si_errno'
+d_siginfo_si_pid='$d_siginfo_si_pid'
+d_siginfo_si_uid='$d_siginfo_si_uid'
+d_siginfo_si_addr='$d_siginfo_si_addr'
+d_siginfo_si_status='$d_siginfo_si_status'
+d_siginfo_si_band='$d_siginfo_si_band'
+d_siginfo_si_value='$d_siginfo_si_value'
 d_signbit='$d_signbit'
 d_sigprocmask='$d_sigprocmask'
 d_sigsetjmp='$d_sigsetjmp'
@@ -24228,6 +24610,7 @@ d_srand48_r='$d_srand48_r'
 d_srandom_r='$d_srandom_r'
 d_sresgproto='$d_sresgproto'
 d_sresuproto='$d_sresuproto'
+d_stat='$d_stat'
 d_statblks='$d_statblks'
 d_statfs_f_flags='$d_statfs_f_flags'
 d_statfs_s='$d_statfs_s'
@@ -24277,8 +24660,8 @@ d_times='$d_times'
 d_tm_tm_gmtoff='$d_tm_tm_gmtoff'
 d_tm_tm_zone='$d_tm_tm_zone'
 d_tmpnam_r='$d_tmpnam_r'
-d_truncate='$d_truncate'
 d_trunc='$d_trunc'
+d_truncate='$d_truncate'
 d_truncl='$d_truncl'
 d_ttyname_r='$d_ttyname_r'
 d_tzname='$d_tzname'
@@ -24320,7 +24703,10 @@ db_version_patch='$db_version_patch'
 direntrytype='$direntrytype'
 dlext='$dlext'
 dlsrc='$dlsrc'
+doubleinfbytes='$doubleinfbytes'
 doublekind='$doublekind'
+doublemantbits='$doublemantbits'
+doublenanbytes='$doublenanbytes'
 doublesize='$doublesize'
 drand01='$drand01'
 drand48_r_proto='$drand48_r_proto'
@@ -24568,7 +24954,10 @@ lns='$lns'
 localtime_r_proto='$localtime_r_proto'
 locincpth='$locincpth'
 loclibpth='$loclibpth'
+longdblinfbytes='$longdblinfbytes'
 longdblkind='$longdblkind'
+longdblmantbits='$longdblmantbits'
+longdblnanbytes='$longdblnanbytes'
 longdblsize='$longdblsize'
 longlongsize='$longlongsize'
 longsize='$longsize'
@@ -24621,6 +25010,7 @@ nv_preserves_uv_bits='$nv_preserves_uv_bits'
 nveformat='$nveformat'
 nvfformat='$nvfformat'
 nvgformat='$nvgformat'
+nvmantbits='$nvmantbits'
 nvsize='$nvsize'
 nvtype='$nvtype'
 o_nonblock='$o_nonblock'