[vlc-commits] extras/macosx: added the optimization flags removed from configure.ac

Felix Paul Kühne git at videolan.org
Thu Jun 7 20:09:32 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Jun  7 20:08:41 2012 +0200| [92770fd071b8af4c3483103a8d8c1e37d41c30d1] | committer: Felix Paul Kühne

extras/macosx: added the optimization flags removed from configure.ac

These can be triggered by setting the ARCH variable respectively, which will be done by the OS X build script

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92770fd071b8af4c3483103a8d8c1e37d41c30d1
---

 extras/package/macosx/configure.sh |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/extras/package/macosx/configure.sh b/extras/package/macosx/configure.sh
index e492c09..9ec87e1 100755
--- a/extras/package/macosx/configure.sh
+++ b/extras/package/macosx/configure.sh
@@ -1,5 +1,23 @@
 #!/bin/sh
 
+CFLAGS=${CFLAGS}
+LDFLAGS=${LDFLAGS}
+
+case "${ARCH}" in
+    x86_64*)
+        CFLAGS="${CFLAGS} -m64 -march=core2 -mtune=core2"
+        LDFLAGS="${LDFLAGS} -m64"
+        ;;
+    ppc)
+        CFLAGS="${CFLAGS} -arch ppc -mtune=G4"
+        LDFLAGS="${LDFLAGS} -arch ppc"
+        ;;
+    *x86*)
+        CFLAGS="${CFLAGS} -m32 -march=prescott -mtune=generic"
+        LDFLAGS="${LDFLAGS} -m32"
+        ;;
+esac
+
 OPTIONS="
         --prefix=`pwd`/vlc_install_dir
         --enable-macosx
@@ -25,4 +43,7 @@ OPTIONS="
         --disable-samplerate
 "
 
+export CFLAGS
+export LDFLAGS
+
 sh "$(dirname $0)"/../../../configure ${OPTIONS} $*



More information about the vlc-commits mailing list