shithub: sox

Download patch

ref: f6ec8c25f68b6e86215a406ba8e54623a34f9691
parent: 676fb3cd8f2e0c7433b665a272eada03454c2bd4
author: cbagwell <cbagwell>
date: Sun Jan 9 17:09:49 EST 2011

Updates to osxbuild script to work with 10.6's gcc default compiler
and still build only i386 executables even on x86-64 CPU's.

--- a/osxbuild
+++ b/osxbuild
@@ -13,39 +13,39 @@
 # libraries SoX ships with.
 #
 # cd libtool-2.2.6b
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 # cd libpng-1.2.41
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 # cd ../wavpack-4.60.1
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
-# flac won't compile without following fix.  Edit src/libFLAC/ia32/nasmh and add following
-# to top of that file: %define FLAC__PUBLIC_NEEDS_UNDERSCORE
+# flac won't compile without following fix.  Edit src/libFLAC/ia32/nasm.h and
+# add following to top of that file: %define FLAC__PUBLIC_NEEDS_UNDERSCORE
 # cd ../flac-1.2.1
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CXXFLAGS="-m32 -arch i386" CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 # cd ../libogg-1.1.4
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 # cd ../libvorbis-1.2.3
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 # cd ../libsndfile-1.0.21
-#./configure --disable-shared --enable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --disable-shared --enable-static;make;sudo make install
 #
 #
 # To get MP3 header files used to enable MP3 support (no libraries used):
 #
 # cd ../lame-398-2
-#./configure --enable-shared --disable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --enable-shared --disable-static;make;sudo make install
 #
 # cd ../libid3tag-0.15.1b
-#./configure --enable-shared --disable-static;make;sudo make install
+#./configure CXXFLAGS="-m32 -arch i386" CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --enable-shared --disable-static;make;sudo make install
 #
 # cd ../libmad-0.15.1b
-#./configure --enable-shared --disable-static;make;sudo make install
+#./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --enable-shared --disable-static;make;sudo make install
 
 [ ! -x configure ] && autoreconf -i
 
@@ -60,8 +60,9 @@
     --enable-dl-lame --enable-dl-mad \
     --enable-dl-amrnb --enable-dl-amrwb \
     CPP=cpp\
-    CPPFLAGS=-I/usr/local/include \
-    LDFLAGS="-L/usr/local/lib" \
+    CPPFLAGS="-I/usr/local/include" \
+    CFLAGS="-m32 -arch i386" \
+    LDFLAGS="-L/usr/local/lib -arch i386" \
     $*
 fi