comparison configure @ 3356:2ef511fe1f57

mp3lame detection separated, some unneeded -lm removed
author arpi
date Thu, 06 Dec 2001 22:26:41 +0000
parents c8adf1374d42
children 5125e60fd31d
comparison
equal deleted inserted replaced
3355:dd4d09be63c8 3356:2ef511fe1f57
638 # GOTCHA: the variables below defines the default behavior for autodetection 638 # GOTCHA: the variables below defines the default behavior for autodetection
639 # and have - unless stated otherwise - at least 2 states : yes no 639 # and have - unless stated otherwise - at least 2 states : yes no
640 # If autodetection is available then the third state is: auto 640 # If autodetection is available then the third state is: auto
641 _libavcodec=auto 641 _libavcodec=auto
642 _libavcodecso=no # changed default to no as it causes problems - atmos 642 _libavcodecso=no # changed default to no as it causes problems - atmos
643 _mp3lame=auto
643 _mencoder=auto 644 _mencoder=auto
644 _x11=auto 645 _x11=auto
645 _dga=auto # 1 2 no auto 646 _dga=auto # 1 2 no auto
646 _xv=auto 647 _xv=auto
647 _sdl=auto 648 _sdl=auto
1550 int main(void) { return 0; } 1551 int main(void) { return 0; }
1551 EOF 1552 EOF
1552 _gl=no 1553 _gl=no
1553 if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then 1554 if cc_check $_inc_x11 $_ld_x11 -lGL -lm ; then
1554 _gl=yes 1555 _gl=yes
1555 _ld_gl="-lGL -lm" 1556 _ld_gl="-lGL"
1556 elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then 1557 elif cc_check $_inc_x11 $_ld_x11 -lGL -lm $_ld_pthread ; then
1557 _gl=yes 1558 _gl=yes
1558 _ld_gl="-lGL -lm $_ld_pthread" 1559 _ld_gl="-lGL $_ld_pthread"
1559 fi 1560 fi
1560 else 1561 else
1561 _gl=no 1562 _gl=no
1562 fi 1563 fi
1563 if test "$_gl" = yes ; then 1564 if test "$_gl" = yes ; then
2075 EOF 2076 EOF
2076 cc_check -lvorbis -logg -lm && _vorbis=yes 2077 cc_check -lvorbis -logg -lm && _vorbis=yes
2077 fi 2078 fi
2078 if test "$_vorbis" = yes ; then 2079 if test "$_vorbis" = yes ; then
2079 _def_vorbis='#define HAVE_OGGVORBIS 1' 2080 _def_vorbis='#define HAVE_OGGVORBIS 1'
2080 _ld_vorbis='-lvorbis -logg -lm' 2081 _ld_vorbis='-lvorbis -logg'
2081 else 2082 else
2082 _def_vorbis='#undef HAVE_OGGVORBIS' 2083 _def_vorbis='#undef HAVE_OGGVORBIS'
2083 fi 2084 fi
2084 echores "$_vorbis" 2085 echores "$_vorbis"
2085 2086
2310 _ld_decore='-ldivxdecore opendivx/postprocess.o' 2311 _ld_decore='-ldivxdecore opendivx/postprocess.o'
2311 _codecmodules="divx4linux $_codecmodules" 2312 _codecmodules="divx4linux $_codecmodules"
2312 fi 2313 fi
2313 2314
2314 2315
2315 echocheck "lame and encore (for mencoder)" 2316 echocheck "libmp3lame (for mencoder)"
2317 if test "$_mp3lame" == auto ; then
2318 cat > $TMPC <<EOF
2319 #include <lame/lame.h>
2320 int main(void) { (void) lame_init(); return 0; }
2321 EOF
2322 _mp3lame=no
2323 # Note: libmp3lame usually depends on vorbis
2324 if cc_check -lmp3lame $_ld_vorbis -lm ; then
2325 _mp3lame=yes
2326 fi
2327 fi
2328 if test "$_mp3lame" = yes ; then
2329 _def_mp3lame='#define HAVE_MP3LAME 1'
2330 _ld_mp3lame="-lmp3lame $_ld_vorbis"
2331 else
2332 _def_mp3lame='#undef HAVE_MP3LAME'
2333 fi
2334 echores "$_mp3lame"
2335
2336
2337 echocheck "divx4 encore (for mencoder)"
2316 #mencoder requires those libs 2338 #mencoder requires those libs
2317 if test "$_mencoder" != no ; then 2339 if test "$_mencoder" != no ; then
2318 cat > $TMPC <<EOF 2340 cat > $TMPC <<EOF
2319 #include <encore2.h> 2341 #include <encore2.h>
2320 #include <lame/lame.h> 2342 int main(void) { (void) encore(0, 0, 0, 0); return 0; }
2321 int main(void) { (void) lame_init(); (void) encore(0, 0, 0, 0); return 0; }
2322 EOF 2343 EOF
2323 _mencoder=no 2344 _mencoder=no
2324 if cc_check -lmp3lame -ldivxencore -lm ; then 2345 if cc_check -ldivxencore -lm ; then
2325 _mencoder=yes 2346 _mencoder=yes
2326 _ld_encore='-lmp3lame -ldivxencore -lm' 2347 _ld_encore='-ldivxencore'
2327 elif cc_check -lmp3lame $_ld_vorbis -ldivxencore -lm ; then
2328 _mencoder=yes
2329 _ld_encore="-lmp3lame -ldivxencore -lm $_ld_vorbis"
2330 fi 2348 fi
2331 fi 2349 fi
2332 if test "$_mencoder" = yes ; then 2350 if test "$_mencoder" = yes ; then
2333 _def_encore='#define NEW_ENCORE 1' 2351 _def_encore='#define NEW_ENCORE 1'
2334 else 2352 else
2335 _def_encore='#undef NEW_ENCORE' 2353 _def_encore='#undef NEW_ENCORE'
2336 fi 2354 fi
2337 echores "$_mencoder" 2355 echores "$_mencoder"
2338
2339 2356
2340 echocheck "lirc" 2357 echocheck "lirc"
2341 if test "$_lirc" = auto ; then 2358 if test "$_lirc" = auto ; then
2342 _lirc=no 2359 _lirc=no
2343 if test -c /dev/lirc ; then 2360 if test -c /dev/lirc ; then
2638 AV_LIB = $_ld_libavcodec 2655 AV_LIB = $_ld_libavcodec
2639 ARCH_LIB = $_ld_arch $_ld_iconv 2656 ARCH_LIB = $_ld_arch $_ld_iconv
2640 DIVX4LINUX = $_divx4linux 2657 DIVX4LINUX = $_divx4linux
2641 DECORE_LIB = $_ld_decore 2658 DECORE_LIB = $_ld_decore
2642 MENCODER = $_mencoder 2659 MENCODER = $_mencoder
2643 ENCORE_LIB = $_ld_encore 2660 ENCORE_LIB = $_ld_encore $_ld_mp3lame
2644 DIRECTFB_LIB = $_ld_directfb 2661 DIRECTFB_LIB = $_ld_directfb
2645 2662
2646 # --- Some stuff for autoconfigure ---- 2663 # --- Some stuff for autoconfigure ----
2647 $_target_arch 2664 $_target_arch
2648 $_confcygwin 2665 $_confcygwin
2688 2705
2689 /* Define for using new DivX4Linux library, instead of open-source OpenDivX */ 2706 /* Define for using new DivX4Linux library, instead of open-source OpenDivX */
2690 /* You have to change DECORE_LIBS in config.mak too! */ 2707 /* You have to change DECORE_LIBS in config.mak too! */
2691 $_def_decore 2708 $_def_decore
2692 $_def_encore 2709 $_def_encore
2710
2711 $_def_mp3lame
2693 2712
2694 /* Define this to enable avg. byte/sec-based AVI sync method by default: 2713 /* Define this to enable avg. byte/sec-based AVI sync method by default:
2695 (use -bps or -nobps commandline option for run-time method selection) 2714 (use -bps or -nobps commandline option for run-time method selection)
2696 -bps gives better sync for vbr mp3 audio, it is now default */ 2715 -bps gives better sync for vbr mp3 audio, it is now default */
2697 #define AVI_SYNC_BPS 1 2716 #define AVI_SYNC_BPS 1