contrib: Make sure we don't disable mmx if ld is working on mac os x.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jan 2008 06:25:53 +0000 (06:25 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 6 Jan 2008 06:25:53 +0000 (06:25 +0000)
extras/contrib/bootstrap
extras/contrib/src/Makefile

index 730ef8d..36c1ba8 100755 (executable)
@@ -148,9 +148,13 @@ case $HOST in
         ;;
     i686-apple-darwin9)
         SDK_TARGET=10.4
+        MIN_LD_VERSION_WITH_TEXT_RELOCATION=81
         echo "SDK_TARGET = ${SDK_TARGET}" >> config.mak
         echo "HAVE_DARWIN_OS_ON_INTEL = 1" >> config.mak
         echo "HAVE_DARWIN_9 = 1" >> config.mak
+        if test `ld -v 2> /dev/stdout | sed -E 's/.*ld64-([0-9]+).*/\1/'` -lt ${MIN_LD_VERSION_WITH_TEXT_RELOCATION}; then
+            echo "NO_TEXT_RELOCATION = 1" >> config.mak
+        fi
         echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak
         echo "MACOSX_SDK = /Developer/SDKs/MacOSX10.4u.sdk" >> config.mak
         CFLAGS_TUNING=" -march=pentium-m -mtune=prescott"
index 527c88b..13a5d97 100644 (file)
@@ -147,7 +147,7 @@ ifdef HAVE_DARWIN_OS_ON_INTEL
 FFMPEGCONF += --enable-memalign-hack --cpu=pentium-m
 endif
 
-ifdef HAVE_DARWIN_9
+ifdef NO_TEXT_RELOCATION
 FFMPEGCONF += --disable-mmx
 endif
 
@@ -770,7 +770,7 @@ libtheora: libtheora-$(THEORA_VERSION).tar.bz2
 ifdef HAVE_BEOS
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm --disable-examples && make && make install)
 else
-  ifdef HAVE_DARWIN_9
+  ifdef NO_TEXT_RELOCATION
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-asm --disable-sdltest --disable-oggtest --disable-vorbistest --disable-asm --disable-examples && make && make install)
   else
        (cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-sdltest --disable-oggtest --disable-vorbistest --disable-examples && make && make install)
@@ -1059,11 +1059,9 @@ endif
 ifdef HAVE_DARWIN_OS
        (cd $@; patch -p0 < ../Patches/ffmpeg-macosx-intel-mmx.patch)
 endif
-ifdef HAVE_DARWIN_9
-ifdef HAVE_DARWIN_OS_ON_INTEL
+ifdef NO_TEXT_RELOCATION
        (cd $@; patch -p0 < ../Patches/ffmpeg-svn-mmx_removal-darwin9.patch)
 endif
-endif
 ifdef HAVE_UCLIBC
        patch -p0 < Patches/ffmpeg-svn-uclibc.patch
        patch -p0 < Patches/ffmpeg-svn-internal-define.patch