comparison configure @ 33797:d4d29d2329f2

configure: simplify -lm handling Add -lm to extra_ldflags like all other linker flags instead of having a separate variable for it. This simplifies the linker flag handling and should hopefully address Bugzilla #984. Note that this may well have unforeseen sideeffects on strange platforms that I cannot test, but this is clearly the way forward, so any problems will have to fixed as they appear.
author diego
date Wed, 20 Jul 2011 23:54:46 +0000
parents aab87ce93567
children 6a9627d6f8f1
comparison
equal deleted inserted replaced
33796:aab87ce93567 33797:d4d29d2329f2
2960 echores "no" 2960 echores "no"
2961 fi 2961 fi
2962 2962
2963 echocheck "-lm" 2963 echocheck "-lm"
2964 if cflag_check -lm ; then 2964 if cflag_check -lm ; then
2965 _ld_lm="-lm" 2965 extra_ldflags="$extra_ldflags -lm"
2966 echores "yes" 2966 echores "yes"
2967 else 2967 else
2968 _ld_lm=""
2969 echores "no" 2968 echores "no"
2970 fi 2969 fi
2971 2970
2972 2971
2973 echocheck "langinfo" 2972 echocheck "langinfo"
3101 echores "$_posix4" 3100 echores "$_posix4"
3102 3101
3103 for func in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf; do 3102 for func in exp2 exp2f llrint llrintf log2 log2f lrint lrintf round roundf truncf; do
3104 echocheck $func 3103 echocheck $func
3105 eval _$func=no 3104 eval _$func=no
3106 statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE $_ld_lm && eval _$func=yes 3105 statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE && eval _$func=yes
3107 if eval test "x\$_$func" = "xyes"; then 3106 if eval test "x\$_$func" = "xyes"; then
3108 eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\"" 3107 eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 1\""
3109 echores yes 3108 echores yes
3110 else 3109 else
3111 eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\"" 3110 eval def_$func="\"#define HAVE_$(echo $func | tr '[a-z]' '[A-Z]') 0\""
3650 return 0; 3649 return 0;
3651 } 3650 }
3652 EOF 3651 EOF
3653 _iconv=no 3652 _iconv=no
3654 for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do 3653 for _ld_tmp in "" "-liconv" "-liconv $_ld_dl" ; do
3655 cc_check $_ld_lm $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && 3654 cc_check $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" &&
3656 _iconv=yes && break 3655 _iconv=yes && break
3657 done 3656 done
3658 fi 3657 fi
3659 if test "$_iconv" = yes ; then 3658 if test "$_iconv" = yes ; then
3660 def_iconv='#define CONFIG_ICONV 1' 3659 def_iconv='#define CONFIG_ICONV 1'
4682 4681
4683 4682
4684 echocheck "SVGAlib" 4683 echocheck "SVGAlib"
4685 if test "$_svga" = auto ; then 4684 if test "$_svga" = auto ; then
4686 _svga=no 4685 _svga=no
4687 header_check vga.h -lvga $_ld_lm && _svga=yes 4686 header_check vga.h -lvga && _svga=yes
4688 fi 4687 fi
4689 if test "$_svga" = yes ; then 4688 if test "$_svga" = yes ; then
4690 def_svga='#define CONFIG_SVGALIB 1' 4689 def_svga='#define CONFIG_SVGALIB 1'
4691 libs_mplayer="$libs_mplayer -lvga" 4690 libs_mplayer="$libs_mplayer -lvga"
4692 vomodules="svga $vomodules" 4691 vomodules="svga $vomodules"
4823 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING); 4822 printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
4824 printf("libpng: %s\n", png_libpng_ver); 4823 printf("libpng: %s\n", png_libpng_ver);
4825 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver); 4824 return strcmp(PNG_LIBPNG_VER_STRING, png_libpng_ver);
4826 } 4825 }
4827 EOF 4826 EOF
4828 cc_check -lpng -lz $_ld_lm && _png=yes 4827 cc_check -lpng -lz && _png=yes
4829 fi 4828 fi
4830 fi 4829 fi
4831 echores "$_png" 4830 echores "$_png"
4832 if test "$_png" = yes ; then 4831 if test "$_png" = yes ; then
4833 def_png='#define CONFIG_PNG 1' 4832 def_png='#define CONFIG_PNG 1'
4837 fi 4836 fi
4838 4837
4839 echocheck "MNG support" 4838 echocheck "MNG support"
4840 if test "$_mng" = auto ; then 4839 if test "$_mng" = auto ; then
4841 _mng=no 4840 _mng=no
4842 return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz $_ld_lm && _mng=yes 4841 return_statement_check libmng.h 'const char * p_ver = mng_version_text()' '!p_ver || p_ver[0] == 0' -lmng -lz && _mng=yes
4843 fi 4842 fi
4844 echores "$_mng" 4843 echores "$_mng"
4845 if test "$_mng" = yes ; then 4844 if test "$_mng" = yes ; then
4846 def_mng='#define CONFIG_MNG 1' 4845 def_mng='#define CONFIG_MNG 1'
4847 extra_ldflags="$extra_ldflags -lmng -lz" 4846 extra_ldflags="$extra_ldflags -lmng -lz"
4852 fi 4851 fi
4853 4852
4854 echocheck "JPEG support" 4853 echocheck "JPEG support"
4855 if test "$_jpeg" = auto ; then 4854 if test "$_jpeg" = auto ; then
4856 _jpeg=no 4855 _jpeg=no
4857 header_check_broken stdio.h jpeglib.h -ljpeg $_ld_lm && _jpeg=yes 4856 header_check_broken stdio.h jpeglib.h -ljpeg && _jpeg=yes
4858 fi 4857 fi
4859 echores "$_jpeg" 4858 echores "$_jpeg"
4860 4859
4861 if test "$_jpeg" = yes ; then 4860 if test "$_jpeg" = yes ; then
4862 def_jpeg='#define CONFIG_JPEG 1' 4861 def_jpeg='#define CONFIG_JPEG 1'
4869 4868
4870 4869
4871 echocheck "OpenJPEG (JPEG2000) support" 4870 echocheck "OpenJPEG (JPEG2000) support"
4872 if test "$libopenjpeg" = auto ; then 4871 if test "$libopenjpeg" = auto ; then
4873 libopenjpeg=no 4872 libopenjpeg=no
4874 define_statement_check OPJ_STATIC openjpeg.h 'opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params)' -lopenjpeg $_ld_lm && libopenjpeg=yes 4873 define_statement_check OPJ_STATIC openjpeg.h 'opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params)' -lopenjpeg && libopenjpeg=yes
4875 fi 4874 fi
4876 echores "$libopenjpeg" 4875 echores "$libopenjpeg"
4877 if test "$libopenjpeg" = yes ; then 4876 if test "$libopenjpeg" = yes ; then
4878 def_libopenjpeg='#define CONFIG_LIBOPENJPEG 1' 4877 def_libopenjpeg='#define CONFIG_LIBOPENJPEG 1'
4879 extra_ldflags="$extra_ldflags -lopenjpeg" 4878 extra_ldflags="$extra_ldflags -lopenjpeg"
5115 return 0; 5114 return 0;
5116 } 5115 }
5117 EOF 5116 EOF
5118 _gl=no 5117 _gl=no
5119 for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do 5118 for _ld_tmp in "" -lGL "-lGL -lXdamage" "-lGL $_ld_pthread" ; do
5120 if cc_check $_ld_tmp $_ld_lm ; then 5119 if cc_check $_ld_tmp ; then
5121 _gl=yes 5120 _gl=yes
5122 _gl_x11=yes 5121 _gl_x11=yes
5123 libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl" 5122 libs_mplayer="$libs_mplayer $_ld_tmp $_ld_dl"
5124 break 5123 break
5125 fi 5124 fi
5441 5440
5442 5441
5443 echocheck "NAS" 5442 echocheck "NAS"
5444 if test "$_nas" = auto ; then 5443 if test "$_nas" = auto ; then
5445 _nas=no 5444 _nas=no
5446 header_check audio/audiolib.h $_ld_lm -laudio -lXt && _nas=yes 5445 header_check audio/audiolib.h -laudio -lXt && _nas=yes
5447 fi 5446 fi
5448 if test "$_nas" = yes ; then 5447 if test "$_nas" = yes ; then
5449 def_nas='#define CONFIG_NAS 1' 5448 def_nas='#define CONFIG_NAS 1'
5450 libs_mplayer="$libs_mplayer -laudio -lXt" 5449 libs_mplayer="$libs_mplayer -laudio -lXt"
5451 aomodules="nas $aomodules" 5450 aomodules="nas $aomodules"
5885 // This need a better test. How ? 5884 // This need a better test. How ?
5886 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; } 5885 int main(void) { void *test = cdda_verbose_set; return test == (void *)1; }
5887 EOF 5886 EOF
5888 _cdparanoia=no 5887 _cdparanoia=no
5889 for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do 5888 for _inc_tmp in "" "-I/usr/include/cdda" "-I/usr/local/include/cdda" ; do
5890 cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia $_ld_lm && 5889 cc_check $_inc_tmp -lcdda_interface -lcdda_paranoia &&
5891 _cdparanoia=yes && extra_cflags="$extra_cflags $_inc_tmp" && break 5890 _cdparanoia=yes && extra_cflags="$extra_cflags $_inc_tmp" && break
5892 done 5891 done
5893 fi 5892 fi
5894 if test "$_cdparanoia" = yes ; then 5893 if test "$_cdparanoia" = yes ; then
5895 _cdda='yes' 5894 _cdda='yes'
5913 } 5912 }
5914 EOF 5913 EOF
5915 _libcdio=no 5914 _libcdio=no
5916 for _ld_tmp in "" "-lwinmm" ; do 5915 for _ld_tmp in "" "-lwinmm" ; do
5917 _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp" 5916 _ld_tmp="-lcdio_cdda -lcdio -lcdio_paranoia $_ld_tmp"
5918 cc_check $_ld_tmp $_ld_lm && _libcdio=yes && 5917 cc_check $_ld_tmp && _libcdio=yes &&
5919 extra_ldflags="$extra_ldflags $_ld_tmp" && break 5918 extra_ldflags="$extra_ldflags $_ld_tmp" && break
5920 done 5919 done
5921 if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then 5920 if test "$_libcdio" = no && $_pkg_config --exists libcdio_paranoia ; then
5922 _inc_tmp=$($_pkg_config --cflags libcdio_paranoia) 5921 _inc_tmp=$($_pkg_config --cflags libcdio_paranoia)
5923 _ld_tmp=$($_pkg_config --libs libcdio_paranoia) 5922 _ld_tmp=$($_pkg_config --libs libcdio_paranoia)
5924 cc_check $_inc_tmp $_ld_tmp $_ld_lm && _libcdio=yes && 5923 cc_check $_inc_tmp $_ld_tmp && _libcdio=yes &&
5925 extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp" 5924 extra_ldflags="$extra_ldflags $_ld_tmp" && extra_cflags="$extra_cflags $_inc_tmp"
5926 fi 5925 fi
5927 fi 5926 fi
5928 if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then 5927 if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
5929 _cdda='yes' 5928 _cdda='yes'
6139 6138
6140 6139
6141 echocheck "ENCA" 6140 echocheck "ENCA"
6142 if test "$_enca" = auto ; then 6141 if test "$_enca" = auto ; then
6143 _enca=no 6142 _enca=no
6144 statement_check enca.h 'enca_get_languages(NULL)' -lenca $_ld_lm && _enca=yes 6143 statement_check enca.h 'enca_get_languages(NULL)' -lenca && _enca=yes
6145 fi 6144 fi
6146 if test "$_enca" = yes ; then 6145 if test "$_enca" = yes ; then
6147 def_enca='#define CONFIG_ENCA 1' 6146 def_enca='#define CONFIG_ENCA 1'
6148 extra_ldflags="$extra_ldflags -lenca" 6147 extra_ldflags="$extra_ldflags -lenca"
6149 else 6148 else
6235 echores "$_mad" 6234 echores "$_mad"
6236 6235
6237 echocheck "Twolame" 6236 echocheck "Twolame"
6238 if test "$_twolame" = auto ; then 6237 if test "$_twolame" = auto ; then
6239 _twolame=no 6238 _twolame=no
6240 statement_check twolame.h 'twolame_init()' -ltwolame $_ld_lm && _twolame=yes 6239 statement_check twolame.h 'twolame_init()' -ltwolame && _twolame=yes
6241 fi 6240 fi
6242 if test "$_twolame" = yes ; then 6241 if test "$_twolame" = yes ; then
6243 def_twolame='#define CONFIG_TWOLAME 1' 6242 def_twolame='#define CONFIG_TWOLAME 1'
6244 libs_mencoder="$libs_mencoder -ltwolame" 6243 libs_mencoder="$libs_mencoder -ltwolame"
6245 codecmodules="twolame $codecmodules" 6244 codecmodules="twolame $codecmodules"
6253 if test "$_toolame" = auto ; then 6252 if test "$_toolame" = auto ; then
6254 _toolame=no 6253 _toolame=no
6255 if test "$_twolame" = yes ; then 6254 if test "$_twolame" = yes ; then
6256 res_comment="disabled by twolame" 6255 res_comment="disabled by twolame"
6257 else 6256 else
6258 statement_check toolame.h 'toolame_init()' -ltoolame $_ld_lm && _toolame=yes 6257 statement_check toolame.h 'toolame_init()' -ltoolame && _toolame=yes
6259 fi 6258 fi
6260 fi 6259 fi
6261 if test "$_toolame" = yes ; then 6260 if test "$_toolame" = yes ; then
6262 def_toolame='#define CONFIG_TOOLAME 1' 6261 def_toolame='#define CONFIG_TOOLAME 1'
6263 libs_mencoder="$libs_mencoder -ltoolame" 6262 libs_mencoder="$libs_mencoder -ltoolame"
6274 echocheck "OggVorbis support" 6273 echocheck "OggVorbis support"
6275 if test "$_tremor_internal" = yes; then 6274 if test "$_tremor_internal" = yes; then
6276 _libvorbis=no 6275 _libvorbis=no
6277 elif test "$_tremor" = auto; then 6276 elif test "$_tremor" = auto; then
6278 _tremor=no 6277 _tremor=no
6279 statement_check tremor/ivorbiscodec.h 'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec $_ld_lm && _tremor=yes && _libvorbis=no 6278 statement_check tremor/ivorbiscodec.h 'vorbis_packet_blocksize(0, 0)' -logg -lvorbisidec && _tremor=yes && _libvorbis=no
6280 fi 6279 fi
6281 if test "$_libvorbis" = auto; then 6280 if test "$_libvorbis" = auto; then
6282 _libvorbis=no 6281 _libvorbis=no
6283 for vorbislibs in '-lvorbis -logg' '-lvorbis -lvorbisenc -logg' ; do 6282 for vorbislibs in '-lvorbis -logg' '-lvorbis -lvorbisenc -logg' ; do
6284 statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0)' $vorbislibs $_ld_lm && _libvorbis=yes && break 6283 statement_check vorbis/vorbisenc.h 'vorbis_encode_ctl(0, 0, 0)' $vorbislibs && _libvorbis=yes && break
6285 done 6284 done
6286 fi 6285 fi
6287 if test "$_tremor_internal" = yes ; then 6286 if test "$_tremor_internal" = yes ; then
6288 _vorbis=yes 6287 _vorbis=yes
6289 def_vorbis='#define CONFIG_OGGVORBIS 1' 6288 def_vorbis='#define CONFIG_OGGVORBIS 1'
6320 cat > $TMPC << EOF 6319 cat > $TMPC << EOF
6321 #include <stddef.h> 6320 #include <stddef.h>
6322 #include <speex/speex.h> 6321 #include <speex/speex.h>
6323 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; } 6322 int main(void) { SpeexBits bits; void *dec = NULL; speex_decode_int(dec, &bits, dec); return 0; }
6324 EOF 6323 EOF
6325 cc_check -lspeex $_ld_lm && _speex=yes 6324 cc_check -lspeex && _speex=yes
6326 fi 6325 fi
6327 if test "$_speex" = yes ; then 6326 if test "$_speex" = yes ; then
6328 def_speex='#define CONFIG_SPEEX 1' 6327 def_speex='#define CONFIG_SPEEX 1'
6329 extra_ldflags="$extra_ldflags -lspeex" 6328 extra_ldflags="$extra_ldflags -lspeex"
6330 codecmodules="speex $codecmodules" 6329 codecmodules="speex $codecmodules"
6505 6504
6506 echocheck "libdca support" 6505 echocheck "libdca support"
6507 if test "$_libdca" = auto ; then 6506 if test "$_libdca" = auto ; then
6508 _libdca=no 6507 _libdca=no
6509 for _ld_dca in -ldca -ldts ; do 6508 for _ld_dca in -ldca -ldts ; do
6510 statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca $_ld_lm && 6509 statement_check_broken stdint.h dts.h 'dts_init(0)' $_ld_dca &&
6511 extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break 6510 extra_ldflags="$extra_ldflags $_ld_dca" && _libdca=yes && break
6512 done 6511 done
6513 fi 6512 fi
6514 if test "$_libdca" = yes ; then 6513 if test "$_libdca" = yes ; then
6515 def_libdca='#define CONFIG_LIBDCA 1' 6514 def_libdca='#define CONFIG_LIBDCA 1'
6532 mpc_decoder_set_streaminfo(&decoder, &info); 6531 mpc_decoder_set_streaminfo(&decoder, &info);
6533 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL); 6532 mpc_decoder_decode_frame(&decoder, NULL, 0, NULL);
6534 return 0; 6533 return 0;
6535 } 6534 }
6536 EOF 6535 EOF
6537 cc_check -lmpcdec $_ld_lm && _musepack=yes 6536 cc_check -lmpcdec && _musepack=yes
6538 fi 6537 fi
6539 if test "$_musepack" = yes ; then 6538 if test "$_musepack" = yes ; then
6540 def_musepack='#define CONFIG_MUSEPACK 1' 6539 def_musepack='#define CONFIG_MUSEPACK 1'
6541 extra_ldflags="$extra_ldflags -lmpcdec" 6540 extra_ldflags="$extra_ldflags -lmpcdec"
6542 codecmodules="musepack $codecmodules" 6541 codecmodules="musepack $codecmodules"
6554 #include <faac.h> 6553 #include <faac.h>
6555 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; } 6554 int main(void) { unsigned long x, y; faacEncOpen(48000, 2, &x, &y); return 0; }
6556 EOF 6555 EOF
6557 _faac=no 6556 _faac=no
6558 for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do 6557 for _ld_faac in "-lfaac" "-lfaac -lmp4v2 -lstdc++" ; do
6559 cc_check $_ld_faac $_ld_lm && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break 6558 cc_check $_ld_faac && libs_mencoder="$libs_mencoder $_ld_faac" && _faac=yes && break
6560 done 6559 done
6561 fi 6560 fi
6562 if test "$_faac" = yes ; then 6561 if test "$_faac" = yes ; then
6563 def_faac="#define CONFIG_FAAC 1" 6562 def_faac="#define CONFIG_FAAC 1"
6564 test "$_faac_lavc" = auto && _faac_lavc=yes 6563 test "$_faac_lavc" = auto && _faac_lavc=yes
6587 #error Too old version 6586 #error Too old version
6588 #endif 6587 #endif
6589 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; 6588 int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo;
6590 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; } 6589 testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
6591 EOF 6590 EOF
6592 cc_check -lfaad $_ld_lm && _faad=yes 6591 cc_check -lfaad && _faad=yes
6593 fi 6592 fi
6594 6593
6595 def_faad='#undef CONFIG_FAAD' 6594 def_faad='#undef CONFIG_FAAD'
6596 if test "$_faad" = yes ; then 6595 if test "$_faad" = yes ; then
6597 def_faad='#define CONFIG_FAAD 1' 6596 def_faad='#define CONFIG_FAAD 1'
6637 cc_check $_inc_tmp $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" && 6636 cc_check $_inc_tmp $_ld_tmp && extra_ldflags="$extra_ldflags $_ld_tmp" &&
6638 extra_cflags="$extra_cflags $_inc_tmp" && _libbs2b=yes 6637 extra_cflags="$extra_cflags $_inc_tmp" && _libbs2b=yes
6639 else 6638 else
6640 for _inc_tmp in "" -I/usr/include/bs2b -I/usr/local/include \ 6639 for _inc_tmp in "" -I/usr/include/bs2b -I/usr/local/include \
6641 -I/usr/local/include/bs2b ; do 6640 -I/usr/local/include/bs2b ; do
6642 if cc_check $_inc_tmp $_ld_lm -lbs2b ; then 6641 if cc_check $_inc_tmp -lbs2b ; then
6643 extra_ldflags="$extra_ldflags -lbs2b" 6642 extra_ldflags="$extra_ldflags -lbs2b"
6644 extra_cflags="$extra_cflags $_inc_tmp" 6643 extra_cflags="$extra_cflags $_inc_tmp"
6645 _libbs2b=yes 6644 _libbs2b=yes
6646 break 6645 break
6647 fi 6646 fi
6857 if $_pkg_config --exists libavutil ; then 6856 if $_pkg_config --exists libavutil ; then
6858 inc_ffmpeg=$($_pkg_config --cflags libpostproc libswscale libavformat libavcodec libavutil) 6857 inc_ffmpeg=$($_pkg_config --cflags libpostproc libswscale libavformat libavcodec libavutil)
6859 _ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil) 6858 _ld_tmp=$($_pkg_config --libs libpostproc libswscale libavformat libavcodec libavutil)
6860 header_check libavutil/avutil.h $inc_ffmpeg $_ld_tmp && 6859 header_check libavutil/avutil.h $inc_ffmpeg $_ld_tmp &&
6861 extra_ldflags="$extra_ldflags $_ld_tmp" && ffmpeg_so=yes && ffmpeg=yes 6860 extra_ldflags="$extra_ldflags $_ld_tmp" && ffmpeg_so=yes && ffmpeg=yes
6862 elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then 6861 elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil ; then
6863 extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil" 6862 extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil"
6864 ffmpeg_so=yes 6863 ffmpeg_so=yes
6865 ffmpeg=yes 6864 ffmpeg=yes
6866 fi 6865 fi
6867 fi 6866 fi
6934 echores "$_libopencore_amrwb" 6933 echores "$_libopencore_amrwb"
6935 6934
6936 echocheck "libdv-0.9.5+" 6935 echocheck "libdv-0.9.5+"
6937 if test "$_libdv" = auto ; then 6936 if test "$_libdv" = auto ; then
6938 _libdv=no 6937 _libdv=no
6939 statement_check libdv/dv.h 'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread $_ld_lm && _libdv=yes 6938 statement_check libdv/dv.h 'dv_encoder_new(1, 1, 1)' -ldv $_ld_pthread && _libdv=yes
6940 fi 6939 fi
6941 if test "$_libdv" = yes ; then 6940 if test "$_libdv" = yes ; then
6942 def_libdv='#define CONFIG_LIBDV095 1' 6941 def_libdv='#define CONFIG_LIBDV095 1'
6943 extra_ldflags="$extra_ldflags -ldv" 6942 extra_ldflags="$extra_ldflags -ldv"
6944 codecmodules="libdv $codecmodules" 6943 codecmodules="libdv $codecmodules"
6949 echores "$_libdv" 6948 echores "$_libdv"
6950 6949
6951 echocheck "CrystalHD" 6950 echocheck "CrystalHD"
6952 if test "$crystalhd" = auto ; then 6951 if test "$crystalhd" = auto ; then
6953 crystalhd=no 6952 crystalhd=no
6954 statement_check_broken libcrystalhd/bc_dts_types.h libcrystalhd/libcrystalhd_if.h 'DtsCrystalHDVersion(0, 0)' -lcrystalhd $_ld_lm && crystalhd=yes 6953 statement_check_broken libcrystalhd/bc_dts_types.h libcrystalhd/libcrystalhd_if.h 'DtsCrystalHDVersion(0, 0)' -lcrystalhd && crystalhd=yes
6955 fi 6954 fi
6956 6955
6957 if test "$crystalhd" = yes ; then 6956 if test "$crystalhd" = yes ; then
6958 extra_ldflags="$extra_ldflags -lcrystalhd" 6957 extra_ldflags="$extra_ldflags -lcrystalhd"
6959 def_crystalhd="#define CONFIG_CRYSTALHD 1" 6958 def_crystalhd="#define CONFIG_CRYSTALHD 1"
6966 echores "$crystalhd" 6965 echores "$crystalhd"
6967 6966
6968 echocheck "Xvid" 6967 echocheck "Xvid"
6969 if test "$_xvid" = auto ; then 6968 if test "$_xvid" = auto ; then
6970 _xvid=no 6969 _xvid=no
6971 for _ld_tmp in "-lxvidcore $_ld_lm" "-lxvidcore $_ld_lm $_ld_pthread" ; do 6970 for _ld_tmp in "-lxvidcore" "-lxvidcore $_ld_pthread" ; do
6972 statement_check xvid.h 'xvid_global(0, 0, 0, 0)' $_ld_tmp && 6971 statement_check xvid.h 'xvid_global(0, 0, 0, 0)' $_ld_tmp &&
6973 extra_ldflags="$extra_ldflags $_ld_tmp" && _xvid=yes && break 6972 extra_ldflags="$extra_ldflags $_ld_tmp" && _xvid=yes && break
6974 done 6973 done
6975 fi 6974 fi
6976 6975
7006 #error We do not support old versions of x264. Get the latest from git. 7005 #error We do not support old versions of x264. Get the latest from git.
7007 #endif 7006 #endif
7008 int main(void) { x264_encoder_open((void*)0); return 0; } 7007 int main(void) { x264_encoder_open((void*)0); return 0; }
7009 EOF 7008 EOF
7010 _x264=no 7009 _x264=no
7011 for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread $_ld_lm" ; do 7010 for _ld_x264 in "-lx264 $_ld_pthread" "-lx264 $_ld_pthread" ; do
7012 cc_check $_ld_x264 && libs_mencoder="$libs_mencoder $_ld_x264" && _x264=yes && break 7011 cc_check $_ld_x264 && libs_mencoder="$libs_mencoder $_ld_x264" && _x264=yes && break
7013 done 7012 done
7014 fi 7013 fi
7015 7014
7016 if test "$_x264" = yes ; then 7015 if test "$_x264" = yes ; then
7180 def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 0" 7179 def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 0"
7181 def_mp3lame_preset='#undef CONFIG_MP3LAME_PRESET' 7180 def_mp3lame_preset='#undef CONFIG_MP3LAME_PRESET'
7182 def_mp3lame_preset_medium='#undef CONFIG_MP3LAME_PRESET_MEDIUM' 7181 def_mp3lame_preset_medium='#undef CONFIG_MP3LAME_PRESET_MEDIUM'
7183 if test "$_mp3lame" = auto ; then 7182 if test "$_mp3lame" = auto ; then
7184 _mp3lame=no 7183 _mp3lame=no
7185 statement_check lame/lame.h 'lame_set_VBR_quality(NULL, 0)' -lmp3lame $_ld_lm && 7184 statement_check lame/lame.h 'lame_set_VBR_quality(NULL, 0)' -lmp3lame &&
7186 _mp3lame=yes && _mp3lame_lavc=yes 7185 _mp3lame=yes && _mp3lame_lavc=yes
7187 fi 7186 fi
7188 if test "$_mp3lame" = yes ; then 7187 if test "$_mp3lame" = yes ; then
7189 def_mp3lame="#define CONFIG_MP3LAME 1" 7188 def_mp3lame="#define CONFIG_MP3LAME 1"
7190 _ld_mp3lame=-lmp3lame 7189 _ld_mp3lame=-lmp3lame
7191 libs_mencoder="$libs_mencoder $_ld_mp3lame" 7190 libs_mencoder="$libs_mencoder $_ld_mp3lame"
7192 statement_check lame/lame.h 'lame_set_preset(NULL, STANDARD_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET 1" 7191 statement_check lame/lame.h 'lame_set_preset(NULL, STANDARD_FAST)' $_ld_mp3lame && def_mp3lame_preset="#define CONFIG_MP3LAME_PRESET 1"
7193 statement_check lame/lame.h 'lame_set_preset(NULL, MEDIUM_FAST)' $_ld_mp3lame $_ld_lm && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM 1" 7192 statement_check lame/lame.h 'lame_set_preset(NULL, MEDIUM_FAST)' $_ld_mp3lame && def_mp3lame_preset_medium="#define CONFIG_MP3LAME_PRESET_MEDIUM 1"
7194 if test "$_mp3lame_lavc" = yes ; then 7193 if test "$_mp3lame_lavc" = yes ; then
7195 def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1" 7194 def_mp3lame_lavc="#define CONFIG_LIBMP3LAME 1"
7196 libavencoders="$libavencoders LIBMP3LAME_ENCODER" 7195 libavencoders="$libavencoders LIBMP3LAME_ENCODER"
7197 libs_mplayer="$libs_mplayer $_ld_mp3lame" 7196 libs_mplayer="$libs_mplayer $_ld_mp3lame"
7198 fi 7197 fi
7917 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer 7916 CFLAGS_NO_OMIT_LEAF_FRAME_POINTER = $cflags_no_omit_leaf_frame_pointer
7918 CFLAGS_STACKREALIGN = $cflags_stackrealign 7917 CFLAGS_STACKREALIGN = $cflags_stackrealign
7919 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper 7918 CFLAGS_SVGALIB_HELPER = $cflags_svgalib_helper
7920 CFLAGS_TREMOR_LOW = $cflags_tremor_low 7919 CFLAGS_TREMOR_LOW = $cflags_tremor_low
7921 7920
7922 EXTRALIBS = $extra_ldflags $_ld_static $_ld_lm $extra_libs 7921 EXTRALIBS = $extra_ldflags $_ld_static $extra_libs
7923 EXTRALIBS_MPLAYER = $libs_mplayer 7922 EXTRALIBS_MPLAYER = $libs_mplayer
7924 EXTRALIBS_MENCODER = $libs_mencoder 7923 EXTRALIBS_MENCODER = $libs_mencoder
7925 7924
7926 GETCH = $_getch 7925 GETCH = $_getch
7927 HELP_FILE = $_mp_help 7926 HELP_FILE = $_mp_help