From e7df61f5efccd3ca106ebffb598455d0c5ea3dfd Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 8 Sep 2015 17:12:18 +0200 Subject: erts: Refactor config test for posix_memalign --- erts/configure.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'erts') diff --git a/erts/configure.in b/erts/configure.in index 6950915a6a..25256bcac9 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2084,8 +2084,7 @@ fi case X$erl_xcomp_posix_memalign in Xno) ;; - Xyes) AC_DEFINE(HAVE_POSIX_MEMALIGN,[1], - [Define to 1 if you have the `posix_memalign' function.]) ;; + Xyes) have_posix_memalign=yes ;; *) AC_CHECK_FUNC( [posix_memalign], @@ -2100,15 +2099,19 @@ int main(void) { return error; return 0; } -],AC_DEFINE(HAVE_POSIX_MEMALIGN,[1], - [Define to 1 if you have the `posix_memalign' function.]) +],have_posix_memalign=yes ) else - AC_DEFINE(HAVE_POSIX_MEMALIGN,[1], - [Define to 1 if you have the `posix_memalign' function.]) + have_posix_memalign=yes fi]);; esac +if test $have_posix_memalign = yes; then + AC_DEFINE(HAVE_POSIX_MEMALIGN,[1], + [Define to 1 if you have the `posix_memalign' function.]) +fi + + dnl writev on OS X snow leopard is broken for files > 4GB case $host_os in darwin10.8.0) -- cgit v1.2.3