Commit 35fa3544 authored by Christophe Massiot's avatar Christophe Massiot

* New --with-ffmpeg option for standard installations.

parent 96ee72f4
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -870,12 +870,19 @@ AC_ARG_ENABLE(ffmpeg,
[ --enable-ffmpeg ffmpeg codec (default disabled)])
if test "x$enable_ffmpeg" = "xyes"
then
AC_ARG_WITH(ffmpeg,
[ --with-ffmpeg=PATH path to ffmpeg installation],[],[])
if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
then
BUILTINS="${BUILTINS} ffmpeg"
ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
fi
AC_ARG_WITH(ffmpeg-tree,
[ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
if test "x$with_ffmpeg_tree" = x
if test "x$with_ffmpeg_tree" != "x"
then
AC_MSG_ERROR([cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a])
else
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
if test "x$real_ffmpeg_tree" = x
......@@ -896,6 +903,17 @@ then
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
else
save_CFLAGS=$CFLAGS
save_LDFLAGS=$LDFLAGS
CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS"
AC_CHECK_LIB(avcodec, avcodec_init,
BUITLINS="${BUILTINS} ffmpeg"
ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec",
[ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
fi
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment