[Ffmpeg-devel] [PATCH] Configure fails on Intel OS X

Nigel Pearson nigel
Mon Jul 24 02:12:46 CEST 2006


Purpose: Fix incorrect configure script exit on Intel OS X
Applies: SVN r5816
Testing: Patch has been in place in MythTV for 4 months
          http://cvs.mythtv.org/trac/changeset/9452
Authors: Mino Taoyama, Nigel Pearson


Discussion: OS X has no memalign(). The malloc() man page says:
DESCRIPTION
      The malloc(), calloc(), valloc(), and realloc() functions allocate 
mem-
      ory.  The allocated memory is aligned such that it can be used for 
any
      data type, including AltiVec-related types.

The patch simply skips the MMX/SSE and memalign() check
when running on OS X/Darwin. An alternative would be to
set memalignhack on this OS, but I think that generates
some extra, un-needed, code.

% svn diff configure | tee patch.osxintel-1.diff
Index: configure
===================================================================
--- configure   (revision 5816)
+++ configure   (working copy)
@@ -1915,7 +1915,8 @@
      check_func memalign || _memalign="no"
  fi

-if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != 
"yes"; then
+if test "$_memalign" = "no" -a "$mmx" = "yes" -a \
+        "$memalignhack" != "yes" -a "$darwin" != "yes" ; then
      die "Error, no memalign() but SSE enabled, disable it or use 
--enable-memalign-hack."
  fi

--
Nigel Pearson, nigel at ind.tansu.com.au|"Beware - I am a carrier
Telstra Net. Eng., Sydney, Australia |          of surrealism"
Office: 9202 3900    Fax:  9261 3912 |       D  A
Mobile: 0408 664435  Home: 9792 6998 |       L  I
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.osxintel-1.diff
Type: application/octet-stream
Size: 508 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060724/e2d92c86/attachment.obj>



More information about the ffmpeg-devel mailing list