changeset 28484:6abda55d2574

Add proper check for posix_memalign(), needed for FFmpeg.
author diego
date Tue, 10 Feb 2009 02:01:35 +0000
parents c91145efcde2
children 3f597aacbb69
files configure
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue Feb 10 02:00:45 2009 +0000
+++ b/configure	Tue Feb 10 02:01:35 2009 +0000
@@ -3143,6 +3143,18 @@
 echores "$_memalign"
 
 
+echocheck "posix_memalign()"
+posix_memalign=no
+def_posix_memalign='#define HAVE_POSIX_MEMALIGN 0'
+cat > $TMPC << EOF
+#define _XOPEN_SOURCE 600
+#include <stdlib.h>
+int main(void) { posix_memalign(NULL, 0, 0); }
+EOF
+cc_check && posix_memalign=yes && def_posix_memalign='#define HAVE_POSIX_MEMALIGN 1'
+echores "$posix_memalign"
+
+
 echocheck "alloca.h"
 cat > $TMPC << EOF
 #include <alloca.h>
@@ -8618,6 +8630,7 @@
 $def_memalign_hack
 $def_mlib
 $def_mkstemp
+$def_posix_memalign
 $def_pthreads
 $def_threads
 $def_yasm
@@ -8629,7 +8642,6 @@
 #define CONFIG_HARDCODED_TABLES 0
 #define CONFIG_LIBAMR_NB_FIXED 0
 #define CONFIG_LIBVORBIS 0
-#define CONFIG_POSIX_MEMALIGN 0
 #define CONFIG_POWERPC_PERF 0
 #define CONFIG_SMALL 0
 #define CONFIG_SWSCALE 1