summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorH.Merijn Brand <h.m.brand@xs4all.nl>2014-11-23 19:45:33 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2014-11-23 19:45:33 +0100
commitf40bbcbf5ba1171b1c25dff271e9a7c0ba9ad29f (patch)
treeb42eec81d60144bcb57ed8c038a87fa20a63c6a0 /Configure
parent57cbafbc12241999e02239444b060362624f02b8 (diff)
downloadperl-f40bbcbf5ba1171b1c25dff271e9a7c0ba9ad29f.tar.gz
Configure syncup
Some of these changes also made it upstream to the dist svn repo. OpenSource++
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure1069
1 files changed, 506 insertions, 563 deletions
diff --git a/Configure b/Configure
index 69dd5896c9..4a014d66bc 100755
--- a/Configure
+++ b/Configure
@@ -11,10 +11,13 @@
# 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)
@@ -373,12 +375,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 +469,10 @@ d_fchmod=''
d_fchown=''
d_fcntl=''
d_fcntl_can_lock=''
-d_fdim=''
d_fd_macros=''
d_fd_set=''
d_fds_bits=''
+d_fdim=''
d_fegetround=''
d_fgetpos=''
d_finite=''
@@ -478,7 +480,6 @@ d_finitel=''
d_flexfnam=''
d_flock=''
d_flockproto=''
-d_fdim=''
d_fma=''
d_fmax=''
d_fmin=''
@@ -602,12 +603,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=''
@@ -620,12 +623,11 @@ 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=''
@@ -706,6 +708,9 @@ readdir_r_proto=''
d_readlink=''
d_readv=''
d_recvmsg=''
+d_re_comp=''
+d_regcmp=''
+d_regcomp=''
d_remainder=''
d_remquo=''
d_rename=''
@@ -808,6 +813,7 @@ d_srandom_r=''
srandom_r_proto=''
d_sresgproto=''
d_sresuproto=''
+d_stat=''
d_statblks=''
d_statfs_f_flags=''
d_statfs_s=''
@@ -856,6 +862,7 @@ d_system=''
d_tcgetpgrp=''
d_tcsetpgrp=''
d_telldirproto=''
+d_tgamma=''
d_time=''
timetype=''
d_asctime64=''
@@ -869,7 +876,6 @@ clocktype=''
d_times=''
d_tmpnam_r=''
tmpnam_r_proto=''
-d_tgamma=''
d_trunc=''
d_truncate=''
d_truncl=''
@@ -911,7 +917,6 @@ ld=''
ld_can_script=''
lddlflags=''
usedl=''
-doublekind=''
doublesize=''
ebcdic=''
fflushNULL=''
@@ -1086,6 +1091,7 @@ d_PRIeldbl=''
d_PRIfldbl=''
d_PRIgldbl=''
d_SCNfldbl=''
+doublekind=''
sPRIEUldbl=''
sPRIFUldbl=''
sPRIGUldbl=''
@@ -1298,7 +1304,6 @@ libswanted_uselargefiles=''
uselargefiles=''
uselongdouble=''
usemorebits=''
-usequadmath=''
usemultiplicity=''
nm_opt=''
nm_so_opt=''
@@ -1306,6 +1311,7 @@ runnm=''
usenm=''
usensgetexecutablepath=''
useperlio=''
+usequadmath=''
usesocks=''
d_oldpthreads=''
use5005threads=''
@@ -2864,13 +2870,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.
@@ -4487,14 +4493,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 +5200,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
@@ -6828,93 +6832,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 +6852,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 +6886,6 @@ EOCP
esac
$rm_try
-echo " "
$echo "Checking the kind of long doubles you have..." >&4
case "$d_longdbl" in
define)
@@ -6988,8 +6900,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
@@ -7065,154 +6977,6 @@ case "$longdblkind" in
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
-
: determine the architecture name
echo " "
if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
@@ -7261,40 +7025,40 @@ y|Y) useversionedarchname="$define" ;;
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
- ;;
+ 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 +7075,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 +7093,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 +7107,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
@@ -10262,6 +10026,239 @@ esac
set qgcvt d_qgcvt
eval $inlibc
+: 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
+#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
+ /* 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 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
@@ -10561,6 +10558,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
@@ -10867,6 +10868,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
@@ -11711,6 +11720,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
@@ -12075,6 +12088,10 @@ fi
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
@@ -13182,146 +13199,6 @@ 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
-
-: see if scalbn exists
-set scalbn d_scalbn
-eval $inlibc
-
-: see if tgamma exists
-set tgamma d_tgamma
-eval $inlibc
-
-: see if trunc exists
-set trunc d_trunc
-eval $inlibc
-
: see if fcntl.h is there
val=''
set fcntl.h val
@@ -13589,6 +13466,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 +13927,10 @@ EOM
fi
$rm_try
+: see if fdim exists
+set fdim d_fdim
+eval $inlibc
+
: see if fegetround exists
set fegetround d_fegetround
eval $inlibc
@@ -14059,6 +13956,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 +15652,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 +15891,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 +15975,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
@@ -16061,102 +16011,18 @@ EOCP
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
-
-: see if this is a quadmath.h system
-set quadmath.h i_quadmath
-eval $inhdr
-
: see if link exists
set link d_link
eval $inlibc
+: see if llrint exists
+set llrint d_llrint
+eval $inlibc
+
+: see if llround exists
+set llround d_llround
+eval $inlibc
+
: see if localtime_r exists
set localtime_r d_localtime_r
eval $inlibc
@@ -16276,33 +16142,28 @@ 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 lround exists
+set lround d_lround
eval $inlibc
: see if prototype for lseek is available
@@ -16610,6 +16471,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 +16499,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
@@ -17586,14 +17467,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 +17752,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 +18854,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 +19480,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 +19569,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
@@ -24028,14 +23967,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'
@@ -24049,7 +23989,6 @@ 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'
@@ -24139,12 +24078,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'
@@ -24228,6 +24170,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 +24220,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'