Mercurial > mplayer.hg
comparison configure @ 23104:5cf9cb315986
Merge static and shared libavcodec checks.
author | diego |
---|---|
date | Thu, 26 Apr 2007 11:59:26 +0000 |
parents | 257e7eabe459 |
children | e06073016699 |
comparison
equal
deleted
inserted
replaced
23103:257e7eabe459 | 23104:5cf9cb315986 |
---|---|
6180 if test "$_libavutil" = no ; then | 6180 if test "$_libavutil" = no ; then |
6181 die "You need static or shared libavutil, MPlayer will not compile without!" | 6181 die "You need static or shared libavutil, MPlayer will not compile without!" |
6182 fi | 6182 fi |
6183 echores "$_libavutil" | 6183 echores "$_libavutil" |
6184 | 6184 |
6185 echocheck "FFmpeg libavcodec (static)" | 6185 echocheck "FFmpeg libavcodec" |
6186 if test "$_libavcodec_a" = auto ; then | 6186 if test "$_libavcodec_a" = auto ; then |
6187 # Note: static linking is preferred to dynamic linking | 6187 # Note: static linking is preferred to dynamic linking |
6188 _libavcodec=no | 6188 _libavcodec=no |
6189 _res_comment="see DOCS/HTML/$_doc_lang/codecs.html" | 6189 _res_comment="static" |
6190 if test -d libavcodec && test -f libavcodec/utils.c ; then | 6190 if test -d libavcodec && test -f libavcodec/utils.c ; then |
6191 _res_comment="old ffmpeg version, use CVS !" | 6191 _res_comment="old ffmpeg version, use CVS !" |
6192 if grep avcodec_find_encoder_by_name libavcodec/utils.c > /dev/null 2>&1 ; then | 6192 if grep avcodec_find_encoder_by_name libavcodec/utils.c > /dev/null 2>&1 ; then |
6193 # check if libavutil is a required | 6193 # check if libavutil is a required |
6194 cat > $TMPC << EOF | 6194 cat > $TMPC << EOF |
6204 else | 6204 else |
6205 _libavutil_required="yes" | 6205 _libavutil_required="yes" |
6206 fi | 6206 fi |
6207 _res_comment="libavutil availability does not fit libavcodec version" | 6207 _res_comment="libavutil availability does not fit libavcodec version" |
6208 if test "$_libavutil_required" = "$_libavutil_a"; then | 6208 if test "$_libavutil_required" = "$_libavutil_a"; then |
6209 _libavcodec="yes" | |
6210 _libavcodec_a="yes" | 6209 _libavcodec_a="yes" |
6211 _res_comment="" | 6210 _res_comment="" |
6212 fi | 6211 fi |
6213 fi | 6212 fi |
6214 fi | 6213 fi |
6215 fi | 6214 elif test "$_libavcodec_so" = auto ; then |
6216 echores "$_libavcodec_a" | 6215 _libavcodec_so=no |
6216 _res_comment="libavcodec.so is discouraged over static libavcodec" | |
6217 # FIXME : check for avcodec_find_encoder_by_name() for mencoder | |
6218 cat > $TMPC << EOF | |
6219 #include <ffmpeg/avcodec.h> | |
6220 int main(void) { | |
6221 avcodec_find_encoder_by_name(""); | |
6222 return 0; } | |
6223 EOF | |
6224 if $_pkg_config --exists libavcodec ; then | |
6225 _inc_libavcodec=`$_pkg_config --cflags libavcodec` | |
6226 _ld_tmp=`$_pkg_config --libs libavcodec` | |
6227 cc_check $_inc_libavcodec $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6228 && _libavcodec_so=yes | |
6229 elif cc_check -lavcodec $_ld_lm ; then | |
6230 _ld_extra="$_ld_extra -lavcodec" | |
6231 _libavcodec_so=yes | |
6232 _res_comment="using libavcodec.so, but static libavcodec is recommended" | |
6233 fi | |
6234 fi | |
6235 _libavcodec=no | |
6236 test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes | |
6237 echores "$_libavcodec" | |
6217 | 6238 |
6218 echocheck "FFmpeg libavformat (static)" | 6239 echocheck "FFmpeg libavformat (static)" |
6219 if test "$_libavformat_a" = auto ; then | 6240 if test "$_libavformat_a" = auto ; then |
6220 # Note: static linking is preferred to dynamic linking | 6241 # Note: static linking is preferred to dynamic linking |
6221 _libavformat_a=no | 6242 _libavformat_a=no |
6234 _libpostproc_a='yes' | 6255 _libpostproc_a='yes' |
6235 fi | 6256 fi |
6236 fi | 6257 fi |
6237 echores "$_libpostproc_a" | 6258 echores "$_libpostproc_a" |
6238 | 6259 |
6239 | |
6240 if test "$_libavcodec_a" != yes ; then | |
6241 echocheck "FFmpeg libavcodec (dynamic)" | |
6242 if test "$_libavcodec_so" = auto ; then | |
6243 _libavcodec_so=no | |
6244 _res_comment="libavcodec.so is discouraged over static libavcodec" | |
6245 # FIXME : check for avcodec_find_encoder_by_name() for mencoder | |
6246 cat > $TMPC << EOF | |
6247 #include <ffmpeg/avcodec.h> | |
6248 int main(void) { | |
6249 avcodec_find_encoder_by_name(""); | |
6250 return 0; | |
6251 } | |
6252 EOF | |
6253 if $_pkg_config --exists libavcodec ; then | |
6254 _inc_libavcodec=`$_pkg_config --cflags libavcodec` | |
6255 _ld_tmp=`$_pkg_config --libs libavcodec` | |
6256 cc_check $_inc_libavcodec $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6257 && _libavcodec=yes && _libavcodec_so=yes | |
6258 elif cc_check -lavcodec $_ld_lm ; then | |
6259 _ld_extra="$_ld_extra -lavcodec" | |
6260 _libavcodec=yes | |
6261 _libavcodec_so=yes | |
6262 _res_comment="using libavcodec.so, but static libavcodec is recommended" | |
6263 fi | |
6264 fi | |
6265 echores "$_libavcodec_so" | |
6266 fi #if test "$_libavcodec" != yes ; then | |
6267 | 6260 |
6268 if test "$_libavformat_a" != yes ; then | 6261 if test "$_libavformat_a" != yes ; then |
6269 echocheck "FFmpeg libavformat (dynamic)" | 6262 echocheck "FFmpeg libavformat (dynamic)" |
6270 if test "$_libavformat_so" = auto ; then | 6263 if test "$_libavformat_so" = auto ; then |
6271 _libavformat_so=no | 6264 _libavformat_so=no |