# 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
# $ 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)
d_alarm=''
asctime_r_proto=''
d_asctime_r=''
+d_asinh=''
+d_atanh=''
d_attribute_deprecated=''
d_attribute_format=''
d_attribute_malloc=''
d_casti32=''
castflags=''
d_castneg=''
+d_cbrt=''
d_chown=''
d_chroot=''
d_chsize=''
d_void_closedir=''
d_cmsghdr_s=''
d_const=''
+d_copysign=''
d_copysignl=''
d_cplusplus=''
cryptlib=''
d_endsent=''
d_endservent_r=''
endservent_r_proto=''
+d_erf=''
+d_erfc=''
+d_exp2=''
+d_expm1=''
d_faststdio=''
d_fchdir=''
d_fchmod=''
d_fd_macros=''
d_fd_set=''
d_fds_bits=''
+d_fdim=''
d_fegetround=''
d_fgetpos=''
d_finite=''
d_flexfnam=''
d_flock=''
d_flockproto=''
+d_fma=''
+d_fmax=''
+d_fmin=''
d_fork=''
d_fp_class=''
d_fp_classl=''
gnulibc_version=''
d_hasmntopt=''
d_htonl=''
+d_hypot=''
+d_ilogb=''
d_ilogbl=''
d_inetaton=''
d_inetntop=''
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=''
+d_lgamma_r=''
d_libm_lib_version=''
d_link=''
+d_llrint=''
+d_llround=''
d_localtime_r=''
d_localtime_r_needs_tzset=''
localtime_r_proto=''
d_locconv=''
d_lockf=''
+d_log1p=''
+d_log2=''
+d_logb=''
d_ldexpl=''
d_longdbl=''
longdblkind=''
longdblsize=''
d_longlong=''
longlongsize=''
+d_lrint=''
+d_lround=''
d_lseekproto=''
d_lstat=''
d_madvise=''
d_msgsnd=''
d_msync=''
d_munmap=''
+d_nan=''
+d_nearbyint=''
+d_nextafter=''
+d_nexttoward=''
d_nice=''
d_nl_langinfo=''
d_off64_t=''
d_readlink=''
d_readv=''
d_recvmsg=''
+d_re_comp=''
+d_regcmp=''
+d_regcomp=''
+d_remainder=''
+d_remquo=''
d_rename=''
+d_rint=''
d_rmdir=''
+d_round=''
d_safebcpy=''
d_safemcpy=''
d_sanemcmp=''
d_sbrkproto=''
+d_scalbn=''
d_scalbnl=''
d_select=''
d_sem=''
srandom_r_proto=''
d_sresgproto=''
d_sresuproto=''
+d_stat=''
d_statblks=''
d_statfs_f_flags=''
d_statfs_s=''
d_tcgetpgrp=''
d_tcsetpgrp=''
d_telldirproto=''
+d_tgamma=''
d_time=''
timetype=''
d_asctime64=''
d_times=''
d_tmpnam_r=''
tmpnam_r_proto=''
+d_trunc=''
d_truncate=''
d_truncl=''
d_ttyname_r=''
d_pwpasswd=''
d_pwquota=''
i_pwd=''
+i_quadmath=''
i_shadow=''
i_socks=''
i_stdbool=''
d_PRIfldbl=''
d_PRIgldbl=''
d_SCNfldbl=''
+doublekind=''
sPRIEUldbl=''
sPRIFUldbl=''
sPRIGUldbl=''
usenm=''
usensgetexecutablepath=''
useperlio=''
+usequadmath=''
usesocks=''
d_oldpthreads=''
use5005threads=''
: 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 nm 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 ! !'`
*) case "$lns:$issymlink" in
*"ln"*" -s:"*"test -"?)
echo "Creating the symbolic links..." >&4
- echo "(First creating the subdirectories...)" >&4
cd ..
- awk '{print $1}' $src/MANIFEST | grep / | sed 's:/[^/]*$::' | sort -u | while true; do
- read directory
- test -z "$directory" && break
- mkdir -p $directory
- done
+ awk '{print $1}' $src/MANIFEST | sed -e 's:/\([^/]*\)$: \1:' |
+ awk 'NF == 1 {
+ dir=".";
+ file=$1 "";
+ }
+ NF == 2 {
+ dir=$1 "";
+ file=$2 "";
+ }
+ {
+ print "# dir = ", dir, "file = ", 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);
+ }
+ }' source="$src" > UU/mksymlinks.$$
+ sh UU/mksymlinks.$$
+ rm UU/mksymlinks.$$
# Sanity check 1.
if test ! -d t/base; then
echo "Failed to create the subdirectories. Aborting." >&4
exit 1
fi
- echo "(Then creating the symlinks...)" >&4
- awk '{print $1}' $src/MANIFEST | while true; do
- read filename
- test -z "$filename" && break
- if test -f $filename; then
- if $issymlink $filename; then
- rm -f $filename
- fi
- fi
- if test -f $filename; then
- echo "$filename already exists, not symlinking."
- else
- ln -s $src/$filename $filename
- fi
- done
# Sanity check 2.
if test ! -f t/base/lex.t; then
echo "Failed to create the symlinks (t/base/lex.t missing). Aborting." >&4
exit 1
fi
+ if test ! -f win32/win32.c; then
+ echo "Failed to create the symlinks (win32/win32.c missing). Aborting." >&4
+ exit 1
+ fi
cd UU
;;
*) echo "(I cannot figure out how to do symbolic links, ignoring mksymlinks)." >&4
$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
if $test -d /MachTen -o -d /MachTen_Folder; then
osname=machten
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
case "$usecbacktrace" in
"$define") libswanted="$libswanted bfd" ;;
esac
+case "$usequadmath" in
+"$define") libswanted="$libswanted quadmath" ;;
+esac
libsfound=''
libsfiles=''
libsdirs=''
# as that way the compiler can do the right implementation dependant
# thing. (NWC)
case "$gccversion" in
- ?*) set stack-protector -fstack-protector
+ ?*) 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
# See note above about -fstack-protector
case "$ccflags" in
+*-fstack-protector-strong*)
+ case "$dflt" in
+ *-fstack-protector-strong*) ;; # Don't add it again
+ *) dflt="$dflt -fstack-protector-strong" ;;
+ esac
+ ;;
*-fstack-protector*)
case "$dflt" in
*-fstack-protector*) ;; # Don't add it again
#$i_float I_FLOAT
#$i_stdlib I_STDLIB
#define LONGDBLSIZE $longdblsize
+#define DOUBLESIZE $doublesize
#ifdef I_FLOAT
#include <float.h>
#endif
static const long double d = -0.1L;
int main() {
unsigned const char* b = (unsigned const char*)(&d);
-#if LDBL_MANT_DIG == 113 && LONGDBLSIZE == 16
+#if DOUBLESIZE == LONGDBLSIZE
+ printf("0\n"); /* if it floats like double */
+ exit(0);
+#endif
+#if (LDBL_MANT_DIG == 113 || FLT128_MANT_DIG == 113) && LONGDBLSIZE == 16
if (b[0] == 0x9A && b[1] == 0x99 && b[15] == 0xBF) {
/* IEEE 754 128-bit little-endian */
printf("1\n");
exit(0);
}
#endif
+/* For alignment 32-bit platforms have the 80 bits in 12 bytes,
+ * while 64-bits platforms have it in 16 bytes. */
#if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12)
if (b[0] == 0xCD && b[9] == 0xBF && b[10] == 0x00) {
/* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86)
exit(0);
}
#endif
-#if LDBL_MANT_DIG == 106 && LONGDBLSIZE == 16
- /* software "double double", the 106 is 53+53 */
+#if (LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 107) && LONGDBLSIZE == 16
+ /* 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,
* 9a 99 99 99 99 99 59 3c 9a 99 99 99 99 99 b9 bf */
1) echo "You have IEEE 754 128-bit little endian long doubles." >&4 ;;
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 ;;
*) echo "Cannot figure out your long double." >&4 ;;
esac
$rm_try
-
: determine the architecture name
echo " "
if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
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
"$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
;;
*)
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
+ ;;
+esac
+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
;;
esac
;;
esac
case "$ldflags" in
+ *-fstack-protector-strong*)
+ case "$dflt" in
+ *-fstack-protector-strong*) ;; # Don't add it again
+ *) dflt="$dflt -fstack-protector-strong" ;;
+ esac
+ ;;
*-fstack-protector*)
case "$dflt" in
*-fstack-protector*) ;; # Don't add it again
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}\""
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 " "
case "$yyy" in
123.456)
sPRIfldbl='"f"'; sPRIgldbl='"g"'; sPRIeldbl='"e"';
- sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
+ sPRIFUldbl='"F"'; sPRIGUldbl='"G"'; sPRIEUldbl='"E"';
echo "We will use %f."
;;
esac
case "$yyy" in
123.456)
sPRIfldbl='"Lf"'; sPRIgldbl='"Lg"'; sPRIeldbl='"Le"';
- sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
+ sPRIFUldbl='"LF"'; sPRIGUldbl='"LG"'; sPRIEUldbl='"LE"';
echo "We will use %Lf."
;;
esac
case "$yyy" in
123.456)
sPRIfldbl='"llf"'; sPRIgldbl='"llg"'; sPRIeldbl='"lle"';
- sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
+ sPRIFUldbl='"llF"'; sPRIGUldbl='"llG"'; sPRIEUldbl='"llE"';
echo "We will use %llf."
;;
esac
case "$yyy" in
123.456)
sPRIfldbl='"lf"'; sPRIgldbl='"lg"'; sPRIeldbl='"le"';
- sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
+ sPRIFUldbl='"lF"'; sPRIGUldbl='"lG"'; sPRIEUldbl='"lE"';
echo "We will use %lf."
;;
esac
;;
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
set aintl d_aintl
eval $inlibc
-: see if truncl exists
-set truncl d_truncl
-eval $inlibc
-
: see if alarm exists
set alarm d_alarm
eval $inlibc
;;
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
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)"
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)"
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
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 " "
fi
$rm_try
+: see if fdim exists
+set fdim d_fdim
+eval $inlibc
+
: see if fegetround exists
set fegetround d_fegetround
eval $inlibc
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
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
set isinfl d_isinfl
eval $inlibc
+: check for isless
+echo "Checking to see if you have isless..." >&4
+$cat >try.c <<EOCP
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+int main() { return isless(0.0); }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo "You have isless."
+else
+ val="$undef"
+ echo "You do not have isless."
+fi
+$rm_try
+set d_isless
+eval $setvar
+
: check for isnan
echo "Checking to see if you have isnan..." >&4
$cat >try.c <<EOCP
set isnanl d_isnanl
eval $inlibc
+: check for isnormal
+echo "Checking to see if you have isnormal..." >&4
+$cat >try.c <<EOCP
+#$i_math I_MATH
+#ifdef I_MATH
+#include <math.h>
+#endif
+int main() { return isnormal(0.0); }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo "You have isnormal."
+else
+ val="$undef"
+ echo "You do not have isnormal."
+fi
+$rm_try
+set d_isnormal
+eval $setvar
+
: see if j0 exists
set j0 d_j0
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'
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
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
esac
$rm_try
-: see if localeconv exists
-set localeconv d_locconv
-eval $inlibc
-
: see if lockf exists
set lockf d_lockf
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 prototype for lseek is available
echo " "
set d_lseekproto lseek $i_systypes sys/types.h $i_unistd unistd.h
set scalbnl d_scalbnl
eval $inlibc
+: see if truncl exists
+set truncl d_truncl
+eval $inlibc
+
: see if modfl exists
set modfl d_modfl
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
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
;;
esac
+case "$usequadmath:$i_quadmath" in
+define:define)
+ nvtype="__float128"
+ nvsize=16
+ case "$libs" in
+ *quadmath*) ;;
+ *) $cat <<EOM >&4
+
+*** You requested the use of the quadmath library, but you
+*** do not seem to have the quadmath library installed.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+define:*) $cat <<EOM >&4
+
+*** You requested the use of the quadmath library, but you
+*** do not seem to have the required header, <quadmath.h>.
+EOM
+ case "$gccversion" in
+ [23].*|4.[0-5]*)
+ $cat <<EOM >&4
+*** Your gcc looks a bit old:
+*** $gccversion
+EOM
+ ;;
+ '')
+ $cat <<EOM >&4
+*** You are not running a gcc.
+EOM
+ ;;
+ esac
+ $cat <<EOM >&4
+*** For the quadmath library you need at least gcc 4.6.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+esac
+
$echo "(IV will be "$ivtype", $ivsize bytes)"
$echo "(UV will be "$uvtype", $uvsize bytes)"
$echo "(NV will be "$nvtype", $nvsize bytes)"
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
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
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
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
;;
esac
+: see if trunc exists
+set trunc d_trunc
+eval $inlibc
+
: see if truncate exists
set truncate d_truncate
eval $inlibc
fi
fi
-if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
+if $test X"$usequadmath" = X"$define"; then
+ nveformat='"Qe"'
+ nvfformat='"Qf"'
+ nvgformat='"Qg"'
+ nvEUformat='"QE"'
+ nvFUformat='"QF"'
+ nvGUformat='"QG"'
+else
+ if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
nveformat="$sPRIeldbl"
nvfformat="$sPRIfldbl"
nvgformat="$sPRIgldbl"
nvEUformat="$sPRIEUldbl"
nvFUformat="$sPRIFUldbl"
nvGUformat="$sPRIGUldbl"
-else
+ else
nveformat='"e"'
nvfformat='"f"'
nvgformat='"g"'
nvEUformat='"E"'
nvFUformat='"F"'
nvGUformat='"G"'
+ fi
fi
case "$ivdformat" in
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);
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
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
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.
d_archlib='$d_archlib'
d_asctime64='$d_asctime64'
d_asctime_r='$d_asctime_r'
+d_asinh='$d_asinh'
+d_atanh='$d_atanh'
d_atolf='$d_atolf'
d_atoll='$d_atoll'
d_attribute_deprecated='$d_attribute_deprecated'
d_c99_variadic_macros='$d_c99_variadic_macros'
d_casti32='$d_casti32'
d_castneg='$d_castneg'
+d_cbrt='$d_cbrt'
d_charvspr='$d_charvspr'
d_chown='$d_chown'
d_chroot='$d_chroot'
d_closedir='$d_closedir'
d_cmsghdr_s='$d_cmsghdr_s'
d_const='$d_const'
+d_copysign='$d_copysign'
d_copysignl='$d_copysignl'
d_cplusplus='$d_cplusplus'
d_crypt='$d_crypt'
d_endsent='$d_endsent'
d_endservent_r='$d_endservent_r'
d_eofnblk='$d_eofnblk'
+d_erf='$d_erf'
+d_erfc='$d_erfc'
d_eunice='$d_eunice'
+d_exp2='$d_exp2'
+d_expm1='$d_expm1'
d_faststdio='$d_faststdio'
d_fchdir='$d_fchdir'
d_fchmod='$d_fchmod'
d_fcntl_can_lock='$d_fcntl_can_lock'
d_fd_macros='$d_fd_macros'
d_fd_set='$d_fd_set'
+d_fdim='$d_fdim'
d_fds_bits='$d_fds_bits'
d_fegetround='$d_fegetround'
d_fgetpos='$d_fgetpos'
d_flexfnam='$d_flexfnam'
d_flock='$d_flock'
d_flockproto='$d_flockproto'
+d_fma='$d_fma'
+d_fmax='$d_fmax'
+d_fmin='$d_fmin'
d_fork='$d_fork'
d_fp_class='$d_fp_class'
d_fp_classify='$d_fp_classify'
d_grpasswd='$d_grpasswd'
d_hasmntopt='$d_hasmntopt'
d_htonl='$d_htonl'
+d_hypot='$d_hypot'
+d_ilogb='$d_ilogb'
d_ilogbl='$d_ilogbl'
d_inc_version_list='$d_inc_version_list'
d_index='$d_index'
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_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'
+d_lgamma_r='$d_lgamma_r'
d_libm_lib_version='$d_libm_lib_version'
d_libname_unique='$d_libname_unique'
d_link='$d_link'
+d_llrint='$d_llrint'
+d_llround='$d_llround'
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_lockf='$d_lockf'
+d_log1p='$d_log1p'
+d_log2='$d_log2'
+d_logb='$d_logb'
d_longdbl='$d_longdbl'
d_longlong='$d_longlong'
+d_lrint='$d_lrint'
+d_lround='$d_lround'
d_lseekproto='$d_lseekproto'
d_lstat='$d_lstat'
d_madvise='$d_madvise'
d_msync='$d_msync'
d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
+d_nan='$d_nan'
d_ndbm='$d_ndbm'
d_ndbm_h_uses_prototypes='$d_ndbm_h_uses_prototypes'
+d_nearbyint='$d_nearbyint'
+d_nextafter='$d_nextafter'
+d_nexttoward='$d_nexttoward'
d_nice='$d_nice'
d_nl_langinfo='$d_nl_langinfo'
d_nv_preserves_uv='$d_nv_preserves_uv'
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'
d_rewinddir='$d_rewinddir'
+d_rint='$d_rint'
d_rmdir='$d_rmdir'
+d_round='$d_round'
d_safebcpy='$d_safebcpy'
d_safemcpy='$d_safemcpy'
d_sanemcmp='$d_sanemcmp'
d_sbrkproto='$d_sbrkproto'
+d_scalbn='$d_scalbn'
d_scalbnl='$d_scalbnl'
d_sched_yield='$d_sched_yield'
d_scm_rights='$d_scm_rights'
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'
d_tcsetpgrp='$d_tcsetpgrp'
d_telldir='$d_telldir'
d_telldirproto='$d_telldirproto'
+d_tgamma='$d_tgamma'
d_time='$d_time'
d_timegm='$d_timegm'
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_trunc='$d_trunc'
d_truncate='$d_truncate'
d_truncl='$d_truncl'
d_ttyname_r='$d_ttyname_r'
direntrytype='$direntrytype'
dlext='$dlext'
dlsrc='$dlsrc'
+doublekind='$doublekind'
doublesize='$doublesize'
drand01='$drand01'
drand48_r_proto='$drand48_r_proto'
i_prot='$i_prot'
i_pthread='$i_pthread'
i_pwd='$i_pwd'
+i_quadmath='$i_quadmath'
i_rpcsvcdbm='$i_rpcsvcdbm'
i_sgtty='$i_sgtty'
i_shadow='$i_shadow'
useopcode='$useopcode'
useperlio='$useperlio'
useposix='$useposix'
+usequadmath='$usequadmath'
usereentrant='$usereentrant'
userelocatableinc='$userelocatableinc'
useshrplib='$useshrplib'