mirror of https://github.com/odrling/Aegisub
The swscale check was enabling ffmpeg without checking if ffmpeg had been
detected or not. This reworks how ffmpeg is detected and it is now _disabled_ if swscale does not exist. Also fix some nearby style issues. Originally committed to SVN as r2192.
This commit is contained in:
parent
4e334cb1d1
commit
b9e9ab7906
13
configure.in
13
configure.in
|
@ -405,11 +405,11 @@ fi
|
|||
AC_ARG_WITH(ffmpeg, [ --without-ffmpeg build without FFMPEG video provider. (default: auto)], ffmpeg_disabled="(disabled)")
|
||||
|
||||
if test "$with_ffmpeg" != "no"; then
|
||||
AC_CHECK_LIB([avcodec], [avcodec_init],AVCODEC_LDFLAGS="-lavcodec", [with_ffmpeg=no])
|
||||
AC_CHECK_LIB([avformat], [av_read_frame],AVFORMAT_LDFLAGS="-lavformat", [with_ffmpeg=no])
|
||||
AC_CHECK_LIB([avcodec], [avcodec_init],[AVCODEC_LDFLAGS="-lavcodec"; with_ffmpeg="yes"], [with_ffmpeg="no"])
|
||||
AC_CHECK_LIB([avformat], [av_read_frame],[AVFORMAT_LDFLAGS="-lavformat"; with_ffmpeg="yes"], [with_ffmpeg="no"])
|
||||
|
||||
if test "$build_darwin" = "yes"; then
|
||||
AC_CHECK_LIB([avutil], [av_free],[AVUTIL_LDFLAGS="-lavutil"], [with_ffmpeg="no"])
|
||||
AC_CHECK_LIB([avutil], [av_free],[AVUTIL_LDFLAGS="-lavutil"; with_ffmpeg="yes"], [with_ffmpeg="no"])
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB([avformat], [sws_scale],[with_swscale="yes"], [with_swscale="no"])
|
||||
|
@ -417,15 +417,12 @@ if test "$with_ffmpeg" != "no"; then
|
|||
AC_CHECK_LIB([swscale], [sws_scale],[SWSCALE_LDFLAGS="-lswscale"; with_swscale_lib="yes"], [with_swscale_lib="no"])
|
||||
fi
|
||||
|
||||
if test "$with_swscale" = "yes" || test "$with_swscale_lib" = "yes"; then
|
||||
with_ffmpeg="yes";
|
||||
else
|
||||
if test "$with_swscale" = "no" && test "$with_swscale_lib" = "no"; then
|
||||
with_ffmpeg="no";
|
||||
fi
|
||||
|
||||
if test "$with_ffmpeg" = "yes"; then
|
||||
found_video_provider=yes
|
||||
with_ffmpeg="yes"
|
||||
found_video_provider="yes"
|
||||
AC_DEFINE(WITH_FFMPEG, 1, [Enable FFMPEG Video Provider])
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue