3 # FFmpeg configure script
5 # Copyright (c) 2000-2002 Fabrice Bellard
6 # Copyright (c) 2005-2008 Diego Biurrun
7 # Copyright (c) 2005-2008 Mans Rullgard
10 # Prevent locale nonsense from breaking basic text processing.
14 # make sure we are running under a compatible shell
15 # try to make this part work with most shells
18 echo "Trying shell $1"
19 type "$1" > /dev
/null
2>&1 && exec "$@"
23 (: ${foo%%bar}) 2> /dev
/null
26 (: ${foo?}) 2> /dev
/null
29 if test "$E1" != 0 ||
test "$E2" = 0; then
30 echo "Broken shell detected. Trying alternatives."
32 if test "0$FF_CONF_EXEC" -lt 1; then
34 try_exec bash
"$0" "$@"
36 if test "0$FF_CONF_EXEC" -lt 2; then
38 try_exec ksh
"$0" "$@"
40 if test "0$FF_CONF_EXEC" -lt 3; then
42 try_exec
/usr
/xpg
4/bin
/sh
"$0" "$@"
44 echo "No compatible shell script interpreter found."
45 echo "This configure script requires a POSIX-compatible shell"
46 echo "such as bash or ksh."
47 echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH."
48 echo "Instead, install a working POSIX-compatible shell."
49 echo "Disabling this configure test will create a broken FFmpeg."
50 if test "$BASH_VERSION" = '2.04.0(1)-release'; then
51 echo "This bash version ($BASH_VERSION) is broken on your platform."
52 echo "Upgrade to a later version if available."
57 test -d /usr
/xpg
4/bin
&& PATH
=/usr
/xpg
4/bin
:$PATH
61 Usage: configure [options]
62 Options: [defaults in brackets after descriptions]
65 --help print this message
66 --quiet Suppress showing informative output
67 --list-decoders show all available decoders
68 --list-encoders show all available encoders
69 --list-hwaccels show all available hardware accelerators
70 --list-demuxers show all available demuxers
71 --list-muxers show all available muxers
72 --list-parsers show all available parsers
73 --list-protocols show all available protocols
74 --list-bsfs show all available bitstream filters
75 --list-indevs show all available input devices
76 --list-outdevs show all available output devices
77 --list-filters show all available filters
80 --logfile=FILE log tests and output to FILE [ffbuild/config.log]
81 --disable-logging do not log configure debug information
82 --fatal-warnings fail if any configure warning is generated
83 --prefix=PREFIX install in PREFIX [$prefix_default]
84 --bindir=DIR install binaries in DIR [PREFIX/bin]
85 --datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
86 --docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg]
87 --libdir=DIR install libs in DIR [PREFIX/lib]
88 --shlibdir=DIR install shared libs in DIR [LIBDIR]
89 --incdir=DIR install includes in DIR [PREFIX/include]
90 --mandir=DIR install man page in DIR [PREFIX/share/man]
91 --pkgconfigdir=DIR install pkg-config files in DIR [LIBDIR/pkgconfig]
92 --enable-rpath use rpath to allow installing libraries in paths
93 not part of the dynamic linker search path
94 use rpath when linking programs (USE WITH CARE)
95 --install-name-dir=DIR Darwin directory name for installed targets
98 --enable-gpl allow use of GPL code, the resulting libs
99 and binaries will be under GPL [no]
100 --enable-version3 upgrade (L)GPL to version 3 [no]
101 --enable-nonfree allow use of nonfree code, the resulting libs
102 and binaries will be unredistributable [no]
104 Configuration options:
105 --disable-static do not build static libraries [no]
106 --enable-shared build shared libraries [no]
107 --enable-small optimize for size instead of speed
108 --disable-runtime-cpudetect disable detecting CPU capabilities at runtime (smaller binary)
109 --enable-gray enable full grayscale support (slower color)
110 --disable-swscale-alpha disable alpha channel support in swscale
111 --disable-all disable building components, libraries and programs
112 --disable-autodetect disable automatically detected external libraries [no]
115 --disable-programs do not build command line programs
116 --disable-ffmpeg disable ffmpeg build
117 --disable-ffplay disable ffplay build
118 --disable-ffprobe disable ffprobe build
120 Documentation options:
121 --disable-doc do not build documentation
122 --disable-htmlpages do not build HTML documentation pages
123 --disable-manpages do not build man documentation pages
124 --disable-podpages do not build POD documentation pages
125 --disable-txtpages do not build text documentation pages
128 --disable-avdevice disable libavdevice build
129 --disable-avcodec disable libavcodec build
130 --disable-avformat disable libavformat build
131 --disable-swresample disable libswresample build
132 --disable-swscale disable libswscale build
133 --disable-postproc disable libpostproc build
134 --disable-avfilter disable libavfilter build
135 --disable-pthreads disable pthreads [autodetect]
136 --disable-w32threads disable Win32 threads [autodetect]
137 --disable-os2threads disable OS/2 threads [autodetect]
138 --disable-network disable network support [no]
139 --disable-dwt disable DWT code
140 --disable-error-resilience disable error resilience code
141 --disable-lsp disable LSP code
142 --disable-faan disable floating point AAN (I)DCT code
143 --disable-iamf disable support for Immersive Audio Model
144 --disable-pixelutils disable pixel utils in libavutil
146 Individual component options:
147 --disable-everything disable all components listed below
148 --disable-encoder=NAME disable encoder NAME
149 --enable-encoder=NAME enable encoder NAME
150 --disable-encoders disable all encoders
151 --disable-decoder=NAME disable decoder NAME
152 --enable-decoder=NAME enable decoder NAME
153 --disable-decoders disable all decoders
154 --disable-hwaccel=NAME disable hwaccel NAME
155 --enable-hwaccel=NAME enable hwaccel NAME
156 --disable-hwaccels disable all hwaccels
157 --disable-muxer=NAME disable muxer NAME
158 --enable-muxer=NAME enable muxer NAME
159 --disable-muxers disable all muxers
160 --disable-demuxer=NAME disable demuxer NAME
161 --enable-demuxer=NAME enable demuxer NAME
162 --disable-demuxers disable all demuxers
163 --enable-parser=NAME enable parser NAME
164 --disable-parser=NAME disable parser NAME
165 --disable-parsers disable all parsers
166 --enable-bsf=NAME enable bitstream filter NAME
167 --disable-bsf=NAME disable bitstream filter NAME
168 --disable-bsfs disable all bitstream filters
169 --enable-protocol=NAME enable protocol NAME
170 --disable-protocol=NAME disable protocol NAME
171 --disable-protocols disable all protocols
172 --enable-indev=NAME enable input device NAME
173 --disable-indev=NAME disable input device NAME
174 --disable-indevs disable input devices
175 --enable-outdev=NAME enable output device NAME
176 --disable-outdev=NAME disable output device NAME
177 --disable-outdevs disable output devices
178 --disable-devices disable all devices
179 --enable-filter=NAME enable filter NAME
180 --disable-filter=NAME disable filter NAME
181 --disable-filters disable all filters
183 External library support:
185 Using any of the following switches will allow FFmpeg to link to the
186 corresponding external library. All the components depending on that library
187 will become enabled, if all their other dependencies are met and they are not
188 explicitly disabled. E.g. --enable-libopus will enable linking to
189 libopus and allow the libopus encoder to be built, unless it is
190 specifically disabled with --disable-encoder=libopus.
192 Note that only the system libraries are auto-detected. All the other external
193 libraries must be explicitly enabled.
195 Also note that the following help text describes the purpose of the libraries
196 themselves, not all their features will necessarily be usable by FFmpeg.
198 --disable-alsa disable ALSA support [autodetect]
199 --disable-appkit disable Apple AppKit framework [autodetect]
200 --disable-avfoundation disable Apple AVFoundation framework [autodetect]
201 --enable-avisynth enable reading of AviSynth script files [no]
202 --disable-bzlib disable bzlib [autodetect]
203 --disable-coreimage disable Apple CoreImage framework [autodetect]
204 --enable-chromaprint enable audio fingerprinting with chromaprint [no]
205 --enable-frei0r enable frei0r video filtering [no]
206 --enable-gcrypt enable gcrypt, needed for rtmp(t)e support
207 if openssl, librtmp or gmp is not used [no]
208 --enable-gmp enable gmp, needed for rtmp(t)e support
209 if openssl or librtmp is not used [no]
210 --enable-gnutls enable gnutls, needed for https support
211 if openssl, libtls or mbedtls is not used [no]
212 --disable-iconv disable iconv [autodetect]
213 --enable-jni enable JNI support [no]
214 --enable-ladspa enable LADSPA audio filtering [no]
215 --enable-lcms2 enable ICC profile support via LittleCMS 2 [no]
216 --enable-libaom enable AV1 video encoding/decoding via libaom [no]
217 --enable-libaribb24 enable ARIB text and caption decoding via libaribb24 [no]
218 --enable-libaribcaption enable ARIB text and caption decoding via libaribcaption [no]
219 --enable-libass enable libass subtitles rendering,
220 needed for subtitles and ass filter [no]
221 --enable-libbluray enable BluRay reading using libbluray [no]
222 --enable-libbs2b enable bs2b DSP library [no]
223 --enable-libcaca enable textual display using libcaca [no]
224 --enable-libcelt enable CELT decoding via libcelt [no]
225 --enable-libcdio enable audio CD grabbing with libcdio [no]
226 --enable-libcodec2 enable codec2 en/decoding using libcodec2 [no]
227 --enable-libdav1d enable AV1 decoding via libdav1d [no]
228 --enable-libdavs2 enable AVS2 decoding via libdavs2 [no]
229 --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
231 --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no]
232 --enable-libdvdread enable libdvdread, needed for DVD demuxing [no]
233 --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
234 --enable-libflite enable flite (voice synthesis) support via libflite [no]
235 --enable-libfontconfig enable libfontconfig, useful for drawtext filter [no]
236 --enable-libfreetype enable libfreetype, needed for drawtext filter [no]
237 --enable-libfribidi enable libfribidi, improves drawtext filter [no]
238 --enable-libharfbuzz enable libharfbuzz, needed for drawtext filter [no]
239 --enable-libglslang enable GLSL->SPIRV compilation via libglslang [no]
240 --enable-libgme enable Game Music Emu via libgme [no]
241 --enable-libgsm enable GSM de/encoding via libgsm [no]
242 --enable-libiec61883 enable iec61883 via libiec61883 [no]
243 --enable-libilbc enable iLBC de/encoding via libilbc [no]
244 --enable-libjack enable JACK audio sound server [no]
245 --enable-libjxl enable JPEG XL de/encoding via libjxl [no]
246 --enable-libklvanc enable Kernel Labs VANC processing [no]
247 --enable-libkvazaar enable HEVC encoding via libkvazaar [no]
248 --enable-liblc3 enable LC3 de/encoding via liblc3 [no]
249 --enable-liblcevc-dec enable LCEVC decoding via liblcevc-dec [no]
250 --enable-liblensfun enable lensfun lens correction [no]
251 --enable-libmodplug enable ModPlug via libmodplug [no]
252 --enable-libmp3lame enable MP3 encoding via libmp3lame [no]
253 --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
254 --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
255 --enable-libopencv enable video filtering via libopencv [no]
256 --enable-libopenh264 enable H.264 encoding via OpenH264 [no]
257 --enable-libopenjpeg enable JPEG 2000 encoding via OpenJPEG [no]
258 --enable-libopenmpt enable decoding tracked files via libopenmpt [no]
259 --enable-libopenvino enable OpenVINO as a DNN module backend
260 for DNN based filters like dnn_processing [no]
261 --enable-libopus enable Opus de/encoding via libopus [no]
262 --enable-libplacebo enable libplacebo library [no]
263 --enable-libpulse enable Pulseaudio input via libpulse [no]
264 --enable-libqrencode enable QR encode generation via libqrencode [no]
265 --enable-libquirc enable QR decoding via libquirc [no]
266 --enable-librabbitmq enable RabbitMQ library [no]
267 --enable-librav1e enable AV1 encoding via rav1e [no]
268 --enable-librist enable RIST via librist [no]
269 --enable-librsvg enable SVG rasterization via librsvg [no]
270 --enable-librubberband enable rubberband needed for rubberband filter [no]
271 --enable-librtmp enable RTMP[E] support via librtmp [no]
272 --enable-libshaderc enable GLSL->SPIRV compilation via libshaderc [no]
273 --enable-libshine enable fixed-point MP3 encoding via libshine [no]
274 --enable-libsmbclient enable Samba protocol via libsmbclient [no]
275 --enable-libsnappy enable Snappy compression, needed for hap encoding [no]
276 --enable-libsoxr enable Include libsoxr resampling [no]
277 --enable-libspeex enable Speex de/encoding via libspeex [no]
278 --enable-libsrt enable Haivision SRT protocol via libsrt [no]
279 --enable-libssh enable SFTP protocol via libssh [no]
280 --enable-libsvtav1 enable AV1 encoding via SVT [no]
281 --enable-libtensorflow enable TensorFlow as a DNN module backend
282 for DNN based filters like sr [no]
283 --enable-libtesseract enable Tesseract, needed for ocr filter [no]
284 --enable-libtheora enable Theora encoding via libtheora [no]
285 --enable-libtls enable LibreSSL (via libtls), needed for https support
286 if openssl, gnutls or mbedtls is not used [no]
287 --enable-libtorch enable Torch as one DNN backend [no]
288 --enable-libtwolame enable MP2 encoding via libtwolame [no]
289 --enable-libuavs3d enable AVS3 decoding via libuavs3d [no]
290 --enable-libv4l2 enable libv4l2/v4l-utils [no]
291 --enable-libvidstab enable video stabilization using vid.stab [no]
292 --enable-libvmaf enable vmaf filter via libvmaf [no]
293 --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
294 --enable-libvorbis enable Vorbis en/decoding via libvorbis,
295 native implementation exists [no]
296 --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
297 --enable-libvvenc enable H.266/VVC encoding via vvenc [no]
298 --enable-libwebp enable WebP encoding via libwebp [no]
299 --enable-libx264 enable H.264 encoding via x264 [no]
300 --enable-libx265 enable HEVC encoding via x265 [no]
301 --enable-libxeve enable EVC encoding via libxeve [no]
302 --enable-libxevd enable EVC decoding via libxevd [no]
303 --enable-libxavs enable AVS encoding via xavs [no]
304 --enable-libxavs2 enable AVS2 encoding via xavs2 [no]
305 --enable-libxcb enable X11 grabbing using XCB [autodetect]
306 --enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
307 --enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
308 --enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
309 --enable-libxvid enable Xvid encoding via xvidcore,
310 native MPEG-4/Xvid encoder exists [no]
311 --enable-libxml2 enable XML parsing using the C library libxml2, needed
312 for dash and imf demuxing support [no]
313 --enable-libzimg enable z.lib, needed for zscale filter [no]
314 --enable-libzmq enable message passing via libzmq [no]
315 --enable-libzvbi enable teletext support via libzvbi [no]
316 --enable-lv2 enable LV2 audio filtering [no]
317 --disable-lzma disable lzma [autodetect]
318 --enable-decklink enable Blackmagic DeckLink I/O support [no]
319 --enable-mbedtls enable mbedTLS, needed for https support
320 if openssl, gnutls or libtls is not used [no]
321 --enable-mediacodec enable Android MediaCodec support [no]
322 --enable-mediafoundation enable encoding via MediaFoundation [auto]
323 --disable-metal disable Apple Metal framework [autodetect]
324 --enable-libmysofa enable libmysofa, needed for sofalizer filter [no]
325 --enable-openal enable OpenAL 1.1 capture support [no]
326 --enable-opencl enable OpenCL processing [no]
327 --enable-opengl enable OpenGL rendering [no]
328 --enable-openssl enable openssl, needed for https support
329 if gnutls, libtls or mbedtls is not used [no]
330 --enable-pocketsphinx enable PocketSphinx, needed for asr filter [no]
331 --disable-sndio disable sndio support [autodetect]
332 --disable-schannel disable SChannel SSP, needed for TLS support on
333 Windows if openssl and gnutls are not used [autodetect]
334 --disable-sdl2 disable sdl2 [autodetect]
335 --disable-securetransport disable Secure Transport, needed for TLS support
336 on OSX if openssl and gnutls are not used [autodetect]
337 --enable-vapoursynth enable VapourSynth demuxer [no]
338 --disable-xlib disable xlib [autodetect]
339 --disable-zlib disable zlib [autodetect]
341 The following libraries provide various hardware acceleration features:
342 --disable-amf disable AMF video encoding code [autodetect]
343 --disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
344 --enable-cuda-nvcc enable Nvidia CUDA compiler [no]
345 --disable-cuda-llvm disable CUDA compilation using clang [autodetect]
346 --disable-cuvid disable Nvidia CUVID support [autodetect]
347 --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect]
348 --disable-d3d12va disable Microsoft Direct3D 12 video acceleration code [autodetect]
349 --disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect]
350 --disable-ffnvcodec disable dynamically linked Nvidia code [autodetect]
351 --disable-libdrm disable DRM code (Linux) [autodetect]
352 --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
353 --enable-libvpl enable Intel oneVPL code via libvpl if libmfx is not used [no]
354 --enable-libnpp enable Nvidia Performance Primitives-based code [no]
355 --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no]
356 --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect]
357 --disable-nvenc disable Nvidia video encoding code [autodetect]
358 --enable-omx enable OpenMAX IL code [no]
359 --enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
360 --enable-rkmpp enable Rockchip Media Process Platform code [no]
361 --disable-v4l2-m2m disable V4L2 mem2mem code [autodetect]
362 --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect]
363 --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect]
364 --disable-videotoolbox disable VideoToolbox code [autodetect]
365 --disable-vulkan disable Vulkan code [autodetect]
368 --arch=ARCH select architecture [$arch]
369 --cpu=CPU select the minimum required CPU (affects
370 instruction selection, may crash on older CPUs)
371 --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]
372 --progs-suffix=SUFFIX program name suffix []
373 --enable-cross-compile assume a cross-compiler is used
374 --sysroot=PATH root of cross-build tree
375 --sysinclude=PATH location of cross-build system headers
376 --target-os=OS compiler targets OS [$target_os]
377 --target-exec=CMD command to run executables on target
378 --target-path=DIR path to view of build directory on target
379 --target-samples=DIR path to samples directory on target
380 --tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
381 --toolchain=NAME set tool defaults according to NAME
382 (gcc-asan, clang-asan, gcc-msan, clang-msan,
383 gcc-tsan, clang-tsan, gcc-usan, clang-usan,
384 valgrind-massif, valgrind-memcheck,
385 msvc, icl, gcov, llvm-cov, hardened)
386 --nm=NM use nm tool NM [$nm_default]
387 --ar=AR use archive tool AR [$ar_default]
388 --as=AS use assembler AS [$as_default]
389 --ln_s=LN_S use symbolic link tool LN_S [$ln_s_default]
390 --strip=STRIP use strip tool STRIP [$strip_default]
391 --windres=WINDRES use windows resource compiler WINDRES [$windres_default]
392 --x86asmexe=EXE use nasm-compatible assembler EXE [$x86asmexe_default]
393 --cc=CC use C compiler CC [$cc_default]
394 --stdc=STDC use C standard STDC [$stdc_default]
395 --cxx=CXX use C compiler CXX [$cxx_default]
396 --stdcxx=STDCXX use C standard STDCXX [$stdcxx_default]
397 --objcc=OCC use ObjC compiler OCC [$cc_default]
398 --dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
399 --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$nvcc_default]
400 --ld=LD use linker LD [$ld_default]
401 --metalcc=METALCC use metal compiler METALCC [$metalcc_default]
402 --metallib=METALLIB use metal linker METALLIB [$metallib_default]
403 --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default]
404 --pkg-config-flags=FLAGS pass additional flags to pkgconf []
405 --ranlib=RANLIB use ranlib RANLIB [$ranlib_default]
406 --doxygen=DOXYGEN use DOXYGEN to generate API doc [$doxygen_default]
407 --host-cc=HOSTCC use host C compiler HOSTCC
408 --host-cflags=HCFLAGS use HCFLAGS when compiling for host
409 --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
410 --host-ld=HOSTLD use host linker HOSTLD
411 --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
412 --host-extralibs=HLIBS use libs HLIBS when linking for host
413 --host-os=OS compiler host OS [$target_os]
414 --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
415 --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
416 --extra-objcflags=FLAGS add FLAGS to OBJCFLAGS [$CFLAGS]
417 --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
418 --extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
419 --extra-ldsoflags=ELDFLAGS add ELDFLAGS to LDSOFLAGS [$LDSOFLAGS]
420 --extra-libs=ELIBS add ELIBS [$ELIBS]
421 --extra-version=STRING version string suffix []
422 --optflags=OPTFLAGS override optimization-related compiler flags
423 --nvccflags=NVCCFLAGS override nvcc flags [$nvccflags_default]
424 --build-suffix=SUFFIX library name suffix []
425 --enable-pic build position-independent code
426 --enable-thumb compile for Thumb instruction set
427 --enable-lto[=arg] use link-time optimization
428 --env="ENV=override" override the environment variables
430 Advanced options (experts only):
431 --malloc-prefix=PREFIX prefix malloc and related names with PREFIX
432 --custom-allocator=NAME use a supported custom allocator
433 --disable-symver disable symbol versioning
434 --enable-hardcoded-tables use hardcoded tables instead of runtime generation
435 --disable-safe-bitstream-reader
436 disable buffer boundary checking in bitreaders
437 (faster, but may crash)
438 --sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
440 Optimization options (experts only):
441 --disable-asm disable all assembly optimizations
442 --disable-altivec disable AltiVec optimizations
443 --disable-vsx disable VSX optimizations
444 --disable-power8 disable POWER8 optimizations
445 --disable-amd3dnow disable 3DNow! optimizations
446 --disable-amd3dnowext disable 3DNow! extended optimizations
447 --disable-mmx disable MMX optimizations
448 --disable-mmxext disable MMXEXT optimizations
449 --disable-sse disable SSE optimizations
450 --disable-sse2 disable SSE2 optimizations
451 --disable-sse3 disable SSE3 optimizations
452 --disable-ssse3 disable SSSE3 optimizations
453 --disable-sse4 disable SSE4 optimizations
454 --disable-sse42 disable SSE4.2 optimizations
455 --disable-avx disable AVX optimizations
456 --disable-xop disable XOP optimizations
457 --disable-fma3 disable FMA3 optimizations
458 --disable-fma4 disable FMA4 optimizations
459 --disable-avx2 disable AVX2 optimizations
460 --disable-avx512 disable AVX-512 optimizations
461 --disable-avx512icl disable AVX-512ICL optimizations
462 --disable-aesni disable AESNI optimizations
463 --disable-armv5te disable armv5te optimizations
464 --disable-armv6 disable armv6 optimizations
465 --disable-armv6t2 disable armv6t2 optimizations
466 --disable-vfp disable VFP optimizations
467 --disable-neon disable NEON optimizations
468 --disable-dotprod disable DOTPROD optimizations
469 --disable-i8mm disable I8MM optimizations
470 --disable-sve disable SVE optimizations
471 --disable-sve2 disable SVE2 optimizations
472 --disable-inline-asm disable use of inline assembly
473 --disable-x86asm disable use of standalone x86 assembly
474 --disable-mipsdsp disable MIPS DSP ASE R1 optimizations
475 --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
476 --disable-msa disable MSA optimizations
477 --disable-mipsfpu disable floating point MIPS optimizations
478 --disable-mmi disable Loongson MMI optimizations
479 --disable-lsx disable Loongson LSX optimizations
480 --disable-lasx disable Loongson LASX optimizations
481 --disable-rvv disable RISC-V Vector optimizations
482 --disable-fast-unaligned consider unaligned accesses slow
484 Developer options (useful when working on FFmpeg itself):
485 --disable-debug disable debugging symbols
486 --enable-debug=LEVEL set the debug level [$debuglevel]
487 --disable-optimizations disable compiler optimizations
488 --enable-extra-warnings enable more compiler warnings
489 --disable-stripping disable stripping of executables and shared libraries
490 --assert-level=level 0(default), 1 or 2, amount of assertion testing,
491 2 causes a slowdown at runtime.
492 --enable-memory-poisoning fill heap uninitialized allocated space with arbitrary data
493 --valgrind=VALGRIND run "make fate" tests through valgrind to detect memory
494 leaks and errors, using the specified valgrind binary.
495 Cannot be combined with --target-exec
496 --enable-ftrapv Trap arithmetic overflows
497 --samples=PATH location of test samples for FATE, if not set use
498 \$FATE_SAMPLES at make invocation time.
499 --enable-neon-clobber-test check NEON registers for clobbering (should be
500 used only for debugging purposes)
501 --enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
502 should be used only for debugging purposes)
503 --enable-random randomly enable/disable components
505 --enable-random=LIST randomly enable/disable specific components or
506 --disable-random=LIST component groups. LIST is a comma-separated list
507 of NAME[:PROB] entries where NAME is a component
508 (group) and PROB the probability associated with
510 --random-seed=VALUE seed value for --enable/disable-random
511 --disable-valgrind-backtrace do not print a backtrace under Valgrind
512 (only applies to --disable-optimizations builds)
513 --enable-ossfuzz Enable building fuzzer tool
514 --libfuzzer=PATH path to libfuzzer
515 --ignore-tests=TESTS comma-separated list (without "fate-" prefix
516 in the name) of tests whose result is ignored
517 --enable-linux-perf enable Linux Performance Monitor API
518 --enable-macos-kperf enable macOS kperf (private) API
519 --disable-large-tests disable tests that use a large amount of memory
520 --disable-ptx-compression don't compress CUDA PTX code even when possible
521 --disable-version-tracking don't include the git/release version in the build
523 NOTE: Object files are built at the place where configure is launched.
528 if test -t 1 && which tput >/dev
/null
2>&1; then
529 ncolors
=$
(tput colors
)
530 if test -n "$ncolors" && test $ncolors -ge 8; then
531 bold_color
=$
(tput bold
)
532 warn_color
=$
(tput setaf
3)
533 error_color
=$
(tput setaf
1)
534 reset_color
=$
(tput sgr0
)
536 # 72 used instead of 80 since that's the default of pr
542 echo "$@" >> $logfile
548 while IFS
= read -r log_file_line
; do
549 printf '%5d\t%s\n' "$log_file_i" "$log_file_line"
550 log_file_i
=$
(($log_file_i+1))
551 done < "$1" >> "$logfile"
557 WARNINGS
="${WARNINGS}WARNING: $*\n"
562 echo "$error_color$bold_color$@$reset_color"
565 If you think configure made a mistake, make sure you are using the latest
566 version from Git. If the latest version fails, report the problem to the
567 ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
569 if disabled logging
; then
571 Rerun configure with logging enabled (do not use --disable-logging), and
572 include the log this produces with your report.
576 Include the log file "$logfile" produced by configure as this will help
583 # Avoid locale weirdness, besides we really just want to translate ASCII.
585 echo "$@" |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
589 echo "$@" |
tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
593 echo "$*" |
sed 's/["\\]/\\\0/g'
597 v
=$
(echo "$1" |
sed "s/'/'\\\\''/g")
598 test "x$v" = "x${v#*[!A-Za-z0-9_/.+-]}" || v
="'$v'"
603 echo "$@" |
sed 's/^ *//;s/[[:space:]][[:space:]]*/ /g;s/ *$//'
610 eval "case '$v' in $pat) printf '%s ' '$v' ;; esac"
618 eval "case '$v' in $pat) ;; *) printf '%s ' '$v' ;; esac"
625 for v
; do eval $m; done
631 for v
; do echo ${v}${suffix}; done
637 for v
; do echo ${v%$suffix}; done
652 eval : \
${$var:=$value}
657 echo $@ |
sed 's/[^A-Za-z0-9_]/_/g'
663 eval $
(sanitize_var_name
"$var")='$*'
667 eval echo \$$
(sanitize_var_name
"$1")
672 eval level
=\
${${pvar}_level
:=0}
673 eval ${pvar}_
${level}="\$$pvar"
674 eval ${pvar}_level
=$
(($level+1))
680 eval level
=\
${${pvar}_level
:-0}
681 test $level = 0 && continue
682 eval level
=$
(($level-1))
683 eval $pvar="\${${pvar}_${level}}"
684 eval ${pvar}_level
=$level
685 eval unset ${pvar}_
${level}
691 eval ${var}_requested
=yes
696 warn_if_gets_disabled
(){
698 WARN_IF_GETS_DISABLED_LIST
="$WARN_IF_GETS_DISABLED_LIST $var"
710 disable_with_reason
(){
712 eval "${1}_disable_reason=\"$2\""
713 if requested
$1; then
714 die
"ERROR: $1 requested, but $2"
728 enable $
(sanitize_var_name
$var)
734 disable $
(sanitize_var_name
$var)
740 enabled
$var && continue
742 eval enable_deep \$
${var}_select
744 eval enable_deep_weak \$
${var}_suggest
755 disabled
$var && continue
764 test "${1#!}" = "$1" && op
="=" || op
="!="
765 eval test "x\$${1#!}_requested" $op "xyes"
769 test "${1#!}" = "$1" && op
="=" || op
="!="
770 eval test "x\$${1#!}" $op "xyes"
774 test "${1#!}" = "$1" && op
="=" || op
="!="
775 eval test "x\$${1#!}" $op "xno"
780 enabled
$opt ||
return 1
786 disabled
$opt ||
return 1
792 enabled
$opt && return 0
798 disabled
$opt && return 0
805 eval : \
${$opt:=\$${opt}_default}
813 [ $var = $value ] && return 0
818 # The cfg loop is very hot (several thousands iterations), and in bash also
819 # potentialy quite slow. Try to abort the iterations early, preferably without
820 # calling functions. 70%+ of the time cfg is already done or without deps.
823 eval [ x\$
${cfg}_checking
= xdone
] && continue
824 eval [ x\$
${cfg}_checking
= xinprogress
] && die
"Circular dependency for $cfg."
827 dep_all=\$${cfg}_deps
828 dep_any=\$${cfg}_deps_any
829 dep_con=\$${cfg}_conflict
830 dep_sel=\$${cfg}_select
831 dep_sgs=\$${cfg}_suggest
833 dep_ifn=\$${cfg}_if_any
836 # most of the time here $cfg has no deps - avoid costly no-op work
837 if [ "$dep_all$dep_any$dep_con$dep_sel$dep_sgs$dep_ifa$dep_ifn" ]; then
838 eval ${cfg}_checking
=inprogress
840 set -- $cfg "$dep_all" "$dep_any" "$dep_con" "$dep_sel" "$dep_sgs" "$dep_ifa" "$dep_ifn"
841 check_deps
$dep_all $dep_any $dep_con $dep_sel $dep_sgs $dep_ifa $dep_ifn
842 cfg
=$1; dep_all
=$2; dep_any
=$3; dep_con
=$4; dep_sel
=$5 dep_sgs
=$6; dep_ifa
=$7; dep_ifn
=$8
844 [ -n "$dep_ifa" ] && { enabled_all
$dep_ifa && enable_weak
$cfg; }
845 [ -n "$dep_ifn" ] && { enabled_any
$dep_ifn && enable_weak
$cfg; }
846 enabled_all
$dep_all ||
{ disable_with_reason
$cfg "not all dependencies are satisfied: $dep_all"; }
847 enabled_any
$dep_any ||
{ disable_with_reason
$cfg "not any dependency is satisfied: $dep_any"; }
848 disabled_all
$dep_con ||
{ disable_with_reason
$cfg "some conflicting dependencies are unsatisfied: $dep_con"; }
849 disabled_any
$dep_sel && { disable_with_reason
$cfg "some selected dependency is unsatisfied: $dep_sel"; }
851 enabled
$cfg && enable_deep_weak
$dep_sel $dep_sgs
853 for dep
in $dep_all $dep_any $dep_sel $dep_sgs; do
854 # filter out library deps, these do not belong in extralibs
855 is_in
$dep $LIBRARY_LIST && continue
856 enabled
$dep && eval append
${cfg}_extralibs
${dep}_extralibs
860 eval ${cfg}_checking
=done
868 map
'eval echo "$v \${$v:-no}"' "$@" |
869 awk "BEGIN { split(\"$files\", files) }
871 c = \"$pfx\" toupper(\$1);
877 if (file ~ /\\.h\$/) {
878 printf(\"#define %s %d\\n\", c, v) >>file;
879 } else if (file ~ /\\.asm\$/) {
880 printf(\"%%define %s %d\\n\", c, v) >>file;
881 } else if (file ~ /\\.mak\$/) {
882 n = -v ? \"\" : \"!\";
883 printf(\"%s%s=yes\\n\", n, c) >>file;
884 } else if (file ~ /\\.texi\$/) {
885 pre = -v ? \"\" : \"@c \";
888 gsub(/_/, \"-\", c2);
889 printf(\"%s@set %s %s\\n\", pre, c2, yesno) >>file;
899 enabled
$v && printf "%s\n" ${v%$suf}
906 eval "$var=\"\$$var $*\""
912 eval "$var=\"$* \$$var\""
919 reverse_out="$v $reverse_out"
925 # keeps the last occurence of each non-unique item
930 for v
in $unique_in; do
931 # " $unique_out" +space such that every item is surrounded with spaces
932 case " $unique_out" in *" $v "*) continue; esac # already in list
933 unique_out
="$unique_out$v "
942 for v
in $resolve_in; do
943 eval 'resolve_out="$resolve_out$'$v' "'
945 eval $1=\
$resolve_out
953 append CFLAGS $
($cflags_filter "$@")
956 add_cflags_headers
(){
957 append CFLAGS_HEADERS $
($cflags_filter "$@")
961 append CXXFLAGS $
($cflags_filter "$@")
965 append OBJCFLAGS $
($objcflags_filter "$@")
969 append ASFLAGS $
($asflags_filter "$@")
973 append LDFLAGS $
($ldflags_filter "$@")
977 append LDEXEFLAGS $
($ldflags_filter "$@")
981 append LDSOFLAGS $
($ldflags_filter "$@")
985 prepend extralibs $
($ldflags_filter "$@")
989 append ASMSTRIPFLAGS
"$@"
993 append host_cppflags
"$@"
997 append host_cflags $
($host_cflags_filter "$@")
1001 append host_ldflags $
($host_ldflags_filter "$@")
1005 append compat_objs
$1
1007 map
'add_cppflags -D$v' "$@"
1012 "$@" >> $logfile 2>&1
1017 stat
"$1" >> $logfile 2>&1
1021 eval printf '%s\\n' $CC_E
1025 eval printf '%s\\n' $CC_O
1029 eval printf '%s\\n' $AS_O
1033 eval printf '%s\\n' $X86ASM_O
1037 eval printf '%s\\n' $LD_O
1041 eval printf '%s\\n' $HOSTCC_E
1045 eval printf '%s\\n' $HOSTCC_O
1049 eval printf '%s\\n' $NVCC_O
1056 test_cmd
$cc $CPPFLAGS $CFLAGS "$@" $CC_C $
(cc_o
$TMPO) $TMPC
1063 test_cmd
$cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
1070 test_cmd
$objcc -Werror=missing-prototypes
$CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $
(cc_o
$TMPO) $TMPM
1079 [ -x "$(command -v cygpath)" ] && tmpcu_
=$
(cygpath
-m $tmpcu_) && tmpo_
=$
(cygpath
-m $tmpo_)
1080 test_cmd
$nvcc $nvccflags "$@" $NVCC_C $
(nvcc_o
$tmpo_) $tmpcu_
1087 disabled
$name && return
1089 test_nvcc
"$@" <<EOF && enable $name
1091 __global__ void hello(unsigned char *data) {}
1100 test_cmd
$cc $CPPFLAGS $CFLAGS "$@" $
(cc_e
$TMPO) $TMPC
1107 test_cmd
$as $CPPFLAGS $ASFLAGS "$@" $AS_C $
(as_o
$TMPO) $TMPS
1111 log test_x86asm
"$@"
1115 test_cmd
$x86asmexe $X86ASMFLAGS -Werror "$@" $
(x86asm_o
$TMPO) $TMPASM
1121 disabled
$cmd && return
1123 test_cmd $@
&& enable $cmd
1132 test_as $@
<<EOF && enable $name
1138 log check_inline_asm
"$@"
1143 test_cc
"$@" <<EOF && enable $name
1144 void foo(void){ __asm__ volatile($code); }
1148 check_inline_asm_flags
(){
1149 log check_inline_asm_flags
"$@"
1154 while [ "$1" != "" ]; do
1160 void foo(void){ __asm__ volatile($code); }
1163 test_cmd
$cc $CPPFLAGS $CFLAGS $flags "$@" $CC_C $
(cc_o
$TMPO) $TMPC &&
1164 enable $name && add_cflags
$flags && add_asflags
$flags && add_ldflags
$flags
1169 check_inline_asm
${1}_inline
"\"$2\""
1170 check_as
${1}_external
"$2"
1174 log check_arch_level
"$@"
1176 check_as tested_arch_level
".arch $level"
1177 enabled tested_arch_level
&& as_arch_level
="$level"
1180 check_archext_insn
(){
1181 log check_archext_insn
"$@"
1184 # Check if the assembly is accepted in inline assembly.
1185 check_inline_asm
${feature}_inline
"\"$instr\""
1186 # We don't check if the instruction is supported out of the box by the
1187 # external assembler (we don't try to set ${feature}_external) as we don't
1188 # need to use these instructions in non-runtime detected codepaths.
1192 enabled as_arch_directive
&& arch_directive
=".arch $as_arch_level" || arch_directive
=""
1194 # Test if the assembler supports the .arch_extension $feature directive.
1195 arch_extension_directive
=".arch_extension $feature"
1196 test_as
<<EOF && enable as_archext_${feature}_directive || arch_extension_directive=""
1198 $arch_extension_directive
1201 # Test if we can assemble the instruction after potential .arch and
1202 # .arch_extension directives.
1203 test_as
<<EOF && enable ${feature}
1205 $arch_extension_directive
1211 log check_x86asm
"$@"
1215 test_x86asm
"$@" && enable $name
1222 flags
=$
(filter_out
'-l*|*.so' $@
)
1223 libs
=$
(filter
'-l*|*.so' $@
)
1224 test_
$type $
($cflags_filter $flags) ||
return
1225 flags
=$
($ldflags_filter $flags)
1226 libs
=$
($ldflags_filter $libs)
1227 test_cmd
$ld $LDFLAGS $LDEXEFLAGS $flags $
(ld_o
$TMPE) $TMPO $libs $extralibs
1236 test_ld
$type $@
&& enable $name
1241 test "${hdr%.h}" = "${hdr}" &&
1242 echo "#include $hdr" ||
1243 echo "#include <$hdr>"
1253 for hdr
in $headers; do
1256 echo "int main(void) { $code; return 0; }"
1257 } | test_
$check "$@"
1261 log check_cppflags
"$@"
1262 test_cpp
"$@" <<EOF && append CPPFLAGS "$@"
1268 log test_cflags
"$@"
1269 set -- $
($cflags_filter "$@")
1276 log check_cflags
"$@"
1277 test_cflags
"$@" && add_cflags
"$@"
1281 log check_cxxflags
"$@"
1282 set -- $
($cflags_filter "$@")
1283 test_cxx
"$@" <<EOF && append CXXFLAGS "$@"
1289 log test_objcflags
"$@"
1290 set -- $
($objcflags_filter "$@")
1291 test_objcc
"$@" <<EOF
1297 log check_objcflags
"$@"
1298 test_objcflags
"$@" && add_objcflags
"$@"
1302 log test_ldflags
"$@"
1303 set -- $
($ldflags_filter "$@")
1304 test_ld
"cc" "$@" <<EOF
1305 int main(void){ return 0; }
1310 log check_ldflags
"$@"
1311 test_ldflags
"$@" && add_ldflags
"$@"
1315 log test_stripflags
"$@"
1316 # call test_cc to get a fresh TMPO
1318 int main(void) { return 0; }
1320 test_cmd
$strip $ASMSTRIPFLAGS "$@" $TMPO
1324 log check_stripflags
"$@"
1325 test_stripflags
"$@" && add_stripflags
"$@"
1329 log check_headers
"$@"
1332 disable_sanitized
$headers
1334 for hdr
in $headers; do
1338 } | test_cpp
"$@" && enable_sanitized
$headers
1341 check_header_objcc
(){
1342 log check_header_objcc
"$@"
1346 disable_sanitized
$header
1348 echo "#include <$header>"
1349 echo "int main(void) { return 0; }"
1350 } | test_objcc
&& test_stat
"$TMPO" && enable_sanitized
$header
1353 check_apple_framework
(){
1354 log check_apple_framework
"$@"
1356 name
="$(tolower $framework)"
1357 header
="${framework}/${framework}.h"
1359 check_header_objcc
$header &&
1360 enable $name && eval ${name}_extralibs
='"-framework $framework"'
1368 test_ld
"cc" "$@" <<EOF && enable $func
1370 int main(void){ $func(); }
1375 log check_mathfunc
"$@"
1379 test $narg = 2 && args
="f, g" || args
="f"
1381 test_ld
"cc" "$@" <<EOF && enable $func
1383 float foo(float f, float g) { return $func($args); }
1384 int main(void){ return (int) foo; }
1388 check_func_headers
(){
1389 log check_func_headers
"$@"
1394 for hdr
in $headers; do
1397 echo "#include <stdint.h>"
1398 for func
in $funcs; do
1399 echo "long check_$func(void) { return (long) $func; }"
1401 echo "int main(void) { int ret = 0;"
1402 # LTO could optimize out the test functions without this
1403 for func
in $funcs; do
1404 echo " ret |= ((intptr_t)check_$func) & 0xFFFF;"
1406 echo "return ret; }"
1407 } | test_ld
"cc" "$@" && enable $funcs && enable_sanitized
$headers
1410 check_class_headers_cpp
(){
1411 log check_class_headers_cpp
"$@"
1416 for hdr
in $headers; do
1417 echo "#include <$hdr>"
1419 echo "int main(void) { "
1421 for class
in $classes; do
1422 echo "$class obj$i;"
1426 } | test_ld
"cxx" "$@" && enable $funcs && enable_sanitized
$headers
1429 test_cpp_condition
(){
1430 log test_cpp_condition
"$@"
1437 #error "unsatisfied condition: $condition"
1442 check_cpp_condition
(){
1443 log check_cpp_condition
"$@"
1447 test_cpp_condition
"$@" && enable $name
1451 log test_cflags_cc
"$@"
1456 set -- $
($cflags_filter "$flags")
1460 #error "unsatisfied condition: $condition"
1466 log check_cflags_cc
"$@"
1468 test_cflags_cc
"$@" && add_cflags
$flags
1472 log test_cxxflags_cc
"$@"
1477 set -- $
($cflags_filter "$flags")
1481 #error "unsatisfied condition: $condition"
1486 check_cxxflags_cc
(){
1487 log check_cxxflags_cc
"$@"
1489 test_cxxflags_cc
"$@" && add_cxxflags
$flags
1499 check_func_headers
"$headers" "$funcs" "$@" &&
1500 enable $name && eval ${name}_extralibs
="\$@"
1504 log check_lib_cpp
"$@"
1510 check_class_headers_cpp
"$headers" "$classes" "$@" &&
1511 enable $name && eval ${name}_extralibs
="\$@"
1515 log test_pkg_config
"$@"
1523 test_cmd
$pkg_config --exists --print-errors $pkg_version ||
return
1524 pkg_cflags
=$
($pkg_config --cflags $pkg_config_flags $pkg)
1525 pkg_libs
=$
($pkg_config --libs $pkg_config_flags $pkg)
1526 pkg_incdir
=$
($pkg_config --variable=includedir
$pkg_config_flags $pkg)
1527 check_func_headers
"$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
1529 set_sanitized
"${name}_cflags" $pkg_cflags &&
1530 set_sanitized
"${name}_incdir" $pkg_incdir &&
1531 set_sanitized
"${name}_extralibs" $pkg_libs
1534 test_pkg_config_cpp
(){
1535 log test_pkg_config_cpp
"$@"
1543 test_cmd
$pkg_config --exists --print-errors $pkg_version ||
return
1544 pkg_cflags
=$
($pkg_config --cflags $pkg_config_flags $pkg)
1545 pkg_incdir
=$
($pkg_config --variable=includedir
$pkg_config_flags $pkg)
1546 pkg_incflags
=$
($pkg_config --cflags-only-I $pkg_config_flags $pkg)
1547 test_cpp_condition
"$pkg_incdir/$headers" "$cond" "$@" &&
1549 set_sanitized
"${name}_cflags" $pkg_cflags &&
1550 set_sanitized
"${name}_incdir" $pkg_incdir &&
1551 set_sanitized
"${name}_incflags" $pkg_incflags
1555 log check_pkg_config
"$@"
1557 test_pkg_config
"$@" &&
1558 eval add_cflags \$
${name}_cflags
1561 check_pkg_config_cpp
(){
1562 log check_pkg_config_cpp
"$@"
1564 test_pkg_config_cpp
"$@" &&
1565 eval add_cflags \$
${name}_cflags
1568 check_pkg_config_header_only
(){
1569 log check_pkg_config_cpp
"$@"
1571 test_pkg_config_cpp
"$@" &&
1572 eval add_cflags \$
${name}_incflags
1576 test_ld
"cc" "$@" && { enabled cross_compile ||
$TMPE >> $logfile 2>&1; }
1580 log check_exec_crash
"$@"
1583 # exit() is not async signal safe. _Exit (C99) and _exit (POSIX)
1584 # are safe but may not be available everywhere. Thus we use
1585 # raise(SIGTERM) instead. The check is run in a subshell so we
1586 # can redirect the "Terminated" message from the shell. SIGBUS
1587 # is not defined by standard C so it is used conditionally.
1589 (test_exec
"$@") >> $logfile 2>&1 <<EOF
1591 static void sighandler(int sig){
1597 int (*func_ptr)(void) = foo;
1599 signal(SIGILL, sighandler);
1600 signal(SIGFPE, sighandler);
1601 signal(SIGSEGV, sighandler);
1603 signal(SIGBUS, sighandler);
1615 disable_sanitized
"$type"
1616 test_code cc
"$headers" "$type v" "$@" && enable_sanitized
"$type"
1620 log check_struct
"$@"
1625 disable_sanitized
"${struct}_${member}"
1626 test_code cc
"$headers" "const void *p = &(($struct *)0)->$member" "$@" &&
1627 enable_sanitized
"${struct}_${member}"
1631 log check_builtin
"$@"
1637 test_code ld
"$headers" "$builtin" "cc" "$@" && enable "$name"
1640 check_compile_assert
(){
1641 log check_compile_assert
"$@"
1647 test_code cc
"$headers" "char c[2 * !!($condition) - 1]" "$@" && enable "$name"
1655 test_code cc
"$@" && enable "$name"
1663 check_lib
$name "$@" || die
"ERROR: $name_version not found"
1669 check_cc
"$@" || die
"ERROR: $name failed"
1673 log require_cpp
"$@"
1677 check_lib_cpp
"$name" "$@" || die
"ERROR: $name_version not found"
1681 log require_headers
"$@"
1683 check_headers
"$@" || die
"ERROR: $headers not found"
1686 require_cpp_condition
(){
1687 log require_cpp_condition
"$@"
1689 check_cpp_condition
"$@" || die
"ERROR: $condition not satisfied"
1692 require_pkg_config
(){
1693 log require_pkg_config
"$@"
1695 check_pkg_config
"$@" || die
"ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
1698 require_pkg_config_cpp
(){
1699 log require_pkg_config_cpp
"$@"
1701 check_pkg_config_cpp
"$@" || die
"ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
1705 log test_host_cc
"$@"
1708 test_cmd
$host_cc $host_cflags "$@" $HOSTCC_C $
(hostcc_o
$TMPO) $TMPC
1712 log test_host_cpp
"$@"
1715 test_cmd
$host_cc $host_cppflags $host_cflags "$@" $
(hostcc_e
$TMPO) $TMPC
1718 check_host_cppflags
(){
1719 log check_host_cppflags
"$@"
1720 test_host_cpp
"$@" <<EOF && append host_cppflags "$@"
1725 check_host_cflags
(){
1726 log check_host_cflags
"$@"
1727 set -- $
($host_cflags_filter "$@")
1728 test_host_cc
"$@" <<EOF && append host_cflags "$@"
1733 test_host_cflags_cc
(){
1734 log test_host_cflags_cc
"$@"
1739 set -- $
($host_cflags_filter "$flags")
1740 test_host_cc
"$@" <<EOF
1743 #error "unsatisfied condition: $condition"
1748 check_host_cflags_cc
(){
1749 log check_host_cflags_cc
"$@"
1751 test_host_cflags_cc
"$@" && add_host_cflags
$flags
1754 test_host_cpp_condition
(){
1755 log test_host_cpp_condition
"$@"
1759 test_host_cpp
"$@" <<EOF
1762 #error "unsatisfied condition: $condition"
1767 check_host_cpp_condition
(){
1768 log check_host_cpp_condition
"$@"
1772 test_host_cpp_condition
"$@" && enable $name
1776 cmp -s "$1" "$2" && { test "$quiet" != "yes" && echo "$2 is unchanged"; } && return
1777 mkdir
-p "$(dirname $2)"
1781 # CONFIG_LIST contains configurable options, while HAVE_LIST is for
1782 # system-dependent things.
1784 AVCODEC_COMPONENTS
="
1792 AVDEVICE_COMPONENTS
="
1797 AVFILTER_COMPONENTS
="
1801 AVFORMAT_COMPONENTS
="
1809 $AVDEVICE_COMPONENTS
1810 $AVFILTER_COMPONENTS
1811 $AVFORMAT_COMPONENTS
1815 avio_http_serve_files_example
1816 avio_list_dir_example
1817 avio_read_callback_example
1818 decode_audio_example
1819 decode_filter_audio_example
1820 decode_filter_video_example
1821 decode_video_example
1822 demux_decode_example
1823 encode_audio_example
1824 encode_video_example
1826 filter_audio_example
1831 resample_audio_example
1833 show_metadata_example
1834 transcode_aac_example
1836 vaapi_encode_example
1837 vaapi_transcode_example
1838 qsv_transcode_example
1841 EXTERNAL_AUTODETECT_LIBRARY_LIST
="
1863 EXTERNAL_LIBRARY_GPL_LIST
="
1879 EXTERNAL_LIBRARY_NONFREE_LIST
="
1885 EXTERNAL_LIBRARY_VERSION3_LIST
="
1896 EXTERNAL_LIBRARY_GPLV3_LIST
="
1900 EXTERNAL_LIBRARY_LIST
="
1901 $EXTERNAL_LIBRARY_GPL_LIST
1902 $EXTERNAL_LIBRARY_NONFREE_LIST
1903 $EXTERNAL_LIBRARY_VERSION3_LIST
1904 $EXTERNAL_LIBRARY_GPLV3_LIST
1991 HWACCEL_AUTODETECT_LIBRARY_LIST
="
2011 # catchall list of things that require external libs to link
2017 HWACCEL_LIBRARY_NONFREE_LIST
="
2023 HWACCEL_LIBRARY_LIST
="
2024 $HWACCEL_LIBRARY_NONFREE_LIST
2046 safe_bitstream_reader
2053 # this list should be kept in linking order
2088 # COMPONENT_LIST needs to come last to ensure correct dependency checking
2092 $EXTERNAL_LIBRARY_LIST
2093 $EXTERNAL_AUTODETECT_LIBRARY_LIST
2094 $HWACCEL_LIBRARY_LIST
2095 $HWACCEL_AUTODETECT_LIBRARY_LIST
2128 $EXTERNAL_AUTODETECT_LIBRARY_LIST
2129 $HWACCEL_AUTODETECT_LIBRARY_LIST
2172 ARCH_EXT_LIST_MIPS
="
2184 ARCH_EXT_LIST_LOONGSON
="
2192 ARCH_EXT_LIST_X86_SIMD
="
2222 ARCH_EXT_LIST_RISCV
="
2230 $ARCH_EXT_LIST_X86_SIMD
2237 $ARCH_EXT_LIST_RISCV
2240 $ARCH_EXT_LIST_LOONGSON
2277 cdio_paranoia_paranoia_h
2280 dev_bktr_ioctl_bt848_h
2281 dev_bktr_ioctl_meteor_h
2283 dev_video_bktr_ioctl_bt848_h
2284 dev_video_meteor_ioctl_meteor_h
2294 machine_ioctl_bt848_h
2295 machine_ioctl_meteor_h
2297 opencv2_core_core_c_h
2357 MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
2379 GetProcessAffinityMask
2380 GetProcessMemoryInfo
2384 GetSystemTimeAsFileTime
2410 SetConsoleTextAttribute
2411 SetConsoleCtrlHandler
2422 UTGetOSTypeFromString
2435 TOOLCHAIN_FEATURES
="
2437 as_archext_dotprod_directive
2438 as_archext_i8mm_directive
2439 as_archext_sve_directive
2440 as_archext_sve2_directive
2452 inline_asm_direct_symbol_refs
2454 inline_asm_nonlocal_labels
2465 DPI_AWARENESS_CONTEXT
2467 kCMVideoCodecType_HEVC
2468 kCMVideoCodecType_HEVCWithAlpha
2469 kCMVideoCodecType_VP9
2470 kCMVideoCodecType_AV1
2471 kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
2472 kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange
2473 kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange
2474 kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange
2475 kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange
2476 kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange
2477 kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange
2478 kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
2479 kCVImageBufferTransferFunction_ITU_R_2100_HLG
2480 kCVImageBufferTransferFunction_Linear
2481 kCVImageBufferYCbCrMatrix_ITU_R_2020
2482 kCVImageBufferColorPrimaries_ITU_R_2020
2483 kCVImageBufferTransferFunction_ITU_R_2020
2484 kCVImageBufferTransferFunction_SMPTE_ST_428_1
2487 struct_group_source_req
2488 struct_ip_mreq_source
2490 struct_msghdr_msg_flags
2492 struct_rusage_ru_maxrss
2493 struct_sctp_event_subscribe
2495 struct_sockaddr_sa_len
2496 struct_sockaddr_storage
2497 struct_stat_st_mtim_tv_nsec
2498 struct_v4l2_frmivalenum_discrete
2499 struct_mfxConfigInterface
2504 $(add_suffix _external $ARCH_EXT_LIST)
2505 $(add_suffix _inline $ARCH_EXT_LIST)
2527 opencl_vaapi_beignet
2528 opencl_vaapi_intel_media
2539 # options emitted with CONFIG_ prefix but not available on the command line
2572 frame_thread_encoder
2746 # code dependency declarations
2748 # architecture extensions
2753 armv8_deps
="aarch64"
2754 neon_deps_any
="aarch64 arm"
2755 intrinsics_neon_deps
="neon"
2756 intrinsics_sse2_deps
="sse2"
2760 dotprod_deps
="aarch64 neon"
2761 i8mm_deps
="aarch64 neon"
2762 sve_deps
="aarch64 neon"
2763 sve2_deps
="aarch64 neon sve"
2765 map
'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
2779 loongson2_deps
="mips"
2780 loongson3_deps
="mips"
2781 mmi_deps_any
="loongson2 loongson3"
2782 lsx_deps
="loongarch"
2785 mips32r2_deps
="mips"
2786 mips32r5_deps
="mips"
2787 mips32r6_deps
="mips"
2788 mips64r2_deps
="mips"
2789 mips64r6_deps
="mips"
2792 mipsdspr2_deps
="mips"
2795 x86_64_select
="i686"
2796 x86_64_suggest
="fast_cmov"
2799 amd3dnowext_deps
="amd3dnow"
2816 avx512icl_deps
="avx512"
2818 mmx_external_deps
="x86asm"
2819 mmx_inline_deps
="inline_asm x86"
2820 mmx_suggest
="mmx_external mmx_inline"
2822 for ext
in $
(filter_out mmx
$ARCH_EXT_LIST_X86_SIMD); do
2823 eval dep
=\$
${ext}_deps
2824 eval ${ext}_external_deps
='"${dep}_external"'
2825 eval ${ext}_inline_deps
='"${dep}_inline"'
2826 eval ${ext}_suggest='"${ext}_external ${ext}_inline
"'
2829 aligned_stack_if_any="aarch64 ppc x86
"
2830 fast_64bit_if_any="aarch64 ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64
"
2831 fast_clz_if_any="aarch64 mips ppc x86
"
2832 fast_unaligned_if_any="aarch64 ppc x86
"
2833 simd_align_16_if_any="altivec neon sse
"
2834 simd_align_32_if_any="avx
"
2835 simd_align_64_if_any="avx512
"
2837 # system capabilities
2838 linux_perf_deps="linux_perf_event_h
"
2839 symver_if_any="symver_asm_label symver_gnu_asm
"
2840 valgrind_backtrace_conflict="optimizations
"
2841 valgrind_backtrace_deps="valgrind_valgrind_h
"
2844 atomics_win32_if="MemoryBarrier
"
2845 atomics_native_if_any="$ATOMICS_LIST"
2846 w32threads_deps="atomics_native
"
2847 threads_if_any="$THREADS_LIST"
2850 cbs_av1_select="cbs
"
2851 cbs_h264_select="cbs
"
2852 cbs_h265_select="cbs
"
2853 cbs_h266_select="cbs
"
2854 cbs_jpeg_select="cbs
"
2855 cbs_mpeg2_select="cbs
"
2856 cbs_vp8_select="cbs
"
2857 cbs_vp9_select="cbs
"
2858 deflate_wrapper_deps="zlib
"
2859 dirac_parse_select="golomb
"
2860 dovi_rpudec_select="golomb
"
2861 dovi_rpuenc_select="golomb
"
2862 dnn_deps="avformat swscale
"
2863 dnn_deps_any="libtensorflow libopenvino libtorch
"
2864 error_resilience_select="me_cmp
"
2865 evcparse_select="golomb
"
2867 faandct_select="fdctdsp
"
2868 faanidct_deps="faan
"
2869 faanidct_select="idctdsp
"
2870 h264dsp_select="startcode
"
2871 h264parse_select="golomb
"
2872 h264_sei_select="atsc_a53 golomb
"
2873 hevcparse_select="golomb
"
2874 hevc_sei_select="atsc_a53 golomb
"
2875 frame_thread_encoder_deps="encoders threads
"
2877 iamfdec_select="iso_media mpeg4audio
"
2879 inflate_wrapper_deps="zlib
"
2880 intrax8_select="blockdsp wmv2dsp
"
2881 iso_media_select="mpeg4audio
"
2882 me_cmp_select="idctdsp
"
2883 mpeg_er_select="error_resilience
"
2884 mpegaudio_select="mpegaudiodsp mpegaudioheader
"
2885 mpegvideo_select="blockdsp hpeldsp idctdsp videodsp
"
2886 mpegvideodec_select="h264chroma mpegvideo mpeg_er
"
2887 mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp
"
2888 msmpeg4dec_select="h263_decoder
"
2889 msmpeg4enc_select="h263_encoder
"
2890 vc1dsp_select="h264chroma qpeldsp startcode
"
2891 wmv2dsp_select="qpeldsp
"
2893 # decoders / encoders
2894 aac_decoder_select="adts_header mpeg4audio sinewin
"
2895 aac_fixed_decoder_select="adts_header mpeg4audio
"
2896 aac_encoder_select="audio_frame_queue iirfilter lpc sinewin
"
2897 aac_latm_decoder_select="aac_decoder aac_latm_parser
"
2898 ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert
"
2899 ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp
"
2900 ac3_encoder_select="ac3dsp audiodsp me_cmp
"
2901 ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp
"
2902 acelp_kelvin_decoder_select="audiodsp
"
2903 adpcm_g722_decoder_select="g722dsp
"
2904 adpcm_g722_encoder_select="g722dsp
"
2905 agm_decoder_select="idctdsp
"
2906 aic_decoder_select="golomb idctdsp
"
2907 alac_encoder_select="lpc
"
2908 als_decoder_select="bswapdsp mpeg4audio
"
2909 amrnb_decoder_select="lsp
"
2910 amrwb_decoder_select="lsp
"
2911 amv_decoder_select="sp5x_decoder exif
"
2912 amv_encoder_select="jpegtables mpegvideoenc
"
2913 ape_decoder_select="bswapdsp llauddsp
"
2914 apng_decoder_select="inflate_wrapper
"
2915 apng_encoder_select="deflate_wrapper llvidencdsp
"
2916 aptx_encoder_select="audio_frame_queue
"
2917 aptx_hd_encoder_select="audio_frame_queue
"
2918 asv1_decoder_select="blockdsp bswapdsp idctdsp
"
2919 asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp
"
2920 asv2_decoder_select="blockdsp bswapdsp idctdsp
"
2921 asv2_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp
"
2922 atrac1_decoder_select="sinewin
"
2923 atrac3p_decoder_select="sinewin
"
2924 atrac3pal_decoder_select="sinewin
"
2925 av1_decoder_select="atsc_a53 cbs_av1 dovi_rpudec
"
2926 bink_decoder_select="blockdsp hpeldsp
"
2927 binkaudio_dct_decoder_select="wma_freqs
"
2928 binkaudio_rdft_decoder_select="wma_freqs
"
2929 cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp
"
2930 clearvideo_decoder_select="idctdsp
"
2931 cllc_decoder_select="bswapdsp
"
2932 comfortnoise_encoder_select="lpc
"
2933 cook_decoder_select="audiodsp sinewin
"
2934 cri_decoder_select="mjpeg_decoder
"
2935 cscd_decoder_suggest="zlib
"
2936 dds_decoder_select="texturedsp
"
2937 dirac_decoder_select="dirac_parse dwt golomb mpegvideoenc qpeldsp videodsp
"
2938 dnxhd_decoder_select="blockdsp idctdsp
"
2939 dnxhd_encoder_select="blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp videodsp
"
2940 dvvideo_decoder_select="dvprofile idctdsp
"
2941 dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp
"
2942 dxa_decoder_deps="zlib
"
2943 dxv_decoder_select="lzf texturedsp
"
2944 dxv_encoder_select="texturedspenc
"
2945 eac3_decoder_select="ac3_decoder
"
2946 eac3_encoder_select="ac3_encoder
"
2947 eamad_decoder_select="aandcttables blockdsp bswapdsp
"
2948 eatgq_decoder_select="aandcttables
"
2949 eatqi_decoder_select="aandcttables blockdsp bswapdsp
"
2950 exr_decoder_deps="zlib
"
2951 exr_encoder_deps="zlib
"
2952 ffv1_decoder_select="rangecoder
"
2953 ffv1_encoder_select="rangecoder
"
2954 ffv1_vulkan_encoder_select="vulkan spirv_compiler
"
2955 ffvhuff_decoder_select="huffyuv_decoder
"
2956 ffvhuff_encoder_select="huffyuv_encoder
"
2957 fic_decoder_select="golomb
"
2958 flac_encoder_select="bswapdsp lpc
"
2959 flashsv2_decoder_select="inflate_wrapper
"
2960 flashsv2_encoder_select="deflate_wrapper
"
2961 flashsv_decoder_select="inflate_wrapper
"
2962 flashsv_encoder_deps="zlib
"
2963 flv_decoder_select="h263_decoder
"
2964 flv_encoder_select="h263_encoder
"
2965 fourxm_decoder_select="blockdsp bswapdsp
"
2966 fraps_decoder_select="bswapdsp huffman
"
2967 ftr_decoder_select="adts_header
"
2968 g2m_decoder_deps="zlib
"
2969 g2m_decoder_select="blockdsp idctdsp jpegtables
"
2970 g729_decoder_select="audiodsp
"
2971 h261_decoder_select="mpegvideodec
"
2972 h261_encoder_select="mpegvideoenc
"
2973 h263_decoder_select="h263_parser h263dsp mpegvideodec qpeldsp
"
2974 h263_encoder_select="h263dsp mpegvideoenc
"
2975 h263i_decoder_select="h263_decoder
"
2976 h263p_decoder_select="h263_decoder
"
2977 h263p_encoder_select="h263_encoder
"
2978 h264_decoder_select="cabac golomb h264chroma h264dsp h264parse h264pred h264qpel h264_sei videodsp
"
2979 h264_decoder_suggest="error_resilience
"
2980 hap_decoder_select="snappy texturedsp
"
2981 hap_encoder_deps="libsnappy
"
2982 hap_encoder_select="texturedspenc
"
2983 hevc_decoder_select="bswapdsp cabac dovi_rpudec golomb hevcparse hevc_sei videodsp
"
2984 huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp
"
2985 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp
"
2986 hymt_decoder_select="huffyuv_decoder
"
2987 iac_decoder_select="imc_decoder
"
2988 imc_decoder_select="bswapdsp sinewin
"
2989 imm4_decoder_select="bswapdsp idctdsp
"
2990 imm5_decoder_select="h264_decoder hevc_decoder
"
2991 indeo3_decoder_select="hpeldsp
"
2992 indeo4_decoder_select="ividsp
"
2993 indeo5_decoder_select="ividsp
"
2994 interplay_video_decoder_select="hpeldsp
"
2995 ipu_decoder_select="mpegvideodec
"
2996 jpegls_decoder_select="mjpeg_decoder
"
2997 jv_decoder_select="blockdsp
"
2998 lagarith_decoder_select="llviddsp
"
2999 lead_decoder_select="idctdsp jpegtables
"
3000 ljpeg_encoder_select="jpegtables
"
3001 lscr_decoder_select="inflate_wrapper
"
3002 magicyuv_decoder_select="llviddsp
"
3003 magicyuv_encoder_select="llvidencdsp
"
3004 mdec_decoder_select="blockdsp bswapdsp idctdsp
"
3005 media100_decoder_select="media100_to_mjpegb_bsf mjpegb_decoder
"
3006 metasound_decoder_select="lsp sinewin
"
3007 mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp
"
3008 mjpeg_decoder_select="blockdsp hpeldsp exif idctdsp jpegtables
"
3009 mjpeg_encoder_select="jpegtables mpegvideoenc
"
3010 mjpegb_decoder_select="mjpeg_decoder
"
3011 mlp_decoder_select="mlp_parser
"
3012 mlp_encoder_select="lpc audio_frame_queue
"
3013 mobiclip_decoder_select="bswapdsp golomb
"
3014 motionpixels_decoder_select="bswapdsp
"
3015 mp1_decoder_select="mpegaudio
"
3016 mp1float_decoder_select="mpegaudio
"
3017 mp2_decoder_select="mpegaudio
"
3018 mp2float_decoder_select="mpegaudio
"
3019 mp3_decoder_select="mpegaudio
"
3020 mp3adu_decoder_select="mpegaudio
"
3021 mp3adufloat_decoder_select="mpegaudio
"
3022 mp3float_decoder_select="mpegaudio
"
3023 mp3on4_decoder_select="mpegaudio mpeg4audio
"
3024 mp3on4float_decoder_select="mpegaudio mpeg4audio
"
3025 mpc7_decoder_select="bswapdsp mpegaudiodsp
"
3026 mpc8_decoder_select="mpegaudiodsp
"
3027 mpegvideo_decoder_select="mpegvideodec
"
3028 mpeg1video_decoder_select="mpegvideodec
"
3029 mpeg1video_encoder_select="mpegvideoenc
"
3030 mpeg2video_decoder_select="mpegvideodec
"
3031 mpeg2video_encoder_select="mpegvideoenc
"
3032 mpeg4_decoder_select="h263_decoder
"
3033 mpeg4_encoder_select="h263_encoder qpeldsp
"
3034 msa1_decoder_select="mss34dsp
"
3035 mscc_decoder_select="inflate_wrapper
"
3036 msmpeg4v1_decoder_select="msmpeg4dec
"
3037 msmpeg4v2_decoder_select="msmpeg4dec
"
3038 msmpeg4v2_encoder_select="msmpeg4enc
"
3039 msmpeg4v3_decoder_select="msmpeg4dec
"
3040 msmpeg4v3_encoder_select="msmpeg4enc
"
3041 mss2_decoder_select="mpegvideodec qpeldsp vc1_decoder
"
3042 mts2_decoder_select="jpegtables mss34dsp
"
3043 mv30_decoder_select="aandcttables blockdsp
"
3044 mvha_decoder_select="inflate_wrapper llviddsp
"
3045 mwsc_decoder_select="inflate_wrapper
"
3046 mxpeg_decoder_select="mjpeg_decoder
"
3047 nellymoser_decoder_select="sinewin
"
3048 nellymoser_encoder_select="audio_frame_queue sinewin
"
3049 notchlc_decoder_select="lzf
"
3050 nuv_decoder_select="idctdsp
"
3051 opus_decoder_deps="swresample
"
3052 opus_encoder_select="audio_frame_queue
"
3053 pdv_decoder_select="inflate_wrapper
"
3054 png_decoder_select="inflate_wrapper
"
3055 png_encoder_select="deflate_wrapper llvidencdsp
"
3056 prores_decoder_select="blockdsp idctdsp
"
3057 prores_encoder_select="fdctdsp
"
3058 prores_aw_encoder_select="fdctdsp
"
3059 prores_ks_encoder_select="fdctdsp
"
3060 qcelp_decoder_select="lsp
"
3061 qdm2_decoder_select="mpegaudiodsp
"
3062 ra_144_decoder_select="audiodsp
"
3063 ra_144_encoder_select="audio_frame_queue lpc audiodsp
"
3064 ralf_decoder_select="golomb
"
3065 rasc_decoder_select="inflate_wrapper
"
3066 rawvideo_decoder_select="bswapdsp
"
3067 rscc_decoder_deps="zlib
"
3068 rtv1_decoder_select="texturedsp
"
3069 rv10_decoder_select="h263_decoder
"
3070 rv10_encoder_select="h263_encoder
"
3071 rv20_decoder_select="h263_decoder
"
3072 rv20_encoder_select="h263_encoder
"
3073 rv30_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp
"
3074 rv40_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp
"
3075 rv60_decoder_select="videodsp golomb
"
3076 screenpresso_decoder_deps="zlib
"
3077 shorten_decoder_select="bswapdsp
"
3078 sipr_decoder_select="lsp
"
3079 smvjpeg_decoder_select="mjpeg_decoder
"
3080 snow_decoder_select="dwt h264qpel rangecoder videodsp
"
3081 snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder videodsp
"
3082 sonic_decoder_select="golomb rangecoder
"
3083 sonic_encoder_select="golomb rangecoder
"
3084 sonic_ls_encoder_select="golomb rangecoder
"
3085 sp5x_decoder_select="mjpeg_decoder
"
3086 speedhq_decoder_select="blockdsp idctdsp
"
3087 speedhq_encoder_select="mpegvideoenc
"
3088 srgc_decoder_select="inflate_wrapper
"
3089 svq1_decoder_select="hpeldsp
"
3090 svq1_encoder_select="hpeldsp me_cmp mpegvideoenc
"
3091 svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp
"
3092 svq3_decoder_suggest="zlib
"
3093 tak_decoder_select="audiodsp
"
3094 tdsc_decoder_deps="zlib
"
3095 tdsc_decoder_select="mjpeg_decoder
"
3096 theora_decoder_select="vp3_decoder
"
3097 thp_decoder_select="mjpeg_decoder
"
3098 tiff_decoder_select="mjpeg_decoder
"
3099 tiff_decoder_suggest="zlib lzma
"
3100 tiff_encoder_suggest="zlib
"
3101 truehd_decoder_select="mlp_parser
"
3102 truehd_encoder_select="lpc audio_frame_queue
"
3103 truemotion2_decoder_select="bswapdsp
"
3104 truespeech_decoder_select="bswapdsp
"
3105 tscc_decoder_select="inflate_wrapper
"
3106 twinvq_decoder_select="lsp sinewin
"
3107 txd_decoder_select="texturedsp
"
3108 utvideo_decoder_select="bswapdsp llviddsp
"
3109 utvideo_encoder_select="bswapdsp huffman llvidencdsp
"
3110 vble_decoder_select="llviddsp
"
3111 vbn_decoder_select="texturedsp
"
3112 vbn_encoder_select="texturedspenc
"
3113 vmix_decoder_select="idctdsp
"
3114 vc1_decoder_select="blockdsp h264qpel intrax8 mpegvideodec qpeldsp vc1dsp
"
3115 vc1image_decoder_select="vc1_decoder
"
3116 vorbis_encoder_select="audio_frame_queue
"
3117 vp3_decoder_select="hpeldsp vp3dsp videodsp
"
3118 vp4_decoder_select="vp3_decoder
"
3119 vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp vp56dsp
"
3120 vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp vp56dsp
"
3121 vp6a_decoder_select="vp6_decoder
"
3122 vp6f_decoder_select="vp6_decoder
"
3123 vp7_decoder_select="h264pred videodsp vp8dsp
"
3124 vp8_decoder_select="h264pred videodsp vp8dsp
"
3125 vp9_decoder_select="videodsp vp9_parser vp9_superframe_split_bsf
"
3126 vvc_decoder_select="cabac cbs_h266 golomb videodsp
"
3127 wcmv_decoder_select="inflate_wrapper
"
3128 webp_decoder_select="vp8_decoder exif
"
3129 wmalossless_decoder_select="llauddsp
"
3130 wmapro_decoder_select="sinewin wma_freqs
"
3131 wmav1_decoder_select="sinewin wma_freqs
"
3132 wmav1_encoder_select="sinewin wma_freqs
"
3133 wmav2_decoder_select="sinewin wma_freqs
"
3134 wmav2_encoder_select="sinewin wma_freqs
"
3135 wmavoice_decoder_select="lsp sinewin
"
3136 wmv1_decoder_select="msmpeg4dec
"
3137 wmv1_encoder_select="msmpeg4enc
"
3138 wmv2_decoder_select="blockdsp error_resilience idctdsp intrax8 msmpeg4dec videodsp wmv2dsp
"
3139 wmv2_encoder_select="msmpeg4enc wmv2dsp
"
3140 wmv3_decoder_select="vc1_decoder
"
3141 wmv3image_decoder_select="wmv3_decoder
"
3142 xma1_decoder_select="wmapro_decoder
"
3143 xma2_decoder_select="wmapro_decoder
"
3144 ylc_decoder_select="bswapdsp
"
3145 zerocodec_decoder_select="inflate_wrapper
"
3146 zlib_decoder_select="inflate_wrapper
"
3147 zlib_encoder_select="deflate_wrapper
"
3148 zmbv_decoder_select="inflate_wrapper
"
3149 zmbv_encoder_select="deflate_wrapper
"
3151 # hardware accelerators
3152 cuda_deps="ffnvcodec
"
3153 cuvid_deps="ffnvcodec
"
3154 d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext
"
3155 d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder
"
3156 dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32
"
3157 ffnvcodec_deps_any="libdl LoadLibrary
"
3158 mediacodec_deps="android mediandk pthreads
"
3159 nvdec_deps="ffnvcodec
"
3160 vaapi_x11_deps="xlib_x11
"
3161 videotoolbox_hwaccel_deps="videotoolbox pthreads
"
3162 videotoolbox_hwaccel_extralibs="-framework QuartzCore
"
3163 vulkan_deps="threads
"
3164 vulkan_deps_any="libdl LoadLibrary
"
3166 av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1
"
3167 av1_d3d11va_hwaccel_select="av1_decoder
"
3168 av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1
"
3169 av1_d3d11va2_hwaccel_select="av1_decoder
"
3170 av1_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_AV1
"
3171 av1_d3d12va_hwaccel_select="av1_decoder
"
3172 av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1
"
3173 av1_dxva2_hwaccel_select="av1_decoder
"
3174 av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS
"
3175 av1_nvdec_hwaccel_select="av1_decoder
"
3176 av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx
"
3177 av1_vaapi_hwaccel_select="av1_decoder
"
3178 av1_vdpau_hwaccel_deps="vdpau VdpPictureInfoAV1
"
3179 av1_vdpau_hwaccel_select="av1_decoder
"
3180 av1_videotoolbox_hwaccel_deps="videotoolbox
"
3181 av1_videotoolbox_hwaccel_select="av1_decoder
"
3182 av1_vulkan_hwaccel_deps="vulkan
"
3183 av1_vulkan_hwaccel_select="av1_decoder
"
3184 h263_vaapi_hwaccel_deps="vaapi
"
3185 h263_vaapi_hwaccel_select="h263_decoder
"
3186 h263_videotoolbox_hwaccel_deps="videotoolbox
"
3187 h263_videotoolbox_hwaccel_select="h263_decoder
"
3188 h264_d3d11va_hwaccel_deps="d3d11va
"
3189 h264_d3d11va_hwaccel_select="h264_decoder
"
3190 h264_d3d11va2_hwaccel_deps="d3d11va
"
3191 h264_d3d11va2_hwaccel_select="h264_decoder
"
3192 h264_d3d12va_hwaccel_deps="d3d12va
"
3193 h264_d3d12va_hwaccel_select="h264_decoder
"
3194 h264_dxva2_hwaccel_deps="dxva2
"
3195 h264_dxva2_hwaccel_select="h264_decoder
"
3196 h264_nvdec_hwaccel_deps="nvdec
"
3197 h264_nvdec_hwaccel_select="h264_decoder
"
3198 h264_vaapi_hwaccel_deps="vaapi
"
3199 h264_vaapi_hwaccel_select="h264_decoder
"
3200 h264_vdpau_hwaccel_deps="vdpau
"
3201 h264_vdpau_hwaccel_select="h264_decoder
"
3202 h264_videotoolbox_hwaccel_deps="videotoolbox
"
3203 h264_videotoolbox_hwaccel_select="h264_decoder
"
3204 h264_vulkan_hwaccel_deps="vulkan
"
3205 h264_vulkan_hwaccel_select="h264_decoder
"
3206 hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC
"
3207 hevc_d3d11va_hwaccel_select="hevc_decoder
"
3208 hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC
"
3209 hevc_d3d11va2_hwaccel_select="hevc_decoder
"
3210 hevc_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_HEVC
"
3211 hevc_d3d12va_hwaccel_select="hevc_decoder
"
3212 hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC
"
3213 hevc_dxva2_hwaccel_select="hevc_decoder
"
3214 hevc_nvdec_hwaccel_deps="nvdec
"
3215 hevc_nvdec_hwaccel_select="hevc_decoder
"
3216 hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC
"
3217 hevc_vaapi_hwaccel_select="hevc_decoder
"
3218 hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC
"
3219 hevc_vdpau_hwaccel_select="hevc_decoder
"
3220 hevc_videotoolbox_hwaccel_deps="videotoolbox
"
3221 hevc_videotoolbox_hwaccel_select="hevc_decoder
"
3222 hevc_vulkan_hwaccel_deps="vulkan
"
3223 hevc_vulkan_hwaccel_select="hevc_decoder
"
3224 mjpeg_nvdec_hwaccel_deps="nvdec
"
3225 mjpeg_nvdec_hwaccel_select="mjpeg_decoder
"
3226 mjpeg_vaapi_hwaccel_deps="vaapi
"
3227 mjpeg_vaapi_hwaccel_select="mjpeg_decoder
"
3228 mpeg1_nvdec_hwaccel_deps="nvdec
"
3229 mpeg1_nvdec_hwaccel_select="mpeg1video_decoder
"
3230 mpeg1_vdpau_hwaccel_deps="vdpau
"
3231 mpeg1_vdpau_hwaccel_select="mpeg1video_decoder
"
3232 mpeg1_videotoolbox_hwaccel_deps="videotoolbox
"
3233 mpeg1_videotoolbox_hwaccel_select="mpeg1video_decoder
"
3234 mpeg2_d3d11va_hwaccel_deps="d3d11va
"
3235 mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder
"
3236 mpeg2_d3d11va2_hwaccel_deps="d3d11va
"
3237 mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder
"
3238 mpeg2_d3d12va_hwaccel_deps="d3d12va
"
3239 mpeg2_d3d12va_hwaccel_select="mpeg2video_decoder
"
3240 mpeg2_dxva2_hwaccel_deps="dxva2
"
3241 mpeg2_dxva2_hwaccel_select="mpeg2video_decoder
"
3242 mpeg2_nvdec_hwaccel_deps="nvdec
"
3243 mpeg2_nvdec_hwaccel_select="mpeg2video_decoder
"
3244 mpeg2_vaapi_hwaccel_deps="vaapi
"
3245 mpeg2_vaapi_hwaccel_select="mpeg2video_decoder
"
3246 mpeg2_vdpau_hwaccel_deps="vdpau
"
3247 mpeg2_vdpau_hwaccel_select="mpeg2video_decoder
"
3248 mpeg2_videotoolbox_hwaccel_deps="videotoolbox
"
3249 mpeg2_videotoolbox_hwaccel_select="mpeg2video_decoder
"
3250 mpeg4_nvdec_hwaccel_deps="nvdec
"
3251 mpeg4_nvdec_hwaccel_select="mpeg4_decoder
"
3252 mpeg4_vaapi_hwaccel_deps="vaapi
"
3253 mpeg4_vaapi_hwaccel_select="mpeg4_decoder
"
3254 mpeg4_vdpau_hwaccel_deps="vdpau
"
3255 mpeg4_vdpau_hwaccel_select="mpeg4_decoder
"
3256 mpeg4_videotoolbox_hwaccel_deps="videotoolbox
"
3257 mpeg4_videotoolbox_hwaccel_select="mpeg4_decoder
"
3258 prores_videotoolbox_hwaccel_deps="videotoolbox
"
3259 prores_videotoolbox_hwaccel_select="prores_decoder
"
3260 vc1_d3d11va_hwaccel_deps="d3d11va
"
3261 vc1_d3d11va_hwaccel_select="vc1_decoder
"
3262 vc1_d3d11va2_hwaccel_deps="d3d11va
"
3263 vc1_d3d11va2_hwaccel_select="vc1_decoder
"
3264 vc1_d3d12va_hwaccel_deps="d3d12va
"
3265 vc1_d3d12va_hwaccel_select="vc1_decoder
"
3266 vc1_dxva2_hwaccel_deps="dxva2
"
3267 vc1_dxva2_hwaccel_select="vc1_decoder
"
3268 vc1_nvdec_hwaccel_deps="nvdec
"
3269 vc1_nvdec_hwaccel_select="vc1_decoder
"
3270 vc1_vaapi_hwaccel_deps="vaapi
"
3271 vc1_vaapi_hwaccel_select="vc1_decoder
"
3272 vc1_vdpau_hwaccel_deps="vdpau
"
3273 vc1_vdpau_hwaccel_select="vc1_decoder
"
3274 vp8_nvdec_hwaccel_deps="nvdec
"
3275 vp8_nvdec_hwaccel_select="vp8_decoder
"
3276 vp8_vaapi_hwaccel_deps="vaapi
"
3277 vp8_vaapi_hwaccel_select="vp8_decoder
"
3278 vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9
"
3279 vp9_d3d11va_hwaccel_select="vp9_decoder
"
3280 vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9
"
3281 vp9_d3d11va2_hwaccel_select="vp9_decoder
"
3282 vp9_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_VP9
"
3283 vp9_d3d12va_hwaccel_select="vp9_decoder
"
3284 vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9
"
3285 vp9_dxva2_hwaccel_select="vp9_decoder
"
3286 vp9_nvdec_hwaccel_deps="nvdec
"
3287 vp9_nvdec_hwaccel_select="vp9_decoder
"
3288 vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth
"
3289 vp9_vaapi_hwaccel_select="vp9_decoder
"
3290 vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9
"
3291 vp9_vdpau_hwaccel_select="vp9_decoder
"
3292 vp9_videotoolbox_hwaccel_deps="videotoolbox
"
3293 vp9_videotoolbox_hwaccel_select="vp9_decoder
"
3294 vvc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferVVC
"
3295 vvc_vaapi_hwaccel_select="vvc_decoder
"
3296 wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel
"
3297 wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel
"
3298 wmv3_d3d12va_hwaccel_select="vc1_d3d12va_hwaccel
"
3299 wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel
"
3300 wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel
"
3301 wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel
"
3302 wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel
"
3304 # hardware-accelerated codecs
3305 d3d12va_encode_deps="d3d12va ID3D12VideoEncoder d3d12_encoder_feature
"
3306 mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer
"
3307 omx_deps="libdl pthreads
"
3308 omx_rpi_select="omx
"
3313 vaapi_encode_deps="vaapi
"
3314 vulkan_encode_deps="vulkan
"
3315 v4l2_m2m_deps="linux_videodev2_h sem_timedwait
"
3317 bilateral_cuda_filter_deps="ffnvcodec
"
3318 bilateral_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3319 chromakey_cuda_filter_deps="ffnvcodec
"
3320 chromakey_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3321 colorspace_cuda_filter_deps="ffnvcodec
"
3322 colorspace_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3323 hwupload_cuda_filter_deps="ffnvcodec
"
3324 scale_npp_filter_deps="ffnvcodec libnpp
"
3325 scale2ref_npp_filter_deps="ffnvcodec libnpp
"
3326 scale_cuda_filter_deps="ffnvcodec
"
3327 scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3328 thumbnail_cuda_filter_deps="ffnvcodec
"
3329 thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3330 transpose_npp_filter_deps="ffnvcodec libnpp
"
3331 overlay_cuda_filter_deps="ffnvcodec
"
3332 overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3333 sharpen_npp_filter_deps="ffnvcodec libnpp
"
3335 ddagrab_filter_deps="d3d11va IDXGIOutput1 DXGI_OUTDUPL_FRAME_INFO
"
3337 amf_deps_any="libdl LoadLibrary
"
3338 nvenc_deps="ffnvcodec
"
3339 nvenc_deps_any="libdl LoadLibrary
"
3341 aac_mediacodec_decoder_deps="mediacodec
"
3342 aac_mediacodec_decoder_select="aac_adtstoasc_bsf aac_parser
"
3343 aac_mf_encoder_deps="mediafoundation
"
3344 ac3_mf_encoder_deps="mediafoundation
"
3345 amrnb_mediacodec_decoder_deps="mediacodec
"
3346 amrnb_mediacodec_decoder_select="amr_parser
"
3347 amrwb_mediacodec_decoder_deps="mediacodec
"
3348 amrwb_mediacodec_decoder_select="amr_parser
"
3349 av1_amf_encoder_deps="amf
"
3350 av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS
"
3351 av1_mediacodec_decoder_deps="mediacodec
"
3352 av1_mediacodec_encoder_deps="mediacodec
"
3353 av1_mediacodec_encoder_select="extract_extradata_bsf
"
3354 av1_mf_encoder_deps="mediafoundation
"
3355 av1_nvenc_encoder_deps="nvenc NV_ENC_PIC_PARAMS_AV1
"
3356 av1_nvenc_encoder_select="atsc_a53
"
3357 av1_qsv_decoder_select="qsvdec
"
3358 av1_qsv_encoder_deps="libvpl
"
3359 av1_qsv_encoder_select="qsvenc
"
3360 av1_vaapi_encoder_deps="VAEncPictureParameterBufferAV1
"
3361 av1_vaapi_encoder_select="cbs_av1 vaapi_encode
"
3362 h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m
"
3363 h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m
"
3364 h264_amf_encoder_deps="amf
"
3365 h264_cuvid_decoder_deps="cuvid
"
3366 h264_cuvid_decoder_select="h264_mp4toannexb_bsf
"
3367 h264_mediacodec_decoder_deps="mediacodec
"
3368 h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser
"
3369 h264_mediacodec_encoder_deps="mediacodec
"
3370 h264_mediacodec_encoder_select="extract_extradata_bsf h264_metadata
"
3371 h264_mf_encoder_deps="mediafoundation
"
3372 h264_mmal_decoder_deps="mmal
"
3373 h264_nvenc_encoder_deps="nvenc
"
3374 h264_nvenc_encoder_select="atsc_a53
"
3375 h264_omx_encoder_deps="omx
"
3376 h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec
"
3377 h264_qsv_encoder_select="atsc_a53 qsvenc
"
3378 h264_rkmpp_decoder_deps="rkmpp
"
3379 h264_rkmpp_decoder_select="h264_mp4toannexb_bsf
"
3380 h264_vaapi_encoder_select="atsc_a53 cbs_h264 vaapi_encode
"
3381 h264_vulkan_encoder_select="cbs_h264 vulkan_encode
"
3382 h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m
"
3383 h264_v4l2m2m_decoder_select="h264_mp4toannexb_bsf
"
3384 h264_v4l2m2m_encoder_deps="v4l2_m2m h264_v4l2_m2m
"
3385 hevc_amf_encoder_deps="amf
"
3386 hevc_cuvid_decoder_deps="cuvid
"
3387 hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf
"
3388 hevc_d3d12va_encoder_select="cbs_h265 d3d12va_encode
"
3389 hevc_mediacodec_decoder_deps="mediacodec
"
3390 hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser
"
3391 hevc_mediacodec_encoder_deps="mediacodec
"
3392 hevc_mediacodec_encoder_select="extract_extradata_bsf hevc_metadata
"
3393 hevc_mf_encoder_deps="mediafoundation
"
3394 hevc_nvenc_encoder_deps="nvenc
"
3395 hevc_nvenc_encoder_select="atsc_a53
"
3396 hevc_qsv_decoder_select="hevc_mp4toannexb_bsf qsvdec
"
3397 hevc_qsv_encoder_select="hevcparse qsvenc
"
3398 hevc_rkmpp_decoder_deps="rkmpp
"
3399 hevc_rkmpp_decoder_select="hevc_mp4toannexb_bsf
"
3400 hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC
"
3401 hevc_vaapi_encoder_select="atsc_a53 cbs_h265 vaapi_encode
"
3402 hevc_vulkan_encoder_select="atsc_a53 cbs_h265 vulkan_encode
"
3403 hevc_v4l2m2m_decoder_deps="v4l2_m2m hevc_v4l2_m2m
"
3404 hevc_v4l2m2m_decoder_select="hevc_mp4toannexb_bsf
"
3405 hevc_v4l2m2m_encoder_deps="v4l2_m2m hevc_v4l2_m2m
"
3406 mjpeg_cuvid_decoder_deps="cuvid
"
3407 mjpeg_qsv_decoder_select="qsvdec
"
3408 mjpeg_qsv_encoder_deps="libmfx
"
3409 mjpeg_qsv_encoder_select="qsvenc
"
3410 mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG
"
3411 mjpeg_vaapi_encoder_select="cbs_jpeg jpegtables vaapi_encode
"
3412 mp3_mf_encoder_deps="mediafoundation
"
3413 mp3_mediacodec_decoder_deps="mediacodec
"
3414 mp3_mediacodec_decoder_select="mpegaudioheader
"
3415 mpeg1_cuvid_decoder_deps="cuvid
"
3416 mpeg1_v4l2m2m_decoder_deps="v4l2_m2m mpeg1_v4l2_m2m
"
3417 mpeg2_cuvid_decoder_deps="cuvid
"
3418 mpeg2_mmal_decoder_deps="mmal
"
3419 mpeg2_mediacodec_decoder_deps="mediacodec
"
3420 mpeg2_qsv_decoder_select="qsvdec
"
3421 mpeg2_qsv_encoder_select="qsvenc
"
3422 mpeg2_vaapi_encoder_select="cbs_mpeg2 vaapi_encode
"
3423 mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m
"
3424 mpeg4_cuvid_decoder_deps="cuvid
"
3425 mpeg4_mediacodec_decoder_deps="mediacodec
"
3426 mpeg4_mediacodec_encoder_deps="mediacodec
"
3427 mpeg4_mediacodec_encoder_select="extract_extradata_bsf
"
3428 mpeg4_mmal_decoder_deps="mmal
"
3429 mpeg4_omx_encoder_deps="omx
"
3430 mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m
"
3431 mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m
"
3432 vc1_cuvid_decoder_deps="cuvid
"
3433 vc1_mmal_decoder_deps="mmal
"
3434 vc1_qsv_decoder_select="qsvdec
"
3435 vc1_v4l2m2m_decoder_deps="v4l2_m2m vc1_v4l2_m2m
"
3436 vp8_cuvid_decoder_deps="cuvid
"
3437 vp8_mediacodec_decoder_deps="mediacodec
"
3438 vp8_mediacodec_encoder_deps="mediacodec
"
3439 vp8_qsv_decoder_select="qsvdec
"
3440 vp8_rkmpp_decoder_deps="rkmpp
"
3441 vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8
"
3442 vp8_vaapi_encoder_select="vaapi_encode
"
3443 vp8_v4l2m2m_decoder_deps="v4l2_m2m vp8_v4l2_m2m
"
3444 vp8_v4l2m2m_encoder_deps="v4l2_m2m vp8_v4l2_m2m
"
3445 vp9_cuvid_decoder_deps="cuvid
"
3446 vp9_mediacodec_decoder_deps="mediacodec
"
3447 vp9_mediacodec_encoder_deps="mediacodec
"
3448 vp9_qsv_decoder_select="qsvdec
"
3449 vp9_rkmpp_decoder_deps="rkmpp
"
3450 vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9
"
3451 vp9_vaapi_encoder_select="vaapi_encode
"
3452 vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9
"
3453 vp9_qsv_encoder_select="qsvenc
"
3454 vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m
"
3455 vvc_qsv_decoder_select="vvc_mp4toannexb_bsf qsvdec
"
3458 aac_parser_select="adts_header mpeg4audio
"
3459 av1_parser_select="cbs_av1
"
3460 evc_parser_select="evcparse
"
3461 ftr_parser_select="adts_header mpeg4audio
"
3462 h264_parser_select="golomb h264dsp h264parse h264_sei
"
3463 hevc_parser_select="hevcparse hevc_sei
"
3464 mpegaudio_parser_select="mpegaudioheader
"
3465 mpeg4video_parser_select="h263dsp mpegvideodec qpeldsp
"
3466 vc1_parser_select="vc1dsp
"
3467 vvc_parser_select="cbs_h266
"
3470 aac_adtstoasc_bsf_select="adts_header mpeg4audio
"
3471 av1_frame_merge_bsf_select="cbs_av1
"
3472 av1_frame_split_bsf_select="cbs_av1
"
3473 av1_metadata_bsf_select="cbs_av1
"
3474 dovi_rpu_bsf_select="cbs_h265 cbs_av1 dovi_rpudec dovi_rpuenc
"
3475 dts2pts_bsf_select="cbs_h264 h264parse
"
3476 eac3_core_bsf_select="ac3_parser
"
3477 evc_frame_merge_bsf_select="evcparse
"
3478 filter_units_bsf_select="cbs
"
3479 h264_metadata_bsf_deps="const_nan
"
3480 h264_metadata_bsf_select="cbs_h264
"
3481 h264_redundant_pps_bsf_select="cbs_h264
"
3482 hevc_metadata_bsf_select="cbs_h265
"
3483 mjpeg2jpeg_bsf_select="jpegtables
"
3484 mpeg2_metadata_bsf_select="cbs_mpeg2
"
3485 trace_headers_bsf_select="cbs cbs_vp8
"
3486 vp9_metadata_bsf_select="cbs_vp9
"
3487 vvc_metadata_bsf_select="cbs_h266
"
3489 # external libraries
3490 aac_at_decoder_deps="audiotoolbox
"
3491 aac_at_decoder_select="aac_adtstoasc_bsf
"
3492 ac3_at_decoder_deps="audiotoolbox
"
3493 ac3_at_decoder_select="ac3_parser
"
3494 adpcm_ima_qt_at_decoder_deps="audiotoolbox
"
3495 alac_at_decoder_deps="audiotoolbox
"
3496 amr_nb_at_decoder_deps="audiotoolbox
"
3497 avisynth_deps_any="libdl LoadLibrary
"
3498 avisynth_demuxer_deps="avisynth
"
3499 avisynth_demuxer_select="riffdec
"
3500 eac3_at_decoder_deps="audiotoolbox
"
3501 eac3_at_decoder_select="ac3_parser
"
3502 gsm_ms_at_decoder_deps="audiotoolbox
"
3503 ilbc_at_decoder_deps="audiotoolbox
"
3504 mp1_at_decoder_deps="audiotoolbox
"
3505 mp2_at_decoder_deps="audiotoolbox
"
3506 mp3_at_decoder_deps="audiotoolbox
"
3507 mp1_at_decoder_select="mpegaudioheader
"
3508 mp2_at_decoder_select="mpegaudioheader
"
3509 mp3_at_decoder_select="mpegaudioheader
"
3510 pcm_alaw_at_decoder_deps="audiotoolbox
"
3511 pcm_mulaw_at_decoder_deps="audiotoolbox
"
3512 qdmc_at_decoder_deps="audiotoolbox
"
3513 qdm2_at_decoder_deps="audiotoolbox
"
3514 aac_at_encoder_deps="audiotoolbox
"
3515 aac_at_encoder_select="audio_frame_queue
"
3516 alac_at_encoder_deps="audiotoolbox
"
3517 alac_at_encoder_select="audio_frame_queue
"
3518 ilbc_at_encoder_deps="audiotoolbox
"
3519 ilbc_at_encoder_select="audio_frame_queue
"
3520 pcm_alaw_at_encoder_deps="audiotoolbox
"
3521 pcm_alaw_at_encoder_select="audio_frame_queue
"
3522 pcm_mulaw_at_encoder_deps="audiotoolbox
"
3523 pcm_mulaw_at_encoder_select="audio_frame_queue
"
3524 chromaprint_muxer_deps="chromaprint
"
3525 h264_videotoolbox_encoder_deps="pthreads
"
3526 h264_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder
"
3527 hevc_videotoolbox_encoder_deps="pthreads
"
3528 hevc_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder
"
3529 prores_videotoolbox_encoder_deps="pthreads
"
3530 prores_videotoolbox_encoder_select="videotoolbox_encoder
"
3531 libaom_av1_decoder_deps="libaom
"
3532 libaom_av1_encoder_deps="libaom
"
3533 libaom_av1_encoder_select="extract_extradata_bsf dovi_rpuenc
"
3534 libaribb24_decoder_deps="libaribb24
"
3535 libaribcaption_decoder_deps="libaribcaption
"
3536 libcelt_decoder_deps="libcelt
"
3537 libcodec2_decoder_deps="libcodec2
"
3538 libcodec2_encoder_deps="libcodec2
"
3539 libdav1d_decoder_deps="libdav1d
"
3540 libdav1d_decoder_select="atsc_a53 dovi_rpudec
"
3541 libdavs2_decoder_deps="libdavs2
"
3542 libdavs2_decoder_select="avs2_parser
"
3543 libfdk_aac_decoder_deps="libfdk_aac
"
3544 libfdk_aac_encoder_deps="libfdk_aac
"
3545 libfdk_aac_encoder_select="audio_frame_queue
"
3546 libgme_demuxer_deps="libgme
"
3547 libgsm_decoder_deps="libgsm
"
3548 libgsm_encoder_deps="libgsm
"
3549 libgsm_ms_decoder_deps="libgsm
"
3550 libgsm_ms_encoder_deps="libgsm
"
3551 libilbc_decoder_deps="libilbc
"
3552 libilbc_encoder_deps="libilbc
"
3553 libjxl_decoder_deps="libjxl libjxl_threads
"
3554 libjxl_encoder_deps="libjxl libjxl_threads
"
3555 libkvazaar_encoder_deps="libkvazaar
"
3556 liblc3_decoder_deps="liblc3
"
3557 liblc3_encoder_deps="liblc3
"
3558 liblc3_encoder_select="audio_frame_queue
"
3559 libmodplug_demuxer_deps="libmodplug
"
3560 libmp3lame_encoder_deps="libmp3lame
"
3561 libmp3lame_encoder_select="audio_frame_queue mpegaudioheader
"
3562 libopencore_amrnb_decoder_deps="libopencore_amrnb
"
3563 libopencore_amrnb_encoder_deps="libopencore_amrnb
"
3564 libopencore_amrnb_encoder_select="audio_frame_queue
"
3565 libopencore_amrwb_decoder_deps="libopencore_amrwb
"
3566 libopenh264_decoder_deps="libopenh264
"
3567 libopenh264_decoder_select="h264_mp4toannexb_bsf
"
3568 libopenh264_encoder_deps="libopenh264
"
3569 libopenjpeg_encoder_deps="libopenjpeg
"
3570 libopenmpt_demuxer_deps="libopenmpt
"
3571 libopus_decoder_deps="libopus
"
3572 libopus_encoder_deps="libopus
"
3573 libopus_encoder_select="audio_frame_queue
"
3574 librav1e_encoder_deps="librav1e
"
3575 librsvg_decoder_deps="librsvg
"
3576 libshine_encoder_deps="libshine
"
3577 libshine_encoder_select="audio_frame_queue mpegaudioheader
"
3578 libspeex_decoder_deps="libspeex
"
3579 libspeex_encoder_deps="libspeex
"
3580 libspeex_encoder_select="audio_frame_queue
"
3581 libsvtav1_encoder_deps="libsvtav1
"
3582 libsvtav1_encoder_select="dovi_rpuenc
"
3583 libtheora_encoder_deps="libtheora
"
3584 libtwolame_encoder_deps="libtwolame
"
3585 libuavs3d_decoder_deps="libuavs3d
"
3586 libvo_amrwbenc_encoder_deps="libvo_amrwbenc
"
3587 libvorbis_decoder_deps="libvorbis
"
3588 libvorbis_encoder_deps="libvorbis libvorbisenc
"
3589 libvorbis_encoder_select="audio_frame_queue
"
3590 libvpx_vp8_decoder_deps="libvpx
"
3591 libvpx_vp8_encoder_deps="libvpx
"
3592 libvpx_vp9_decoder_deps="libvpx
"
3593 libvpx_vp9_encoder_deps="libvpx
"
3594 libvvenc_encoder_deps="libvvenc
"
3595 libwebp_encoder_deps="libwebp
"
3596 libwebp_anim_encoder_deps="libwebp
"
3597 libx262_encoder_deps="libx262
"
3598 libx264_encoder_deps="libx264
"
3599 libx264_encoder_select="atsc_a53 golomb
"
3600 libx264rgb_encoder_deps="libx264
"
3601 libx264rgb_encoder_select="libx264_encoder
"
3602 libx265_encoder_deps="libx265
"
3603 libx265_encoder_select="atsc_a53 dovi_rpuenc
"
3604 libxavs_encoder_deps="libxavs
"
3605 libxavs2_encoder_deps="libxavs2
"
3606 libxevd_decoder_deps="libxevd
"
3607 libxeve_encoder_deps="libxeve
"
3608 libxvid_encoder_deps="libxvid
"
3609 libzvbi_teletext_decoder_deps="libzvbi
"
3610 vapoursynth_demuxer_deps="vapoursynth
"
3611 videotoolbox_suggest="coreservices
"
3612 videotoolbox_deps="corefoundation coremedia corevideo
"
3613 videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames
"
3616 ac3_demuxer_select="ac3_parser
"
3617 act_demuxer_select="riffdec
"
3618 adts_muxer_select="mpeg4audio
"
3619 aiff_muxer_select="iso_media
"
3620 amv_muxer_select="riffenc
"
3621 asf_demuxer_select="riffdec
"
3622 asf_o_demuxer_select="riffdec
"
3623 asf_muxer_select="riffenc
"
3624 asf_stream_muxer_select="asf_muxer
"
3625 av1_demuxer_select="av1_frame_merge_bsf av1_parser
"
3626 avi_demuxer_select="riffdec exif
"
3627 avi_muxer_select="riffenc
"
3628 avif_muxer_select="mov_muxer
"
3629 caf_demuxer_select="iso_media
"
3630 caf_muxer_select="iso_media
"
3631 dash_muxer_select="mp4_muxer
"
3632 dash_demuxer_deps="libxml2
"
3633 daud_muxer_select="pcm_rechunk_bsf
"
3634 dirac_demuxer_select="dirac_parser
"
3635 dts_demuxer_select="dca_parser
"
3636 dtshd_demuxer_select="dca_parser
"
3637 dv_demuxer_select="dvprofile
"
3638 dv_muxer_select="dvprofile
"
3639 dvdvideo_demuxer_select="mpegps_demuxer
"
3640 dvdvideo_demuxer_deps="libdvdnav libdvdread
"
3641 dxa_demuxer_select="riffdec
"
3642 eac3_demuxer_select="ac3_parser
"
3643 evc_demuxer_select="evc_frame_merge_bsf evc_parser
"
3644 f4v_muxer_select="mov_muxer
"
3645 fifo_muxer_deps="threads
"
3646 flac_demuxer_select="flac_parser
"
3647 flv_muxer_select="aac_adtstoasc_bsf iso_writer
"
3648 gxf_muxer_select="pcm_rechunk_bsf
"
3649 hds_muxer_select="flv_muxer
"
3650 hls_demuxer_select="aac_demuxer ac3_demuxer adts_header ac3_parser eac3_demuxer mov_demuxer mpegts_demuxer
"
3651 hls_muxer_select="mov_muxer mpegts_muxer
"
3652 iamf_demuxer_select="iamfdec
"
3653 iamf_muxer_select="iamfenc
"
3654 image2_alias_pix_demuxer_select="image2_demuxer
"
3655 image2_brender_pix_demuxer_select="image2_demuxer
"
3656 imf_demuxer_deps="libxml2
"
3657 imf_demuxer_select="mxf_demuxer
"
3658 ipod_muxer_select="mov_muxer
"
3659 ismv_muxer_select="mov_muxer
"
3660 ivf_muxer_select="av1_metadata_bsf vp9_superframe_bsf
"
3661 latm_muxer_select="aac_adtstoasc_bsf mpeg4audio
"
3662 matroska_audio_muxer_select="matroska_muxer
"
3663 matroska_demuxer_select="riffdec
"
3664 matroska_demuxer_suggest="bzlib zlib
"
3665 matroska_muxer_select="iso_writer mpeg4audio riffenc aac_adtstoasc_bsf pgs_frame_merge_bsf vp9_superframe_bsf
"
3666 mlp_demuxer_select="mlp_parser
"
3667 mmf_muxer_select="riffenc
"
3668 mov_demuxer_select="iso_media riffdec
"
3669 mov_demuxer_suggest="iamfdec zlib
"
3670 mov_muxer_select="iso_media iso_writer riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser
"
3671 mov_muxer_suggest="iamfenc
"
3672 mp3_demuxer_select="mpegaudio_parser
"
3673 mp3_muxer_select="mpegaudioheader
"
3674 mp4_muxer_select="mov_muxer
"
3675 mpegts_demuxer_select="iso_media
"
3676 mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf vvc_mp4toannexb_bsf
"
3677 mpegtsraw_demuxer_select="mpegts_demuxer
"
3678 mxf_muxer_select="iso_writer pcm_rechunk_bsf rangecoder
"
3679 mxf_d10_muxer_select="mxf_muxer
"
3680 mxf_opatom_muxer_select="mxf_muxer
"
3681 nut_muxer_select="riffenc
"
3682 nuv_demuxer_select="riffdec
"
3683 obu_demuxer_select="av1_frame_merge_bsf av1_parser
"
3684 obu_muxer_select="av1_metadata_bsf
"
3685 oga_muxer_select="ogg_muxer
"
3686 ogg_demuxer_select="dirac_parse
"
3687 ogv_muxer_select="ogg_muxer
"
3688 opus_muxer_select="ogg_muxer
"
3689 psp_muxer_select="mov_muxer
"
3690 rtp_demuxer_select="sdp_demuxer
"
3691 rtp_muxer_select="iso_writer
"
3692 rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer
"
3693 rtpdec_select="asf_demuxer mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp
"
3694 rtsp_demuxer_select="http_protocol rtpdec
"
3695 rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain
"
3696 sap_demuxer_select="sdp_demuxer
"
3697 sap_muxer_select="rtp_muxer rtp_protocol rtpenc_chain
"
3698 sdp_demuxer_select="rtpdec
"
3699 smoothstreaming_muxer_select="ismv_muxer
"
3700 spdif_demuxer_select="adts_header
"
3701 spdif_muxer_select="adts_header
"
3702 spx_muxer_select="ogg_muxer
"
3703 swf_demuxer_suggest="zlib
"
3704 tak_demuxer_select="tak_parser
"
3705 truehd_demuxer_select="mlp_parser
"
3706 tg2_muxer_select="mov_muxer
"
3707 tgp_muxer_select="mov_muxer
"
3708 vobsub_demuxer_select="mpegps_demuxer
"
3709 w64_demuxer_select="wav_demuxer
"
3710 w64_muxer_select="wav_muxer
"
3711 wav_demuxer_select="riffdec
"
3712 wav_muxer_select="riffenc
"
3713 webm_chunk_muxer_select="webm_muxer
"
3714 webm_dash_manifest_demuxer_select="matroska_demuxer
"
3715 wtv_demuxer_select="mpegts_demuxer riffdec
"
3716 wtv_muxer_select="mpegts_muxer riffenc
"
3717 xmv_demuxer_select="riffdec
"
3718 xwma_demuxer_select="riffdec
"
3721 android_camera_indev_deps="android camera2ndk mediandk pthreads
"
3722 alsa_indev_deps="alsa
"
3723 alsa_outdev_deps="alsa
"
3724 avfoundation_indev_deps="avfoundation corevideo coremedia pthreads
"
3725 avfoundation_indev_suggest="coregraphics applicationservices
"
3726 avfoundation_indev_extralibs="-framework Foundation
"
3727 audiotoolbox_outdev_deps="audiotoolbox pthreads
"
3728 audiotoolbox_outdev_extralibs="-framework AudioToolbox
-framework CoreAudio
"
3729 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h
"
3730 caca_outdev_deps="libcaca
"
3731 decklink_deps_any="libdl LoadLibrary
"
3732 decklink_indev_deps="decklink threads
"
3733 decklink_indev_extralibs="-lstdc++"
3734 decklink_indev_suggest="libzvbi
"
3735 decklink_outdev_deps="decklink threads
"
3736 decklink_outdev_suggest="libklvanc
"
3737 decklink_outdev_extralibs="-lstdc++"
3738 dshow_indev_deps="IBaseFilter
"
3739 dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid -loleaut32 -lshlwapi"
3740 fbdev_indev_deps="linux_fb_h
"
3741 fbdev_outdev_deps="linux_fb_h
"
3742 gdigrab_indev_deps="CreateDIBSection
"
3743 gdigrab_indev_extralibs="-lgdi32"
3744 gdigrab_indev_select="bmp_decoder
"
3745 iec61883_indev_deps="libiec61883
"
3746 iec61883_indev_select="dv_demuxer
"
3747 jack_indev_deps="libjack
"
3748 jack_indev_deps_any="sem_timedwait dispatch_dispatch_h
"
3749 kmsgrab_indev_deps="libdrm
"
3750 lavfi_indev_deps="avfilter
"
3751 libcdio_indev_deps="libcdio
"
3752 libdc1394_indev_deps="libdc1394
"
3753 openal_indev_deps="openal
"
3754 opengl_outdev_deps="opengl
"
3755 opengl_outdev_suggest="sdl2
"
3756 oss_indev_deps_any="sys_soundcard_h
"
3757 oss_outdev_deps_any="sys_soundcard_h
"
3758 pulse_indev_deps="libpulse
"
3759 pulse_outdev_deps="libpulse
"
3760 sdl2_outdev_deps="sdl2
"
3761 sndio_indev_deps="sndio
"
3762 sndio_outdev_deps="sndio
"
3763 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h
"
3764 v4l2_indev_suggest="libv4l2
"
3765 v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h
"
3766 v4l2_outdev_suggest="libv4l2
"
3767 vfwcap_indev_deps="vfw32 vfwcap_defines
"
3768 xcbgrab_indev_deps="libxcb
"
3769 xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes
"
3770 xv_outdev_deps="xlib_xv xlib_x11 xlib_xext
"
3773 android_content_protocol_deps="jni
"
3774 android_content_protocol_select="file_protocol
"
3775 async_protocol_deps="threads
"
3776 bluray_protocol_deps="libbluray
"
3777 ffrtmpcrypt_protocol_conflict="librtmp_protocol
"
3778 ffrtmpcrypt_protocol_deps_any="gcrypt gmp openssl mbedtls
"
3779 ffrtmpcrypt_protocol_select="tcp_protocol
"
3780 ffrtmphttp_protocol_conflict="librtmp_protocol
"
3781 ffrtmphttp_protocol_select="http_protocol
"
3782 ftp_protocol_select="tcp_protocol
"
3783 gopher_protocol_select="tcp_protocol
"
3784 gophers_protocol_select="tls_protocol
"
3785 http_protocol_select="tcp_protocol
"
3786 http_protocol_suggest="zlib
"
3787 httpproxy_protocol_select="tcp_protocol
"
3788 httpproxy_protocol_suggest="zlib
"
3789 https_protocol_select="tls_protocol
"
3790 https_protocol_suggest="zlib
"
3791 icecast_protocol_select="http_protocol
"
3792 mmsh_protocol_select="http_protocol
"
3793 mmst_protocol_select="network
"
3794 rtmp_protocol_conflict="librtmp_protocol
"
3795 rtmp_protocol_select="tcp_protocol
"
3796 rtmp_protocol_suggest="zlib
"
3797 rtmpe_protocol_select="ffrtmpcrypt_protocol
"
3798 rtmpe_protocol_suggest="zlib
"
3799 rtmps_protocol_conflict="librtmp_protocol
"
3800 rtmps_protocol_select="tls_protocol
"
3801 rtmps_protocol_suggest="zlib
"
3802 rtmpt_protocol_select="ffrtmphttp_protocol
"
3803 rtmpt_protocol_suggest="zlib
"
3804 rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol
"
3805 rtmpte_protocol_suggest="zlib
"
3806 rtmpts_protocol_select="ffrtmphttp_protocol https_protocol
"
3807 rtmpts_protocol_suggest="zlib
"
3808 rtp_protocol_select="udp_protocol
"
3809 schannel_conflict="openssl gnutls libtls mbedtls
"
3810 sctp_protocol_deps="struct_sctp_event_subscribe struct_msghdr_msg_flags
"
3811 sctp_protocol_select="network
"
3812 securetransport_conflict="openssl gnutls libtls mbedtls
"
3813 srtp_protocol_select="rtp_protocol srtp
"
3814 tcp_protocol_select="network
"
3815 tls_protocol_deps_any="gnutls openssl schannel securetransport libtls mbedtls
"
3816 tls_protocol_select="tcp_protocol
"
3817 udp_protocol_select="network
"
3818 udplite_protocol_select="network
"
3819 unix_protocol_deps="sys_un_h
"
3820 unix_protocol_select="network
"
3821 ipfs_gateway_protocol_select="https_protocol
"
3822 ipns_gateway_protocol_select="https_protocol
"
3824 # external library protocols
3825 libamqp_protocol_deps="librabbitmq
"
3826 libamqp_protocol_select="network
"
3827 librist_protocol_deps="librist
"
3828 librist_protocol_select="network
"
3829 librtmp_protocol_deps="librtmp
"
3830 librtmpe_protocol_deps="librtmp
"
3831 librtmps_protocol_deps="librtmp
"
3832 librtmpt_protocol_deps="librtmp
"
3833 librtmpte_protocol_deps="librtmp
"
3834 libsmbclient_protocol_deps="libsmbclient gplv3
"
3835 libsrt_protocol_deps="libsrt
"
3836 libsrt_protocol_select="network
"
3837 libssh_protocol_deps="libssh
"
3838 libtls_conflict="openssl gnutls mbedtls
"
3839 libzmq_protocol_deps="libzmq
"
3840 libzmq_protocol_select="network
"
3843 ametadata_filter_deps="avformat
"
3844 amovie_filter_deps="avcodec avformat
"
3845 aresample_filter_deps="swresample
"
3846 asr_filter_deps="pocketsphinx
"
3847 ass_filter_deps="libass
"
3848 avgblur_opencl_filter_deps="opencl
"
3849 avgblur_vulkan_filter_deps="vulkan spirv_compiler
"
3850 azmq_filter_deps="libzmq
"
3851 blackframe_filter_deps="gpl
"
3852 blend_vulkan_filter_deps="vulkan spirv_compiler
"
3853 boxblur_filter_deps="gpl
"
3854 boxblur_opencl_filter_deps="opencl gpl
"
3855 bs2b_filter_deps="libbs2b
"
3856 bwdif_cuda_filter_deps="ffnvcodec
"
3857 bwdif_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3858 bwdif_vulkan_filter_deps="vulkan spirv_compiler
"
3859 chromaber_vulkan_filter_deps="vulkan spirv_compiler
"
3860 color_vulkan_filter_deps="vulkan spirv_compiler
"
3861 colorkey_opencl_filter_deps="opencl
"
3862 colormatrix_filter_deps="gpl
"
3863 convolution_opencl_filter_deps="opencl
"
3864 coreimage_filter_deps="coreimage appkit
"
3865 coreimage_filter_extralibs="-framework OpenGL
"
3866 coreimagesrc_filter_deps="coreimage appkit
"
3867 coreimagesrc_filter_extralibs="-framework OpenGL
"
3868 cover_rect_filter_deps="avcodec avformat gpl
"
3869 cropdetect_filter_deps="gpl
"
3870 deinterlace_qsv_filter_deps="libmfx
"
3871 deinterlace_qsv_filter_select="qsvvpp
"
3872 deinterlace_vaapi_filter_deps="vaapi
"
3873 delogo_filter_deps="gpl
"
3874 denoise_vaapi_filter_deps="vaapi
"
3875 derain_filter_select="dnn
"
3876 deshake_filter_select="pixelutils
"
3877 deshake_opencl_filter_deps="opencl
"
3878 dilation_opencl_filter_deps="opencl
"
3879 dnn_classify_filter_select="dnn
"
3880 dnn_detect_filter_select="dnn
"
3881 dnn_processing_filter_select="dnn
"
3882 drawtext_filter_deps="libfreetype libharfbuzz
"
3883 drawtext_filter_suggest="libfontconfig libfribidi
"
3884 elbg_filter_deps="avcodec
"
3885 eq_filter_deps="gpl
"
3886 erosion_opencl_filter_deps="opencl
"
3887 find_rect_filter_deps="avcodec avformat gpl
"
3888 flip_vulkan_filter_deps="vulkan spirv_compiler
"
3889 flite_filter_deps="libflite threads
"
3890 framerate_filter_select="scene_sad
"
3891 freezedetect_filter_select="scene_sad
"
3892 frei0r_deps_any="libdl LoadLibrary
"
3893 frei0r_filter_deps="frei0r
"
3894 frei0r_src_filter_deps="frei0r
"
3895 fspp_filter_deps="gpl
"
3896 fsync_filter_deps="avformat
"
3897 gblur_vulkan_filter_deps="vulkan spirv_compiler
"
3898 hflip_vulkan_filter_deps="vulkan spirv_compiler
"
3899 histeq_filter_deps="gpl
"
3900 hqdn3d_filter_deps="gpl
"
3901 iccdetect_filter_deps="lcms2
"
3902 iccgen_filter_deps="lcms2
"
3903 identity_filter_select="scene_sad
"
3904 interlace_filter_deps="gpl
"
3905 kerndeint_filter_deps="gpl
"
3906 ladspa_filter_deps="ladspa libdl
"
3907 lcevc_filter_deps="liblcevc_dec
"
3908 lensfun_filter_deps="liblensfun version3
"
3909 libplacebo_filter_deps="libplacebo vulkan
"
3910 lv2_filter_deps="lv2
"
3911 mcdeint_filter_deps="avcodec gpl
"
3912 metadata_filter_deps="avformat
"
3913 movie_filter_deps="avcodec avformat
"
3914 mpdecimate_filter_deps="gpl
"
3915 mpdecimate_filter_select="pixelutils
"
3916 minterpolate_filter_select="scene_sad
"
3917 mptestsrc_filter_deps="gpl
"
3918 msad_filter_select="scene_sad
"
3919 negate_filter_deps="lut_filter
"
3920 nlmeans_opencl_filter_deps="opencl
"
3921 nlmeans_vulkan_filter_deps="vulkan spirv_compiler
"
3922 nnedi_filter_deps="gpl
"
3923 ocr_filter_deps="libtesseract
"
3924 ocv_filter_deps="libopencv
"
3925 openclsrc_filter_deps="opencl
"
3926 qrencode_filter_deps="libqrencode
"
3927 qrencodesrc_filter_deps="libqrencode
"
3928 quirc_filter_deps="libquirc
"
3929 overlay_opencl_filter_deps="opencl
"
3930 overlay_qsv_filter_deps="libmfx
"
3931 overlay_qsv_filter_select="qsvvpp
"
3932 overlay_vaapi_filter_deps="vaapi VAProcPipelineCaps_blend_flags
"
3933 overlay_vulkan_filter_deps="vulkan spirv_compiler
"
3934 owdenoise_filter_deps="gpl
"
3935 pad_opencl_filter_deps="opencl
"
3936 pan_filter_deps="swresample
"
3937 perspective_filter_deps="gpl
"
3938 phase_filter_deps="gpl
"
3939 pp7_filter_deps="gpl
"
3940 pp_filter_deps="gpl postproc
"
3941 prewitt_opencl_filter_deps="opencl
"
3942 procamp_vaapi_filter_deps="vaapi
"
3943 program_opencl_filter_deps="opencl
"
3944 pullup_filter_deps="gpl
"
3945 remap_opencl_filter_deps="opencl
"
3946 removelogo_filter_deps="avcodec avformat swscale
"
3947 repeatfields_filter_deps="gpl
"
3948 roberts_opencl_filter_deps="opencl
"
3949 rubberband_filter_deps="librubberband
"
3950 sab_filter_deps="gpl swscale
"
3951 scale2ref_filter_deps="swscale
"
3952 scale_filter_deps="swscale
"
3953 scale_qsv_filter_deps="libmfx
"
3954 scale_qsv_filter_select="qsvvpp
"
3955 scdet_filter_select="scene_sad
"
3956 select_filter_select="scene_sad
"
3957 sharpness_vaapi_filter_deps="vaapi
"
3958 showcqt_filter_deps="avformat swscale
"
3959 showcqt_filter_suggest="libfontconfig libfreetype
"
3960 signature_filter_deps="gpl avcodec avformat
"
3961 smartblur_filter_deps="gpl swscale
"
3962 sobel_opencl_filter_deps="opencl
"
3963 sofalizer_filter_deps="libmysofa
"
3964 spp_filter_deps="gpl avcodec
"
3965 spp_filter_select="idctdsp fdctdsp me_cmp pixblockdsp
"
3966 sr_filter_deps="avformat swscale
"
3967 sr_filter_select="dnn
"
3968 stereo3d_filter_deps="gpl
"
3969 subtitles_filter_deps="avformat avcodec libass
"
3970 super2xsai_filter_deps="gpl
"
3971 pixfmts_super2xsai_test_deps="super2xsai_filter
"
3972 tinterlace_filter_deps="gpl
"
3973 tinterlace_merge_test_deps="tinterlace_filter
"
3974 tinterlace_pad_test_deps="tinterlace_filter
"
3975 tonemap_filter_deps="const_nan
"
3976 tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping
"
3977 tonemap_opencl_filter_deps="opencl const_nan
"
3978 transpose_opencl_filter_deps="opencl
"
3979 transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags
"
3980 transpose_vt_filter_deps="videotoolbox VTPixelRotationSessionCreate
"
3981 transpose_vulkan_filter_deps="vulkan spirv_compiler
"
3982 unsharp_opencl_filter_deps="opencl
"
3983 uspp_filter_deps="gpl avcodec
"
3984 vaguedenoiser_filter_deps="gpl
"
3985 vflip_vulkan_filter_deps="vulkan spirv_compiler
"
3986 vidstabdetect_filter_deps="libvidstab
"
3987 vidstabtransform_filter_deps="libvidstab
"
3988 libvmaf_filter_deps="libvmaf
"
3989 libvmaf_cuda_filter_deps="libvmaf libvmaf_cuda ffnvcodec
"
3990 zmq_filter_deps="libzmq
"
3991 zoompan_filter_deps="swscale
"
3992 zscale_filter_deps="libzimg const_nan
"
3993 scale_vaapi_filter_deps="vaapi
"
3994 scale_vt_filter_deps="videotoolbox VTPixelTransferSessionCreate
"
3995 scale_vulkan_filter_deps="vulkan spirv_compiler
"
3996 vpp_qsv_filter_deps="libmfx
"
3997 vpp_qsv_filter_select="qsvvpp
"
3998 xfade_opencl_filter_deps="opencl
"
3999 xfade_vulkan_filter_deps="vulkan spirv_compiler
"
4000 yadif_cuda_filter_deps="ffnvcodec
"
4001 yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
4002 yadif_videotoolbox_filter_deps="metal corevideo videotoolbox
"
4003 hstack_vaapi_filter_deps="vaapi_1
"
4004 vstack_vaapi_filter_deps="vaapi_1
"
4005 xstack_vaapi_filter_deps="vaapi_1
"
4006 hstack_qsv_filter_deps="libmfx
"
4007 hstack_qsv_filter_select="qsvvpp
"
4008 vstack_qsv_filter_deps="libmfx
"
4009 vstack_qsv_filter_select="qsvvpp
"
4010 xstack_qsv_filter_deps="libmfx
"
4011 xstack_qsv_filter_select="qsvvpp
"
4012 pad_vaapi_filter_deps="vaapi_1
"
4013 drawbox_vaapi_filter_deps="vaapi_1
"
4016 avio_http_serve_files_deps="avformat avutil fork
"
4017 avio_list_dir_deps="avformat avutil
"
4018 avio_read_callback_deps="avformat avcodec avutil
"
4019 decode_audio_example_deps="avcodec avutil
"
4020 decode_filter_audio_example_deps="avfilter avcodec avformat avutil
"
4021 decode_filter_video_example_deps="avfilter avcodec avformat avutil
"
4022 decode_video_example_deps="avcodec avutil
"
4023 demux_decode_example_deps="avcodec avformat avutil
"
4024 encode_audio_example_deps="avcodec avutil
"
4025 encode_video_example_deps="avcodec avutil
"
4026 extract_mvs_example_deps="avcodec avformat avutil
"
4027 filter_audio_example_deps="avfilter avutil
"
4028 hw_decode_example_deps="avcodec avformat avutil
"
4029 mux_example_deps="avcodec avformat avutil swscale
"
4030 qsv_decode_example_deps="avcodec avutil libmfx h264_qsv_decoder
"
4031 remux_example_deps="avcodec avformat avutil
"
4032 resample_audio_example_deps="avutil swresample
"
4033 scale_video_example_deps="avutil swscale
"
4034 show_metadata_example_deps="avformat avutil
"
4035 transcode_aac_example_deps="avcodec avformat swresample
"
4036 transcode_example_deps="avfilter avcodec avformat avutil
"
4037 vaapi_encode_example_deps="avcodec avutil h264_vaapi_encoder
"
4038 vaapi_transcode_example_deps="avcodec avformat avutil h264_vaapi_encoder
"
4039 qsv_transcode_example_deps="avcodec avformat avutil h264_qsv_encoder
"
4042 cpu_init_extralibs="pthreads_extralibs
"
4043 cws2fws_extralibs="zlib_extralibs
"
4045 # libraries, in any order
4046 avcodec_deps="avutil
"
4047 avcodec_suggest="libm stdatomic spirv_compiler
"
4048 avdevice_deps="avformat avcodec avutil
"
4049 avdevice_suggest="libm stdatomic
"
4050 avfilter_deps="avutil
"
4051 avfilter_suggest="libm stdatomic spirv_compiler
"
4052 avformat_deps="avcodec avutil
"
4053 avformat_suggest="libm network zlib stdatomic
"
4054 avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx opencl openssl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic
"
4055 postproc_deps="avutil gpl
"
4056 postproc_suggest="libm stdatomic
"
4057 swresample_deps="avutil
"
4058 swresample_suggest="libm libsoxr stdatomic
"
4059 swscale_deps="avutil
"
4060 swscale_suggest="libm stdatomic
"
4062 avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs liblcevc_dec_extralibs lcms2_extralibs
"
4063 avfilter_extralibs="pthreads_extralibs
"
4064 avutil_extralibs="d3d11va_extralibs d3d12va_extralibs mediacodec_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vaapi_win32_extralibs vdpau_x11_extralibs
"
4067 ffmpeg_deps="avcodec avfilter avformat threads
"
4068 ffmpeg_select="aformat_filter anull_filter atrim_filter crop_filter
4069 format_filter hflip_filter null_filter rotate_filter
4070 transpose_filter trim_filter vflip_filter
"
4071 ffmpeg_suggest="ole32 psapi shell32
"
4072 ffplay_deps="avcodec avformat avfilter swscale swresample sdl2
"
4073 ffplay_select="crop_filter transpose_filter hflip_filter vflip_filter rotate_filter
"
4074 ffplay_suggest="shell32 libplacebo vulkan
"
4075 ffprobe_deps="avcodec avformat
"
4076 ffprobe_suggest="shell32
"
4079 podpages_deps="perl
"
4080 manpages_deps="perl pod2man
"
4081 htmlpages_deps="perl
"
4082 htmlpages_deps_any="makeinfo_html texi2html
"
4083 txtpages_deps="perl makeinfo
"
4084 doc_deps_any="manpages htmlpages podpages txtpages
"
4086 # default parameters
4088 logfile="ffbuild
/config.log
"
4090 # installation paths
4091 prefix_default="/usr
/local"
4092 bindir_default='${prefix}/bin'
4093 datadir_default='${prefix}/share/ffmpeg'
4094 docdir_default='${prefix}/share/doc/ffmpeg'
4095 incdir_default='${prefix}/include'
4096 libdir_default='${prefix}/lib'
4097 mandir_default='${prefix}/share/man'
4103 stdcxx_default="c
++11"
4105 host_cc_default="gcc
"
4106 doxygen_default="doxygen
"
4108 ln_s_default="ln -s -f"
4109 metalcc_default="xcrun
-sdk macosx metal
"
4110 metallib_default="xcrun
-sdk macosx metallib
"
4112 pkg_config_default=pkg-config
4113 ranlib_default="ranlib
"
4114 strip_default="strip
"
4115 version_script='--version-script'
4117 x86asmexe_default="nasm
"
4118 windres_default="windres
"
4122 target_os_default=$(tolower $(uname -s))
4123 host_os=$target_os_default
4126 if test "$target_os_default" = aix; then
4127 arch_default=$(uname -p)
4128 strip_default="strip
-X32_64"
4129 nm_default="nm
-g -X32_64"
4131 arch_default=$(uname -m)
4136 # configurable options
4137 enable $PROGRAM_LIST
4138 enable $DOCUMENT_LIST
4139 enable $EXAMPLE_LIST
4140 enable $LIBRARY_LIST
4142 enable version_tracking
4147 enable faan faandct faanidct
4150 enable optimizations
4151 enable ptx_compression
4152 enable runtime_cpudetect
4153 enable safe_bitstream_reader
4155 enable swscale_alpha
4156 enable valgrind_backtrace
4158 sws_max_filter_size_default=256
4159 set_default sws_max_filter_size
4161 # internal components are enabled by default
4162 enable $EXTRALIBS_LIST
4164 # Avoid external, non-system, libraries getting enabled by dependency resolution
4165 disable $EXTERNAL_LIBRARY_LIST $HWACCEL_LIBRARY_LIST
4168 SHFLAGS='-shared -Wl,-soname,$$(@F)'
4171 FULLNAME='$(NAME)$(BUILDSUF)'
4172 LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
4175 SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
4176 SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
4177 SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
4178 LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$
(LIBDIR
)/$
(LIBNAME
)"'
4179 SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
4180 SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
4181 VERSION_SCRIPT_POSTPROCESS_CMD="cat"
4208 host_extralibs='-lm'
4209 host_cflags_filter=echo
4210 host_ldflags_filter=echo
4212 target_path='$(CURDIR)'
4214 # since the object filename is not given with the -MM flag, the compiler
4215 # is only able to print the basename, and we must add the path ourselves
4216 DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>/dev/null | sed -e "/^\
#.*/d" -e "s,^[[:space:]]*$(@F),$(@D)/$(@F)," > $(@:.o=.d)'
4222 if test -f configure
; then
4224 elif test -f src
/configure
; then
4227 source_path
=$
(cd $
(dirname "$0"); pwd)
4228 case "$source_path" in
4229 *[[:blank
:]]*) die
"Out of tree builds are impossible with whitespace in source path." ;;
4231 test -e "$source_path/config.h" &&
4232 die
"Out of tree builds are impossible with config.h in source dir."
4239 FFMPEG_CONFIGURATION
="${FFMPEG_CONFIGURATION# } ${l}${r}"
4242 find_things_extern
(){
4245 file=$source_path/$3
4247 sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
4250 find_filters_extern
(){
4251 file=$source_path/$1
4252 sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file
4255 FILTER_LIST
=$
(find_filters_extern libavfilter
/allfilters.c
)
4256 OUTDEV_LIST
=$
(find_things_extern muxer FFOutputFormat libavdevice
/alldevices.c outdev
)
4257 INDEV_LIST
=$
(find_things_extern demuxer FFInputFormat libavdevice
/alldevices.c indev
)
4258 MUXER_LIST
=$
(find_things_extern muxer FFOutputFormat libavformat
/allformats.c
)
4259 DEMUXER_LIST
=$
(find_things_extern demuxer FFInputFormat libavformat
/allformats.c
)
4260 ENCODER_LIST
=$
(find_things_extern encoder FFCodec libavcodec
/allcodecs.c
)
4261 DECODER_LIST
=$
(find_things_extern decoder FFCodec libavcodec
/allcodecs.c
)
4266 PARSER_LIST
=$
(find_things_extern parser AVCodecParser libavcodec
/parsers.c
)
4267 BSF_LIST
=$
(find_things_extern bsf FFBitStreamFilter libavcodec
/bitstream_filters.c
)
4268 HWACCEL_LIST
=$
(find_things_extern hwaccel FFHWAccel libavcodec
/hwaccels.h
)
4269 PROTOCOL_LIST
=$
(find_things_extern protocol URLProtocol libavformat
/protocols.c
)
4271 AVCODEC_COMPONENTS_LIST
="
4279 AVDEVICE_COMPONENTS_LIST
="
4284 AVFILTER_COMPONENTS_LIST
="
4288 AVFORMAT_COMPONENTS_LIST
="
4295 $AVCODEC_COMPONENTS_LIST
4296 $AVDEVICE_COMPONENTS_LIST
4297 $AVFILTER_COMPONENTS_LIST
4298 $AVFORMAT_COMPONENTS_LIST
4301 for n
in $COMPONENT_LIST; do
4302 v
=$
(toupper
${n%s})_LIST
4304 eval ${n}_if_any
="\$$v"
4307 enable $ARCH_EXT_LIST
4310 echo "Unknown option \"$1\"."
4311 echo "See $0 --help for available options."
4315 print_in_columns
() {
4316 tr ' ' '\n' |
sort |
tr '\r\n' ' ' |
awk -v col_width
=24 -v width
="$ncols" '
4318 num_cols = width > col_width ? int(width / col_width) : 1;
4319 num_rows = int((NF + num_cols-1) / num_cols);
4321 for (y = 1; y <= num_rows; y++) {
4323 for (x = 1; x <= num_cols; x++) {
4325 line = sprintf("%s%-" col_width "s", line, $i);
4329 print line; line = "";
4337 echo $
* |
sed s
/$suffix//g | print_in_columns
4349 is_in
${comp} $COMPONENT_LIST && eval comp
=\$$
(toupper
${comp%s})_LIST
4350 echo "prob ${prob:-0.5}"
4358 random_seed
=$
(awk "BEGIN { srand($random_seed); print srand() }")
4359 $action $
(rand_list
"$@" |
awk "BEGIN { srand($random_seed) } \$1 == \"prob\" { prob = \$2; next } rand() < prob { print }")
4368 --extra-ldexeflags=*)
4369 add_ldexeflags
$optval
4371 --extra-ldsoflags=*)
4372 add_ldsoflags
$optval
4374 --extra-ldlibflags=*)
4375 warn
"The --extra-ldlibflags option is only provided for compatibility and will be\n"\
4376 "removed in the future. Use --extra-ldsoflags instead."
4377 add_ldsoflags
$optval
4380 add_extralibs
$optval
4383 disable
$INDEV_LIST $OUTDEV_LIST
4386 debuglevel
="$optval"
4389 disable
$PROGRAM_LIST
4391 --disable-everything)
4392 map
'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
4395 map
'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
4396 disable
$LIBRARY_LIST $PROGRAM_LIST doc
4399 --enable-random|
--disable-random)
4400 action
=${opt%%-random}
4401 do_random
${action#--} $COMPONENT_LIST
4403 --enable-random=*|
--disable-random=*)
4404 action
=${opt%%-random=*}
4405 do_random
${action#--} $optval
4411 lto
=-f${opt#--enable-}
4413 --enable-*=*|
--disable-*=*)
4414 eval $
(echo "${opt%%=*}" |
sed 's/--/action=/;s/-/ thing=/')
4415 is_in
"${thing}s" $COMPONENT_LIST || die_unknown
"$opt"
4416 eval list
=\$$
(toupper
$thing)_LIST
4417 name
=$
(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
4418 list=$(filter "$name" $list)
4419 [ "$list" = "" ] && warn "Option
$opt did not match anything
"
4420 test $action = enable && warn_if_gets_disabled $list
4423 --enable-?*|--disable-?*)
4424 eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
4425 if is_in $option $COMPONENT_LIST; then
4426 test $action = disable && action=unset
4427 eval $action \$$(toupper ${option%s})_LIST
4428 elif is_in $option $CMDLINE_SELECT; then
4435 NAME="${opt#--list-}"
4436 is_in $NAME $COMPONENT_LIST || die_unknown $opt
4438 eval show_list $NAME \$$(toupper $NAME)_LIST
4440 --help|-h) show_help
4442 --quiet|-q) quiet=yes
4444 --fatal-warnings) enable fatal_warnings
4447 libfuzzer_path="$optval"
4450 optname="${opt%%=*}"
4451 optname="${optname#--}"
4452 optname=$(echo "$optname" | sed 's/-/_/g')
4453 if is_in $optname $CMDLINE_SET; then
4454 eval $optname='$optval'
4455 elif is_in $optname $CMDLINE_APPEND; then
4456 append $optname "$optval"
4468 if disabled autodetect; then
4470 # Unless iconv is explicitely disabled by the user, we still want to probe
4471 # for the iconv from the libc.
4472 disabled iconv || enable libc_iconv
4474 disable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
4475 disable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
4477 # Mark specifically enabled, but normally autodetected libraries as requested.
4478 for lib in $AUTODETECT_LIBS; do
4479 enabled $lib && request $lib
4481 #TODO: switch to $AUTODETECT_LIBS when $THREADS_LIST is supported the same way
4482 enable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
4483 enable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
4485 disabled logging && logfile=/dev/null
4487 # command line configuration sanity checks
4489 # we need to build at least one lib type
4490 if ! enabled_any static shared; then
4492 At least one library type must be built.
4493 Specify --enable-static to build the static libraries or --enable-shared to
4494 build the shared libraries as well. To only build the shared libraries specify
4495 --disable-static in addition to --enable-shared.
4500 die_license_disabled() {
4501 enabled $1 || { enabled $v && die "$v is
$1 and
--enable-$1 is not specified.
"; }
4504 die_license_disabled_gpl() {
4505 enabled $1 || { enabled $v && die "$v is incompatible with the gpl and
--enable-$1 is not specified.
"; }
4508 map "die_license_disabled gpl
" $EXTERNAL_LIBRARY_GPL_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
4509 map "die_license_disabled version3
" $EXTERNAL_LIBRARY_VERSION3_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
4511 enabled gpl && map "die_license_disabled_gpl nonfree
" $EXTERNAL_LIBRARY_NONFREE_LIST
4512 map "die_license_disabled nonfree
" $HWACCEL_LIBRARY_NONFREE_LIST
4514 enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
4516 if enabled nonfree; then
4517 license="nonfree and unredistributable
"
4518 elif enabled gplv3; then
4519 license="GPL version
3 or later
"
4520 elif enabled lgplv3; then
4521 license="LGPL version
3 or later
"
4522 elif enabled gpl; then
4523 license="GPL version
2 or later
"
4525 license="LGPL version
2.1 or later
"
4528 enabled_all gnutls openssl &&
4529 die "GnuTLS and OpenSSL must not be enabled
at the same
time.
"
4531 enabled_all gnutls mbedtls &&
4532 die "GnuTLS and mbedTLS must not be enabled
at the same
time.
"
4534 enabled_all openssl mbedtls &&
4535 die "OpenSSL and mbedTLS must not be enabled
at the same
time.
"
4537 # Disable all the library-specific components if the library itself
4538 # is disabled, see AVCODEC_LIST and following _LIST variables.
4540 disable_components(){
4541 disabled ${1} && disable $(
4542 eval components="\$$
(toupper
${1})_COMPONENTS
"
4543 map 'eval echo \${$(toupper ${v%s})_LIST}' $components
4547 map 'disable_components $v' $LIBRARY_LIST
4549 echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
4552 test -n "$valgrind" && toolchain
="valgrind-memcheck"
4554 enabled ossfuzz
&& ! echo $CFLAGS |
grep -q -- "-fsanitize=" && ! echo $CFLAGS |
grep -q -- "-fcoverage-mapping" &&{
4555 add_cflags
-fsanitize=address
,undefined
-fsanitize-coverage=trace-pc-guard
,trace-cmp
-fno-omit-frame-pointer
4556 add_ldflags
-fsanitize=address
,undefined
-fsanitize-coverage=trace-pc-guard
,trace-cmp
4559 add_sanitizer_flags
(){
4562 add_cflags
-fsanitize=address
4563 add_ldflags
-fsanitize=address
4566 add_cflags
-fsanitize=leak
4567 add_ldflags
-fsanitize=leak
4570 add_cflags
-fsanitize=memory
-fsanitize-memory-track-origins
4571 add_ldflags
-fsanitize=memory
4574 add_cflags
-fsanitize=thread
4575 add_ldflags
-fsanitize=thread
4578 add_cflags
-fsanitize=undefined
4579 add_ldflags
-fsanitize=undefined
4582 die
"Unknown sanitizer $1"
4587 case "$toolchain" in
4589 add_sanitizer_flags
"${toolchain#clang-}"
4591 cxx_default
="clang++"
4594 add_sanitizer_flags
"${toolchain#gcc-}"
4597 # In case of tsan with gcc, PIC has to be enabled
4598 if [ "${toolchain#gcc-}" = "tsan" ]; then
4604 target_exec_default
="valgrind"
4605 case "$toolchain" in
4607 target_exec_args
="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc"
4610 target_exec_args
="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
4615 cl_major_ver
=$
(cl.exe
2>&1 |
sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
4616 if [ -z "$cl_major_ver" ] ||
[ $cl_major_ver -ge 18 ]; then
4618 cxx_default
="cl.exe"
4620 die
"Unsupported MSVC version (2013 or newer required)"
4622 ld_default
="$source_path/compat/windows/mslink"
4623 windres_default
="$source_path/compat/windows/mswindres"
4624 nm_default
="dumpbin.exe -symbols"
4625 ar_default
="lib.exe"
4626 case "${arch:-$arch_default}" in
4628 as_default
="armasm64.exe"
4631 as_default
="armasm.exe"
4634 target_os_default
="win32"
4635 # Use a relative path for TMPDIR. This makes sure all the
4636 # ffconf temp files are written with a relative path, avoiding
4637 # issues with msys/win32 path conversion for MSVC parameters
4638 # such as -Fo<file> or -out:<file>.
4644 nm_default
="dumpbin -symbols"
4646 target_os_default
="win32"
4650 add_cflags
-fprofile-arcs -ftest-coverage
4651 add_ldflags
-fprofile-arcs -ftest-coverage
4654 add_cflags
-fprofile-arcs -ftest-coverage
4655 add_ldflags
--coverage
4658 add_cppflags
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
4659 add_cflags
-fno-strict-overflow -fstack-protector-all
4660 add_ldflags
-Wl,-z,relro
-Wl,-z,now
4662 add_ldexeflags
-fPIE -pie
4665 die
"Unknown toolchain $toolchain"
4669 if test -n "$cross_prefix"; then
4670 test -n "$arch" && test -n "$target_os" ||
4671 die
"Must specify target arch (--arch) and OS (--target-os) when cross-compiling"
4672 enable cross_compile
4675 set_default target_os
4676 if test "$target_os" = android
; then
4680 ar_default
="${cross_prefix}${ar_default}"
4681 cc_default
="${cross_prefix}${cc_default}"
4682 cxx_default
="${cross_prefix}${cxx_default}"
4683 nm_default
="${cross_prefix}${nm_default}"
4684 pkg_config_default
="${cross_prefix}${pkg_config_default}"
4685 ranlib_default
="${cross_prefix}${ranlib_default}"
4686 strip_default
="${cross_prefix}${strip_default}"
4687 windres_default
="${cross_prefix}${windres_default}"
4689 sysinclude_default
="${sysroot}/usr/include"
4691 if enabled cuda_sdk
; then
4692 warn
"Option --enable-cuda-sdk is deprecated. Use --enable-cuda-nvcc instead."
4696 if enabled cuda_nvcc
; then
4698 nvccflags_default
="-gencode arch=compute_30,code=sm_30 -O2"
4700 nvcc_default
="clang"
4701 nvccflags_default
="--cuda-gpu-arch=sm_30 -O2"
4707 if enabled cuda_nvcc
; then
4708 if $nvcc $nvccflags_default 2>&1 |
grep -qi unsupported
; then
4709 nvccflags_default
="-gencode arch=compute_60,code=sm_60 -O2"
4713 set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
4714 target_exec x86asmexe metalcc metallib stdc stdcxx
4715 enabled cross_compile || host_cc_default
=$cc
4718 if ${ranlib} 2>&1 |
grep -q "\-D "; then
4719 ranlib
="${ranlib} -D"
4722 pkg_config_fail_message
=""
4723 if ! $pkg_config --version >/dev
/null
2>&1; then
4724 warn
"$pkg_config not found, library detection may fail."
4726 elif is_in
-static $cc $LDFLAGS && ! is_in
--static $pkg_config $pkg_config_flags; then
4727 pkg_config_fail_message
="
4728 Note: When building a static binary, add --pkg-config-flags=\"--static\"."
4731 if test $doxygen != $doxygen_default && \
4732 ! $doxygen --version >/dev
/null
2>&1; then
4733 warn
"Specified doxygen \"$doxygen\" not found, API documentation will fail to build."
4738 mingw32
*|mingw64
*|msys
*|win32|win64|cygwin
*|
*-dos|freedos|opendos|os
/2*|symbian
) echo .exe
;;
4742 EXESUF
=$
(exesuf
$target_os)
4743 HOSTEXESUF
=$
(exesuf
$host_os)
4745 # set temporary file name
4746 : ${TMPDIR:=$TEMPDIR}
4750 if [ -n "$tempprefix" ] ; then
4752 tmpname
="$tempprefix.${HOSTNAME}.${UID}"
4756 elif ! test_cmd mktemp
-u XXXXXX
; then
4757 # simple replacement for missing mktemp
4758 # NOT SAFE FOR GENERAL USE
4760 tmpname
="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
4766 FFTMPDIR
=$
(mktemp
-d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev
/null
) ||
4767 die
"Unable to create temporary directory in $TMPDIR."
4770 tmp
="${FFTMPDIR}/test"$2
4771 (set -C; exec > $tmp) 2> /dev
/null ||
4772 die
"Unable to create temporary file in $FFTMPDIR."
4776 trap 'rm -rf -- "$FFTMPDIR"' EXIT
4782 tmpfile TMPE
$EXESUF
4795 # make sure we can execute files in $TMPDIR
4796 cat > $TMPSH 2>> $logfile <<EOF
4799 chmod +x
$TMPSH >> $logfile 2>&1
4800 if ! $TMPSH >> $logfile 2>&1; then
4802 Unable to create and execute files in $TMPDIR. Set the TMPDIR environment
4803 variable to another directory and make sure that it is not mounted noexec.
4805 die
"Sanity test failed."
4811 # Filter out MSVC cl.exe options from cflags that shouldn't
4812 # be passed to gas-preprocessor
4822 -Wno-switch) echo -Wno-switch-enum ;;
4823 -Wno-format-zero-length) ;;
4824 -Wdisabled-optimization) ;;
4825 -Wno-pointer-sign) echo -Wno-other ;;
4831 msvc_common_flags
(){
4834 # In addition to specifying certain flags under the compiler
4835 # specific filters, they must be specified here as well or else the
4836 # generic catch all at the bottom will print the original flag.
4839 -std=c
*) echo /std
:${flag#-std=};;
4841 -fomit-frame-pointer) ;;
4845 -fno-signed-zeros) ;;
4850 -lz) echo zlib.lib
;;
4851 -lx264) echo libx264.lib
;;
4853 -l*) echo ${flag#-l}.lib
;;
4854 -LARGEADDRESSAWARE) echo $flag ;;
4855 -L*) echo -libpath:${flag#-L} ;;
4863 msvc_common_flags
"$@"
4866 -Wall) echo -W3 -wd4018 -wd4146 -wd4244 -wd4305 \
4868 -Wextra) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
4869 -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
4870 -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
4872 -wd4273 -wd4554 -wd4701 -wd4703 ;;
4878 msvc_common_flags
"$@"
4881 # Despite what Intel's documentation says -Wall, which is supported
4882 # on Windows, does enable remarks so disable them here.
4883 -Wall) echo $flag -Qdiag-disable:remark
;;
4884 -std=$stdc) echo -Qstd=$stdc ;;
4885 -flto*) echo -ipo ;;
4893 -flto*) echo -ipo ;;
4903 case "${flag#*=}" in
4904 native
) echo -xtarget=native
;;
4905 v9|niagara
) echo -xarch=sparc
;;
4906 ultrasparc
) echo -xarch=sparcvis
;;
4907 ultrasparc3|niagara2
) echo -xarch=sparcvis2
;;
4908 i586|pentium
) echo -xchip=pentium
;;
4909 i686|pentiumpro|pentium2
) echo -xtarget=pentium_pro
;;
4910 pentium3
*|c3-2
) echo -xtarget=pentium3
;;
4911 pentium-m
) echo -xarch=sse2
-xchip=pentium3
;;
4912 pentium4
*) echo -xtarget=pentium4
;;
4913 prescott|nocona
) echo -xarch=sse3
-xchip=pentium4
;;
4914 *-sse3) echo -xarch=sse3
;;
4915 core2
) echo -xarch=ssse3
-xchip=core2
;;
4916 bonnell
) echo -xarch=ssse3
;;
4917 corei7|nehalem
) echo -xtarget=nehalem
;;
4918 westmere
) echo -xtarget=westmere
;;
4919 silvermont
) echo -xarch=sse4_2
;;
4920 corei7-avx|sandybridge
) echo -xtarget=sandybridge
;;
4921 core-avx
*|ivybridge|haswell|broadwell|skylake
*|knl
)
4923 amdfam10|barcelona
) echo -xtarget=barcelona
;;
4924 btver1
) echo -xarch=amdsse4a
;;
4925 btver2|bdver
*|znver
*) echo -xarch=avx
;;
4926 athlon-4|athlon-
[mx
]p
) echo -xarch=ssea
;;
4927 k8|opteron|athlon64|athlon-fx
)
4928 echo -xarch=sse2a
;;
4929 athlon
*) echo -xarch=pentium_proa
;;
4932 -std=$stdc) echo -x$stdc ;;
4933 -fomit-frame-pointer) echo -xregs=frameptr
;;
4934 -fPIC) echo -KPIC -xcode=pic32
;;
4935 -W*,*) echo $flag ;;
4936 -f*-*|
-W*|
-mimpure-text) ;;
4948 unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
4949 unset _ld_o _ldflags _ld_lib _ld_path
4950 unset _depflags _DEPCMD _DEPFLAGS
4953 if $_cc --version 2>&1 |
grep -q '^GNU assembler'; then
4954 true
# no-op to avoid reading stdin in following checks
4955 elif $_cc -v 2>&1 |
grep -q '^gcc.*LLVM'; then
4957 gcc_extra_ver
=$
(expr "$($_cc --version 2>/dev/null | head -n1)" : '.*\((.*)\)')
4958 _ident
="llvm-gcc $($_cc -dumpversion 2>/dev/null) $gcc_extra_ver"
4959 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
4962 elif $_cc -v 2>&1 |
grep -qi ^gcc
; then
4964 gcc_version
=$
($_cc --version |
head -n1)
4965 gcc_basever
=$
($_cc -dumpversion)
4966 gcc_pkg_ver
=$
(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
4967 gcc_ext_ver
=$
(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
4968 _ident
=$
(cleanws
"gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
4969 case $gcc_basever in
4972 *) _depflags
='-MMD -MF $(@:.o=.d) -MT $@' ;;
4974 if [ "$first" = true
]; then
4975 case $gcc_basever in
4977 warn
"gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler." ;;
4982 elif $_cc --version 2>/dev
/null |
grep -q ^icc
; then
4984 _ident
=$
($_cc --version |
head -n1)
4989 _flags_filter
=icc_flags
4990 elif $_cc -v 2>&1 |
grep -q xlc
; then
4992 _ident
=$
($_cc -qversion 2>/dev
/null |
head -n1)
4994 _cflags_size
='-O5 -qcompact'
4995 elif $_cc --vsn 2>/dev
/null |
grep -Eq "ARM (C/C\+\+ )?Compiler"; then
4996 test -d "$sysroot" || die
"No valid sysroot specified."
4998 _ident
=$
($_cc --vsn |
grep -i build |
head -n1 |
sed 's/.*: //')
4999 armcc_conf
="$PWD/armcc.conf"
5000 $_cc --arm_linux_configure \
5001 --arm_linux_config_file="$armcc_conf" \
5002 --configure_sysroot="$sysroot" \
5003 --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
5004 die
"Error creating armcc configuration file."
5005 $_cc --vsn |
grep -q RVCT
&& armcc_opt
=rvct || armcc_opt
=armcc
5006 _flags
="--arm_linux_config_file=$armcc_conf --translate_gcc"
5007 as_default
="${cross_prefix}gcc"
5011 elif $_cc -v 2>&1 |
grep -q clang
&& ! $_cc -?
> /dev
/null
2>&1; then
5013 _ident
=$
($_cc --version 2>/dev
/null |
head -n1)
5014 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
5017 elif $_cc -V 2>&1 |
grep -q Sun
; then
5019 _ident
=$
($_cc -V 2>&1 |
head -n1 | cut
-d' ' -f 2-)
5020 _DEPCMD
='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
5021 _DEPFLAGS
='-xM1 -x$stdc'
5022 _ldflags
='-std=$stdc'
5024 _cflags_size
='-O5 -xspace'
5025 _flags_filter
=suncc_flags
5026 elif $_cc -v 2>&1 |
grep -q 'PathScale\|Path64'; then
5028 _ident
=$
($_cc -v 2>&1 |
head -n1 |
tr -d :)
5029 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
5032 _flags_filter
='filter_out -Wdisabled-optimization'
5033 elif $_cc -v 2>&1 |
grep -q Open64
; then
5035 _ident
=$
($_cc -v 2>&1 |
head -n1 |
tr -d :)
5036 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
5039 _flags_filter
='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
5040 elif $_cc 2>&1 |
grep -q 'Microsoft.*ARM.*Assembler'; then
5042 _ident
=$
($_cc |
head -n1)
5043 # 4509: "This form of conditional instruction is deprecated"
5044 _flags
="-nologo -ignore 4509"
5045 _flags_filter
=armasm_flags
5046 elif $_cc 2>&1 |
grep -q Intel
; then
5048 _ident
=$
($_cc 2>&1 |
head -n1)
5049 _depflags
='-QMMD -QMF$(@:.o=.d) -QMT$@'
5050 # Not only is O3 broken on 13.x+ but it is slower on all previous
5051 # versions (tested) as well.
5053 _cflags_size
="-O1 -Oi" # -O1 without -Oi miscompiles stuff
5054 if $_cc 2>&1 |
grep -q Linker
; then
5061 _flags_filter
=icl_flags
5063 _ld_path
='-libpath:'
5064 # -Qdiag-error to make icl error when seeing certain unknown arguments
5065 _flags
='-nologo -Qdiag-error:4044,10157'
5066 # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
5067 # with MSVC which enables it by default.
5068 _cflags
='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
5070 elif $_cc -?
2>/dev
/null |
grep -q 'LLVM.*Linker'; then
5071 # lld can emulate multiple different linkers; in ms link.exe mode,
5072 # the -? parameter gives the help output which contains an identifyable
5073 # string, while it gives an error in other modes.
5075 # The link.exe mode doesn't have a switch for getting the version,
5076 # but we can force it back to gnu mode and get the version from there.
5077 _ident
=$
($_cc -flavor gnu
--version 2>/dev
/null
)
5079 _flags_filter
=msvc_flags
5081 _ld_path
='-libpath:'
5082 elif $_cc -nologo- 2>&1 |
grep -q Microsoft ||
{ $_cc -v 2>&1 |
grep -q clang
&& $_cc -?
> /dev
/null
2>&1; }; then
5084 if $_cc -nologo- 2>&1 |
grep -q Microsoft
; then
5085 _ident
=$
($_cc 2>&1 |
head -n1 |
tr -d '\r')
5087 _ident
=$
($_cc --version 2>/dev
/null |
head -n1 |
tr -d '\r')
5089 if [ -x "$(command -v wslpath)" ]; then
5090 _DEPCMD
='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); if (!match($$0, / /)) { print $$0 } }'\'' | xargs -r -d\\n -n1 wslpath -u | awk '\''BEGIN { printf "%s:", "$@" }; { sub(/\r/,""); printf " %s", $$0 }; END { print "" }'\'' > $(@:.o=.d)'
5093 _DEPCMD
='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
5095 _DEPFLAGS
='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
5099 if $_cc -nologo- 2>&1 |
grep -q Linker
; then
5106 _flags_filter
=msvc_flags
5108 _ld_path
='-libpath:'
5111 elif $_cc --version 2>/dev
/null |
grep -q ^cparser
; then
5113 _ident
=$
($_cc --version |
head -n1)
5117 _flags_filter
=cparser_flags
5120 eval ${pfx}_type
=\
$_type
5121 eval ${pfx}_ident
=\
$_ident
5125 eval ${1}_C=\${_cc_c-\${${1}_C}}
5126 eval ${1}_E=\${_cc_e-\${${1}_E}}
5127 eval ${1}_O=\${_cc_o-\${${1}_O}}
5129 if [ -n "$_depflags" ]; then
5130 eval ${1}_DEPFLAGS
=\
$_depflags
5132 eval ${1}DEP
=\
${_DEPCMD:-\$DEPCMD}
5133 eval ${1}DEP_FLAGS
=\
${_DEPFLAGS:-\$DEPFLAGS}
5134 eval DEP
${1}FLAGS
=\
$_flags
5138 probe_cc cc
"$cc" "true"
5139 cflags_filter
=$_flags_filter
5140 cflags_speed
=$_cflags_speed
5141 cflags_size
=$_cflags_size
5142 cflags_noopt
=$_cflags_noopt
5143 add_cflags
$_flags $_cflags
5144 cc_ldflags
=$_ldflags
5148 probe_cc hostcc
"$host_cc"
5149 host_cflags_filter
=$_flags_filter
5150 host_cflags_speed
=$_cflags_speed
5151 add_host_cflags
$_flags $_cflags
5154 test -n "$cc_type" && enable $cc_type ||
5155 warn
"Unknown C compiler $cc, unable to select optimal CFLAGS"
5157 : ${as_default:=$cc}
5158 : ${objcc_default:=$cc}
5159 : ${dep_cc_default:=$cc}
5160 : ${ld_default:=$cc}
5161 : ${host_ld_default:=$host_cc}
5162 set_default
ar as objcc dep_cc ld ln_s host_ld windres
5165 asflags_filter
=$_flags_filter
5166 add_asflags
$_flags $_cflags
5169 probe_cc objcc
"$objcc"
5170 objcflags_filter
=$_flags_filter
5171 add_objcflags
$_flags $_cflags
5175 ldflags_filter
=$_flags_filter
5176 add_ldflags
$_flags $_ldflags
5177 test "$cc_type" != "$ld_type" && add_ldflags
$cc_ldflags
5179 LD_LIB
=${_ld_lib-$LD_LIB}
5180 LD_PATH
=${_ld_path-$LD_PATH}
5182 probe_cc hostld
"$host_ld"
5183 host_ldflags_filter
=$_flags_filter
5184 add_host_ldflags
$_flags $_ldflags
5185 HOSTLD_O
=${_ld_o-$HOSTLD_O}
5187 if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
5188 probe_cc depcc
"$dep_cc"
5189 CCDEP
=${_DEPCMD:-$DEPCMD}
5190 CCDEP_FLAGS
=${_DEPFLAGS:=$DEPFLAGS}
5194 if $ar 2>&1 |
grep -q Microsoft
; then
5197 elif $ar 2>&1 |
grep -q "\[D\] "; then
5205 add_cflags
$extra_cflags
5206 add_cxxflags
$extra_cxxflags
5207 add_objcflags
$extra_objcflags
5208 add_asflags
$extra_cflags
5210 if test -n "$sysroot"; then
5213 add_cppflags
--sysroot="$sysroot"
5214 add_ldflags
--sysroot="$sysroot"
5219 if test "$cpu" = host; then
5220 enabled cross_compile
&&
5221 warn
"--cpu=host makes no sense when cross-compiling."
5226 $cc $1=native
-v -c -o $TMPO $TMPC >$TMPE 2>&1 ||
return
5228 s/.*$1=\\([^ ]*\\).*/\\1/
5233 cpu
=$
(check_native
-march || check_native
-mcpu)
5237 $cc $1=native
-v -c -o $TMPO $TMPC >$TMPE 2>&1 ||
return
5238 sed -n "/cc1.*-target-cpu /{
5239 s/.*-target-cpu \\([^ ]*\\).*/\\1/
5244 cpu
=$
(check_native
-march)
5248 test "${cpu:-host}" = host &&
5249 die
"--cpu=host not supported with compiler $cc"
5252 # Deal with common $arch aliases
5279 "Power Macintosh"|ppc
*|powerpc
*)
5294 i
[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64
)
5299 is_in
$arch $ARCH_LIST || warn
"unknown architecture $arch"
5302 # Add processor-specific flags
5303 if enabled aarch64
; then
5307 cpuflags
="-march=$cpu"
5310 cpuflags
="-mcpu=$cpu"
5314 elif enabled arm
; then
5317 test_cpp_condition stddef.h \
5318 "defined __ARM_ARCH_${1}__ || defined __TARGET_ARCH_${2:-$1}" \
5323 if check_arm_arch
4; then echo armv4
5324 elif check_arm_arch
4T
; then echo armv4t
5325 elif check_arm_arch
5; then echo armv5
5326 elif check_arm_arch
5E
; then echo armv5e
5327 elif check_arm_arch
5T
; then echo armv5t
5328 elif check_arm_arch
5TE
; then echo armv5te
5329 elif check_arm_arch
5TEJ
; then echo armv5te
5330 elif check_arm_arch
6; then echo armv6
5331 elif check_arm_arch
6J
; then echo armv6j
5332 elif check_arm_arch
6K
; then echo armv6k
5333 elif check_arm_arch
6Z
; then echo armv6z
5334 elif check_arm_arch
6KZ
; then echo armv6zk
5335 elif check_arm_arch
6ZK
; then echo armv6zk
5336 elif check_arm_arch
6T2
; then echo armv6t2
5337 elif check_arm_arch
7; then echo armv7
5338 elif check_arm_arch
7A
7_A
; then echo armv7-a
5339 elif check_arm_arch
7S
; then echo armv7-a
5340 elif check_arm_arch
7R
7_R
; then echo armv7-r
5341 elif check_arm_arch
7M
7_M
; then echo armv7-m
5342 elif check_arm_arch
7EM
7E_M
; then echo armv7-m
5343 elif check_arm_arch
8A
8_A
; then echo armv8-a
5350 subarch
=$
(probe_arm_arch |
sed 's/[^a-z0-9]//g')
5353 cpuflags
="-march=$cpu"
5354 subarch
=$
(echo $cpu |
sed 's/[^a-z0-9]//g')
5357 cpuflags
="-mcpu=$cpu"
5359 cortex-a
*) subarch
=armv7a
;;
5360 cortex-r
*) subarch
=armv7r
;;
5361 cortex-m
*) enable thumb
; subarch
=armv7m
;;
5362 arm11
*) subarch
=armv6
;;
5363 arm
[79]*e
*|arm9
[24]6*|arm96
*|arm102
[26]) subarch
=armv5te
;;
5364 armv4
*|arm7
*|arm9
[24]*) subarch
=armv4
;;
5365 *) subarch
=$
(probe_arm_arch
) ;;
5371 armv5t
*) enable fast_clz
;;
5374 disabled fast_unaligned ||
enable fast_unaligned
5378 test_cflags
-mfp16-format=ieee
&& add_cflags
-mfp16-format=ieee
5380 elif enabled loongarch
; then
5382 enable local_aligned
5383 enable simd_align_32
5386 enable fast_unaligned
5389 cpuflags
="-march=$cpu"
5392 elif enabled mips
; then
5394 if [ "$cpu" != "generic" ]; then
5405 cpuflags
="-march=$cpu"
5408 # General ISA levels
5422 # Cores from MIPS(MTI)
5427 24kf
*|
24kec|
34kc|
74Kc|
1004kc
)
5430 24kef
*|
34kf
*|
1004kf
*)
5437 check_cflags
"-mtune=p5600" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops"
5441 check_cflags
"-mtune=i6400 -mabi=64" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags
"-mabi=64"
5445 check_cflags
"-mtune=p6600 -mabi=64" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags
"-mabi=64"
5447 # Cores from Loongson
5448 loongson2e|loongson2f|loongson3
*)
5449 enable local_aligned
5450 enable simd_align_16
5454 enable fast_unaligned
5455 disable aligned_stack
5456 # When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
5457 if test "$cc_type" = "gcc"; then
5458 case $gcc_basever in
5459 2|
2.
*|
3.
*|
4.
*|
5.0|
5.1|
5.2)
5460 expensive_optimization_flag
="-fno-expensive-optimizations"
5463 expensive_optimization_flag
=""
5471 cpuflags
="-march=loongson3a -mhard-float $expensive_optimization_flag"
5475 cpuflags
="-march=loongson2e -mhard-float $expensive_optimization_flag"
5479 cpuflags
="-march=loongson2f -mhard-float $expensive_optimization_flag"
5484 warn
"unknown MIPS CPU"
5491 # Disable DSP stuff for generic CPU, it can't be detected at runtime.
5492 warn
'generic cpu selected'
5495 elif enabled ppc
; then
5499 case $
(tolower
$cpu) in
5500 601|ppc601|powerpc601
)
5501 cpuflags
="-mcpu=601"
5504 603*|ppc603
*|powerpc603
*)
5505 cpuflags
="-mcpu=603"
5508 604*|ppc604
*|powerpc604
*)
5509 cpuflags
="-mcpu=604"
5512 g3|
75*|ppc75
*|powerpc75
*)
5513 cpuflags
="-mcpu=750"
5516 g4|
745*|ppc745
*|powerpc745
*)
5517 cpuflags
="-mcpu=7450"
5520 74*|ppc74
*|powerpc74
*)
5521 cpuflags
="-mcpu=7400"
5524 g5|
970|ppc970|powerpc970
)
5525 cpuflags
="-mcpu=970"
5529 cpuflags
="-mcpu=$cpu"
5533 cpuflags
="-mcpu=$cpu"
5536 cpuflags
="-mcpu=cell"
5541 cpuflags
="-mcpu=e500mc"
5545 cpuflags
="-mcpu=8548 -mhard-float -mfloat-gprs=double"
5550 cpuflags
="-mcpu=8540 -mhard-float"
5556 elif enabled riscv
; then
5558 check_headers asm
/hwprobe.h
5559 check_headers sys
/hwprobe.h
5561 if test_cpp_condition stddef.h
"__riscv_zbb"; then
5564 if test_cpp_condition stddef.h
"__riscv_zfhmin"; then
5568 elif enabled sparc
; then
5571 cypress|f93
[04]|tsc701|sparcl
*|supersparc|hypersparc|niagara|v
[789])
5572 cpuflags
="-mcpu=$cpu"
5574 ultrasparc
*|niagara
[234])
5575 cpuflags
="-mcpu=$cpu"
5579 elif enabled x86
; then
5583 cpuflags
="-march=$cpu"
5587 # targets that do NOT support nopl and conditional mov (cmov)
5588 pentium-mmx|k6|k6-
[23]|winchip-c6|winchip2|c3
)
5589 cpuflags
="-march=$cpu"
5592 # targets that do support conditional mov but on which it's slow
5593 pentium4|pentium4m|prescott|nocona
)
5594 cpuflags
="-march=$cpu"
5598 # everything else should support nopl and conditional mov (cmov)
5600 cpuflags
="-march=$cpu"
5608 if test_cpp_condition inttypes.h
"UINTPTR_MAX >= UINT64_MAX"; then
5614 if [ "$cpu" != generic
]; then
5615 add_cflags
$cpuflags
5616 add_asflags
$cpuflags
5617 test "$cc_type" = "$ld_type" && add_ldflags
$cpuflags
5620 # compiler sanity check
5622 int main(void){ return 0; }
5624 if test "$?" != 0; then
5625 echo "$cc is unable to create an executable file."
5626 if test -z "$cross_prefix" && ! enabled cross_compile
; then
5627 echo "If $cc is a cross-compiler, use the --enable-cross-compile option."
5628 echo "Only do this if you know what cross compiling means."
5630 die
"C compiler test failed."
5633 add_cppflags
-D_ISOC11_SOURCE
5634 add_cxxflags
-D__STDC_CONSTANT_MACROS
5635 check_cxxflags_cc
-std=$stdcxx ctype.h
"__cplusplus >= 201103L" ||
5636 { check_cxxflags
-std=c
++11 && stdcxx
="c++11" ||
{ check_cxxflags
-std=c
++0x
&& stdcxx
="c++0x"; }; }
5638 # some compilers silently accept -std=c11, so we also need to check that the
5639 # version macro is defined properly
5640 check_cflags_cc
-std=$stdc ctype.h
"__STDC_VERSION__ >= 201112L" ||
5641 { check_cflags_cc
-std=c11 ctype.h
"__STDC_VERSION__ >= 201112L" && stdc
="c11" || die
"Compiler lacks C11 support"; }
5643 test_cc
<<EOF || die "Compiler lacks support for C11 static assertions"
5650 static_assert(offsetof(struct Foo, a) == 0,
5651 "First element of struct does not have offset 0");
5652 _Static_assert(offsetof(struct Foo, ptr) >= offsetof(struct Foo, a) + sizeof(obj.a),
5653 "elements not properly ordered in struct");
5656 check_cppflags
-D_FILE_OFFSET_BITS=64
5657 check_cppflags
-D_LARGEFILE_SOURCE
5659 add_host_cppflags
-D_ISOC11_SOURCE
5660 check_host_cflags_cc
-std=$stdc ctype.h
"__STDC_VERSION__ >= 201112L" ||
5661 check_host_cflags_cc
-std=c11 ctype.h
"__STDC_VERSION__ >= 201112L" || die
"Host compiler lacks C11 support"
5663 check_host_cflags
-Wall
5664 check_host_cflags
$host_cflags_speed
5669 expr=${3:-'sizeof(void *) > 4'}
5670 test_code cc
"" "int test[2*($expr) - 1]" &&
5671 subarch
=$arch64 || subarch
=$arch32
5677 enabled shared
&& enable_weak pic
5680 check_64bit loongarch32 loongarch64
5681 enabled loongarch64
&& disable loongarch32
5682 enabled shared
&& enable_weak pic
5685 check_64bit mips mips64
'_MIPS_SIM > 1'
5686 enabled shared
&& enable_weak pic
5689 check_64bit parisc parisc64
5690 enabled shared
&& enable_weak pic
5693 check_64bit ppc ppc64
5694 enabled shared
&& enable_weak pic
5697 check_64bit riscv32 riscv64
5698 enabled shared
&& enable_weak pic
5701 check_64bit s390 s390x
5702 enabled shared
&& enable_weak pic
5705 check_64bit sparc sparc64
5706 enabled shared
&& enable_weak pic
5709 check_64bit x86_32 x86_64
5710 # Treat x32 as x64 for now. Note it also needs pic if shared
5711 test "$subarch" = "x86_32" && test_cpp_condition stddef.h
'defined(__x86_64__)' &&
5712 subarch
=x86_64
&& enable x86_64
&& disable x86_32
5713 if enabled x86_64
; then
5714 enabled shared
&& enable_weak pic
5724 add_cppflags
'-I\$(SRC_PATH)/compat/aix'
5725 enabled shared
&& add_ldflags
-Wl,-brtl
5726 arflags
='-Xany -r -c'
5731 enable section_data_rel_ro
5733 add_ldexeflags
-fPIE -pie
5734 SLIB_INSTALL_NAME
='$(SLIBNAME)'
5736 SHFLAGS
='-shared -Wl,-soname,$(SLIBNAME)'
5739 prefix_default
="/boot/common"
5740 network_extralibs
="-lnetwork"
5744 SHFLAGS
='-shared -Wl,-h,$$(@F)'
5745 enabled x86
&& append SHFLAGS
-mimpure-text
5746 network_extralibs
="-lsocket -lnsl"
5747 add_cppflags
-D__EXTENSIONS__
5748 # When using suncc to build, the Solaris linker will mark
5749 # an executable with each instruction set encountered by
5750 # the Solaris assembler. As our libraries contain their own
5751 # guards for processor-specific code, instead suppress
5752 # generation of the HWCAPS ELF section on Solaris x86 only.
5753 enabled_all suncc x86
&&
5754 echo "hwcap_1 = OVERRIDE;" > mapfile
&&
5755 add_ldflags
-Wl,-M,mapfile
5756 nm_default
='nm -P -g'
5759 VERSION_SCRIPT_POSTPROCESS_CMD
='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
5763 enable section_data_rel_ro
5764 oss_indev_extralibs
="-lossaudio"
5765 oss_outdev_extralibs
="-lossaudio"
5766 enabled gcc || check_ldflags
-Wl,-zmuldefs
5770 enable section_data_rel_ro
5773 SLIB_INSTALL_NAME
='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
5775 oss_indev_extralibs
="-lossaudio"
5776 oss_outdev_extralibs
="-lossaudio"
5782 enable section_data_rel_ro
5785 add_extralibs
-lpoll -lgnugetopt
5789 enabled ppc
&& add_asflags
-force_cpusubtype_ALL
5790 install_name_dir_default
='$(SHLIBDIR)'
5791 SHFLAGS
='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
5792 enabled x86_32
&& append SHFLAGS
-Wl,-read_only_relocs,suppress
5794 add_ldflags
-Wl,-dynamic,-search_paths_first
5795 check_cflags
-Werror=partial-availability
5797 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
5798 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
5799 enabled x86_64
&& objformat
="macho64" || objformat
="macho32"
5800 enabled_any pic shared x86_64 ||
5801 { check_cflags
-mdynamic-no-pic && add_asflags
-mdynamic-no-pic; }
5802 check_headers dispatch
/dispatch.h
&&
5803 add_cppflags
'-I\$(SRC_PATH)/compat/dispatch_semaphore'
5804 if test -n "$sysroot"; then
5805 is_in
-isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags
-isysroot $sysroot
5806 is_in
-isysroot $ld $LDFLAGS || check_ldflags
-isysroot $sysroot
5808 version_script
='-exported_symbols_list'
5809 VERSION_SCRIPT_POSTPROCESS_CMD
='tr " " "\n" | sed -n /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E "s/(.+[^*])$$$$/\1*/"'
5810 # Workaround for Xcode 11 -fstack-check bug
5811 if enabled clang
; then
5812 clang_version
=$
($cc -dumpversion)
5813 test ${clang_version%%.*} -eq 11 && add_cflags
-fno-stack-check
5817 die
"Native MSYS builds are discouraged, please use the MINGW environment."
5822 if enabled x86_64
; then
5823 LIBTARGET
="i386:x86-64"
5824 elif enabled arm
; then
5826 elif enabled aarch64
; then
5829 if enabled shared
; then
5830 # Cannot build both shared and static libs when using dllimport.
5833 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5834 enabled x86_32
&& check_ldflags
-Wl,--large-address-aware
5835 add_cppflags
-DWIN32_LEAN_AND_MEAN
5836 shlibdir_default
="$bindir_default"
5839 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5840 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5841 if test_cmd lib.exe
-list; then
5842 SLIB_EXTRA_CMD
=-'lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
5843 if enabled x86_64
; then
5847 SLIB_EXTRA_CMD
=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
5849 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5851 SLIB_INSTALL_EXTRA_SHLIB
='$(SLIBNAME:$(SLIBSUF)=.lib)'
5852 SLIB_INSTALL_EXTRA_LIB
='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
5853 SLIB_CREATE_DEF_CMD
='EXTERN_PREFIX="$(EXTERN_PREFIX)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
5854 SHFLAGS
='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--disable-auto-image-base $$(@:$(SLIBSUF)=.def)'
5855 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5856 dlltool
="${cross_prefix}dlltool"
5859 check_ldflags
-Wl,--nxcompat,--dynamicbase
5860 # Lets work around some stupidity in binutils.
5861 # ld will strip relocations from executables even though we need them
5862 # for dynamicbase (ASLR). Using -pie does retain the reloc section
5863 # however ld then forgets what the entry point should be (oops) so we
5864 # have to manually (re)set it.
5865 if enabled x86_32
; then
5866 disabled debug
&& add_ldexeflags
-Wl,--pic-executable,-e,_mainCRTStartup
5867 elif enabled x86_64
; then
5868 disabled debug
&& add_ldexeflags
-Wl,--pic-executable,-e,mainCRTStartup
5869 check_ldflags
-Wl,--high-entropy-va # binutils 2.25
5870 # Set image base >4GB for extra entropy with HEASLR
5871 add_ldexeflags
-Wl,--image-base,0x140000000
5872 append SHFLAGS
-Wl,--image-base,0x180000000
5877 if enabled shared
; then
5878 # Link to the import library instead of the normal static library
5881 # Cannot build both shared and static libs with MSVC or icl.
5884 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5885 enabled x86_32
&& check_ldflags
-LARGEADDRESSAWARE
5886 add_cppflags
-DWIN32_LEAN_AND_MEAN
5887 shlibdir_default
="$bindir_default"
5890 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5891 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5892 SLIB_CREATE_DEF_CMD
='EXTERN_PREFIX="$(EXTERN_PREFIX)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
5893 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5895 SLIB_INSTALL_EXTRA_SHLIB
='$(SLIBNAME:$(SLIBSUF)=.lib)'
5896 SLIB_INSTALL_EXTRA_LIB
='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
5897 SHFLAGS
='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
5898 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5904 shlibdir_default
="$bindir_default"
5907 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5908 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5909 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5911 SLIB_INSTALL_EXTRA_LIB
='lib$(FULLNAME).dll.a'
5912 SHFLAGS
='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
5913 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5915 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5916 add_cppflags
-DWIN32_LEAN_AND_MEAN
5917 add_cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
5919 *-dos|freedos|opendos
)
5920 network_extralibs
="-lsocket"
5925 enable section_data_rel_ro
5926 enabled_any arm aarch64
&& enable_weak linux_perf
5930 ranlib
="echo ignoring ranlib"
5936 add_cppflags
-D_GNU_SOURCE
5937 add_ldflags
-Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap
5938 SHFLAGS
='$(SUBDIR)$(NAME).def -Zdll -Zomf'
5942 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5943 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(shell echo $(FULLNAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
5944 SLIB_CREATE_DEF_CMD
='echo LIBRARY $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(FULLNAME).def; \
5945 echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(FULLNAME).def; \
5946 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(FULLNAME).def; \
5947 echo EXPORTS >> $(SUBDIR)$(FULLNAME).def; \
5948 emxexp $(OBJS) >> $(SUBDIR)$(FULLNAME).def'
5949 SLIB_EXTRA_CMD
='emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.a $(SUBDIR)$(FULLNAME).def; \
5950 emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.lib $(SUBDIR)$(FULLNAME).def;'
5951 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5953 SLIB_INSTALL_EXTRA_LIB
='$(LIBPREF)$(FULLNAME)_dll.a $(LIBPREF)$(FULLNAME)_dll.lib'
5955 enable_weak os2threads
5958 add_cppflags
-D_BSD_SOURCE
5963 add_cppflags
-D_QNX_SOURCE
5964 network_extralibs
="-lsocket"
5969 add_cflags
--include=$sysinclude/gcce
/gcce.h
-fvisibility=default
5970 add_cppflags
-D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS
5971 add_ldflags
-Wl,--target1-abs,--no-undefined \
5972 -Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \
5973 -Wl,--entry=_E32Startup
-Wl,-u,_E32Startup
5974 add_extralibs
-l:eexe.lib
-l:usrt2_2.lib
-l:dfpaeabi.dso \
5975 -l:drtaeabi.dso
-l:scppnwdl.dso
-lsupc++ -lgcc \
5976 -l:libc.dso
-l:libm.dso
-l:euser.dso
-l:libcrt0.lib
5983 die
"Unknown OS '$target_os'."
5987 # test if creating links works
5988 link_dest
=$
(mktemp
-u $TMPDIR/dest_XXXXXXXX
)
5989 link_name
=$
(mktemp
-u $TMPDIR/name_XXXXXXXX
)
5991 $ln_s "$link_dest" "$link_name"
5992 touch "$link_dest/test_file"
5993 if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src
] ||
[ -L src
]) && [ -e "$link_name/test_file" ]; then
5994 # create link to source path
5995 [ -e src
] && rm src
5996 $ln_s "$source_path" src
5999 # creating directory links doesn't work
6000 # fall back to using the full source path
6001 source_link
="$source_path"
6007 # determine libc flavour
6012 # uclibc defines __GLIBC__, so it needs to be checked before glibc.
6013 if test_
${pfx}cpp_condition features.h
"defined __UCLIBC__"; then
6014 eval ${pfx}libc_type
=uclibc
6015 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6016 elif test_
${pfx}cpp_condition features.h
"defined __GLIBC__"; then
6017 eval ${pfx}libc_type
=glibc
6018 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6019 # MinGW headers can be installed on Cygwin, so check for newlib first.
6020 elif test_
${pfx}cpp_condition newlib.h
"defined _NEWLIB_VERSION"; then
6021 eval ${pfx}libc_type
=newlib
6022 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D_XOPEN_SOURCE=600
6023 # MinGW64 is backwards compatible with MinGW32, so check for it first.
6024 elif test_
${pfx}cpp_condition _mingw.h
"defined __MINGW64_VERSION_MAJOR"; then
6025 eval ${pfx}libc_type
=mingw64
6026 if test_
${pfx}cpp_condition _mingw.h
"__MINGW64_VERSION_MAJOR < 3"; then
6027 add_compat msvcrt
/snprintf.o
6028 add_cflags
"-include $source_path/compat/msvcrt/snprintf.h"
6030 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
6031 eval test \$
${pfx_no_}cc_type
= "gcc" &&
6032 add_
${pfx}cppflags
-D__printf__=__gnu_printf__
6033 test_
${pfx}cpp_condition windows.h
"!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
6034 add_
${pfx}cppflags
-D_WIN32_WINNT=0x0600
6035 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6036 elif test_
${pfx}cpp_condition _mingw.h
"defined __MINGW_VERSION" ||
6037 test_
${pfx}cpp_condition _mingw.h
"defined __MINGW32_VERSION"; then
6038 eval ${pfx}libc_type
=mingw32
6039 test_
${pfx}cpp_condition _mingw.h
"__MINGW32_MAJOR_VERSION > 3 || \
6040 (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
6041 die
"ERROR: MinGW32 runtime version must be >= 3.15."
6042 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
6043 test_
${pfx}cpp_condition _mingw.h
"__MSVCRT_VERSION__ < 0x0700" &&
6044 add_
${pfx}cppflags
-D__MSVCRT_VERSION__=0x0700
6045 test_
${pfx}cpp_condition windows.h
"!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
6046 add_
${pfx}cppflags
-D_WIN32_WINNT=0x0600
6047 eval test \$
${pfx_no_}cc_type
= "gcc" &&
6048 add_
${pfx}cppflags
-D__printf__=__gnu_printf__
6049 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6050 elif test_
${pfx}cpp_condition crtversion.h
"defined _VC_CRT_MAJOR_VERSION"; then
6051 eval ${pfx}libc_type
=msvcrt
6052 if test_
${pfx}cpp_condition crtversion.h
"_VC_CRT_MAJOR_VERSION < 14"; then
6053 if [ "$pfx" = host_
]; then
6054 add_host_cppflags
-Dsnprintf=_snprintf
6056 add_compat strtod.o strtod
=avpriv_strtod
6057 add_compat msvcrt
/snprintf.o snprintf
=avpriv_snprintf \
6058 _snprintf
=avpriv_snprintf \
6059 vsnprintf
=avpriv_vsnprintf
6062 add_
${pfx}cppflags
-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS
6063 # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
6064 # 0x601 by default unless something else is set by the user.
6065 # This can easily lead to us detecting functions only present
6066 # in such new versions and producing binaries requiring windows 7.0.
6067 # Therefore explicitly set the default to Vista unless the user has
6068 # set something else on the command line.
6069 # Don't do this if WINAPI_FAMILY is set and is set to a non-desktop
6070 # family. For these cases, configure is free to use any functions
6071 # found in the SDK headers by default. (Alternatively, we could force
6072 # _WIN32_WINNT to 0x0602 in that case.)
6073 test_
${pfx}cpp_condition stdlib.h
"defined(_WIN32_WINNT)" ||
6074 { test_
${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0600; }
6075 #ifdef WINAPI_FAMILY
6076 #include <winapifamily.h>
6077 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
6082 if [ "$pfx" = "" ]; then
6083 check_func strtoll || add_cflags
-Dstrtoll=_strtoi64
6084 check_func strtoull || add_cflags
-Dstrtoull=_strtoui64
6086 elif test_
${pfx}cpp_condition stddef.h
"defined __KLIBC__"; then
6087 eval ${pfx}libc_type
=klibc
6088 elif test_
${pfx}cpp_condition sys
/cdefs.h
"defined __BIONIC__"; then
6089 eval ${pfx}libc_type
=bionic
6090 elif test_
${pfx}cpp_condition sys
/brand.h
"defined LABELED_BRAND_NAME"; then
6091 eval ${pfx}libc_type
=solaris
6092 add_
${pfx}cppflags
-D__EXTENSIONS__ -D_XOPEN_SOURCE=600
6093 elif test_
${pfx}cpp_condition sys
/version.h
"defined __DJGPP__"; then
6094 eval ${pfx}libc_type
=djgpp
6095 add_cppflags
-U__STRICT_ANSI__
6096 add_cflags
"-include $source_path/compat/djgpp/math.h"
6097 add_compat djgpp
/math.o
6101 void *v = localtime_r;
6103 test "$?" != 0 && test_
${pfx}cc
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 <<EOF && add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6105 void *v = localtime_r;
6108 eval test -n "\${${pfx}libc_type}" && enable ${pfx}libc_${libc_type}
6114 # hacks for compiler/libc/os combinations
6118 add_compat strtod.o strtod=avpriv_strtod
6122 check_compile_assert flt_lim "float.h limits.h
" "DBL_MAX
== (double
)DBL_MAX
" ||
6123 add_cppflags '-I\$(SRC_PATH)/compat/float'
6125 test_cpp_condition stdlib.h "defined
(__PIC__
) || defined
(__pic__
) || defined
(PIC
)" && enable_weak pic
6128 : ${shlibdir_default:="$libdir"}
6129 : ${pkgconfigdir_default:="$libdir/pkgconfig"}
6131 set_default $PATHS_LIST
6134 disabled optimizations || enabled ossfuzz || check_cflags -fomit-frame-pointer
6137 disabled pic && return
6140 case "$target_os" in
6141 mingw*|cygwin*|win*)
6150 enabled pic && enable_weak_pic
6152 test_cc <<EOF || die "Symbol mangling check failed.
"
6155 sym=$($nm $TMPO | awk '/[ \t]+[^ \t]?ff_extern$/{ print substr($0, match($0, /[^ \t]?ff_extern$/)) }')
6156 extern_prefix=${sym%%ff_extern*}
6158 log "Symbol prefix detected as
: '${extern_prefix}'"
6160 ! disabled inline_asm && check_inline_asm inline_asm '"" ::'
6162 check_cc pragma_deprecated "" '_Pragma("GCC diagnostic push
") _Pragma("GCC diagnostic ignored
\"-Wdeprecated-declarations\"")'
6164 test_cpp_condition stdlib.h "defined
(__BYTE_ORDER__
) && (__BYTE_ORDER__
== __ORDER_BIG_ENDIAN__
)" && enable bigendian
6166 check_cc const_nan math.h "struct
{ double d
; } static const bar
[] = { { NAN
} }"
6168 if ! enabled ppc64 || enabled bigendian; then
6173 log "check_gas using
'$as' as AS
"
6174 # :vararg is used on aarch64, arm and ppc altivec
6176 .macro m n
, y
:vararg
=0
6180 # .altmacro is only used in arm asm
6181 ! enabled arm || check_as gnu_as ".altmacro
"
6184 if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
6186 enabled_any arm aarch64 && nogas=die
6187 enabled_all ppc altivec && [ $target_os_default != aix ] && nogas=warn
6191 arm*) gaspp_as_type=armasm; as_noop=-h ;;
6192 gcc) gaspp_as_type=gas ;;
6193 *) gaspp_as_type=$as_type ;;
6196 [ $target_os = "darwin
" ] && gaspp_as_type="apple-
$gaspp_as_type"
6198 test "${as#*gas-preprocessor.pl}" != "$as" ||
6199 test_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- ${as:=$cc} $as_noop &&
6200 gas="${gas:=gas-preprocessor.pl} -arch $arch -as-type $gaspp_as_type -- ${as:=$cc}"
6202 if ! check_gas ; then
6205 $nogas "GNU assembler not found
, install
/update gas-preprocessor
"
6208 check_as as_func ".func
test
6212 check_inline_asm inline_asm_labels '"1:\n"'
6214 check_inline_asm inline_asm_nonlocal_labels '"Label
:\n"'
6216 if enabled aarch64; then
6217 as_arch_level="armv8-a
"
6218 check_as as_arch_directive ".arch
$as_arch_level"
6219 if enabled as_arch_directive; then
6220 # Check for higher .arch levels. We only need armv8.2-a in order to
6221 # enable the extensions we want below - we primarily want to control
6222 # them via .arch_extension. However:
6224 # Clang before version 17 (Xcode versions up to and including 15.0)
6225 # didn't support controlling the dotprod/i8mm extensions via
6226 # .arch_extension; thus try to enable them via the .arch level as well.
6227 for level in armv8.2-a armv8.4-a armv8.6-a; do
6228 check_arch_level $level
6230 # Clang before version 17 (Xcode versions up to and including 15.0)
6231 # also had a bug (https://github.com/llvm/llvm-project/issues/32220)
6232 # causing a plain ".arch
<level
>" to not have any effect unless it
6233 # had an extra "+<feature
>" included - but it was activated on the next
6234 # ".arch_extension
" directive. Check if we can include "+crc
" as dummy
6235 # feature to make the .arch directive behave as expected and take
6236 # effect right away.
6237 check_arch_level "${as_arch_level}+crc
"
6240 enabled armv8 && check_insn armv8 'prfm pldl1strm, [x0]'
6241 # internal assembler in clang 3.3 does not support this instruction
6242 enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1'
6244 archext_list="dotprod i8mm sve sve2
"
6245 enabled dotprod && check_archext_insn dotprod 'udot v0.4s, v0.16b, v0.16b'
6246 enabled i8mm && check_archext_insn i8mm 'usdot v0.4s, v0.16b, v0.16b'
6247 enabled sve && check_archext_insn sve 'whilelt p0.s, x0, x1'
6248 enabled sve2 && check_archext_insn sve2 'sqrdmulh z0.s, z0.s, z0.s'
6250 # Disable the main feature (e.g. HAVE_NEON) if neither inline nor external
6251 # assembly support the feature out of the box. Skip this for the features
6252 # checked with check_archext_insn above, as that function takes care of
6253 # updating all the variables as necessary.
6254 for v in $ARCH_EXT_LIST_ARM; do
6255 is_in $v $archext_list && continue
6256 enabled_any ${v}_external ${v}_inline || disable $v
6259 elif enabled arm; then
6261 enabled msvc && check_cpp_condition thumb stddef.h "defined _M_ARMT
"
6262 test_cpp_condition stddef.h "defined __thumb__
" && test_cc <<EOF && enable_weak thumb
6263 float func(float a, float b){ return a+b; }
6265 enabled thumb && check_cflags -mthumb || check_cflags -marm
6267 if check_cpp_condition vfp_args stddef.h "defined __ARM_PCS_VFP
"; then
6269 elif check_cpp_condition vfp_args stddef.h "defined _M_ARM_FP
&& _M_ARM_FP
>= 30"; then
6271 elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__
" && [ $target_os != darwin ]; then
6272 case "${cross_prefix:-$cc}" in
6273 *hardfloat*) enable vfp_args; fpabi=vfp ;;
6274 *) check_ld "cc
" vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
6275 __asm__ (".eabi_attribute
28, 1");
6276 int main(void) { return 0; }
6279 warn "Compiler does not indicate floating-point ABI
, guessing
$fpabi.
"
6282 # Test for various instruction sets, testing support both in inline and
6283 # external assembly. This sets the ${v}_inline or ${v}_external flags
6284 # if the instruction can be used unconditionally in either inline or
6285 # external assembly. This means that if the ${v}_external feature is set,
6286 # that feature can be used unconditionally in various support macros
6287 # anywhere in external assembly, in any function.
6288 enabled armv5te && check_insn armv5te 'qadd r0, r0, r0'
6289 enabled armv6 && check_insn armv6 'sadd16 r0, r0, r0'
6290 enabled armv6t2 && check_insn armv6t2 'movt r0, #0'
6291 enabled neon && check_insn neon 'vadd.i16 q0, q0, q0'
6292 enabled vfp && check_insn vfp 'fadds s0, s0, s0'
6293 enabled vfpv3 && check_insn vfpv3 'vmov.f32 s0, #1.0'
6294 enabled setend && check_insn setend 'setend be'
6296 # If neither inline nor external assembly can use the feature by default,
6297 # disable the main unsuffixed feature (e.g. HAVE_NEON).
6299 # For targets that support runtime CPU feature detection, don't disable
6300 # the main feature flag - there we assume that all supported toolchains
6301 # can assemble code for all instruction set features (e.g. NEON) with
6302 # suitable assembly flags (such as ".fpu neon
"); we don't check
6303 # specifically that they really do.
6304 [ $target_os = linux ] || [ $target_os = android ] ||
6305 map 'enabled_any ${v}_external ${v}_inline || disable $v' \
6308 check_inline_asm asm_mod_q '"add r0
, %Q0
, %R0
" :: "r
"((long long)0)'
6310 check_as as_arch_directive ".arch armv7-a
"
6311 check_as as_dn_directive "ra .dn d0.i16
"
6312 check_as as_fpu_directive ".fpu neon
"
6314 # llvm's integrated assembler supports .object_arch from llvm 3.5
6315 [ "$objformat" = elf32 ] || [ "$objformat" = elf64 ] &&
6316 check_as as_object_arch ".object_arch armv4
"
6318 # MS armasm fails to assemble our PIC constructs
6319 [ $target_os != win32 ] && enabled_all armv6t2 shared !pic && enable_weak_pic
6321 elif enabled mips; then
6323 # Check toolchain ISA level
6324 if enabled mips64; then
6325 enabled mips64r6 && check_inline_asm mips64r6 '"dlsa
$0, $0, $0, 1"' &&
6328 enabled mips64r2 && check_inline_asm mips64r2 '"dext
$0, $0, 0, 1"'
6330 disable mips32r6 && disable mips32r5 && disable mips32r2
6332 enabled mips32r6 && check_inline_asm mips32r6 '"aui
$0, $0, 0"' &&
6333 disable mips32r5 && disable mips32r2
6335 enabled mips32r5 && check_inline_asm mips32r5 '"eretnc
"'
6336 enabled mips32r2 && check_inline_asm mips32r2 '"ext
$0, $0, 0, 1"'
6338 disable mips64r6 && disable mips64r5 && disable mips64r2
6341 enabled mipsfpu && check_inline_asm mipsfpu '"cvt.d.l
$f0, $f2"'
6342 enabled mipsfpu && (enabled mips32r5 || enabled mips32r6 || enabled mips64r6) && check_inline_asm_flags mipsfpu '"cvt.d.l
$f0, $f1"' '-mfp64'
6344 enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb
$t0, $t1, $t2"' '-mdsp'
6345 enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb
$t0, $t1"' '-mdspr2'
6347 # MSA can be detected at runtime so we supply extra flags here
6348 enabled mipsfpu && enabled msa && check_inline_asm msa '"addvi.b
$w0, $w1, 1"' '-mmsa' && append MSAFLAGS '-mmsa'
6350 # loongson2 have no switch cflag so we can only probe toolchain ability
6351 enabled loongson2 && check_inline_asm loongson2 '"dmult.g
$8, $9, $10"' && disable loongson3
6353 # loongson3 is paired with MMI
6354 enabled loongson3 && check_inline_asm loongson3 '"gsldxc1
$f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
6356 # MMI can be detected at runtime too
6357 enabled mmi && check_inline_asm mmi '"pxor
$f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
6359 if enabled bigendian && enabled msa; then
6363 elif enabled parisc; then
6365 if enabled gcc; then
6366 case $($cc -dumpversion) in
6367 4.[3-9].*) check_cflags -fno-optimize-sibling-calls ;;
6371 elif enabled ppc; then
6373 enable local_aligned
6375 check_inline_asm dcbzl '"dcbzl
0, %0" :: "r
"(0)'
6376 check_inline_asm ibm_asm '"add
0, 0, 0"'
6377 check_inline_asm ppc4xx '"maclhw r10
, r11
, r12
"'
6378 check_inline_asm xform_asm '"lwzx
%1, %y0
" :: "Z
"(*(int*)0), "r
"(0)'
6380 if enabled altivec; then
6381 check_cflags -maltivec -mabi=altivec
6383 # check if our compiler supports Motorola AltiVec C API
6384 check_cc altivec altivec.h "vector signed int v1
= (vector signed int
) { 0 };
6385 vector signed int v2
= (vector signed int
) { 1 };
6386 v1
= vec_add
(v1
, v2
);"
6388 enabled altivec || warn "Altivec disabled
, possibly missing
--cpu flag
"
6391 if enabled vsx; then
6392 check_cflags -mvsx &&
6393 check_cc vsx altivec.h "int v
[4] = { 0 };
6394 vector signed int v1
= vec_vsx_ld
(0, v
);"
6397 if enabled power8; then
6398 check_cpp_condition power8 "altivec.h
" "defined
(_ARCH_PWR8
)"
6401 elif enabled riscv; then
6403 enabled rv && check_inline_asm rv '".option arch
, +zbb
\nrev
8 t0
, t1
"'
6404 enabled rvv && check_inline_asm rvv '".option arch
, +v
\nvsetivli zero
, 0, e8
, m1
, ta
, ma
"'
6405 enabled rv_zicbop && check_inline_asm rv_zicbop '".option arch
, +zicbop
\nprefetch.r
64(a0
)"'
6406 enabled rv_zvbb && check_inline_asm rv_zvbb '".option arch
, +zvbb
\nvclz.v v0
, v8
"'
6408 elif enabled x86; then
6410 check_builtin rdtsc intrin.h "__rdtsc
()"
6411 check_builtin mm_empty mmintrin.h "_mm_empty
()"
6413 enable local_aligned
6415 # check whether EBP is available on x86
6416 # As 'i' is stored on the stack, this program will crash
6417 # if the base pointer is used to access it because the
6418 # base pointer is cleared in the inline assembly code.
6419 check_exec_crash <<EOF && enable ebp_available
6421 __asm__ volatile ("xorl
%%ebp
, %%ebp
" ::: "%ebp
");
6425 # check whether EBX is available on x86
6426 check_inline_asm ebx_available '""::"b
"(0)' &&
6427 check_inline_asm ebx_available '"":::"%ebx
"'
6429 # check whether xmm clobbers are supported
6430 check_inline_asm xmm_clobbers '"":::"%xmm0
"'
6432 check_inline_asm inline_asm_direct_symbol_refs '"movl
'$extern_prefix'test, %eax
"' ||
6433 check_inline_asm inline_asm_direct_symbol_refs '"movl
'$extern_prefix'test(%rip
), %eax
"'
6435 # check whether binutils is new enough to compile SSSE3/MMXEXT
6436 enabled ssse3 && check_inline_asm ssse3_inline '"pabsw
%xmm0
, %xmm0
"'
6437 enabled mmxext && check_inline_asm mmxext_inline '"pmaxub
%mm0
, %mm1
"'
6441 if test_cmd $x86asmexe_probe -v; then
6442 x86asmexe=$x86asmexe_probe
6443 x86asm_debug="-g -F dwarf
"
6445 X86ASM_DEPFLAGS='-MD $(@:.o=.d)'
6447 check_x86asm x86asm "movbe ecx
, [5]"
6450 if ! disabled_any asm mmx x86asm; then
6452 for program in $x86asmexe nasm; do
6453 probe_x86asm $program && break
6455 disabled x86asm && die "nasm not found or too old. Please install
/update nasm or use
--disable-x86asm for a build without hand-optimized assembly.
"
6456 X86ASMFLAGS="-f $objformat"
6457 test -n "$extern_prefix" && append X86ASMFLAGS "-DPREFIX"
6458 case "$objformat" in
6459 elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;;
6462 enabled avx512 && check_x86asm avx512_external "vmovdqa32
[eax
]{k1
}{z
}, zmm0
"
6463 enabled avx512icl && check_x86asm avx512icl_external "vpdpwssds zmm31
{k1
}{z
}, zmm29
, zmm28
"
6464 enabled avx2 && check_x86asm avx2_external "vextracti128 xmm0
, ymm0
, 0"
6465 enabled xop && check_x86asm xop_external "vpmacsdd xmm0
, xmm1
, xmm2
, xmm3
"
6466 enabled fma4 && check_x86asm fma4_external "vfmaddps ymm0
, ymm1
, ymm2
, ymm3
"
6470 athlon*|opteron*|k8*|pentium|pentium-mmx|prescott|nocona|atom|geode)
6475 elif enabled loongarch; then
6476 enabled lsx && check_inline_asm lsx '"vadd.b
$vr0, $vr1, $vr2"' '-mlsx' && append LSXFLAGS '-mlsx'
6477 enabled lasx && check_inline_asm lasx '"xvadd.b
$xr0, $xr1, $xr2"' '-mlasx' && append LASXFLAGS '-mlasx'
6480 check_cc intrinsics_neon arm_neon.h "int16x8_t
test = vdupq_n_s16
(0)"
6481 check_cc intrinsics_sse2 emmintrin.h "__m128i
test = _mm_setzero_si128
()"
6483 check_ldflags -Wl,--as-needed
6484 check_ldflags -Wl,-z,noexecstack
6485 if [ $target_os = "darwin
" ]; then
6486 check_ldflags -Wl,-no_warn_duplicate_libraries
6489 if ! disabled network; then
6490 check_func getaddrinfo $network_extralibs
6491 check_func inet_aton $network_extralibs
6493 check_type netdb.h "struct addrinfo
"
6494 check_type netinet/in.h "struct group_source_req
" -D_BSD_SOURCE
6495 check_type netinet/in.h "struct ip_mreq_source
" -D_BSD_SOURCE
6496 check_type netinet/in.h "struct ipv6_mreq
" -D_DARWIN_C_SOURCE
6497 check_type poll.h "struct pollfd
"
6498 check_type netinet/sctp.h "struct sctp_event_subscribe
"
6499 check_struct "sys
/socket.h
" "struct msghdr
" msg_flags
6500 check_struct "sys
/types.h sys
/socket.h
" "struct sockaddr
" sa_len
6501 check_type netinet/in.h "struct sockaddr_in6
"
6502 check_type "sys
/types.h sys
/socket.h
" "struct sockaddr_storage
"
6503 check_type "sys
/types.h sys
/socket.h
" socklen_t
6505 # Prefer arpa/inet.h over winsock2
6506 if check_headers arpa/inet.h ; then
6507 check_func closesocket
6508 elif check_headers winsock2.h ; then
6509 check_func_headers winsock2.h closesocket -lws2 &&
6510 network_extralibs="-lws2" ||
6511 { check_func_headers winsock2.h closesocket -lws2_32 &&
6512 network_extralibs="-lws2_32"; } || disable winsock2_h network
6513 check_func_headers ws2tcpip.h getaddrinfo $network_extralibs
6515 check_type ws2tcpip.h socklen_t
6516 check_type ws2tcpip.h "struct addrinfo
"
6517 check_type ws2tcpip.h "struct group_source_req
"
6518 check_type ws2tcpip.h "struct ip_mreq_source
"
6519 check_type ws2tcpip.h "struct ipv6_mreq
"
6520 check_type winsock2.h "struct pollfd
"
6521 check_struct winsock2.h "struct sockaddr
" sa_len
6522 check_type ws2tcpip.h "struct sockaddr_in6
"
6523 check_type ws2tcpip.h "struct sockaddr_storage
"
6529 check_builtin MemoryBarrier windows.h "MemoryBarrier
()"
6530 check_builtin gmtime_r time.h "time_t
*time; struct tm
*tm
; gmtime_r
(time, tm
)"
6531 check_builtin localtime_r time.h "time_t
*time; struct tm
*tm
; localtime_r
(time, tm
)"
6533 check_builtin float16 "" "_Float16 f16var
"
6534 if enabled float16; then
6535 if enabled x86; then
6536 test_cpp_condition stddef.h "defined
(__F16C__
)" && enable fast_float16
6537 elif enabled arm || enabled aarch64; then
6542 case "$custom_allocator" in
6546 test -n "$malloc_prefix" ||
6547 malloc_prefix=$($pkg_config --variable=jemalloc_prefix $pkg_config_flags jemalloc 2>/dev/null)
6548 require_pkg_config custom_allocator jemalloc jemalloc/jemalloc.h ${malloc_prefix}malloc
6551 require_pkg_config custom_allocator libtcmalloc gperftools/tcmalloc.h tc_malloc
6555 require_pkg_config custom_allocator "$custom_allocator" stdlib.h malloc
6559 if test -n "$custom_allocator"; then
6560 add_extralibs "$custom_allocator_extralibs"
6563 # Unlike other feature flags or libraries, spirv_compiler is not defined
6564 # within any of our predefined categories of components.
6565 # It gets defined if either libshaderc or libglslang check succeeds.
6566 # As such, its in a state of neither being explicitly enabled, nor
6567 # explicitly disabled, but even in this state, being mentioned in
6568 # _deps results in it always passing.
6569 # Disable it explicitly to fix this.
6570 disable spirv_compiler
6572 check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
6573 check_func ${malloc_prefix}memalign && enable memalign
6574 check_func ${malloc_prefix}posix_memalign && enable posix_memalign
6577 check_func_headers stdlib.h arc4random_buf
6578 check_lib clock_gettime time.h clock_gettime || check_lib clock_gettime time.h clock_gettime -lrt
6581 check_func gethrtime
6583 check_func getrusage
6584 check_func gettimeofday
6589 # Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
6590 check_func_headers time.h nanosleep || check_lib nanosleep time.h nanosleep -lrt
6591 check_func_headers sys/prctl.h prctl
6592 check_func sched_getaffinity
6593 check_func setrlimit
6594 check_struct "sys
/stat.h
" "struct stat
" st_mtim.tv_nsec -D_BSD_SOURCE
6595 check_func strerror_r
6601 check_func_headers conio.h kbhit
6602 check_func_headers io.h setmode
6603 check_func_headers lzo/lzo1x.h lzo1x_999_compress
6604 check_func_headers mach/mach_time.h mach_absolute_time
6605 check_func_headers stdlib.h getenv
6606 check_func_headers sys/stat.h lstat
6607 check_func_headers sys/auxv.h getauxval
6608 check_func_headers sys/auxv.h elf_aux_info
6609 check_func_headers sys/sysctl.h sysctlbyname
6611 check_func_headers windows.h GetModuleHandle
6612 check_func_headers windows.h GetProcessAffinityMask
6613 check_func_headers windows.h GetProcessTimes
6614 check_func_headers windows.h GetStdHandle
6615 check_func_headers windows.h GetSystemTimeAsFileTime
6616 check_func_headers windows.h LoadLibrary
6617 check_func_headers windows.h MapViewOfFile
6618 check_func_headers windows.h PeekNamedPipe
6619 check_func_headers windows.h SetConsoleTextAttribute
6620 check_func_headers windows.h SetConsoleCtrlHandler
6621 check_func_headers windows.h SetDllDirectory
6622 check_func_headers windows.h Sleep
6623 check_func_headers windows.h VirtualAlloc
6624 check_func_headers glob.h glob
6626 if enabled xlib; then
6627 check_pkg_config xlib_x11 x11 "X11
/Xlib.h
" XPending ||
6628 check_lib xlib_x11 "X11
/Xlib.h
" XPending -lX11 ||
6631 check_pkg_config xlib_xext xext "X11
/Xlib.h X11
/extensions
/XShm.h
" XShmAttach ||
6632 check_lib xlib_xext "X11
/Xlib.h X11
/extensions
/XShm.h
" XShmAttach -lXext ||
6635 check_pkg_config xlib_xv xv "X11
/Xlib.h X11
/extensions
/Xvlib.h
" XvGetPortAttribute ||
6636 check_lib xlib_xv "X11
/Xlib.h X11
/extensions
/Xvlib.h
" XvGetPortAttribute -lXv ||
6640 check_headers direct.h
6641 check_headers dirent.h
6642 check_headers dxgidebug.h
6643 check_headers dxva.h
6644 check_headers dxva2api.h -D_WIN32_WINNT=0x0600
6647 check_headers linux/dma-buf.h
6649 check_headers linux/perf_event.h
6650 check_headers malloc.h
6651 check_headers mftransform.h
6652 check_headers net/udplite.h
6653 check_headers poll.h
6654 check_headers pthread_np.h
6655 check_headers sys/param.h
6656 check_headers sys/resource.h
6657 check_headers sys/select.h
6658 check_headers sys/time.h
6659 check_headers sys/un.h
6660 check_headers termios.h
6661 check_headers unistd.h
6662 check_headers valgrind/valgrind.h
6663 check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
6664 check_func_headers VideoToolbox/VideoToolbox.h VTPixelTransferSessionCreate -framework VideoToolbox
6665 check_func_headers VideoToolbox/VideoToolbox.h VTPixelRotationSessionCreate -framework VideoToolbox
6666 check_headers windows.h
6667 check_headers asm/types.h
6669 # it seems there are versions of clang in some distros that try to use the
6670 # gcc headers, which explodes for stdatomic
6671 # so we also check that atomics actually work here
6673 # some configurations also require linking to libatomic, so try
6674 # both with -latomic and without
6675 for LATOMIC in "-latomic" ""; do
6676 check_builtin stdatomic stdatomic.h \
6677 "atomic_int foo
, bar
= -1; atomic_store
(&foo
, 0); foo
+= bar
" \
6678 $LATOMIC && eval stdatomic_extralibs="\
$LATOMIC" && break
6681 check_lib advapi32 "windows.h
" RegCloseKey -ladvapi32
6682 check_lib bcrypt "windows.h bcrypt.h
" BCryptGenRandom -lbcrypt &&
6683 check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM
"
6684 check_lib ole32 "windows.h objbase.h
" CoTaskMemFree -lole32
6685 check_lib shell32 "windows.h shellapi.h
" CommandLineToArgvW -lshell32
6686 check_lib psapi "windows.h psapi.h
" GetProcessMemoryInfo -lpsapi
6688 check_lib android android/native_window.h ANativeWindow_acquire -landroid
6689 check_lib mediandk "stdint.h media
/NdkMediaFormat.h
" AMediaFormat_new -lmediandk
6690 check_lib camera2ndk "stdbool.h stdint.h camera
/NdkCameraManager.h
" ACameraManager_create -lcamera2ndk
6692 enabled appkit && check_apple_framework AppKit
6693 enabled audiotoolbox && check_apple_framework AudioToolbox
6694 enabled avfoundation && check_apple_framework AVFoundation
6695 enabled coreimage && check_apple_framework CoreImage
6696 enabled metal && check_apple_framework Metal
6697 enabled videotoolbox && check_apple_framework VideoToolbox
6699 check_apple_framework CoreFoundation
6700 check_apple_framework CoreMedia
6701 check_apple_framework CoreVideo
6702 check_apple_framework CoreAudio
6704 enabled avfoundation && {
6705 disable coregraphics applicationservices
6706 check_lib coregraphics CoreGraphics/CoreGraphics.h CGGetActiveDisplayList "-framework CoreGraphics
" ||
6707 check_lib applicationservices ApplicationServices/ApplicationServices.h CGGetActiveDisplayList "-framework ApplicationServices
"; }
6709 enabled videotoolbox && {
6710 check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString "-framework CoreServices
"
6711 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia
"
6712 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVCWithAlpha "-framework CoreMedia
"
6713 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_VP9 "-framework CoreMedia
"
6714 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_AV1 "-framework CoreMedia
"
6715 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6716 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange "-framework CoreVideo
"
6717 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6718 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange "-framework CoreVideo
"
6719 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange "-framework CoreVideo
"
6720 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6721 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange "-framework CoreVideo
"
6722 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ "-framework CoreVideo
"
6723 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2100_HLG "-framework CoreVideo
"
6724 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_Linear "-framework CoreVideo
"
6725 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferYCbCrMatrix_ITU_R_2020 "-framework CoreVideo
"
6726 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferColorPrimaries_ITU_R_2020 "-framework CoreVideo
"
6727 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2020 "-framework CoreVideo
"
6728 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_428_1 "-framework CoreVideo
"
6731 enabled metal && test_cmd $metalcc -v || disable metal
6733 check_struct "sys
/time.h sys
/resource.h
" "struct rusage
" ru_maxrss
6735 check_type "windows.h dxva.h
" "DXVA_PicParams_AV1
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6736 check_type "windows.h dxva.h
" "DXVA_PicParams_HEVC
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6737 check_type "windows.h dxva.h
" "DXVA_PicParams_VP9
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6738 check_type "windows.h dxgi1_2.h
" "DXGI_OUTDUPL_FRAME_INFO
"
6739 check_type "windows.h dxgi1_2.h
" "IDXGIOutput1
"
6740 check_type "windows.h dxgi1_5.h
" "IDXGIOutput5
"
6741 check_type "windows.h d3d11.h
" "ID3D11VideoDecoder
"
6742 check_type "windows.h d3d11.h
" "ID3D11VideoContext
"
6743 check_type "windows.h d3d12.h
" "ID3D12Device
"
6744 check_type "windows.h d3d12video.h
" "ID3D12VideoDecoder
"
6745 check_type "windows.h d3d12video.h
" "ID3D12VideoEncoder
"
6746 test_code cc "windows.h d3d12video.h
" "D3D12_FEATURE_VIDEO feature
= D3D12_FEATURE_VIDEO_ENCODER_CODEC
" && \
6747 test_code cc "windows.h d3d12video.h
" "D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS req
" && enable d3d12_encoder_feature
6748 check_type "windows.h
" "DPI_AWARENESS_CONTEXT
" -D_WIN32_WINNT=0x0A00
6749 check_type "d3d9.h dxva2api.h
" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
6750 check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat
6752 check_type "vdpau
/vdpau.h
" "VdpPictureInfoHEVC
"
6753 check_type "vdpau
/vdpau.h
" "VdpPictureInfoVP9
"
6754 check_type "vdpau
/vdpau.h
" "VdpPictureInfoAV1
"
6756 if [ -z "$nvccflags" ]; then
6757 nvccflags=$nvccflags_default
6760 nvccflags="$nvccflags -std=c
++11"
6762 if enabled x86_64 || enabled ppc64 || enabled aarch64; then
6763 nvccflags="$nvccflags -m64"
6765 nvccflags="$nvccflags -m32"
6768 if enabled cuda_nvcc; then
6769 nvccflags="$nvccflags -ptx"
6771 nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -Wno-c++11-narrowing -include ${source_link}/compat
/cuda
/cuda_runtime.h
"
6772 check_nvcc cuda_llvm
6775 if ! disabled ffnvcodec; then
6776 ffnv_hdr_list="ffnvcodec
/nvEncodeAPI.h ffnvcodec
/dynlink_cuda.h ffnvcodec
/dynlink_cuviddec.h ffnvcodec
/dynlink_nvcuvid.h
"
6777 check_pkg_config ffnvcodec "ffnvcodec
>= 12.1.14.0" "$ffnv_hdr_list" "" || \
6778 check_pkg_config ffnvcodec "ffnvcodec
>= 12.0.16.1 ffnvcodec
< 12.1" "$ffnv_hdr_list" "" || \
6779 check_pkg_config ffnvcodec "ffnvcodec
>= 11.1.5.3 ffnvcodec
< 12.0" "$ffnv_hdr_list" "" || \
6780 check_pkg_config ffnvcodec "ffnvcodec
>= 11.0.10.3 ffnvcodec
< 11.1" "$ffnv_hdr_list" "" || \
6781 check_pkg_config ffnvcodec "ffnvcodec
>= 8.1.24.15 ffnvcodec
< 8.2" "$ffnv_hdr_list" ""
6784 if enabled_all libglslang libshaderc; then
6785 die "ERROR
: libshaderc and libglslang are mutually exclusive
, if in doubt
, disable libglslang
"
6788 check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION
(WINAPI_PARTITION_DESKTOP
)"
6790 if ! disabled w32threads && ! enabled pthreads; then
6791 check_func_headers "windows.h process.h
" _beginthreadex &&
6792 check_type "windows.h
" CONDITION_VARIABLE &&
6793 check_type "windows.h
" INIT_ONCE &&
6794 enable w32threads || disable w32threads
6795 if ! enabled w32threads && enabled winrt; then
6796 check_func_headers "windows.h
" CreateThread &&
6797 enable w32threads || disable w32threads
6801 # check for some common methods of building with pthread support
6802 # do this before the optional library checks as some of them require pthreads
6803 if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
6804 if check_lib pthreads pthread.h pthread_join -pthread &&
6805 check_lib pthreads pthread.h pthread_create -pthread; then
6807 elif check_lib pthreads pthread.h pthread_join -pthreads &&
6808 check_lib pthreads pthread.h pthread_create -pthreads; then
6809 add_cflags -pthreads
6810 elif check_lib pthreads pthread.h pthread_join -ldl -pthread &&
6811 check_lib pthreads pthread.h pthread_create -ldl -pthread; then
6812 add_cflags -ldl -pthread
6813 elif check_lib pthreads pthread.h pthread_join -lpthreadGC2 &&
6814 check_lib pthreads pthread.h pthread_create -lpthreadGC2; then
6816 elif check_lib pthreads pthread.h pthread_join -lpthread &&
6817 check_lib pthreads pthread.h pthread_create -lpthread; then
6819 elif check_func pthread_join && check_func pthread_create; then
6822 check_cc pthreads "pthread.h
" "static pthread_mutex_t atomic_lock
= PTHREAD_MUTEX_INITIALIZER
"
6824 if enabled pthreads; then
6825 check_builtin sem_timedwait semaphore.h "sem_t
*s
; sem_init
(s
,0,0); sem_timedwait
(s
,0); sem_destroy
(s
)" $pthreads_extralibs
6826 check_func pthread_cancel $pthreads_extralibs
6828 if enabled pthread_np_h; then
6829 hdrs="$hdrs pthread_np.h
"
6831 check_lib pthread_set_name_np "$hdrs" pthread_set_name_np -lpthread
6832 check_lib pthread_setname_np "$hdrs" pthread_setname_np -lpthread
6836 enabled zlib && { check_pkg_config zlib zlib "zlib.h
" zlibVersion ||
6837 check_lib zlib zlib.h zlibVersion -lz; }
6838 enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
6839 enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
6841 enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
6844 if (zlibCompileFlags() & (1 << 17)) return 1;
6849 [ -x "$
(command -v gzip)" ] && enable gzip
6851 enabled zlib_gzip && enabled gzip || disable ptx_compression
6853 # On some systems dynamic loading requires no extra linker flags
6854 check_lib libdl dlfcn.h "dlopen dlsym
" || check_lib libdl dlfcn.h "dlopen dlsym
" -ldl
6856 check_lib libm math.h sin -lm
6864 for func in $MATH_FUNCS; do
6865 eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs
6868 # these are off by default, so fail if requested and not available
6869 enabled avisynth && { require_headers "avisynth
/avisynth_c.h avisynth
/avs
/version.h
" &&
6870 { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER
>= 3 && AVS_MINOR_VER
>= 7 && AVS_BUGFIX_VER
>= 3 || AVS_MAJOR_VER
>= 3 && AVS_MINOR_VER
> 7 || AVS_MAJOR_VER
> 3" ||
6871 die "ERROR
: AviSynth
+ header version must be
>= 3.7.3"; } }
6872 enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR
: failed checking
for nvcc.
"; }
6873 enabled chromaprint && { check_pkg_config chromaprint libchromaprint "chromaprint.h
" chromaprint_get_version ||
6874 require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; }
6875 enabled decklink && { require_headers DeckLinkAPI.h &&
6876 { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION
>= 0x0a0b0000" || die "ERROR
: Decklink API version must be
>= 10.11"; } }
6877 enabled frei0r && require_headers "frei0r.h
"
6878 enabled gmp && require gmp gmp.h mpz_export -lgmp
6879 enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
6880 enabled jni && { [ $target_os = "android
" ] && check_headers jni.h && enabled pthreads || die "ERROR
: jni not found
"; }
6881 enabled ladspa && require_headers "ladspa.h dlfcn.h
"
6882 enabled lcms2 && require_pkg_config lcms2 "lcms2
>= 2.13" lcms2.h cmsCreateContext
6883 enabled libaom && require_pkg_config libaom "aom
>= 2.0.0" aom/aom_codec.h aom_codec_version
6884 enabled libaribb24 && { check_pkg_config libaribb24 "aribb24
> 1.0.3" "aribb24
/aribb24.h
" arib_instance_new ||
6885 { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24
/aribb24.h
" arib_instance_new; } ||
6886 die "ERROR
: libaribb24 requires version higher than
1.0.3 or
--enable-gpl.
"; }
6887 enabled libaribcaption && require_pkg_config libaribcaption "libaribcaption
>= 1.1.1" "aribcaption
/aribcaption.h
" aribcc_context_alloc
6888 enabled lv2 && require_pkg_config lv2 lilv-0 "lilv
/lilv.h
" lilv_world_new
6889 enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
6890 enabled libass && require_pkg_config libass "libass
>= 0.11.0" ass/ass.h ass_library_init
6891 enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
6892 enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open
6893 enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
6894 { check_lib libcelt celt/celt.h celt_decoder_create_custom -lcelt0 ||
6895 die "ERROR
: libcelt must be installed and version must be
>= 0.11.0.
"; }
6896 enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
6897 enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
6898 enabled libdav1d && require_pkg_config libdav1d "dav1d
>= 0.5.0" "dav1d
/dav1d.h
" dav1d_version
6899 enabled libdavs2 && require_pkg_config libdavs2 "davs2
>= 1.6.0" davs2.h davs2_decoder_open
6900 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
6901 enabled libdrm && check_pkg_config libdrm libdrm xf86drm.h drmGetVersion
6902 enabled libdvdnav && require_pkg_config libdvdnav "dvdnav
>= 6.1.1" dvdnav/dvdnav.h dvdnav_open2
6903 enabled libdvdread && require_pkg_config libdvdread "dvdread
>= 6.1.2" dvdread/dvd_reader.h DVDOpen2
6904 enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac
/aacenc_lib.h
" aacEncOpen ||
6905 { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
6906 warn "using libfdk without pkg-config
"; } }
6907 flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
6908 enabled libflite && require libflite "flite
/flite.h
" flite_init $flite_extralibs
6909 enabled fontconfig && enable libfontconfig
6910 enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig
/fontconfig.h
" FcInit
6911 enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H
" FT_Init_FreeType
6912 enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
6913 enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create
6914 enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
6915 -lglslang -lMachineIndependent -lGenericCodeGen \
6916 -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ||
6917 require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
6918 -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \
6919 -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ; }
6920 enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
6921 require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
6922 enabled libgsm && { for gsm_hdr in "gsm.h
" "gsm
/gsm.h
"; do
6923 check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
6924 done || die "ERROR
: libgsm not found
"; }
6925 enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs
6926 enabled libjxl && require_pkg_config libjxl "libjxl
>= 0.7.0" jxl/decode.h JxlDecoderVersion &&
6927 require_pkg_config libjxl_threads "libjxl_threads
>= 0.7.0" jxl/thread_parallel_runner.h JxlThreadParallelRunner
6928 enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc
6929 enabled libkvazaar && require_pkg_config libkvazaar "kvazaar
>= 2.0.0" kvazaar.h kvz_api_get
6930 enabled liblc3 && require_pkg_config liblc3 "lc3
>= 1.1.0" lc3.h lc3_hr_setup_encoder
6931 enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_create
6932 enabled liblcevc_dec && require_pkg_config liblcevc_dec "lcevc_dec
>= 2.0.0" "LCEVC
/lcevc_dec.h
" LCEVC_CreateDecoder
6934 if enabled libmfx && enabled libvpl; then
6935 die "ERROR
: can not use libmfx and libvpl together
"
6936 # While it may appear that require is being used as a pkg-config
6937 # fallback for libmfx, it is actually being used to detect a different
6938 # installation route altogether. If libmfx is installed via the Intel
6939 # Media SDK or Intel Media Server Studio, these don't come with
6940 # pkg-config support. Instead, users should make sure that the build
6941 # can find the libraries and headers through other means.
6942 elif enabled libmfx; then
6943 { check_pkg_config libmfx "libmfx
>= 1.28 libmfx
< 2.0" "mfxvideo.h
" MFXInit ||
6944 # Some old versions of libmfx have the following settings in libmfx.pc:
6945 # includedir=/usr/include
6946 # Cflags: -I${includedir}
6947 # So add -I${includedir}/mfx to CFLAGS
6948 { check_pkg_config libmfx "libmfx
>= 1.28 libmfx
< 2.0" "mfx
/mfxvideo.h
" MFXInit && add_cflags -I${libmfx_incdir}/mfx; } ||
6949 { require libmfx "mfxvideo.h mfxdefs.h
" MFXInit "-llibmfx $advapi32_extralibs" &&
6950 { test_cpp_condition mfxdefs.h "MFX_VERSION
>= 1028 && MFX_VERSION
< 2000" || die "ERROR
: libmfx version must be
>= 1.28 and
< 2.0"; } &&
6951 warn "using libmfx without pkg-config
"; } } &&
6952 warn "libmfx is deprecated. Please run configure with
--enable-libvpl to use libvpl instead.
"
6953 elif enabled libvpl; then
6954 # Consider pkg-config only. The name of libmfx is still passed to check_pkg_config function for --enable-libvpl option
6955 # because QSV has dependency on libmfx, we can use the same dependency if using libmfx in this check. The package name
6956 # is extracted from "vpl
>= 2.6"
6957 check_pkg_config libmfx "vpl
>= 2.6" "mfxvideo.h mfxdispatcher.h
" MFXLoad || \
6958 die "ERROR
: libvpl
>= 2.6 not found
"
6959 add_cflags -DMFX_DEPRECATED_OFF
6960 check_type "vpl
/mfxdefs.h vpl
/mfxvideo.h
" "struct mfxConfigInterface
"
6963 if enabled libmfx; then
6964 check_cc MFX_CODEC_VP9 "mfxdefs.h mfxstructures.h
" "MFX_CODEC_VP9
"
6967 enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
6968 enabled libmp3lame && require "libmp3lame
>= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
6969 enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
6970 require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
6971 enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif ||
6972 check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppif -lnppc -lnppidei ||
6973 die "ERROR
: libnpp not found
"; }
6974 enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
6975 enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
6976 enabled libopencv && { check_headers opencv2/core/core_c.h &&
6977 { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
6978 require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
6979 require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
6980 enabled libopenh264 && require_pkg_config libopenh264 "openh264
>= 1.3.0" wels/codec_api.h WelsGetCodecVersion
6981 enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version ||
6982 { require_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
6983 enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt
>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
6984 enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
6985 { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
6986 require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }
6987 enabled libopus && {
6988 enabled libopus_decoder && {
6989 require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
6991 enabled libopus_encoder && {
6992 require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
6995 enabled libplacebo && require_pkg_config libplacebo "libplacebo
>= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
6996 enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
6997 enabled libqrencode && require_pkg_config libqrencode libqrencode qrencode.h QRcode_encodeString
6998 enabled libquirc && require libquirc quirc.h quirc_decode -lquirc
6999 enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq
>= 0.7.1" amqp.h amqp_new_connection
7000 enabled librav1e && require_pkg_config librav1e "rav1e
>= 0.5.0" rav1e.h rav1e_context_new
7001 enabled librist && require_pkg_config librist "librist
>= 0.2.7" librist/librist.h rist_receiver_create
7002 enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_new_from_data
7003 enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
7004 enabled librubberband && require_pkg_config librubberband "rubberband
>= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
7005 enabled libshaderc && require_pkg_config spirv_compiler "shaderc
>= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize
7006 enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
7007 enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
7008 require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
7009 enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
7010 enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
7011 enabled libssh && require_pkg_config libssh "libssh
>= 0.6.0" libssh/sftp.h sftp_init
7012 enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
7013 enabled libsrt && require_pkg_config libsrt "srt
>= 1.3.0" srt/srt.h srt_socket
7014 enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc
>= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle
7015 enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
7016 enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
7017 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
7018 enabled libtls && require_pkg_config libtls libtls tls.h tls_configure
7019 enabled libtorch && check_cxxflags -std=c++17 && require_cpp libtorch torch/torch.h "torch
::Tensor
" -ltorch -lc10 -ltorch_cpu -lstdc++ -lpthread
7020 enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
7021 { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
7022 die "ERROR
: libtwolame must be installed and version must be
>= 0.3.10"; }
7023 enabled libuavs3d && require_pkg_config libuavs3d "uavs3d
>= 1.1.41" uavs3d.h uavs3d_decode
7024 enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
7025 enabled libvidstab && require_pkg_config libvidstab "vidstab
>= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
7026 enabled libvmaf && require_pkg_config libvmaf "libvmaf
>= 2.0.0" libvmaf.h vmaf_init
7027 enabled libvmaf && check_pkg_config libvmaf_cuda "libvmaf
>= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init
7028 enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
7029 enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
7030 require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
7033 enabled libvpx_vp8_decoder && {
7034 check_pkg_config libvpx_vp8_decoder "vpx
>= 1.4.0" "vpx
/vpx_decoder.h vpx
/vp8dx.h
" vpx_codec_vp8_dx ||
7035 check_lib libvpx_vp8_decoder "vpx
/vpx_decoder.h vpx
/vp8dx.h
" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH
" "-lvpx $libm_extralibs $pthreads_extralibs"
7037 enabled libvpx_vp8_encoder && {
7038 check_pkg_config libvpx_vp8_encoder "vpx
>= 1.4.0" "vpx
/vpx_encoder.h vpx
/vp8cx.h
" vpx_codec_vp8_cx ||
7039 check_lib libvpx_vp8_encoder "vpx
/vpx_encoder.h vpx
/vp8cx.h
" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH
" "-lvpx $libm_extralibs $pthreads_extralibs"
7041 enabled libvpx_vp9_decoder && {
7042 check_pkg_config libvpx_vp9_decoder "vpx
>= 1.4.0" "vpx
/vpx_decoder.h vpx
/vp8dx.h
" vpx_codec_vp9_dx ||
7043 check_lib libvpx_vp9_decoder "vpx
/vpx_decoder.h vpx
/vp8dx.h
" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH
" "-lvpx $libm_extralibs $pthreads_extralibs"
7045 enabled libvpx_vp9_encoder && {
7046 check_pkg_config libvpx_vp9_encoder "vpx
>= 1.4.0" "vpx
/vpx_encoder.h vpx
/vp8cx.h
" vpx_codec_vp9_cx ||
7047 check_lib libvpx_vp9_encoder "vpx
/vpx_encoder.h vpx
/vp8cx.h
" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH
" "-lvpx $libm_extralibs $pthreads_extralibs"
7049 if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
7050 die "libvpx enabled but no supported decoders found
"
7054 enabled libvvenc && require_pkg_config libvvenc "libvvenc
>= 1.6.1" "vvenc
/vvenc.h
" vvenc_get_version
7055 enabled libwebp && {
7056 enabled libwebp_encoder && require_pkg_config libwebp "libwebp
>= 0.2.0" webp/encode.h WebPGetEncoderVersion
7057 enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux
>= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
7058 enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h
" x264_encoder_encode &&
7059 require_cpp_condition libx264 x264.h "X264_BUILD
>= 155" && {
7060 [ "$toolchain" != "msvc
" ] ||
7061 require_cpp_condition libx264 x264.h "X264_BUILD
>= 158"; } &&
7062 check_cpp_condition libx264_hdr10 x264.h "X264_BUILD
>= 163" &&
7063 check_cpp_condition libx262 x264.h "X264_MPEG2
"
7064 enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
7065 require_cpp_condition libx265 x265.h "X265_BUILD
>= 89"
7066 enabled libxavs && require libxavs "stdint.h xavs.h
" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
7067 enabled libxavs2 && require_pkg_config libxavs2 "xavs2
>= 1.3.0" "stdint.h xavs2.h
" xavs2_api_get
7068 enabled libxevd && require_pkg_config libxevd "xevd
>= 0.4.1" "xevd.h
" xevd_decode
7069 enabled libxeve && require_pkg_config libxeve "xeve
>= 0.5.1" "xeve.h
" xeve_encode
7070 enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
7071 enabled libzimg && require_pkg_config libzimg "zimg
>= 2.7.0" zimg.h zimg_get_api_version
7072 enabled libzmq && require_pkg_config libzmq "libzmq
>= 4.2.1" zmq.h zmq_ctx_new
7073 enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
7074 { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR
> 0 || VBI_VERSION_MINOR
> 2 || VBI_VERSION_MINOR
== 2 && VBI_VERSION_MICRO
>= 28" ||
7075 enabled gpl || die "ERROR
: libzvbi requires version
0.2.28 or
--enable-gpl.
"; }
7076 enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
7077 enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
7078 check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
7079 check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
7080 die "ERROR
: mbedTLS not found
"; }
7081 enabled mediacodec && { enabled jni || die "ERROR
: mediacodec requires
--enable-jni"; }
7082 enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
7083 { ! enabled cross_compile &&
7084 add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
7085 add_ldflags -L/opt/vc/lib/ &&
7086 check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
7087 die "ERROR
: mmal not found
" &&
7088 check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
"; }
7089 enabled openal && { check_pkg_config openal "openal
>= 1.1" "AL
/al.h
" alGetError ||
7090 { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
7091 check_lib openal 'AL/al.h' alGetError "${al_extralibs}" && break; done } ||
7092 die "ERROR
: openal not found
"; } &&
7093 { test_cpp_condition "AL
/al.h
" "defined
(AL_VERSION_1_1
)" ||
7094 die "ERROR
: openal must be installed and version must be
1.1 or compatible
"; }
7095 enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
7096 check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel "-framework OpenCL
" ||
7097 check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
7098 die "ERROR
: opencl not found
"; } &&
7099 { test_cpp_condition "OpenCL
/cl.h
" "defined
(CL_VERSION_1_2
)" ||
7100 test_cpp_condition "CL
/cl.h
" "defined
(CL_VERSION_1_2
)" ||
7101 die "ERROR
: opencl must be installed and version must be
1.2 or compatible
"; }
7102 enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
7103 check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
7104 check_lib opengl OpenGL/gl3.h glGetError "-framework OpenGL
" ||
7105 check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -framework OpenGLES
" ||
7106 die "ERROR
: opengl not found.
"
7108 enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
7109 { ! enabled cross_compile &&
7110 add_cflags -isystem/opt/vc/include/IL &&
7111 test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } ||
7112 die "ERROR
: OpenMAX IL headers from raspberrypi
/firmware not found
"; } &&
7114 enabled omx && require_headers OMX_Core.h && \
7115 warn "The OpenMAX encoders are deprecated and will be removed
in future versions
"
7117 enabled openssl && { { check_pkg_config openssl "openssl
>= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
7118 { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR
: OpenSSL
>=3.0.0 requires
--enable-version3"; }; } ||
7119 { enabled gpl && ! enabled nonfree && die "ERROR
: OpenSSL
<3.0.0 is incompatible with the gpl
"; } ||
7120 check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
7121 check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
7122 check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
7123 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
7124 check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
7125 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
7126 die "ERROR
: openssl not found
"; }
7127 enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
7128 enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
7129 require_pkg_config rockchip_mpp "rockchip_mpp
>= 1.3.7" rockchip/rk_mpi.h mpp_create &&
7131 die "ERROR
: rkmpp requires
--enable-libdrm"; }
7133 enabled vapoursynth && require_headers "vapoursynth
/VSScript4.h vapoursynth
/VapourSynth4.h
"
7136 if enabled gcrypt; then
7137 GCRYPT_CONFIG="${cross_prefix}libgcrypt-config
"
7138 if "${GCRYPT_CONFIG}" --version > /dev/null 2>&1; then
7139 gcrypt_cflags=$("${GCRYPT_CONFIG}" --cflags)
7140 gcrypt_extralibs=$("${GCRYPT_CONFIG}" --libs)
7141 check_func_headers gcrypt.h gcry_mpi_new $gcrypt_cflags $gcrypt_extralibs ||
7142 die "ERROR
: gcrypt not found
"
7143 add_cflags $gcrypt_cflags
7145 require gcrypt gcrypt.h gcry_mpi_new -lgcrypt
7149 if enabled sdl2; then
7150 SDL2_CONFIG="${cross_prefix}sdl2-config
"
7151 test_pkg_config sdl2 "sdl2
>= 2.0.1 sdl2
< 3.0.0" SDL_events.h SDL_PollEvent
7152 if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
7153 sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
7154 sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
7155 test_cpp_condition SDL.h "(SDL_MAJOR_VERSION
<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
7156 test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 |
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x030000" $sdl2_cflags &&
7157 check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &&
7160 if test $target_os = "mingw32"; then
7161 sdl2_extralibs=$(filter_out '-mwindows' $sdl2_extralibs)
7165 if enabled decklink; then
7167 mingw32*|mingw64*|win32|win64)
7168 decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32"
7169 decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32"
7174 enabled securetransport &&
7175 check_func SecIdentityCreate "-framework CoreFoundation -framework Security" &&
7176 check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-framework CoreFoundation -framework Security" ||
7177 disable securetransport
7179 enabled securetransport &&
7180 check_func SecItemImport "-framework CoreFoundation -framework Security"
7183 check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
7184 test_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" &&
7185 schannel_extralibs="-lsecur32" ||
7188 makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
7190 && [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \
7191 && enable makeinfo_html || disable makeinfo_html
7192 disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
7193 perl -v > /dev/null 2>&1 && enable perl || disable perl
7194 pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
7195 rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
7196 xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint
7198 check_headers linux/fb.h
7199 check_headers linux/videodev2.h
7200 test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
7201 test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
7203 # check V4L2 codecs available in the API
7204 if enabled v4l2_m2m; then
7205 check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;"
7206 check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;"
7207 check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;"
7208 check_cc mpeg2_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG2;"
7209 check_cc mpeg4_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG4;"
7210 check_cc hevc_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC;"
7211 check_cc h263_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H263;"
7212 check_cc h264_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H264;"
7213 check_cc vp8_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP8;"
7214 check_cc vp9_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;"
7217 check_headers sys/videoio.h
7218 test_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
7220 check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
7221 check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
7222 # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
7223 # w32api 3.12 had it defined wrong
7224 check_cpp_condition vfwcap_defines vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER"
7226 check_type "dshow.h" IBaseFilter
7228 # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
7229 check_headers "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h" ||
7230 check_headers "machine/ioctl_meteor.h machine/ioctl_bt848.h" ||
7231 check_headers "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
7232 check_headers "dev/ic/bt8xx.h"
7234 if check_struct sys/soundcard.h audio_buf_info bytes; then
7235 enable_sanitized sys/soundcard.h
7237 test_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <<EOF && add_cppflags -D__BSD_VISIBLE -D__XSI_VISIBLE && enable_sanitized sys/soundcard.h
7238 #include <sys/soundcard.h>
7243 enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp ||
7244 check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound; }
7247 require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
7249 enabled sndio && check_pkg_config sndio sndio sndio.h sio_open
7251 if enabled libcdio; then
7252 check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open ||
7253 check_pkg_config libcdio libcdio_paranoia "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open ||
7254 check_lib libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
7255 check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
7256 die "ERROR: No usable libcdio/cdparanoia found"
7259 enabled libxcb && check_pkg_config libxcb "xcb >= 1.4" xcb/xcb.h xcb_connect ||
7260 disable libxcb_shm libxcb_shape libxcb_xfixes
7262 if enabled libxcb; then
7263 enabled libxcb_shm && check_pkg_config libxcb_shm xcb-shm xcb/shm.h xcb_shm_attach
7264 enabled libxcb_shape && check_pkg_config libxcb_shape xcb-shape xcb/shape.h xcb_shape_get_rectangles
7265 enabled libxcb_xfixes && check_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
7268 check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
7270 # check if building for desktop or uwp
7271 test_cpp <<EOF && enable uwp
7272 #ifdef WINAPI_FAMILY
7273 #include <winapifamily.h>
7274 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
7275 #error desktop, not uwp
7277 // WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP
7280 #error no family set
7284 mediafoundation_extralibs="-lmfuuid -lole32 -lstrmiids"
7286 if enabled uwp; then
7287 # In UWP mode, we can't use LoadLibrary+GetProcAddress to conditionally
7288 # try to load these APIs at runtime, like we do in regular desktop mode -
7289 # therefore, we need to link directly against these APIs.
7290 d3d11va_extralibs="-ldxgi -ld3d11"
7291 d3d12va_extralibs="-ldxgi -ld3d12"
7292 vaapi_win32_extralibs="-ldxgi"
7293 mediafoundation_extralibs="-lmfplat $mediafoundation_extralibs"
7297 check_pkg_config libdrm_getfb2 libdrm "xf86drmMode.h" drmModeGetFB2
7300 check_pkg_config vaapi "libva >= 0.35.0" "va/va.h" vaInitialize
7302 if enabled vaapi; then
7304 mingw32*|mingw64*|win32|win64)
7305 check_pkg_config vaapi_win32 "libva-win32" "va/va_win32.h" vaGetDisplayWin32
7308 check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
7312 if enabled xlib_x11; then
7313 check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay
7316 check_cpp_condition vaapi_1 "va/va.h" "VA_CHECK_VERSION(1, 0, 0)"
7318 check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
7319 check_type "va/va.h va/va_dec_vvc.h" "VAPictureParameterBufferVVC"
7320 check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
7321 check_struct "va/va.h" "VADecPictureParameterBufferAV1" bit_depth_idx
7322 check_type "va/va.h va/va_vpp.h" "VAProcFilterParameterBufferHDRToneMapping"
7323 check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
7324 check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" blend_flags
7325 check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
7326 check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
7327 check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
7328 check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9"
7329 check_type "va/va.h va/va_enc_av1.h" "VAEncPictureParameterBufferAV1"
7332 if enabled_all opencl libdrm ; then
7333 check_type "CL/cl_intel.h" "clCreateImageFromFdINTEL_fn" &&
7334 enable opencl_drm_beignet
7335 check_func_headers "CL/cl_ext.h" clImportMemoryARM &&
7336 enable opencl_drm_arm
7339 if enabled_all opencl vaapi ; then
7340 if enabled opencl_drm_beignet ; then
7341 enable opencl_vaapi_beignet
7343 check_type "CL/cl.h CL/cl_va_api_media_sharing_intel.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
7344 enable opencl_vaapi_intel_media
7348 if enabled_all opencl dxva2 ; then
7349 check_type "CL/cl_dx9_media_sharing.h" cl_dx9_surface_info_khr &&
7353 if enabled_all opencl d3d11va ; then
7354 check_type "CL/cl_d3d11.h" clGetDeviceIDsFromD3D11KHR_fn &&
7358 if enabled_all opencl videotoolbox ; then
7359 check_func_headers OpenCL/cl_gl_ext.h clCreateImageFromIOSurfaceWithPropertiesAPPLE -framework VideoToolbox -framework OpenCL &&
7360 enable opencl_videotoolbox
7364 check_cpp_condition vdpau vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP"
7367 check_lib vdpau_x11 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau -lX11
7369 if enabled vulkan; then
7370 check_pkg_config_header_only vulkan "vulkan >= 1.3.277" "vulkan/vulkan.h" "defined VK_VERSION_1_3" ||
7371 check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)"
7374 if disabled vulkan; then
7375 disable libglslang libshaderc spirv_compiler
7378 if enabled x86; then
7380 freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*)
7383 disable ffnvcodec cuvid nvdec nvenc
7386 elif enabled_any aarch64 ppc64 && ! enabled bigendian; then
7391 disable ffnvcodec cuvid nvdec nvenc
7395 disable ffnvcodec cuvid nvdec nvenc
7398 enabled ffnvcodec && enable cuda
7401 test_cc -I$source_path <<EOF || disable nvenc
7402 #include <ffnvcodec/nvEncodeAPI.h>
7403 NV_ENCODE_API_FUNCTION_LIST flist;
7404 void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_CODEC_H264_GUID } }; }
7405 int main(void) { return 0; }
7408 if enabled nvenc; then
7409 check_type "ffnvcodec/nvEncodeAPI.h" "NV_ENC_PIC_PARAMS_AV1"
7412 if enabled_any nvdec cuvid; then
7413 check_type "ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h" "CUVIDAV1PICPARAMS"
7417 check_cpp_condition amf "AMF/core/Version.h" \
7418 "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400210000"
7420 # Funny iconv installations are not unusual, so check it after all flags have been set
7421 if enabled libc_iconv; then
7422 check_func_headers iconv.h iconv
7423 elif enabled iconv; then
7424 check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
7427 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
7429 # add some useful compiler flags if supported
7430 check_cflags -Wdeclaration-after-statement
7432 check_cflags -Wdisabled-optimization
7433 check_cflags -Wpointer-arith
7434 check_cflags -Wredundant-decls
7435 check_cflags -Wwrite-strings
7436 check_cflags -Wtype-limits
7437 check_cflags -Wundef
7438 check_cflags -Wmissing-prototypes
7439 check_cflags -Wstrict-prototypes
7440 check_cflags -Wempty-body
7442 if enabled extra_warnings; then
7443 check_cflags -Wcast-qual
7444 check_cflags -Wextra
7445 check_cflags -Wpedantic
7448 check_disable_warning(){
7449 warning_flag=-W${1#-Wno-}
7450 test_cflags $unknown_warning_flags $warning_flag && add_cflags $1
7453 test_cflags -Werror=unused-command-line-argument &&
7454 append unknown_warning_flags "-Werror=unused-command-line-argument"
7455 test_cflags -Werror=unknown-warning-option &&
7456 append unknown_warning_flags "-Werror=unknown-warning-option"
7458 check_disable_warning -Wno-parentheses
7459 check_disable_warning -Wno-switch
7460 check_disable_warning -Wno-format-zero-length
7461 check_disable_warning -Wno-pointer-sign
7462 check_disable_warning -Wno-unused-const-variable
7463 check_disable_warning -Wno-bool-operation
7464 check_disable_warning -Wno-char-subscripts
7465 check_disable_warning -Wno-implicit-const-int-float-conversion
7467 check_disable_warning_headers(){
7468 warning_flag=-W${1#-Wno-}
7469 test_cflags $warning_flag && add_cflags_headers $1
7472 check_disable_warning_headers -Wno-deprecated-declarations
7473 check_disable_warning_headers -Wno-unused-variable
7475 test_cc <<EOF && enable blocks_extension
7476 void (^block)(void);
7479 # add some linker flags
7480 check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
7481 enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir
7482 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
7484 # add some strip flags
7487 enabled neon_clobber_test &&
7488 check_ldflags -Wl,--wrap,avcodec_open2 \
7489 -Wl,--wrap,avcodec_decode_subtitle2 \
7490 -Wl,--wrap,avcodec_encode_subtitle \
7491 -Wl,--wrap,avcodec_send_packet \
7492 -Wl,--wrap,avcodec_receive_packet \
7493 -Wl,--wrap,avcodec_send_frame \
7494 -Wl,--wrap,avcodec_receive_frame \
7495 -Wl,--wrap,swr_convert ||
7496 disable neon_clobber_test
7498 enabled xmm_clobber_test &&
7499 check_ldflags -Wl,--wrap,avcodec_open2 \
7500 -Wl,--wrap,avcodec_decode_subtitle2 \
7501 -Wl,--wrap,avcodec_encode_subtitle \
7502 -Wl,--wrap,avcodec_send_packet \
7503 -Wl,--wrap,avcodec_receive_packet \
7504 -Wl,--wrap,avcodec_send_frame \
7505 -Wl,--wrap,avcodec_receive_frame \
7506 -Wl,--wrap,swr_convert \
7507 -Wl,--wrap,sws_scale ||
7508 disable xmm_clobber_test
7510 check_ld "cc" proper_dce <<EOF
7511 extern const int array[512];
7512 static inline int func(void) { return array[0]; }
7513 int main(void) { return 0; }
7516 if enabled proper_dce; then
7517 echo "X { local: *; };" > $TMPV
7518 if test_ldflags -Wl,${version_script},$TMPV; then
7519 append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
7521 test_cc <<EOF && enable symver_asm_label
7522 void ff_foo(void) __asm__ ("av_foo@VERSION");
7523 void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
7525 test_cc <<EOF && enable symver_gnu_asm
7526 __asm__(".symver ff_foo,av_foo@VERSION");
7527 void ff_foo(void) {}
7532 if [ -z "$optflags" ]; then
7533 if enabled small; then
7534 optflags=$cflags_size
7535 elif enabled optimizations; then
7536 optflags=$cflags_speed
7538 optflags=$cflags_noopt
7544 [ -n "$lto" ] && check_ldflags "$@"
7547 check_optflags $optflags
7548 check_optflags -fno-math-errno
7549 check_optflags -fno-signed-zeros
7551 if [ -n "$lto" ]; then
7552 test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
7554 check_ldflags $lto $cpuflags
7555 disable inline_asm_direct_symbol_refs
7556 if test "$cc_type" = "clang"; then
7557 # Clang's LTO fails on Windows, when there are references outside
7558 # of inline assembly to nonlocal labels defined within inline assembly,
7559 # see https://github.com/llvm/llvm-project/issues/76046.
7562 disable inline_asm_nonlocal_labels
7568 enabled ftrapv && check_cflags -ftrapv
7570 test_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
7575 if enabled icc; then
7576 # Just warnings, no remarks
7578 # -wd: Disable following warnings
7579 # 144, 167, 556: -Wno-pointer-sign
7580 # 188: enumerated type mixed with another type
7581 # 1292: attribute "foo" ignored
7582 # 1419: external declaration in primary source file
7583 # 10006: ignoring unknown option -fno-signed-zeros
7584 # 10148: ignoring unknown option -Wno-parentheses
7585 # 10156: ignoring option '-W'; no argument required
7586 # 13200: No EMMS instruction before call to function
7587 # 13203: No EMMS instruction before return from function
7588 check_cflags -wd144,167,188,556,1292,1419,10006,10148,10156,13200,13203
7589 # 11030: Warning unknown option --as-needed
7590 # 10156: ignoring option '-export'; no argument required
7591 check_ldflags -wd10156,11030
7592 # icc 11.0 and 11.1 work with ebp_available, but don't pass the test
7593 enable ebp_available
7594 # The test above does not test linking
7595 [ -n "$lto" ] && disable symver_asm_label
7596 if enabled x86_32; then
7597 icc_version=$($cc -dumpversion)
7598 test ${icc_version%%.*} -ge 11 &&
7599 check_cflags -falign-stack=maintain-16-byte ||
7600 disable aligned_stack
7602 elif enabled gcc; then
7603 check_optflags -fno-tree-vectorize
7604 check_cflags -Werror=format-security
7605 check_cflags -Werror=implicit-function-declaration
7606 check_cflags -Werror=missing-prototypes
7607 check_cflags -Werror=return-type
7608 check_cflags -Werror=vla
7609 check_cflags -Wformat
7610 check_cflags -fdiagnostics-color=auto
7611 enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
7612 if enabled x86_32; then
7615 # BSDs don't guarantee a 16 byte aligned stack
, but we can
7616 # request GCC to try to maintain 16 byte alignment throughout
7617 # function calls. Library entry points that might call assembly
7618 # functions align the stack. (The parameter means 2^4 bytes.)
7619 check_cflags
-mpreferred-stack-boundary=4
7623 elif enabled llvm_gcc
; then
7624 check_cflags
-mllvm -stack-alignment=16
7625 elif enabled clang
; then
7626 if enabled x86_32
; then
7627 # Clang doesn't support maintaining alignment without assuming the
7628 # same alignment in every function. If 16 byte alignment would be
7629 # enabled, one would also have to either add attribute_align_arg on
7630 # every single entry point into the libraries or enable -mstackrealign
7631 # (doing stack realignment in every single function).
7633 mingw32|win32|
*bsd
*)
7634 disable aligned_stack
7637 check_cflags
-mllvm -stack-alignment=16
7638 check_cflags
-mstack-alignment=16
7642 check_cflags
-mllvm -stack-alignment=16
7643 check_cflags
-mstack-alignment=16
7645 check_cflags
-Qunused-arguments
7646 check_cflags
-Werror=implicit-function-declaration
7647 check_cflags
-Werror=missing-prototypes
7648 check_cflags
-Werror=return-type
7649 elif enabled cparser
; then
7650 add_cflags
-Wno-missing-variable-declarations
7651 add_cflags
-Wno-empty-statement
7652 elif enabled armcc
; then
7653 add_cflags
-W${armcc_opt},--diag_suppress=4343 # hardfp compat
7654 add_cflags
-W${armcc_opt},--diag_suppress=3036 # using . as system include dir
7655 # 2523: use of inline assembly is deprecated
7656 add_cflags
-W${armcc_opt},--diag_suppress=2523
7657 add_cflags
-W${armcc_opt},--diag_suppress=1207
7658 add_cflags
-W${armcc_opt},--diag_suppress=1293 # assignment in condition
7659 add_cflags
-W${armcc_opt},--diag_suppress=3343 # hardfp compat
7660 add_cflags
-W${armcc_opt},--diag_suppress=167 # pointer sign
7661 add_cflags
-W${armcc_opt},--diag_suppress=513 # pointer sign
7662 elif enabled pathscale
; then
7663 add_cflags
-fstrict-overflow -OPT:wrap_around_unsafe_opt
=OFF
7665 elif enabled_any msvc icl
; then
7666 enabled x86_32
&& disable aligned_stack
7667 enabled_all x86_32 debug
&& add_cflags
-Oy-
7668 enabled debug
&& add_ldflags
-debug
7669 enable pragma_deprecated
7670 if enabled icl
; then
7671 # -Qansi-alias is basically -fstrict-aliasing, but does not work
7672 # (correctly) on icl 13.x.
7673 test_cpp_condition
"windows.h" "__ICL < 1300 || __ICL >= 1400" &&
7674 add_cflags
-Qansi-alias
7675 # Some inline asm is not compilable in debug
7676 if enabled debug
; then
7677 disable ebp_available
7678 disable ebx_available
7681 # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
7682 check_cpp_condition log2 crtversion.h
"_VC_CRT_MAJOR_VERSION >= 12"
7683 # the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
7684 # Issue has been fixed in MSVC v19.00.24218.
7685 test_cpp_condition windows.h
"_MSC_FULL_VER >= 190024218" ||
7686 check_cflags
-d2SSAOptimizer-
7687 # enable utf-8 source processing on VS2015 U2 and newer
7688 test_cpp_condition windows.h
"_MSC_FULL_VER >= 190023918" &&
7692 for pfx
in "" host_
; do
7693 varname
=${pfx%_}cc_type
7694 eval "type=\$$varname"
7695 if [ "$type" = "msvc" ]; then
7696 test_
${pfx}cc
<<EOF || add_${pfx}cflags -Dinline=__inline
7697 static inline int foo(int a) { return a; }
7704 add_asflags
-Qunused-arguments
7710 check_ldflags
-Qunused-arguments
7714 enable frame_thread_encoder
7716 enabled asm ||
{ arch
=c
; disable
$ARCH_LIST $ARCH_EXT_LIST; }
7718 check_deps
$CONFIG_LIST \
7723 enabled threads
&& ! enabled pthreads
&& ! enabled atomics_native
&& die
"non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86"
7725 enabled threads || warn \
7726 "Threading support was disabled or is not available on the target platform." \
7727 "This means that not only is this build not multi-threaded, but also" \
7728 "that the libraries from this build MUST NOT be used in a multi-threaded"\
7734 disable posix_memalign
7736 *-dos|freedos|opendos
)
7737 if test_cpp_condition sys
/version.h
"defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
7743 flatten_extralibs
(){
7747 for entry
in $list; do
7751 for e
in $entry_copy; do
7753 *_extralibs
) nested_entries
="$nested_entries$e ";;
7754 *) flat_entries
="$flat_entries$e ";;
7757 eval $entry="\$flat_entries"
7759 append
$list_name "$nested_entries"
7761 resolve nested_entries
7762 if test -n "$(filter '*_extralibs' $nested_entries)"; then
7763 flatten_extralibs
$list_name
7767 flatten_extralibs_wrapper
(){
7769 flatten_extralibs
$list_name
7772 eval $list_name=\$\
(\
$ldflags_filter \$
$list_name\
)
7773 eval printf \''%s'\' \""\$$list_name"\"
7776 for linkunit
in $LIBRARY_LIST; do
7777 unset current_extralibs
7778 eval components
=\$$
(toupper
${linkunit})_COMPONENTS_LIST
7779 for comp
in ${components}; do
7780 enabled
$comp ||
continue
7781 comp_extralibs
="${comp}_extralibs"
7782 append current_extralibs
$comp_extralibs
7784 eval prepend
${linkunit}_extralibs
$current_extralibs
7787 for linkunit
in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do
7788 eval ${linkunit}_extralibs
=\$\
(flatten_extralibs_wrapper
${linkunit}_extralibs\
)
7791 map
'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
7793 for thread
in $THREADS_LIST; do
7794 if enabled
$thread; then
7795 test -n "$thread_type" &&
7796 die
"ERROR: Only one thread type must be selected." ||
7797 thread_type
="$thread"
7801 if disabled stdatomic
; then
7802 if enabled atomics_win32
; then
7803 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/win32'
7805 enabled threads
&& die
"Threading is enabled, but no atomics are available"
7806 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/dummy'
7810 check_builtin stdbit
"stdbit.h assert.h" \
7811 'static_assert(__STDC_VERSION_STDBIT_H__ >= 202311L, "Compiler lacks stdbit.h")' || \
7812 add_cppflags
'-I\$(SRC_PATH)/compat/stdbit'
7814 # Check if requested libraries were found.
7815 for lib
in $AUTODETECT_LIBS; do
7816 requested
$lib && ! enabled
$lib && die
"ERROR: $lib requested but not found";
7819 enabled zlib
&& add_cppflags
-DZLIB_CONST
7821 # conditional library dependencies, in any order
7822 enabled amovie_filter
&& prepend avfilter_deps
"avformat avcodec"
7823 enabled aresample_filter
&& prepend avfilter_deps
"swresample"
7824 enabled cover_rect_filter
&& prepend avfilter_deps
"avformat avcodec"
7825 enabled ebur128_filter
&& enabled swresample
&& prepend avfilter_deps
"swresample"
7826 enabled elbg_filter
&& prepend avfilter_deps
"avcodec"
7827 enabled find_rect_filter
&& prepend avfilter_deps
"avformat avcodec"
7828 enabled fsync_filter
&& prepend avfilter_deps
"avformat"
7829 enabled mcdeint_filter
&& prepend avfilter_deps
"avcodec"
7830 enabled movie_filter
&& prepend avfilter_deps
"avformat avcodec"
7831 enabled pan_filter
&& prepend avfilter_deps
"swresample"
7832 enabled pp_filter
&& prepend avfilter_deps
"postproc"
7833 enabled qrencode_filter
&& prepend avfilter_deps
"swscale"
7834 enabled qrencodesrc_filter
&& prepend avfilter_deps
"swscale"
7835 enabled removelogo_filter
&& prepend avfilter_deps
"avformat avcodec swscale"
7836 enabled sab_filter
&& prepend avfilter_deps
"swscale"
7837 enabled scale_filter
&& prepend avfilter_deps
"swscale"
7838 enabled scale2ref_filter
&& prepend avfilter_deps
"swscale"
7839 enabled showcqt_filter
&& prepend avfilter_deps
"avformat swscale"
7840 enabled signature_filter
&& prepend avfilter_deps
"avcodec avformat"
7841 enabled smartblur_filter
&& prepend avfilter_deps
"swscale"
7842 enabled spp_filter
&& prepend avfilter_deps
"avcodec"
7843 enabled sr_filter
&& prepend avfilter_deps
"avformat swscale"
7844 enabled subtitles_filter
&& prepend avfilter_deps
"avformat avcodec"
7845 enabled uspp_filter
&& prepend avfilter_deps
"avcodec"
7846 enabled zoompan_filter
&& prepend avfilter_deps
"swscale"
7848 enabled lavfi_indev
&& prepend avdevice_deps
"avfilter"
7851 enabled_any sdl2_outdev opengl_outdev
&& enabled sdl2
&&
7852 add_cflags $
(filter_out
'-Dmain=SDL_main' $sdl2_cflags)
7854 enabled opus_decoder
&& prepend avcodec_deps
"swresample"
7856 # reorder the items at var $1 to align with the items order at var $2 .
7857 # die if an item at $1 is not at $2 .
7860 eval rb_ordered
=\$
$2
7862 for rb
in $rb_in; do
7863 is_in
$rb $rb_ordered || die
"$rb at \$$1 is not at \$$2"
7867 for rb
in $rb_ordered; do
7868 is_in
$rb $rb_in && rb_out
="$rb_out$rb "
7873 # deps-expand fflib $1: N x {append all expanded deps; unique}
7874 # within a set of N items, N expansions are enough to expose a cycle.
7876 unique
${1}_deps
# required for the early break test.
7877 for dummy
in $LIBRARY_LIST; do # N iteratios
7878 eval deps
=\$
${1}_deps
7879 append
${1}_deps $
(map
'eval echo \$${v}_deps' $deps)
7881 eval '[ ${#deps} = ${#'${1}_deps'} ]' && break # doesn't expand anymore
7884 eval is_in
$1 \$
${1}_deps
&& die
"Dependency cycle at ${1}_deps"
7885 reorder_by
${1}_deps LIBRARY_LIST
# linking order is expected later
7888 #we have to remove gpl from the deps here as some code assumes all lib deps are libs
7889 postproc_deps
="$(filter_out 'gpl' $postproc_deps)"
7891 map
'expand_deps $v' $LIBRARY_LIST
7893 if test "$quiet" != "yes"; then
7895 echo "install prefix $prefix"
7896 echo "source path $source_path"
7897 echo "C compiler $cc"
7898 echo "C library $libc_type"
7899 if test "$host_cc" != "$cc"; then
7900 echo "host C compiler $host_cc"
7901 echo "host C library $host_libc_type"
7903 echo "ARCH $arch ($cpu)"
7904 if test "$build_suffix" != ""; then
7905 echo "build suffix $build_suffix"
7907 if test "$progs_suffix" != ""; then
7908 echo "progs suffix $progs_suffix"
7910 if test "$extra_version" != ""; then
7911 echo "version string suffix $extra_version"
7913 echo "big-endian ${bigendian-no}"
7914 echo "runtime cpu detection ${runtime_cpudetect-no}"
7915 if enabled x86
; then
7916 echo "standalone assembly ${x86asm-no}"
7917 echo "x86 assembler ${x86asmexe}"
7918 echo "MMX enabled ${mmx-no}"
7919 echo "MMXEXT enabled ${mmxext-no}"
7920 echo "3DNow! enabled ${amd3dnow-no}"
7921 echo "3DNow! extended enabled ${amd3dnowext-no}"
7922 echo "SSE enabled ${sse-no}"
7923 echo "SSSE3 enabled ${ssse3-no}"
7924 echo "AESNI enabled ${aesni-no}"
7925 echo "AVX enabled ${avx-no}"
7926 echo "AVX2 enabled ${avx2-no}"
7927 echo "AVX-512 enabled ${avx512-no}"
7928 echo "AVX-512ICL enabled ${avx512icl-no}"
7929 echo "XOP enabled ${xop-no}"
7930 echo "FMA3 enabled ${fma3-no}"
7931 echo "FMA4 enabled ${fma4-no}"
7932 echo "i686 features enabled ${i686-no}"
7933 echo "CMOV is fast ${fast_cmov-no}"
7934 echo "EBX available ${ebx_available-no}"
7935 echo "EBP available ${ebp_available-no}"
7937 if enabled aarch64
; then
7938 echo "NEON enabled ${neon-no}"
7939 echo "DOTPROD enabled ${dotprod-no}"
7940 echo "I8MM enabled ${i8mm-no}"
7941 echo "SVE enabled ${sve-no}"
7942 echo "SVE2 enabled ${sve2-no}"
7944 if enabled arm
; then
7945 echo "ARMv5TE enabled ${armv5te-no}"
7946 echo "ARMv6 enabled ${armv6-no}"
7947 echo "ARMv6T2 enabled ${armv6t2-no}"
7948 echo "VFP enabled ${vfp-no}"
7949 echo "NEON enabled ${neon-no}"
7950 echo "THUMB enabled ${thumb-no}"
7952 if enabled mips
; then
7953 echo "MIPS FPU enabled ${mipsfpu-no}"
7954 echo "MIPS DSP R1 enabled ${mipsdsp-no}"
7955 echo "MIPS DSP R2 enabled ${mipsdspr2-no}"
7956 echo "MIPS MSA enabled ${msa-no}"
7957 echo "LOONGSON MMI enabled ${mmi-no}"
7959 if enabled ppc
; then
7960 echo "AltiVec enabled ${altivec-no}"
7961 echo "VSX enabled ${vsx-no}"
7962 echo "POWER8 enabled ${power8-no}"
7963 echo "PPC 4xx optimizations ${ppc4xx-no}"
7964 echo "dcbzl available ${dcbzl-no}"
7966 if enabled loongarch
; then
7967 echo "LSX enabled ${lsx-no}"
7968 echo "LASX enabled ${lasx-no}"
7970 if enabled riscv
; then
7971 echo "RISC-V CBO Prefetch ${rv_zicbop-no}"
7972 echo "RISC-V Vector enabled ${rvv-no}"
7974 echo "debug symbols ${debug-no}"
7975 echo "strip symbols ${stripping-no}"
7976 echo "optimize for size ${small-no}"
7977 echo "optimizations ${optimizations-no}"
7978 echo "static ${static-no}"
7979 echo "shared ${shared-no}"
7980 echo "postprocessing support ${postproc-no}"
7981 echo "network support ${network-no}"
7982 echo "threading support ${thread_type-no}"
7983 echo "safe bitstream reader ${safe_bitstream_reader-no}"
7984 echo "texi2html enabled ${texi2html-no}"
7985 echo "perl enabled ${perl-no}"
7986 echo "pod2man enabled ${pod2man-no}"
7987 echo "makeinfo enabled ${makeinfo-no}"
7988 echo "makeinfo supports HTML ${makeinfo_html-no}"
7989 echo "xmllint enabled ${xmllint-no}"
7990 test -n "$random_seed" &&
7991 echo "random seed ${random_seed}"
7994 echo "External libraries:"
7995 print_enabled
'' $EXTERNAL_LIBRARY_LIST $EXTERNAL_AUTODETECT_LIBRARY_LIST | print_in_columns
7998 echo "External libraries providing hardware acceleration:"
7999 print_enabled
'' $HWACCEL_LIBRARY_LIST $HWACCEL_AUTODETECT_LIBRARY_LIST | print_in_columns
8003 print_enabled
'' $LIBRARY_LIST | print_in_columns
8007 print_enabled
'' $PROGRAM_LIST | print_in_columns
8010 for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev
; do
8011 echo "Enabled ${type}s:"
8012 eval list
=\$$
(toupper
$type)_LIST
8013 print_enabled
'_*' $list | print_in_columns
8017 if test -n "$ignore_tests"; then
8018 ignore_tests
=$
(echo $ignore_tests |
tr ',' ' ')
8019 echo "Ignored FATE tests:"
8020 echo $ignore_tests | print_in_columns
8024 echo "License: $license"
8026 fi # test "$quiet" != "yes"
8028 if test -n "$WARN_IF_GETS_DISABLED_LIST"; then
8029 for cfg
in $WARN_IF_GETS_DISABLED_LIST; do
8030 if disabled
$cfg; then
8031 varname
=${cfg}_disable_reason
8032 eval "warn \"Disabled $cfg because \$$varname\""
8037 if test -n "$WARNINGS"; then
8038 printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
8039 enabled fatal_warnings
&& exit 1
8042 test -e Makefile ||
echo "include $source_path/Makefile" > Makefile
8045 echo "$*" |
sed 's/%/%25/g;s/:/%3a/g'
8048 echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild
/config.fate
8050 enabled stripping || strip
="echo skipping strip"
8051 enabled stripping || striptype
=""
8053 config_files
="$TMPH ffbuild/config.mak doc/config.texi"
8055 cat > ffbuild
/config.mak
<<EOF
8056 # Automatically generated by configure - do not modify!
8057 ifndef FFMPEG_CONFIG_MAK
8059 FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
8061 LIBDIR=\$(DESTDIR)$libdir
8062 SHLIBDIR=\$(DESTDIR)$shlibdir
8063 INCDIR=\$(DESTDIR)$incdir
8064 BINDIR=\$(DESTDIR)$bindir
8065 DATADIR=\$(DESTDIR)$datadir
8066 DOCDIR=\$(DESTDIR)$docdir
8067 MANDIR=\$(DESTDIR)$mandir
8068 PKGCONFIGDIR=\$(DESTDIR)$pkgconfigdir
8069 INSTALL_NAME_DIR=$install_name_dir
8070 SRC_PATH=$source_path
8071 SRC_LINK=$source_link
8072 ifndef MAIN_MAKEFILE
8073 SRC_PATH:=\$(SRC_PATH:.%=..%)
8077 INTRINSICS=$intrinsics
8078 EXTERN_PREFIX=$extern_prefix
8085 DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)
8087 DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
8089 DEPX86ASM=$x86asmexe
8090 DEPX86ASMFLAGS=\$(X86ASMFLAGS)
8100 STRIPTYPE=$striptype
8107 OBJCCFLAGS=$OBJCFLAGS
8109 NVCCFLAGS=$nvccflags
8130 LDEXEFLAGS=$LDEXEFLAGS
8131 LDSOFLAGS=$LDSOFLAGS
8132 SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
8133 ASMSTRIPFLAGS=$ASMSTRIPFLAGS
8134 X86ASMFLAGS=$X86ASMFLAGS
8138 LASXFLAGS=$LASXFLAGS
8139 BUILDSUF=$build_suffix
8140 PROGSSUF=$progs_suffix
8148 EXTRA_VERSION=$extra_version
8151 CCDEP_FLAGS=$CCDEP_FLAGS
8153 ASDEP_FLAGS=$ASDEP_FLAGS
8154 X86ASMDEP=$X86ASMDEP
8155 X86ASMDEP_FLAGS=$X86ASMDEP_FLAGS
8156 CC_DEPFLAGS=$CC_DEPFLAGS
8157 CXX_DEPFLAGS=$CXX_DEPFLAGS
8158 OBJCC_DEPFLAGS=$OBJC_DEPFLAGS
8159 AS_DEPFLAGS=$AS_DEPFLAGS
8160 X86ASM_DEPFLAGS=$X86ASM_DEPFLAGS
8163 HOSTCFLAGS=$host_cflags
8164 HOSTCPPFLAGS=$host_cppflags
8165 HOSTEXESUF=$HOSTEXESUF
8166 HOSTLDFLAGS=$host_ldflags
8167 HOSTEXTRALIBS=$host_extralibs
8169 DEPHOSTCCFLAGS=$DEPHOSTCCFLAGS \$(HOSTCCFLAGS)
8170 HOSTCCDEP=$HOSTCCDEP
8171 HOSTCCDEP_FLAGS=$HOSTCCDEP_FLAGS
8172 HOSTCC_DEPFLAGS=$HOSTCC_DEPFLAGS
8176 TARGET_EXEC=$target_exec $target_exec_args
8177 TARGET_PATH=$target_path
8178 TARGET_SAMPLES=${target_samples:-\$(SAMPLES)}
8179 CFLAGS-ffplay=${sdl2_cflags}
8180 CFLAGS_HEADERS=$CFLAGS_HEADERS
8181 LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
8182 EXTRALIBS=$extralibs
8183 COMPAT_OBJS=$compat_objs
8185 LIBTARGET=${LIBTARGET}
8186 SLIBNAME=${SLIBNAME}
8187 SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
8188 SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}
8189 SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}
8190 SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
8191 SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
8192 SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
8193 SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
8194 SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
8195 VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
8196 SAMPLES:=${samples:-\$(FATE_SAMPLES)}
8197 NOREDZONE_FLAGS=$noredzone_flags
8198 LIBFUZZER_PATH=$libfuzzer_path
8199 IGNORE_TESTS=$ignore_tests
8200 VERSION_TRACKING=$version_tracking
8203 map
'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
8205 for entry
in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do
8206 eval echo "EXTRALIBS-${entry}=\$${entry}_extralibs" >> ffbuild
/config.mak
8210 /* Automatically generated by configure - do not modify! */
8211 #ifndef FFMPEG_CONFIG_H
8212 #define FFMPEG_CONFIG_H
8213 #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
8214 #define FFMPEG_LICENSE "$(c_escape $license)"
8215 #define CONFIG_THIS_YEAR 2024
8216 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
8217 #define AVCONV_DATADIR "$(eval c_escape $datadir)"
8218 #define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
8219 #define OS_NAME $target_os
8220 #define EXTERN_PREFIX "${extern_prefix}"
8221 #define EXTERN_ASM ${extern_prefix}
8222 #define BUILDSUF "$build_suffix"
8223 #define SLIBSUF "$SLIBSUF"
8224 #define SWS_MAX_FILTER_SIZE $sws_max_filter_size
8227 test -n "$assert_level" &&
8228 echo "#define ASSERT_LEVEL $assert_level" >>$TMPH
8230 test -n "$malloc_prefix" &&
8231 echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
8234 echo "#define AS_ARCH_LEVEL $as_arch_level" >>$TMPH
8236 if enabled x86asm
; then
8237 append config_files
$TMPASM
8239 ; Automatically generated by configure - do not modify!
8243 enabled getenv ||
echo "#define getenv(x) NULL" >> $TMPH
8249 echo "@c auto-generated by configure - do not modify! " > doc
/config.texi
8251 print_config ARCH_
"$config_files" $ARCH_LIST
8252 print_config HAVE_
"$config_files" $HAVE_LIST
8253 print_config CONFIG_
"$config_files" $CONFIG_LIST \
8256 echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
8258 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8259 cp_if_changed
$TMPH config.h
8260 touch ffbuild
/.config
8262 # Copy config.asm before printing ALL_COMPONENTS; that's not needed in assembly.
8263 enabled x86asm
&& cp_if_changed
$TMPASM config.asm
8265 # Reopen a new TMPH for config_components.h.
8267 /* Automatically generated by configure - do not modify! */
8268 #ifndef FFMPEG_CONFIG_COMPONENTS_H
8269 #define FFMPEG_CONFIG_COMPONENTS_H
8272 print_config CONFIG_
"$config_files" $ALL_COMPONENTS
8274 echo "#endif /* FFMPEG_CONFIG_COMPONENTS_H */" >> $TMPH
8275 echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild
/config.mak
8277 cp_if_changed
$TMPH config_components.h
8280 /* Generated by ffmpeg configure */
8281 #ifndef AVUTIL_AVCONFIG_H
8282 #define AVUTIL_AVCONFIG_H
8285 print_config AV_HAVE_
$TMPH $HAVE_LIST_PUB
8287 echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
8289 cp_if_changed
$TMPH libavutil
/avconfig.h
8291 # full_filter_name_foo=vf_foo
8292 # full_filter_name_bar=asrc_bar
8294 eval "$(sed -n "s
/^extern const AVFilter ff_\
([avfsinkrc
]\
{2,5\
}\
)_\
(.
*\
);/full_filter_name_\
2=\
1_\
2/p
" $source_path/libavfilter/allfilters.c)"
8296 # generate the lists of enabled components
8297 print_enabled_components
(){
8302 echo "static const $struct_name * const $name[] = {" > $TMPH
8307 eval c
=\
$full_filter_name_${c%_filter}
8310 c
=${c%_indev}_demuxer
8313 c
=${c%_outdev}_muxer
8316 printf " &ff_%s,\n" $c >> $TMPH
8319 if [ "$name" = "filter_list" ]; then
8320 for c
in asrc_abuffer vsrc_buffer asink_abuffer vsink_buffer
; do
8321 printf " &ff_%s,\n" $c >> $TMPH
8324 echo " NULL };" >> $TMPH
8325 cp_if_changed
$TMPH $file
8328 print_enabled_components libavfilter
/filter_list.c AVFilter filter_list
$FILTER_LIST
8329 print_enabled_components libavcodec
/codec_list.c FFCodec codec_list
$CODEC_LIST
8330 print_enabled_components libavcodec
/parser_list.c AVCodecParser parser_list
$PARSER_LIST
8331 print_enabled_components libavcodec
/bsf_list.c FFBitStreamFilter bitstream_filters
$BSF_LIST
8332 print_enabled_components libavformat
/demuxer_list.c FFInputFormat demuxer_list
$DEMUXER_LIST
8333 print_enabled_components libavformat
/muxer_list.c FFOutputFormat muxer_list
$MUXER_LIST
8334 print_enabled_components libavdevice
/indev_list.c FFInputFormat indev_list
$INDEV_LIST
8335 print_enabled_components libavdevice
/outdev_list.c FFOutputFormat outdev_list
$OUTDEV_LIST
8336 print_enabled_components libavformat
/protocol_list.c URLProtocol url_protocols
$PROTOCOL_LIST
8338 # Settings for pkg-config files
8341 # Automatically generated by configure - do not modify!
8343 build_suffix=$build_suffix
8347 rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
8348 source_path=${source_path}
8351 extralibs_avutil="$avutil_extralibs"
8352 extralibs_avcodec="$avcodec_extralibs"
8353 extralibs_avformat="$avformat_extralibs"
8354 extralibs_avdevice="$avdevice_extralibs"
8355 extralibs_avfilter="$avfilter_extralibs"
8356 extralibs_postproc="$postproc_extralibs"
8357 extralibs_swscale="$swscale_extralibs"
8358 extralibs_swresample="$swresample_extralibs"
8361 for lib
in $LIBRARY_LIST; do
8362 lib_deps
="$(eval echo \$${lib}_deps)"
8363 echo ${lib}_deps
=\"$lib_deps\" >> $TMPH
8366 cp_if_changed
$TMPH ffbuild
/config.sh