summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-08-01 16:06:13 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-08-01 16:06:13 +0100
commita78ccf6b7705a8dd0ffbf724c1184b6b5103b4ae (patch)
tree3ab4fec0a17512d7b8ef5594d7af71328f335ecf
parent8a055f4c866e0ae1d677be5fd70aab1b2869d4d2 (diff)
downloadgdk-pixbuf-a78ccf6b7705a8dd0ffbf724c1184b6b5103b4ae.tar.gz
Put back the round and lrint checks
We depend on C99 functions in the math library; if the math library is not found, or if it's not C99-compliant, we have fallbacks in place. Commit 68da550e817b1269d1ccfdeeec2a53ddbd7b920a removed the checks, and we ended up compiling the fallbacks even when the C library provided these symbols — leading to a build error caught by Continuous.
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 46371882d..01438d12f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,8 +96,11 @@ PKG_PROG_PKG_CONFIG
AC_CANONICAL_HOST
+# Check for libm and look for these C99 functions
AC_CHECK_LIBM
AC_SUBST(LIBM)
+AC_CHECK_LIB(m, round, AC_DEFINE(HAVE_ROUND, [1], [Define to 1 if libm has round]))
+AC_CHECK_LIB(m, lrint, AC_DEFINE(HAVE_LRINT, [1], [Define to 1 if libm has lrint]))
AC_MSG_CHECKING([for native Win32])
LIB_EXE_MACHINE_FLAG=X86