Mercurial > mplayer.hg
comparison configure @ 23102:cad9ebe1516c
Merge checks for static and shared libavutil.
author | diego |
---|---|
date | Thu, 26 Apr 2007 11:37:24 +0000 |
parents | 253a6da2be20 |
children | 257e7eabe459 |
comparison
equal
deleted
inserted
replaced
23101:253a6da2be20 | 23102:cad9ebe1516c |
---|---|
6147 _noinputmodules="live555 $_noinputmodules" | 6147 _noinputmodules="live555 $_noinputmodules" |
6148 fi | 6148 fi |
6149 echores "$_live" | 6149 echores "$_live" |
6150 | 6150 |
6151 | 6151 |
6152 echocheck "FFmpeg libavutil (static)" | 6152 echocheck "FFmpeg libavutil" |
6153 if test "$_libavutil_a" = auto ; then | 6153 if test "$_libavutil_a" = auto ; then |
6154 if test -d libavutil ; then | 6154 if test -d libavutil ; then |
6155 _libavutil=yes | |
6156 _libavutil_a=yes | 6155 _libavutil_a=yes |
6156 _res_comment="static" | |
6157 else | 6157 else |
6158 die "MPlayer will not compile without libavutil in the source tree." | 6158 die "MPlayer will not compile without libavutil in the source tree." |
6159 fi | 6159 fi |
6160 fi | 6160 elif test "$_libavutil_so" = auto |
6161 echores "$_libavutil_a" | 6161 _libavutil_so=no |
6162 cat > $TMPC << EOF | |
6163 #include <ffmpeg/common.h> | |
6164 int main(void) { ff_gcd(1,1); return 0; } | |
6165 EOF | |
6166 if $_pkg_config --exists libavutil ; then | |
6167 _inc_libavutil=`$_pkg_config --cflags libavutil` | |
6168 _ld_tmp=`$_pkg_config --libs libavutil` | |
6169 cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6170 && _libavutil_so=yes | |
6171 elif cc_check -lavutil $_ld_lm ; then | |
6172 _ld_extra="$_ld_extra -lavutil" | |
6173 _libavutil_so=yes | |
6174 _res_comment="using libavutil.so, but static libavutil is recommended" | |
6175 fi | |
6176 fi | |
6177 _libavutil=no | |
6178 test "$_libavutil_a" = yes || test "$_libavutil_so" = yes && _libavutil=yes | |
6179 # neither static nor shared libavutil is available, but it is mandatory ... | |
6180 if test "$_libavutil" = no ; then | |
6181 die "You need static or shared libavutil, MPlayer will not compile without!" | |
6182 fi | |
6183 echores "$_libavutil" | |
6162 | 6184 |
6163 echocheck "FFmpeg libavcodec (static)" | 6185 echocheck "FFmpeg libavcodec (static)" |
6164 if test "$_libavcodec_a" = auto ; then | 6186 if test "$_libavcodec_a" = auto ; then |
6165 # Note: static linking is preferred to dynamic linking | 6187 # Note: static linking is preferred to dynamic linking |
6166 _libavcodec=no | 6188 _libavcodec=no |
6212 _libpostproc_a='yes' | 6234 _libpostproc_a='yes' |
6213 fi | 6235 fi |
6214 fi | 6236 fi |
6215 echores "$_libpostproc_a" | 6237 echores "$_libpostproc_a" |
6216 | 6238 |
6217 | |
6218 if test "$_libavutil_a" != yes ; then | |
6219 echocheck "FFmpeg libavutil (dynamic)" | |
6220 if test "$_libavutil_so" = auto ; then | |
6221 _libavutil_so=no | |
6222 cat > $TMPC << EOF | |
6223 #include <ffmpeg/common.h> | |
6224 int main(void) { ff_gcd(1,1); return 0; } | |
6225 EOF | |
6226 if $_pkg_config --exists libavutil ; then | |
6227 _inc_libavutil=`$_pkg_config --cflags libavutil` | |
6228 _ld_tmp=`$_pkg_config --libs libavutil` | |
6229 cc_check $_inc_libavutil $_ld_tmp && _ld_extra="$_ld_extra $_ld_tmp" \ | |
6230 && _libavutil=yes && _libavutil_so=yes | |
6231 elif cc_check -lavutil $_ld_lm ; then | |
6232 _ld_extra="$_ld_extra -lavutil" | |
6233 _libavutil=yes | |
6234 _libavutil_so=yes | |
6235 _res_comment="using libavutil.so, but static libavutil is recommended" | |
6236 fi | |
6237 fi | |
6238 # neither static nor shared libavutil is available, but it is mandatory ... | |
6239 if test "$_libavutil_so" = no ; then | |
6240 die "You need static or shared libavutil, MPlayer will not compile without!" | |
6241 fi | |
6242 echores "$_libavutil_so" | |
6243 fi #if test "$_libavutil" != yes ; then | |
6244 | 6239 |
6245 if test "$_libavcodec_a" != yes ; then | 6240 if test "$_libavcodec_a" != yes ; then |
6246 echocheck "FFmpeg libavcodec (dynamic)" | 6241 echocheck "FFmpeg libavcodec (dynamic)" |
6247 if test "$_libavcodec_so" = auto ; then | 6242 if test "$_libavcodec_so" = auto ; then |
6248 _libavcodec_so=no | 6243 _libavcodec_so=no |