This is a revised set of instructions to get sox working on OSX with mp3 support. I recently went through the process that I explained in a previous post on a fresh OSX 10.9 Mavericks system. It was quite straightforward to get sox+mp3 working based on those instructions. I realized, though, that some small changes were needed to make it work.
2. Build libmad using the following configure flags:
./configure CFLAGS="-m32 -arch i386" LDFLAGS="-arch i386" --enable-shared --disable-static sudo make sudo make install
3. Build lame using the following configure flags:
4. Build sox with libmad and lame support using the following options:
./configure CFLAGS="-m32 -arch i386" LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/path/to/your/libmad-0.15.1b -I/path/to/your/lame-3.99.5/include" --with-mad --with-lame sudo make -s sudo make install
NOTE: You will need to substitute the “/path/to/your” bit with the real folders where the libmad and lame sources are located on your hard disk (probably in your Downloads/ folder if you didn’t move them).
After running the ./configure line in step #4 you should check the list of optional file formats to make sure that everything went well, i.e. mp3 is now active (“mp3=yes”):
Disclaimer: this may or may not work for you. On my computer the previous steps produce a fully functional sox binary with mp3 encoding/decoding capabilities. Good luck and thanks for your feedback.