summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b5c880a..66a8fe3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,7 +55,12 @@ AC_SEARCH_LIBS([iconv_open], [iconv], use_libiconv=true)
AS_IF([test "x$use_libiconv" = xtrue], [
AC_DEFINE(CONFIG_ICONV, 1, [use iconv])
])
-AC_CHECK_LIB([m], [fabs])
+# Locate math functions. Most systems have it either in libc or libm, but a few
+# have some, eg C89, functions in libc and others in libm. Use C99 lrint to probe.
+AC_SEARCH_LIBS([lrint], [m],
+ [],
+ [AC_MSG_ERROR([Unable to locate math functions!])]
+)
pkg_libs="$LIBS"
LIBS="$OLDLIBS $LIBS"