tce-load -i automake libtool-dev gettext-dev cd libmad-0.15.1b patch -Np1 -i ../libmad-0.15.1b-fixes-1.patch sed "s@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@g" -i configure.ac touch NEWS AUTHORS ChangeLog autoreconf -fi CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \; make sudo make install cat > /usr/local/pkgconfig/mad.pc << "EOF" prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: mad Description: MPEG audio decoder Requires: Version: 0.15.1b Libs: -L${libdir} -lmad Cflags: -I${includedir} EOF