summaryrefslogtreecommitdiffstats
path: root/configure.in.in
diff options
context:
space:
mode:
authoraneejit1 <aneejit1@gmail.com>2022-05-17 12:02:27 +0000
committerSlávek Banko <slavek.banko@axis.cz>2022-05-19 17:40:38 +0200
commit83beb081801183920497d4ac3ee2ef8786911e08 (patch)
tree9f53cf8fa3f1c8a5c060c987a075f4f6985f7829 /configure.in.in
parent6e5bd8f2aecca675dd0d7b1da4cbb06f1044c541 (diff)
downloadk9copy-83beb081.tar.gz
k9copy-83beb081.zip
Implement ffmpeg version 5 support
Version 5.0 of ffmpeg drops a load of deprecated API functions causing k9copy to fail its build. The necessary changes have been made to enable k9copy to build against ffmpeg 5.0 as well as retaining support for older versions. Support for older pre-0.5.1 versions has been dropped as has runtime linking of the ffmpeg libraries. libswscale is now mandatory. Signed-off-by: aneejit1 <aneejit1@gmail.com> (cherry picked from commit e71518b16cb4507712e2bf69e4902fc1689d9995)
Diffstat (limited to 'configure.in.in')
-rw-r--r--configure.in.in34
1 files changed, 2 insertions, 32 deletions
diff --git a/configure.in.in b/configure.in.in
index 1bf34d1..d805c21 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -44,37 +44,7 @@ AC_CHECK_HEADER([GL/gl.h], \
[AC_DEFINE(HAVE_OPENGL, 1, [openGL support]) have_gl=yes], \
[AC_DEFINE(NO_OPENGL, 1, [No openGL support])])
+PKG_CHECK_MODULES(FFMPEG, libavcodec libavformat libavutil libswscale, , \
+ [AC_MSG_ERROR([ffmpeg installation is missing or incomplete])])
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-cxx_flags_safe="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS -I$qt_includes"
-AC_CHECK_HEADER([ffmpeg/avcodec.h], \
-[AC_DEFINE(OLD_FFMPEG,1, [old ffmpeg])], \
- [AC_CHECK_HEADER([libavcodec/avcodec.h], \
- [AC_DEFINE(NEW_FFMPEG,1, [new ffmpeg])], \
- [AC_MSG_ERROR([libavcodec may be missing]) ])])
-CXXFLAGS="$cxx_flags_safe"
-AC_LANG_RESTORE
-
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-cxx_flags_safe="$CXXFLAGS"
-cflags_safe="$CFLAGS"
-CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS -I$qt_includes"
-CFLAGS="$CFLAGS -D__STDC_CONSTANT_MACROS"
-AC_MSG_CHECKING([if libavformat/avformat.h provides av_free_packet])
-AC_TRY_LINK([#include <libavformat/avformat.h>
-],[AVPacket *packet; av_free_packet(packet);],
-AC_MSG_RESULT(yes),
-[AC_MSG_RESULT(no)
-AC_DEFINE(NEEDS_AV_FREE_PACKET,1,[no])])
-CXXFLAGS="$cxx_flags_safe"
-CFLAGS="$cflags_safe"
-AC_LANG_RESTORE
-
-have_swscale=no
-AC_CHECK_HEADER([libswscale/swscale.h], \
-[AC_DEFINE(HAVE_SWSCALE, 1, [swscale support]) have_swscale=yes], \
-[AC_DEFINE(NO_SWSCALE, 1, [No swscale support])])