Add a check for avutil, conditional on BUILD_DARWIN which is required on OSX.

Originally committed to SVN as r2155.
This commit is contained in:
Amar Takhar 2008-03-30 06:11:45 +00:00
parent 8b7ddf12aa
commit ad63c0fbac
2 changed files with 10 additions and 1 deletions

View file

@ -12,6 +12,10 @@ aegisub_CPPFLAGS = @FREETYPE_CFLAGS@
aegisub_LDFLAGS = @GL_LIBS@ @PTHREAD_LIBS@ @WX_LIBS@
LIBS += @FREETYPE_LIBS@ @FONTCONFIG_LIBS@
ifdef BUILD_DARWIN
aegisub_LDFLAGS += @AVUTIL_FFMPEG@
endif
if HAVE_ALSA
noinst_LIBRARIES += libaudio_alsa.a
libaudio_alsa_a_SOURCES = audio_player_alsa.cpp

View file

@ -355,8 +355,12 @@ AC_ARG_WITH(ffmpeg, [ --without-ffmpeg build without FFMPEG video provid
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([avformat], [sws_scale],[with_swscale="yes"], [with_swscale="no"])
if test "$build_darwin" = "yes"; then
AC_CHECK_LIB([avutil], [av_free],[AVUTIL_LDFLAGS="-lavutil"], [with_ffmpeg="no"])
fi
AC_CHECK_LIB([avformat], [sws_scale],[with_swscale="yes"], [with_swscale="no"])
if test "$with_swscale" = "no"; then
AC_CHECK_LIB([swscale], [sws_scale],[SWSCALE_LDFLAGS="-lswscale"; with_swscale_lib="yes"], [with_swscale_lib="no"])
fi
@ -378,6 +382,7 @@ fi
AC_SUBST(SWSCALE_LDFLAGS)
AC_SUBST(AVCODEC_LDFLAGS)
AC_SUBST(AVFORMAT_LDFLAGS)
AC_SUBST(AVUTIL_LDFLAGS)
AM_CONDITIONAL([HAVE_FFMPEG], [test "$with_ffmpeg" != "no"])