summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-09-18 20:21:47 -0700
committerMatt Turner <mattst88@gmail.com>2012-09-27 10:25:20 -0700
commit7da12426f7682ffc44ae40e31d1b5712521fbb70 (patch)
tree939b69c79e58abfe98258a8cdd3d72d3ba8748b7 /configure.ac
parent96f50d0cf7bb13507f272d2f6ef9a6fca24d18e1 (diff)
build: Use AX_PTHREAD to detect pthreads
NOTE: This is a candidate for the 9.0 branch. Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ef2455b099..49cdb8249d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ See docs/autoconf.html for more details on the options for Mesa.])
AC_INIT([Mesa], [9.1.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
AC_CONFIG_AUX_DIR([bin])
+AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign])
@@ -499,6 +500,16 @@ 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 Check for pthreads
+AX_PTHREAD
+
dnl SELinux awareness.
AC_ARG_ENABLE([selinux],
[AS_HELP_STRING([--enable-selinux],