Fix linking issues when HAVE_FEENABLEEXCEPT is set.
authorCyril Brulebois <kibi@debian.org>
Sun, 19 Dec 2010 18:37:26 +0000 (19:37 +0100)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 20 Dec 2010 14:55:07 +0000 (09:55 -0500)
commit45a2d010773d05666e87b7a6502e8fcb25add4eb
tree88cc58e7eac7c77a512061d7e99b5f18349f5546
parent303de045ff21bd5c9cb756d50a41fe4cb8bc97b8
Fix linking issues when HAVE_FEENABLEEXCEPT is set.

All objects using test/util.c fail to link:
|   CCLD   region-test
| /usr/bin/ld: utils.o: in function enable_fp_exceptions:utils.c(.text+0x939): error: undefined reference to 'feenableexcept'

There's indeed no explicit dependency on -lm, and if HAVE_FEENABLEEXCEPT
happens to be set, test/util.c uses feenableexcept(), which is nowhere
to be found while linking.

Fix this by adding -lm to TEST_LDADD, although two alternatives could be
thought of:
 - Only specifying -lm for objects using util.c.
 - Introducing a conditional to add -lm only when configure detects
   have_feenableexcept=yes.

Signed-off-by: Cyril Brulebois <kibi@debian.org>
test/Makefile.am