Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a28518a

Browse files
committed
Add check for rint() in math library.
1 parent 99f235d commit a28518a

3 files changed

Lines changed: 90 additions & 21 deletions

File tree

config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@
381381
/* Define if you have the readlink function. */
382382
#undef HAVE_READLINK
383383

384+
/* Define if you have the rint function. */
385+
#undef HAVE_RINT
386+
384387
/* Define if you have the select function. */
385388
#undef HAVE_SELECT
386389

configure

Lines changed: 81 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22

3-
# From configure.in Revision: 1.120
3+
# From configure.in Revision: 1.121
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.13
@@ -5001,19 +5001,79 @@ fi
50015001
done
50025002

50035003

5004+
LIBS=$LIBS_SAVE
5005+
5006+
# check for rint() in math library
5007+
LIBS_SAVE=$LIBS
5008+
LIBS="$LIBS $LIBM"
5009+
for ac_func in rint
5010+
do
5011+
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5012+
echo "configure:5013: checking for $ac_func" >&5
5013+
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5014+
echo $ac_n "(cached) $ac_c" 1>&6
5015+
else
5016+
cat > conftest.$ac_ext <<EOF
5017+
#line 5018 "configure"
5018+
#include "confdefs.h"
5019+
/* System header to define __stub macros and hopefully few prototypes,
5020+
which can conflict with char $ac_func(); below. */
5021+
#include <assert.h>
5022+
/* Override any gcc2 internal prototype to avoid an error. */
5023+
/* We use char because int might match the return type of a gcc2
5024+
builtin and then its argument prototype would still apply. */
5025+
char $ac_func();
5026+
5027+
int main() {
5028+
5029+
/* The GNU C library defines this for functions which it implements
5030+
to always fail with ENOSYS. Some functions are actually named
5031+
something starting with __ and the normal name is an alias. */
5032+
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5033+
choke me
5034+
#else
5035+
$ac_func();
5036+
#endif
5037+
5038+
; return 0; }
5039+
EOF
5040+
if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041+
rm -rf conftest*
5042+
eval "ac_cv_func_$ac_func=yes"
5043+
else
5044+
echo "configure: failed program was:" >&5
5045+
cat conftest.$ac_ext >&5
5046+
rm -rf conftest*
5047+
eval "ac_cv_func_$ac_func=no"
5048+
fi
5049+
rm -f conftest*
5050+
fi
5051+
5052+
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5053+
echo "$ac_t""yes" 1>&6
5054+
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5055+
cat >> confdefs.h <<EOF
5056+
#define $ac_tr_func 1
5057+
EOF
5058+
5059+
else
5060+
echo "$ac_t""no" 1>&6
5061+
fi
5062+
done
5063+
50045064
LIBS=$LIBS_SAVE
50055065

50065066
# check for getopt
50075067
echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
5008-
echo "configure:5009: checking for genuine getopt" >&5
5068+
echo "configure:5069: checking for genuine getopt" >&5
50095069
if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
50105070
echo $ac_n "(cached) $ac_c" 1>&6
50115071
else
50125072
if test "$cross_compiling" = yes; then
50135073
ac_cv_func_getopt=no
50145074
else
50155075
cat > conftest.$ac_ext <<EOF
5016-
#line 5017 "configure"
5076+
#line 5077 "configure"
50175077
#include "confdefs.h"
50185078
#include <stdio.h>
50195079
extern int optind, opterr, getopt();
@@ -5025,7 +5085,7 @@ int main() {
50255085
exit(0);
50265086
}
50275087
EOF
5028-
if { (eval echo configure:5029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5088+
if { (eval echo configure:5089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
50295089
then
50305090
ac_cv_func_getopt=yes
50315091
else
@@ -5043,15 +5103,15 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
50435103

50445104
# check whether malloc(0) returns NULL or not
50455105
echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
5046-
echo "configure:5047: checking what malloc(0) returns" >&5
5106+
echo "configure:5107: checking what malloc(0) returns" >&5
50475107
if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
50485108
echo $ac_n "(cached) $ac_c" 1>&6
50495109
else
50505110
if test "$cross_compiling" = yes; then
50515111
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
50525112
else
50535113
cat > conftest.$ac_ext <<EOF
5054-
#line 5055 "configure"
5114+
#line 5115 "configure"
50555115
#include "confdefs.h"
50565116
#include <stdio.h>
50575117
#ifdef HAVE_STDLIB
@@ -5070,7 +5130,7 @@ main() {
50705130
exit(0);
50715131
}
50725132
EOF
5073-
if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5133+
if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
50745134
then
50755135
ac_cv_malloc_zero=nonnull
50765136
else
@@ -5096,17 +5156,17 @@ fi
50965156
# check for wchar.h
50975157
ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
50985158
echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
5099-
echo "configure:5100: checking for wchar.h" >&5
5159+
echo "configure:5160: checking for wchar.h" >&5
51005160
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
51015161
echo $ac_n "(cached) $ac_c" 1>&6
51025162
else
51035163
cat > conftest.$ac_ext <<EOF
5104-
#line 5105 "configure"
5164+
#line 5165 "configure"
51055165
#include "confdefs.h"
51065166
#include <wchar.h>
51075167
EOF
51085168
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5109-
{ (eval echo configure:5110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5169+
{ (eval echo configure:5170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
51105170
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
51115171
if test -z "$ac_err"; then
51125172
rm -rf conftest*
@@ -5136,12 +5196,12 @@ fi
51365196
# check for usable wchar_t
51375197
usable_wchar_t="unkown"
51385198
echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
5139-
echo "configure:5140: checking for usable wchar_t" >&5
5199+
echo "configure:5200: checking for usable wchar_t" >&5
51405200
if test "$cross_compiling" = yes; then
51415201
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
51425202
else
51435203
cat > conftest.$ac_ext <<EOF
5144-
#line 5145 "configure"
5204+
#line 5205 "configure"
51455205
#include "confdefs.h"
51465206
51475207
#include "wchar.h"
@@ -5155,7 +5215,7 @@ main() {
51555215
}
51565216
51575217
EOF
5158-
if { (eval echo configure:5159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5218+
if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
51595219
then
51605220
cat >> confdefs.h <<\EOF
51615221
#define HAVE_USABLE_WCHAR_T 1
@@ -5174,14 +5234,14 @@ echo "$ac_t""$usable_wchar_t" 1>&6
51745234

51755235
# check for endianness
51765236
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
5177-
echo "configure:5178: checking whether byte ordering is bigendian" >&5
5237+
echo "configure:5238: checking whether byte ordering is bigendian" >&5
51785238
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
51795239
echo $ac_n "(cached) $ac_c" 1>&6
51805240
else
51815241
ac_cv_c_bigendian=unknown
51825242
# See if sys/param.h defines the BYTE_ORDER macro.
51835243
cat > conftest.$ac_ext <<EOF
5184-
#line 5185 "configure"
5244+
#line 5245 "configure"
51855245
#include "confdefs.h"
51865246
#include <sys/types.h>
51875247
#include <sys/param.h>
@@ -5192,11 +5252,11 @@ int main() {
51925252
#endif
51935253
; return 0; }
51945254
EOF
5195-
if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5255+
if { (eval echo configure:5256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
51965256
rm -rf conftest*
51975257
# It does; now see whether it defined to BIG_ENDIAN or not.
51985258
cat > conftest.$ac_ext <<EOF
5199-
#line 5200 "configure"
5259+
#line 5260 "configure"
52005260
#include "confdefs.h"
52015261
#include <sys/types.h>
52025262
#include <sys/param.h>
@@ -5207,7 +5267,7 @@ int main() {
52075267
#endif
52085268
; return 0; }
52095269
EOF
5210-
if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5270+
if { (eval echo configure:5271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
52115271
rm -rf conftest*
52125272
ac_cv_c_bigendian=yes
52135273
else
@@ -5227,7 +5287,7 @@ if test "$cross_compiling" = yes; then
52275287
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
52285288
else
52295289
cat > conftest.$ac_ext <<EOF
5230-
#line 5231 "configure"
5290+
#line 5291 "configure"
52315291
#include "confdefs.h"
52325292
main () {
52335293
/* Are we little or big endian? From Harbison&Steele. */
@@ -5240,7 +5300,7 @@ main () {
52405300
exit (u.c[sizeof (long) - 1] == 1);
52415301
}
52425302
EOF
5243-
if { (eval echo configure:5244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5303+
if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
52445304
then
52455305
ac_cv_c_bigendian=no
52465306
else
@@ -5266,7 +5326,7 @@ fi
52665326

52675327
# Check for --with-wctype-functions
52685328
echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
5269-
echo "configure:5270: checking for --with-wctype-functions" >&5
5329+
echo "configure:5330: checking for --with-wctype-functions" >&5
52705330
# Check whether --with-wctype-functions or --without-wctype-functions was given.
52715331
if test "${with_wctype_functions+set}" = set; then
52725332
withval="$with_wctype_functions"

configure.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,12 @@ AC_CHECK_FUNCS(hypot)
996996
AC_REPLACE_FUNCS(hypot)
997997
LIBS=$LIBS_SAVE
998998

999+
# check for rint() in math library
1000+
LIBS_SAVE=$LIBS
1001+
LIBS="$LIBS $LIBM"
1002+
AC_CHECK_FUNCS(rint)
1003+
LIBS=$LIBS_SAVE
1004+
9991005
# check for getopt
10001006
AC_MSG_CHECKING(for genuine getopt)
10011007
AC_CACHE_VAL(ac_cv_func_getopt,

0 commit comments

Comments
 (0)