分类: LINUX
2010-07-31 10:40:17
编译所需的文件有:libmcs-0.7.1 audacious-2.0.1 libmowgli-0.7.0 audacious-plugins-2.0.1 libmad-0.15.1b
先安装alsa
yum install alsa*
假设我们把它安装在/opt/audacious下;
1.先安装libmcs-0.7.1 libmowgli-0.7.0 libmad-0.15.1b
建一个gcc目录
mkdir -p /usr/lib/gcc/i386-redhat-linux
cp -rf /usr/lib/gcc/i686-redhat-linux/4.4.4 /usr/lib/gcc/i386-redhat-linux/4.1.2
a.安装 libmowgli-0.7.0
./configure --prefix=/opt/audacious
make
sudo make install(需要root权限)
b.安装libmcs-0.7.1
先设置环境变量: export PKG_CONFIG_PATH=/opt/audacious/lib/pkgconfig
export LD_LIBRARY_PATH=/opt/audacious/lib(这里最好将audacious的lib路径加入/etc/ld.so.conf 下,这样就不必每次运行audacious都要设置库的路径)
运行:sudo /sbin/ldconf 更新下
./configure --disable-kconfig --prefix=/opt/audacious
make
sudo make install(需要root权限)
c. 安装 libmad-0.15.1b(是audacious播放mp3的插件)
./configure --prefix=/opt/audacious
make
sudo make install(需要root权限)
make 时会出现错误:cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] 错误 1,
解决办法:在makefile里找到这行CFLAGS = -Wall -march=i486 -g -O -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 -fstrength-reduce, 删除-fforce-mem即可。
2.安装 audacious2.3
制作补丁audacious-2.2-libm.patch
--- audacious-2.3-orig/src/audacious/Makefile
+++ audacious-2.3/src/audacious/Makefile
@@ -134,6 +134,7 @@
-I../libaudcore
LIBS += ${LDADD} \
+ -lm \
-L../libaudcore -laudcore \
${LIBINTL} \
../libguess/libguess.a \
执行patch -p1
./configure --prefix=/opt/audacious
make
sudo make install(需要root权限)
3.安装audacious-plugins-2.0.1
./configure --prefix=/opt/audacious --with-libmad=/opt/audacious --with-libmad-libraries=/opt/audacious/lib --with-libmad-includes=/opt/audacious/include --disable-filewriter
make
sudo make install (需要root权限)
至此audacious2.0.1安装成功。
若出现 dir()函数没有声明的错语,刚在对应文件加入以下两行
#include
#include
4.将audacious添加到 应用菜单--影音下
sudo vi /usr/share/applications/audacious.desktop
代码如下:
[Desktop Entry]
Name=Audacious
Comment=Mp3 Player on Linux
Exec=/opt/audacious/bin/audacious2
Icon=/opt/audacious/share/audacious/images/audacious_player.xpm
Terminal=false
Type=Application
Categories=Application;AudioVideo;