summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorGaël Bonithon <gael@xfce.org>2021-12-13 17:39:44 +0100
committerGaël Bonithon <gael@xfce.org>2021-12-13 18:06:27 +0100
commitd82e509551db98ff70e47d1990f759948ee7fecd (patch)
tree3b97d5ef364aa36c5e5fe7e0931c427f50cabc10 /acinclude.m4
parent1de05df20d52fb45e3c06e1d5ff36984341cb55d (diff)
downloadtumbler-d82e509551db98ff70e47d1990f759948ee7fecd.tar.gz
ffmpeg-thumbnailer: Fix deprecation warning
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m414
1 files changed, 13 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 360a8ce..30b2ac9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -118,7 +118,19 @@ if test x"$ac_tumbler_ffmpeg_thumbnailer" = x"yes"; then
PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.14],
[
dnl Check for libffmpegthumbnailer
- PKG_CHECK_MODULES([FFMPEGTHUMBNAILER], [libffmpegthumbnailer >= 2.0.0], [], [ac_tumbler_ffmpeg_thumbnailer=no])
+ FFMPEG_REQUIRED_VERSION="2.0.0"
+ PKG_CHECK_MODULES([FFMPEGTHUMBNAILER], [libffmpegthumbnailer >= $FFMPEG_REQUIRED_VERSION], [
+ dnl To build our own CHECK_VERSION, not provided at least until 2.2.2
+ FFMPEG_VERSION=$($PKG_CONFIG --modversion libffmpegthumbnailer)
+ echo "$FFMPEG_VERSION" | $EGREP ['^[0-9]+\.[0-9]+\.[0-9]+$'] >/dev/null || FFMPEG_VERSION=$FFMPEG_REQUIRED_VERSION
+ FFMPEG_MAJOR_VERSION=${FFMPEG_VERSION%%.*}
+ FFMPEG_MICRO_VERSION=${FFMPEG_VERSION##*.}
+ FFMPEG_MINOR_VERSION=${FFMPEG_VERSION#*.}
+ FFMPEG_MINOR_VERSION=${FFMPEG_MINOR_VERSION%.*}
+ AC_DEFINE_UNQUOTED([TUMBLER_FFMPEG_MAJOR_VERSION], [$FFMPEG_MAJOR_VERSION], [For libffmpegthumbnailer version check])
+ AC_DEFINE_UNQUOTED([TUMBLER_FFMPEG_MINOR_VERSION], [$FFMPEG_MINOR_VERSION], [For libffmpegthumbnailer version check])
+ AC_DEFINE_UNQUOTED([TUMBLER_FFMPEG_MICRO_VERSION], [$FFMPEG_MICRO_VERSION], [For libffmpegthumbnailer version check])
+ ], [ac_tumbler_ffmpeg_thumbnailer=no])
], [ac_tumbler_ffmpeg_thumbnailer=no])
fi