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

Skip to content

Commit be28f5b

Browse files
committed
Gregor Hoffleit: Don't link with the libieee library if it's not necessary
1 parent 518e55c commit be28f5b

2 files changed

Lines changed: 93 additions & 41 deletions

File tree

configure

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

3-
# From configure.in Revision: 1.137
3+
# From configure.in Revision: 1.139
44

55
# Guess values for system-dependent variables and create Makefiles.
66
# Generated automatically using autoconf version 2.13
@@ -5049,16 +5049,62 @@ fi
50495049
# (none yet)
50505050

50515051
# Linux requires this for correct f.p. operations
5052+
echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
5053+
echo "configure:5054: checking for __fpu_control" >&5
5054+
if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
5055+
echo $ac_n "(cached) $ac_c" 1>&6
5056+
else
5057+
cat > conftest.$ac_ext <<EOF
5058+
#line 5059 "configure"
5059+
#include "confdefs.h"
5060+
/* System header to define __stub macros and hopefully few prototypes,
5061+
which can conflict with char __fpu_control(); below. */
5062+
#include <assert.h>
5063+
/* Override any gcc2 internal prototype to avoid an error. */
5064+
/* We use char because int might match the return type of a gcc2
5065+
builtin and then its argument prototype would still apply. */
5066+
char __fpu_control();
5067+
5068+
int main() {
5069+
5070+
/* The GNU C library defines this for functions which it implements
5071+
to always fail with ENOSYS. Some functions are actually named
5072+
something starting with __ and the normal name is an alias. */
5073+
#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5074+
choke me
5075+
#else
5076+
__fpu_control();
5077+
#endif
5078+
5079+
; return 0; }
5080+
EOF
5081+
if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082+
rm -rf conftest*
5083+
eval "ac_cv_func___fpu_control=yes"
5084+
else
5085+
echo "configure: failed program was:" >&5
5086+
cat conftest.$ac_ext >&5
5087+
rm -rf conftest*
5088+
eval "ac_cv_func___fpu_control=no"
5089+
fi
5090+
rm -f conftest*
5091+
fi
5092+
5093+
if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5094+
echo "$ac_t""yes" 1>&6
5095+
:
5096+
else
5097+
echo "$ac_t""no" 1>&6
50525098
echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
5053-
echo "configure:5054: checking for __fpu_control in -lieee" >&5
5099+
echo "configure:5100: checking for __fpu_control in -lieee" >&5
50545100
ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
50555101
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
50565102
echo $ac_n "(cached) $ac_c" 1>&6
50575103
else
50585104
ac_save_LIBS="$LIBS"
50595105
LIBS="-lieee $LIBS"
50605106
cat > conftest.$ac_ext <<EOF
5061-
#line 5062 "configure"
5107+
#line 5108 "configure"
50625108
#include "confdefs.h"
50635109
/* Override any gcc2 internal prototype to avoid an error. */
50645110
/* We use char because int might match the return type of a gcc2
@@ -5069,7 +5115,7 @@ int main() {
50695115
__fpu_control()
50705116
; return 0; }
50715117
EOF
5072-
if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5118+
if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
50735119
rm -rf conftest*
50745120
eval "ac_cv_lib_$ac_lib_var=yes"
50755121
else
@@ -5097,9 +5143,12 @@ else
50975143
fi
50985144

50995145

5146+
fi
5147+
5148+
51005149
# Check for --with-fpectl
51015150
echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
5102-
echo "configure:5103: checking for --with-fpectl" >&5
5151+
echo "configure:5152: checking for --with-fpectl" >&5
51035152
# Check whether --with-fpectl or --without-fpectl was given.
51045153
if test "${with_fpectl+set}" = set; then
51055154
withval="$with_fpectl"
@@ -5124,7 +5173,7 @@ BeOS) ;;
51245173
*) LIBM=-lm
51255174
esac
51265175
echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
5127-
echo "configure:5128: checking for --with-libm=STRING" >&5
5176+
echo "configure:5177: checking for --with-libm=STRING" >&5
51285177
# Check whether --with-libm or --without-libm was given.
51295178
if test "${with_libm+set}" = set; then
51305179
withval="$with_libm"
@@ -5145,7 +5194,7 @@ fi
51455194
# check for --with-libc=...
51465195

51475196
echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
5148-
echo "configure:5149: checking for --with-libc=STRING" >&5
5197+
echo "configure:5198: checking for --with-libc=STRING" >&5
51495198
# Check whether --with-libc or --without-libc was given.
51505199
if test "${with_libc+set}" = set; then
51515200
withval="$with_libc"
@@ -5169,12 +5218,12 @@ LIBS="$LIBS $LIBM"
51695218
for ac_func in hypot
51705219
do
51715220
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5172-
echo "configure:5173: checking for $ac_func" >&5
5221+
echo "configure:5222: checking for $ac_func" >&5
51735222
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
51745223
echo $ac_n "(cached) $ac_c" 1>&6
51755224
else
51765225
cat > conftest.$ac_ext <<EOF
5177-
#line 5178 "configure"
5226+
#line 5227 "configure"
51785227
#include "confdefs.h"
51795228
/* System header to define __stub macros and hopefully few prototypes,
51805229
which can conflict with char $ac_func(); below. */
@@ -5197,7 +5246,7 @@ $ac_func();
51975246
51985247
; return 0; }
51995248
EOF
5200-
if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5249+
if { (eval echo configure:5250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
52015250
rm -rf conftest*
52025251
eval "ac_cv_func_$ac_func=yes"
52035252
else
@@ -5224,12 +5273,12 @@ done
52245273
for ac_func in hypot
52255274
do
52265275
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5227-
echo "configure:5228: checking for $ac_func" >&5
5276+
echo "configure:5277: checking for $ac_func" >&5
52285277
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
52295278
echo $ac_n "(cached) $ac_c" 1>&6
52305279
else
52315280
cat > conftest.$ac_ext <<EOF
5232-
#line 5233 "configure"
5281+
#line 5282 "configure"
52335282
#include "confdefs.h"
52345283
/* System header to define __stub macros and hopefully few prototypes,
52355284
which can conflict with char $ac_func(); below. */
@@ -5252,7 +5301,7 @@ $ac_func();
52525301
52535302
; return 0; }
52545303
EOF
5255-
if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5304+
if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
52565305
rm -rf conftest*
52575306
eval "ac_cv_func_$ac_func=yes"
52585307
else
@@ -5286,12 +5335,12 @@ LIBS="$LIBS $LIBM"
52865335
for ac_func in rint
52875336
do
52885337
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5289-
echo "configure:5290: checking for $ac_func" >&5
5338+
echo "configure:5339: checking for $ac_func" >&5
52905339
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
52915340
echo $ac_n "(cached) $ac_c" 1>&6
52925341
else
52935342
cat > conftest.$ac_ext <<EOF
5294-
#line 5295 "configure"
5343+
#line 5344 "configure"
52955344
#include "confdefs.h"
52965345
/* System header to define __stub macros and hopefully few prototypes,
52975346
which can conflict with char $ac_func(); below. */
@@ -5314,7 +5363,7 @@ $ac_func();
53145363
53155364
; return 0; }
53165365
EOF
5317-
if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366+
if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
53185367
rm -rf conftest*
53195368
eval "ac_cv_func_$ac_func=yes"
53205369
else
@@ -5342,15 +5391,15 @@ LIBS=$LIBS_SAVE
53425391

53435392
# check for getopt
53445393
echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
5345-
echo "configure:5346: checking for genuine getopt" >&5
5394+
echo "configure:5395: checking for genuine getopt" >&5
53465395
if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
53475396
echo $ac_n "(cached) $ac_c" 1>&6
53485397
else
53495398
if test "$cross_compiling" = yes; then
53505399
ac_cv_func_getopt=no
53515400
else
53525401
cat > conftest.$ac_ext <<EOF
5353-
#line 5354 "configure"
5402+
#line 5403 "configure"
53545403
#include "confdefs.h"
53555404
#include <stdio.h>
53565405
extern int optind, opterr, getopt();
@@ -5362,7 +5411,7 @@ int main() {
53625411
exit(0);
53635412
}
53645413
EOF
5365-
if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5414+
if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
53665415
then
53675416
ac_cv_func_getopt=yes
53685417
else
@@ -5380,15 +5429,15 @@ test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
53805429

53815430
# check whether malloc(0) returns NULL or not
53825431
echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
5383-
echo "configure:5384: checking what malloc(0) returns" >&5
5432+
echo "configure:5433: checking what malloc(0) returns" >&5
53845433
if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
53855434
echo $ac_n "(cached) $ac_c" 1>&6
53865435
else
53875436
if test "$cross_compiling" = yes; then
53885437
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
53895438
else
53905439
cat > conftest.$ac_ext <<EOF
5391-
#line 5392 "configure"
5440+
#line 5441 "configure"
53925441
#include "confdefs.h"
53935442
#include <stdio.h>
53945443
#ifdef HAVE_STDLIB
@@ -5407,7 +5456,7 @@ main() {
54075456
exit(0);
54085457
}
54095458
EOF
5410-
if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5459+
if { (eval echo configure:5460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
54115460
then
54125461
ac_cv_malloc_zero=nonnull
54135462
else
@@ -5433,17 +5482,17 @@ fi
54335482
# check for wchar.h
54345483
ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
54355484
echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
5436-
echo "configure:5437: checking for wchar.h" >&5
5485+
echo "configure:5486: checking for wchar.h" >&5
54375486
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
54385487
echo $ac_n "(cached) $ac_c" 1>&6
54395488
else
54405489
cat > conftest.$ac_ext <<EOF
5441-
#line 5442 "configure"
5490+
#line 5491 "configure"
54425491
#include "confdefs.h"
54435492
#include <wchar.h>
54445493
EOF
54455494
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5446-
{ (eval echo configure:5447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5495+
{ (eval echo configure:5496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
54475496
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
54485497
if test -z "$ac_err"; then
54495498
rm -rf conftest*
@@ -5473,12 +5522,12 @@ fi
54735522
# check for usable wchar_t
54745523
usable_wchar_t="unkown"
54755524
echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
5476-
echo "configure:5477: checking for usable wchar_t" >&5
5525+
echo "configure:5526: checking for usable wchar_t" >&5
54775526
if test "$cross_compiling" = yes; then
54785527
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
54795528
else
54805529
cat > conftest.$ac_ext <<EOF
5481-
#line 5482 "configure"
5530+
#line 5531 "configure"
54825531
#include "confdefs.h"
54835532
54845533
#include "wchar.h"
@@ -5492,7 +5541,7 @@ main() {
54925541
}
54935542
54945543
EOF
5495-
if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5544+
if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
54965545
then
54975546
cat >> confdefs.h <<\EOF
54985547
#define HAVE_USABLE_WCHAR_T 1
@@ -5511,14 +5560,14 @@ echo "$ac_t""$usable_wchar_t" 1>&6
55115560

55125561
# check for endianness
55135562
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
5514-
echo "configure:5515: checking whether byte ordering is bigendian" >&5
5563+
echo "configure:5564: checking whether byte ordering is bigendian" >&5
55155564
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
55165565
echo $ac_n "(cached) $ac_c" 1>&6
55175566
else
55185567
ac_cv_c_bigendian=unknown
55195568
# See if sys/param.h defines the BYTE_ORDER macro.
55205569
cat > conftest.$ac_ext <<EOF
5521-
#line 5522 "configure"
5570+
#line 5571 "configure"
55225571
#include "confdefs.h"
55235572
#include <sys/types.h>
55245573
#include <sys/param.h>
@@ -5529,11 +5578,11 @@ int main() {
55295578
#endif
55305579
; return 0; }
55315580
EOF
5532-
if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5581+
if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
55335582
rm -rf conftest*
55345583
# It does; now see whether it defined to BIG_ENDIAN or not.
55355584
cat > conftest.$ac_ext <<EOF
5536-
#line 5537 "configure"
5585+
#line 5586 "configure"
55375586
#include "confdefs.h"
55385587
#include <sys/types.h>
55395588
#include <sys/param.h>
@@ -5544,7 +5593,7 @@ int main() {
55445593
#endif
55455594
; return 0; }
55465595
EOF
5547-
if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5596+
if { (eval echo configure:5597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
55485597
rm -rf conftest*
55495598
ac_cv_c_bigendian=yes
55505599
else
@@ -5564,7 +5613,7 @@ if test "$cross_compiling" = yes; then
55645613
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
55655614
else
55665615
cat > conftest.$ac_ext <<EOF
5567-
#line 5568 "configure"
5616+
#line 5617 "configure"
55685617
#include "confdefs.h"
55695618
main () {
55705619
/* Are we little or big endian? From Harbison&Steele. */
@@ -5577,7 +5626,7 @@ main () {
55775626
exit (u.c[sizeof (long) - 1] == 1);
55785627
}
55795628
EOF
5580-
if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5629+
if { (eval echo configure:5630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
55815630
then
55825631
ac_cv_c_bigendian=no
55835632
else
@@ -5604,7 +5653,7 @@ fi
56045653
# Check whether right shifting a negative integer extends the sign bit
56055654
# or fills with zeros (like the Cray J90, according to Tim Peters).
56065655
echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
5607-
echo "configure:5608: checking whether right shift extends the sign bit" >&5
5656+
echo "configure:5657: checking whether right shift extends the sign bit" >&5
56085657
if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
56095658
echo $ac_n "(cached) $ac_c" 1>&6
56105659
else
@@ -5613,7 +5662,7 @@ if test "$cross_compiling" = yes; then
56135662
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
56145663
else
56155664
cat > conftest.$ac_ext <<EOF
5616-
#line 5617 "configure"
5665+
#line 5666 "configure"
56175666
#include "confdefs.h"
56185667
56195668
int main()
@@ -5622,7 +5671,7 @@ int main()
56225671
}
56235672
56245673
EOF
5625-
if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5674+
if { (eval echo configure:5675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
56265675
then
56275676
ac_cv_rshift_extends_sign=yes
56285677
else
@@ -5654,12 +5703,12 @@ cat >> confdefs.h <<\EOF
56545703
#endif
56555704
EOF
56565705
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
5657-
echo "configure:5658: checking for socklen_t" >&5
5706+
echo "configure:5707: checking for socklen_t" >&5
56585707
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
56595708
echo $ac_n "(cached) $ac_c" 1>&6
56605709
else
56615710
cat > conftest.$ac_ext <<EOF
5662-
#line 5663 "configure"
5711+
#line 5712 "configure"
56635712
#include "confdefs.h"
56645713
#include <sys/types.h>
56655714
#if STDC_HEADERS

configure.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,10 @@ AC_SUBST(HAVE_GETHOSTBYNAME)
10111011
# (none yet)
10121012

10131013
# Linux requires this for correct f.p. operations
1014-
AC_CHECK_LIB(ieee, __fpu_control)
1014+
AC_CHECK_FUNC(__fpu_control,
1015+
[],
1016+
[AC_CHECK_LIB(ieee, __fpu_control)
1017+
])
10151018

10161019
# Check for --with-fpectl
10171020
AC_MSG_CHECKING(for --with-fpectl)

0 commit comments

Comments
 (0)