summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure b/configure
index ef489af5..34be9b59 100755
--- a/configure
+++ b/configure
@@ -2675,6 +2675,44 @@ if [ -z "$have_alloca" ] ; then
exit 1
fi
+printf "Checking for malloc-with-alignment function ... "
+
+while true ; do
+ cat > conftest.c <<!
+#include <malloc.h>
+
+int main(void)
+{
+ void *bytes = memalign(16, 42);
+ return 0;
+}
+!
+
+ if ! conftest ; then
+ printf "memalign\n"
+ printf "#define HAVE_MEMALIGN 1\n" $try_header >> config.h
+ break;
+ fi
+
+ cat > conftest.c <<!
+#include <stdlib.h>
+
+int main(void)
+{
+ void *bytes;
+ int res = posix_memalign(&bytes, 16, 42);
+ return 0;
+}
+!
+ if conftest ; then
+ printf "posix_memalign\n"
+ printf "#define HAVE_POSIX_MEMALIGN 1\n" $try_header >> config.h
+ break;
+ fi
+
+ printf "none\n"
+done
+
printf "Checking for termios ... "
cat > conftest.c <<!