configure: validate DeckLink headers with the C++ compiler

After CFLAGS stopped being passed to the C++ compiler, supplying the
DeckLink SDK include path only through --extra-cflags still passed
configure but failed when building the DeckLink C++ sources.

Compile the DeckLinkAPI.h check as C++ and check the SDK version in both
languages. The C wrappers also include DeckLinkAPIVersion.h, so document
that both --extra-cflags and --extra-cxxflags need the SDK include path.

Fixes: 0ce413af9c
Fixes: #23072

Assisted-by: Fairy
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-10-05 21:02:55 +00:00
1 parent 2da55bf59a
commit 104edd0777
3 files changed
+9 -6

No files matched your search

Vendored
+3 -2
View File
@@ -7193,8 +7193,9 @@ enabled cairo && require_pkg_config cairo cairo "cairo.h" cairo_crea
enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
enabled chromaprint && { check_pkg_config chromaprint libchromaprint "chromaprint.h" chromaprint_get_version ||
require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; }
enabled decklink && { require_headers DeckLinkAPI.h &&
{ test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } }
enabled decklink && { { test_cxxflags_cc "" DeckLinkAPI.h 1 || die "ERROR: DeckLinkAPI.h not found"; } &&
{ test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" &&
test_cxxflags_cc "" DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } }
enabled frei0r && require_headers "frei0r.h"
enabled gmp && require gmp gmp.h mpz_export -lgmp
enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
+3 -2
View File
@@ -240,8 +240,9 @@ The decklink input device provides capture capabilities for Blackmagic
DeckLink devices.
To enable this input device, you need the Blackmagic DeckLink SDK and you
need to configure with the appropriate @code{--extra-cflags}
and @code{--extra-ldflags}.
need to configure with the appropriate @code{--extra-cflags},
@code{--extra-cxxflags} and @code{--extra-ldflags}. The SDK include directory
must be available to both the C and C++ compilers.
On Windows, you need to run the IDL files through @command{widl}.
DeckLink is very picky about the formats it supports. Pixel format of the
+3 -2
View File
@@ -172,8 +172,9 @@ The decklink output device provides playback capabilities for Blackmagic
DeckLink devices.
To enable this output device, you need the Blackmagic DeckLink SDK and you
need to configure with the appropriate @code{--extra-cflags}
and @code{--extra-ldflags}.
need to configure with the appropriate @code{--extra-cflags},
@code{--extra-cxxflags} and @code{--extra-ldflags}. The SDK include directory
must be available to both the C and C++ compilers.
On Windows, you need to run the IDL files through @command{widl}.
DeckLink is very picky about the formats it supports. Pixel format is always