diff --git a/build/lol-build b/build/lol-build
index 6c05422e..30d41806 100755
--- a/build/lol-build
+++ b/build/lol-build
@@ -167,6 +167,7 @@ configure()
fi
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/gtkglarea-2.0.1/lib/pkgconfig"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/libcaca-0.99.beta18/lib/pkgconfig"
+ LDFLAGS="$LDFLAGS -L$PWD/external/ffmpeg-20141018/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/glew-1.9.0/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/sdl-2.0.3/lib/i686-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/sdl-image-2.0.0/lib/i686-w64-mingw32"
@@ -192,6 +193,7 @@ configure()
fi
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/gtkglarea-2.0.1/lib/pkgconfig"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PWD/external/libcaca-0.99.beta18/lib/pkgconfig"
+ LDFLAGS="$LDFLAGS -L$PWD/external/ffmpeg-20141018/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/glew-1.9.0/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/sdl-2.0.3/lib/x86_64-w64-mingw32"
LDFLAGS="$LDFLAGS -L$PWD/external/sdl-image-2.0.0/lib/x86_64-mingw32"
@@ -254,6 +256,7 @@ configure()
CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-2.0.3/include"
CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-image-2.0.0/include"
CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-mixer-2.0.0/include"
+ CPPFLAGS="$CPPFLAGS -I$PWD/external/ffmpeg-20141018/include"
CPPFLAGS="$CPPFLAGS -I$PWD/external/glew-1.9.0/include/GL -DGLEW_STATIC"
CPPFLAGS="$CPPFLAGS -I$PWD/external/gtk-2.22.1/lib/glib-2.0/include"
CPPFLAGS="$CPPFLAGS -I$PWD/external/gtk-2.22.1/lib/gtk-2.0/include"
diff --git a/build/msbuild/lol.vars.props b/build/msbuild/lol.vars.props
index 5a69ae94..41d201f8 100644
--- a/build/msbuild/lol.vars.props
+++ b/build/msbuild/lol.vars.props
@@ -27,6 +27,14 @@
$(GtkDir)\lib;$(GtkDir)\bin;$(GtkGlDir)\lib
gobject-2.0.lib;gthread-2.0.lib;glib-2.0.lib;gdk-win32-2.0.lib;gtk-win32-2.0.lib;gtkgl-2.0.lib
+
+ $(ExternalDir)\ffmpeg-20141018
+ $(FfmpegDir)\include
+ $(FfmpegDir)\lib\i686-w64-mingw32
+ $(FfmpegDir)\lib\x86_64-w64-mingw32
+ swscale.lib;avformat.lib;avcodec.lib;swresample.lib;avutil.lib;ws2_32.lib
+ USE_FFMPEG;$(Win32Defines)
+
$(ExternalDir)\libcaca-0.99.beta18
$(CacaDir)\include
@@ -106,6 +114,10 @@
$(GtkIncludes)
$(GtkLibs)
$(GtkDeps)
+ $(FfmpegDir)
+ $(FfmpegIncludes)
+ $(FfmpegLibs)
+ $(FfmpegDeps)
$(CacaDir)
$(CacaIncludes)
$(CacaLibs)
diff --git a/configure.ac b/configure.ac
index 28ab58bf..631281a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -444,10 +444,15 @@ AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
# Use libavcodec? (required for movie encoding)
-ac_cv_my_have_ffmpeg=yes
+ac_cv_my_have_ffmpeg="yes"
PKG_CHECK_MODULES([LIBAVCODEC], [libavcodec], [:], [ac_cv_my_have_ffmpeg=no])
PKG_CHECK_MODULES([LIBAVFORMAT], [libavformat], [:], [ac_cv_my_have_ffmpeg=no])
PKG_CHECK_MODULES([LIBSWSCALE], [libswscale], [:], [ac_cv_my_have_ffmpeg=no])
+if test "${ac_cv_my_have_ffmpeg}" = "no"; then
+ AC_CHECK_HEADERS(libavformat/avformat.h,
+ [ac_cv_my_have_ffmpeg="yes"
+ LOL_LIBS="${LOL_LIBS} -lswscale -lavformat -lavcodec -lswresample -lavutil -lws2_32"])
+fi
if test "${ac_cv_my_have_ffmpeg}" != "no"; then
AC_DEFINE(USE_FFMPEG, 1, Define to 1 to use FFmpeg)
LOL_CFLAGS="${LOL_CFLAGS} ${LIBAVFORMAT_CFLAGS} ${LIBAVCODEC_CFLAGS} ${CFLAGSWSCALE_LIBS}"