[Mplayer-cvslog] CVS: main configure,1.149,1.150

Atmosfear atmos4 at mplayer.dev.hu
Fri Aug 24 16:49:08 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv22957

Modified Files:
	configure 
Log Message:
added memalign detection, maps to malloc if fails.


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- configure	22 Aug 2001 09:26:12 -0000	1.149
+++ configure	24 Aug 2001 14:49:05 -0000	1.150
@@ -908,8 +908,22 @@
 int main( void ) { return 0; }
 EOF
 
+_memalign_def=
 _malloc_h=no
-$_cc -o $TMPO $TMPC 2> /dev/null && _malloc_h=yes
+if $_cc -o $TMPO $TMPC 2> /dev/null ; then
+_malloc_h=yes
+# check for memalign - atmos
+# should this be restricted to x86, or customized for cpu types (opt for cacheline sizes)?
+cat > $TMPC << EOF
+#include <malloc.h>
+int main ( void ) {
+char *string = NULL;
+string = memalign(64, sizeof(char));
+return 0;
+}
+EOF
+$_cc -o $TMPO $TMPC 2> /dev/null || _memalign_def='#define memalign(a,b) malloc(b)'
+fi
 
 
 cat > $TMPC << EOF
@@ -1993,6 +2007,9 @@
 
 /* Define this if your system has the "malloc.h" header file */
 $_have_malloc_h
+
+/* memalign is mapped to malloc here, if unsupported */
+$_memalign_def
 
 /* Define this if your system has the "alloca.h" header file */
 $_have_alloca_h




More information about the MPlayer-cvslog mailing list