[FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version

Stephen Hutchinson qyot27 at gmail.com
Tue Feb 15 00:03:20 EET 2022


On 2/14/22 6:56 AM, Gyan Doshi wrote:
> 
> 
> On 2022-02-14 05:04 am, Stephen Hutchinson wrote:
>> On 2/8/22 6:02 AM, Stephen Hutchinson wrote:
>>> The headers from version 3.7.1 are needed in order to support
>>> parsing of frame properties. avs/version.h has been generated
>>> as part of the AviSynth+ build process for a long time, but was
>>> never installed with the includes until version 3.7.1a. Checking
>>> for the presence of avs/version.h might have been sufficient,
>>> but a version check mechanism might be useful in the future.
>>>
>>> This does not change the version compatibility with the library
>>> itself; previous 3.x versions of AviSynth+ as well as AviSynth 2.6
>>> can still be used with the demuxer.
>>>
>>> Signed-off-by: Stephen Hutchinson <qyot27 at gmail.com>
>>> ---
>>>   configure | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 493493b4c5..544d341b49 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6508,7 +6508,9 @@ for func in $COMPLEX_FUNCS; do
>>>   done
>>>     # these are off by default, so fail if requested and not available
>>> -enabled avisynth          && require_headers "avisynth/avisynth_c.h"
>>> +enabled avisynth          && { require_headers 
>>> "avisynth/avisynth_c.h avisynth/avs/version.h" &&
>>> +                               { test_cpp_condition 
>>> avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && 
>>> AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || 
>>> AVS_MAJOR_VER > 3" ||
>>> +                                 die "ERROR: AviSynth+ header 
>>> version must be >= 3.7.1"; } }
>>>   enabled cuda_nvcc         && { check_nvcc cuda_nvcc || die "ERROR: 
>>> failed checking for nvcc."; }
>>>   enabled chromaprint       && require chromaprint chromaprint.h 
>>> chromaprint_get_version -lchromaprint
>>>   enabled decklink          && { require_headers DeckLinkAPI.h &&
> 
> The advice for AVS+ dlopen consumers is to only build and install AVS+ 
> headers.
> That does not install version.h and arch.h which are only built with the 
> binary artifacts, not with -DHEADERS_ONLY.
> 
> For my Windows build, I just manually copied and renamed the template 
> files to make configure succeed.
> 
> Regards,
> Gyan

Should be fixed in 
https://github.com/AviSynth/AviSynthPlus/commit/0e583378116c857372232e9886c599df2fb8da85 
with the caveat (noted in AviSynth+'s README.md) that the `make install` 
step now needs to explicitly invoke the VersionGen target, `make 
VersionGen install`.  I fiddled with it for a while, but I couldn't get 
the install process to invoke it automatically.

Related, the older GNUmakefile method is not set up to generate 
version.h and arch.h (especially considering both of those use *.cmake 
scripts), so it's now pretty clearly deprecated.


More information about the ffmpeg-devel mailing list