From 4dea02ed19873fbd8ee454a1b1147ad10436ab91 Mon Sep 17 00:00:00 2001 From: brian-ch Date: Sun, 14 Feb 2016 18:13:57 +0000 Subject: Only try to include libswresample if it is installed and we have pascal headers for that specific version git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3194 b956fd51-792f-4845-bead-9b4dfca2ff2c --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6a814555..346f0488 100644 --- a/configure.ac +++ b/configure.ac @@ -242,10 +242,14 @@ PKG_HAVE([libswscale], [libswscale], no) PKG_VERSION([libswscale], [libswscale]) AC_SUBST_DEFINE(HAVE_SWSCALE, $libswscale_HAVE) -# find FFMpeg's swresample lib (just if FFMpeg is compiled in GPL mode) -PKG_HAVE([libswresample], [libswresample], no) -PKG_VERSION([libswresample], [libswresample]) -AC_SUBST_DEFINE(HAVE_SWRESAMPLE, $libswresample_HAVE) +# the first swresample header translation was in ffmpeg 2.1 (avutil 52.48.100) +if [[ "$libavutil_VERSION_MAJOR" -gt 52 ]] || ([[ "$libavutil_VERSION_MAJOR" -eq 52 ]] && [[ "$libavutil_VERSION_MINOR" -ge 48 ]]); then + # find FFMpeg's swresample lib (just if FFMpeg is compiled in GPL mode) + PKG_HAVE([libswresample], [libswresample], no) + PKG_VERSION([libswresample], [libswresample]) + AC_SUBST_DEFINE(HAVE_SWRESAMPLE, $libswresample_HAVE) + +fi # find projectM version libprojectM_PKG="libprojectM >= 0.98" -- cgit v1.2.3