summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-09-14 16:04:40 -0700
committerMatt Turner <mattst88@gmail.com>2012-09-24 09:45:17 -0700
commit0f3ba405eada72e1ab4371948315b28608903927 (patch)
tree602b87722ca0ce80b78559d2f48e97bbed4b6851 /configure.ac
parent959fe586fb0d64642facffff8c0132777523ed42 (diff)
Use signbit() in IS_NEGATIVE and DIFFERENT_SIGNS
signbit() appears to be available everywhere (even MSVC according to MSDN), so let's use it instead of open-coding some messy and confusing bit twiddling macros. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54805 Reviewed-by: Paul Berry <stereotype441@gmail.com> Suggested-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4193496de95..cb654675833 100644
--- a/configure.ac
+++ b/configure.ac
@@ -499,6 +499,13 @@ AC_SUBST([DLOPEN_LIBS])
dnl See if posix_memalign is available
AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
+dnl signbit() is a macro in glibc's math.h, so AC_CHECK_FUNC fails. To handle
+dnl this, use AC_CHECK_DECLS and fallback to AC_CHECK_FUNC in case it fails.
+AC_CHECK_DECLS([signbit],[],
+ AC_CHECK_FUNC([signbit],[],
+ AC_MSG_ERROR([could not find signbit()])),
+ [#include <math.h>])
+
dnl SELinux awareness.
AC_ARG_ENABLE([selinux],
[AS_HELP_STRING([--enable-selinux],