diff --git a/src/configure b/src/configure index 670893daebe6398f70ef57846da8885fc7a3f735..15cfa8d9b16034589e72666411dc6538728da1c7 100755 --- a/src/configure +++ b/src/configure @@ -5291,20 +5291,50 @@ SNPRINTF='snprintf.o' fi +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "snprintf" >/dev/null 2>&1; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_SNPRINTF_DECL 1 +EOF + +fi +rm -f conftest* + +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "vsnprintf" >/dev/null 2>&1; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_VSNPRINTF_DECL 1 +EOF + +fi +rm -f conftest* + echo $ac_n "checking for isinf""... $ac_c" 1>&6 -echo "configure:5296: checking for isinf" >&5 +echo "configure:5326: checking for isinf" >&5 if eval "test \"`echo '$''{'ac_cv_func_or_macro_isinf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { double x = 0.0; int res = isinf(x); ; return 0; } EOF -if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_or_macro_isinf=yes else @@ -5329,12 +5359,12 @@ else fi echo $ac_n "checking for getrusage""... $ac_c" 1>&6 -echo "configure:5333: checking for getrusage" >&5 +echo "configure:5363: checking for getrusage" >&5 if eval "test \"`echo '$''{'ac_cv_func_getrusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getrusage=yes" else @@ -5382,12 +5412,12 @@ fi echo $ac_n "checking for srandom""... $ac_c" 1>&6 -echo "configure:5386: checking for srandom" >&5 +echo "configure:5416: checking for srandom" >&5 if eval "test \"`echo '$''{'ac_cv_func_srandom'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_srandom=yes" else @@ -5435,12 +5465,12 @@ fi echo $ac_n "checking for gethostname""... $ac_c" 1>&6 -echo "configure:5439: checking for gethostname" >&5 +echo "configure:5469: checking for gethostname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostname=yes" else @@ -5488,12 +5518,12 @@ fi echo $ac_n "checking for random""... $ac_c" 1>&6 -echo "configure:5492: checking for random" >&5 +echo "configure:5522: checking for random" >&5 if eval "test \"`echo '$''{'ac_cv_func_random'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_random=yes" else @@ -5541,12 +5571,12 @@ fi echo $ac_n "checking for inet_aton""... $ac_c" 1>&6 -echo "configure:5545: checking for inet_aton" >&5 +echo "configure:5575: checking for inet_aton" >&5 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_inet_aton=yes" else @@ -5594,12 +5624,12 @@ fi echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:5598: checking for strerror" >&5 +echo "configure:5628: checking for strerror" >&5 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strerror=yes" else @@ -5648,12 +5678,12 @@ fi echo $ac_n "checking for strdup""... $ac_c" 1>&6 -echo "configure:5652: checking for strdup" >&5 +echo "configure:5682: checking for strdup" >&5 if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strdup=yes" else @@ -5701,12 +5731,12 @@ fi echo $ac_n "checking for strtol""... $ac_c" 1>&6 -echo "configure:5705: checking for strtol" >&5 +echo "configure:5735: checking for strtol" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtol'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtol=yes" else @@ -5754,12 +5784,12 @@ fi echo $ac_n "checking for strtoul""... $ac_c" 1>&6 -echo "configure:5758: checking for strtoul" >&5 +echo "configure:5788: checking for strtoul" >&5 if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strtoul=yes" else @@ -5807,12 +5837,12 @@ fi echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 -echo "configure:5811: checking for strcasecmp" >&5 +echo "configure:5841: checking for strcasecmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strcasecmp=yes" else @@ -5860,12 +5890,12 @@ fi echo $ac_n "checking for cbrt""... $ac_c" 1>&6 -echo "configure:5864: checking for cbrt" >&5 +echo "configure:5894: checking for cbrt" >&5 if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_cbrt=yes" else @@ -5909,7 +5939,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6 -echo "configure:5913: checking for cbrt in -lm" >&5 +echo "configure:5943: checking for cbrt in -lm" >&5 ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5917,7 +5947,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5966,12 +5996,12 @@ esac echo $ac_n "checking for rint""... $ac_c" 1>&6 -echo "configure:5970: checking for rint" >&5 +echo "configure:6000: checking for rint" >&5 if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_rint=yes" else @@ -6015,7 +6045,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6 -echo "configure:6019: checking for rint in -lm" >&5 +echo "configure:6049: checking for rint in -lm" >&5 ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6023,7 +6053,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $HPUXMATHLIB $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6064,12 +6094,12 @@ fi for ac_func in getopt_long do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6068: checking for $ac_func" >&5 +echo "configure:6098: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6119,16 +6149,16 @@ done echo $ac_n "checking for finite() macro or function""... $ac_c" 1>&6 -echo "configure:6123: checking for finite() macro or function" >&5 +echo "configure:6153: checking for finite() macro or function" >&5 cat > conftest.$ac_ext < int main() { int dummy=finite(1.0); ; return 0; } EOF -if { (eval echo configure:6132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FINITE 1 @@ -6145,12 +6175,12 @@ rm -f conftest* HAVE_LONG_INT_64=0 echo $ac_n "checking whether 'long int' is 64 bits""... $ac_c" 1>&6 -echo "configure:6149: checking whether 'long int' is 64 bits" >&5 +echo "configure:6179: checking whether 'long int' is 64 bits" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then HAVE_LONG_INT_64=1 cat >> confdefs.h <<\EOF @@ -6199,12 +6229,12 @@ 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 "configure:6203: checking whether 'long long int' is 64 bits" >&5 +echo "configure:6233: checking whether 'long long int' is 64 bits" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then HAVE_LONG_LONG_INT_64=1 cat >> confdefs.h <<\EOF @@ -6255,7 +6285,7 @@ fi if [ $HAVE_LONG_LONG_INT_64 -eq 1 ] ; then if [ x$SNPRINTF = x ] ; then echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6 -echo "configure:6259: checking whether snprintf handles 'long long int' as %lld" >&5 +echo "configure:6289: checking whether snprintf handles 'long long int' as %lld" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -6264,7 +6294,7 @@ echo "configure:6259: checking whether snprintf handles 'long long int' as %lld" else cat > conftest.$ac_ext < typedef long long int int64; @@ -6291,7 +6321,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:6295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%lld"' @@ -6302,7 +6332,7 @@ else rm -fr conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6 -echo "configure:6306: checking whether snprintf handles 'long long int' as %qd" >&5 +echo "configure:6336: checking whether snprintf handles 'long long int' as %qd" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -6311,7 +6341,7 @@ echo "configure:6306: checking whether snprintf handles 'long long int' as %qd" else cat > conftest.$ac_ext < typedef long long int int64; @@ -6338,7 +6368,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%qd"' @@ -6380,7 +6410,7 @@ EOF echo $ac_n "checking alignment of short""... $ac_c" 1>&6 -echo "configure:6384: checking alignment of short" >&5 +echo "configure:6414: checking alignment of short" >&5 if eval "test \"`echo '$''{'ac_cv_alignof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6388,7 +6418,7 @@ else ac_cv_alignof_short='sizeof(short)' else cat > conftest.$ac_ext < struct { char filler; short field; } mystruct; @@ -6400,7 +6430,7 @@ main() exit(0); } EOF -if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_alignof_short=`cat conftestval` else @@ -6420,7 +6450,7 @@ EOF echo $ac_n "checking alignment of int""... $ac_c" 1>&6 -echo "configure:6424: checking alignment of int" >&5 +echo "configure:6454: checking alignment of int" >&5 if eval "test \"`echo '$''{'ac_cv_alignof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6428,7 +6458,7 @@ else ac_cv_alignof_int='sizeof(int)' else cat > conftest.$ac_ext < struct { char filler; int field; } mystruct; @@ -6440,7 +6470,7 @@ main() exit(0); } EOF -if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_alignof_int=`cat conftestval` else @@ -6460,7 +6490,7 @@ EOF echo $ac_n "checking alignment of long""... $ac_c" 1>&6 -echo "configure:6464: checking alignment of long" >&5 +echo "configure:6494: checking alignment of long" >&5 if eval "test \"`echo '$''{'ac_cv_alignof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6468,7 +6498,7 @@ else ac_cv_alignof_long='sizeof(long)' else cat > conftest.$ac_ext < struct { char filler; long field; } mystruct; @@ -6480,7 +6510,7 @@ main() exit(0); } EOF -if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_alignof_long=`cat conftestval` else @@ -6501,7 +6531,7 @@ EOF if [ $HAVE_LONG_LONG_INT_64 -eq 1 ] ; then echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6 -echo "configure:6505: checking alignment of long long int" >&5 +echo "configure:6535: checking alignment of long long int" >&5 if eval "test \"`echo '$''{'ac_cv_alignof_long_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6509,7 +6539,7 @@ else ac_cv_alignof_long_long_int='sizeof(long long int)' else cat > conftest.$ac_ext < struct { char filler; long long int field; } mystruct; @@ -6521,7 +6551,7 @@ main() exit(0); } EOF -if { (eval echo configure:6525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_alignof_long_long_int=`cat conftestval` else @@ -6542,7 +6572,7 @@ EOF fi echo $ac_n "checking alignment of double""... $ac_c" 1>&6 -echo "configure:6546: checking alignment of double" >&5 +echo "configure:6576: checking alignment of double" >&5 if eval "test \"`echo '$''{'ac_cv_alignof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6550,7 +6580,7 @@ else ac_cv_alignof_double='sizeof(double)' else cat > conftest.$ac_ext < struct { char filler; double field; } mystruct; @@ -6562,7 +6592,7 @@ main() exit(0); } EOF -if { (eval echo configure:6566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_alignof_double=`cat conftestval` else @@ -6604,9 +6634,9 @@ EOF echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6 -echo "configure:6608: checking for POSIX signal interface" >&5 +echo "configure:6638: checking for POSIX signal interface" >&5 cat > conftest.$ac_ext < int main() { @@ -6616,7 +6646,7 @@ act.sa_flags = SA_RESTART; sigaction(0, &act, &oact); ; return 0; } EOF -if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define USE_POSIX_SIGNALS 1 @@ -6640,7 +6670,7 @@ then # Extract the first word of "tclsh", so it can be a program name with args. set dummy tclsh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6644: checking for $ac_word" >&5 +echo "configure:6674: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6677,7 +6707,7 @@ fi # Extract the first word of "tcl", so it can be a program name with args. set dummy tcl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6681: checking for $ac_word" >&5 +echo "configure:6711: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6720,7 +6750,7 @@ fi if test "$USE_TCL" = true then echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 -echo "configure:6724: checking for tclConfig.sh" >&5 +echo "configure:6754: checking for tclConfig.sh" >&5 TCL_CONFIG_SH= library_dirs= if test -z "$TCL_DIRS" @@ -6749,7 +6779,7 @@ USE_TK=$USE_TCL # If TCL is disabled, disable TK if test "$USE_TK" = true then echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 -echo "configure:6753: checking for tkConfig.sh" >&5 +echo "configure:6783: checking for tkConfig.sh" >&5 TK_CONFIG_SH= # library_dirs are set in the check for TCL for dir in $library_dirs @@ -6771,7 +6801,7 @@ echo "configure:6753: checking for tkConfig.sh" >&5 # Extract the first word of "wish", so it can be a program name with args. set dummy wish; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6775: checking for $ac_word" >&5 +echo "configure:6805: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6821,7 +6851,7 @@ if test "$USE_X" = true; then # 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. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:6825: checking for X" >&5 +echo "configure:6855: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -6883,12 +6913,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6957,14 +6987,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -7070,17 +7100,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:7074: checking whether -R must be followed by a space" >&5 +echo "configure:7104: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -7096,14 +7126,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -7135,7 +7165,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:7139: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:7169: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7143,7 +7173,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7176,7 +7206,7 @@ fi 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 "configure:7180: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:7210: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7184,7 +7214,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7224,12 +7254,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:7228: checking for gethostbyname" >&5 +echo "configure:7258: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -7273,7 +7303,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:7277: checking for gethostbyname in -lnsl" >&5 +echo "configure:7307: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7281,7 +7311,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7322,12 +7352,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:7326: checking for connect" >&5 +echo "configure:7356: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -7371,7 +7401,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:7375: checking for connect in -lsocket" >&5 +echo "configure:7405: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7379,7 +7409,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7414,12 +7444,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:7418: checking for remove" >&5 +echo "configure:7448: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -7463,7 +7493,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:7467: checking for remove in -lposix" >&5 +echo "configure:7497: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7471,7 +7501,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7506,12 +7536,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:7510: checking for shmat" >&5 +echo "configure:7540: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -7555,7 +7585,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:7559: checking for shmat in -lipc" >&5 +echo "configure:7589: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7563,7 +7593,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7607,7 +7637,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:7611: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:7641: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7615,7 +7645,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7659,7 +7689,7 @@ fi X11_LIBS="" echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:7663: checking for XOpenDisplay in -lX11" >&5 +echo "configure:7693: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7667,7 +7697,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 ${X_PRE_LIBS} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7725,17 +7755,17 @@ then PWD_INCDIR=no ac_safe=`echo "pwd.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for pwd.h""... $ac_c" 1>&6 -echo "configure:7729: checking for pwd.h" >&5 +echo "configure:7759: checking for pwd.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/src/configure.in b/src/configure.in index 3d8b6b7305ccc5be314e7edaf1e55c35bfd36209..94a1242167a4c943f313f43f0f12b458be9c9aa8 100644 --- a/src/configure.in +++ b/src/configure.in @@ -720,6 +720,16 @@ AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF), SNPRINTF='snprintf.o') AC_SUBST(SNPRINTF) +dnl Check whether declares snprintf() and vsnprintf(); if not, +dnl include/c.h will provide declarations. Note this is a separate test +dnl from whether the functions exist in the C library --- there are systems +dnl that have the functions but don't bother to declare them :-( +dnl Note: simple-minded pattern here will do wrong thing if stdio.h +dnl declares vsnprintf() but not snprintf(). Hopefully there are no +dnl systems that are *that* brain-damaged... +AC_EGREP_HEADER(snprintf, stdio.h, AC_DEFINE(HAVE_SNPRINTF_DECL)) +AC_EGREP_HEADER(vsnprintf, stdio.h, AC_DEFINE(HAVE_VSNPRINTF_DECL)) +dnl dnl do this one the hard way in case isinf() is a macro AC_MSG_CHECKING(for isinf) AC_CACHE_VAL(ac_cv_func_or_macro_isinf, diff --git a/src/include/c.h b/src/include/c.h index 174d20cb1c41bc8a52c1dc16bc4afbe8928d87db..53fe14e70a2ff56ec55ca645200a318e512bb447 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: c.h,v 1.61 1999/07/17 20:18:25 momjian Exp $ + * $Id: c.h,v 1.62 1999/12/20 00:51:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -789,11 +789,11 @@ extern char *vararg_format(const char *fmt,...); * in config.h we haven't yet included anything that defines size_t... */ -#ifndef HAVE_SNPRINTF +#ifndef HAVE_SNPRINTF_DECL extern int snprintf(char *str, size_t count, const char *fmt,...); #endif -#ifndef HAVE_VSNPRINTF +#ifndef HAVE_VSNPRINTF_DECL extern int vsnprintf(char *str, size_t count, const char *fmt, va_list args); #endif diff --git a/src/include/config.h.in b/src/include/config.h.in index ef25d6ddcb3a1b6b662ec327d3a9621d519cd5c8..00713b0b702a1d9557136413efb6fc764a91d97c 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -310,18 +310,24 @@ # define gettimeofday(a,b) gettimeofday(a) #endif -/* Set to 1 if you have snprintf() */ +/* Set to 1 if you have snprintf() in the C library */ #undef HAVE_SNPRINTF -/* Set to 1 if you have strerror() */ -#undef HAVE_STRERROR +/* Set to 1 if your standard system headers declare snprintf() */ +#undef HAVE_SNPRINTF_DECL -/* Set to 1 if you have vsnprintf() */ +/* Set to 1 if you have vsnprintf() in the C library */ #undef HAVE_VSNPRINTF +/* Set to 1 if your standard system headers declare vsnprintf() */ +#undef HAVE_VSNPRINTF_DECL + +/* Set to 1 if you have strerror() */ +#undef HAVE_STRERROR + /* * Set to 1 if you have isinf(). - * These are all realated to port/isinf.c + * These are all related to port/isinf.c */ #undef HAVE_FPCLASS #undef HAVE_FP_CLASS diff --git a/src/include/port/hpux.h b/src/include/port/hpux.h index 0c42e6c4b76511eca55e2dcb314ddd8a51f6b9e0..4ef01af095854bb88a6449ffd064e537f066d635 100644 --- a/src/include/port/hpux.h +++ b/src/include/port/hpux.h @@ -6,14 +6,6 @@ typedef struct int sema[4]; } slock_t; -/* HPUX 9 has snprintf in the library, so configure will set HAVE_SNPRINTF; - * but it doesn't provide a prototype for it. To suppress warning messages - * from gcc, do this to make c.h provide the prototype: - */ -#ifndef HAVE_VSNPRINTF -#undef HAVE_SNPRINTF -#endif - #ifndef BIG_ENDIAN #define BIG_ENDIAN 4321 #endif