The LAME package contains an MP3 encoder and optionally, an MP3 frame analyzer. This is useful for creating and analyzing compressed audio files.
Download (HTTP): https://downloads.sourceforge.net/lame/lame-3.100.tar.gz
Prevent the source code directory from being mistakenly hardcoded as a shared library search path in the installed programs:
sed -i -e 's/^\(\s*hardcode_libdir_flag_spec\s*=\).*/\1/' configure
Install LAME by running the following commands:
./configure --prefix=/usr --enable-mp3rtp --disable-static \ $([ $(uname -m) == "i?86" ] && echo "--enable-nasm") && make
To test the results, issue: LD_LIBRARY_PATH=libmp3lame/.libs make test.
Now, as the root
user:
make pkghtmldir=/usr/share/doc/lame-3.100 install
First clean the directory:
make distclean
Install lib32-LAME by running the following commands:
CC="gcc -m32" CXX="g++ -m32" \ PKG_CONFIG_PATH=/usr/lib32/pkgconfig \ ./configure --prefix=/usr \ --libdir=/usr/lib32 \ --host=i686-pc-linux-gnu \ --enable-mp3rtp \ --disable-static \ --enable-nasm && make
To test the results, issue: LD_LIBRARY_PATH=libmp3lame/.libs make test.
Now, as the root
user:
make DESTDIR=$PWD/DESTDIR install && cp -vr DESTDIR/usr/lib32/* /usr/lib32 && rm -rf DESTDIR && ldconfig
--enable-mp3rtp
: This
switch enables building the encode-to-RTP program.
--disable-static
: This
switch prevents installation of static versions of the libraries.
$([ $(uname -m) == "i?86" ] ...: This checks to see if the CPU architecture is ix86, and if so, it passes the parameter explained below to the configure script.
--enable-nasm
: This option
enables the use of NASM-2.16.03 to compile optimized assembly
routines for 32-bit x86. This is not enabled for x86_64 as it has
no effect.