Cleaner autoconf tests for int8 support.

This commit is contained in:
Tom Lane 1999-03-07 21:32:06 +00:00
parent a564d2bf0f
commit dffb88b024
2 changed files with 262 additions and 176 deletions

331
src/configure vendored
View File

@ -4350,13 +4350,14 @@ else
fi fi
done done
SNPRINTF=''
echo $ac_n "checking for snprintf""... $ac_c" 1>&6 echo $ac_n "checking for snprintf""... $ac_c" 1>&6
echo "configure:4355: checking for snprintf" >&5 echo "configure:4356: checking for snprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_snprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4360 "configure" #line 4361 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char snprintf(); below. */ which can conflict with char snprintf(); below. */
@ -4379,7 +4380,7 @@ snprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_snprintf=yes" eval "ac_cv_func_snprintf=yes"
else else
@ -4403,12 +4404,12 @@ SNPRINTF='snprintf.o'
fi fi
echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6
echo "configure:4407: checking for vsnprintf" >&5 echo "configure:4408: checking for vsnprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4412 "configure" #line 4413 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vsnprintf(); below. */ which can conflict with char vsnprintf(); below. */
@ -4431,7 +4432,7 @@ vsnprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vsnprintf=yes" eval "ac_cv_func_vsnprintf=yes"
else else
@ -4456,12 +4457,12 @@ fi
echo $ac_n "checking for isinf""... $ac_c" 1>&6 echo $ac_n "checking for isinf""... $ac_c" 1>&6
echo "configure:4460: checking for isinf" >&5 echo "configure:4461: checking for isinf" >&5
if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_isinf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4465 "configure" #line 4466 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char isinf(); below. */ which can conflict with char isinf(); below. */
@ -4484,7 +4485,7 @@ isinf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_isinf=yes" eval "ac_cv_func_isinf=yes"
else else
@ -4509,12 +4510,12 @@ fi
echo $ac_n "checking for getrusage""... $ac_c" 1>&6 echo $ac_n "checking for getrusage""... $ac_c" 1>&6
echo "configure:4513: checking for getrusage" >&5 echo "configure:4514: checking for getrusage" >&5
if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4518 "configure" #line 4519 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char getrusage(); below. */ which can conflict with char getrusage(); below. */
@ -4537,7 +4538,7 @@ getrusage();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_getrusage=yes" eval "ac_cv_func_getrusage=yes"
else else
@ -4562,12 +4563,12 @@ fi
echo $ac_n "checking for srandom""... $ac_c" 1>&6 echo $ac_n "checking for srandom""... $ac_c" 1>&6
echo "configure:4566: checking for srandom" >&5 echo "configure:4567: checking for srandom" >&5
if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4571 "configure" #line 4572 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char srandom(); below. */ which can conflict with char srandom(); below. */
@ -4590,7 +4591,7 @@ srandom();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_srandom=yes" eval "ac_cv_func_srandom=yes"
else else
@ -4615,12 +4616,12 @@ fi
echo $ac_n "checking for gethostname""... $ac_c" 1>&6 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
echo "configure:4619: checking for gethostname" >&5 echo "configure:4620: checking for gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4624 "configure" #line 4625 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostname(); below. */ which can conflict with char gethostname(); below. */
@ -4643,7 +4644,7 @@ gethostname();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_gethostname=yes" eval "ac_cv_func_gethostname=yes"
else else
@ -4668,12 +4669,12 @@ fi
echo $ac_n "checking for random""... $ac_c" 1>&6 echo $ac_n "checking for random""... $ac_c" 1>&6
echo "configure:4672: checking for random" >&5 echo "configure:4673: checking for random" >&5
if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4677 "configure" #line 4678 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char random(); below. */ which can conflict with char random(); below. */
@ -4696,7 +4697,7 @@ random();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_random=yes" eval "ac_cv_func_random=yes"
else else
@ -4721,12 +4722,12 @@ fi
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
echo "configure:4725: checking for inet_aton" >&5 echo "configure:4726: checking for inet_aton" >&5
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4730 "configure" #line 4731 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char inet_aton(); below. */ which can conflict with char inet_aton(); below. */
@ -4749,7 +4750,7 @@ inet_aton();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_inet_aton=yes" eval "ac_cv_func_inet_aton=yes"
else else
@ -4774,12 +4775,12 @@ fi
echo $ac_n "checking for strerror""... $ac_c" 1>&6 echo $ac_n "checking for strerror""... $ac_c" 1>&6
echo "configure:4778: checking for strerror" >&5 echo "configure:4779: checking for strerror" >&5
if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4783 "configure" #line 4784 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strerror(); below. */ which can conflict with char strerror(); below. */
@ -4802,7 +4803,7 @@ strerror();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_strerror=yes" eval "ac_cv_func_strerror=yes"
else else
@ -4828,12 +4829,12 @@ fi
echo $ac_n "checking for strdup""... $ac_c" 1>&6 echo $ac_n "checking for strdup""... $ac_c" 1>&6
echo "configure:4832: checking for strdup" >&5 echo "configure:4833: checking for strdup" >&5
if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4837 "configure" #line 4838 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strdup(); below. */ which can conflict with char strdup(); below. */
@ -4856,7 +4857,7 @@ strdup();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_strdup=yes" eval "ac_cv_func_strdup=yes"
else else
@ -4881,12 +4882,12 @@ fi
echo $ac_n "checking for strtol""... $ac_c" 1>&6 echo $ac_n "checking for strtol""... $ac_c" 1>&6
echo "configure:4885: checking for strtol" >&5 echo "configure:4886: checking for strtol" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4890 "configure" #line 4891 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtol(); below. */ which can conflict with char strtol(); below. */
@ -4909,7 +4910,7 @@ strtol();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_strtol=yes" eval "ac_cv_func_strtol=yes"
else else
@ -4934,12 +4935,12 @@ fi
echo $ac_n "checking for strtoul""... $ac_c" 1>&6 echo $ac_n "checking for strtoul""... $ac_c" 1>&6
echo "configure:4938: checking for strtoul" >&5 echo "configure:4939: checking for strtoul" >&5
if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4943 "configure" #line 4944 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strtoul(); below. */ which can conflict with char strtoul(); below. */
@ -4962,7 +4963,7 @@ strtoul();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_strtoul=yes" eval "ac_cv_func_strtoul=yes"
else else
@ -4987,12 +4988,12 @@ fi
echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
echo "configure:4991: checking for strcasecmp" >&5 echo "configure:4992: checking for strcasecmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4996 "configure" #line 4997 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char strcasecmp(); below. */ which can conflict with char strcasecmp(); below. */
@ -5015,7 +5016,7 @@ strcasecmp();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_strcasecmp=yes" eval "ac_cv_func_strcasecmp=yes"
else else
@ -5040,12 +5041,12 @@ fi
echo $ac_n "checking for cbrt""... $ac_c" 1>&6 echo $ac_n "checking for cbrt""... $ac_c" 1>&6
echo "configure:5044: checking for cbrt" >&5 echo "configure:5045: checking for cbrt" >&5
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5049 "configure" #line 5050 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char cbrt(); below. */ which can conflict with char cbrt(); below. */
@ -5068,7 +5069,7 @@ cbrt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_cbrt=yes" eval "ac_cv_func_cbrt=yes"
else else
@ -5089,7 +5090,7 @@ EOF
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
echo "configure:5093: checking for cbrt in -lm" >&5 echo "configure:5094: checking for cbrt in -lm" >&5
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'` ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -5097,7 +5098,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS" LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5101 "configure" #line 5102 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -5108,7 +5109,7 @@ int main() {
cbrt() cbrt()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -5138,12 +5139,12 @@ fi
# this hackery with HPUXMATHLIB allows us to cope. # this hackery with HPUXMATHLIB allows us to cope.
HPUXMATHLIB="" HPUXMATHLIB=""
echo $ac_n "checking for rint""... $ac_c" 1>&6 echo $ac_n "checking for rint""... $ac_c" 1>&6
echo "configure:5142: checking for rint" >&5 echo "configure:5143: checking for rint" >&5
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5147 "configure" #line 5148 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char rint(); below. */ which can conflict with char rint(); below. */
@ -5166,7 +5167,7 @@ rint();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_rint=yes" eval "ac_cv_func_rint=yes"
else else
@ -5191,7 +5192,7 @@ if [ -r /lib/pa1.1/libm.a ] ; then
HPUXMATHLIB="-L /lib/pa1.1 -lm" HPUXMATHLIB="-L /lib/pa1.1 -lm"
fi fi
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
echo "configure:5195: checking for rint in -lm" >&5 echo "configure:5196: checking for rint in -lm" >&5
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'` ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -5199,7 +5200,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lm $HPUXMATHLIB $LIBS" LIBS="-lm $HPUXMATHLIB $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5203 "configure" #line 5204 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -5210,7 +5211,7 @@ int main() {
rint() rint()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -5239,38 +5240,32 @@ fi
HAVE_LONG_INT_64=0
echo $ac_n "checking whether 'long int' is 64 bits""... $ac_c" 1>&6 echo $ac_n "checking whether 'long int' is 64 bits""... $ac_c" 1>&6
echo "configure:5244: checking whether 'long int' is 64 bits" >&5 echo "configure:5246: checking whether 'long int' is 64 bits" >&5
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo "$ac_t""assuming not on target machine" 1>&6 echo "$ac_t""assuming not on target machine" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5249 "configure" #line 5251 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h>
typedef long int int64; typedef long int int64;
#define INT64_FORMAT "%ld"
/* These are globals to discourage the compiler from folding all the
* arithmetic tests down to compile-time constants.
*/
int64 a = 20000001; int64 a = 20000001;
int64 b = 40000005; int64 b = 40000005;
int does_int64_work() int does_int64_work()
{ {
int64 c,d; int64 c,d;
char buf[100];
if (sizeof(int64) != 8) if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */ return 0; /* doesn't look like the right size */
/* we do perfunctory checks on multiply and divide, /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
* and also test snprintf if the platform provides snprintf.
*/
c = a * b; c = a * b;
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF)
snprintf(buf, 100, INT64_FORMAT, c);
if (strcmp(buf, "800000140000005") != 0)
return 0; /* either multiply or snprintf is busted */
#endif
d = (c + b) / b; d = (c + b) / b;
if (d != a+1) if (d != a+1)
return 0; return 0;
@ -5280,12 +5275,14 @@ main() {
exit(! does_int64_work()); exit(! does_int64_work());
} }
EOF EOF
if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then then
cat >> confdefs.h <<\EOF HAVE_LONG_INT_64=1
cat >> confdefs.h <<\EOF
#define HAVE_LONG_INT_64 1 #define HAVE_LONG_INT_64 1
EOF EOF
echo "$ac_t""yes" 1>&6
echo "$ac_t""yes" 1>&6
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
@ -5296,13 +5293,71 @@ rm -fr conftest*
fi fi
HAVE_LONG_LONG_INT_64=0
if [ $HAVE_LONG_INT_64 -eq 0 ] ; then
echo $ac_n "checking whether 'long long int' is 64 bits""... $ac_c" 1>&6 echo $ac_n "checking whether 'long long int' is 64 bits""... $ac_c" 1>&6
echo "configure:5301: checking whether 'long long int' is 64 bits" >&5 echo "configure:5300: checking whether 'long long int' is 64 bits" >&5
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo "$ac_t""assuming not on target machine" 1>&6 echo "$ac_t""assuming not on target machine" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5306 "configure" #line 5305 "configure"
#include "confdefs.h"
typedef long long int int64;
/* These are globals to discourage the compiler from folding all the
* arithmetic tests down to compile-time constants.
*/
int64 a = 20000001;
int64 b = 40000005;
int does_int64_work()
{
int64 c,d;
if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
c = a * b;
d = (c + b) / b;
if (d != a+1)
return 0;
return 1;
}
main() {
exit(! does_int64_work());
}
EOF
if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
HAVE_LONG_LONG_INT_64=1
cat >> confdefs.h <<\EOF
#define HAVE_LONG_LONG_INT_64 1
EOF
echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -fr conftest*
echo "$ac_t""no" 1>&6
fi
rm -fr conftest*
fi
fi
if [ x$SNPRINTF = x -a $HAVE_LONG_LONG_INT_64 -eq 1 ] ; then
echo $ac_n "checking whether snprintf handles 'long long int'""... $ac_c" 1>&6
echo "configure:5355: checking whether snprintf handles 'long long int'" >&5
if test "$cross_compiling" = yes; then
SNPRINTF='snprintf.o'
echo "$ac_t""assuming not on target machine" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5361 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
typedef long long int int64; typedef long long int int64;
@ -5311,53 +5366,45 @@ typedef long long int int64;
int64 a = 20000001; int64 a = 20000001;
int64 b = 40000005; int64 b = 40000005;
int does_int64_work() int does_int64_snprintf_work()
{ {
int64 c,d; int64 c;
char buf[100]; char buf[100];
if (sizeof(int64) != 8) if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */ return 0; /* doesn't look like the right size */
/* we do perfunctory checks on multiply and divide,
* and also test snprintf if the platform provides snprintf.
*/
c = a * b; c = a * b;
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF)
snprintf(buf, 100, INT64_FORMAT, c); snprintf(buf, 100, INT64_FORMAT, c);
if (strcmp(buf, "800000140000005") != 0) if (strcmp(buf, "800000140000005") != 0)
return 0; /* either multiply or snprintf is busted */ return 0; /* either multiply or snprintf is busted */
#endif
d = (c + b) / b;
if (d != a+1)
return 0;
return 1; return 1;
} }
main() { main() {
exit(! does_int64_work()); exit(! does_int64_snprintf_work());
} }
EOF EOF
if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then then
cat >> confdefs.h <<\EOF echo "$ac_t""yes" 1>&6
#define HAVE_LONG_LONG_INT_64 1
EOF
echo "$ac_t""yes" 1>&6
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -fr conftest* rm -fr conftest*
echo "$ac_t""no" 1>&6 SNPRINTF='snprintf.o'
echo "$ac_t""no" 1>&6
fi fi
rm -fr conftest* rm -fr conftest*
fi fi
fi
echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6 echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
echo "configure:5359: checking for POSIX signal interface" >&5 echo "configure:5406: checking for POSIX signal interface" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5361 "configure" #line 5408 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <signal.h> #include <signal.h>
int main() { int main() {
@ -5367,7 +5414,7 @@ act.sa_flags = SA_RESTART;
sigaction(0, &act, &oact); sigaction(0, &act, &oact);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define USE_POSIX_SIGNALS 1 #define USE_POSIX_SIGNALS 1
@ -5391,7 +5438,7 @@ then
# Extract the first word of "tclsh", so it can be a program name with args. # Extract the first word of "tclsh", so it can be a program name with args.
set dummy tclsh; ac_word=$2 set dummy tclsh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5395: checking for $ac_word" >&5 echo "configure:5442: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -5424,7 +5471,7 @@ fi
# Extract the first word of "tcl", so it can be a program name with args. # Extract the first word of "tcl", so it can be a program name with args.
set dummy tcl; ac_word=$2 set dummy tcl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:5428: checking for $ac_word" >&5 echo "configure:5475: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -5463,7 +5510,7 @@ fi
if test "$USE_TCL" = true if test "$USE_TCL" = true
then then
echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
echo "configure:5467: checking for tclConfig.sh" >&5 echo "configure:5514: checking for tclConfig.sh" >&5
TCL_CONFIG_SH= TCL_CONFIG_SH=
library_dirs= library_dirs=
if test -z "$TCL_DIRS" if test -z "$TCL_DIRS"
@ -5492,7 +5539,7 @@ USE_TK=$USE_TCL # If TCL is disabled, disable TK
if test "$USE_TK" = true if test "$USE_TK" = true
then then
echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
echo "configure:5496: checking for tkConfig.sh" >&5 echo "configure:5543: checking for tkConfig.sh" >&5
TK_CONFIG_SH= TK_CONFIG_SH=
# library_dirs are set in the check for TCL # library_dirs are set in the check for TCL
for dir in $library_dirs for dir in $library_dirs
@ -5529,7 +5576,7 @@ if test "$USE_X" = true; then
# Uses ac_ vars as temps to allow command line to override cache and checks. # Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache. # --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6 echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:5533: checking for X" >&5 echo "configure:5580: checking for X" >&5
# Check whether --with-x or --without-x was given. # Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then if test "${with_x+set}" = set; then
@ -5591,12 +5638,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified. # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5595 "configure" #line 5642 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$x_direct_test_include> #include <$x_direct_test_include>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:5647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -5665,14 +5712,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS" LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5669 "configure" #line 5716 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
${x_direct_test_function}() ${x_direct_test_function}()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
# We can link X programs with no special library path. # We can link X programs with no special library path.
@ -5778,17 +5825,17 @@ else
case "`(uname -sr) 2>/dev/null`" in case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*) "SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:5782: checking whether -R must be followed by a space" >&5 echo "configure:5829: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5785 "configure" #line 5832 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
ac_R_nospace=yes ac_R_nospace=yes
else else
@ -5804,14 +5851,14 @@ rm -f conftest*
else else
LIBS="$ac_xsave_LIBS -R $x_libraries" LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5808 "configure" #line 5855 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
ac_R_space=yes ac_R_space=yes
else else
@ -5843,7 +5890,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says # libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist). # the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:5847: checking for dnet_ntoa in -ldnet" >&5 echo "configure:5894: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -5851,7 +5898,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS" LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5855 "configure" #line 5902 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -5862,7 +5909,7 @@ int main() {
dnet_ntoa() dnet_ntoa()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -5884,7 +5931,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:5888: checking for dnet_ntoa in -ldnet_stub" >&5 echo "configure:5935: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -5892,7 +5939,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS" LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5896 "configure" #line 5943 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -5903,7 +5950,7 @@ int main() {
dnet_ntoa() dnet_ntoa()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:5954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -5932,12 +5979,12 @@ fi
# The nsl library prevents programs from opening the X display # The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net. # on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:5936: checking for gethostbyname" >&5 echo "configure:5983: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5941 "configure" #line 5988 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */ which can conflict with char gethostbyname(); below. */
@ -5960,7 +6007,7 @@ gethostbyname();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes" eval "ac_cv_func_gethostbyname=yes"
else else
@ -5981,7 +6028,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:5985: checking for gethostbyname in -lnsl" >&5 echo "configure:6032: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -5989,7 +6036,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS" LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 5993 "configure" #line 6040 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6000,7 +6047,7 @@ int main() {
gethostbyname() gethostbyname()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6030,12 +6077,12 @@ fi
# -lsocket must be given before -lnsl if both are needed. # -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname. # We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6 echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:6034: checking for connect" >&5 echo "configure:6081: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6039 "configure" #line 6086 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */ which can conflict with char connect(); below. */
@ -6058,7 +6105,7 @@ connect();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_connect=yes" eval "ac_cv_func_connect=yes"
else else
@ -6079,7 +6126,7 @@ fi
if test $ac_cv_func_connect = no; then if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:6083: checking for connect in -lsocket" >&5 echo "configure:6130: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6087,7 +6134,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6091 "configure" #line 6138 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6098,7 +6145,7 @@ int main() {
connect() connect()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6122,12 +6169,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6 echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:6126: checking for remove" >&5 echo "configure:6173: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6131 "configure" #line 6178 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */ which can conflict with char remove(); below. */
@ -6150,7 +6197,7 @@ remove();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_remove=yes" eval "ac_cv_func_remove=yes"
else else
@ -6171,7 +6218,7 @@ fi
if test $ac_cv_func_remove = no; then if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:6175: checking for remove in -lposix" >&5 echo "configure:6222: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6179,7 +6226,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS" LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6183 "configure" #line 6230 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6190,7 +6237,7 @@ int main() {
remove() remove()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6214,12 +6261,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo $ac_n "checking for shmat""... $ac_c" 1>&6
echo "configure:6218: checking for shmat" >&5 echo "configure:6265: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6223 "configure" #line 6270 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */ which can conflict with char shmat(); below. */
@ -6242,7 +6289,7 @@ shmat();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_shmat=yes" eval "ac_cv_func_shmat=yes"
else else
@ -6263,7 +6310,7 @@ fi
if test $ac_cv_func_shmat = no; then if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:6267: checking for shmat in -lipc" >&5 echo "configure:6314: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6271,7 +6318,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS" LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6275 "configure" #line 6322 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6282,7 +6329,7 @@ int main() {
shmat() shmat()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6315,7 +6362,7 @@ fi
# libraries we check for below, so use a different variable. # libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:6319: checking for IceConnectionNumber in -lICE" >&5 echo "configure:6366: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6323,7 +6370,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS" LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6327 "configure" #line 6374 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6334,7 +6381,7 @@ int main() {
IceConnectionNumber() IceConnectionNumber()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6367,7 +6414,7 @@ fi
X11_LIBS="" X11_LIBS=""
echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
echo "configure:6371: checking for XOpenDisplay in -lX11" >&5 echo "configure:6418: checking for XOpenDisplay in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -6375,7 +6422,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lX11 ${X_PRE_LIBS} $LIBS" LIBS="-lX11 ${X_PRE_LIBS} $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6379 "configure" #line 6426 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -6386,7 +6433,7 @@ int main() {
XOpenDisplay() XOpenDisplay()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:6390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then if { (eval echo configure:6437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -6433,17 +6480,17 @@ then
PWD_INCDIR=no PWD_INCDIR=no
ac_safe=`echo "pwd.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "pwd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pwd.h""... $ac_c" 1>&6 echo $ac_n "checking for pwd.h""... $ac_c" 1>&6
echo "configure:6437: checking for pwd.h" >&5 echo "configure:6484: checking for pwd.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 6442 "configure" #line 6489 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <pwd.h> #include <pwd.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:6494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out` ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*

View File

@ -631,6 +631,9 @@ AC_CHECK_FUNCS(fp_class fp_class_d class)
AC_CHECK_FUNCS(sigprocmask waitpid setsid fcvt) AC_CHECK_FUNCS(sigprocmask waitpid setsid fcvt)
dnl We use our snprintf.c emulation if either snprintf() or vsnprintf() dnl We use our snprintf.c emulation if either snprintf() or vsnprintf()
dnl is missing. Yes, there are machines that have only one. dnl is missing. Yes, there are machines that have only one.
dnl We may also decide to use snprintf.c if snprintf() is present but does
dnl not have working "long long int" support -- see below.
SNPRINTF=''
AC_CHECK_FUNC(snprintf, AC_CHECK_FUNC(snprintf,
AC_DEFINE(HAVE_SNPRINTF), AC_DEFINE(HAVE_SNPRINTF),
SNPRINTF='snprintf.o') SNPRINTF='snprintf.o')
@ -701,38 +704,37 @@ fi
AC_SUBST(HPUXMATHLIB) AC_SUBST(HPUXMATHLIB)
dnl Check to see if we have a working 64-bit integer type. dnl Check to see if we have a working 64-bit integer type.
dnl This has to be done after checking for snprintf, because dnl This breaks down into two steps:
dnl if the platform has snprintf then we need to know if snprintf dnl (1) figure out if the compiler has a 64-bit int type with working
dnl works with 64-bit ints. However, if we are supplying our own dnl arithmetic, and if so
dnl snprintf then we expect that it will work as long as the basic dnl (2) see whether snprintf() can format the type correctly. (Currently,
dnl 64-bit math operations work. NOTE that we will supply our own dnl snprintf is the only library routine we really need for int8 support.)
dnl snprintf if either snprintf or vsnprintf is missing. dnl It's entirely possible to have a compiler that handles a 64-bit type
dnl when the C library doesn't; this is fairly likely when using gcc on
dnl an older platform, for example.
dnl If there is no native snprintf() or it does not handle the 64-bit type,
dnl we force our own version of snprintf() to be used instead.
dnl Note this test must be run after our initial check for snprintf/vsnprintf.
HAVE_LONG_INT_64=0
AC_MSG_CHECKING(whether 'long int' is 64 bits) AC_MSG_CHECKING(whether 'long int' is 64 bits)
AC_TRY_RUN([#include <stdio.h> AC_TRY_RUN([typedef long int int64;
typedef long int int64;
#define INT64_FORMAT "%ld"
/* These are globals to discourage the compiler from folding all the
* arithmetic tests down to compile-time constants.
*/
int64 a = 20000001; int64 a = 20000001;
int64 b = 40000005; int64 b = 40000005;
int does_int64_work() int does_int64_work()
{ {
int64 c,d; int64 c,d;
char buf[100];
if (sizeof(int64) != 8) if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */ return 0; /* doesn't look like the right size */
/* we do perfunctory checks on multiply and divide, /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
* and also test snprintf if the platform provides snprintf.
*/
c = a * b; c = a * b;
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF)
snprintf(buf, 100, INT64_FORMAT, c);
if (strcmp(buf, "800000140000005") != 0)
return 0; /* either multiply or snprintf is busted */
#endif
d = (c + b) / b; d = (c + b) / b;
if (d != a+1) if (d != a+1)
return 0; return 0;
@ -741,46 +743,83 @@ int does_int64_work()
main() { main() {
exit(! does_int64_work()); exit(! does_int64_work());
}], }],
[AC_DEFINE(HAVE_LONG_INT_64) AC_MSG_RESULT(yes)], [HAVE_LONG_INT_64=1
AC_DEFINE(HAVE_LONG_INT_64)
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no), AC_MSG_RESULT(no),
AC_MSG_RESULT(assuming not on target machine)) AC_MSG_RESULT(assuming not on target machine))
HAVE_LONG_LONG_INT_64=0
if [[ $HAVE_LONG_INT_64 -eq 0 ]] ; then
AC_MSG_CHECKING(whether 'long long int' is 64 bits) AC_MSG_CHECKING(whether 'long long int' is 64 bits)
AC_TRY_RUN([#include <stdio.h> AC_TRY_RUN([typedef long long int int64;
/* These are globals to discourage the compiler from folding all the
* arithmetic tests down to compile-time constants.
*/
int64 a = 20000001;
int64 b = 40000005;
int does_int64_work()
{
int64 c,d;
if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */
/* Do perfunctory checks to see if 64-bit arithmetic seems to work */
c = a * b;
d = (c + b) / b;
if (d != a+1)
return 0;
return 1;
}
main() {
exit(! does_int64_work());
}],
[HAVE_LONG_LONG_INT_64=1
AC_DEFINE(HAVE_LONG_LONG_INT_64)
AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no),
AC_MSG_RESULT(assuming not on target machine))
fi
dnl If we found "long int" is 64 bits, assume snprintf handles it.
dnl If we found we need to use "long long int", better check.
if [[ x$SNPRINTF = x -a $HAVE_LONG_LONG_INT_64 -eq 1 ]] ; then
AC_MSG_CHECKING(whether snprintf handles 'long long int')
AC_TRY_RUN([#include <stdio.h>
typedef long long int int64; typedef long long int int64;
#define INT64_FORMAT "%lld" #define INT64_FORMAT "%lld"
int64 a = 20000001; int64 a = 20000001;
int64 b = 40000005; int64 b = 40000005;
int does_int64_work() int does_int64_snprintf_work()
{ {
int64 c,d; int64 c;
char buf[100]; char buf[100];
if (sizeof(int64) != 8) if (sizeof(int64) != 8)
return 0; /* doesn't look like the right size */ return 0; /* doesn't look like the right size */
/* we do perfunctory checks on multiply and divide,
* and also test snprintf if the platform provides snprintf.
*/
c = a * b; c = a * b;
#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF)
snprintf(buf, 100, INT64_FORMAT, c); snprintf(buf, 100, INT64_FORMAT, c);
if (strcmp(buf, "800000140000005") != 0) if (strcmp(buf, "800000140000005") != 0)
return 0; /* either multiply or snprintf is busted */ return 0; /* either multiply or snprintf is busted */
#endif
d = (c + b) / b;
if (d != a+1)
return 0;
return 1; return 1;
} }
main() { main() {
exit(! does_int64_work()); exit(! does_int64_snprintf_work());
}], }],
[AC_DEFINE(HAVE_LONG_LONG_INT_64) AC_MSG_RESULT(yes)], AC_MSG_RESULT(yes),
AC_MSG_RESULT(no), [SNPRINTF='snprintf.o'
AC_MSG_RESULT(assuming not on target machine)) AC_MSG_RESULT(no)],
[SNPRINTF='snprintf.o'
AC_MSG_RESULT(assuming not on target machine)])
fi
dnl Check to see if platform has POSIX signal interface. dnl Check to see if platform has POSIX signal interface.
dnl NOTE: if this test fails then POSIX signals definitely don't work. dnl NOTE: if this test fails then POSIX signals definitely don't work.