Mercurial > mplayer.hg
comparison configure @ 21121:1bf36651b5ab
Attempt to properly fix linking of encoding libs used by libavcodec.
author | diego |
---|---|
date | Tue, 21 Nov 2006 16:00:00 +0000 |
parents | 91314bbab892 |
children | be5bde5397fc |
comparison
equal
deleted
inserted
replaced
21120:f508dff0bd43 | 21121:1bf36651b5ab |
---|---|
5786 #include <inttypes.h> | 5786 #include <inttypes.h> |
5787 #include <faac.h> | 5787 #include <faac.h> |
5788 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } | 5788 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } |
5789 EOF | 5789 EOF |
5790 _faac=no | 5790 _faac=no |
5791 for _ld_tmp in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do | 5791 for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do |
5792 cc_check -c -O4 $_ld_tmp $_ld_lm && _ld_faac="$_ld_tmp" && _faac=yes && break | 5792 cc_check -c -O4 $_ld_tmp $_ld_lm && _libs_mencoder="$_libs_mencoder $_ld_faac" && _faac=yes && break |
5793 done | 5793 done |
5794 fi | 5794 fi |
5795 if test "$_faac" = yes ; then | 5795 if test "$_faac" = yes ; then |
5796 _def_faac="#define HAVE_FAAC 1" | 5796 _def_faac="#define HAVE_FAAC 1" |
5797 if echo $_libavencoders | grep -q faac ; then | 5797 if echo $_libavencoders | grep -q faac ; then |
5798 _lavc_faac=yes | 5798 _lavc_faac=yes |
5799 _def_lavc_faac="#define CONFIG_FAAC 1" | 5799 _def_lavc_faac="#define CONFIG_FAAC 1" |
5800 _libs_mplayer="$_libs_mplayer $_ld_faac" | |
5800 else | 5801 else |
5801 _lavc_faac=no | 5802 _lavc_faac=no |
5802 _def_lavc_faac="#undef CONFIG_FAAC" | 5803 _def_lavc_faac="#undef CONFIG_FAAC" |
5803 fi | 5804 fi |
5804 _codecmodules="faac $_codecmodules" | 5805 _codecmodules="faac $_codecmodules" |
6482 EOF | 6483 EOF |
6483 # Note: libmp3lame usually depends on vorbis | 6484 # Note: libmp3lame usually depends on vorbis |
6484 cc_check -lmp3lame $_ld_vorbis $_ld_lm && tmp_run && _mp3lame=yes | 6485 cc_check -lmp3lame $_ld_vorbis $_ld_lm && tmp_run && _mp3lame=yes |
6485 if test "$_mp3lame" = yes ; then | 6486 if test "$_mp3lame" = yes ; then |
6486 _def_mp3lame="#define HAVE_MP3LAME" | 6487 _def_mp3lame="#define HAVE_MP3LAME" |
6487 _def_lavc_mp3lame="#define CONFIG_MP3LAME 1" | |
6488 _ld_mp3lame="-lmp3lame $_ld_vorbis" | 6488 _ld_mp3lame="-lmp3lame $_ld_vorbis" |
6489 _libs_mencoder="$_libs_mencoder $_ld_mp3lame" | |
6489 cat > $TMPC << EOF | 6490 cat > $TMPC << EOF |
6490 #include <lame/lame.h> | 6491 #include <lame/lame.h> |
6491 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; } | 6492 int main(void) { lame_set_preset(NULL, STANDARD_FAST); return 0; } |
6492 EOF | 6493 EOF |
6493 cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset="#define HAVE_MP3LAME_PRESET" | 6494 cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset="#define HAVE_MP3LAME_PRESET" |
6494 cat > $TMPC << EOF | 6495 cat > $TMPC << EOF |
6495 #include <lame/lame.h> | 6496 #include <lame/lame.h> |
6496 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; } | 6497 int main(void) { lame_set_preset(NULL, MEDIUM_FAST); return 0; } |
6497 EOF | 6498 EOF |
6498 cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define HAVE_MP3LAME_PRESET_MEDIUM" | 6499 cc_check $_ld_mp3lame $_ld_lm && _def_mp3lame_preset_medium="#define HAVE_MP3LAME_PRESET_MEDIUM" |
6499 echo $_libavencoders | grep -q mp3lame && _lavc_mp3lame=yes || _lavc_mp3lame=no | 6500 if echo $_libavencoders | grep -q mp3lame ; then |
6501 _lavc_mp3lame=yes | |
6502 _def_lavc_mp3lame="#define CONFIG_MP3LAME 1" | |
6503 _libs_mplayer="$_libs_mplayer $_ld_mp3lame" | |
6504 else | |
6505 _lavc_mp3lame=no | |
6506 _def_lavc_mp3lame="#undef CONFIG_MP3LAME" | |
6507 fi | |
6500 else | 6508 else |
6501 _def_mp3lame='#undef HAVE_MP3LAME' | 6509 _def_mp3lame='#undef HAVE_MP3LAME' |
6502 fi | 6510 fi |
6503 echores "$_mp3lame" | 6511 echores "$_mp3lame" |
6504 | 6512 |
7357 $_ld_static \ | 7365 $_ld_static \ |
7358 $_ld_lm $_ld_gif \ | 7366 $_ld_lm $_ld_gif \ |
7359 $_ld_vorbis $_ld_theora $_xmms_lib \ | 7367 $_ld_vorbis $_ld_theora $_xmms_lib \ |
7360 $_ld_arch | 7368 $_ld_arch |
7361 EXTRALIBS_MPLAYER = $_libs_mplayer $_ld_x11 $_ld_sock $_ld_static $_ld_gtk $_ld_glib | 7369 EXTRALIBS_MPLAYER = $_libs_mplayer $_ld_x11 $_ld_sock $_ld_static $_ld_gtk $_ld_glib |
7362 EXTRA_LIB_MENCODER = $_libs_mencoder $_ld_mp3lame $_ld_faac | 7370 EXTRA_LIB_MENCODER = $_libs_mencoder |
7363 ifeq ($_lavc_faac,yes) | |
7364 EXTRA_LIB += $_ld_faac | |
7365 endif | |
7366 ifeq ($_lavc_mp3lame,yes) | |
7367 EXTRA_LIB += $_ld_mp3lame | |
7368 endif | |
7369 FREETYPE_LIB = $_ld_freetype | 7371 FREETYPE_LIB = $_ld_freetype |
7370 FONTCONFIG_LIB = $_ld_fontconfig | 7372 FONTCONFIG_LIB = $_ld_fontconfig |
7371 | 7373 |
7372 HAVE_MLIB = $_mlib | 7374 HAVE_MLIB = $_mlib |
7373 HAVE_PTHREADS = $_pthreads | 7375 HAVE_PTHREADS = $_pthreads |
7447 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` | 7449 `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` |
7448 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` | 7450 `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` |
7449 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` | 7451 `echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` |
7450 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` | 7452 `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` |
7451 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` | 7453 `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` |
7452 CONFIG_FAAC=$_faac | 7454 CONFIG_FAAC=$_lavc_faac |
7455 CONFIG_MP3LAME=$_lavc_mp3lame | |
7453 CONFIG_XVID=$_lavc_xvid | 7456 CONFIG_XVID=$_lavc_xvid |
7454 CONFIG_X264=$_x264 | 7457 CONFIG_X264=$_lavc_x264 |
7455 CONFIG_GPL=yes | 7458 CONFIG_GPL=yes |
7456 CONFIG_ENCODERS=$_mencoder | 7459 CONFIG_ENCODERS=$_mencoder |
7457 CONFIG_MUXERS=$_mencoder | 7460 CONFIG_MUXERS=$_mencoder |
7458 RADIO=$_radio | 7461 RADIO=$_radio |
7459 RADIO_CAPTURE=$_radio_capture | 7462 RADIO_CAPTURE=$_radio_capture |