configure: abort if FFmpeg libraries are not found

Abort if FFmpeg libraries are not found unless --disable-ffmpeg was
explicitly specified. Note that even if you disable FFmpeg, libavutil
and libswscale are still required and you'll need to add linker flags
for them manually; I didn't try to clean up that case (few people
will want to do that).

Also fix the fallback test used if pkg-config doesn't find the
libraries: fix wrong header name and drop forced -lavcore which isn't
present in all FFmpeg versions. This shouldn't make a difference for
normal use since the pkg-config test should succeed if the libraries
are available.
This commit is contained in:
Uoti Urpala 2011-02-08 18:56:37 +02:00
parent e1a8392cae
commit b7e2899655
1 changed files with 4 additions and 2 deletions

6
configure vendored
View File

@ -6077,9 +6077,11 @@ if test "$ffmpeg" = auto ; then
extra_ldflags="$extra_ldflags $_ld_tmp"
extra_cflags="$extra_cflags $inc_ffmpeg"
ffmpeg=yes
elif header_check libavcore/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil -lavcore"
elif header_check libavutil/avutil.h -lpostproc -lswscale -lavformat -lavcodec -lavutil $_ld_lm ; then
extra_ldflags="$extra_ldflags -lpostproc -lswscale -lavformat -lavcodec -lavutil"
ffmpeg=yes
else
die "Unable to find development files for some of the FFmpeg libraries above. Aborting. If you really mean to compile without FFmpeg support use --disable-ffmpeg."
fi
fi