[PPL-devel] [GIT] ppl/ppl(master): Use AC_SEARCH_LIBS to detect whether -lm must be provided to the linker.
Roberto Bagnara
bagnara at cs.unipr.it
Sun Aug 2 18:51:26 CEST 2009
Module: ppl/ppl
Branch: master
Commit: 0d398d757a50f6205581bd43d0c544d1b491b532
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=0d398d757a50f6205581bd43d0c544d1b491b532
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Sun Aug 2 18:37:14 2009 +0200
Use AC_SEARCH_LIBS to detect whether -lm must be provided to the linker.
(Thanks to Joseph Prostko.)
---
configure.ac | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index d1fb09e..1225d53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -713,10 +713,11 @@ AC_CHECK_DECLS([fma,fmaf,fmal,rintf,rintl], , , [#include <cmath>])
# Checks for the availability of "fast" integral types.
AC_CHECK_TYPES([int_fast16_t,int_fast32_t,int_fast64_t,uint_fast16_t,uint_fast32_t,uint_fast64_t])
-# Must link everything with libm.
-extra_libraries="${extra_libraries} -lm"
+# The PPL uses <cmath> for sqrt and other functions in several places.
+AC_SEARCH_LIBS([sqrt], [m])
-# GMP library.
+
+# Checks on the GMP library.
AC_CHECK_GMP
if test x"$have_gmp" = xno
@@ -1483,6 +1484,7 @@ then
fi
fi
+
AC_SUBST(LIBEXT, [$libext])
AC_SUBST(SHREXT, [$shrext_cmds])
AC_SUBST(extra_includes)
More information about the PPL-devel
mailing list