aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-09-08 17:12:18 +0200
committerSverker Eriksson <[email protected]>2015-09-11 15:38:53 +0200
commite7df61f5efccd3ca106ebffb598455d0c5ea3dfd (patch)
tree1806f8a7263ba7ea13b442f3a426332459830898
parent7ca6ef08b9cc7f29868afb22db9a67dc1068f12e (diff)
downloadotp-e7df61f5efccd3ca106ebffb598455d0c5ea3dfd.tar.gz
otp-e7df61f5efccd3ca106ebffb598455d0c5ea3dfd.tar.bz2
otp-e7df61f5efccd3ca106ebffb598455d0c5ea3dfd.zip
erts: Refactor config test for posix_memalign
-rw-r--r--erts/configure.in15
1 files changed, 9 insertions, 6 deletions
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)