Browse code

simplify test for memalign emulation requirement

Originally committed as revision 7262 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2006/12/09 05:04:26
Showing 1 changed files
... ...
@@ -707,6 +707,7 @@ bktr="yes"
707 707
 audio_oss="yes"
708 708
 dv1394="no"
709 709
 make="gmake"
710
+need_memalign="no"
710 711
 add_cflags "-pthread"
711 712
 ;;
712 713
 GNU/kFreeBSD)
... ...
@@ -734,6 +735,7 @@ video4linux="no"
734 734
 video4linux2="no"
735 735
 audio_oss="no"
736 736
 dv1394="no"
737
+need_memalign="no"
737 738
 SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(shlibdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
738 739
 VHOOKSHFLAGS='-dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(shlibdir)/vhook/$@'
739 740
 extralibs=""
... ...
@@ -1167,6 +1169,8 @@ if test $mmx = "default"; then
1167 1167
     fi
1168 1168
 fi
1169 1169
 
1170
+test -z "$need_memalign" && need_memalign="$mmx"
1171
+
1170 1172
 #Darwin CC versions
1171 1173
 needmdynamicnopic="no"
1172 1174
 if test $targetos = Darwin; then
... ...
@@ -1415,9 +1419,8 @@ fi
1415 1415
 check_header malloc.h
1416 1416
 check_func memalign
1417 1417
 
1418
-if test "$memalign" = "no" -a "$mmx" = "yes" -a \
1419
-        "$memalign_hack" != "yes" -a "$targetos" != "Darwin" -a \
1420
-        "$targetos" != "FreeBSD" ; then
1418
+if test "$memalign" = "no" -a "$need_memalign" = "yes" -a \
1419
+        "$memalign_hack" != "yes"; then
1421 1420
     die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
1422 1421
 fi
1423 1422