summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <[email protected]>2008-06-04 13:17:06 -0700
committerDan Nicholson <[email protected]>2008-06-27 16:24:42 -0700
commit985e1cdfe82336d3ce97470eaf98c3c9d54532c8 (patch)
tree4628dfe935d276831f2a6b6b860b8a9b795209b0 /configure.ac
parent3b132b297febf99d7f3989d82f09578471880321 (diff)
autoconf: Check for posix_memalign
Rather than just defining HAVE_POSIX_MEMALIGN on Linux, check whether the function exists on all platforms and define the macro if it is.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c4b65db4ea4..e44f619a751 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ linux*)
if test "x$GCC" = xyes; then
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
fi
- DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN"
+ DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS"
;;
solaris*)
DEFINES="$DEFINES -DPTHREADS -DSVR4"
@@ -325,6 +325,9 @@ dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [],
[AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
+dnl See if posix_memalign is available
+AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
+
dnl SELinux awareness.
AC_ARG_ENABLE([selinux],
[AS_HELP_STRING([--enable-selinux],