Commit 39b7c3aa authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Fix ffmpeg include's

parent 5b173c09
...@@ -2739,6 +2739,12 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo ...@@ -2739,6 +2739,12 @@ dnl Those options have to be here because the .pc can be bogus for ffmpeg previo
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a]) VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libavformat ${real_ffmpeg_tree}/libavformat/libavformat.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat]) VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
fi fi
if test -f "${real_ffmpeg_tree}/libswscale/libswscale.a"; then
AC_DEFINE(HAVE_LIBSWSCALE_TREE, 1, [Define if you have ffmpeg's libswscale.])
VLC_ADD_LDFLAGS([ffmpeg],[-L${real_ffmpeg_tree}/libswscale ${real_ffmpeg_tree}/libswscale/libswscale.a])
VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libswscale])
fi
else else
dnl Look for a ffmpeg-config (we are on debian ) dnl Look for a ffmpeg-config (we are on debian )
...@@ -2772,6 +2778,7 @@ dnl Trying with pkg-config ...@@ -2772,6 +2778,7 @@ dnl Trying with pkg-config
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] ) AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
AC_CHECK_HEADERS(ffmpeg/avformat.h) AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h) AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(ffmpeg/swscale.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
if test "${SYS}" = "darwin"; then if test "${SYS}" = "darwin"; then
VLC_ADD_BUILTINS([ffmpeg]) VLC_ADD_BUILTINS([ffmpeg])
...@@ -2806,6 +2813,7 @@ dnl Trying with pkg-config ...@@ -2806,6 +2813,7 @@ dnl Trying with pkg-config
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}" LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] ) AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
AC_CHECK_HEADERS(ffmpeg/avformat.h) AC_CHECK_HEADERS(ffmpeg/avformat.h)
AC_CHECK_HEADERS(ffmpeg/swscale.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h) AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] ) AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
...@@ -2831,6 +2839,11 @@ dnl Trying with pkg-config ...@@ -2831,6 +2839,11 @@ dnl Trying with pkg-config
VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL]) VLC_ADD_LDFLAGS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}" LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
AC_CHECK_LIB(swscale, sws_getContext, [
VLC_ADD_LDFLAGS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
]) ])
fi fi
fi fi
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/* ffmpeg header */ /* ffmpeg header */
#ifdef HAVE_FFMPEG_AVFORMAT_H #ifdef HAVE_FFMPEG_AVFORMAT_H
# include <ffmpeg/avformat.h> # include <ffmpeg/avformat.h>
#else #elif defined(HAVE_LIBAVFORMAT_TREE)
# include <avformat.h> # include <avformat.h>
#endif #endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* ffmpeg header */ /* ffmpeg header */
#ifdef HAVE_FFMPEG_AVFORMAT_H #ifdef HAVE_FFMPEG_AVFORMAT_H
# include <ffmpeg/avformat.h> # include <ffmpeg/avformat.h>
#else #elif defined(HAVE_LIBAVFORMAT_TREE)
# include <avformat.h> # include <avformat.h>
#endif #endif
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#ifdef HAVE_FFMPEG_SWSCALE_H #ifdef HAVE_FFMPEG_SWSCALE_H
# include <ffmpeg/swscale.h> # include <ffmpeg/swscale.h>
#else #elif defined(HAVE_LIBSWSCALE_TREE)
# include <swscale.h> # include <swscale.h>
#endif #endif
......
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