dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
VLC_ADD_LDFLAGS([stream_out_transcode],[]) ],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ])
AC_CHECK_LIB(avformat, av_open_input_stream, [
AC_DEFINE(HAVE_LIBAVFORMAT, 1,
[Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
AC_ARG_WITH(ffmpeg-faac,
[ --with-ffmpeg-faac if ffmpeg has been compiled with faac support],
[
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
VLC_ADD_LDFLAGS([stream_out_transcode],[])
VLC_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
dnl
dnl test for --with-ffmpeg-tree
dnl
if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
if ! test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
dnl The given libavcodec wasn't built
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}])
fi
if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
dnl The given libavcodec wasn't built with --enable-pp
AC_MSG_RESULT(no)
AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodec.a was not compiled with postprocessing support, make sure you configured ffmpeg with --enable-pp])
dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
dnl linker would miserably barf on multiple definitions.
VLC_ADD_LDFLAGS([stream_out_transcode],[]) ],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (cvs version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ])
AC_CHECK_LIB(avformat, av_open_input_stream, [
AC_DEFINE(HAVE_LIBAVFORMAT, 1,
[Define if you have ffmpeg's libavformat.])
VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
dnl test for --with-ffmpeg-tree
dnl
if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}"; then
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
if ! fgrep -s "pp_get_context" "${real_ffmpeg_tree}/libavcodec/libavcodec.a"; then
dnl The given libavcodec wasn't built with --enable-pp
AC_MSG_RESULT(no)
AC_MSG_ERROR([${real_ffmpeg_tree}/libavcodec/libavcodec.a was not compiled with postprocessing support, make sure you configured ffmpeg with --enable-pp])