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-liblensfun enable lensfun lens correction [no]
250 --enable-libmodplug enable ModPlug via libmodplug [no]
251 --enable-libmp3lame enable MP3 encoding via libmp3lame [no]
252 --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
253 --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
254 --enable-libopencv enable video filtering via libopencv [no]
255 --enable-libopenh264 enable H.264 encoding via OpenH264 [no]
256 --enable-libopenjpeg enable JPEG 2000 encoding via OpenJPEG [no]
257 --enable-libopenmpt enable decoding tracked files via libopenmpt [no]
258 --enable-libopenvino enable OpenVINO as a DNN module backend
259 for DNN based filters like dnn_processing [no]
260 --enable-libopus enable Opus de/encoding via libopus [no]
261 --enable-libplacebo enable libplacebo library [no]
262 --enable-libpulse enable Pulseaudio input via libpulse [no]
263 --enable-libqrencode enable QR encode generation via libqrencode [no]
264 --enable-libquirc enable QR decoding via libquirc [no]
265 --enable-librabbitmq enable RabbitMQ library [no]
266 --enable-librav1e enable AV1 encoding via rav1e [no]
267 --enable-librist enable RIST via librist [no]
268 --enable-librsvg enable SVG rasterization via librsvg [no]
269 --enable-librubberband enable rubberband needed for rubberband filter [no]
270 --enable-librtmp enable RTMP[E] support via librtmp [no]
271 --enable-libshaderc enable GLSL->SPIRV compilation via libshaderc [no]
272 --enable-libshine enable fixed-point MP3 encoding via libshine [no]
273 --enable-libsmbclient enable Samba protocol via libsmbclient [no]
274 --enable-libsnappy enable Snappy compression, needed for hap encoding [no]
275 --enable-libsoxr enable Include libsoxr resampling [no]
276 --enable-libspeex enable Speex de/encoding via libspeex [no]
277 --enable-libsrt enable Haivision SRT protocol via libsrt [no]
278 --enable-libssh enable SFTP protocol via libssh [no]
279 --enable-libsvtav1 enable AV1 encoding via SVT [no]
280 --enable-libtensorflow enable TensorFlow as a DNN module backend
281 for DNN based filters like sr [no]
282 --enable-libtesseract enable Tesseract, needed for ocr filter [no]
283 --enable-libtheora enable Theora encoding via libtheora [no]
284 --enable-libtls enable LibreSSL (via libtls), needed for https support
285 if openssl, gnutls or mbedtls is not used [no]
286 --enable-libtorch enable Torch as one DNN backend [no]
287 --enable-libtwolame enable MP2 encoding via libtwolame [no]
288 --enable-libuavs3d enable AVS3 decoding via libuavs3d [no]
289 --enable-libv4l2 enable libv4l2/v4l-utils [no]
290 --enable-libvidstab enable video stabilization using vid.stab [no]
291 --enable-libvmaf enable vmaf filter via libvmaf [no]
292 --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
293 --enable-libvorbis enable Vorbis en/decoding via libvorbis,
294 native implementation exists [no]
295 --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
296 --enable-libwebp enable WebP encoding via libwebp [no]
297 --enable-libx264 enable H.264 encoding via x264 [no]
298 --enable-libx265 enable HEVC encoding via x265 [no]
299 --enable-libxeve enable EVC encoding via libxeve [no]
300 --enable-libxevd enable EVC decoding via libxevd [no]
301 --enable-libxavs enable AVS encoding via xavs [no]
302 --enable-libxavs2 enable AVS2 encoding via xavs2 [no]
303 --enable-libxcb enable X11 grabbing using XCB [autodetect]
304 --enable-libxcb-shm enable X11 grabbing shm communication [autodetect]
305 --enable-libxcb-xfixes enable X11 grabbing mouse rendering [autodetect]
306 --enable-libxcb-shape enable X11 grabbing shape rendering [autodetect]
307 --enable-libxvid enable Xvid encoding via xvidcore,
308 native MPEG-4/Xvid encoder exists [no]
309 --enable-libxml2 enable XML parsing using the C library libxml2, needed
310 for dash and imf demuxing support [no]
311 --enable-libzimg enable z.lib, needed for zscale filter [no]
312 --enable-libzmq enable message passing via libzmq [no]
313 --enable-libzvbi enable teletext support via libzvbi [no]
314 --enable-lv2 enable LV2 audio filtering [no]
315 --disable-lzma disable lzma [autodetect]
316 --enable-decklink enable Blackmagic DeckLink I/O support [no]
317 --enable-mbedtls enable mbedTLS, needed for https support
318 if openssl, gnutls or libtls is not used [no]
319 --enable-mediacodec enable Android MediaCodec support [no]
320 --enable-mediafoundation enable encoding via MediaFoundation [auto]
321 --disable-metal disable Apple Metal framework [autodetect]
322 --enable-libmysofa enable libmysofa, needed for sofalizer filter [no]
323 --enable-openal enable OpenAL 1.1 capture support [no]
324 --enable-opencl enable OpenCL processing [no]
325 --enable-opengl enable OpenGL rendering [no]
326 --enable-openssl enable openssl, needed for https support
327 if gnutls, libtls or mbedtls is not used [no]
328 --enable-pocketsphinx enable PocketSphinx, needed for asr filter [no]
329 --disable-sndio disable sndio support [autodetect]
330 --disable-schannel disable SChannel SSP, needed for TLS support on
331 Windows if openssl and gnutls are not used [autodetect]
332 --disable-sdl2 disable sdl2 [autodetect]
333 --disable-securetransport disable Secure Transport, needed for TLS support
334 on OSX if openssl and gnutls are not used [autodetect]
335 --enable-vapoursynth enable VapourSynth demuxer [no]
336 --disable-xlib disable xlib [autodetect]
337 --disable-zlib disable zlib [autodetect]
339 The following libraries provide various hardware acceleration features:
340 --disable-amf disable AMF video encoding code [autodetect]
341 --disable-audiotoolbox disable Apple AudioToolbox code [autodetect]
342 --enable-cuda-nvcc enable Nvidia CUDA compiler [no]
343 --disable-cuda-llvm disable CUDA compilation using clang [autodetect]
344 --disable-cuvid disable Nvidia CUVID support [autodetect]
345 --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect]
346 --disable-d3d12va disable Microsoft Direct3D 12 video acceleration code [autodetect]
347 --disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect]
348 --disable-ffnvcodec disable dynamically linked Nvidia code [autodetect]
349 --disable-libdrm disable DRM code (Linux) [autodetect]
350 --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no]
351 --enable-libvpl enable Intel oneVPL code via libvpl if libmfx is not used [no]
352 --enable-libnpp enable Nvidia Performance Primitives-based code [no]
353 --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no]
354 --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect]
355 --disable-nvenc disable Nvidia video encoding code [autodetect]
356 --enable-omx enable OpenMAX IL code [no]
357 --enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
358 --enable-rkmpp enable Rockchip Media Process Platform code [no]
359 --disable-v4l2-m2m disable V4L2 mem2mem code [autodetect]
360 --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect]
361 --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect]
362 --disable-videotoolbox disable VideoToolbox code [autodetect]
363 --disable-vulkan disable Vulkan code [autodetect]
366 --arch=ARCH select architecture [$arch]
367 --cpu=CPU select the minimum required CPU (affects
368 instruction selection, may crash on older CPUs)
369 --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]
370 --progs-suffix=SUFFIX program name suffix []
371 --enable-cross-compile assume a cross-compiler is used
372 --sysroot=PATH root of cross-build tree
373 --sysinclude=PATH location of cross-build system headers
374 --target-os=OS compiler targets OS [$target_os]
375 --target-exec=CMD command to run executables on target
376 --target-path=DIR path to view of build directory on target
377 --target-samples=DIR path to samples directory on target
378 --tempprefix=PATH force fixed dir/prefix instead of mktemp for checks
379 --toolchain=NAME set tool defaults according to NAME
380 (gcc-asan, clang-asan, gcc-msan, clang-msan,
381 gcc-tsan, clang-tsan, gcc-usan, clang-usan,
382 valgrind-massif, valgrind-memcheck,
383 msvc, icl, gcov, llvm-cov, hardened)
384 --nm=NM use nm tool NM [$nm_default]
385 --ar=AR use archive tool AR [$ar_default]
386 --as=AS use assembler AS [$as_default]
387 --ln_s=LN_S use symbolic link tool LN_S [$ln_s_default]
388 --strip=STRIP use strip tool STRIP [$strip_default]
389 --windres=WINDRES use windows resource compiler WINDRES [$windres_default]
390 --x86asmexe=EXE use nasm-compatible assembler EXE [$x86asmexe_default]
391 --cc=CC use C compiler CC [$cc_default]
392 --stdc=STDC use C standard STDC [$stdc_default]
393 --cxx=CXX use C compiler CXX [$cxx_default]
394 --stdcxx=STDCXX use C standard STDCXX [$stdcxx_default]
395 --objcc=OCC use ObjC compiler OCC [$cc_default]
396 --dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
397 --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$nvcc_default]
398 --ld=LD use linker LD [$ld_default]
399 --metalcc=METALCC use metal compiler METALCC [$metalcc_default]
400 --metallib=METALLIB use metal linker METALLIB [$metallib_default]
401 --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default]
402 --pkg-config-flags=FLAGS pass additional flags to pkgconf []
403 --ranlib=RANLIB use ranlib RANLIB [$ranlib_default]
404 --doxygen=DOXYGEN use DOXYGEN to generate API doc [$doxygen_default]
405 --host-cc=HOSTCC use host C compiler HOSTCC
406 --host-cflags=HCFLAGS use HCFLAGS when compiling for host
407 --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
408 --host-ld=HOSTLD use host linker HOSTLD
409 --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
410 --host-extralibs=HLIBS use libs HLIBS when linking for host
411 --host-os=OS compiler host OS [$target_os]
412 --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
413 --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
414 --extra-objcflags=FLAGS add FLAGS to OBJCFLAGS [$CFLAGS]
415 --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
416 --extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
417 --extra-ldsoflags=ELDFLAGS add ELDFLAGS to LDSOFLAGS [$LDSOFLAGS]
418 --extra-libs=ELIBS add ELIBS [$ELIBS]
419 --extra-version=STRING version string suffix []
420 --optflags=OPTFLAGS override optimization-related compiler flags
421 --nvccflags=NVCCFLAGS override nvcc flags [$nvccflags_default]
422 --build-suffix=SUFFIX library name suffix []
423 --enable-pic build position-independent code
424 --enable-thumb compile for Thumb instruction set
425 --enable-lto[=arg] use link-time optimization
426 --env="ENV=override" override the environment variables
428 Advanced options (experts only):
429 --malloc-prefix=PREFIX prefix malloc and related names with PREFIX
430 --custom-allocator=NAME use a supported custom allocator
431 --disable-symver disable symbol versioning
432 --enable-hardcoded-tables use hardcoded tables instead of runtime generation
433 --disable-safe-bitstream-reader
434 disable buffer boundary checking in bitreaders
435 (faster, but may crash)
436 --sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
438 Optimization options (experts only):
439 --disable-asm disable all assembly optimizations
440 --disable-altivec disable AltiVec optimizations
441 --disable-vsx disable VSX optimizations
442 --disable-power8 disable POWER8 optimizations
443 --disable-amd3dnow disable 3DNow! optimizations
444 --disable-amd3dnowext disable 3DNow! extended optimizations
445 --disable-mmx disable MMX optimizations
446 --disable-mmxext disable MMXEXT optimizations
447 --disable-sse disable SSE optimizations
448 --disable-sse2 disable SSE2 optimizations
449 --disable-sse3 disable SSE3 optimizations
450 --disable-ssse3 disable SSSE3 optimizations
451 --disable-sse4 disable SSE4 optimizations
452 --disable-sse42 disable SSE4.2 optimizations
453 --disable-avx disable AVX optimizations
454 --disable-xop disable XOP optimizations
455 --disable-fma3 disable FMA3 optimizations
456 --disable-fma4 disable FMA4 optimizations
457 --disable-avx2 disable AVX2 optimizations
458 --disable-avx512 disable AVX-512 optimizations
459 --disable-avx512icl disable AVX-512ICL optimizations
460 --disable-aesni disable AESNI optimizations
461 --disable-armv5te disable armv5te optimizations
462 --disable-armv6 disable armv6 optimizations
463 --disable-armv6t2 disable armv6t2 optimizations
464 --disable-vfp disable VFP optimizations
465 --disable-neon disable NEON optimizations
466 --disable-dotprod disable DOTPROD optimizations
467 --disable-i8mm disable I8MM optimizations
468 --disable-inline-asm disable use of inline assembly
469 --disable-x86asm disable use of standalone x86 assembly
470 --disable-mipsdsp disable MIPS DSP ASE R1 optimizations
471 --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
472 --disable-msa disable MSA optimizations
473 --disable-mipsfpu disable floating point MIPS optimizations
474 --disable-mmi disable Loongson MMI optimizations
475 --disable-lsx disable Loongson LSX optimizations
476 --disable-lasx disable Loongson LASX optimizations
477 --disable-rvv disable RISC-V Vector optimizations
478 --disable-fast-unaligned consider unaligned accesses slow
480 Developer options (useful when working on FFmpeg itself):
481 --disable-debug disable debugging symbols
482 --enable-debug=LEVEL set the debug level [$debuglevel]
483 --disable-optimizations disable compiler optimizations
484 --enable-extra-warnings enable more compiler warnings
485 --disable-stripping disable stripping of executables and shared libraries
486 --assert-level=level 0(default), 1 or 2, amount of assertion testing,
487 2 causes a slowdown at runtime.
488 --enable-memory-poisoning fill heap uninitialized allocated space with arbitrary data
489 --valgrind=VALGRIND run "make fate" tests through valgrind to detect memory
490 leaks and errors, using the specified valgrind binary.
491 Cannot be combined with --target-exec
492 --enable-ftrapv Trap arithmetic overflows
493 --samples=PATH location of test samples for FATE, if not set use
494 \$FATE_SAMPLES at make invocation time.
495 --enable-neon-clobber-test check NEON registers for clobbering (should be
496 used only for debugging purposes)
497 --enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
498 should be used only for debugging purposes)
499 --enable-random randomly enable/disable components
501 --enable-random=LIST randomly enable/disable specific components or
502 --disable-random=LIST component groups. LIST is a comma-separated list
503 of NAME[:PROB] entries where NAME is a component
504 (group) and PROB the probability associated with
506 --random-seed=VALUE seed value for --enable/disable-random
507 --disable-valgrind-backtrace do not print a backtrace under Valgrind
508 (only applies to --disable-optimizations builds)
509 --enable-ossfuzz Enable building fuzzer tool
510 --libfuzzer=PATH path to libfuzzer
511 --ignore-tests=TESTS comma-separated list (without "fate-" prefix
512 in the name) of tests whose result is ignored
513 --enable-linux-perf enable Linux Performance Monitor API
514 --enable-macos-kperf enable macOS kperf (private) API
515 --disable-large-tests disable tests that use a large amount of memory
516 --disable-ptx-compression don't compress CUDA PTX code even when possible
517 --disable-version-tracking don't include the git/release version in the build
519 NOTE: Object files are built at the place where configure is launched.
524 if test -t 1 && which tput >/dev
/null
2>&1; then
525 ncolors
=$
(tput colors
)
526 if test -n "$ncolors" && test $ncolors -ge 8; then
527 bold_color
=$
(tput bold
)
528 warn_color
=$
(tput setaf
3)
529 error_color
=$
(tput setaf
1)
530 reset_color
=$
(tput sgr0
)
532 # 72 used instead of 80 since that's the default of pr
538 echo "$@" >> $logfile
544 while IFS
= read -r log_file_line
; do
545 printf '%5d\t%s\n' "$log_file_i" "$log_file_line"
546 log_file_i
=$
(($log_file_i+1))
547 done < "$1" >> "$logfile"
553 WARNINGS
="${WARNINGS}WARNING: $*\n"
558 echo "$error_color$bold_color$@$reset_color"
561 If you think configure made a mistake, make sure you are using the latest
562 version from Git. If the latest version fails, report the problem to the
563 ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
565 if disabled logging
; then
567 Rerun configure with logging enabled (do not use --disable-logging), and
568 include the log this produces with your report.
572 Include the log file "$logfile" produced by configure as this will help
579 # Avoid locale weirdness, besides we really just want to translate ASCII.
581 echo "$@" |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
585 echo "$@" |
tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
589 echo "$*" |
sed 's/["\\]/\\\0/g'
593 v
=$
(echo "$1" |
sed "s/'/'\\\\''/g")
594 test "x$v" = "x${v#*[!A-Za-z0-9_/.+-]}" || v
="'$v'"
599 echo "$@" |
sed 's/^ *//;s/[[:space:]][[:space:]]*/ /g;s/ *$//'
606 eval "case '$v' in $pat) printf '%s ' '$v' ;; esac"
614 eval "case '$v' in $pat) ;; *) printf '%s ' '$v' ;; esac"
621 for v
; do eval $m; done
627 for v
; do echo ${v}${suffix}; done
633 for v
; do echo ${v%$suffix}; done
648 eval : \
${$var:=$value}
653 echo $@ |
sed 's/[^A-Za-z0-9_]/_/g'
659 eval $
(sanitize_var_name
"$var")='$*'
663 eval echo \$$
(sanitize_var_name
"$1")
668 eval level
=\
${${pvar}_level
:=0}
669 eval ${pvar}_
${level}="\$$pvar"
670 eval ${pvar}_level
=$
(($level+1))
676 eval level
=\
${${pvar}_level
:-0}
677 test $level = 0 && continue
678 eval level
=$
(($level-1))
679 eval $pvar="\${${pvar}_${level}}"
680 eval ${pvar}_level
=$level
681 eval unset ${pvar}_
${level}
687 eval ${var}_requested
=yes
692 warn_if_gets_disabled
(){
694 WARN_IF_GETS_DISABLED_LIST
="$WARN_IF_GETS_DISABLED_LIST $var"
706 disable_with_reason
(){
708 eval "${1}_disable_reason=\"$2\""
709 if requested
$1; then
710 die
"ERROR: $1 requested, but $2"
724 enable $
(sanitize_var_name
$var)
730 disable $
(sanitize_var_name
$var)
736 enabled
$var && continue
738 eval enable_deep \$
${var}_select
740 eval enable_deep_weak \$
${var}_suggest
751 disabled
$var && continue
760 test "${1#!}" = "$1" && op
="=" || op
="!="
761 eval test "x\$${1#!}_requested" $op "xyes"
765 test "${1#!}" = "$1" && op
="=" || op
="!="
766 eval test "x\$${1#!}" $op "xyes"
770 test "${1#!}" = "$1" && op
="=" || op
="!="
771 eval test "x\$${1#!}" $op "xno"
776 enabled
$opt ||
return 1
782 disabled
$opt ||
return 1
788 enabled
$opt && return 0
794 disabled
$opt && return 0
801 eval : \
${$opt:=\$${opt}_default}
809 [ $var = $value ] && return 0
814 # The cfg loop is very hot (several thousands iterations), and in bash also
815 # potentialy quite slow. Try to abort the iterations early, preferably without
816 # calling functions. 70%+ of the time cfg is already done or without deps.
819 eval [ x\$
${cfg}_checking
= xdone
] && continue
820 eval [ x\$
${cfg}_checking
= xinprogress
] && die
"Circular dependency for $cfg."
823 dep_all=\$${cfg}_deps
824 dep_any=\$${cfg}_deps_any
825 dep_con=\$${cfg}_conflict
826 dep_sel=\$${cfg}_select
827 dep_sgs=\$${cfg}_suggest
829 dep_ifn=\$${cfg}_if_any
832 # most of the time here $cfg has no deps - avoid costly no-op work
833 if [ "$dep_all$dep_any$dep_con$dep_sel$dep_sgs$dep_ifa$dep_ifn" ]; then
834 eval ${cfg}_checking
=inprogress
836 set -- $cfg "$dep_all" "$dep_any" "$dep_con" "$dep_sel" "$dep_sgs" "$dep_ifa" "$dep_ifn"
837 check_deps
$dep_all $dep_any $dep_con $dep_sel $dep_sgs $dep_ifa $dep_ifn
838 cfg
=$1; dep_all
=$2; dep_any
=$3; dep_con
=$4; dep_sel
=$5 dep_sgs
=$6; dep_ifa
=$7; dep_ifn
=$8
840 [ -n "$dep_ifa" ] && { enabled_all
$dep_ifa && enable_weak
$cfg; }
841 [ -n "$dep_ifn" ] && { enabled_any
$dep_ifn && enable_weak
$cfg; }
842 enabled_all
$dep_all ||
{ disable_with_reason
$cfg "not all dependencies are satisfied: $dep_all"; }
843 enabled_any
$dep_any ||
{ disable_with_reason
$cfg "not any dependency is satisfied: $dep_any"; }
844 disabled_all
$dep_con ||
{ disable_with_reason
$cfg "some conflicting dependencies are unsatisfied: $dep_con"; }
845 disabled_any
$dep_sel && { disable_with_reason
$cfg "some selected dependency is unsatisfied: $dep_sel"; }
847 enabled
$cfg && enable_deep_weak
$dep_sel $dep_sgs
849 for dep
in $dep_all $dep_any $dep_sel $dep_sgs; do
850 # filter out library deps, these do not belong in extralibs
851 is_in
$dep $LIBRARY_LIST && continue
852 enabled
$dep && eval append
${cfg}_extralibs
${dep}_extralibs
856 eval ${cfg}_checking
=done
864 map
'eval echo "$v \${$v:-no}"' "$@" |
865 awk "BEGIN { split(\"$files\", files) }
867 c = \"$pfx\" toupper(\$1);
873 if (file ~ /\\.h\$/) {
874 printf(\"#define %s %d\\n\", c, v) >>file;
875 } else if (file ~ /\\.asm\$/) {
876 printf(\"%%define %s %d\\n\", c, v) >>file;
877 } else if (file ~ /\\.mak\$/) {
878 n = -v ? \"\" : \"!\";
879 printf(\"%s%s=yes\\n\", n, c) >>file;
880 } else if (file ~ /\\.texi\$/) {
881 pre = -v ? \"\" : \"@c \";
884 gsub(/_/, \"-\", c2);
885 printf(\"%s@set %s %s\\n\", pre, c2, yesno) >>file;
895 enabled
$v && printf "%s\n" ${v%$suf}
902 eval "$var=\"\$$var $*\""
908 eval "$var=\"$* \$$var\""
915 reverse_out="$v $reverse_out"
921 # keeps the last occurence of each non-unique item
926 for v
in $unique_in; do
927 # " $unique_out" +space such that every item is surrounded with spaces
928 case " $unique_out" in *" $v "*) continue; esac # already in list
929 unique_out
="$unique_out$v "
938 for v
in $resolve_in; do
939 eval 'resolve_out="$resolve_out$'$v' "'
941 eval $1=\
$resolve_out
949 append CFLAGS $
($cflags_filter "$@")
952 add_cflags_headers
(){
953 append CFLAGS_HEADERS $
($cflags_filter "$@")
957 append CXXFLAGS $
($cflags_filter "$@")
961 append OBJCFLAGS $
($objcflags_filter "$@")
965 append ASFLAGS $
($asflags_filter "$@")
969 append LDFLAGS $
($ldflags_filter "$@")
973 append LDEXEFLAGS $
($ldflags_filter "$@")
977 append LDSOFLAGS $
($ldflags_filter "$@")
981 prepend extralibs $
($ldflags_filter "$@")
985 append ASMSTRIPFLAGS
"$@"
989 append host_cppflags
"$@"
993 append host_cflags $
($host_cflags_filter "$@")
997 append host_ldflags $
($host_ldflags_filter "$@")
1001 append compat_objs
$1
1003 map
'add_cppflags -D$v' "$@"
1008 "$@" >> $logfile 2>&1
1013 stat
"$1" >> $logfile 2>&1
1017 eval printf '%s\\n' $CC_E
1021 eval printf '%s\\n' $CC_O
1025 eval printf '%s\\n' $AS_O
1029 eval printf '%s\\n' $X86ASM_O
1033 eval printf '%s\\n' $LD_O
1037 eval printf '%s\\n' $HOSTCC_E
1041 eval printf '%s\\n' $HOSTCC_O
1045 eval printf '%s\\n' $NVCC_O
1052 test_cmd
$cc $CPPFLAGS $CFLAGS "$@" $CC_C $
(cc_o
$TMPO) $TMPC
1059 test_cmd
$cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
1066 test_cmd
$objcc -Werror=missing-prototypes
$CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $
(cc_o
$TMPO) $TMPM
1075 [ -x "$(command -v cygpath)" ] && tmpcu_
=$
(cygpath
-m $tmpcu_) && tmpo_
=$
(cygpath
-m $tmpo_)
1076 test_cmd
$nvcc $nvccflags "$@" $NVCC_C $
(nvcc_o
$tmpo_) $tmpcu_
1083 disabled
$name && return
1085 test_nvcc
"$@" <<EOF && enable $name
1087 __global__ void hello(unsigned char *data) {}
1096 test_cmd
$cc $CPPFLAGS $CFLAGS "$@" $
(cc_e
$TMPO) $TMPC
1103 test_cmd
$as $CPPFLAGS $ASFLAGS "$@" $AS_C $
(as_o
$TMPO) $TMPS
1107 log test_x86asm
"$@"
1111 test_cmd
$x86asmexe $X86ASMFLAGS -Werror "$@" $
(x86asm_o
$TMPO) $TMPASM
1117 disabled
$cmd && return
1119 test_cmd $@
&& enable $cmd
1128 test_as $@
<<EOF && enable $name
1134 log check_inline_asm
"$@"
1139 test_cc
"$@" <<EOF && enable $name
1140 void foo(void){ __asm__ volatile($code); }
1144 check_inline_asm_flags
(){
1145 log check_inline_asm_flags
"$@"
1150 while [ "$1" != "" ]; do
1156 void foo(void){ __asm__ volatile($code); }
1159 test_cmd
$cc $CPPFLAGS $CFLAGS $flags "$@" $CC_C $
(cc_o
$TMPO) $TMPC &&
1160 enable $name && add_cflags
$flags && add_asflags
$flags && add_ldflags
$flags
1165 check_inline_asm
${1}_inline
"\"$2\""
1166 check_as
${1}_external
"$2"
1170 log check_arch_level
"$@"
1172 check_as tested_arch_level
".arch $level"
1173 enabled tested_arch_level
&& as_arch_level
="$level"
1176 check_archext_insn
(){
1177 log check_archext_insn
"$@"
1180 # Check if the assembly is accepted in inline assembly.
1181 check_inline_asm
${feature}_inline
"\"$instr\""
1182 # We don't check if the instruction is supported out of the box by the
1183 # external assembler (we don't try to set ${feature}_external) as we don't
1184 # need to use these instructions in non-runtime detected codepaths.
1188 enabled as_arch_directive
&& arch_directive
=".arch $as_arch_level" || arch_directive
=""
1190 # Test if the assembler supports the .arch_extension $feature directive.
1191 arch_extension_directive
=".arch_extension $feature"
1192 test_as
<<EOF && enable as_archext_${feature}_directive || arch_extension_directive=""
1194 $arch_extension_directive
1197 # Test if we can assemble the instruction after potential .arch and
1198 # .arch_extension directives.
1199 test_as
<<EOF && enable ${feature}
1201 $arch_extension_directive
1207 log check_x86asm
"$@"
1211 test_x86asm
"$@" && enable $name
1218 flags
=$
(filter_out
'-l*|*.so' $@
)
1219 libs
=$
(filter
'-l*|*.so' $@
)
1220 test_
$type $
($cflags_filter $flags) ||
return
1221 flags
=$
($ldflags_filter $flags)
1222 libs
=$
($ldflags_filter $libs)
1223 test_cmd
$ld $LDFLAGS $LDEXEFLAGS $flags $
(ld_o
$TMPE) $TMPO $libs $extralibs
1232 test_ld
$type $@
&& enable $name
1237 test "${hdr%.h}" = "${hdr}" &&
1238 echo "#include $hdr" ||
1239 echo "#include <$hdr>"
1249 for hdr
in $headers; do
1252 echo "int main(void) { $code; return 0; }"
1253 } | test_
$check "$@"
1257 log check_cppflags
"$@"
1258 test_cpp
"$@" <<EOF && append CPPFLAGS "$@"
1264 log test_cflags
"$@"
1265 set -- $
($cflags_filter "$@")
1272 log check_cflags
"$@"
1273 test_cflags
"$@" && add_cflags
"$@"
1277 log check_cxxflags
"$@"
1278 set -- $
($cflags_filter "$@")
1279 test_cxx
"$@" <<EOF && append CXXFLAGS "$@"
1285 log test_objcflags
"$@"
1286 set -- $
($objcflags_filter "$@")
1287 test_objcc
"$@" <<EOF
1293 log check_objcflags
"$@"
1294 test_objcflags
"$@" && add_objcflags
"$@"
1298 log test_ldflags
"$@"
1299 set -- $
($ldflags_filter "$@")
1300 test_ld
"cc" "$@" <<EOF
1301 int main(void){ return 0; }
1306 log check_ldflags
"$@"
1307 test_ldflags
"$@" && add_ldflags
"$@"
1311 log test_stripflags
"$@"
1312 # call test_cc to get a fresh TMPO
1314 int main(void) { return 0; }
1316 test_cmd
$strip $ASMSTRIPFLAGS "$@" $TMPO
1320 log check_stripflags
"$@"
1321 test_stripflags
"$@" && add_stripflags
"$@"
1325 log check_headers
"$@"
1328 disable_sanitized
$headers
1330 for hdr
in $headers; do
1334 } | test_cpp
"$@" && enable_sanitized
$headers
1337 check_header_objcc
(){
1338 log check_header_objcc
"$@"
1342 disable_sanitized
$header
1344 echo "#include <$header>"
1345 echo "int main(void) { return 0; }"
1346 } | test_objcc
&& test_stat
"$TMPO" && enable_sanitized
$header
1349 check_apple_framework
(){
1350 log check_apple_framework
"$@"
1352 name
="$(tolower $framework)"
1353 header
="${framework}/${framework}.h"
1355 check_header_objcc
$header &&
1356 enable $name && eval ${name}_extralibs
='"-framework $framework"'
1364 test_ld
"cc" "$@" <<EOF && enable $func
1366 int main(void){ $func(); }
1371 log check_mathfunc
"$@"
1375 test $narg = 2 && args
="f, g" || args
="f"
1377 test_ld
"cc" "$@" <<EOF && enable $func
1379 float foo(float f, float g) { return $func($args); }
1380 int main(void){ return (int) foo; }
1384 check_func_headers
(){
1385 log check_func_headers
"$@"
1390 for hdr
in $headers; do
1393 echo "#include <stdint.h>"
1394 for func
in $funcs; do
1395 echo "long check_$func(void) { return (long) $func; }"
1397 echo "int main(void) { int ret = 0;"
1398 # LTO could optimize out the test functions without this
1399 for func
in $funcs; do
1400 echo " ret |= ((intptr_t)check_$func) & 0xFFFF;"
1402 echo "return ret; }"
1403 } | test_ld
"cc" "$@" && enable $funcs && enable_sanitized
$headers
1406 check_class_headers_cpp
(){
1407 log check_class_headers_cpp
"$@"
1412 for hdr
in $headers; do
1413 echo "#include <$hdr>"
1415 echo "int main(void) { "
1417 for class
in $classes; do
1418 echo "$class obj$i;"
1422 } | test_ld
"cxx" "$@" && enable $funcs && enable_sanitized
$headers
1425 test_cpp_condition
(){
1426 log test_cpp_condition
"$@"
1433 #error "unsatisfied condition: $condition"
1438 check_cpp_condition
(){
1439 log check_cpp_condition
"$@"
1443 test_cpp_condition
"$@" && enable $name
1447 log test_cflags_cc
"$@"
1452 set -- $
($cflags_filter "$flags")
1456 #error "unsatisfied condition: $condition"
1462 log check_cflags_cc
"$@"
1464 test_cflags_cc
"$@" && add_cflags
$flags
1468 log test_cxxflags_cc
"$@"
1473 set -- $
($cflags_filter "$flags")
1477 #error "unsatisfied condition: $condition"
1482 check_cxxflags_cc
(){
1483 log check_cxxflags_cc
"$@"
1485 test_cxxflags_cc
"$@" && add_cxxflags
$flags
1495 check_func_headers
"$headers" "$funcs" "$@" &&
1496 enable $name && eval ${name}_extralibs
="\$@"
1500 log check_lib_cpp
"$@"
1506 check_class_headers_cpp
"$headers" "$classes" "$@" &&
1507 enable $name && eval ${name}_extralibs
="\$@"
1511 log test_pkg_config
"$@"
1519 test_cmd
$pkg_config --exists --print-errors $pkg_version ||
return
1520 pkg_cflags
=$
($pkg_config --cflags $pkg_config_flags $pkg)
1521 pkg_libs
=$
($pkg_config --libs $pkg_config_flags $pkg)
1522 pkg_incdir
=$
($pkg_config --variable=includedir
$pkg_config_flags $pkg)
1523 check_func_headers
"$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
1525 set_sanitized
"${name}_cflags" $pkg_cflags &&
1526 set_sanitized
"${name}_incdir" $pkg_incdir &&
1527 set_sanitized
"${name}_extralibs" $pkg_libs
1530 test_pkg_config_cpp
(){
1531 log test_pkg_config_cpp
"$@"
1539 test_cmd
$pkg_config --exists --print-errors $pkg_version ||
return
1540 pkg_cflags
=$
($pkg_config --cflags $pkg_config_flags $pkg)
1541 pkg_incdir
=$
($pkg_config --variable=includedir
$pkg_config_flags $pkg)
1542 pkg_incflags
=$
($pkg_config --cflags-only-I $pkg_config_flags $pkg)
1543 test_cpp_condition
"$pkg_incdir/$headers" "$cond" "$@" &&
1545 set_sanitized
"${name}_cflags" $pkg_cflags &&
1546 set_sanitized
"${name}_incdir" $pkg_incdir &&
1547 set_sanitized
"${name}_incflags" $pkg_incflags
1551 log check_pkg_config
"$@"
1553 test_pkg_config
"$@" &&
1554 eval add_cflags \$
${name}_cflags
1557 check_pkg_config_cpp
(){
1558 log check_pkg_config_cpp
"$@"
1560 test_pkg_config_cpp
"$@" &&
1561 eval add_cflags \$
${name}_cflags
1564 check_pkg_config_header_only
(){
1565 log check_pkg_config_cpp
"$@"
1567 test_pkg_config_cpp
"$@" &&
1568 eval add_cflags \$
${name}_incflags
1572 test_ld
"cc" "$@" && { enabled cross_compile ||
$TMPE >> $logfile 2>&1; }
1576 log check_exec_crash
"$@"
1579 # exit() is not async signal safe. _Exit (C99) and _exit (POSIX)
1580 # are safe but may not be available everywhere. Thus we use
1581 # raise(SIGTERM) instead. The check is run in a subshell so we
1582 # can redirect the "Terminated" message from the shell. SIGBUS
1583 # is not defined by standard C so it is used conditionally.
1585 (test_exec
"$@") >> $logfile 2>&1 <<EOF
1587 static void sighandler(int sig){
1593 int (*func_ptr)(void) = foo;
1595 signal(SIGILL, sighandler);
1596 signal(SIGFPE, sighandler);
1597 signal(SIGSEGV, sighandler);
1599 signal(SIGBUS, sighandler);
1611 disable_sanitized
"$type"
1612 test_code cc
"$headers" "$type v" "$@" && enable_sanitized
"$type"
1616 log check_struct
"$@"
1621 disable_sanitized
"${struct}_${member}"
1622 test_code cc
"$headers" "const void *p = &(($struct *)0)->$member" "$@" &&
1623 enable_sanitized
"${struct}_${member}"
1627 log check_builtin
"$@"
1633 test_code ld
"$headers" "$builtin" "cc" "$@" && enable "$name"
1636 check_compile_assert
(){
1637 log check_compile_assert
"$@"
1643 test_code cc
"$headers" "char c[2 * !!($condition) - 1]" "$@" && enable "$name"
1651 test_code cc
"$@" && enable "$name"
1659 check_lib
$name "$@" || die
"ERROR: $name_version not found"
1665 check_cc
"$@" || die
"ERROR: $name failed"
1669 log require_cpp
"$@"
1673 check_lib_cpp
"$name" "$@" || die
"ERROR: $name_version not found"
1677 log require_headers
"$@"
1679 check_headers
"$@" || die
"ERROR: $headers not found"
1682 require_cpp_condition
(){
1683 log require_cpp_condition
"$@"
1685 check_cpp_condition
"$@" || die
"ERROR: $condition not satisfied"
1688 require_pkg_config
(){
1689 log require_pkg_config
"$@"
1691 check_pkg_config
"$@" || die
"ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
1694 require_pkg_config_cpp
(){
1695 log require_pkg_config_cpp
"$@"
1697 check_pkg_config_cpp
"$@" || die
"ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
1701 log test_host_cc
"$@"
1704 test_cmd
$host_cc $host_cflags "$@" $HOSTCC_C $
(hostcc_o
$TMPO) $TMPC
1708 log test_host_cpp
"$@"
1711 test_cmd
$host_cc $host_cppflags $host_cflags "$@" $
(hostcc_e
$TMPO) $TMPC
1714 check_host_cppflags
(){
1715 log check_host_cppflags
"$@"
1716 test_host_cpp
"$@" <<EOF && append host_cppflags "$@"
1721 check_host_cflags
(){
1722 log check_host_cflags
"$@"
1723 set -- $
($host_cflags_filter "$@")
1724 test_host_cc
"$@" <<EOF && append host_cflags "$@"
1729 test_host_cflags_cc
(){
1730 log test_host_cflags_cc
"$@"
1735 set -- $
($host_cflags_filter "$flags")
1736 test_host_cc
"$@" <<EOF
1739 #error "unsatisfied condition: $condition"
1744 check_host_cflags_cc
(){
1745 log check_host_cflags_cc
"$@"
1747 test_host_cflags_cc
"$@" && add_host_cflags
$flags
1750 test_host_cpp_condition
(){
1751 log test_host_cpp_condition
"$@"
1755 test_host_cpp
"$@" <<EOF
1758 #error "unsatisfied condition: $condition"
1763 check_host_cpp_condition
(){
1764 log check_host_cpp_condition
"$@"
1768 test_host_cpp_condition
"$@" && enable $name
1772 cmp -s "$1" "$2" && { test "$quiet" != "yes" && echo "$2 is unchanged"; } && return
1773 mkdir
-p "$(dirname $2)"
1777 # CONFIG_LIST contains configurable options, while HAVE_LIST is for
1778 # system-dependent things.
1780 AVCODEC_COMPONENTS
="
1788 AVDEVICE_COMPONENTS
="
1793 AVFILTER_COMPONENTS
="
1797 AVFORMAT_COMPONENTS
="
1805 $AVDEVICE_COMPONENTS
1806 $AVFILTER_COMPONENTS
1807 $AVFORMAT_COMPONENTS
1811 avio_http_serve_files_example
1812 avio_list_dir_example
1813 avio_read_callback_example
1814 decode_audio_example
1815 decode_filter_audio_example
1816 decode_filter_video_example
1817 decode_video_example
1818 demux_decode_example
1819 encode_audio_example
1820 encode_video_example
1822 filter_audio_example
1827 resample_audio_example
1829 show_metadata_example
1830 transcode_aac_example
1832 vaapi_encode_example
1833 vaapi_transcode_example
1834 qsv_transcode_example
1837 EXTERNAL_AUTODETECT_LIBRARY_LIST
="
1859 EXTERNAL_LIBRARY_GPL_LIST
="
1875 EXTERNAL_LIBRARY_NONFREE_LIST
="
1881 EXTERNAL_LIBRARY_VERSION3_LIST
="
1892 EXTERNAL_LIBRARY_GPLV3_LIST
="
1896 EXTERNAL_LIBRARY_LIST
="
1897 $EXTERNAL_LIBRARY_GPL_LIST
1898 $EXTERNAL_LIBRARY_NONFREE_LIST
1899 $EXTERNAL_LIBRARY_VERSION3_LIST
1900 $EXTERNAL_LIBRARY_GPLV3_LIST
1985 HWACCEL_AUTODETECT_LIBRARY_LIST
="
2005 # catchall list of things that require external libs to link
2011 HWACCEL_LIBRARY_NONFREE_LIST
="
2017 HWACCEL_LIBRARY_LIST
="
2018 $HWACCEL_LIBRARY_NONFREE_LIST
2040 safe_bitstream_reader
2047 # this list should be kept in linking order
2082 # COMPONENT_LIST needs to come last to ensure correct dependency checking
2086 $EXTERNAL_LIBRARY_LIST
2087 $EXTERNAL_AUTODETECT_LIBRARY_LIST
2088 $HWACCEL_LIBRARY_LIST
2089 $HWACCEL_AUTODETECT_LIBRARY_LIST
2124 $EXTERNAL_AUTODETECT_LIBRARY_LIST
2125 $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
="
2229 $ARCH_EXT_LIST_X86_SIMD
2236 $ARCH_EXT_LIST_RISCV
2239 $ARCH_EXT_LIST_LOONGSON
2261 sync_val_compare_and_swap
2279 cdio_paranoia_paranoia_h
2282 dev_bktr_ioctl_bt848_h
2283 dev_bktr_ioctl_meteor_h
2285 dev_video_bktr_ioctl_bt848_h
2286 dev_video_meteor_ioctl_meteor_h
2296 machine_ioctl_bt848_h
2297 machine_ioctl_meteor_h
2299 opencv2_core_core_c_h
2358 MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
2379 GetProcessAffinityMask
2380 GetProcessMemoryInfo
2384 GetSystemTimeAsFileTime
2410 SetConsoleTextAttribute
2411 SetConsoleCtrlHandler
2421 UTGetOSTypeFromString
2434 TOOLCHAIN_FEATURES
="
2436 as_archext_dotprod_directive
2437 as_archext_i8mm_directive
2449 inline_asm_direct_symbol_refs
2451 inline_asm_nonlocal_labels
2462 DPI_AWARENESS_CONTEXT
2464 kCMVideoCodecType_HEVC
2465 kCMVideoCodecType_HEVCWithAlpha
2466 kCMVideoCodecType_VP9
2467 kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
2468 kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange
2469 kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange
2470 kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange
2471 kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange
2472 kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange
2473 kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange
2474 kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
2475 kCVImageBufferTransferFunction_ITU_R_2100_HLG
2476 kCVImageBufferTransferFunction_Linear
2477 kCVImageBufferYCbCrMatrix_ITU_R_2020
2478 kCVImageBufferColorPrimaries_ITU_R_2020
2479 kCVImageBufferTransferFunction_ITU_R_2020
2480 kCVImageBufferTransferFunction_SMPTE_ST_428_1
2483 struct_group_source_req
2484 struct_ip_mreq_source
2486 struct_msghdr_msg_flags
2488 struct_rusage_ru_maxrss
2489 struct_sctp_event_subscribe
2491 struct_sockaddr_sa_len
2492 struct_sockaddr_storage
2493 struct_stat_st_mtim_tv_nsec
2494 struct_v4l2_frmivalenum_discrete
2495 struct_mfxConfigInterface
2500 $(add_suffix _external $ARCH_EXT_LIST)
2501 $(add_suffix _inline $ARCH_EXT_LIST)
2523 opencl_vaapi_beignet
2524 opencl_vaapi_intel_media
2534 # options emitted with CONFIG_ prefix but not available on the command line
2566 frame_thread_encoder
2739 # code dependency declarations
2741 # architecture extensions
2746 armv8_deps
="aarch64"
2747 neon_deps_any
="aarch64 arm"
2748 intrinsics_neon_deps
="neon"
2752 dotprod_deps
="aarch64 neon"
2753 i8mm_deps
="aarch64 neon"
2755 map
'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
2768 loongson2_deps
="mips"
2769 loongson3_deps
="mips"
2770 mmi_deps_any
="loongson2 loongson3"
2771 lsx_deps
="loongarch"
2774 mips32r2_deps
="mips"
2775 mips32r5_deps
="mips"
2776 mips32r6_deps
="mips"
2777 mips64r2_deps
="mips"
2778 mips64r6_deps
="mips"
2781 mipsdspr2_deps
="mips"
2784 x86_64_select
="i686"
2785 x86_64_suggest
="fast_cmov"
2788 amd3dnowext_deps
="amd3dnow"
2805 avx512icl_deps
="avx512"
2807 mmx_external_deps
="x86asm"
2808 mmx_inline_deps
="inline_asm x86"
2809 mmx_suggest
="mmx_external mmx_inline"
2811 for ext
in $
(filter_out mmx
$ARCH_EXT_LIST_X86_SIMD); do
2812 eval dep
=\$
${ext}_deps
2813 eval ${ext}_external_deps
='"${dep}_external"'
2814 eval ${ext}_inline_deps
='"${dep}_inline"'
2815 eval ${ext}_suggest='"${ext}_external ${ext}_inline
"'
2818 aligned_stack_if_any="aarch64 ppc x86
"
2819 fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64
"
2820 fast_clz_if_any="aarch64 alpha avr32 mips ppc x86
"
2821 fast_unaligned_if_any="aarch64 ppc x86
"
2822 simd_align_16_if_any="altivec neon sse
"
2823 simd_align_32_if_any="avx
"
2824 simd_align_64_if_any="avx512
"
2826 # system capabilities
2827 linux_perf_deps="linux_perf_event_h
"
2828 symver_if_any="symver_asm_label symver_gnu_asm
"
2829 valgrind_backtrace_conflict="optimizations
"
2830 valgrind_backtrace_deps="valgrind_valgrind_h
"
2833 atomics_gcc_if="sync_val_compare_and_swap
"
2834 atomics_suncc_if="atomic_cas_ptr machine_rw_barrier
"
2835 atomics_win32_if="MemoryBarrier
"
2836 atomics_native_if_any="$ATOMICS_LIST"
2837 w32threads_deps="atomics_native
"
2838 threads_if_any="$THREADS_LIST"
2841 cbs_av1_select="cbs
"
2842 cbs_h264_select="cbs
"
2843 cbs_h265_select="cbs
"
2844 cbs_h266_select="cbs
"
2845 cbs_jpeg_select="cbs
"
2846 cbs_mpeg2_select="cbs
"
2847 cbs_vp8_select="cbs
"
2848 cbs_vp9_select="cbs
"
2849 deflate_wrapper_deps="zlib
"
2850 dirac_parse_select="golomb
"
2851 dovi_rpudec_select="golomb
"
2852 dovi_rpuenc_select="golomb
"
2853 dnn_suggest="libtensorflow libopenvino libtorch
"
2854 dnn_deps="avformat swscale
"
2855 error_resilience_select="me_cmp
"
2856 evcparse_select="golomb
"
2858 faandct_select="fdctdsp
"
2859 faanidct_deps="faan
"
2860 faanidct_select="idctdsp
"
2861 h264dsp_select="startcode
"
2862 h264parse_select="golomb
"
2863 h264_sei_select="atsc_a53 golomb
"
2864 hevcparse_select="golomb
"
2865 hevc_sei_select="atsc_a53 golomb
"
2866 frame_thread_encoder_deps="encoders threads
"
2868 iamfdec_select="iso_media mpeg4audio
"
2870 inflate_wrapper_deps="zlib
"
2871 intrax8_select="blockdsp wmv2dsp
"
2872 iso_media_select="mpeg4audio
"
2873 me_cmp_select="idctdsp
"
2874 mpeg_er_select="error_resilience
"
2875 mpegaudio_select="mpegaudiodsp mpegaudioheader
"
2876 mpegvideo_select="blockdsp hpeldsp idctdsp videodsp
"
2877 mpegvideodec_select="h264chroma mpegvideo mpeg_er
"
2878 mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp
"
2879 msmpeg4dec_select="h263_decoder
"
2880 msmpeg4enc_select="h263_encoder
"
2881 vc1dsp_select="h264chroma qpeldsp startcode
"
2882 wmv2dsp_select="qpeldsp
"
2884 # decoders / encoders
2885 aac_decoder_select="adts_header mpeg4audio sinewin
"
2886 aac_fixed_decoder_select="adts_header mpeg4audio
"
2887 aac_encoder_select="audio_frame_queue iirfilter lpc sinewin
"
2888 aac_latm_decoder_select="aac_decoder aac_latm_parser
"
2889 ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert
"
2890 ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp
"
2891 ac3_encoder_select="ac3dsp audiodsp me_cmp
"
2892 ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp
"
2893 acelp_kelvin_decoder_select="audiodsp
"
2894 adpcm_g722_decoder_select="g722dsp
"
2895 adpcm_g722_encoder_select="g722dsp
"
2896 agm_decoder_select="idctdsp
"
2897 aic_decoder_select="golomb idctdsp
"
2898 alac_encoder_select="lpc
"
2899 als_decoder_select="bswapdsp mpeg4audio
"
2900 amrnb_decoder_select="lsp
"
2901 amrwb_decoder_select="lsp
"
2902 amv_decoder_select="sp5x_decoder exif
"
2903 amv_encoder_select="jpegtables mpegvideoenc
"
2904 ape_decoder_select="bswapdsp llauddsp
"
2905 apng_decoder_select="inflate_wrapper
"
2906 apng_encoder_select="deflate_wrapper llvidencdsp
"
2907 aptx_encoder_select="audio_frame_queue
"
2908 aptx_hd_encoder_select="audio_frame_queue
"
2909 asv1_decoder_select="blockdsp bswapdsp idctdsp
"
2910 asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp
"
2911 asv2_decoder_select="blockdsp bswapdsp idctdsp
"
2912 asv2_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp
"
2913 atrac1_decoder_select="sinewin
"
2914 atrac3p_decoder_select="sinewin
"
2915 atrac3pal_decoder_select="sinewin
"
2916 av1_decoder_select="atsc_a53 cbs_av1 dovi_rpudec
"
2917 bink_decoder_select="blockdsp hpeldsp
"
2918 binkaudio_dct_decoder_select="wma_freqs
"
2919 binkaudio_rdft_decoder_select="wma_freqs
"
2920 cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp
"
2921 clearvideo_decoder_select="idctdsp
"
2922 cllc_decoder_select="bswapdsp
"
2923 comfortnoise_encoder_select="lpc
"
2924 cook_decoder_select="audiodsp sinewin
"
2925 cri_decoder_select="mjpeg_decoder
"
2926 cscd_decoder_suggest="zlib
"
2927 dds_decoder_select="texturedsp
"
2928 dirac_decoder_select="dirac_parse dwt golomb mpegvideoenc qpeldsp videodsp
"
2929 dnxhd_decoder_select="blockdsp idctdsp
"
2930 dnxhd_encoder_select="blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp videodsp
"
2931 dvvideo_decoder_select="dvprofile idctdsp
"
2932 dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp
"
2933 dxa_decoder_deps="zlib
"
2934 dxv_decoder_select="lzf texturedsp
"
2935 dxv_encoder_select="texturedspenc
"
2936 eac3_decoder_select="ac3_decoder
"
2937 eac3_encoder_select="ac3_encoder
"
2938 eamad_decoder_select="aandcttables blockdsp bswapdsp
"
2939 eatgq_decoder_select="aandcttables
"
2940 eatqi_decoder_select="aandcttables blockdsp bswapdsp
"
2941 exr_decoder_deps="zlib
"
2942 exr_encoder_deps="zlib
"
2943 ffv1_decoder_select="rangecoder
"
2944 ffv1_encoder_select="rangecoder
"
2945 ffvhuff_decoder_select="huffyuv_decoder
"
2946 ffvhuff_encoder_select="huffyuv_encoder
"
2947 fic_decoder_select="golomb
"
2948 flac_encoder_select="bswapdsp lpc
"
2949 flashsv2_decoder_select="inflate_wrapper
"
2950 flashsv2_encoder_select="deflate_wrapper
"
2951 flashsv_decoder_select="inflate_wrapper
"
2952 flashsv_encoder_deps="zlib
"
2953 flv_decoder_select="h263_decoder
"
2954 flv_encoder_select="h263_encoder
"
2955 fourxm_decoder_select="blockdsp bswapdsp
"
2956 fraps_decoder_select="bswapdsp huffman
"
2957 ftr_decoder_select="adts_header
"
2958 g2m_decoder_deps="zlib
"
2959 g2m_decoder_select="blockdsp idctdsp jpegtables
"
2960 g729_decoder_select="audiodsp
"
2961 h261_decoder_select="mpegvideodec
"
2962 h261_encoder_select="mpegvideoenc
"
2963 h263_decoder_select="h263_parser h263dsp mpegvideodec qpeldsp
"
2964 h263_encoder_select="h263dsp mpegvideoenc
"
2965 h263i_decoder_select="h263_decoder
"
2966 h263p_decoder_select="h263_decoder
"
2967 h263p_encoder_select="h263_encoder
"
2968 h264_decoder_select="cabac golomb h264chroma h264dsp h264parse h264pred h264qpel h264_sei videodsp
"
2969 h264_decoder_suggest="error_resilience
"
2970 hap_decoder_select="snappy texturedsp
"
2971 hap_encoder_deps="libsnappy
"
2972 hap_encoder_select="texturedspenc
"
2973 hevc_decoder_select="bswapdsp cabac dovi_rpudec golomb hevcparse hevc_sei videodsp
"
2974 huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp
"
2975 huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp
"
2976 hymt_decoder_select="huffyuv_decoder
"
2977 iac_decoder_select="imc_decoder
"
2978 imc_decoder_select="bswapdsp sinewin
"
2979 imm4_decoder_select="bswapdsp idctdsp
"
2980 imm5_decoder_select="h264_decoder hevc_decoder
"
2981 indeo3_decoder_select="hpeldsp
"
2982 indeo4_decoder_select="ividsp
"
2983 indeo5_decoder_select="ividsp
"
2984 interplay_video_decoder_select="hpeldsp
"
2985 ipu_decoder_select="mpegvideodec
"
2986 jpegls_decoder_select="mjpeg_decoder
"
2987 jv_decoder_select="blockdsp
"
2988 lagarith_decoder_select="llviddsp
"
2989 lead_decoder_select="idctdsp jpegtables
"
2990 ljpeg_encoder_select="jpegtables
"
2991 lscr_decoder_select="inflate_wrapper
"
2992 magicyuv_decoder_select="llviddsp
"
2993 magicyuv_encoder_select="llvidencdsp
"
2994 mdec_decoder_select="blockdsp bswapdsp idctdsp
"
2995 media100_decoder_select="media100_to_mjpegb_bsf mjpegb_decoder
"
2996 metasound_decoder_select="lsp sinewin
"
2997 mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp
"
2998 mjpeg_decoder_select="blockdsp hpeldsp exif idctdsp jpegtables
"
2999 mjpeg_encoder_select="jpegtables mpegvideoenc
"
3000 mjpegb_decoder_select="mjpeg_decoder
"
3001 mlp_decoder_select="mlp_parser
"
3002 mlp_encoder_select="lpc audio_frame_queue
"
3003 mobiclip_decoder_select="bswapdsp golomb
"
3004 motionpixels_decoder_select="bswapdsp
"
3005 mp1_decoder_select="mpegaudio
"
3006 mp1float_decoder_select="mpegaudio
"
3007 mp2_decoder_select="mpegaudio
"
3008 mp2float_decoder_select="mpegaudio
"
3009 mp3_decoder_select="mpegaudio
"
3010 mp3adu_decoder_select="mpegaudio
"
3011 mp3adufloat_decoder_select="mpegaudio
"
3012 mp3float_decoder_select="mpegaudio
"
3013 mp3on4_decoder_select="mpegaudio mpeg4audio
"
3014 mp3on4float_decoder_select="mpegaudio mpeg4audio
"
3015 mpc7_decoder_select="bswapdsp mpegaudiodsp
"
3016 mpc8_decoder_select="mpegaudiodsp
"
3017 mpegvideo_decoder_select="mpegvideodec
"
3018 mpeg1video_decoder_select="mpegvideodec
"
3019 mpeg1video_encoder_select="mpegvideoenc
"
3020 mpeg2video_decoder_select="mpegvideodec
"
3021 mpeg2video_encoder_select="mpegvideoenc
"
3022 mpeg4_decoder_select="h263_decoder mpeg4video_parser
"
3023 mpeg4_encoder_select="h263_encoder qpeldsp
"
3024 msa1_decoder_select="mss34dsp
"
3025 mscc_decoder_select="inflate_wrapper
"
3026 msmpeg4v1_decoder_select="msmpeg4dec
"
3027 msmpeg4v2_decoder_select="msmpeg4dec
"
3028 msmpeg4v2_encoder_select="msmpeg4enc
"
3029 msmpeg4v3_decoder_select="msmpeg4dec
"
3030 msmpeg4v3_encoder_select="msmpeg4enc
"
3031 mss2_decoder_select="mpegvideodec qpeldsp vc1_decoder
"
3032 mts2_decoder_select="jpegtables mss34dsp
"
3033 mv30_decoder_select="aandcttables blockdsp
"
3034 mvha_decoder_select="inflate_wrapper llviddsp
"
3035 mwsc_decoder_select="inflate_wrapper
"
3036 mxpeg_decoder_select="mjpeg_decoder
"
3037 nellymoser_decoder_select="sinewin
"
3038 nellymoser_encoder_select="audio_frame_queue sinewin
"
3039 notchlc_decoder_select="lzf
"
3040 nuv_decoder_select="idctdsp
"
3041 opus_decoder_deps="swresample
"
3042 opus_encoder_select="audio_frame_queue
"
3043 pdv_decoder_select="inflate_wrapper
"
3044 png_decoder_select="inflate_wrapper
"
3045 png_encoder_select="deflate_wrapper llvidencdsp
"
3046 prores_decoder_select="blockdsp idctdsp
"
3047 prores_encoder_select="fdctdsp
"
3048 prores_aw_encoder_select="fdctdsp
"
3049 prores_ks_encoder_select="fdctdsp
"
3050 qcelp_decoder_select="lsp
"
3051 qdm2_decoder_select="mpegaudiodsp
"
3052 ra_144_decoder_select="audiodsp
"
3053 ra_144_encoder_select="audio_frame_queue lpc audiodsp
"
3054 ralf_decoder_select="golomb
"
3055 rasc_decoder_select="inflate_wrapper
"
3056 rawvideo_decoder_select="bswapdsp
"
3057 rscc_decoder_deps="zlib
"
3058 rtv1_decoder_select="texturedsp
"
3059 rv10_decoder_select="h263_decoder
"
3060 rv10_encoder_select="h263_encoder
"
3061 rv20_decoder_select="h263_decoder
"
3062 rv20_encoder_select="h263_encoder
"
3063 rv30_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp
"
3064 rv40_decoder_select="golomb h264pred h264qpel mpegvideodec rv34dsp
"
3065 screenpresso_decoder_deps="zlib
"
3066 shorten_decoder_select="bswapdsp
"
3067 sipr_decoder_select="lsp
"
3068 smvjpeg_decoder_select="mjpeg_decoder
"
3069 snow_decoder_select="dwt h264qpel rangecoder videodsp
"
3070 snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder videodsp
"
3071 sonic_decoder_select="golomb rangecoder
"
3072 sonic_encoder_select="golomb rangecoder
"
3073 sonic_ls_encoder_select="golomb rangecoder
"
3074 sp5x_decoder_select="mjpeg_decoder
"
3075 speedhq_decoder_select="blockdsp idctdsp
"
3076 speedhq_encoder_select="mpegvideoenc
"
3077 srgc_decoder_select="inflate_wrapper
"
3078 svq1_decoder_select="hpeldsp
"
3079 svq1_encoder_select="hpeldsp me_cmp mpegvideoenc
"
3080 svq3_decoder_select="golomb h264dsp h264parse h264pred hpeldsp tpeldsp videodsp
"
3081 svq3_decoder_suggest="zlib
"
3082 tak_decoder_select="audiodsp
"
3083 tdsc_decoder_deps="zlib
"
3084 tdsc_decoder_select="mjpeg_decoder
"
3085 theora_decoder_select="vp3_decoder
"
3086 thp_decoder_select="mjpeg_decoder
"
3087 tiff_decoder_select="mjpeg_decoder
"
3088 tiff_decoder_suggest="zlib lzma
"
3089 tiff_encoder_suggest="zlib
"
3090 truehd_decoder_select="mlp_parser
"
3091 truehd_encoder_select="lpc audio_frame_queue
"
3092 truemotion2_decoder_select="bswapdsp
"
3093 truespeech_decoder_select="bswapdsp
"
3094 tscc_decoder_select="inflate_wrapper
"
3095 twinvq_decoder_select="lsp sinewin
"
3096 txd_decoder_select="texturedsp
"
3097 utvideo_decoder_select="bswapdsp llviddsp
"
3098 utvideo_encoder_select="bswapdsp huffman llvidencdsp
"
3099 vble_decoder_select="llviddsp
"
3100 vbn_decoder_select="texturedsp
"
3101 vbn_encoder_select="texturedspenc
"
3102 vmix_decoder_select="idctdsp
"
3103 vc1_decoder_select="blockdsp h264qpel intrax8 mpegvideodec qpeldsp vc1dsp
"
3104 vc1image_decoder_select="vc1_decoder
"
3105 vorbis_encoder_select="audio_frame_queue
"
3106 vp3_decoder_select="hpeldsp vp3dsp videodsp
"
3107 vp4_decoder_select="vp3_decoder
"
3108 vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp vp56dsp
"
3109 vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp vp56dsp
"
3110 vp6a_decoder_select="vp6_decoder
"
3111 vp6f_decoder_select="vp6_decoder
"
3112 vp7_decoder_select="h264pred videodsp vp8dsp
"
3113 vp8_decoder_select="h264pred videodsp vp8dsp
"
3114 vp9_decoder_select="videodsp vp9_parser vp9_superframe_split_bsf
"
3115 vvc_decoder_select="cabac cbs_h266 golomb videodsp
"
3116 wcmv_decoder_select="inflate_wrapper
"
3117 webp_decoder_select="vp8_decoder exif
"
3118 wmalossless_decoder_select="llauddsp
"
3119 wmapro_decoder_select="sinewin wma_freqs
"
3120 wmav1_decoder_select="sinewin wma_freqs
"
3121 wmav1_encoder_select="sinewin wma_freqs
"
3122 wmav2_decoder_select="sinewin wma_freqs
"
3123 wmav2_encoder_select="sinewin wma_freqs
"
3124 wmavoice_decoder_select="lsp sinewin
"
3125 wmv1_decoder_select="msmpeg4dec
"
3126 wmv1_encoder_select="msmpeg4enc
"
3127 wmv2_decoder_select="blockdsp error_resilience idctdsp intrax8 msmpeg4dec videodsp wmv2dsp
"
3128 wmv2_encoder_select="msmpeg4enc wmv2dsp
"
3129 wmv3_decoder_select="vc1_decoder
"
3130 wmv3image_decoder_select="wmv3_decoder
"
3131 xma1_decoder_select="wmapro_decoder
"
3132 xma2_decoder_select="wmapro_decoder
"
3133 ylc_decoder_select="bswapdsp
"
3134 zerocodec_decoder_select="inflate_wrapper
"
3135 zlib_decoder_select="inflate_wrapper
"
3136 zlib_encoder_select="deflate_wrapper
"
3137 zmbv_decoder_select="inflate_wrapper
"
3138 zmbv_encoder_select="deflate_wrapper
"
3140 # hardware accelerators
3141 cuda_deps="ffnvcodec
"
3142 cuvid_deps="ffnvcodec
"
3143 d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext
"
3144 d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder
"
3145 dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32
"
3146 ffnvcodec_deps_any="libdl LoadLibrary
"
3147 mediacodec_deps="android mediandk
"
3148 nvdec_deps="ffnvcodec
"
3149 vaapi_x11_deps="xlib_x11
"
3150 videotoolbox_hwaccel_deps="videotoolbox pthreads
"
3151 videotoolbox_hwaccel_extralibs="-framework QuartzCore
"
3152 vulkan_deps="threads
"
3153 vulkan_deps_any="libdl LoadLibrary
"
3155 av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1
"
3156 av1_d3d11va_hwaccel_select="av1_decoder
"
3157 av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1
"
3158 av1_d3d11va2_hwaccel_select="av1_decoder
"
3159 av1_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_AV1
"
3160 av1_d3d12va_hwaccel_select="av1_decoder
"
3161 av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1
"
3162 av1_dxva2_hwaccel_select="av1_decoder
"
3163 av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS
"
3164 av1_nvdec_hwaccel_select="av1_decoder
"
3165 av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx
"
3166 av1_vaapi_hwaccel_select="av1_decoder
"
3167 av1_vdpau_hwaccel_deps="vdpau VdpPictureInfoAV1
"
3168 av1_vdpau_hwaccel_select="av1_decoder
"
3169 av1_vulkan_hwaccel_deps="vulkan
"
3170 av1_vulkan_hwaccel_select="av1_decoder
"
3171 h263_vaapi_hwaccel_deps="vaapi
"
3172 h263_vaapi_hwaccel_select="h263_decoder
"
3173 h263_videotoolbox_hwaccel_deps="videotoolbox
"
3174 h263_videotoolbox_hwaccel_select="h263_decoder
"
3175 h264_d3d11va_hwaccel_deps="d3d11va
"
3176 h264_d3d11va_hwaccel_select="h264_decoder
"
3177 h264_d3d11va2_hwaccel_deps="d3d11va
"
3178 h264_d3d11va2_hwaccel_select="h264_decoder
"
3179 h264_d3d12va_hwaccel_deps="d3d12va
"
3180 h264_d3d12va_hwaccel_select="h264_decoder
"
3181 h264_dxva2_hwaccel_deps="dxva2
"
3182 h264_dxva2_hwaccel_select="h264_decoder
"
3183 h264_nvdec_hwaccel_deps="nvdec
"
3184 h264_nvdec_hwaccel_select="h264_decoder
"
3185 h264_vaapi_hwaccel_deps="vaapi
"
3186 h264_vaapi_hwaccel_select="h264_decoder
"
3187 h264_vdpau_hwaccel_deps="vdpau
"
3188 h264_vdpau_hwaccel_select="h264_decoder
"
3189 h264_videotoolbox_hwaccel_deps="videotoolbox
"
3190 h264_videotoolbox_hwaccel_select="h264_decoder
"
3191 h264_vulkan_hwaccel_deps="vulkan
"
3192 h264_vulkan_hwaccel_select="h264_decoder
"
3193 hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC
"
3194 hevc_d3d11va_hwaccel_select="hevc_decoder
"
3195 hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC
"
3196 hevc_d3d11va2_hwaccel_select="hevc_decoder
"
3197 hevc_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_HEVC
"
3198 hevc_d3d12va_hwaccel_select="hevc_decoder
"
3199 hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC
"
3200 hevc_dxva2_hwaccel_select="hevc_decoder
"
3201 hevc_nvdec_hwaccel_deps="nvdec
"
3202 hevc_nvdec_hwaccel_select="hevc_decoder
"
3203 hevc_vaapi_hwaccel_deps="vaapi VAPictureParameterBufferHEVC
"
3204 hevc_vaapi_hwaccel_select="hevc_decoder
"
3205 hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC
"
3206 hevc_vdpau_hwaccel_select="hevc_decoder
"
3207 hevc_videotoolbox_hwaccel_deps="videotoolbox
"
3208 hevc_videotoolbox_hwaccel_select="hevc_decoder
"
3209 hevc_vulkan_hwaccel_deps="vulkan
"
3210 hevc_vulkan_hwaccel_select="hevc_decoder
"
3211 mjpeg_nvdec_hwaccel_deps="nvdec
"
3212 mjpeg_nvdec_hwaccel_select="mjpeg_decoder
"
3213 mjpeg_vaapi_hwaccel_deps="vaapi
"
3214 mjpeg_vaapi_hwaccel_select="mjpeg_decoder
"
3215 mpeg1_nvdec_hwaccel_deps="nvdec
"
3216 mpeg1_nvdec_hwaccel_select="mpeg1video_decoder
"
3217 mpeg1_vdpau_hwaccel_deps="vdpau
"
3218 mpeg1_vdpau_hwaccel_select="mpeg1video_decoder
"
3219 mpeg1_videotoolbox_hwaccel_deps="videotoolbox
"
3220 mpeg1_videotoolbox_hwaccel_select="mpeg1video_decoder
"
3221 mpeg2_d3d11va_hwaccel_deps="d3d11va
"
3222 mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder
"
3223 mpeg2_d3d11va2_hwaccel_deps="d3d11va
"
3224 mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder
"
3225 mpeg2_d3d12va_hwaccel_deps="d3d12va
"
3226 mpeg2_d3d12va_hwaccel_select="mpeg2video_decoder
"
3227 mpeg2_dxva2_hwaccel_deps="dxva2
"
3228 mpeg2_dxva2_hwaccel_select="mpeg2video_decoder
"
3229 mpeg2_nvdec_hwaccel_deps="nvdec
"
3230 mpeg2_nvdec_hwaccel_select="mpeg2video_decoder
"
3231 mpeg2_vaapi_hwaccel_deps="vaapi
"
3232 mpeg2_vaapi_hwaccel_select="mpeg2video_decoder
"
3233 mpeg2_vdpau_hwaccel_deps="vdpau
"
3234 mpeg2_vdpau_hwaccel_select="mpeg2video_decoder
"
3235 mpeg2_videotoolbox_hwaccel_deps="videotoolbox
"
3236 mpeg2_videotoolbox_hwaccel_select="mpeg2video_decoder
"
3237 mpeg4_nvdec_hwaccel_deps="nvdec
"
3238 mpeg4_nvdec_hwaccel_select="mpeg4_decoder
"
3239 mpeg4_vaapi_hwaccel_deps="vaapi
"
3240 mpeg4_vaapi_hwaccel_select="mpeg4_decoder
"
3241 mpeg4_vdpau_hwaccel_deps="vdpau
"
3242 mpeg4_vdpau_hwaccel_select="mpeg4_decoder
"
3243 mpeg4_videotoolbox_hwaccel_deps="videotoolbox
"
3244 mpeg4_videotoolbox_hwaccel_select="mpeg4_decoder
"
3245 prores_videotoolbox_hwaccel_deps="videotoolbox
"
3246 prores_videotoolbox_hwaccel_select="prores_decoder
"
3247 vc1_d3d11va_hwaccel_deps="d3d11va
"
3248 vc1_d3d11va_hwaccel_select="vc1_decoder
"
3249 vc1_d3d11va2_hwaccel_deps="d3d11va
"
3250 vc1_d3d11va2_hwaccel_select="vc1_decoder
"
3251 vc1_d3d12va_hwaccel_deps="d3d12va
"
3252 vc1_d3d12va_hwaccel_select="vc1_decoder
"
3253 vc1_dxva2_hwaccel_deps="dxva2
"
3254 vc1_dxva2_hwaccel_select="vc1_decoder
"
3255 vc1_nvdec_hwaccel_deps="nvdec
"
3256 vc1_nvdec_hwaccel_select="vc1_decoder
"
3257 vc1_vaapi_hwaccel_deps="vaapi
"
3258 vc1_vaapi_hwaccel_select="vc1_decoder
"
3259 vc1_vdpau_hwaccel_deps="vdpau
"
3260 vc1_vdpau_hwaccel_select="vc1_decoder
"
3261 vp8_nvdec_hwaccel_deps="nvdec
"
3262 vp8_nvdec_hwaccel_select="vp8_decoder
"
3263 vp8_vaapi_hwaccel_deps="vaapi
"
3264 vp8_vaapi_hwaccel_select="vp8_decoder
"
3265 vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9
"
3266 vp9_d3d11va_hwaccel_select="vp9_decoder
"
3267 vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9
"
3268 vp9_d3d11va2_hwaccel_select="vp9_decoder
"
3269 vp9_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_VP9
"
3270 vp9_d3d12va_hwaccel_select="vp9_decoder
"
3271 vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9
"
3272 vp9_dxva2_hwaccel_select="vp9_decoder
"
3273 vp9_nvdec_hwaccel_deps="nvdec
"
3274 vp9_nvdec_hwaccel_select="vp9_decoder
"
3275 vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth
"
3276 vp9_vaapi_hwaccel_select="vp9_decoder
"
3277 vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9
"
3278 vp9_vdpau_hwaccel_select="vp9_decoder
"
3279 vp9_videotoolbox_hwaccel_deps="videotoolbox
"
3280 vp9_videotoolbox_hwaccel_select="vp9_decoder
"
3281 wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel
"
3282 wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel
"
3283 wmv3_d3d12va_hwaccel_select="vc1_d3d12va_hwaccel
"
3284 wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel
"
3285 wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel
"
3286 wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel
"
3287 wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel
"
3289 # hardware-accelerated codecs
3290 mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer
"
3291 omx_deps="libdl pthreads
"
3292 omx_rpi_select="omx
"
3297 vaapi_encode_deps="vaapi
"
3298 v4l2_m2m_deps="linux_videodev2_h sem_timedwait
"
3300 bilateral_cuda_filter_deps="ffnvcodec
"
3301 bilateral_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3302 chromakey_cuda_filter_deps="ffnvcodec
"
3303 chromakey_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3304 colorspace_cuda_filter_deps="ffnvcodec
"
3305 colorspace_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3306 hwupload_cuda_filter_deps="ffnvcodec
"
3307 scale_npp_filter_deps="ffnvcodec libnpp
"
3308 scale2ref_npp_filter_deps="ffnvcodec libnpp
"
3309 scale_cuda_filter_deps="ffnvcodec
"
3310 scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3311 thumbnail_cuda_filter_deps="ffnvcodec
"
3312 thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3313 transpose_npp_filter_deps="ffnvcodec libnpp
"
3314 overlay_cuda_filter_deps="ffnvcodec
"
3315 overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3316 sharpen_npp_filter_deps="ffnvcodec libnpp
"
3318 ddagrab_filter_deps="d3d11va IDXGIOutput1 DXGI_OUTDUPL_FRAME_INFO
"
3320 amf_deps_any="libdl LoadLibrary
"
3321 nvenc_deps="ffnvcodec
"
3322 nvenc_deps_any="libdl LoadLibrary
"
3324 aac_mf_encoder_deps="mediafoundation
"
3325 ac3_mf_encoder_deps="mediafoundation
"
3326 av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS
"
3327 av1_mediacodec_decoder_deps="mediacodec
"
3328 av1_mediacodec_encoder_deps="mediacodec
"
3329 av1_mediacodec_encoder_select="extract_extradata_bsf
"
3330 av1_nvenc_encoder_deps="nvenc NV_ENC_PIC_PARAMS_AV1
"
3331 av1_nvenc_encoder_select="atsc_a53
"
3332 h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m
"
3333 h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m
"
3334 h264_amf_encoder_deps="amf
"
3335 h264_cuvid_decoder_deps="cuvid
"
3336 h264_cuvid_decoder_select="h264_mp4toannexb_bsf
"
3337 h264_mediacodec_decoder_deps="mediacodec
"
3338 h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser
"
3339 h264_mediacodec_encoder_deps="mediacodec
"
3340 h264_mediacodec_encoder_select="extract_extradata_bsf h264_metadata
"
3341 h264_mf_encoder_deps="mediafoundation
"
3342 h264_mmal_decoder_deps="mmal
"
3343 h264_nvenc_encoder_deps="nvenc
"
3344 h264_nvenc_encoder_select="atsc_a53
"
3345 h264_omx_encoder_deps="omx
"
3346 h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec
"
3347 h264_qsv_encoder_select="atsc_a53 qsvenc
"
3348 h264_rkmpp_decoder_deps="rkmpp
"
3349 h264_rkmpp_decoder_select="h264_mp4toannexb_bsf
"
3350 h264_vaapi_encoder_select="atsc_a53 cbs_h264 vaapi_encode
"
3351 h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m
"
3352 h264_v4l2m2m_decoder_select="h264_mp4toannexb_bsf
"
3353 h264_v4l2m2m_encoder_deps="v4l2_m2m h264_v4l2_m2m
"
3354 hevc_amf_encoder_deps="amf
"
3355 hevc_cuvid_decoder_deps="cuvid
"
3356 hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf
"
3357 hevc_mediacodec_decoder_deps="mediacodec
"
3358 hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser
"
3359 hevc_mediacodec_encoder_deps="mediacodec
"
3360 hevc_mediacodec_encoder_select="extract_extradata_bsf hevc_metadata
"
3361 hevc_mf_encoder_deps="mediafoundation
"
3362 hevc_nvenc_encoder_deps="nvenc
"
3363 hevc_nvenc_encoder_select="atsc_a53
"
3364 hevc_qsv_decoder_select="hevc_mp4toannexb_bsf qsvdec
"
3365 hevc_qsv_encoder_select="hevcparse qsvenc
"
3366 hevc_rkmpp_decoder_deps="rkmpp
"
3367 hevc_rkmpp_decoder_select="hevc_mp4toannexb_bsf
"
3368 hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC
"
3369 hevc_vaapi_encoder_select="atsc_a53 cbs_h265 vaapi_encode
"
3370 hevc_v4l2m2m_decoder_deps="v4l2_m2m hevc_v4l2_m2m
"
3371 hevc_v4l2m2m_decoder_select="hevc_mp4toannexb_bsf
"
3372 hevc_v4l2m2m_encoder_deps="v4l2_m2m hevc_v4l2_m2m
"
3373 mjpeg_cuvid_decoder_deps="cuvid
"
3374 mjpeg_qsv_decoder_select="qsvdec
"
3375 mjpeg_qsv_encoder_deps="libmfx
"
3376 mjpeg_qsv_encoder_select="qsvenc
"
3377 mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG
"
3378 mjpeg_vaapi_encoder_select="cbs_jpeg jpegtables vaapi_encode
"
3379 mp3_mf_encoder_deps="mediafoundation
"
3380 mpeg1_cuvid_decoder_deps="cuvid
"
3381 mpeg1_v4l2m2m_decoder_deps="v4l2_m2m mpeg1_v4l2_m2m
"
3382 mpeg2_cuvid_decoder_deps="cuvid
"
3383 mpeg2_mmal_decoder_deps="mmal
"
3384 mpeg2_mediacodec_decoder_deps="mediacodec
"
3385 mpeg2_qsv_decoder_select="qsvdec
"
3386 mpeg2_qsv_encoder_select="qsvenc
"
3387 mpeg2_vaapi_encoder_select="cbs_mpeg2 vaapi_encode
"
3388 mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m
"
3389 mpeg4_cuvid_decoder_deps="cuvid
"
3390 mpeg4_mediacodec_decoder_deps="mediacodec
"
3391 mpeg4_mediacodec_encoder_deps="mediacodec
"
3392 mpeg4_mediacodec_encoder_select="extract_extradata_bsf
"
3393 mpeg4_mmal_decoder_deps="mmal
"
3394 mpeg4_omx_encoder_deps="omx
"
3395 mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m
"
3396 mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m
"
3397 vc1_cuvid_decoder_deps="cuvid
"
3398 vc1_mmal_decoder_deps="mmal
"
3399 vc1_qsv_decoder_select="qsvdec
"
3400 vc1_v4l2m2m_decoder_deps="v4l2_m2m vc1_v4l2_m2m
"
3401 vp8_cuvid_decoder_deps="cuvid
"
3402 vp8_mediacodec_decoder_deps="mediacodec
"
3403 vp8_mediacodec_encoder_deps="mediacodec
"
3404 vp8_qsv_decoder_select="qsvdec
"
3405 vp8_rkmpp_decoder_deps="rkmpp
"
3406 vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8
"
3407 vp8_vaapi_encoder_select="vaapi_encode
"
3408 vp8_v4l2m2m_decoder_deps="v4l2_m2m vp8_v4l2_m2m
"
3409 vp8_v4l2m2m_encoder_deps="v4l2_m2m vp8_v4l2_m2m
"
3410 vp9_cuvid_decoder_deps="cuvid
"
3411 vp9_mediacodec_decoder_deps="mediacodec
"
3412 vp9_mediacodec_encoder_deps="mediacodec
"
3413 vp9_qsv_decoder_select="qsvdec
"
3414 vp9_rkmpp_decoder_deps="rkmpp
"
3415 vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9
"
3416 vp9_vaapi_encoder_select="vaapi_encode
"
3417 vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9
"
3418 vp9_qsv_encoder_select="qsvenc
"
3419 vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m
"
3420 av1_qsv_decoder_select="qsvdec
"
3421 av1_qsv_encoder_select="qsvenc
"
3422 av1_qsv_encoder_deps="libvpl
"
3423 av1_amf_encoder_deps="amf
"
3424 av1_vaapi_encoder_deps="VAEncPictureParameterBufferAV1
"
3425 av1_vaapi_encoder_select="cbs_av1 vaapi_encode
"
3428 aac_parser_select="adts_header mpeg4audio
"
3429 av1_parser_select="cbs_av1
"
3430 evc_parser_select="evcparse
"
3431 ftr_parser_select="adts_header mpeg4audio
"
3432 h264_parser_select="golomb h264dsp h264parse h264_sei
"
3433 hevc_parser_select="hevcparse hevc_sei
"
3434 mpegaudio_parser_select="mpegaudioheader
"
3435 mpeg4video_parser_select="h263dsp mpegvideodec qpeldsp
"
3436 vc1_parser_select="vc1dsp
"
3437 vvc_parser_select="cbs_h266
"
3440 aac_adtstoasc_bsf_select="adts_header mpeg4audio
"
3441 av1_frame_merge_bsf_select="cbs_av1
"
3442 av1_frame_split_bsf_select="cbs_av1
"
3443 av1_metadata_bsf_select="cbs_av1
"
3444 dts2pts_bsf_select="cbs_h264 h264parse
"
3445 eac3_core_bsf_select="ac3_parser
"
3446 evc_frame_merge_bsf_select="evcparse
"
3447 filter_units_bsf_select="cbs
"
3448 h264_metadata_bsf_deps="const_nan
"
3449 h264_metadata_bsf_select="cbs_h264
"
3450 h264_redundant_pps_bsf_select="cbs_h264
"
3451 hevc_metadata_bsf_select="cbs_h265
"
3452 mjpeg2jpeg_bsf_select="jpegtables
"
3453 mpeg2_metadata_bsf_select="cbs_mpeg2
"
3454 trace_headers_bsf_select="cbs cbs_vp8
"
3455 vp9_metadata_bsf_select="cbs_vp9
"
3456 vvc_metadata_bsf_select="cbs_h266
"
3458 # external libraries
3459 aac_at_decoder_deps="audiotoolbox
"
3460 aac_at_decoder_select="aac_adtstoasc_bsf
"
3461 ac3_at_decoder_deps="audiotoolbox
"
3462 ac3_at_decoder_select="ac3_parser
"
3463 adpcm_ima_qt_at_decoder_deps="audiotoolbox
"
3464 alac_at_decoder_deps="audiotoolbox
"
3465 amr_nb_at_decoder_deps="audiotoolbox
"
3466 avisynth_deps_any="libdl LoadLibrary
"
3467 avisynth_demuxer_deps="avisynth
"
3468 avisynth_demuxer_select="riffdec
"
3469 eac3_at_decoder_deps="audiotoolbox
"
3470 eac3_at_decoder_select="ac3_parser
"
3471 gsm_ms_at_decoder_deps="audiotoolbox
"
3472 ilbc_at_decoder_deps="audiotoolbox
"
3473 mp1_at_decoder_deps="audiotoolbox
"
3474 mp2_at_decoder_deps="audiotoolbox
"
3475 mp3_at_decoder_deps="audiotoolbox
"
3476 mp1_at_decoder_select="mpegaudioheader
"
3477 mp2_at_decoder_select="mpegaudioheader
"
3478 mp3_at_decoder_select="mpegaudioheader
"
3479 pcm_alaw_at_decoder_deps="audiotoolbox
"
3480 pcm_mulaw_at_decoder_deps="audiotoolbox
"
3481 qdmc_at_decoder_deps="audiotoolbox
"
3482 qdm2_at_decoder_deps="audiotoolbox
"
3483 aac_at_encoder_deps="audiotoolbox
"
3484 aac_at_encoder_select="audio_frame_queue
"
3485 alac_at_encoder_deps="audiotoolbox
"
3486 alac_at_encoder_select="audio_frame_queue
"
3487 ilbc_at_encoder_deps="audiotoolbox
"
3488 ilbc_at_encoder_select="audio_frame_queue
"
3489 pcm_alaw_at_encoder_deps="audiotoolbox
"
3490 pcm_alaw_at_encoder_select="audio_frame_queue
"
3491 pcm_mulaw_at_encoder_deps="audiotoolbox
"
3492 pcm_mulaw_at_encoder_select="audio_frame_queue
"
3493 chromaprint_muxer_deps="chromaprint
"
3494 h264_videotoolbox_encoder_deps="pthreads
"
3495 h264_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder
"
3496 hevc_videotoolbox_encoder_deps="pthreads
"
3497 hevc_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder
"
3498 prores_videotoolbox_encoder_deps="pthreads
"
3499 prores_videotoolbox_encoder_select="videotoolbox_encoder
"
3500 libaom_av1_decoder_deps="libaom
"
3501 libaom_av1_encoder_deps="libaom
"
3502 libaom_av1_encoder_select="extract_extradata_bsf dovi_rpuenc
"
3503 libaribb24_decoder_deps="libaribb24
"
3504 libaribcaption_decoder_deps="libaribcaption
"
3505 libcelt_decoder_deps="libcelt
"
3506 libcodec2_decoder_deps="libcodec2
"
3507 libcodec2_encoder_deps="libcodec2
"
3508 libdav1d_decoder_deps="libdav1d
"
3509 libdav1d_decoder_select="atsc_a53 dovi_rpudec
"
3510 libdavs2_decoder_deps="libdavs2
"
3511 libdavs2_decoder_select="avs2_parser
"
3512 libfdk_aac_decoder_deps="libfdk_aac
"
3513 libfdk_aac_encoder_deps="libfdk_aac
"
3514 libfdk_aac_encoder_select="audio_frame_queue
"
3515 libgme_demuxer_deps="libgme
"
3516 libgsm_decoder_deps="libgsm
"
3517 libgsm_encoder_deps="libgsm
"
3518 libgsm_ms_decoder_deps="libgsm
"
3519 libgsm_ms_encoder_deps="libgsm
"
3520 libilbc_decoder_deps="libilbc
"
3521 libilbc_encoder_deps="libilbc
"
3522 libjxl_decoder_deps="libjxl libjxl_threads
"
3523 libjxl_encoder_deps="libjxl libjxl_threads
"
3524 libkvazaar_encoder_deps="libkvazaar
"
3525 liblc3_decoder_deps="liblc3
"
3526 liblc3_encoder_deps="liblc3
"
3527 liblc3_encoder_select="audio_frame_queue
"
3528 libmodplug_demuxer_deps="libmodplug
"
3529 libmp3lame_encoder_deps="libmp3lame
"
3530 libmp3lame_encoder_select="audio_frame_queue mpegaudioheader
"
3531 libopencore_amrnb_decoder_deps="libopencore_amrnb
"
3532 libopencore_amrnb_encoder_deps="libopencore_amrnb
"
3533 libopencore_amrnb_encoder_select="audio_frame_queue
"
3534 libopencore_amrwb_decoder_deps="libopencore_amrwb
"
3535 libopenh264_decoder_deps="libopenh264
"
3536 libopenh264_decoder_select="h264_mp4toannexb_bsf
"
3537 libopenh264_encoder_deps="libopenh264
"
3538 libopenjpeg_encoder_deps="libopenjpeg
"
3539 libopenmpt_demuxer_deps="libopenmpt
"
3540 libopus_decoder_deps="libopus
"
3541 libopus_encoder_deps="libopus
"
3542 libopus_encoder_select="audio_frame_queue
"
3543 librav1e_encoder_deps="librav1e
"
3544 librsvg_decoder_deps="librsvg
"
3545 libshine_encoder_deps="libshine
"
3546 libshine_encoder_select="audio_frame_queue mpegaudioheader
"
3547 libspeex_decoder_deps="libspeex
"
3548 libspeex_encoder_deps="libspeex
"
3549 libspeex_encoder_select="audio_frame_queue
"
3550 libsvtav1_encoder_deps="libsvtav1
"
3551 libsvtav1_encoder_select="dovi_rpuenc
"
3552 libtheora_encoder_deps="libtheora
"
3553 libtwolame_encoder_deps="libtwolame
"
3554 libuavs3d_decoder_deps="libuavs3d
"
3555 libvo_amrwbenc_encoder_deps="libvo_amrwbenc
"
3556 libvorbis_decoder_deps="libvorbis
"
3557 libvorbis_encoder_deps="libvorbis libvorbisenc
"
3558 libvorbis_encoder_select="audio_frame_queue
"
3559 libvpx_vp8_decoder_deps="libvpx
"
3560 libvpx_vp8_encoder_deps="libvpx
"
3561 libvpx_vp9_decoder_deps="libvpx
"
3562 libvpx_vp9_encoder_deps="libvpx
"
3563 libwebp_encoder_deps="libwebp
"
3564 libwebp_anim_encoder_deps="libwebp
"
3565 libx262_encoder_deps="libx262
"
3566 libx264_encoder_deps="libx264
"
3567 libx264_encoder_select="atsc_a53 golomb
"
3568 libx264rgb_encoder_deps="libx264
"
3569 libx264rgb_encoder_select="libx264_encoder
"
3570 libx265_encoder_deps="libx265
"
3571 libx265_encoder_select="atsc_a53 dovi_rpuenc
"
3572 libxavs_encoder_deps="libxavs
"
3573 libxavs2_encoder_deps="libxavs2
"
3574 libxevd_decoder_deps="libxevd
"
3575 libxeve_encoder_deps="libxeve
"
3576 libxvid_encoder_deps="libxvid
"
3577 libzvbi_teletext_decoder_deps="libzvbi
"
3578 vapoursynth_demuxer_deps="vapoursynth
"
3579 videotoolbox_suggest="coreservices
"
3580 videotoolbox_deps="corefoundation coremedia corevideo
"
3581 videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames
"
3584 ac3_demuxer_select="ac3_parser
"
3585 act_demuxer_select="riffdec
"
3586 adts_muxer_select="mpeg4audio
"
3587 aiff_muxer_select="iso_media
"
3588 amv_muxer_select="riffenc
"
3589 asf_demuxer_select="riffdec
"
3590 asf_o_demuxer_select="riffdec
"
3591 asf_muxer_select="riffenc
"
3592 asf_stream_muxer_select="asf_muxer
"
3593 av1_demuxer_select="av1_frame_merge_bsf av1_parser
"
3594 avi_demuxer_select="riffdec exif
"
3595 avi_muxer_select="riffenc
"
3596 avif_muxer_select="mov_muxer
"
3597 caf_demuxer_select="iso_media
"
3598 caf_muxer_select="iso_media
"
3599 dash_muxer_select="mp4_muxer
"
3600 dash_demuxer_deps="libxml2
"
3601 daud_muxer_select="pcm_rechunk_bsf
"
3602 dirac_demuxer_select="dirac_parser
"
3603 dts_demuxer_select="dca_parser
"
3604 dtshd_demuxer_select="dca_parser
"
3605 dv_demuxer_select="dvprofile
"
3606 dv_muxer_select="dvprofile
"
3607 dvdvideo_demuxer_select="mpegps_demuxer
"
3608 dvdvideo_demuxer_deps="libdvdnav libdvdread
"
3609 dxa_demuxer_select="riffdec
"
3610 eac3_demuxer_select="ac3_parser
"
3611 evc_demuxer_select="evc_frame_merge_bsf evc_parser
"
3612 f4v_muxer_select="mov_muxer
"
3613 fifo_muxer_deps="threads
"
3614 flac_demuxer_select="flac_parser
"
3615 flv_muxer_select="aac_adtstoasc_bsf iso_writer
"
3616 gxf_muxer_select="pcm_rechunk_bsf
"
3617 hds_muxer_select="flv_muxer
"
3618 hls_demuxer_select="aac_demuxer ac3_demuxer adts_header ac3_parser eac3_demuxer mov_demuxer mpegts_demuxer
"
3619 hls_muxer_select="mov_muxer mpegts_muxer
"
3620 iamf_demuxer_select="iamfdec
"
3621 iamf_muxer_select="iamfenc
"
3622 image2_alias_pix_demuxer_select="image2_demuxer
"
3623 image2_brender_pix_demuxer_select="image2_demuxer
"
3624 imf_demuxer_deps="libxml2
"
3625 imf_demuxer_select="mxf_demuxer
"
3626 ipod_muxer_select="mov_muxer
"
3627 ismv_muxer_select="mov_muxer
"
3628 ivf_muxer_select="av1_metadata_bsf vp9_superframe_bsf
"
3629 latm_muxer_select="aac_adtstoasc_bsf mpeg4audio
"
3630 matroska_audio_muxer_select="matroska_muxer
"
3631 matroska_demuxer_select="riffdec
"
3632 matroska_demuxer_suggest="bzlib zlib
"
3633 matroska_muxer_select="iso_writer mpeg4audio riffenc aac_adtstoasc_bsf pgs_frame_merge_bsf vp9_superframe_bsf
"
3634 mlp_demuxer_select="mlp_parser
"
3635 mmf_muxer_select="riffenc
"
3636 mov_demuxer_select="iso_media riffdec
"
3637 mov_demuxer_suggest="iamfdec zlib
"
3638 mov_muxer_select="iso_media iso_writer riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser
"
3639 mov_muxer_suggest="iamfenc
"
3640 mp3_demuxer_select="mpegaudio_parser
"
3641 mp3_muxer_select="mpegaudioheader
"
3642 mp4_muxer_select="mov_muxer
"
3643 mpegts_demuxer_select="iso_media
"
3644 mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf vvc_mp4toannexb_bsf
"
3645 mpegtsraw_demuxer_select="mpegts_demuxer
"
3646 mxf_muxer_select="iso_writer pcm_rechunk_bsf rangecoder
"
3647 mxf_d10_muxer_select="mxf_muxer
"
3648 mxf_opatom_muxer_select="mxf_muxer
"
3649 nut_muxer_select="riffenc
"
3650 nuv_demuxer_select="riffdec
"
3651 obu_demuxer_select="av1_frame_merge_bsf av1_parser
"
3652 obu_muxer_select="av1_metadata_bsf
"
3653 oga_muxer_select="ogg_muxer
"
3654 ogg_demuxer_select="dirac_parse
"
3655 ogv_muxer_select="ogg_muxer
"
3656 opus_muxer_select="ogg_muxer
"
3657 psp_muxer_select="mov_muxer
"
3658 rtp_demuxer_select="sdp_demuxer
"
3659 rtp_muxer_select="iso_writer
"
3660 rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer
"
3661 rtpdec_select="asf_demuxer mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp
"
3662 rtsp_demuxer_select="http_protocol rtpdec
"
3663 rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain
"
3664 sap_demuxer_select="sdp_demuxer
"
3665 sap_muxer_select="rtp_muxer rtp_protocol rtpenc_chain
"
3666 sdp_demuxer_select="rtpdec
"
3667 smoothstreaming_muxer_select="ismv_muxer
"
3668 spdif_demuxer_select="adts_header
"
3669 spdif_muxer_select="adts_header
"
3670 spx_muxer_select="ogg_muxer
"
3671 swf_demuxer_suggest="zlib
"
3672 tak_demuxer_select="tak_parser
"
3673 truehd_demuxer_select="mlp_parser
"
3674 tg2_muxer_select="mov_muxer
"
3675 tgp_muxer_select="mov_muxer
"
3676 vobsub_demuxer_select="mpegps_demuxer
"
3677 w64_demuxer_select="wav_demuxer
"
3678 w64_muxer_select="wav_muxer
"
3679 wav_demuxer_select="riffdec
"
3680 wav_muxer_select="riffenc
"
3681 webm_chunk_muxer_select="webm_muxer
"
3682 webm_dash_manifest_demuxer_select="matroska_demuxer
"
3683 wtv_demuxer_select="mpegts_demuxer riffdec
"
3684 wtv_muxer_select="mpegts_muxer riffenc
"
3685 xmv_demuxer_select="riffdec
"
3686 xwma_demuxer_select="riffdec
"
3689 android_camera_indev_deps="android camera2ndk mediandk pthreads
"
3690 alsa_indev_deps="alsa
"
3691 alsa_outdev_deps="alsa
"
3692 avfoundation_indev_deps="avfoundation corevideo coremedia pthreads
"
3693 avfoundation_indev_suggest="coregraphics applicationservices
"
3694 avfoundation_indev_extralibs="-framework Foundation
"
3695 audiotoolbox_outdev_deps="audiotoolbox pthreads
"
3696 audiotoolbox_outdev_extralibs="-framework AudioToolbox
-framework CoreAudio
"
3697 bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h
"
3698 caca_outdev_deps="libcaca
"
3699 decklink_deps_any="libdl LoadLibrary
"
3700 decklink_indev_deps="decklink threads
"
3701 decklink_indev_extralibs="-lstdc++"
3702 decklink_indev_suggest="libzvbi
"
3703 decklink_outdev_deps="decklink threads
"
3704 decklink_outdev_suggest="libklvanc
"
3705 decklink_outdev_extralibs="-lstdc++"
3706 dshow_indev_deps="IBaseFilter
"
3707 dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid -loleaut32 -lshlwapi"
3708 fbdev_indev_deps="linux_fb_h
"
3709 fbdev_outdev_deps="linux_fb_h
"
3710 gdigrab_indev_deps="CreateDIBSection
"
3711 gdigrab_indev_extralibs="-lgdi32"
3712 gdigrab_indev_select="bmp_decoder
"
3713 iec61883_indev_deps="libiec61883
"
3714 iec61883_indev_select="dv_demuxer
"
3715 jack_indev_deps="libjack
"
3716 jack_indev_deps_any="sem_timedwait dispatch_dispatch_h
"
3717 kmsgrab_indev_deps="libdrm
"
3718 lavfi_indev_deps="avfilter
"
3719 libcdio_indev_deps="libcdio
"
3720 libdc1394_indev_deps="libdc1394
"
3721 openal_indev_deps="openal
"
3722 opengl_outdev_deps="opengl
"
3723 opengl_outdev_suggest="sdl2
"
3724 oss_indev_deps_any="sys_soundcard_h
"
3725 oss_outdev_deps_any="sys_soundcard_h
"
3726 pulse_indev_deps="libpulse
"
3727 pulse_outdev_deps="libpulse
"
3728 sdl2_outdev_deps="sdl2
"
3729 sndio_indev_deps="sndio
"
3730 sndio_outdev_deps="sndio
"
3731 v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h
"
3732 v4l2_indev_suggest="libv4l2
"
3733 v4l2_outdev_deps_any="linux_videodev2_h sys_videoio_h
"
3734 v4l2_outdev_suggest="libv4l2
"
3735 vfwcap_indev_deps="vfw32 vfwcap_defines
"
3736 xcbgrab_indev_deps="libxcb
"
3737 xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes
"
3738 xv_outdev_deps="xlib_xv xlib_x11 xlib_xext
"
3741 android_content_protocol_deps="jni
"
3742 android_content_protocol_select="file_protocol
"
3743 async_protocol_deps="threads
"
3744 bluray_protocol_deps="libbluray
"
3745 ffrtmpcrypt_protocol_conflict="librtmp_protocol
"
3746 ffrtmpcrypt_protocol_deps_any="gcrypt gmp openssl mbedtls
"
3747 ffrtmpcrypt_protocol_select="tcp_protocol
"
3748 ffrtmphttp_protocol_conflict="librtmp_protocol
"
3749 ffrtmphttp_protocol_select="http_protocol
"
3750 ftp_protocol_select="tcp_protocol
"
3751 gopher_protocol_select="tcp_protocol
"
3752 gophers_protocol_select="tls_protocol
"
3753 http_protocol_select="tcp_protocol
"
3754 http_protocol_suggest="zlib
"
3755 httpproxy_protocol_select="tcp_protocol
"
3756 httpproxy_protocol_suggest="zlib
"
3757 https_protocol_select="tls_protocol
"
3758 https_protocol_suggest="zlib
"
3759 icecast_protocol_select="http_protocol
"
3760 mmsh_protocol_select="http_protocol
"
3761 mmst_protocol_select="network
"
3762 rtmp_protocol_conflict="librtmp_protocol
"
3763 rtmp_protocol_select="tcp_protocol
"
3764 rtmp_protocol_suggest="zlib
"
3765 rtmpe_protocol_select="ffrtmpcrypt_protocol
"
3766 rtmpe_protocol_suggest="zlib
"
3767 rtmps_protocol_conflict="librtmp_protocol
"
3768 rtmps_protocol_select="tls_protocol
"
3769 rtmps_protocol_suggest="zlib
"
3770 rtmpt_protocol_select="ffrtmphttp_protocol
"
3771 rtmpt_protocol_suggest="zlib
"
3772 rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol
"
3773 rtmpte_protocol_suggest="zlib
"
3774 rtmpts_protocol_select="ffrtmphttp_protocol https_protocol
"
3775 rtmpts_protocol_suggest="zlib
"
3776 rtp_protocol_select="udp_protocol
"
3777 schannel_conflict="openssl gnutls libtls mbedtls
"
3778 sctp_protocol_deps="struct_sctp_event_subscribe struct_msghdr_msg_flags
"
3779 sctp_protocol_select="network
"
3780 securetransport_conflict="openssl gnutls libtls mbedtls
"
3781 srtp_protocol_select="rtp_protocol srtp
"
3782 tcp_protocol_select="network
"
3783 tls_protocol_deps_any="gnutls openssl schannel securetransport libtls mbedtls
"
3784 tls_protocol_select="tcp_protocol
"
3785 udp_protocol_select="network
"
3786 udplite_protocol_select="network
"
3787 unix_protocol_deps="sys_un_h
"
3788 unix_protocol_select="network
"
3789 ipfs_gateway_protocol_select="https_protocol
"
3790 ipns_gateway_protocol_select="https_protocol
"
3792 # external library protocols
3793 libamqp_protocol_deps="librabbitmq
"
3794 libamqp_protocol_select="network
"
3795 librist_protocol_deps="librist
"
3796 librist_protocol_select="network
"
3797 librtmp_protocol_deps="librtmp
"
3798 librtmpe_protocol_deps="librtmp
"
3799 librtmps_protocol_deps="librtmp
"
3800 librtmpt_protocol_deps="librtmp
"
3801 librtmpte_protocol_deps="librtmp
"
3802 libsmbclient_protocol_deps="libsmbclient gplv3
"
3803 libsrt_protocol_deps="libsrt
"
3804 libsrt_protocol_select="network
"
3805 libssh_protocol_deps="libssh
"
3806 libtls_conflict="openssl gnutls mbedtls
"
3807 libzmq_protocol_deps="libzmq
"
3808 libzmq_protocol_select="network
"
3811 ametadata_filter_deps="avformat
"
3812 amovie_filter_deps="avcodec avformat
"
3813 aresample_filter_deps="swresample
"
3814 asr_filter_deps="pocketsphinx
"
3815 ass_filter_deps="libass
"
3816 avgblur_opencl_filter_deps="opencl
"
3817 avgblur_vulkan_filter_deps="vulkan spirv_compiler
"
3818 azmq_filter_deps="libzmq
"
3819 blackframe_filter_deps="gpl
"
3820 blend_vulkan_filter_deps="vulkan spirv_compiler
"
3821 boxblur_filter_deps="gpl
"
3822 boxblur_opencl_filter_deps="opencl gpl
"
3823 bs2b_filter_deps="libbs2b
"
3824 bwdif_cuda_filter_deps="ffnvcodec
"
3825 bwdif_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3826 bwdif_vulkan_filter_deps="vulkan spirv_compiler
"
3827 chromaber_vulkan_filter_deps="vulkan spirv_compiler
"
3828 color_vulkan_filter_deps="vulkan spirv_compiler
"
3829 colorkey_opencl_filter_deps="opencl
"
3830 colormatrix_filter_deps="gpl
"
3831 convolution_opencl_filter_deps="opencl
"
3832 coreimage_filter_deps="coreimage appkit
"
3833 coreimage_filter_extralibs="-framework OpenGL
"
3834 coreimagesrc_filter_deps="coreimage appkit
"
3835 coreimagesrc_filter_extralibs="-framework OpenGL
"
3836 cover_rect_filter_deps="avcodec avformat gpl
"
3837 cropdetect_filter_deps="gpl
"
3838 deinterlace_qsv_filter_deps="libmfx
"
3839 deinterlace_qsv_filter_select="qsvvpp
"
3840 deinterlace_vaapi_filter_deps="vaapi
"
3841 delogo_filter_deps="gpl
"
3842 denoise_vaapi_filter_deps="vaapi
"
3843 derain_filter_select="dnn
"
3844 deshake_filter_select="pixelutils
"
3845 deshake_opencl_filter_deps="opencl
"
3846 dilation_opencl_filter_deps="opencl
"
3847 dnn_classify_filter_select="dnn
"
3848 dnn_detect_filter_select="dnn
"
3849 dnn_processing_filter_select="dnn
"
3850 drawtext_filter_deps="libfreetype libharfbuzz
"
3851 drawtext_filter_suggest="libfontconfig libfribidi
"
3852 elbg_filter_deps="avcodec
"
3853 eq_filter_deps="gpl
"
3854 erosion_opencl_filter_deps="opencl
"
3855 find_rect_filter_deps="avcodec avformat gpl
"
3856 flip_vulkan_filter_deps="vulkan spirv_compiler
"
3857 flite_filter_deps="libflite threads
"
3858 framerate_filter_select="scene_sad
"
3859 freezedetect_filter_select="scene_sad
"
3860 frei0r_deps_any="libdl LoadLibrary
"
3861 frei0r_filter_deps="frei0r
"
3862 frei0r_src_filter_deps="frei0r
"
3863 fspp_filter_deps="gpl
"
3864 fsync_filter_deps="avformat
"
3865 gblur_vulkan_filter_deps="vulkan spirv_compiler
"
3866 hflip_vulkan_filter_deps="vulkan spirv_compiler
"
3867 histeq_filter_deps="gpl
"
3868 hqdn3d_filter_deps="gpl
"
3869 iccdetect_filter_deps="lcms2
"
3870 iccgen_filter_deps="lcms2
"
3871 identity_filter_select="scene_sad
"
3872 interlace_filter_deps="gpl
"
3873 kerndeint_filter_deps="gpl
"
3874 ladspa_filter_deps="ladspa libdl
"
3875 lensfun_filter_deps="liblensfun version3
"
3876 libplacebo_filter_deps="libplacebo vulkan
"
3877 lv2_filter_deps="lv2
"
3878 mcdeint_filter_deps="avcodec gpl
"
3879 metadata_filter_deps="avformat
"
3880 movie_filter_deps="avcodec avformat
"
3881 mpdecimate_filter_deps="gpl
"
3882 mpdecimate_filter_select="pixelutils
"
3883 minterpolate_filter_select="scene_sad
"
3884 mptestsrc_filter_deps="gpl
"
3885 negate_filter_deps="lut_filter
"
3886 nlmeans_opencl_filter_deps="opencl
"
3887 nlmeans_vulkan_filter_deps="vulkan spirv_compiler
"
3888 nnedi_filter_deps="gpl
"
3889 ocr_filter_deps="libtesseract
"
3890 ocv_filter_deps="libopencv
"
3891 openclsrc_filter_deps="opencl
"
3892 qrencode_filter_deps="libqrencode
"
3893 qrencodesrc_filter_deps="libqrencode
"
3894 quirc_filter_deps="libquirc
"
3895 overlay_opencl_filter_deps="opencl
"
3896 overlay_qsv_filter_deps="libmfx
"
3897 overlay_qsv_filter_select="qsvvpp
"
3898 overlay_vaapi_filter_deps="vaapi VAProcPipelineCaps_blend_flags
"
3899 overlay_vulkan_filter_deps="vulkan spirv_compiler
"
3900 owdenoise_filter_deps="gpl
"
3901 pad_opencl_filter_deps="opencl
"
3902 pan_filter_deps="swresample
"
3903 perspective_filter_deps="gpl
"
3904 phase_filter_deps="gpl
"
3905 pp7_filter_deps="gpl
"
3906 pp_filter_deps="gpl postproc
"
3907 prewitt_opencl_filter_deps="opencl
"
3908 procamp_vaapi_filter_deps="vaapi
"
3909 program_opencl_filter_deps="opencl
"
3910 pullup_filter_deps="gpl
"
3911 remap_opencl_filter_deps="opencl
"
3912 removelogo_filter_deps="avcodec avformat swscale
"
3913 repeatfields_filter_deps="gpl
"
3914 roberts_opencl_filter_deps="opencl
"
3915 rubberband_filter_deps="librubberband
"
3916 sab_filter_deps="gpl swscale
"
3917 scale2ref_filter_deps="swscale
"
3918 scale_filter_deps="swscale
"
3919 scale_qsv_filter_deps="libmfx
"
3920 scale_qsv_filter_select="qsvvpp
"
3921 scdet_filter_select="scene_sad
"
3922 select_filter_select="scene_sad
"
3923 sharpness_vaapi_filter_deps="vaapi
"
3924 showcqt_filter_deps="avformat swscale
"
3925 showcqt_filter_suggest="libfontconfig libfreetype
"
3926 signature_filter_deps="gpl avcodec avformat
"
3927 smartblur_filter_deps="gpl swscale
"
3928 sobel_opencl_filter_deps="opencl
"
3929 sofalizer_filter_deps="libmysofa
"
3930 spp_filter_deps="gpl avcodec
"
3931 spp_filter_select="idctdsp fdctdsp me_cmp pixblockdsp
"
3932 sr_filter_deps="avformat swscale
"
3933 sr_filter_select="dnn
"
3934 stereo3d_filter_deps="gpl
"
3935 subtitles_filter_deps="avformat avcodec libass
"
3936 super2xsai_filter_deps="gpl
"
3937 pixfmts_super2xsai_test_deps="super2xsai_filter
"
3938 tinterlace_filter_deps="gpl
"
3939 tinterlace_merge_test_deps="tinterlace_filter
"
3940 tinterlace_pad_test_deps="tinterlace_filter
"
3941 tonemap_filter_deps="const_nan
"
3942 tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping
"
3943 tonemap_opencl_filter_deps="opencl const_nan
"
3944 transpose_opencl_filter_deps="opencl
"
3945 transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags
"
3946 transpose_vt_filter_deps="videotoolbox VTPixelRotationSessionCreate
"
3947 transpose_vulkan_filter_deps="vulkan spirv_compiler
"
3948 unsharp_opencl_filter_deps="opencl
"
3949 uspp_filter_deps="gpl avcodec
"
3950 vaguedenoiser_filter_deps="gpl
"
3951 vflip_vulkan_filter_deps="vulkan spirv_compiler
"
3952 vidstabdetect_filter_deps="libvidstab
"
3953 vidstabtransform_filter_deps="libvidstab
"
3954 libvmaf_filter_deps="libvmaf
"
3955 libvmaf_cuda_filter_deps="libvmaf libvmaf_cuda ffnvcodec
"
3956 zmq_filter_deps="libzmq
"
3957 zoompan_filter_deps="swscale
"
3958 zscale_filter_deps="libzimg const_nan
"
3959 scale_vaapi_filter_deps="vaapi
"
3960 scale_vt_filter_deps="videotoolbox VTPixelTransferSessionCreate
"
3961 scale_vulkan_filter_deps="vulkan spirv_compiler
"
3962 vpp_qsv_filter_deps="libmfx
"
3963 vpp_qsv_filter_select="qsvvpp
"
3964 xfade_opencl_filter_deps="opencl
"
3965 xfade_vulkan_filter_deps="vulkan spirv_compiler
"
3966 yadif_cuda_filter_deps="ffnvcodec
"
3967 yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm
"
3968 yadif_videotoolbox_filter_deps="metal corevideo videotoolbox
"
3969 hstack_vaapi_filter_deps="vaapi_1
"
3970 vstack_vaapi_filter_deps="vaapi_1
"
3971 xstack_vaapi_filter_deps="vaapi_1
"
3972 hstack_qsv_filter_deps="libmfx
"
3973 hstack_qsv_filter_select="qsvvpp
"
3974 vstack_qsv_filter_deps="libmfx
"
3975 vstack_qsv_filter_select="qsvvpp
"
3976 xstack_qsv_filter_deps="libmfx
"
3977 xstack_qsv_filter_select="qsvvpp
"
3978 pad_vaapi_filter_deps="vaapi_1
"
3979 drawbox_vaapi_filter_deps="vaapi_1
"
3982 avio_http_serve_files_deps="avformat avutil fork
"
3983 avio_list_dir_deps="avformat avutil
"
3984 avio_read_callback_deps="avformat avcodec avutil
"
3985 decode_audio_example_deps="avcodec avutil
"
3986 decode_filter_audio_example_deps="avfilter avcodec avformat avutil
"
3987 decode_filter_video_example_deps="avfilter avcodec avformat avutil
"
3988 decode_video_example_deps="avcodec avutil
"
3989 demux_decode_example_deps="avcodec avformat avutil
"
3990 encode_audio_example_deps="avcodec avutil
"
3991 encode_video_example_deps="avcodec avutil
"
3992 extract_mvs_example_deps="avcodec avformat avutil
"
3993 filter_audio_example_deps="avfilter avutil
"
3994 hw_decode_example_deps="avcodec avformat avutil
"
3995 mux_example_deps="avcodec avformat avutil swscale
"
3996 qsv_decode_example_deps="avcodec avutil libmfx h264_qsv_decoder
"
3997 remux_example_deps="avcodec avformat avutil
"
3998 resample_audio_example_deps="avutil swresample
"
3999 scale_video_example_deps="avutil swscale
"
4000 show_metadata_example_deps="avformat avutil
"
4001 transcode_aac_example_deps="avcodec avformat swresample
"
4002 transcode_example_deps="avfilter avcodec avformat avutil
"
4003 vaapi_encode_example_deps="avcodec avutil h264_vaapi_encoder
"
4004 vaapi_transcode_example_deps="avcodec avformat avutil h264_vaapi_encoder
"
4005 qsv_transcode_example_deps="avcodec avformat avutil h264_qsv_encoder
"
4008 cpu_init_extralibs="pthreads_extralibs
"
4009 cws2fws_extralibs="zlib_extralibs
"
4011 # libraries, in any order
4012 avcodec_deps="avutil
"
4013 avcodec_suggest="libm stdatomic
"
4014 avdevice_deps="avformat avcodec avutil
"
4015 avdevice_suggest="libm stdatomic
"
4016 avfilter_deps="avutil
"
4017 avfilter_suggest="libm stdatomic
"
4018 avformat_deps="avcodec avutil
"
4019 avformat_suggest="libm network zlib stdatomic
"
4020 avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx opencl openssl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic
"
4021 postproc_deps="avutil gpl
"
4022 postproc_suggest="libm stdatomic
"
4023 swresample_deps="avutil
"
4024 swresample_suggest="libm libsoxr stdatomic
"
4025 swscale_deps="avutil
"
4026 swscale_suggest="libm stdatomic
"
4028 avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs lcms2_extralibs
"
4029 avfilter_extralibs="pthreads_extralibs
"
4030 avutil_extralibs="d3d11va_extralibs d3d12va_extralibs mediacodec_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vaapi_win32_extralibs vdpau_x11_extralibs
"
4033 ffmpeg_deps="avcodec avfilter avformat threads
"
4034 ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter
4035 hflip_filter null_filter
4036 transpose_filter trim_filter vflip_filter
"
4037 ffmpeg_suggest="ole32 psapi shell32
"
4038 ffplay_deps="avcodec avformat avfilter swscale swresample sdl2
"
4039 ffplay_select="crop_filter transpose_filter hflip_filter vflip_filter rotate_filter
"
4040 ffplay_suggest="shell32 libplacebo vulkan
"
4041 ffprobe_deps="avcodec avformat
"
4042 ffprobe_suggest="shell32
"
4045 podpages_deps="perl
"
4046 manpages_deps="perl pod2man
"
4047 htmlpages_deps="perl
"
4048 htmlpages_deps_any="makeinfo_html texi2html
"
4049 txtpages_deps="perl makeinfo
"
4050 doc_deps_any="manpages htmlpages podpages txtpages
"
4052 # default parameters
4054 logfile="ffbuild
/config.log
"
4056 # installation paths
4057 prefix_default="/usr
/local"
4058 bindir_default='${prefix}/bin'
4059 datadir_default='${prefix}/share/ffmpeg'
4060 docdir_default='${prefix}/share/doc/ffmpeg'
4061 incdir_default='${prefix}/include'
4062 libdir_default='${prefix}/lib'
4063 mandir_default='${prefix}/share/man'
4069 stdcxx_default="c
++11"
4071 host_cc_default="gcc
"
4072 doxygen_default="doxygen
"
4074 ln_s_default="ln -s -f"
4075 metalcc_default="xcrun
-sdk macosx metal
"
4076 metallib_default="xcrun
-sdk macosx metallib
"
4078 pkg_config_default=pkg-config
4079 ranlib_default="ranlib
"
4080 strip_default="strip
"
4081 version_script='--version-script'
4083 x86asmexe_default="nasm
"
4084 windres_default="windres
"
4088 target_os_default=$(tolower $(uname -s))
4089 host_os=$target_os_default
4092 if test "$target_os_default" = aix; then
4093 arch_default=$(uname -p)
4094 strip_default="strip
-X32_64"
4095 nm_default="nm
-g -X32_64"
4097 arch_default=$(uname -m)
4102 # configurable options
4103 enable $PROGRAM_LIST
4104 enable $DOCUMENT_LIST
4105 enable $EXAMPLE_LIST
4106 enable $LIBRARY_LIST
4108 enable version_tracking
4113 enable faan faandct faanidct
4116 enable optimizations
4117 enable ptx_compression
4118 enable runtime_cpudetect
4119 enable safe_bitstream_reader
4121 enable swscale_alpha
4122 enable valgrind_backtrace
4124 sws_max_filter_size_default=256
4125 set_default sws_max_filter_size
4127 # internal components are enabled by default
4128 enable $EXTRALIBS_LIST
4130 # Avoid external, non-system, libraries getting enabled by dependency resolution
4131 disable $EXTERNAL_LIBRARY_LIST $HWACCEL_LIBRARY_LIST
4134 SHFLAGS='-shared -Wl,-soname,$$(@F)'
4137 FULLNAME='$(NAME)$(BUILDSUF)'
4138 LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
4141 SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
4142 SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
4143 SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
4144 LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$
(LIBDIR
)/$
(LIBNAME
)"'
4145 SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
4146 SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
4147 VERSION_SCRIPT_POSTPROCESS_CMD="cat"
4174 host_extralibs='-lm'
4175 host_cflags_filter=echo
4176 host_ldflags_filter=echo
4178 target_path='$(CURDIR)'
4180 # since the object filename is not given with the -MM flag, the compiler
4181 # is only able to print the basename, and we must add the path ourselves
4182 DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>/dev/null | sed -e "/^\
#.*/d" -e "s,^[[:space:]]*$(@F),$(@D)/$(@F)," > $(@:.o=.d)'
4188 if test -f configure
; then
4190 elif test -f src
/configure
; then
4193 source_path
=$
(cd $
(dirname "$0"); pwd)
4194 case "$source_path" in
4195 *[[:blank
:]]*) die
"Out of tree builds are impossible with whitespace in source path." ;;
4197 test -e "$source_path/config.h" &&
4198 die
"Out of tree builds are impossible with config.h in source dir."
4205 FFMPEG_CONFIGURATION
="${FFMPEG_CONFIGURATION# } ${l}${r}"
4208 find_things_extern
(){
4211 file=$source_path/$3
4213 sed -n "s/^[^#]*extern.*$pattern *ff_\([^ ]*\)_$thing;/\1_$out/p" "$file"
4216 find_filters_extern
(){
4217 file=$source_path/$1
4218 sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file
4221 FILTER_LIST
=$
(find_filters_extern libavfilter
/allfilters.c
)
4222 OUTDEV_LIST
=$
(find_things_extern muxer FFOutputFormat libavdevice
/alldevices.c outdev
)
4223 INDEV_LIST
=$
(find_things_extern demuxer FFInputFormat libavdevice
/alldevices.c indev
)
4224 MUXER_LIST
=$
(find_things_extern muxer FFOutputFormat libavformat
/allformats.c
)
4225 DEMUXER_LIST
=$
(find_things_extern demuxer FFInputFormat libavformat
/allformats.c
)
4226 ENCODER_LIST
=$
(find_things_extern encoder FFCodec libavcodec
/allcodecs.c
)
4227 DECODER_LIST
=$
(find_things_extern decoder FFCodec libavcodec
/allcodecs.c
)
4232 PARSER_LIST
=$
(find_things_extern parser AVCodecParser libavcodec
/parsers.c
)
4233 BSF_LIST
=$
(find_things_extern bsf FFBitStreamFilter libavcodec
/bitstream_filters.c
)
4234 HWACCEL_LIST
=$
(find_things_extern hwaccel FFHWAccel libavcodec
/hwaccels.h
)
4235 PROTOCOL_LIST
=$
(find_things_extern protocol URLProtocol libavformat
/protocols.c
)
4237 AVCODEC_COMPONENTS_LIST
="
4245 AVDEVICE_COMPONENTS_LIST
="
4250 AVFILTER_COMPONENTS_LIST
="
4254 AVFORMAT_COMPONENTS_LIST
="
4261 $AVCODEC_COMPONENTS_LIST
4262 $AVDEVICE_COMPONENTS_LIST
4263 $AVFILTER_COMPONENTS_LIST
4264 $AVFORMAT_COMPONENTS_LIST
4267 for n
in $COMPONENT_LIST; do
4268 v
=$
(toupper
${n%s})_LIST
4270 eval ${n}_if_any
="\$$v"
4273 enable $ARCH_EXT_LIST
4276 echo "Unknown option \"$1\"."
4277 echo "See $0 --help for available options."
4281 print_in_columns
() {
4282 tr ' ' '\n' |
sort |
tr '\r\n' ' ' |
awk -v col_width
=24 -v width
="$ncols" '
4284 num_cols = width > col_width ? int(width / col_width) : 1;
4285 num_rows = int((NF + num_cols-1) / num_cols);
4287 for (y = 1; y <= num_rows; y++) {
4289 for (x = 1; x <= num_cols; x++) {
4291 line = sprintf("%s%-" col_width "s", line, $i);
4295 print line; line = "";
4303 echo $
* |
sed s
/$suffix//g | print_in_columns
4315 is_in
${comp} $COMPONENT_LIST && eval comp
=\$$
(toupper
${comp%s})_LIST
4316 echo "prob ${prob:-0.5}"
4324 random_seed
=$
(awk "BEGIN { srand($random_seed); print srand() }")
4325 $action $
(rand_list
"$@" |
awk "BEGIN { srand($random_seed) } \$1 == \"prob\" { prob = \$2; next } rand() < prob { print }")
4334 --extra-ldexeflags=*)
4335 add_ldexeflags
$optval
4337 --extra-ldsoflags=*)
4338 add_ldsoflags
$optval
4340 --extra-ldlibflags=*)
4341 warn
"The --extra-ldlibflags option is only provided for compatibility and will be\n"\
4342 "removed in the future. Use --extra-ldsoflags instead."
4343 add_ldsoflags
$optval
4346 add_extralibs
$optval
4349 disable
$INDEV_LIST $OUTDEV_LIST
4352 debuglevel
="$optval"
4355 disable
$PROGRAM_LIST
4357 --disable-everything)
4358 map
'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
4361 map
'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
4362 disable
$LIBRARY_LIST $PROGRAM_LIST doc
4365 --enable-random|
--disable-random)
4366 action
=${opt%%-random}
4367 do_random
${action#--} $COMPONENT_LIST
4369 --enable-random=*|
--disable-random=*)
4370 action
=${opt%%-random=*}
4371 do_random
${action#--} $optval
4377 lto
=-f${opt#--enable-}
4379 --enable-*=*|
--disable-*=*)
4380 eval $
(echo "${opt%%=*}" |
sed 's/--/action=/;s/-/ thing=/')
4381 is_in
"${thing}s" $COMPONENT_LIST || die_unknown
"$opt"
4382 eval list
=\$$
(toupper
$thing)_LIST
4383 name
=$
(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
4384 list=$(filter "$name" $list)
4385 [ "$list" = "" ] && warn "Option
$opt did not match anything
"
4386 test $action = enable && warn_if_gets_disabled $list
4389 --enable-yasm|--disable-yasm)
4390 warn "The
${opt} option is only provided
for compatibility and will be
\n"\
4391 "removed
in the future. Use
--enable-x86asm / --disable-x86asm instead.
"
4392 test $opt = --enable-yasm && x86asm=yes || x86asm=no
4395 warn "The
--yasmexe option is only provided
for compatibility and will be
\n"\
4396 "removed
in the future. Use
--x86asmexe instead.
"
4399 --enable-?*|--disable-?*)
4400 eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
4401 if is_in $option $COMPONENT_LIST; then
4402 test $action = disable && action=unset
4403 eval $action \$$(toupper ${option%s})_LIST
4404 elif is_in $option $CMDLINE_SELECT; then
4411 NAME="${opt#--list-}"
4412 is_in $NAME $COMPONENT_LIST || die_unknown $opt
4414 eval show_list $NAME \$$(toupper $NAME)_LIST
4416 --help|-h) show_help
4418 --quiet|-q) quiet=yes
4420 --fatal-warnings) enable fatal_warnings
4423 libfuzzer_path="$optval"
4426 optname="${opt%%=*}"
4427 optname="${optname#--}"
4428 optname=$(echo "$optname" | sed 's/-/_/g')
4429 if is_in $optname $CMDLINE_SET; then
4430 eval $optname='$optval'
4431 elif is_in $optname $CMDLINE_APPEND; then
4432 append $optname "$optval"
4444 if disabled autodetect; then
4446 # Unless iconv is explicitely disabled by the user, we still want to probe
4447 # for the iconv from the libc.
4448 disabled iconv || enable libc_iconv
4450 disable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
4451 disable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
4453 # Mark specifically enabled, but normally autodetected libraries as requested.
4454 for lib in $AUTODETECT_LIBS; do
4455 enabled $lib && request $lib
4457 #TODO: switch to $AUTODETECT_LIBS when $THREADS_LIST is supported the same way
4458 enable_weak $EXTERNAL_AUTODETECT_LIBRARY_LIST
4459 enable_weak $HWACCEL_AUTODETECT_LIBRARY_LIST
4461 disabled logging && logfile=/dev/null
4463 # command line configuration sanity checks
4465 # we need to build at least one lib type
4466 if ! enabled_any static shared; then
4468 At least one library type must be built.
4469 Specify --enable-static to build the static libraries or --enable-shared to
4470 build the shared libraries as well. To only build the shared libraries specify
4471 --disable-static in addition to --enable-shared.
4476 die_license_disabled() {
4477 enabled $1 || { enabled $v && die "$v is
$1 and
--enable-$1 is not specified.
"; }
4480 die_license_disabled_gpl() {
4481 enabled $1 || { enabled $v && die "$v is incompatible with the gpl and
--enable-$1 is not specified.
"; }
4484 map "die_license_disabled gpl
" $EXTERNAL_LIBRARY_GPL_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
4485 map "die_license_disabled version3
" $EXTERNAL_LIBRARY_VERSION3_LIST $EXTERNAL_LIBRARY_GPLV3_LIST
4487 enabled gpl && map "die_license_disabled_gpl nonfree
" $EXTERNAL_LIBRARY_NONFREE_LIST
4488 map "die_license_disabled nonfree
" $HWACCEL_LIBRARY_NONFREE_LIST
4490 enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
4492 if enabled nonfree; then
4493 license="nonfree and unredistributable
"
4494 elif enabled gplv3; then
4495 license="GPL version
3 or later
"
4496 elif enabled lgplv3; then
4497 license="LGPL version
3 or later
"
4498 elif enabled gpl; then
4499 license="GPL version
2 or later
"
4501 license="LGPL version
2.1 or later
"
4504 enabled_all gnutls openssl &&
4505 die "GnuTLS and OpenSSL must not be enabled
at the same
time.
"
4507 enabled_all gnutls mbedtls &&
4508 die "GnuTLS and mbedTLS must not be enabled
at the same
time.
"
4510 enabled_all openssl mbedtls &&
4511 die "OpenSSL and mbedTLS must not be enabled
at the same
time.
"
4513 # Disable all the library-specific components if the library itself
4514 # is disabled, see AVCODEC_LIST and following _LIST variables.
4516 disable_components(){
4517 disabled ${1} && disable $(
4518 eval components="\$$
(toupper
${1})_COMPONENTS
"
4519 map 'eval echo \${$(toupper ${v%s})_LIST}' $components
4523 map 'disable_components $v' $LIBRARY_LIST
4525 echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
4528 test -n "$valgrind" && toolchain
="valgrind-memcheck"
4530 enabled ossfuzz
&& ! echo $CFLAGS |
grep -q -- "-fsanitize=" && ! echo $CFLAGS |
grep -q -- "-fcoverage-mapping" &&{
4531 add_cflags
-fsanitize=address
,undefined
-fsanitize-coverage=trace-pc-guard
,trace-cmp
-fno-omit-frame-pointer
4532 add_ldflags
-fsanitize=address
,undefined
-fsanitize-coverage=trace-pc-guard
,trace-cmp
4535 case "$toolchain" in
4537 cc_default
="${toolchain%-asan}"
4538 add_cflags
-fsanitize=address
4539 add_ldflags
-fsanitize=address
4542 cc_default
="${toolchain%-lsan}"
4543 add_cflags
-fsanitize=leak
4544 add_ldflags
-fsanitize=leak
4547 cc_default
="${toolchain%-msan}"
4548 add_cflags
-fsanitize=memory
-fsanitize-memory-track-origins
4549 add_ldflags
-fsanitize=memory
4552 cc_default
="${toolchain%-tsan}"
4553 add_cflags
-fsanitize=thread
4554 add_ldflags
-fsanitize=thread
4555 case "$toolchain" in
4563 cc_default
="${toolchain%-usan}"
4564 add_cflags
-fsanitize=undefined
4565 add_ldflags
-fsanitize=undefined
4568 target_exec_default
="valgrind"
4569 case "$toolchain" in
4571 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"
4574 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"
4579 cl_major_ver
=$
(cl.exe
2>&1 |
sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
4580 if [ -z "$cl_major_ver" ] ||
[ $cl_major_ver -ge 18 ]; then
4582 cxx_default
="cl.exe"
4584 die
"Unsupported MSVC version (2013 or newer required)"
4586 ld_default
="$source_path/compat/windows/mslink"
4587 windres_default
="$source_path/compat/windows/mswindres"
4588 nm_default
="dumpbin.exe -symbols"
4589 ar_default
="lib.exe"
4590 case "${arch:-$arch_default}" in
4592 as_default
="armasm64.exe"
4595 as_default
="armasm.exe"
4598 target_os_default
="win32"
4599 # Use a relative path for TMPDIR. This makes sure all the
4600 # ffconf temp files are written with a relative path, avoiding
4601 # issues with msys/win32 path conversion for MSVC parameters
4602 # such as -Fo<file> or -out:<file>.
4608 nm_default
="dumpbin -symbols"
4610 target_os_default
="win32"
4614 add_cflags
-fprofile-arcs -ftest-coverage
4615 add_ldflags
-fprofile-arcs -ftest-coverage
4618 add_cflags
-fprofile-arcs -ftest-coverage
4619 add_ldflags
--coverage
4622 add_cppflags
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
4623 add_cflags
-fno-strict-overflow -fstack-protector-all
4624 add_ldflags
-Wl,-z,relro
-Wl,-z,now
4626 add_ldexeflags
-fPIE -pie
4629 die
"Unknown toolchain $toolchain"
4633 if test -n "$cross_prefix"; then
4634 test -n "$arch" && test -n "$target_os" ||
4635 die
"Must specify target arch (--arch) and OS (--target-os) when cross-compiling"
4636 enable cross_compile
4639 set_default target_os
4640 if test "$target_os" = android
; then
4644 ar_default
="${cross_prefix}${ar_default}"
4645 cc_default
="${cross_prefix}${cc_default}"
4646 cxx_default
="${cross_prefix}${cxx_default}"
4647 nm_default
="${cross_prefix}${nm_default}"
4648 pkg_config_default
="${cross_prefix}${pkg_config_default}"
4649 ranlib_default
="${cross_prefix}${ranlib_default}"
4650 strip_default
="${cross_prefix}${strip_default}"
4651 windres_default
="${cross_prefix}${windres_default}"
4653 sysinclude_default
="${sysroot}/usr/include"
4655 if enabled cuda_sdk
; then
4656 warn
"Option --enable-cuda-sdk is deprecated. Use --enable-cuda-nvcc instead."
4660 if enabled cuda_nvcc
; then
4662 nvccflags_default
="-gencode arch=compute_30,code=sm_30 -O2"
4664 nvcc_default
="clang"
4665 nvccflags_default
="--cuda-gpu-arch=sm_30 -O2"
4671 if enabled cuda_nvcc
; then
4672 if $nvcc $nvccflags_default 2>&1 |
grep -qi unsupported
; then
4673 nvccflags_default
="-gencode arch=compute_60,code=sm_60 -O2"
4677 set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
4678 target_exec x86asmexe metalcc metallib stdc stdcxx
4679 enabled cross_compile || host_cc_default
=$cc
4682 if ${ranlib} 2>&1 |
grep -q "\-D "; then
4683 ranlib
="${ranlib} -D"
4686 pkg_config_fail_message
=""
4687 if ! $pkg_config --version >/dev
/null
2>&1; then
4688 warn
"$pkg_config not found, library detection may fail."
4690 elif is_in
-static $cc $LDFLAGS && ! is_in
--static $pkg_config $pkg_config_flags; then
4691 pkg_config_fail_message
="
4692 Note: When building a static binary, add --pkg-config-flags=\"--static\"."
4695 if test $doxygen != $doxygen_default && \
4696 ! $doxygen --version >/dev
/null
2>&1; then
4697 warn
"Specified doxygen \"$doxygen\" not found, API documentation will fail to build."
4702 mingw32
*|mingw64
*|msys
*|win32|win64|cygwin
*|
*-dos|freedos|opendos|os
/2*|symbian
) echo .exe
;;
4706 EXESUF
=$
(exesuf
$target_os)
4707 HOSTEXESUF
=$
(exesuf
$host_os)
4709 # set temporary file name
4710 : ${TMPDIR:=$TEMPDIR}
4714 if [ -n "$tempprefix" ] ; then
4716 tmpname
="$tempprefix.${HOSTNAME}.${UID}"
4720 elif ! test_cmd mktemp
-u XXXXXX
; then
4721 # simple replacement for missing mktemp
4722 # NOT SAFE FOR GENERAL USE
4724 tmpname
="${2%%XXX*}.${HOSTNAME}.${UID}.$$"
4730 FFTMPDIR
=$
(mktemp
-d "${TMPDIR}/ffconf.XXXXXXXX" 2> /dev
/null
) ||
4731 die
"Unable to create temporary directory in $TMPDIR."
4734 tmp
="${FFTMPDIR}/test"$2
4735 (set -C; exec > $tmp) 2> /dev
/null ||
4736 die
"Unable to create temporary file in $FFTMPDIR."
4740 trap 'rm -rf -- "$FFTMPDIR"' EXIT
4746 tmpfile TMPE
$EXESUF
4759 # make sure we can execute files in $TMPDIR
4760 cat > $TMPSH 2>> $logfile <<EOF
4763 chmod +x
$TMPSH >> $logfile 2>&1
4764 if ! $TMPSH >> $logfile 2>&1; then
4766 Unable to create and execute files in $TMPDIR. Set the TMPDIR environment
4767 variable to another directory and make sure that it is not mounted noexec.
4769 die
"Sanity test failed."
4775 # Filter out MSVC cl.exe options from cflags that shouldn't
4776 # be passed to gas-preprocessor
4786 -Wno-switch) echo -Wno-switch-enum ;;
4787 -Wno-format-zero-length) ;;
4788 -Wdisabled-optimization) ;;
4789 -Wno-pointer-sign) echo -Wno-other ;;
4795 msvc_common_flags
(){
4798 # In addition to specifying certain flags under the compiler
4799 # specific filters, they must be specified here as well or else the
4800 # generic catch all at the bottom will print the original flag.
4803 -std=c
*) echo /std
:${flag#-std=};;
4805 -fomit-frame-pointer) ;;
4809 -fno-signed-zeros) ;;
4814 -lz) echo zlib.lib
;;
4815 -lx264) echo libx264.lib
;;
4817 -l*) echo ${flag#-l}.lib
;;
4818 -LARGEADDRESSAWARE) echo $flag ;;
4819 -L*) echo -libpath:${flag#-L} ;;
4827 msvc_common_flags
"$@"
4830 -Wall) echo -W3 -wd4018 -wd4146 -wd4244 -wd4305 \
4832 -Wextra) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
4833 -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
4834 -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
4836 -wd4273 -wd4554 -wd4701 -wd4703 ;;
4842 msvc_common_flags
"$@"
4845 # Despite what Intel's documentation says -Wall, which is supported
4846 # on Windows, does enable remarks so disable them here.
4847 -Wall) echo $flag -Qdiag-disable:remark
;;
4848 -std=$stdc) echo -Qstd=$stdc ;;
4849 -flto*) echo -ipo ;;
4857 -flto*) echo -ipo ;;
4867 case "${flag#*=}" in
4868 native
) echo -xtarget=native
;;
4869 v9|niagara
) echo -xarch=sparc
;;
4870 ultrasparc
) echo -xarch=sparcvis
;;
4871 ultrasparc3|niagara2
) echo -xarch=sparcvis2
;;
4872 i586|pentium
) echo -xchip=pentium
;;
4873 i686|pentiumpro|pentium2
) echo -xtarget=pentium_pro
;;
4874 pentium3
*|c3-2
) echo -xtarget=pentium3
;;
4875 pentium-m
) echo -xarch=sse2
-xchip=pentium3
;;
4876 pentium4
*) echo -xtarget=pentium4
;;
4877 prescott|nocona
) echo -xarch=sse3
-xchip=pentium4
;;
4878 *-sse3) echo -xarch=sse3
;;
4879 core2
) echo -xarch=ssse3
-xchip=core2
;;
4880 bonnell
) echo -xarch=ssse3
;;
4881 corei7|nehalem
) echo -xtarget=nehalem
;;
4882 westmere
) echo -xtarget=westmere
;;
4883 silvermont
) echo -xarch=sse4_2
;;
4884 corei7-avx|sandybridge
) echo -xtarget=sandybridge
;;
4885 core-avx
*|ivybridge|haswell|broadwell|skylake
*|knl
)
4887 amdfam10|barcelona
) echo -xtarget=barcelona
;;
4888 btver1
) echo -xarch=amdsse4a
;;
4889 btver2|bdver
*|znver
*) echo -xarch=avx
;;
4890 athlon-4|athlon-
[mx
]p
) echo -xarch=ssea
;;
4891 k8|opteron|athlon64|athlon-fx
)
4892 echo -xarch=sse2a
;;
4893 athlon
*) echo -xarch=pentium_proa
;;
4896 -std=$stdc) echo -x$stdc ;;
4897 -fomit-frame-pointer) echo -xregs=frameptr
;;
4898 -fPIC) echo -KPIC -xcode=pic32
;;
4899 -W*,*) echo $flag ;;
4900 -f*-*|
-W*|
-mimpure-text) ;;
4912 unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
4913 unset _ld_o _ldflags _ld_lib _ld_path
4914 unset _depflags _DEPCMD _DEPFLAGS
4917 if $_cc --version 2>&1 |
grep -q '^GNU assembler'; then
4918 true
# no-op to avoid reading stdin in following checks
4919 elif $_cc -v 2>&1 |
grep -q '^gcc.*LLVM'; then
4921 gcc_extra_ver
=$
(expr "$($_cc --version 2>/dev/null | head -n1)" : '.*\((.*)\)')
4922 _ident
="llvm-gcc $($_cc -dumpversion 2>/dev/null) $gcc_extra_ver"
4923 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
4926 elif $_cc -v 2>&1 |
grep -qi ^gcc
; then
4928 gcc_version
=$
($_cc --version |
head -n1)
4929 gcc_basever
=$
($_cc -dumpversion)
4930 gcc_pkg_ver
=$
(expr "$gcc_version" : '[^ ]* \(([^)]*)\)')
4931 gcc_ext_ver
=$
(expr "$gcc_version" : ".*$gcc_pkg_ver $gcc_basever \\(.*\\)")
4932 _ident
=$
(cleanws
"gcc $gcc_basever $gcc_pkg_ver $gcc_ext_ver")
4933 case $gcc_basever in
4936 *) _depflags
='-MMD -MF $(@:.o=.d) -MT $@' ;;
4938 if [ "$first" = true
]; then
4939 case $gcc_basever in
4941 warn
"gcc 4.2 is outdated and may miscompile FFmpeg. Please use a newer compiler." ;;
4946 elif $_cc --version 2>/dev
/null |
grep -q ^icc
; then
4948 _ident
=$
($_cc --version |
head -n1)
4953 _flags_filter
=icc_flags
4954 elif $_cc -v 2>&1 |
grep -q xlc
; then
4956 _ident
=$
($_cc -qversion 2>/dev
/null |
head -n1)
4958 _cflags_size
='-O5 -qcompact'
4959 elif $_cc --vsn 2>/dev
/null |
grep -Eq "ARM (C/C\+\+ )?Compiler"; then
4960 test -d "$sysroot" || die
"No valid sysroot specified."
4962 _ident
=$
($_cc --vsn |
grep -i build |
head -n1 |
sed 's/.*: //')
4963 armcc_conf
="$PWD/armcc.conf"
4964 $_cc --arm_linux_configure \
4965 --arm_linux_config_file="$armcc_conf" \
4966 --configure_sysroot="$sysroot" \
4967 --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
4968 die
"Error creating armcc configuration file."
4969 $_cc --vsn |
grep -q RVCT
&& armcc_opt
=rvct || armcc_opt
=armcc
4970 _flags
="--arm_linux_config_file=$armcc_conf --translate_gcc"
4971 as_default
="${cross_prefix}gcc"
4975 elif $_cc -v 2>&1 |
grep -q clang
&& ! $_cc -?
> /dev
/null
2>&1; then
4977 _ident
=$
($_cc --version 2>/dev
/null |
head -n1)
4978 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
4981 elif $_cc -V 2>&1 |
grep -q Sun
; then
4983 _ident
=$
($_cc -V 2>&1 |
head -n1 | cut
-d' ' -f 2-)
4984 _DEPCMD
='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
4985 _DEPFLAGS
='-xM1 -x$stdc'
4986 _ldflags
='-std=$stdc'
4988 _cflags_size
='-O5 -xspace'
4989 _flags_filter
=suncc_flags
4990 elif $_cc -v 2>&1 |
grep -q 'PathScale\|Path64'; then
4992 _ident
=$
($_cc -v 2>&1 |
head -n1 |
tr -d :)
4993 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
4996 _flags_filter
='filter_out -Wdisabled-optimization'
4997 elif $_cc -v 2>&1 |
grep -q Open64
; then
4999 _ident
=$
($_cc -v 2>&1 |
head -n1 |
tr -d :)
5000 _depflags
='-MMD -MF $(@:.o=.d) -MT $@'
5003 _flags_filter
='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
5004 elif $_cc 2>&1 |
grep -q 'Microsoft.*ARM.*Assembler'; then
5006 _ident
=$
($_cc |
head -n1)
5007 # 4509: "This form of conditional instruction is deprecated"
5008 _flags
="-nologo -ignore 4509"
5009 _flags_filter
=armasm_flags
5010 elif $_cc 2>&1 |
grep -q Intel
; then
5012 _ident
=$
($_cc 2>&1 |
head -n1)
5013 _depflags
='-QMMD -QMF$(@:.o=.d) -QMT$@'
5014 # Not only is O3 broken on 13.x+ but it is slower on all previous
5015 # versions (tested) as well.
5017 _cflags_size
="-O1 -Oi" # -O1 without -Oi miscompiles stuff
5018 if $_cc 2>&1 |
grep -q Linker
; then
5025 _flags_filter
=icl_flags
5027 _ld_path
='-libpath:'
5028 # -Qdiag-error to make icl error when seeing certain unknown arguments
5029 _flags
='-nologo -Qdiag-error:4044,10157'
5030 # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
5031 # with MSVC which enables it by default.
5032 _cflags
='-Qms0 -Qvec- -Qsimd- -GS -fp:precise'
5034 elif $_cc -?
2>/dev
/null |
grep -q 'LLVM.*Linker'; then
5035 # lld can emulate multiple different linkers; in ms link.exe mode,
5036 # the -? parameter gives the help output which contains an identifyable
5037 # string, while it gives an error in other modes.
5039 # The link.exe mode doesn't have a switch for getting the version,
5040 # but we can force it back to gnu mode and get the version from there.
5041 _ident
=$
($_cc -flavor gnu
--version 2>/dev
/null
)
5043 _flags_filter
=msvc_flags
5045 _ld_path
='-libpath:'
5046 elif $_cc -nologo- 2>&1 |
grep -q Microsoft ||
{ $_cc -v 2>&1 |
grep -q clang
&& $_cc -?
> /dev
/null
2>&1; }; then
5048 if $_cc -nologo- 2>&1 |
grep -q Microsoft
; then
5049 _ident
=$
($_cc 2>&1 |
head -n1 |
tr -d '\r')
5051 _ident
=$
($_cc --version 2>/dev
/null |
head -n1 |
tr -d '\r')
5053 if [ -x "$(command -v wslpath)" ]; then
5054 _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)'
5057 _DEPCMD
='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
5059 _DEPFLAGS
='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
5063 if $_cc -nologo- 2>&1 |
grep -q Linker
; then
5070 _flags_filter
=msvc_flags
5072 _ld_path
='-libpath:'
5075 elif $_cc --version 2>/dev
/null |
grep -q ^cparser
; then
5077 _ident
=$
($_cc --version |
head -n1)
5081 _flags_filter
=cparser_flags
5084 eval ${pfx}_type
=\
$_type
5085 eval ${pfx}_ident
=\
$_ident
5089 eval ${1}_C=\${_cc_c-\${${1}_C}}
5090 eval ${1}_E=\${_cc_e-\${${1}_E}}
5091 eval ${1}_O=\${_cc_o-\${${1}_O}}
5093 if [ -n "$_depflags" ]; then
5094 eval ${1}_DEPFLAGS
=\
$_depflags
5096 eval ${1}DEP
=\
${_DEPCMD:-\$DEPCMD}
5097 eval ${1}DEP_FLAGS
=\
${_DEPFLAGS:-\$DEPFLAGS}
5098 eval DEP
${1}FLAGS
=\
$_flags
5102 probe_cc cc
"$cc" "true"
5103 cflags_filter
=$_flags_filter
5104 cflags_speed
=$_cflags_speed
5105 cflags_size
=$_cflags_size
5106 cflags_noopt
=$_cflags_noopt
5107 add_cflags
$_flags $_cflags
5108 cc_ldflags
=$_ldflags
5112 probe_cc hostcc
"$host_cc"
5113 host_cflags_filter
=$_flags_filter
5114 host_cflags_speed
=$_cflags_speed
5115 add_host_cflags
$_flags $_cflags
5118 test -n "$cc_type" && enable $cc_type ||
5119 warn
"Unknown C compiler $cc, unable to select optimal CFLAGS"
5121 : ${as_default:=$cc}
5122 : ${objcc_default:=$cc}
5123 : ${dep_cc_default:=$cc}
5124 : ${ld_default:=$cc}
5125 : ${host_ld_default:=$host_cc}
5126 set_default
ar as objcc dep_cc ld ln_s host_ld windres
5129 asflags_filter
=$_flags_filter
5130 add_asflags
$_flags $_cflags
5133 probe_cc objcc
"$objcc"
5134 objcflags_filter
=$_flags_filter
5135 add_objcflags
$_flags $_cflags
5139 ldflags_filter
=$_flags_filter
5140 add_ldflags
$_flags $_ldflags
5141 test "$cc_type" != "$ld_type" && add_ldflags
$cc_ldflags
5143 LD_LIB
=${_ld_lib-$LD_LIB}
5144 LD_PATH
=${_ld_path-$LD_PATH}
5146 probe_cc hostld
"$host_ld"
5147 host_ldflags_filter
=$_flags_filter
5148 add_host_ldflags
$_flags $_ldflags
5149 HOSTLD_O
=${_ld_o-$HOSTLD_O}
5151 if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
5152 probe_cc depcc
"$dep_cc"
5153 CCDEP
=${_DEPCMD:-$DEPCMD}
5154 CCDEP_FLAGS
=${_DEPFLAGS:=$DEPFLAGS}
5158 if $ar 2>&1 |
grep -q Microsoft
; then
5161 elif $ar 2>&1 |
grep -q "\[D\] "; then
5169 add_cflags
$extra_cflags
5170 add_cxxflags
$extra_cxxflags
5171 add_objcflags
$extra_objcflags
5172 add_asflags
$extra_cflags
5174 if test -n "$sysroot"; then
5177 add_cppflags
--sysroot="$sysroot"
5178 add_ldflags
--sysroot="$sysroot"
5183 if test "$cpu" = host; then
5184 enabled cross_compile
&&
5185 warn
"--cpu=host makes no sense when cross-compiling."
5190 $cc $1=native
-v -c -o $TMPO $TMPC >$TMPE 2>&1 ||
return
5192 s/.*$1=\\([^ ]*\\).*/\\1/
5197 cpu
=$
(check_native
-march || check_native
-mcpu)
5201 $cc $1=native
-v -c -o $TMPO $TMPC >$TMPE 2>&1 ||
return
5202 sed -n "/cc1.*-target-cpu /{
5203 s/.*-target-cpu \\([^ ]*\\).*/\\1/
5208 cpu
=$
(check_native
-march)
5212 test "${cpu:-host}" = host &&
5213 die
"--cpu=host not supported with compiler $cc"
5216 # Deal with common $arch aliases
5243 "Power Macintosh"|ppc
*|powerpc
*)
5261 i
[3-6]86*|i86pc|BePC|x86pc|x86_64|x86_32|amd64
)
5266 is_in
$arch $ARCH_LIST || warn
"unknown architecture $arch"
5269 # Add processor-specific flags
5270 if enabled aarch64
; then
5274 cpuflags
="-march=$cpu"
5277 cpuflags
="-mcpu=$cpu"
5281 elif enabled alpha
; then
5283 cpuflags
="-mcpu=$cpu"
5285 elif enabled arm
; then
5288 test_cpp_condition stddef.h \
5289 "defined __ARM_ARCH_${1}__ || defined __TARGET_ARCH_${2:-$1}" \
5294 if check_arm_arch
4; then echo armv4
5295 elif check_arm_arch
4T
; then echo armv4t
5296 elif check_arm_arch
5; then echo armv5
5297 elif check_arm_arch
5E
; then echo armv5e
5298 elif check_arm_arch
5T
; then echo armv5t
5299 elif check_arm_arch
5TE
; then echo armv5te
5300 elif check_arm_arch
5TEJ
; then echo armv5te
5301 elif check_arm_arch
6; then echo armv6
5302 elif check_arm_arch
6J
; then echo armv6j
5303 elif check_arm_arch
6K
; then echo armv6k
5304 elif check_arm_arch
6Z
; then echo armv6z
5305 elif check_arm_arch
6KZ
; then echo armv6zk
5306 elif check_arm_arch
6ZK
; then echo armv6zk
5307 elif check_arm_arch
6T2
; then echo armv6t2
5308 elif check_arm_arch
7; then echo armv7
5309 elif check_arm_arch
7A
7_A
; then echo armv7-a
5310 elif check_arm_arch
7S
; then echo armv7-a
5311 elif check_arm_arch
7R
7_R
; then echo armv7-r
5312 elif check_arm_arch
7M
7_M
; then echo armv7-m
5313 elif check_arm_arch
7EM
7E_M
; then echo armv7-m
5314 elif check_arm_arch
8A
8_A
; then echo armv8-a
5321 subarch
=$
(probe_arm_arch |
sed 's/[^a-z0-9]//g')
5324 cpuflags
="-march=$cpu"
5325 subarch
=$
(echo $cpu |
sed 's/[^a-z0-9]//g')
5328 cpuflags
="-mcpu=$cpu"
5330 cortex-a
*) subarch
=armv7a
;;
5331 cortex-r
*) subarch
=armv7r
;;
5332 cortex-m
*) enable thumb
; subarch
=armv7m
;;
5333 arm11
*) subarch
=armv6
;;
5334 arm
[79]*e
*|arm9
[24]6*|arm96
*|arm102
[26]) subarch
=armv5te
;;
5335 armv4
*|arm7
*|arm9
[24]*) subarch
=armv4
;;
5336 *) subarch
=$
(probe_arm_arch
) ;;
5342 armv5t
*) enable fast_clz
;;
5345 disabled fast_unaligned ||
enable fast_unaligned
5349 test_cflags
-mfp16-format=ieee
&& add_cflags
-mfp16-format=ieee
5351 elif enabled avr32
; then
5356 cpuflags
="-mpart=$cpu"
5360 cpuflags
="-march=$cpu"
5364 cpuflags
="-mcpu=$cpu"
5368 cpuflags
="-march=$cpu"
5372 elif enabled bfin
; then
5374 cpuflags
="-mcpu=$cpu"
5376 elif enabled loongarch
; then
5378 enable local_aligned
5379 enable simd_align_32
5382 enable fast_unaligned
5385 cpuflags
="-march=$cpu"
5388 elif enabled mips
; then
5390 if [ "$cpu" != "generic" ]; then
5401 cpuflags
="-march=$cpu"
5404 # General ISA levels
5418 # Cores from MIPS(MTI)
5423 24kf
*|
24kec|
34kc|
74Kc|
1004kc
)
5426 24kef
*|
34kf
*|
1004kf
*)
5433 check_cflags
"-mtune=p5600" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops"
5437 check_cflags
"-mtune=i6400 -mabi=64" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags
"-mabi=64"
5441 check_cflags
"-mtune=p6600 -mabi=64" && check_cflags
"-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags
"-mabi=64"
5443 # Cores from Loongson
5444 loongson2e|loongson2f|loongson3
*)
5445 enable local_aligned
5446 enable simd_align_16
5450 enable fast_unaligned
5451 disable aligned_stack
5452 # When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
5453 if test "$cc_type" = "gcc"; then
5454 case $gcc_basever in
5455 2|
2.
*|
3.
*|
4.
*|
5.0|
5.1|
5.2)
5456 expensive_optimization_flag
="-fno-expensive-optimizations"
5459 expensive_optimization_flag
=""
5467 cpuflags
="-march=loongson3a -mhard-float $expensive_optimization_flag"
5471 cpuflags
="-march=loongson2e -mhard-float $expensive_optimization_flag"
5475 cpuflags
="-march=loongson2f -mhard-float $expensive_optimization_flag"
5480 warn
"unknown MIPS CPU"
5487 # Disable DSP stuff for generic CPU, it can't be detected at runtime.
5488 warn
'generic cpu selected'
5491 elif enabled ppc
; then
5495 case $
(tolower
$cpu) in
5496 601|ppc601|powerpc601
)
5497 cpuflags
="-mcpu=601"
5500 603*|ppc603
*|powerpc603
*)
5501 cpuflags
="-mcpu=603"
5504 604*|ppc604
*|powerpc604
*)
5505 cpuflags
="-mcpu=604"
5508 g3|
75*|ppc75
*|powerpc75
*)
5509 cpuflags
="-mcpu=750"
5512 g4|
745*|ppc745
*|powerpc745
*)
5513 cpuflags
="-mcpu=7450"
5516 74*|ppc74
*|powerpc74
*)
5517 cpuflags
="-mcpu=7400"
5520 g5|
970|ppc970|powerpc970
)
5521 cpuflags
="-mcpu=970"
5525 cpuflags
="-mcpu=$cpu"
5529 cpuflags
="-mcpu=$cpu"
5532 cpuflags
="-mcpu=cell"
5537 cpuflags
="-mcpu=e500mc"
5541 cpuflags
="-mcpu=8548 -mhard-float -mfloat-gprs=double"
5546 cpuflags
="-mcpu=8540 -mhard-float"
5552 elif enabled riscv
; then
5554 check_headers asm
/hwprobe.h
5555 check_headers sys
/hwprobe.h
5557 if test_cpp_condition stddef.h
"__riscv_zbb"; then
5560 if test_cpp_condition stddef.h
"__riscv_zfhmin"; then
5564 elif enabled sparc
; then
5567 cypress|f93
[04]|tsc701|sparcl
*|supersparc|hypersparc|niagara|v
[789])
5568 cpuflags
="-mcpu=$cpu"
5570 ultrasparc
*|niagara
[234])
5571 cpuflags
="-mcpu=$cpu"
5575 elif enabled x86
; then
5579 cpuflags
="-march=$cpu"
5583 # targets that do NOT support nopl and conditional mov (cmov)
5584 pentium-mmx|k6|k6-
[23]|winchip-c6|winchip2|c3
)
5585 cpuflags
="-march=$cpu"
5588 # targets that do support conditional mov but on which it's slow
5589 pentium4|pentium4m|prescott|nocona
)
5590 cpuflags
="-march=$cpu"
5594 # everything else should support nopl and conditional mov (cmov)
5596 cpuflags
="-march=$cpu"
5604 if [ "$cpu" != generic
]; then
5605 add_cflags
$cpuflags
5606 add_asflags
$cpuflags
5607 test "$cc_type" = "$ld_type" && add_ldflags
$cpuflags
5610 # compiler sanity check
5612 int main(void){ return 0; }
5614 if test "$?" != 0; then
5615 echo "$cc is unable to create an executable file."
5616 if test -z "$cross_prefix" && ! enabled cross_compile
; then
5617 echo "If $cc is a cross-compiler, use the --enable-cross-compile option."
5618 echo "Only do this if you know what cross compiling means."
5620 die
"C compiler test failed."
5623 add_cppflags
-D_ISOC11_SOURCE
5624 add_cxxflags
-D__STDC_CONSTANT_MACROS
5625 check_cxxflags_cc
-std=$stdcxx ctype.h
"__cplusplus >= 201103L" ||
5626 { check_cxxflags
-std=c
++11 && stdcxx
="c++11" ||
{ check_cxxflags
-std=c
++0x
&& stdcxx
="c++0x"; }; }
5628 # some compilers silently accept -std=c11, so we also need to check that the
5629 # version macro is defined properly
5630 check_cflags_cc
-std=$stdc ctype.h
"__STDC_VERSION__ >= 201112L" ||
5631 { check_cflags_cc
-std=c11 ctype.h
"__STDC_VERSION__ >= 201112L" && stdc
="c11" || die
"Compiler lacks C11 support"; }
5633 test_cc
<<EOF || die "Compiler lacks support for C11 static assertions"
5640 static_assert(offsetof(struct Foo, a) == 0,
5641 "First element of struct does not have offset 0");
5642 _Static_assert(offsetof(struct Foo, ptr) >= offsetof(struct Foo, a) + sizeof(obj.a),
5643 "elements not properly ordered in struct");
5646 check_cppflags
-D_FILE_OFFSET_BITS=64
5647 check_cppflags
-D_LARGEFILE_SOURCE
5649 add_host_cppflags
-D_ISOC11_SOURCE
5650 check_host_cflags_cc
-std=$stdc ctype.h
"__STDC_VERSION__ >= 201112L" ||
5651 check_host_cflags_cc
-std=c11 ctype.h
"__STDC_VERSION__ >= 201112L" || die
"Host compiler lacks C11 support"
5653 check_host_cflags
-Wall
5654 check_host_cflags
$host_cflags_speed
5659 expr=${3:-'sizeof(void *) > 4'}
5660 test_code cc
"" "int test[2*($expr) - 1]" &&
5661 subarch
=$arch64 || subarch
=$arch32
5667 enabled shared
&& enable_weak pic
5670 check_64bit loongarch32 loongarch64
5671 enabled loongarch64
&& disable loongarch32
5672 enabled shared
&& enable_weak pic
5675 check_64bit mips mips64
'_MIPS_SIM > 1'
5676 enabled shared
&& enable_weak pic
5679 check_64bit parisc parisc64
5680 enabled shared
&& enable_weak pic
5683 check_64bit ppc ppc64
5684 enabled shared
&& enable_weak pic
5687 check_64bit riscv32 riscv64
5688 enabled shared
&& enable_weak pic
5691 check_64bit s390 s390x
5692 enabled shared
&& enable_weak pic
5695 check_64bit sparc sparc64
5696 enabled shared
&& enable_weak pic
5699 check_64bit x86_32 x86_64
5700 # Treat x32 as x64 for now. Note it also needs pic if shared
5701 test "$subarch" = "x86_32" && test_cpp_condition stddef.h
'defined(__x86_64__)' &&
5702 subarch
=x86_64
&& enable x86_64
&& disable x86_32
5703 if enabled x86_64
; then
5704 enabled shared
&& enable_weak pic
5714 add_cppflags
'-I\$(SRC_PATH)/compat/aix'
5715 enabled shared
&& add_ldflags
-Wl,-brtl
5716 arflags
='-Xany -r -c'
5721 enable section_data_rel_ro
5723 add_ldexeflags
-fPIE -pie
5724 SLIB_INSTALL_NAME
='$(SLIBNAME)'
5726 SHFLAGS
='-shared -Wl,-soname,$(SLIBNAME)'
5729 prefix_default
="/boot/common"
5730 network_extralibs
="-lnetwork"
5734 SHFLAGS
='-shared -Wl,-h,$$(@F)'
5735 enabled x86
&& append SHFLAGS
-mimpure-text
5736 network_extralibs
="-lsocket -lnsl"
5737 add_cppflags
-D__EXTENSIONS__
5738 # When using suncc to build, the Solaris linker will mark
5739 # an executable with each instruction set encountered by
5740 # the Solaris assembler. As our libraries contain their own
5741 # guards for processor-specific code, instead suppress
5742 # generation of the HWCAPS ELF section on Solaris x86 only.
5743 enabled_all suncc x86
&&
5744 echo "hwcap_1 = OVERRIDE;" > mapfile
&&
5745 add_ldflags
-Wl,-M,mapfile
5746 nm_default
='nm -P -g'
5749 VERSION_SCRIPT_POSTPROCESS_CMD
='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)'
5753 enable section_data_rel_ro
5754 oss_indev_extralibs
="-lossaudio"
5755 oss_outdev_extralibs
="-lossaudio"
5756 enabled gcc || check_ldflags
-Wl,-zmuldefs
5760 enable section_data_rel_ro
5763 SLIB_INSTALL_NAME
='$(SLIBNAME).$(LIBMAJOR).$(LIBMINOR)'
5765 oss_indev_extralibs
="-lossaudio"
5766 oss_outdev_extralibs
="-lossaudio"
5772 enable section_data_rel_ro
5775 add_extralibs
-lpoll -lgnugetopt
5779 enabled ppc
&& add_asflags
-force_cpusubtype_ALL
5780 install_name_dir_default
='$(SHLIBDIR)'
5781 SHFLAGS
='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
5782 enabled x86_32
&& append SHFLAGS
-Wl,-read_only_relocs,suppress
5784 add_ldflags
-Wl,-dynamic,-search_paths_first
5785 check_cflags
-Werror=partial-availability
5787 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
5788 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
5789 enabled x86_64
&& objformat
="macho64" || objformat
="macho32"
5790 enabled_any pic shared x86_64 ||
5791 { check_cflags
-mdynamic-no-pic && add_asflags
-mdynamic-no-pic; }
5792 check_headers dispatch
/dispatch.h
&&
5793 add_cppflags
'-I\$(SRC_PATH)/compat/dispatch_semaphore'
5794 if test -n "$sysroot"; then
5795 is_in
-isysroot $cc $CPPFLAGS $CFLAGS || check_cppflags
-isysroot $sysroot
5796 is_in
-isysroot $ld $LDFLAGS || check_ldflags
-isysroot $sysroot
5798 version_script
='-exported_symbols_list'
5799 VERSION_SCRIPT_POSTPROCESS_CMD
='tr " " "\n" | sed -n /global:/,/local:/p | grep ";" | tr ";" "\n" | sed -E "s/(.+)/_\1/g" | sed -E "s/(.+[^*])$$$$/\1*/"'
5800 # Workaround for Xcode 11 -fstack-check bug
5801 if enabled clang
; then
5802 clang_version
=$
($cc -dumpversion)
5803 test ${clang_version%%.*} -eq 11 && add_cflags
-fno-stack-check
5807 die
"Native MSYS builds are discouraged, please use the MINGW environment."
5812 if enabled x86_64
; then
5813 LIBTARGET
="i386:x86-64"
5814 elif enabled arm
; then
5816 elif enabled aarch64
; then
5819 if enabled shared
; then
5820 # Cannot build both shared and static libs when using dllimport.
5823 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5824 enabled x86_32
&& check_ldflags
-Wl,--large-address-aware
5825 add_cppflags
-DWIN32_LEAN_AND_MEAN
5826 shlibdir_default
="$bindir_default"
5829 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5830 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5831 if test_cmd lib.exe
-list; then
5832 SLIB_EXTRA_CMD
=-'lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
5833 if enabled x86_64
; then
5837 SLIB_EXTRA_CMD
=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
5839 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5841 SLIB_INSTALL_EXTRA_SHLIB
='$(SLIBNAME:$(SLIBSUF)=.lib)'
5842 SLIB_INSTALL_EXTRA_LIB
='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
5843 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)'
5844 SHFLAGS
='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--disable-auto-image-base $$(@:$(SLIBSUF)=.def)'
5845 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5846 dlltool
="${cross_prefix}dlltool"
5849 check_ldflags
-Wl,--nxcompat,--dynamicbase
5850 # Lets work around some stupidity in binutils.
5851 # ld will strip relocations from executables even though we need them
5852 # for dynamicbase (ASLR). Using -pie does retain the reloc section
5853 # however ld then forgets what the entry point should be (oops) so we
5854 # have to manually (re)set it.
5855 if enabled x86_32
; then
5856 disabled debug
&& add_ldexeflags
-Wl,--pic-executable,-e,_mainCRTStartup
5857 elif enabled x86_64
; then
5858 disabled debug
&& add_ldexeflags
-Wl,--pic-executable,-e,mainCRTStartup
5859 check_ldflags
-Wl,--high-entropy-va # binutils 2.25
5860 # Set image base >4GB for extra entropy with HEASLR
5861 add_ldexeflags
-Wl,--image-base,0x140000000
5862 append SHFLAGS
-Wl,--image-base,0x180000000
5867 if enabled shared
; then
5868 # Link to the import library instead of the normal static library
5871 # Cannot build both shared and static libs with MSVC or icl.
5874 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5875 enabled x86_32
&& check_ldflags
-LARGEADDRESSAWARE
5876 add_cppflags
-DWIN32_LEAN_AND_MEAN
5877 shlibdir_default
="$bindir_default"
5880 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5881 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5882 SLIB_CREATE_DEF_CMD
='EXTERN_PREFIX="$(EXTERN_PREFIX)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
5883 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5885 SLIB_INSTALL_EXTRA_SHLIB
='$(SLIBNAME:$(SLIBSUF)=.lib)'
5886 SLIB_INSTALL_EXTRA_LIB
='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
5887 SHFLAGS
='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
5888 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5894 shlibdir_default
="$bindir_default"
5897 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5898 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
5899 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5901 SLIB_INSTALL_EXTRA_LIB
='lib$(FULLNAME).dll.a'
5902 SHFLAGS
='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a'
5903 enabled x86_64
&& objformat
="win64" || objformat
="win32"
5905 ! enabled small
&& test_cmd
$windres --version && enable gnu_windres
5906 add_cppflags
-DWIN32_LEAN_AND_MEAN
5907 add_cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
5909 *-dos|freedos|opendos
)
5910 network_extralibs
="-lsocket"
5915 enable section_data_rel_ro
5916 enabled_any arm aarch64
&& enable_weak linux_perf
5920 ranlib
="echo ignoring ranlib"
5926 add_cppflags
-D_GNU_SOURCE
5927 add_ldflags
-Zomf -Zbin-files -Zargs-wild -Zhigh-mem -Zmap
5928 SHFLAGS
='$(SUBDIR)$(NAME).def -Zdll -Zomf'
5932 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
5933 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(shell echo $(FULLNAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
5934 SLIB_CREATE_DEF_CMD
='echo LIBRARY $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(FULLNAME).def; \
5935 echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(FULLNAME).def; \
5936 echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(FULLNAME).def; \
5937 echo EXPORTS >> $(SUBDIR)$(FULLNAME).def; \
5938 emxexp $(OBJS) >> $(SUBDIR)$(FULLNAME).def'
5939 SLIB_EXTRA_CMD
='emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.a $(SUBDIR)$(FULLNAME).def; \
5940 emximp -o $(SUBDIR)$(LIBPREF)$(FULLNAME)_dll.lib $(SUBDIR)$(FULLNAME).def;'
5941 SLIB_INSTALL_NAME
='$(SLIBNAME_WITH_MAJOR)'
5943 SLIB_INSTALL_EXTRA_LIB
='$(LIBPREF)$(FULLNAME)_dll.a $(LIBPREF)$(FULLNAME)_dll.lib'
5945 enable_weak os2threads
5948 add_cppflags
-D_BSD_SOURCE
5953 add_cppflags
-D_QNX_SOURCE
5954 network_extralibs
="-lsocket"
5959 add_cflags
--include=$sysinclude/gcce
/gcce.h
-fvisibility=default
5960 add_cppflags
-D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS
5961 add_ldflags
-Wl,--target1-abs,--no-undefined \
5962 -Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \
5963 -Wl,--entry=_E32Startup
-Wl,-u,_E32Startup
5964 add_extralibs
-l:eexe.lib
-l:usrt2_2.lib
-l:dfpaeabi.dso \
5965 -l:drtaeabi.dso
-l:scppnwdl.dso
-lsupc++ -lgcc \
5966 -l:libc.dso
-l:libm.dso
-l:euser.dso
-l:libcrt0.lib
5973 die
"Unknown OS '$target_os'."
5977 # test if creating links works
5978 link_dest
=$
(mktemp
-u $TMPDIR/dest_XXXXXXXX
)
5979 link_name
=$
(mktemp
-u $TMPDIR/name_XXXXXXXX
)
5981 $ln_s "$link_dest" "$link_name"
5982 touch "$link_dest/test_file"
5983 if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src
] ||
[ -L src
]) && [ -e "$link_name/test_file" ]; then
5984 # create link to source path
5985 [ -e src
] && rm src
5986 $ln_s "$source_path" src
5989 # creating directory links doesn't work
5990 # fall back to using the full source path
5991 source_link
="$source_path"
5997 # determine libc flavour
6002 # uclibc defines __GLIBC__, so it needs to be checked before glibc.
6003 if test_
${pfx}cpp_condition features.h
"defined __UCLIBC__"; then
6004 eval ${pfx}libc_type
=uclibc
6005 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6006 elif test_
${pfx}cpp_condition features.h
"defined __GLIBC__"; then
6007 eval ${pfx}libc_type
=glibc
6008 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6009 # MinGW headers can be installed on Cygwin, so check for newlib first.
6010 elif test_
${pfx}cpp_condition newlib.h
"defined _NEWLIB_VERSION"; then
6011 eval ${pfx}libc_type
=newlib
6012 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D_XOPEN_SOURCE=600
6013 # MinGW64 is backwards compatible with MinGW32, so check for it first.
6014 elif test_
${pfx}cpp_condition _mingw.h
"defined __MINGW64_VERSION_MAJOR"; then
6015 eval ${pfx}libc_type
=mingw64
6016 if test_
${pfx}cpp_condition _mingw.h
"__MINGW64_VERSION_MAJOR < 3"; then
6017 add_compat msvcrt
/snprintf.o
6018 add_cflags
"-include $source_path/compat/msvcrt/snprintf.h"
6020 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
6021 eval test \$
${pfx_no_}cc_type
= "gcc" &&
6022 add_
${pfx}cppflags
-D__printf__=__gnu_printf__
6023 test_
${pfx}cpp_condition windows.h
"!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
6024 add_
${pfx}cppflags
-D_WIN32_WINNT=0x0600
6025 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6026 elif test_
${pfx}cpp_condition _mingw.h
"defined __MINGW_VERSION" ||
6027 test_
${pfx}cpp_condition _mingw.h
"defined __MINGW32_VERSION"; then
6028 eval ${pfx}libc_type
=mingw32
6029 test_
${pfx}cpp_condition _mingw.h
"__MINGW32_MAJOR_VERSION > 3 || \
6030 (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
6031 die
"ERROR: MinGW32 runtime version must be >= 3.15."
6032 add_
${pfx}cppflags
-U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
6033 test_
${pfx}cpp_condition _mingw.h
"__MSVCRT_VERSION__ < 0x0700" &&
6034 add_
${pfx}cppflags
-D__MSVCRT_VERSION__=0x0700
6035 test_
${pfx}cpp_condition windows.h
"!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
6036 add_
${pfx}cppflags
-D_WIN32_WINNT=0x0600
6037 eval test \$
${pfx_no_}cc_type
= "gcc" &&
6038 add_
${pfx}cppflags
-D__printf__=__gnu_printf__
6039 add_
${pfx}cppflags
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
6040 elif test_
${pfx}cpp_condition crtversion.h
"defined _VC_CRT_MAJOR_VERSION"; then
6041 eval ${pfx}libc_type
=msvcrt
6042 if test_
${pfx}cpp_condition crtversion.h
"_VC_CRT_MAJOR_VERSION < 14"; then
6043 if [ "$pfx" = host_
]; then
6044 add_host_cppflags
-Dsnprintf=_snprintf
6046 add_compat strtod.o strtod
=avpriv_strtod
6047 add_compat msvcrt
/snprintf.o snprintf
=avpriv_snprintf \
6048 _snprintf
=avpriv_snprintf \
6049 vsnprintf
=avpriv_vsnprintf
6052 add_
${pfx}cppflags
-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS
6053 # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to
6054 # 0x601 by default unless something else is set by the user.
6055 # This can easily lead to us detecting functions only present
6056 # in such new versions and producing binaries requiring windows 7.0.
6057 # Therefore explicitly set the default to Vista unless the user has
6058 # set something else on the command line.
6059 # Don't do this if WINAPI_FAMILY is set and is set to a non-desktop
6060 # family. For these cases, configure is free to use any functions
6061 # found in the SDK headers by default. (Alternatively, we could force
6062 # _WIN32_WINNT to 0x0602 in that case.)
6063 test_
${pfx}cpp_condition stdlib.h
"defined(_WIN32_WINNT)" ||
6064 { test_
${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0600; }
6065 #ifdef WINAPI_FAMILY
6066 #include <winapifamily.h>
6067 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
6072 if [ "$pfx" = "" ]; then
6073 check_func strtoll || add_cflags
-Dstrtoll=_strtoi64
6074 check_func strtoull || add_cflags
-Dstrtoull=_strtoui64
6076 elif test_
${pfx}cpp_condition stddef.h
"defined __KLIBC__"; then
6077 eval ${pfx}libc_type
=klibc
6078 elif test_
${pfx}cpp_condition sys
/cdefs.h
"defined __BIONIC__"; then
6079 eval ${pfx}libc_type
=bionic
6080 elif test_
${pfx}cpp_condition sys
/brand.h
"defined LABELED_BRAND_NAME"; then
6081 eval ${pfx}libc_type
=solaris
6082 add_
${pfx}cppflags
-D__EXTENSIONS__ -D_XOPEN_SOURCE=600
6083 elif test_
${pfx}cpp_condition sys
/version.h
"defined __DJGPP__"; then
6084 eval ${pfx}libc_type
=djgpp
6085 add_cppflags
-U__STRICT_ANSI__
6086 add_cflags
"-include $source_path/compat/djgpp/math.h"
6087 add_compat djgpp
/math.o
6091 void *v = localtime_r;
6093 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
6095 void *v = localtime_r;
6098 eval test -n "\${${pfx}libc_type}" && enable ${pfx}libc_${libc_type}
6104 # hacks for compiler/libc/os combinations
6108 add_compat strtod.o strtod=avpriv_strtod
6112 check_compile_assert flt_lim "float.h limits.h
" "DBL_MAX
== (double
)DBL_MAX
" ||
6113 add_cppflags '-I\$(SRC_PATH)/compat/float'
6115 test_cpp_condition stdlib.h "defined
(__PIC__
) || defined
(__pic__
) || defined
(PIC
)" && enable_weak pic
6118 : ${shlibdir_default:="$libdir"}
6119 : ${pkgconfigdir_default:="$libdir/pkgconfig"}
6121 set_default $PATHS_LIST
6124 disabled optimizations || enabled ossfuzz || check_cflags -fomit-frame-pointer
6127 disabled pic && return
6130 case "$target_os" in
6131 mingw*|cygwin*|win*)
6140 enabled pic && enable_weak_pic
6142 test_cc <<EOF || die "Symbol mangling check failed.
"
6145 sym=$($nm $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^ \t]*ff_extern/)) }')
6146 extern_prefix=${sym%%ff_extern*}
6148 ! disabled inline_asm && check_inline_asm inline_asm '"" ::'
6150 check_cc pragma_deprecated "" '_Pragma("GCC diagnostic push
") _Pragma("GCC diagnostic ignored
\"-Wdeprecated-declarations\"")'
6152 test_cpp_condition stdlib.h "defined
(__BYTE_ORDER__
) && (__BYTE_ORDER__
== __ORDER_BIG_ENDIAN__
)" && enable bigendian
6154 check_cc const_nan math.h "struct
{ double d
; } static const bar
[] = { { NAN
} }"
6156 if ! enabled ppc64 || enabled bigendian; then
6161 log "check_gas using
'$as' as AS
"
6162 # :vararg is used on aarch64, arm and ppc altivec
6164 .macro m n
, y
:vararg
=0
6168 # .altmacro is only used in arm asm
6169 ! enabled arm || check_as gnu_as ".altmacro
"
6172 if enabled_any arm aarch64 || enabled_all ppc altivec && enabled asm; then
6174 enabled_any arm aarch64 && nogas=die
6175 enabled_all ppc altivec && [ $target_os_default != aix ] && nogas=warn
6179 arm*) gaspp_as_type=armasm; as_noop=-h ;;
6180 gcc) gaspp_as_type=gas ;;
6181 *) gaspp_as_type=$as_type ;;
6184 [ $target_os = "darwin
" ] && gaspp_as_type="apple-
$gaspp_as_type"
6186 test "${as#*gas-preprocessor.pl}" != "$as" ||
6187 test_cmd gas-preprocessor.pl -arch $arch -as-type $gaspp_as_type -- ${as:=$cc} $as_noop &&
6188 gas="${gas:=gas-preprocessor.pl} -arch $arch -as-type $gaspp_as_type -- ${as:=$cc}"
6190 if ! check_gas ; then
6193 $nogas "GNU assembler not found
, install
/update gas-preprocessor
"
6196 check_as as_func ".func
test
6200 check_inline_asm inline_asm_labels '"1:\n"'
6202 check_inline_asm inline_asm_nonlocal_labels '"Label
:\n"'
6204 if enabled aarch64; then
6205 as_arch_level="armv8-a
"
6206 check_as as_arch_directive ".arch
$as_arch_level"
6207 if enabled as_arch_directive; then
6208 # Check for higher .arch levels. We only need armv8.2-a in order to
6209 # enable the extensions we want below - we primarily want to control
6210 # them via .arch_extension. However:
6212 # Clang before version 17 (Xcode versions up to and including 15.0)
6213 # didn't support controlling the dotprod/i8mm extensions via
6214 # .arch_extension; thus try to enable them via the .arch level as well.
6215 for level in armv8.2-a armv8.4-a armv8.6-a; do
6216 check_arch_level $level
6218 # Clang before version 17 (Xcode versions up to and including 15.0)
6219 # also had a bug (https://github.com/llvm/llvm-project/issues/32220)
6220 # causing a plain ".arch
<level
>" to not have any effect unless it
6221 # had an extra "+<feature
>" included - but it was activated on the next
6222 # ".arch_extension
" directive. Check if we can include "+crc
" as dummy
6223 # feature to make the .arch directive behave as expected and take
6224 # effect right away.
6225 check_arch_level "${as_arch_level}+crc
"
6228 enabled armv8 && check_insn armv8 'prfm pldl1strm, [x0]'
6229 # internal assembler in clang 3.3 does not support this instruction
6230 enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1'
6232 archext_list="dotprod i8mm
"
6233 enabled dotprod && check_archext_insn dotprod 'udot v0.4s, v0.16b, v0.16b'
6234 enabled i8mm && check_archext_insn i8mm 'usdot v0.4s, v0.16b, v0.16b'
6236 # Disable the main feature (e.g. HAVE_NEON) if neither inline nor external
6237 # assembly support the feature out of the box. Skip this for the features
6238 # checked with check_archext_insn above, as that function takes care of
6239 # updating all the variables as necessary.
6240 for v in $ARCH_EXT_LIST_ARM; do
6241 is_in $v $archext_list && continue
6242 enabled_any ${v}_external ${v}_inline || disable $v
6245 elif enabled alpha; then
6249 elif enabled arm; then
6251 enabled msvc && check_cpp_condition thumb stddef.h "defined _M_ARMT
"
6252 test_cpp_condition stddef.h "defined __thumb__
" && test_cc <<EOF && enable_weak thumb
6253 float func(float a, float b){ return a+b; }
6255 enabled thumb && check_cflags -mthumb || check_cflags -marm
6257 if check_cpp_condition vfp_args stddef.h "defined __ARM_PCS_VFP
"; then
6259 elif check_cpp_condition vfp_args stddef.h "defined _M_ARM_FP
&& _M_ARM_FP
>= 30"; then
6261 elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__
" && [ $target_os != darwin ]; then
6262 case "${cross_prefix:-$cc}" in
6263 *hardfloat*) enable vfp_args; fpabi=vfp ;;
6264 *) check_ld "cc
" vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
6265 __asm__ (".eabi_attribute
28, 1");
6266 int main(void) { return 0; }
6269 warn "Compiler does not indicate floating-point ABI
, guessing
$fpabi.
"
6272 # Test for various instruction sets, testing support both in inline and
6273 # external assembly. This sets the ${v}_inline or ${v}_external flags
6274 # if the instruction can be used unconditionally in either inline or
6275 # external assembly. This means that if the ${v}_external feature is set,
6276 # that feature can be used unconditionally in various support macros
6277 # anywhere in external assembly, in any function.
6278 enabled armv5te && check_insn armv5te 'qadd r0, r0, r0'
6279 enabled armv6 && check_insn armv6 'sadd16 r0, r0, r0'
6280 enabled armv6t2 && check_insn armv6t2 'movt r0, #0'
6281 enabled neon && check_insn neon 'vadd.i16 q0, q0, q0'
6282 enabled vfp && check_insn vfp 'fadds s0, s0, s0'
6283 enabled vfpv3 && check_insn vfpv3 'vmov.f32 s0, #1.0'
6284 enabled setend && check_insn setend 'setend be'
6286 # If neither inline nor external assembly can use the feature by default,
6287 # disable the main unsuffixed feature (e.g. HAVE_NEON).
6289 # For targets that support runtime CPU feature detection, don't disable
6290 # the main feature flag - there we assume that all supported toolchains
6291 # can assemble code for all instruction set features (e.g. NEON) with
6292 # suitable assembly flags (such as ".fpu neon
"); we don't check
6293 # specifically that they really do.
6294 [ $target_os = linux ] || [ $target_os = android ] ||
6295 map 'enabled_any ${v}_external ${v}_inline || disable $v' \
6298 check_inline_asm asm_mod_q '"add r0
, %Q0
, %R0
" :: "r
"((long long)0)'
6300 check_as as_arch_directive ".arch armv7-a
"
6301 check_as as_dn_directive "ra .dn d0.i16
"
6302 check_as as_fpu_directive ".fpu neon
"
6304 # llvm's integrated assembler supports .object_arch from llvm 3.5
6305 [ "$objformat" = elf32 ] || [ "$objformat" = elf64 ] &&
6306 check_as as_object_arch ".object_arch armv4
"
6308 # MS armasm fails to assemble our PIC constructs
6309 [ $target_os != win32 ] && enabled_all armv6t2 shared !pic && enable_weak_pic
6311 elif enabled mips; then
6313 # Check toolchain ISA level
6314 if enabled mips64; then
6315 enabled mips64r6 && check_inline_asm mips64r6 '"dlsa
$0, $0, $0, 1"' &&
6318 enabled mips64r2 && check_inline_asm mips64r2 '"dext
$0, $0, 0, 1"'
6320 disable mips32r6 && disable mips32r5 && disable mips32r2
6322 enabled mips32r6 && check_inline_asm mips32r6 '"aui
$0, $0, 0"' &&
6323 disable mips32r5 && disable mips32r2
6325 enabled mips32r5 && check_inline_asm mips32r5 '"eretnc
"'
6326 enabled mips32r2 && check_inline_asm mips32r2 '"ext
$0, $0, 0, 1"'
6328 disable mips64r6 && disable mips64r5 && disable mips64r2
6331 enabled mipsfpu && check_inline_asm mipsfpu '"cvt.d.l
$f0, $f2"'
6332 enabled mipsfpu && (enabled mips32r5 || enabled mips32r6 || enabled mips64r6) && check_inline_asm_flags mipsfpu '"cvt.d.l
$f0, $f1"' '-mfp64'
6334 enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb
$t0, $t1, $t2"' '-mdsp'
6335 enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb
$t0, $t1"' '-mdspr2'
6337 # MSA can be detected at runtime so we supply extra flags here
6338 enabled mipsfpu && enabled msa && check_inline_asm msa '"addvi.b
$w0, $w1, 1"' '-mmsa' && append MSAFLAGS '-mmsa'
6340 # loongson2 have no switch cflag so we can only probe toolchain ability
6341 enabled loongson2 && check_inline_asm loongson2 '"dmult.g
$8, $9, $10"' && disable loongson3
6343 # loongson3 is paired with MMI
6344 enabled loongson3 && check_inline_asm loongson3 '"gsldxc1
$f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
6346 # MMI can be detected at runtime too
6347 enabled mmi && check_inline_asm mmi '"pxor
$f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
6349 if enabled bigendian && enabled msa; then
6353 elif enabled parisc; then
6355 if enabled gcc; then
6356 case $($cc -dumpversion) in
6357 4.[3-9].*) check_cflags -fno-optimize-sibling-calls ;;
6361 elif enabled ppc; then
6363 enable local_aligned
6365 check_inline_asm dcbzl '"dcbzl
0, %0" :: "r
"(0)'
6366 check_inline_asm ibm_asm '"add
0, 0, 0"'
6367 check_inline_asm ppc4xx '"maclhw r10
, r11
, r12
"'
6368 check_inline_asm xform_asm '"lwzx
%1, %y0
" :: "Z
"(*(int*)0), "r
"(0)'
6370 if enabled altivec; then
6371 check_cflags -maltivec -mabi=altivec
6373 # check if our compiler supports Motorola AltiVec C API
6374 check_cc altivec altivec.h "vector signed int v1
= (vector signed int
) { 0 };
6375 vector signed int v2
= (vector signed int
) { 1 };
6376 v1
= vec_add
(v1
, v2
);"
6378 enabled altivec || warn "Altivec disabled
, possibly missing
--cpu flag
"
6381 if enabled vsx; then
6382 check_cflags -mvsx &&
6383 check_cc vsx altivec.h "int v
[4] = { 0 };
6384 vector signed int v1
= vec_vsx_ld
(0, v
);"
6387 if enabled power8; then
6388 check_cpp_condition power8 "altivec.h
" "defined
(_ARCH_PWR8
)"
6391 elif enabled riscv; then
6393 enabled rv && check_inline_asm rv '".option arch
, +zbb
\nrev
8 t0
, t1
"'
6394 enabled rvv && check_inline_asm rvv '".option arch
, +v
\nvsetivli zero
, 0, e8
, m1
, ta
, ma
"'
6395 enabled rv_zvbb && check_inline_asm rv_zvbb '".option arch
, +zvbb
\nvclz.v v0
, v8
"'
6397 elif enabled x86; then
6399 check_builtin rdtsc intrin.h "__rdtsc
()"
6400 check_builtin mm_empty mmintrin.h "_mm_empty
()"
6402 enable local_aligned
6404 # check whether EBP is available on x86
6405 # As 'i' is stored on the stack, this program will crash
6406 # if the base pointer is used to access it because the
6407 # base pointer is cleared in the inline assembly code.
6408 check_exec_crash <<EOF && enable ebp_available
6410 __asm__ volatile ("xorl
%%ebp
, %%ebp
" ::: "%ebp
");
6414 # check whether EBX is available on x86
6415 check_inline_asm ebx_available '""::"b
"(0)' &&
6416 check_inline_asm ebx_available '"":::"%ebx
"'
6418 # check whether xmm clobbers are supported
6419 check_inline_asm xmm_clobbers '"":::"%xmm0
"'
6421 check_inline_asm inline_asm_direct_symbol_refs '"movl
'$extern_prefix'test, %eax
"' ||
6422 check_inline_asm inline_asm_direct_symbol_refs '"movl
'$extern_prefix'test(%rip
), %eax
"'
6424 # check whether binutils is new enough to compile SSSE3/MMXEXT
6425 enabled ssse3 && check_inline_asm ssse3_inline '"pabsw
%xmm0
, %xmm0
"'
6426 enabled mmxext && check_inline_asm mmxext_inline '"pmaxub
%mm0
, %mm1
"'
6430 if test_cmd $x86asmexe_probe -v; then
6431 x86asmexe=$x86asmexe_probe
6433 x86asm_debug="-g -F dwarf
"
6435 X86ASM_DEPFLAGS='-MD $(@:.o=.d)'
6436 elif test_cmd $x86asmexe_probe --version; then
6437 x86asmexe=$x86asmexe_probe
6439 x86asm_debug="-g dwarf2
"
6440 X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > $(@:.o=.d)'
6443 check_x86asm x86asm "movbe ecx
, [5]"
6446 if ! disabled_any asm mmx x86asm; then
6448 for program in $x86asmexe nasm yasm; do
6449 probe_x86asm $program && break
6451 disabled x86asm && die "nasm
/yasm not found or too old. Use
--disable-x86asm for a crippled build.
"
6452 X86ASMFLAGS="-f $objformat"
6453 test -n "$extern_prefix" && append X86ASMFLAGS "-DPREFIX"
6454 case "$objformat" in
6455 elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;;
6458 enabled avx512 && check_x86asm avx512_external "vmovdqa32
[eax
]{k1
}{z
}, zmm0
"
6459 enabled avx512icl && check_x86asm avx512icl_external "vpdpwssds zmm31
{k1
}{z
}, zmm29
, zmm28
"
6460 enabled avx2 && check_x86asm avx2_external "vextracti128 xmm0
, ymm0
, 0"
6461 enabled xop && check_x86asm xop_external "vpmacsdd xmm0
, xmm1
, xmm2
, xmm3
"
6462 enabled fma4 && check_x86asm fma4_external "vfmaddps ymm0
, ymm1
, ymm2
, ymm3
"
6466 athlon*|opteron*|k8*|pentium|pentium-mmx|prescott|nocona|atom|geode)
6471 elif enabled loongarch; then
6472 enabled lsx && check_inline_asm lsx '"vadd.b
$vr0, $vr1, $vr2"' '-mlsx' && append LSXFLAGS '-mlsx'
6473 enabled lasx && check_inline_asm lasx '"xvadd.b
$xr0, $xr1, $xr2"' '-mlasx' && append LASXFLAGS '-mlasx'
6476 check_cc intrinsics_neon arm_neon.h "int16x8_t
test = vdupq_n_s16
(0)"
6478 check_ldflags -Wl,--as-needed
6479 check_ldflags -Wl,-z,noexecstack
6481 if ! disabled network; then
6482 check_func getaddrinfo $network_extralibs
6483 check_func inet_aton $network_extralibs
6485 check_type netdb.h "struct addrinfo
"
6486 check_type netinet/in.h "struct group_source_req
" -D_BSD_SOURCE
6487 check_type netinet/in.h "struct ip_mreq_source
" -D_BSD_SOURCE
6488 check_type netinet/in.h "struct ipv6_mreq
" -D_DARWIN_C_SOURCE
6489 check_type poll.h "struct pollfd
"
6490 check_type netinet/sctp.h "struct sctp_event_subscribe
"
6491 check_struct "sys
/socket.h
" "struct msghdr
" msg_flags
6492 check_struct "sys
/types.h sys
/socket.h
" "struct sockaddr
" sa_len
6493 check_type netinet/in.h "struct sockaddr_in6
"
6494 check_type "sys
/types.h sys
/socket.h
" "struct sockaddr_storage
"
6495 check_type "sys
/types.h sys
/socket.h
" socklen_t
6497 # Prefer arpa/inet.h over winsock2
6498 if check_headers arpa/inet.h ; then
6499 check_func closesocket
6500 elif check_headers winsock2.h ; then
6501 check_func_headers winsock2.h closesocket -lws2 &&
6502 network_extralibs="-lws2" ||
6503 { check_func_headers winsock2.h closesocket -lws2_32 &&
6504 network_extralibs="-lws2_32"; } || disable winsock2_h network
6505 check_func_headers ws2tcpip.h getaddrinfo $network_extralibs
6507 check_type ws2tcpip.h socklen_t
6508 check_type ws2tcpip.h "struct addrinfo
"
6509 check_type ws2tcpip.h "struct group_source_req
"
6510 check_type ws2tcpip.h "struct ip_mreq_source
"
6511 check_type ws2tcpip.h "struct ipv6_mreq
"
6512 check_type winsock2.h "struct pollfd
"
6513 check_struct winsock2.h "struct sockaddr
" sa_len
6514 check_type ws2tcpip.h "struct sockaddr_in6
"
6515 check_type ws2tcpip.h "struct sockaddr_storage
"
6521 check_builtin atomic_cas_ptr atomic.h "void
**ptr
; void
*oldval
, *newval
; atomic_cas_ptr
(ptr
, oldval
, newval
)"
6522 check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier
()"
6523 check_builtin MemoryBarrier windows.h "MemoryBarrier
()"
6524 check_builtin sync_val_compare_and_swap "" "int
*ptr
; int oldval
, newval
; __sync_val_compare_and_swap
(ptr
, oldval
, newval
)"
6525 check_builtin gmtime_r time.h "time_t
*time; struct tm
*tm
; gmtime_r
(time, tm
)"
6526 check_builtin localtime_r time.h "time_t
*time; struct tm
*tm
; localtime_r
(time, tm
)"
6528 check_builtin float16 "" "_Float16 f16var
"
6529 if enabled float16; then
6530 if enabled x86; then
6531 test_cpp_condition stddef.h "defined
(__F16C__
)" && enable fast_float16
6532 elif enabled arm || enabled aarch64; then
6537 case "$custom_allocator" in
6541 test -n "$malloc_prefix" ||
6542 malloc_prefix=$($pkg_config --variable=jemalloc_prefix $pkg_config_flags jemalloc 2>/dev/null)
6543 require_pkg_config custom_allocator jemalloc jemalloc/jemalloc.h ${malloc_prefix}malloc
6546 require_pkg_config custom_allocator libtcmalloc gperftools/tcmalloc.h tc_malloc
6550 require_pkg_config custom_allocator "$custom_allocator" stdlib.h malloc
6554 if test -n "$custom_allocator"; then
6555 add_extralibs "$custom_allocator_extralibs"
6558 check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
6559 check_func ${malloc_prefix}memalign && enable memalign
6560 check_func ${malloc_prefix}posix_memalign && enable posix_memalign
6563 check_func_headers stdlib.h arc4random_buf
6564 check_lib clock_gettime time.h clock_gettime || check_lib clock_gettime time.h clock_gettime -lrt
6567 check_func gethrtime
6569 check_func getrusage
6570 check_func gettimeofday
6575 # Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
6576 check_func_headers time.h nanosleep || check_lib nanosleep time.h nanosleep -lrt
6577 check_func_headers sys/prctl.h prctl
6578 check_func sched_getaffinity
6579 check_func setrlimit
6580 check_struct "sys
/stat.h
" "struct stat
" st_mtim.tv_nsec -D_BSD_SOURCE
6581 check_func strerror_r
6586 check_func_headers conio.h kbhit
6587 check_func_headers io.h setmode
6588 check_func_headers lzo/lzo1x.h lzo1x_999_compress
6589 check_func_headers mach/mach_time.h mach_absolute_time
6590 check_func_headers stdlib.h getenv
6591 check_func_headers sys/stat.h lstat
6592 check_func_headers sys/auxv.h getauxval
6593 check_func_headers sys/sysctl.h sysctlbyname
6595 check_func_headers windows.h GetModuleHandle
6596 check_func_headers windows.h GetProcessAffinityMask
6597 check_func_headers windows.h GetProcessTimes
6598 check_func_headers windows.h GetStdHandle
6599 check_func_headers windows.h GetSystemTimeAsFileTime
6600 check_func_headers windows.h LoadLibrary
6601 check_func_headers windows.h MapViewOfFile
6602 check_func_headers windows.h PeekNamedPipe
6603 check_func_headers windows.h SetConsoleTextAttribute
6604 check_func_headers windows.h SetConsoleCtrlHandler
6605 check_func_headers windows.h SetDllDirectory
6606 check_func_headers windows.h Sleep
6607 check_func_headers windows.h VirtualAlloc
6608 check_func_headers glob.h glob
6610 if enabled xlib; then
6611 check_pkg_config xlib_x11 x11 "X11
/Xlib.h
" XPending ||
6612 check_lib xlib_x11 "X11
/Xlib.h
" XPending -lX11 ||
6615 check_pkg_config xlib_xext xext "X11
/Xlib.h X11
/extensions
/XShm.h
" XShmAttach ||
6616 check_lib xlib_xext "X11
/Xlib.h X11
/extensions
/XShm.h
" XShmAttach -lXext ||
6619 check_pkg_config xlib_xv xv "X11
/Xlib.h X11
/extensions
/Xvlib.h
" XvGetPortAttribute ||
6620 check_lib xlib_xv "X11
/Xlib.h X11
/extensions
/Xvlib.h
" XvGetPortAttribute -lXv ||
6624 check_headers direct.h
6625 check_headers dirent.h
6626 check_headers dxgidebug.h
6627 check_headers dxva.h
6628 check_headers dxva2api.h -D_WIN32_WINNT=0x0600
6631 check_headers linux/dma-buf.h
6633 check_headers linux/perf_event.h
6634 check_headers malloc.h
6635 check_headers mftransform.h
6636 check_headers net/udplite.h
6637 check_headers poll.h
6638 check_headers pthread_np.h
6639 check_headers sys/param.h
6640 check_headers sys/resource.h
6641 check_headers sys/select.h
6642 check_headers sys/time.h
6643 check_headers sys/un.h
6644 check_headers termios.h
6645 check_headers unistd.h
6646 check_headers valgrind/valgrind.h
6647 check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
6648 check_func_headers VideoToolbox/VideoToolbox.h VTPixelTransferSessionCreate -framework VideoToolbox
6649 check_func_headers VideoToolbox/VideoToolbox.h VTPixelRotationSessionCreate -framework VideoToolbox
6650 check_headers windows.h
6651 check_headers asm/types.h
6653 # it seems there are versions of clang in some distros that try to use the
6654 # gcc headers, which explodes for stdatomic
6655 # so we also check that atomics actually work here
6657 # some configurations also require linking to libatomic, so try
6658 # both with -latomic and without
6659 for LATOMIC in "-latomic" ""; do
6660 check_builtin stdatomic stdatomic.h \
6661 "atomic_int foo
, bar
= -1; atomic_store
(&foo
, 0); foo
+= bar
" \
6662 $LATOMIC && eval stdatomic_extralibs="\
$LATOMIC" && break
6665 check_lib advapi32 "windows.h
" RegCloseKey -ladvapi32
6666 check_lib bcrypt "windows.h bcrypt.h
" BCryptGenRandom -lbcrypt &&
6667 check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM
"
6668 check_lib ole32 "windows.h objbase.h
" CoTaskMemFree -lole32
6669 check_lib shell32 "windows.h shellapi.h
" CommandLineToArgvW -lshell32
6670 check_lib psapi "windows.h psapi.h
" GetProcessMemoryInfo -lpsapi
6672 check_lib android android/native_window.h ANativeWindow_acquire -landroid
6673 check_lib mediandk "stdint.h media
/NdkMediaFormat.h
" AMediaFormat_new -lmediandk
6674 check_lib camera2ndk "stdbool.h stdint.h camera
/NdkCameraManager.h
" ACameraManager_create -lcamera2ndk
6676 enabled appkit && check_apple_framework AppKit
6677 enabled audiotoolbox && check_apple_framework AudioToolbox
6678 enabled avfoundation && check_apple_framework AVFoundation
6679 enabled coreimage && check_apple_framework CoreImage
6680 enabled metal && check_apple_framework Metal
6681 enabled videotoolbox && check_apple_framework VideoToolbox
6683 check_apple_framework CoreFoundation
6684 check_apple_framework CoreMedia
6685 check_apple_framework CoreVideo
6686 check_apple_framework CoreAudio
6688 enabled avfoundation && {
6689 disable coregraphics applicationservices
6690 check_lib coregraphics CoreGraphics/CoreGraphics.h CGGetActiveDisplayList "-framework CoreGraphics
" ||
6691 check_lib applicationservices ApplicationServices/ApplicationServices.h CGGetActiveDisplayList "-framework ApplicationServices
"; }
6693 enabled videotoolbox && {
6694 check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString "-framework CoreServices
"
6695 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia
"
6696 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVCWithAlpha "-framework CoreMedia
"
6697 check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_VP9 "-framework CoreMedia
"
6698 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6699 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange "-framework CoreVideo
"
6700 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6701 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange "-framework CoreVideo
"
6702 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange "-framework CoreVideo
"
6703 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange "-framework CoreVideo
"
6704 check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange "-framework CoreVideo
"
6705 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ "-framework CoreVideo
"
6706 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2100_HLG "-framework CoreVideo
"
6707 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_Linear "-framework CoreVideo
"
6708 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferYCbCrMatrix_ITU_R_2020 "-framework CoreVideo
"
6709 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferColorPrimaries_ITU_R_2020 "-framework CoreVideo
"
6710 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2020 "-framework CoreVideo
"
6711 check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_428_1 "-framework CoreVideo
"
6714 enabled metal && test_cmd $metalcc -v || disable metal
6716 check_struct "sys
/time.h sys
/resource.h
" "struct rusage
" ru_maxrss
6718 check_type "windows.h dxva.h
" "DXVA_PicParams_AV1
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6719 check_type "windows.h dxva.h
" "DXVA_PicParams_HEVC
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6720 check_type "windows.h dxva.h
" "DXVA_PicParams_VP9
" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
6721 check_type "windows.h dxgi1_2.h
" "DXGI_OUTDUPL_FRAME_INFO
"
6722 check_type "windows.h dxgi1_2.h
" "IDXGIOutput1
"
6723 check_type "windows.h dxgi1_5.h
" "IDXGIOutput5
"
6724 check_type "windows.h d3d11.h
" "ID3D11VideoDecoder
"
6725 check_type "windows.h d3d11.h
" "ID3D11VideoContext
"
6726 check_type "windows.h d3d12.h
" "ID3D12Device
"
6727 check_type "windows.h d3d12video.h
" "ID3D12VideoDecoder
"
6728 check_type "windows.h
" "DPI_AWARENESS_CONTEXT
" -D_WIN32_WINNT=0x0A00
6729 check_type "d3d9.h dxva2api.h
" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602
6730 check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat
6732 check_type "vdpau
/vdpau.h
" "VdpPictureInfoHEVC
"
6733 check_type "vdpau
/vdpau.h
" "VdpPictureInfoVP9
"
6734 check_type "vdpau
/vdpau.h
" "VdpPictureInfoAV1
"
6736 if [ -z "$nvccflags" ]; then
6737 nvccflags=$nvccflags_default
6740 nvccflags="$nvccflags -std=c
++11"
6742 if enabled x86_64 || enabled ppc64 || enabled aarch64; then
6743 nvccflags="$nvccflags -m64"
6745 nvccflags="$nvccflags -m32"
6748 if enabled cuda_nvcc; then
6749 nvccflags="$nvccflags -ptx"
6751 nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -Wno-c++11-narrowing -include ${source_link}/compat
/cuda
/cuda_runtime.h
"
6752 check_nvcc cuda_llvm
6755 if ! disabled ffnvcodec; then
6756 ffnv_hdr_list="ffnvcodec
/nvEncodeAPI.h ffnvcodec
/dynlink_cuda.h ffnvcodec
/dynlink_cuviddec.h ffnvcodec
/dynlink_nvcuvid.h
"
6757 check_pkg_config ffnvcodec "ffnvcodec
>= 12.1.14.0" "$ffnv_hdr_list" "" || \
6758 check_pkg_config ffnvcodec "ffnvcodec
>= 12.0.16.1 ffnvcodec
< 12.1" "$ffnv_hdr_list" "" || \
6759 check_pkg_config ffnvcodec "ffnvcodec
>= 11.1.5.3 ffnvcodec
< 12.0" "$ffnv_hdr_list" "" || \
6760 check_pkg_config ffnvcodec "ffnvcodec
>= 11.0.10.3 ffnvcodec
< 11.1" "$ffnv_hdr_list" "" || \
6761 check_pkg_config ffnvcodec "ffnvcodec
>= 8.1.24.15 ffnvcodec
< 8.2" "$ffnv_hdr_list" ""
6764 if enabled_all libglslang libshaderc; then
6765 die "ERROR
: libshaderc and libglslang are mutually exclusive
, if in doubt
, disable libglslang
"
6768 check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION
(WINAPI_PARTITION_DESKTOP
)"
6770 if ! disabled w32threads && ! enabled pthreads; then
6771 check_func_headers "windows.h process.h
" _beginthreadex &&
6772 check_type "windows.h
" CONDITION_VARIABLE &&
6773 check_type "windows.h
" INIT_ONCE &&
6774 enable w32threads || disable w32threads
6775 if ! enabled w32threads && enabled winrt; then
6776 check_func_headers "windows.h
" CreateThread &&
6777 enable w32threads || disable w32threads
6781 # check for some common methods of building with pthread support
6782 # do this before the optional library checks as some of them require pthreads
6783 if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
6784 if check_lib pthreads pthread.h pthread_join -pthread &&
6785 check_lib pthreads pthread.h pthread_create -pthread; then
6787 elif check_lib pthreads pthread.h pthread_join -pthreads &&
6788 check_lib pthreads pthread.h pthread_create -pthreads; then
6789 add_cflags -pthreads
6790 elif check_lib pthreads pthread.h pthread_join -ldl -pthread &&
6791 check_lib pthreads pthread.h pthread_create -ldl -pthread; then
6792 add_cflags -ldl -pthread
6793 elif check_lib pthreads pthread.h pthread_join -lpthreadGC2 &&
6794 check_lib pthreads pthread.h pthread_create -lpthreadGC2; then
6796 elif check_lib pthreads pthread.h pthread_join -lpthread &&
6797 check_lib pthreads pthread.h pthread_create -lpthread; then
6799 elif check_func pthread_join && check_func pthread_create; then
6802 check_cc pthreads "pthread.h
" "static pthread_mutex_t atomic_lock
= PTHREAD_MUTEX_INITIALIZER
"
6804 if enabled pthreads; then
6805 check_builtin sem_timedwait semaphore.h "sem_t
*s
; sem_init
(s
,0,0); sem_timedwait
(s
,0); sem_destroy
(s
)" $pthreads_extralibs
6806 check_func pthread_cancel $pthreads_extralibs
6808 if enabled pthread_np_h; then
6809 hdrs="$hdrs pthread_np.h
"
6811 check_lib pthread_set_name_np "$hdrs" pthread_set_name_np -lpthread
6812 check_lib pthread_setname_np "$hdrs" pthread_setname_np -lpthread
6816 enabled zlib && { check_pkg_config zlib zlib "zlib.h
" zlibVersion ||
6817 check_lib zlib zlib.h zlibVersion -lz; }
6818 enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2
6819 enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma
6821 enabled zlib && test_exec $zlib_extralibs <<EOF && enable zlib_gzip
6824 if (zlibCompileFlags() & (1 << 17)) return 1;
6829 [ -x "$
(command -v gzip)" ] && enable gzip
6831 enabled zlib_gzip && enabled gzip || disable ptx_compression
6833 # On some systems dynamic loading requires no extra linker flags
6834 check_lib libdl dlfcn.h "dlopen dlsym
" || check_lib libdl dlfcn.h "dlopen dlsym
" -ldl
6836 check_lib libm math.h sin -lm
6844 for func in $MATH_FUNCS; do
6845 eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs
6848 # these are off by default, so fail if requested and not available
6849 enabled avisynth && { require_headers "avisynth
/avisynth_c.h avisynth
/avs
/version.h
" &&
6850 { 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" ||
6851 die "ERROR
: AviSynth
+ header version must be
>= 3.7.3"; } }
6852 enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR
: failed checking
for nvcc.
"; }
6853 enabled chromaprint && { check_pkg_config chromaprint libchromaprint "chromaprint.h
" chromaprint_get_version ||
6854 require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; }
6855 enabled decklink && { require_headers DeckLinkAPI.h &&
6856 { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION
>= 0x0a0b0000" || die "ERROR
: Decklink API version must be
>= 10.11"; } }
6857 enabled frei0r && require_headers "frei0r.h
"
6858 enabled gmp && require gmp gmp.h mpz_export -lgmp
6859 enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
6860 enabled jni && { [ $target_os = "android
" ] && check_headers jni.h && enabled pthreads || die "ERROR
: jni not found
"; }
6861 enabled ladspa && require_headers "ladspa.h dlfcn.h
"
6862 enabled lcms2 && require_pkg_config lcms2 "lcms2
>= 2.13" lcms2.h cmsCreateContext
6863 enabled libaom && require_pkg_config libaom "aom
>= 2.0.0" aom/aom_codec.h aom_codec_version
6864 enabled libaribb24 && { check_pkg_config libaribb24 "aribb24
> 1.0.3" "aribb24
/aribb24.h
" arib_instance_new ||
6865 { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24
/aribb24.h
" arib_instance_new; } ||
6866 die "ERROR
: libaribb24 requires version higher than
1.0.3 or
--enable-gpl.
"; }
6867 enabled libaribcaption && require_pkg_config libaribcaption "libaribcaption
>= 1.1.1" "aribcaption
/aribcaption.h
" aribcc_context_alloc
6868 enabled lv2 && require_pkg_config lv2 lilv-0 "lilv
/lilv.h
" lilv_world_new
6869 enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
6870 enabled libass && require_pkg_config libass "libass
>= 0.11.0" ass/ass.h ass_library_init
6871 enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open
6872 enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open
6873 enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
6874 { check_lib libcelt celt/celt.h celt_decoder_create_custom -lcelt0 ||
6875 die "ERROR
: libcelt must be installed and version must be
>= 0.11.0.
"; }
6876 enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
6877 enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
6878 enabled libdav1d && require_pkg_config libdav1d "dav1d
>= 0.5.0" "dav1d
/dav1d.h
" dav1d_version
6879 enabled libdavs2 && require_pkg_config libdavs2 "davs2
>= 1.6.0" davs2.h davs2_decoder_open
6880 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
6881 enabled libdrm && check_pkg_config libdrm libdrm xf86drm.h drmGetVersion
6882 enabled libdvdnav && require_pkg_config libdvdnav "dvdnav
>= 6.1.1" dvdnav/dvdnav.h dvdnav_open2
6883 enabled libdvdread && require_pkg_config libdvdread "dvdread
>= 6.1.2" dvdread/dvd_reader.h DVDOpen2
6884 enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac
/aacenc_lib.h
" aacEncOpen ||
6885 { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
6886 warn "using libfdk without pkg-config
"; } }
6887 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"
6888 enabled libflite && require libflite "flite
/flite.h
" flite_init $flite_extralibs
6889 enabled fontconfig && enable libfontconfig
6890 enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig
/fontconfig.h
" FcInit
6891 enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H
" FT_Init_FreeType
6892 enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
6893 enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create
6894 enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
6895 -lglslang -lMachineIndependent -lGenericCodeGen \
6896 -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ||
6897 require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \
6898 -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \
6899 -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ; }
6900 enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
6901 require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
6902 enabled libgsm && { for gsm_hdr in "gsm.h
" "gsm
/gsm.h
"; do
6903 check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break;
6904 done || die "ERROR
: libgsm not found
"; }
6905 enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs
6906 enabled libjxl && require_pkg_config libjxl "libjxl
>= 0.7.0" jxl/decode.h JxlDecoderVersion &&
6907 require_pkg_config libjxl_threads "libjxl_threads
>= 0.7.0" jxl/thread_parallel_runner.h JxlThreadParallelRunner
6908 enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc
6909 enabled libkvazaar && require_pkg_config libkvazaar "kvazaar
>= 2.0.0" kvazaar.h kvz_api_get
6910 enabled liblc3 && require_pkg_config liblc3 "lc3
>= 1.1.0" lc3.h lc3_hr_setup_encoder
6911 enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_create
6913 if enabled libmfx && enabled libvpl; then
6914 die "ERROR
: can not use libmfx and libvpl together
"
6915 # While it may appear that require is being used as a pkg-config
6916 # fallback for libmfx, it is actually being used to detect a different
6917 # installation route altogether. If libmfx is installed via the Intel
6918 # Media SDK or Intel Media Server Studio, these don't come with
6919 # pkg-config support. Instead, users should make sure that the build
6920 # can find the libraries and headers through other means.
6921 elif enabled libmfx; then
6922 { check_pkg_config libmfx "libmfx
>= 1.28 libmfx
< 2.0" "mfxvideo.h
" MFXInit ||
6923 # Some old versions of libmfx have the following settings in libmfx.pc:
6924 # includedir=/usr/include
6925 # Cflags: -I${includedir}
6926 # So add -I${includedir}/mfx to CFLAGS
6927 { check_pkg_config libmfx "libmfx
>= 1.28 libmfx
< 2.0" "mfx
/mfxvideo.h
" MFXInit && add_cflags -I${libmfx_incdir}/mfx; } ||
6928 { require libmfx "mfxvideo.h mfxdefs.h
" MFXInit "-llibmfx $advapi32_extralibs" &&
6929 { test_cpp_condition mfxdefs.h "MFX_VERSION
>= 1028 && MFX_VERSION
< 2000" || die "ERROR
: libmfx version must be
>= 1.28 and
< 2.0"; } &&
6930 warn "using libmfx without pkg-config
"; } } &&
6931 warn "libmfx is deprecated. Please run configure with
--enable-libvpl to use libvpl instead.
"
6932 elif enabled libvpl; then
6933 # Consider pkg-config only. The name of libmfx is still passed to check_pkg_config function for --enable-libvpl option
6934 # because QSV has dependency on libmfx, we can use the same dependency if using libmfx in this check. The package name
6935 # is extracted from "vpl
>= 2.6"
6936 check_pkg_config libmfx "vpl
>= 2.6" "mfxvideo.h mfxdispatcher.h
" MFXLoad || \
6937 die "ERROR
: libvpl
>= 2.6 not found
"
6938 add_cflags -DMFX_DEPRECATED_OFF
6939 check_type "vpl
/mfxdefs.h vpl
/mfxvideo.h
" "struct mfxConfigInterface
"
6942 if enabled libmfx; then
6943 check_cc MFX_CODEC_VP9 "mfxdefs.h mfxstructures.h
" "MFX_CODEC_VP9
"
6946 enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load
6947 enabled libmp3lame && require "libmp3lame
>= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs
6948 enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine ||
6949 require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; }
6950 enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif ||
6951 check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppif -lnppc -lnppidei ||
6952 die "ERROR
: libnpp not found
"; }
6953 enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
6954 enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
6955 enabled libopencv && { check_headers opencv2/core/core_c.h &&
6956 { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader ||
6957 require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
6958 require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
6959 enabled libopenh264 && require_pkg_config libopenh264 "openh264
>= 1.3.0" wels/codec_api.h WelsGetCodecVersion
6960 enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version ||
6961 { require_pkg_config libopenjpeg "libopenjp2
>= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
6962 enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt
>= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
6963 enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } ||
6964 { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version ||
6965 require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } }
6966 enabled libopus && {
6967 enabled libopus_decoder && {
6968 require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
6970 enabled libopus_encoder && {
6971 require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
6974 enabled libplacebo && require_pkg_config libplacebo "libplacebo
>= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
6975 enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
6976 enabled libqrencode && require_pkg_config libqrencode libqrencode qrencode.h QRcode_encodeString
6977 enabled libquirc && require libquirc quirc.h quirc_decode -lquirc
6978 enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq
>= 0.7.1" amqp.h amqp_new_connection
6979 enabled librav1e && require_pkg_config librav1e "rav1e
>= 0.5.0" rav1e.h rav1e_context_new
6980 enabled librist && require_pkg_config librist "librist
>= 0.2.7" librist/librist.h rist_receiver_create
6981 enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_new_from_data
6982 enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
6983 enabled librubberband && require_pkg_config librubberband "rubberband
>= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
6984 enabled libshaderc && require_pkg_config spirv_compiler "shaderc
>= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize
6985 enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer
6986 enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init ||
6987 require libsmbclient libsmbclient.h smbc_init -lsmbclient; }
6988 enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++
6989 enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
6990 enabled libssh && require_pkg_config libssh "libssh
>= 0.6.0" libssh/sftp.h sftp_init
6991 enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
6992 enabled libsrt && require_pkg_config libsrt "srt
>= 1.3.0" srt/srt.h srt_socket
6993 enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc
>= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle
6994 enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
6995 enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
6996 enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
6997 enabled libtls && require_pkg_config libtls libtls tls.h tls_configure
6998 enabled libtorch && check_cxxflags -std=c++17 && require_cpp libtorch torch/torch.h "torch
::Tensor
" -ltorch -lc10 -ltorch_cpu -lstdc++ -lpthread
6999 enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
7000 { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
7001 die "ERROR
: libtwolame must be installed and version must be
>= 0.3.10"; }
7002 enabled libuavs3d && require_pkg_config libuavs3d "uavs3d
>= 1.1.41" uavs3d.h uavs3d_decode
7003 enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
7004 enabled libvidstab && require_pkg_config libvidstab "vidstab
>= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
7005 enabled libvmaf && require_pkg_config libvmaf "libvmaf
>= 2.0.0" libvmaf.h vmaf_init
7006 enabled libvmaf && check_pkg_config libvmaf_cuda "libvmaf
>= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init
7007 enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
7008 enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
7009 require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
7012 enabled libvpx_vp8_decoder && {
7013 check_pkg_config libvpx_vp8_decoder "vpx
>= 1.4.0" "vpx
/vpx_decoder.h vpx
/vp8dx.h
" vpx_codec_vp8_dx ||
7014 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"
7016 enabled libvpx_vp8_encoder && {
7017 check_pkg_config libvpx_vp8_encoder "vpx
>= 1.4.0" "vpx
/vpx_encoder.h vpx
/vp8cx.h
" vpx_codec_vp8_cx ||
7018 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"
7020 enabled libvpx_vp9_decoder && {
7021 check_pkg_config libvpx_vp9_decoder "vpx
>= 1.4.0" "vpx
/vpx_decoder.h vpx
/vp8dx.h
" vpx_codec_vp9_dx ||
7022 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"
7024 enabled libvpx_vp9_encoder && {
7025 check_pkg_config libvpx_vp9_encoder "vpx
>= 1.4.0" "vpx
/vpx_encoder.h vpx
/vp8cx.h
" vpx_codec_vp9_cx ||
7026 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"
7028 if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
7029 die "libvpx enabled but no supported decoders found
"
7033 enabled libwebp && {
7034 enabled libwebp_encoder && require_pkg_config libwebp "libwebp
>= 0.2.0" webp/encode.h WebPGetEncoderVersion
7035 enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux
>= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
7036 enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h
" x264_encoder_encode &&
7037 require_cpp_condition libx264 x264.h "X264_BUILD
>= 155" && {
7038 [ "$toolchain" != "msvc
" ] ||
7039 require_cpp_condition libx264 x264.h "X264_BUILD
>= 158"; } &&
7040 check_cpp_condition libx264_hdr10 x264.h "X264_BUILD
>= 163" &&
7041 check_cpp_condition libx262 x264.h "X264_MPEG2
"
7042 enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get &&
7043 require_cpp_condition libx265 x265.h "X265_BUILD
>= 89"
7044 enabled libxavs && require libxavs "stdint.h xavs.h
" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs"
7045 enabled libxavs2 && require_pkg_config libxavs2 "xavs2
>= 1.3.0" "stdint.h xavs2.h
" xavs2_api_get
7046 enabled libxevd && require_pkg_config libxevd "xevd
>= 0.4.1" "xevd.h
" xevd_decode
7047 enabled libxeve && require_pkg_config libxeve "xeve
>= 0.4.3" "xeve.h
" xeve_encode
7048 enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
7049 enabled libzimg && require_pkg_config libzimg "zimg
>= 2.7.0" zimg.h zimg_get_api_version
7050 enabled libzmq && require_pkg_config libzmq "libzmq
>= 4.2.1" zmq.h zmq_ctx_new
7051 enabled libzvbi && require_pkg_config libzvbi zvbi-0.2 libzvbi.h vbi_decoder_new &&
7052 { test_cpp_condition libzvbi.h "VBI_VERSION_MAJOR
> 0 || VBI_VERSION_MINOR
> 2 || VBI_VERSION_MINOR
== 2 && VBI_VERSION_MICRO
>= 28" ||
7053 enabled gpl || die "ERROR
: libzvbi requires version
0.2.28 or
--enable-gpl.
"; }
7054 enabled libxml2 && require_pkg_config libxml2 libxml-2.0 libxml2/libxml/xmlversion.h xmlCheckVersion
7055 enabled mbedtls && { check_pkg_config mbedtls mbedtls mbedtls/x509_crt.h mbedtls_x509_crt_init ||
7056 check_pkg_config mbedtls mbedtls mbedtls/ssl.h mbedtls_ssl_init ||
7057 check_lib mbedtls mbedtls/ssl.h mbedtls_ssl_init -lmbedtls -lmbedx509 -lmbedcrypto ||
7058 die "ERROR
: mbedTLS not found
"; }
7059 enabled mediacodec && { enabled jni || die "ERROR
: mediacodec requires
--enable-jni"; }
7060 enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host ||
7061 { ! enabled cross_compile &&
7062 add_cflags -isystem/opt/vc/include/ -isystem/opt/vc/include/interface/vmcs_host/linux -isystem/opt/vc/include/interface/vcos/pthreads -fgnu89-inline &&
7063 add_ldflags -L/opt/vc/lib/ &&
7064 check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } ||
7065 die "ERROR
: mmal not found
" &&
7066 check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
"; }
7067 enabled openal && { check_pkg_config openal "openal
>= 1.1" "AL
/al.h
" alGetError ||
7068 { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
7069 check_lib openal 'AL/al.h' alGetError "${al_extralibs}" && break; done } ||
7070 die "ERROR
: openal not found
"; } &&
7071 { test_cpp_condition "AL
/al.h
" "defined
(AL_VERSION_1_1
)" ||
7072 die "ERROR
: openal must be installed and version must be
1.1 or compatible
"; }
7073 enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel ||
7074 check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL ||
7075 check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL ||
7076 die "ERROR
: opencl not found
"; } &&
7077 { test_cpp_condition "OpenCL
/cl.h
" "defined
(CL_VERSION_1_2
)" ||
7078 test_cpp_condition "CL
/cl.h
" "defined
(CL_VERSION_1_2
)" ||
7079 die "ERROR
: opencl must be installed and version must be
1.2 or compatible
"; }
7080 enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" ||
7081 check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" ||
7082 check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL
" ||
7083 check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES
" ||
7084 die "ERROR
: opengl not found.
"
7086 enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame ||
7087 { ! enabled cross_compile &&
7088 add_cflags -isystem/opt/vc/include/IL &&
7089 test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame; } ||
7090 die "ERROR
: OpenMAX IL headers from raspberrypi
/firmware not found
"; } &&
7092 enabled omx && require_headers OMX_Core.h
7093 enabled openssl && { { check_pkg_config openssl "openssl
>= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
7094 { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR
: OpenSSL
>=3.0.0 requires
--enable-version3"; }; } ||
7095 { enabled gpl && ! enabled nonfree && die "ERROR
: OpenSSL
<3.0.0 is incompatible with the gpl
"; } ||
7096 check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
7097 check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
7098 check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
7099 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
7100 check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
7101 check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
7102 die "ERROR
: openssl not found
"; }
7103 enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
7104 enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
7105 require_pkg_config rockchip_mpp "rockchip_mpp
>= 1.3.7" rockchip/rk_mpi.h mpp_create &&
7107 die "ERROR
: rkmpp requires
--enable-libdrm"; }
7109 enabled vapoursynth && require_pkg_config vapoursynth "vapoursynth-script
>= 42" VSScript.h vsscript_init
7112 if enabled gcrypt; then
7113 GCRYPT_CONFIG="${cross_prefix}libgcrypt-config
"
7114 if "${GCRYPT_CONFIG}" --version > /dev/null 2>&1; then
7115 gcrypt_cflags=$("${GCRYPT_CONFIG}" --cflags)
7116 gcrypt_extralibs=$("${GCRYPT_CONFIG}" --libs)
7117 check_func_headers gcrypt.h gcry_mpi_new $gcrypt_cflags $gcrypt_extralibs ||
7118 die "ERROR
: gcrypt not found
"
7119 add_cflags $gcrypt_cflags
7121 require gcrypt gcrypt.h gcry_mpi_new -lgcrypt
7125 if enabled sdl2; then
7126 SDL2_CONFIG="${cross_prefix}sdl2-config
"
7127 test_pkg_config sdl2 "sdl2
>= 2.0.1 sdl2
< 3.0.0" SDL_events.h SDL_PollEvent
7128 if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
7129 sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
7130 sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
7131 test_cpp_condition SDL.h "(SDL_MAJOR_VERSION
<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
7132 test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 |
SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x030000" $sdl2_cflags &&
7133 check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &&
7136 if test $target_os = "mingw32"; then
7137 sdl2_extralibs=$(filter_out '-mwindows' $sdl2_extralibs)
7141 if enabled decklink; then
7143 mingw32*|mingw64*|win32|win64)
7144 decklink_outdev_extralibs="$decklink_outdev_extralibs -lole32 -loleaut32"
7145 decklink_indev_extralibs="$decklink_indev_extralibs -lole32 -loleaut32"
7150 enabled securetransport &&
7151 check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" &&
7152 check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" ||
7153 disable securetransport
7155 enabled securetransport &&
7156 check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security"
7159 check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 &&
7160 test_cpp_condition winerror.h "defined(SEC_I_CONTEXT_EXPIRED)" &&
7161 schannel_extralibs="-lsecur32" ||
7164 makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
7166 && [ 0$(makeinfo --version | grep "texinfo" | sed 's/.*texinfo[^0-9]*\([0-9]*\)\..*/\1/') -ge 5 ] \
7167 && enable makeinfo_html || disable makeinfo_html
7168 disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
7169 perl -v > /dev/null 2>&1 && enable perl || disable perl
7170 pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
7171 rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
7172 xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint
7174 # check V4L2 codecs available in the API
7175 if enabled v4l2_m2m; then
7176 check_headers linux/fb.h
7177 check_headers linux/videodev2.h
7178 test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
7179 check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;"
7180 check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;"
7181 check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;"
7182 check_cc mpeg2_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG2;"
7183 check_cc mpeg4_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG4;"
7184 check_cc hevc_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_HEVC;"
7185 check_cc h263_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H263;"
7186 check_cc h264_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_H264;"
7187 check_cc vp8_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP8;"
7188 check_cc vp9_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VP9;"
7191 check_headers sys/videoio.h
7192 test_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
7194 check_lib user32 "windows.h winuser.h" GetShellWindow -luser32
7195 check_lib vfw32 "windows.h vfw.h" capCreateCaptureWindow -lvfw32
7196 # check that WM_CAP_DRIVER_CONNECT is defined to the proper value
7197 # w32api 3.12 had it defined wrong
7198 check_cpp_condition vfwcap_defines vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER"
7200 check_type "dshow.h" IBaseFilter
7202 # check for ioctl_meteor.h, ioctl_bt848.h and alternatives
7203 check_headers "dev/bktr/ioctl_meteor.h dev/bktr/ioctl_bt848.h" ||
7204 check_headers "machine/ioctl_meteor.h machine/ioctl_bt848.h" ||
7205 check_headers "dev/video/meteor/ioctl_meteor.h dev/video/bktr/ioctl_bt848.h" ||
7206 check_headers "dev/ic/bt8xx.h"
7208 if check_struct sys/soundcard.h audio_buf_info bytes; then
7209 enable_sanitized sys/soundcard.h
7211 test_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <<EOF && add_cppflags -D__BSD_VISIBLE -D__XSI_VISIBLE && enable_sanitized sys/soundcard.h
7212 #include <sys/soundcard.h>
7217 enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimestamp ||
7218 check_lib alsa alsa/asoundlib.h snd_pcm_htimestamp -lasound; }
7221 require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
7223 enabled sndio && check_pkg_config sndio sndio sndio.h sio_open
7225 if enabled libcdio; then
7226 check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open ||
7227 check_pkg_config libcdio libcdio_paranoia "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open ||
7228 check_lib libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
7229 check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio ||
7230 die "ERROR: No usable libcdio/cdparanoia found"
7233 enabled libxcb && check_pkg_config libxcb "xcb >= 1.4" xcb/xcb.h xcb_connect ||
7234 disable libxcb_shm libxcb_shape libxcb_xfixes
7236 if enabled libxcb; then
7237 enabled libxcb_shm && check_pkg_config libxcb_shm xcb-shm xcb/shm.h xcb_shm_attach
7238 enabled libxcb_shape && check_pkg_config libxcb_shape xcb-shape xcb/shape.h xcb_shape_get_rectangles
7239 enabled libxcb_xfixes && check_pkg_config libxcb_xfixes xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image
7242 check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
7244 # check if building for desktop or uwp
7245 test_cpp <<EOF && enable uwp
7246 #ifdef WINAPI_FAMILY
7247 #include <winapifamily.h>
7248 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
7249 #error desktop, not uwp
7251 // WINAPI_FAMILY_APP, WINAPI_FAMILY_PHONE_APP => UWP
7254 #error no family set
7258 mediafoundation_extralibs="-lmfuuid -lole32 -lstrmiids"
7260 if enabled uwp; then
7261 # In UWP mode, we can't use LoadLibrary+GetProcAddress to conditionally
7262 # try to load these APIs at runtime, like we do in regular desktop mode -
7263 # therefore, we need to link directly against these APIs.
7264 d3d11va_extralibs="-ldxgi -ld3d11"
7265 d3d12va_extralibs="-ldxgi -ld3d12"
7266 vaapi_win32_extralibs="-ldxgi"
7267 mediafoundation_extralibs="-lmfplat $mediafoundation_extralibs"
7271 check_pkg_config libdrm_getfb2 libdrm "xf86drmMode.h" drmModeGetFB2
7274 check_pkg_config vaapi "libva >= 0.35.0" "va/va.h" vaInitialize
7276 if enabled vaapi; then
7278 mingw32*|mingw64*|win32|win64)
7279 check_pkg_config vaapi_win32 "libva-win32" "va/va_win32.h" vaGetDisplayWin32
7282 check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM
7286 if enabled xlib_x11; then
7287 check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay
7290 check_cpp_condition vaapi_1 "va/va.h" "VA_CHECK_VERSION(1, 0, 0)"
7292 check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
7293 check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
7294 check_struct "va/va.h" "VADecPictureParameterBufferAV1" bit_depth_idx
7295 check_type "va/va.h va/va_vpp.h" "VAProcFilterParameterBufferHDRToneMapping"
7296 check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
7297 check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" blend_flags
7298 check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
7299 check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG"
7300 check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8"
7301 check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9"
7302 check_type "va/va.h va/va_enc_av1.h" "VAEncPictureParameterBufferAV1"
7305 if enabled_all opencl libdrm ; then
7306 check_type "CL/cl_intel.h" "clCreateImageFromFdINTEL_fn" &&
7307 enable opencl_drm_beignet
7308 check_func_headers "CL/cl_ext.h" clImportMemoryARM &&
7309 enable opencl_drm_arm
7312 if enabled_all opencl vaapi ; then
7313 if enabled opencl_drm_beignet ; then
7314 enable opencl_vaapi_beignet
7316 check_type "CL/cl.h CL/cl_va_api_media_sharing_intel.h" "clCreateFromVA_APIMediaSurfaceINTEL_fn" &&
7317 enable opencl_vaapi_intel_media
7321 if enabled_all opencl dxva2 ; then
7322 check_type "CL/cl_dx9_media_sharing.h" cl_dx9_surface_info_khr &&
7326 if enabled_all opencl d3d11va ; then
7327 check_type "CL/cl_d3d11.h" clGetDeviceIDsFromD3D11KHR_fn &&
7331 if enabled_all opencl videotoolbox ; then
7332 check_func_headers OpenCL/cl_gl_ext.h clCreateImageFromIOSurfaceWithPropertiesAPPLE -framework VideoToolbox -framework OpenCL &&
7333 enable opencl_videotoolbox
7337 check_cpp_condition vdpau vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP"
7340 check_lib vdpau_x11 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau -lX11
7342 if enabled vulkan; then
7343 check_pkg_config_header_only vulkan "vulkan >= 1.3.277" "vulkan/vulkan.h" "defined VK_VERSION_1_3" ||
7344 check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)"
7347 if disabled vulkan; then
7348 disable libglslang libshaderc spirv_compiler
7351 if enabled x86; then
7353 freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*)
7356 disable ffnvcodec cuvid nvdec nvenc
7359 elif enabled_any aarch64 ppc64 && ! enabled bigendian; then
7364 disable ffnvcodec cuvid nvdec nvenc
7368 disable ffnvcodec cuvid nvdec nvenc
7371 enabled ffnvcodec && enable cuda
7374 test_cc -I$source_path <<EOF || disable nvenc
7375 #include <ffnvcodec/nvEncodeAPI.h>
7376 NV_ENCODE_API_FUNCTION_LIST flist;
7377 void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_CODEC_H264_GUID } }; }
7378 int main(void) { return 0; }
7381 if enabled nvenc; then
7382 check_type "ffnvcodec/nvEncodeAPI.h" "NV_ENC_PIC_PARAMS_AV1"
7385 if enabled_any nvdec cuvid; then
7386 check_type "ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h" "CUVIDAV1PICPARAMS"
7390 check_cpp_condition amf "AMF/core/Version.h" \
7391 "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x00010004001d0000"
7393 # Funny iconv installations are not unusual, so check it after all flags have been set
7394 if enabled libc_iconv; then
7395 check_func_headers iconv.h iconv
7396 elif enabled iconv; then
7397 check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv
7400 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
7402 # add some useful compiler flags if supported
7403 check_cflags -Wdeclaration-after-statement
7405 check_cflags -Wdisabled-optimization
7406 check_cflags -Wpointer-arith
7407 check_cflags -Wredundant-decls
7408 check_cflags -Wwrite-strings
7409 check_cflags -Wtype-limits
7410 check_cflags -Wundef
7411 check_cflags -Wmissing-prototypes
7412 check_cflags -Wstrict-prototypes
7413 check_cflags -Wempty-body
7415 if enabled extra_warnings; then
7416 check_cflags -Wcast-qual
7417 check_cflags -Wextra
7418 check_cflags -Wpedantic
7421 check_disable_warning(){
7422 warning_flag=-W${1#-Wno-}
7423 test_cflags $unknown_warning_flags $warning_flag && add_cflags $1
7426 test_cflags -Werror=unused-command-line-argument &&
7427 append unknown_warning_flags "-Werror=unused-command-line-argument"
7428 test_cflags -Werror=unknown-warning-option &&
7429 append unknown_warning_flags "-Werror=unknown-warning-option"
7431 check_disable_warning -Wno-parentheses
7432 check_disable_warning -Wno-switch
7433 check_disable_warning -Wno-format-zero-length
7434 check_disable_warning -Wno-pointer-sign
7435 check_disable_warning -Wno-unused-const-variable
7436 check_disable_warning -Wno-bool-operation
7437 check_disable_warning -Wno-char-subscripts
7439 check_disable_warning_headers(){
7440 warning_flag=-W${1#-Wno-}
7441 test_cflags $warning_flag && add_cflags_headers $1
7444 check_disable_warning_headers -Wno-deprecated-declarations
7445 check_disable_warning_headers -Wno-unused-variable
7447 test_cc <<EOF && enable blocks_extension
7448 void (^block)(void);
7451 # add some linker flags
7452 check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
7453 enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir
7454 test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
7456 # add some strip flags
7459 enabled neon_clobber_test &&
7460 check_ldflags -Wl,--wrap,avcodec_open2 \
7461 -Wl,--wrap,avcodec_decode_subtitle2 \
7462 -Wl,--wrap,avcodec_encode_subtitle \
7463 -Wl,--wrap,avcodec_send_packet \
7464 -Wl,--wrap,avcodec_receive_packet \
7465 -Wl,--wrap,avcodec_send_frame \
7466 -Wl,--wrap,avcodec_receive_frame \
7467 -Wl,--wrap,swr_convert ||
7468 disable neon_clobber_test
7470 enabled xmm_clobber_test &&
7471 check_ldflags -Wl,--wrap,avcodec_open2 \
7472 -Wl,--wrap,avcodec_decode_subtitle2 \
7473 -Wl,--wrap,avcodec_encode_subtitle \
7474 -Wl,--wrap,avcodec_send_packet \
7475 -Wl,--wrap,avcodec_receive_packet \
7476 -Wl,--wrap,avcodec_send_frame \
7477 -Wl,--wrap,avcodec_receive_frame \
7478 -Wl,--wrap,swr_convert \
7479 -Wl,--wrap,sws_scale ||
7480 disable xmm_clobber_test
7482 check_ld "cc" proper_dce <<EOF
7483 extern const int array[512];
7484 static inline int func(void) { return array[0]; }
7485 int main(void) { return 0; }
7488 if enabled proper_dce; then
7489 echo "X { local: *; };" > $TMPV
7490 if test_ldflags -Wl,${version_script},$TMPV; then
7491 append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver'
7493 test_cc <<EOF && enable symver_asm_label
7494 void ff_foo(void) __asm__ ("av_foo@VERSION");
7495 void ff_foo(void) { ${inline_asm+__asm__($quotes);} }
7497 test_cc <<EOF && enable symver_gnu_asm
7498 __asm__(".symver ff_foo,av_foo@VERSION");
7499 void ff_foo(void) {}
7504 if [ -z "$optflags" ]; then
7505 if enabled small; then
7506 optflags=$cflags_size
7507 elif enabled optimizations; then
7508 optflags=$cflags_speed
7510 optflags=$cflags_noopt
7516 [ -n "$lto" ] && check_ldflags "$@"
7519 check_optflags $optflags
7520 check_optflags -fno-math-errno
7521 check_optflags -fno-signed-zeros
7523 if [ -n "$lto" ]; then
7524 test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
7526 check_ldflags $lto $cpuflags
7527 disable inline_asm_direct_symbol_refs
7528 if test "$cc_type" = "clang"; then
7529 # Clang's LTO fails on Windows, when there are references outside
7530 # of inline assembly to nonlocal labels defined within inline assembly,
7531 # see https://github.com/llvm/llvm-project/issues/76046.
7534 disable inline_asm_nonlocal_labels
7540 enabled ftrapv && check_cflags -ftrapv
7542 test_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
7547 if enabled icc; then
7548 # Just warnings, no remarks
7550 # -wd: Disable following warnings
7551 # 144, 167, 556: -Wno-pointer-sign
7552 # 188: enumerated type mixed with another type
7553 # 1292: attribute "foo" ignored
7554 # 1419: external declaration in primary source file
7555 # 10006: ignoring unknown option -fno-signed-zeros
7556 # 10148: ignoring unknown option -Wno-parentheses
7557 # 10156: ignoring option '-W'; no argument required
7558 # 13200: No EMMS instruction before call to function
7559 # 13203: No EMMS instruction before return from function
7560 check_cflags -wd144,167,188,556,1292,1419,10006,10148,10156,13200,13203
7561 # 11030: Warning unknown option --as-needed
7562 # 10156: ignoring option '-export'; no argument required
7563 check_ldflags -wd10156,11030
7564 # icc 11.0 and 11.1 work with ebp_available, but don't pass the test
7565 enable ebp_available
7566 # The test above does not test linking
7567 [ -n "$lto" ] && disable symver_asm_label
7568 if enabled x86_32; then
7569 icc_version=$($cc -dumpversion)
7570 test ${icc_version%%.*} -ge 11 &&
7571 check_cflags -falign-stack=maintain-16-byte ||
7572 disable aligned_stack
7574 elif enabled gcc; then
7575 check_optflags -fno-tree-vectorize
7576 check_cflags -Werror=format-security
7577 check_cflags -Werror=implicit-function-declaration
7578 check_cflags -Werror=missing-prototypes
7579 check_cflags -Werror=return-type
7580 check_cflags -Werror=vla
7581 check_cflags -Wformat
7582 check_cflags -fdiagnostics-color=auto
7583 enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
7584 if enabled x86_32; then
7587 # BSDs don't guarantee a 16 byte aligned stack
, but we can
7588 # request GCC to try to maintain 16 byte alignment throughout
7589 # function calls. Library entry points that might call assembly
7590 # functions align the stack. (The parameter means 2^4 bytes.)
7591 check_cflags
-mpreferred-stack-boundary=4
7595 elif enabled llvm_gcc
; then
7596 check_cflags
-mllvm -stack-alignment=16
7597 elif enabled clang
; then
7598 if enabled x86_32
; then
7599 # Clang doesn't support maintaining alignment without assuming the
7600 # same alignment in every function. If 16 byte alignment would be
7601 # enabled, one would also have to either add attribute_align_arg on
7602 # every single entry point into the libraries or enable -mstackrealign
7603 # (doing stack realignment in every single function).
7605 mingw32|win32|
*bsd
*)
7606 disable aligned_stack
7609 check_cflags
-mllvm -stack-alignment=16
7610 check_cflags
-mstack-alignment=16
7614 check_cflags
-mllvm -stack-alignment=16
7615 check_cflags
-mstack-alignment=16
7617 check_cflags
-Qunused-arguments
7618 check_cflags
-Werror=implicit-function-declaration
7619 check_cflags
-Werror=missing-prototypes
7620 check_cflags
-Werror=return-type
7621 elif enabled cparser
; then
7622 add_cflags
-Wno-missing-variable-declarations
7623 add_cflags
-Wno-empty-statement
7624 elif enabled armcc
; then
7625 add_cflags
-W${armcc_opt},--diag_suppress=4343 # hardfp compat
7626 add_cflags
-W${armcc_opt},--diag_suppress=3036 # using . as system include dir
7627 # 2523: use of inline assembly is deprecated
7628 add_cflags
-W${armcc_opt},--diag_suppress=2523
7629 add_cflags
-W${armcc_opt},--diag_suppress=1207
7630 add_cflags
-W${armcc_opt},--diag_suppress=1293 # assignment in condition
7631 add_cflags
-W${armcc_opt},--diag_suppress=3343 # hardfp compat
7632 add_cflags
-W${armcc_opt},--diag_suppress=167 # pointer sign
7633 add_cflags
-W${armcc_opt},--diag_suppress=513 # pointer sign
7634 elif enabled pathscale
; then
7635 add_cflags
-fstrict-overflow -OPT:wrap_around_unsafe_opt
=OFF
7637 elif enabled_any msvc icl
; then
7638 enabled x86_32
&& disable aligned_stack
7639 enabled_all x86_32 debug
&& add_cflags
-Oy-
7640 enabled debug
&& add_ldflags
-debug
7641 enable pragma_deprecated
7642 if enabled icl
; then
7643 # -Qansi-alias is basically -fstrict-aliasing, but does not work
7644 # (correctly) on icl 13.x.
7645 test_cpp_condition
"windows.h" "__ICL < 1300 || __ICL >= 1400" &&
7646 add_cflags
-Qansi-alias
7647 # Some inline asm is not compilable in debug
7648 if enabled debug
; then
7649 disable ebp_available
7650 disable ebx_available
7653 # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2.
7654 check_cpp_condition log2 crtversion.h
"_VC_CRT_MAJOR_VERSION >= 12"
7655 # the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code
7656 # Issue has been fixed in MSVC v19.00.24218.
7657 test_cpp_condition windows.h
"_MSC_FULL_VER >= 190024218" ||
7658 check_cflags
-d2SSAOptimizer-
7659 # enable utf-8 source processing on VS2015 U2 and newer
7660 test_cpp_condition windows.h
"_MSC_FULL_VER >= 190023918" &&
7664 for pfx
in "" host_
; do
7665 varname
=${pfx%_}cc_type
7666 eval "type=\$$varname"
7667 if [ "$type" = "msvc" ]; then
7668 test_
${pfx}cc
<<EOF || add_${pfx}cflags -Dinline=__inline
7669 static inline int foo(int a) { return a; }
7676 add_asflags
-Qunused-arguments
7682 check_ldflags
-Qunused-arguments
7686 enable frame_thread_encoder
7688 enabled asm ||
{ arch
=c
; disable
$ARCH_LIST $ARCH_EXT_LIST; }
7690 check_deps
$CONFIG_LIST \
7695 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"
7697 enabled threads || warn \
7698 "Threading support was disabled or is not available on the target platform." \
7699 "This means that not only is this build not multi-threaded, but also" \
7700 "that the libraries from this build MUST NOT be used in a multi-threaded"\
7706 disable posix_memalign
7708 *-dos|freedos|opendos
)
7709 if test_cpp_condition sys
/version.h
"defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then
7715 flatten_extralibs
(){
7719 for entry
in $list; do
7723 for e
in $entry_copy; do
7725 *_extralibs
) nested_entries
="$nested_entries$e ";;
7726 *) flat_entries
="$flat_entries$e ";;
7729 eval $entry="\$flat_entries"
7731 append
$list_name "$nested_entries"
7733 resolve nested_entries
7734 if test -n "$(filter '*_extralibs' $nested_entries)"; then
7735 flatten_extralibs
$list_name
7739 flatten_extralibs_wrapper
(){
7741 flatten_extralibs
$list_name
7744 eval $list_name=\$\
(\
$ldflags_filter \$
$list_name\
)
7745 eval printf \''%s'\' \""\$$list_name"\"
7748 for linkunit
in $LIBRARY_LIST; do
7749 unset current_extralibs
7750 eval components
=\$$
(toupper
${linkunit})_COMPONENTS_LIST
7751 for comp
in ${components}; do
7752 enabled
$comp ||
continue
7753 comp_extralibs
="${comp}_extralibs"
7754 append current_extralibs
$comp_extralibs
7756 eval prepend
${linkunit}_extralibs
$current_extralibs
7759 for linkunit
in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do
7760 eval ${linkunit}_extralibs
=\$\
(flatten_extralibs_wrapper
${linkunit}_extralibs\
)
7763 map
'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
7765 for thread
in $THREADS_LIST; do
7766 if enabled
$thread; then
7767 test -n "$thread_type" &&
7768 die
"ERROR: Only one thread type must be selected." ||
7769 thread_type
="$thread"
7773 if disabled stdatomic
; then
7774 if enabled atomics_gcc
; then
7775 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/gcc'
7776 elif enabled atomics_win32
; then
7777 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/win32'
7778 elif enabled atomics_suncc
; then
7779 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/suncc'
7780 elif enabled pthreads
; then
7781 add_compat atomics
/pthread
/stdatomic.o
7782 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/pthread'
7784 enabled threads
&& die
"Threading is enabled, but no atomics are available"
7785 add_cppflags
'-I\$(SRC_PATH)/compat/atomics/dummy'
7789 # Check if requested libraries were found.
7790 for lib
in $AUTODETECT_LIBS; do
7791 requested
$lib && ! enabled
$lib && die
"ERROR: $lib requested but not found";
7794 enabled zlib
&& add_cppflags
-DZLIB_CONST
7796 # conditional library dependencies, in any order
7797 enabled amovie_filter
&& prepend avfilter_deps
"avformat avcodec"
7798 enabled aresample_filter
&& prepend avfilter_deps
"swresample"
7799 enabled cover_rect_filter
&& prepend avfilter_deps
"avformat avcodec"
7800 enabled ebur128_filter
&& enabled swresample
&& prepend avfilter_deps
"swresample"
7801 enabled elbg_filter
&& prepend avfilter_deps
"avcodec"
7802 enabled find_rect_filter
&& prepend avfilter_deps
"avformat avcodec"
7803 enabled fsync_filter
&& prepend avfilter_deps
"avformat"
7804 enabled mcdeint_filter
&& prepend avfilter_deps
"avcodec"
7805 enabled movie_filter
&& prepend avfilter_deps
"avformat avcodec"
7806 enabled pan_filter
&& prepend avfilter_deps
"swresample"
7807 enabled pp_filter
&& prepend avfilter_deps
"postproc"
7808 enabled qrencode_filter
&& prepend_avfilter_deps
"swscale"
7809 enabled qrencodesrc_filter
&& prepend_avfilter_deps
"swscale"
7810 enabled removelogo_filter
&& prepend avfilter_deps
"avformat avcodec swscale"
7811 enabled sab_filter
&& prepend avfilter_deps
"swscale"
7812 enabled scale_filter
&& prepend avfilter_deps
"swscale"
7813 enabled scale2ref_filter
&& prepend avfilter_deps
"swscale"
7814 enabled showcqt_filter
&& prepend avfilter_deps
"avformat swscale"
7815 enabled signature_filter
&& prepend avfilter_deps
"avcodec avformat"
7816 enabled smartblur_filter
&& prepend avfilter_deps
"swscale"
7817 enabled spp_filter
&& prepend avfilter_deps
"avcodec"
7818 enabled sr_filter
&& prepend avfilter_deps
"avformat swscale"
7819 enabled subtitles_filter
&& prepend avfilter_deps
"avformat avcodec"
7820 enabled uspp_filter
&& prepend avfilter_deps
"avcodec"
7821 enabled zoompan_filter
&& prepend avfilter_deps
"swscale"
7823 enabled lavfi_indev
&& prepend avdevice_deps
"avfilter"
7826 enabled_any sdl2_outdev opengl_outdev
&& enabled sdl2
&&
7827 add_cflags $
(filter_out
'-Dmain=SDL_main' $sdl2_cflags)
7829 enabled opus_decoder
&& prepend avcodec_deps
"swresample"
7831 # reorder the items at var $1 to align with the items order at var $2 .
7832 # die if an item at $1 is not at $2 .
7835 eval rb_ordered
=\$
$2
7837 for rb
in $rb_in; do
7838 is_in
$rb $rb_ordered || die
"$rb at \$$1 is not at \$$2"
7842 for rb
in $rb_ordered; do
7843 is_in
$rb $rb_in && rb_out
="$rb_out$rb "
7848 # deps-expand fflib $1: N x {append all expanded deps; unique}
7849 # within a set of N items, N expansions are enough to expose a cycle.
7851 unique
${1}_deps
# required for the early break test.
7852 for dummy
in $LIBRARY_LIST; do # N iteratios
7853 eval deps
=\$
${1}_deps
7854 append
${1}_deps $
(map
'eval echo \$${v}_deps' $deps)
7856 eval '[ ${#deps} = ${#'${1}_deps'} ]' && break # doesn't expand anymore
7859 eval is_in
$1 \$
${1}_deps
&& die
"Dependency cycle at ${1}_deps"
7860 reorder_by
${1}_deps LIBRARY_LIST
# linking order is expected later
7863 #we have to remove gpl from the deps here as some code assumes all lib deps are libs
7864 postproc_deps
="$(filter_out 'gpl' $postproc_deps)"
7866 map
'expand_deps $v' $LIBRARY_LIST
7868 if test "$quiet" != "yes"; then
7870 echo "install prefix $prefix"
7871 echo "source path $source_path"
7872 echo "C compiler $cc"
7873 echo "C library $libc_type"
7874 if test "$host_cc" != "$cc"; then
7875 echo "host C compiler $host_cc"
7876 echo "host C library $host_libc_type"
7878 echo "ARCH $arch ($cpu)"
7879 if test "$build_suffix" != ""; then
7880 echo "build suffix $build_suffix"
7882 if test "$progs_suffix" != ""; then
7883 echo "progs suffix $progs_suffix"
7885 if test "$extra_version" != ""; then
7886 echo "version string suffix $extra_version"
7888 echo "big-endian ${bigendian-no}"
7889 echo "runtime cpu detection ${runtime_cpudetect-no}"
7890 if enabled x86
; then
7891 echo "standalone assembly ${x86asm-no}"
7892 echo "x86 assembler ${x86asmexe}"
7893 echo "MMX enabled ${mmx-no}"
7894 echo "MMXEXT enabled ${mmxext-no}"
7895 echo "3DNow! enabled ${amd3dnow-no}"
7896 echo "3DNow! extended enabled ${amd3dnowext-no}"
7897 echo "SSE enabled ${sse-no}"
7898 echo "SSSE3 enabled ${ssse3-no}"
7899 echo "AESNI enabled ${aesni-no}"
7900 echo "AVX enabled ${avx-no}"
7901 echo "AVX2 enabled ${avx2-no}"
7902 echo "AVX-512 enabled ${avx512-no}"
7903 echo "AVX-512ICL enabled ${avx512icl-no}"
7904 echo "XOP enabled ${xop-no}"
7905 echo "FMA3 enabled ${fma3-no}"
7906 echo "FMA4 enabled ${fma4-no}"
7907 echo "i686 features enabled ${i686-no}"
7908 echo "CMOV is fast ${fast_cmov-no}"
7909 echo "EBX available ${ebx_available-no}"
7910 echo "EBP available ${ebp_available-no}"
7912 if enabled aarch64
; then
7913 echo "NEON enabled ${neon-no}"
7914 echo "DOTPROD enabled ${dotprod-no}"
7915 echo "I8MM enabled ${i8mm-no}"
7917 if enabled arm
; then
7918 echo "ARMv5TE enabled ${armv5te-no}"
7919 echo "ARMv6 enabled ${armv6-no}"
7920 echo "ARMv6T2 enabled ${armv6t2-no}"
7921 echo "VFP enabled ${vfp-no}"
7922 echo "NEON enabled ${neon-no}"
7923 echo "THUMB enabled ${thumb-no}"
7925 if enabled mips
; then
7926 echo "MIPS FPU enabled ${mipsfpu-no}"
7927 echo "MIPS DSP R1 enabled ${mipsdsp-no}"
7928 echo "MIPS DSP R2 enabled ${mipsdspr2-no}"
7929 echo "MIPS MSA enabled ${msa-no}"
7930 echo "LOONGSON MMI enabled ${mmi-no}"
7932 if enabled ppc
; then
7933 echo "AltiVec enabled ${altivec-no}"
7934 echo "VSX enabled ${vsx-no}"
7935 echo "POWER8 enabled ${power8-no}"
7936 echo "PPC 4xx optimizations ${ppc4xx-no}"
7937 echo "dcbzl available ${dcbzl-no}"
7939 if enabled loongarch
; then
7940 echo "LSX enabled ${lsx-no}"
7941 echo "LASX enabled ${lasx-no}"
7943 if enabled riscv
; then
7944 echo "RISC-V Vector enabled ${rvv-no}"
7946 echo "debug symbols ${debug-no}"
7947 echo "strip symbols ${stripping-no}"
7948 echo "optimize for size ${small-no}"
7949 echo "optimizations ${optimizations-no}"
7950 echo "static ${static-no}"
7951 echo "shared ${shared-no}"
7952 echo "postprocessing support ${postproc-no}"
7953 echo "network support ${network-no}"
7954 echo "threading support ${thread_type-no}"
7955 echo "safe bitstream reader ${safe_bitstream_reader-no}"
7956 echo "texi2html enabled ${texi2html-no}"
7957 echo "perl enabled ${perl-no}"
7958 echo "pod2man enabled ${pod2man-no}"
7959 echo "makeinfo enabled ${makeinfo-no}"
7960 echo "makeinfo supports HTML ${makeinfo_html-no}"
7961 echo "xmllint enabled ${xmllint-no}"
7962 test -n "$random_seed" &&
7963 echo "random seed ${random_seed}"
7966 echo "External libraries:"
7967 print_enabled
'' $EXTERNAL_LIBRARY_LIST $EXTERNAL_AUTODETECT_LIBRARY_LIST | print_in_columns
7970 echo "External libraries providing hardware acceleration:"
7971 print_enabled
'' $HWACCEL_LIBRARY_LIST $HWACCEL_AUTODETECT_LIBRARY_LIST | print_in_columns
7975 print_enabled
'' $LIBRARY_LIST | print_in_columns
7979 print_enabled
'' $PROGRAM_LIST | print_in_columns
7982 for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev
; do
7983 echo "Enabled ${type}s:"
7984 eval list
=\$$
(toupper
$type)_LIST
7985 print_enabled
'_*' $list | print_in_columns
7989 if test -n "$ignore_tests"; then
7990 ignore_tests
=$
(echo $ignore_tests |
tr ',' ' ')
7991 echo "Ignored FATE tests:"
7992 echo $ignore_tests | print_in_columns
7996 echo "License: $license"
7998 fi # test "$quiet" != "yes"
8000 if test -n "$WARN_IF_GETS_DISABLED_LIST"; then
8001 for cfg
in $WARN_IF_GETS_DISABLED_LIST; do
8002 if disabled
$cfg; then
8003 varname
=${cfg}_disable_reason
8004 eval "warn \"Disabled $cfg because \$$varname\""
8009 if test -n "$WARNINGS"; then
8010 printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
8011 enabled fatal_warnings
&& exit 1
8014 test -e Makefile ||
echo "include $source_path/Makefile" > Makefile
8017 echo "$*" |
sed 's/%/%25/g;s/:/%3a/g'
8020 echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" > ffbuild
/config.fate
8022 enabled stripping || strip
="echo skipping strip"
8023 enabled stripping || striptype
=""
8025 config_files
="$TMPH ffbuild/config.mak doc/config.texi"
8027 cat > ffbuild
/config.mak
<<EOF
8028 # Automatically generated by configure - do not modify!
8029 ifndef FFMPEG_CONFIG_MAK
8031 FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
8033 LIBDIR=\$(DESTDIR)$libdir
8034 SHLIBDIR=\$(DESTDIR)$shlibdir
8035 INCDIR=\$(DESTDIR)$incdir
8036 BINDIR=\$(DESTDIR)$bindir
8037 DATADIR=\$(DESTDIR)$datadir
8038 DOCDIR=\$(DESTDIR)$docdir
8039 MANDIR=\$(DESTDIR)$mandir
8040 PKGCONFIGDIR=\$(DESTDIR)$pkgconfigdir
8041 INSTALL_NAME_DIR=$install_name_dir
8042 SRC_PATH=$source_path
8043 SRC_LINK=$source_link
8044 ifndef MAIN_MAKEFILE
8045 SRC_PATH:=\$(SRC_PATH:.%=..%)
8049 INTRINSICS=$intrinsics
8050 EXTERN_PREFIX=$extern_prefix
8057 DEPCCFLAGS=$DEPCCFLAGS \$(CPPFLAGS)
8059 DEPASFLAGS=$DEPASFLAGS \$(CPPFLAGS)
8061 DEPX86ASM=$x86asmexe
8062 DEPX86ASMFLAGS=\$(X86ASMFLAGS)
8072 STRIPTYPE=$striptype
8079 OBJCCFLAGS=$OBJCFLAGS
8081 NVCCFLAGS=$nvccflags
8102 LDEXEFLAGS=$LDEXEFLAGS
8103 LDSOFLAGS=$LDSOFLAGS
8104 SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
8105 ASMSTRIPFLAGS=$ASMSTRIPFLAGS
8106 X86ASMFLAGS=$X86ASMFLAGS
8110 LASXFLAGS=$LASXFLAGS
8111 BUILDSUF=$build_suffix
8112 PROGSSUF=$progs_suffix
8120 EXTRA_VERSION=$extra_version
8123 CCDEP_FLAGS=$CCDEP_FLAGS
8125 ASDEP_FLAGS=$ASDEP_FLAGS
8126 X86ASMDEP=$X86ASMDEP
8127 X86ASMDEP_FLAGS=$X86ASMDEP_FLAGS
8128 CC_DEPFLAGS=$CC_DEPFLAGS
8129 CXX_DEPFLAGS=$CXX_DEPFLAGS
8130 OBJCC_DEPFLAGS=$OBJC_DEPFLAGS
8131 AS_DEPFLAGS=$AS_DEPFLAGS
8132 X86ASM_DEPFLAGS=$X86ASM_DEPFLAGS
8135 HOSTCFLAGS=$host_cflags
8136 HOSTCPPFLAGS=$host_cppflags
8137 HOSTEXESUF=$HOSTEXESUF
8138 HOSTLDFLAGS=$host_ldflags
8139 HOSTEXTRALIBS=$host_extralibs
8141 DEPHOSTCCFLAGS=$DEPHOSTCCFLAGS \$(HOSTCCFLAGS)
8142 HOSTCCDEP=$HOSTCCDEP
8143 HOSTCCDEP_FLAGS=$HOSTCCDEP_FLAGS
8144 HOSTCC_DEPFLAGS=$HOSTCC_DEPFLAGS
8148 TARGET_EXEC=$target_exec $target_exec_args
8149 TARGET_PATH=$target_path
8150 TARGET_SAMPLES=${target_samples:-\$(SAMPLES)}
8151 CFLAGS-ffplay=${sdl2_cflags}
8152 CFLAGS_HEADERS=$CFLAGS_HEADERS
8153 LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
8154 EXTRALIBS=$extralibs
8155 COMPAT_OBJS=$compat_objs
8157 LIBTARGET=${LIBTARGET}
8158 SLIBNAME=${SLIBNAME}
8159 SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
8160 SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}
8161 SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}
8162 SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
8163 SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
8164 SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
8165 SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
8166 SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
8167 VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
8168 SAMPLES:=${samples:-\$(FATE_SAMPLES)}
8169 NOREDZONE_FLAGS=$noredzone_flags
8170 LIBFUZZER_PATH=$libfuzzer_path
8171 IGNORE_TESTS=$ignore_tests
8172 VERSION_TRACKING=$version_tracking
8175 map
'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST
8177 for entry
in $LIBRARY_LIST $PROGRAM_LIST $EXTRALIBS_LIST; do
8178 eval echo "EXTRALIBS-${entry}=\$${entry}_extralibs" >> ffbuild
/config.mak
8182 /* Automatically generated by configure - do not modify! */
8183 #ifndef FFMPEG_CONFIG_H
8184 #define FFMPEG_CONFIG_H
8185 #define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
8186 #define FFMPEG_LICENSE "$(c_escape $license)"
8187 #define CONFIG_THIS_YEAR 2024
8188 #define FFMPEG_DATADIR "$(eval c_escape $datadir)"
8189 #define AVCONV_DATADIR "$(eval c_escape $datadir)"
8190 #define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
8191 #define OS_NAME $target_os
8192 #define EXTERN_PREFIX "${extern_prefix}"
8193 #define EXTERN_ASM ${extern_prefix}
8194 #define BUILDSUF "$build_suffix"
8195 #define SLIBSUF "$SLIBSUF"
8196 #define SWS_MAX_FILTER_SIZE $sws_max_filter_size
8199 test -n "$assert_level" &&
8200 echo "#define ASSERT_LEVEL $assert_level" >>$TMPH
8202 test -n "$malloc_prefix" &&
8203 echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
8206 echo "#define AS_ARCH_LEVEL $as_arch_level" >>$TMPH
8208 if enabled x86asm
; then
8209 append config_files
$TMPASM
8211 ; Automatically generated by configure - do not modify!
8215 enabled getenv ||
echo "#define getenv(x) NULL" >> $TMPH
8221 echo "@c auto-generated by configure - do not modify! " > doc
/config.texi
8223 print_config ARCH_
"$config_files" $ARCH_LIST
8224 print_config HAVE_
"$config_files" $HAVE_LIST
8225 print_config CONFIG_
"$config_files" $CONFIG_LIST \
8228 echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
8230 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
8231 cp_if_changed
$TMPH config.h
8232 touch ffbuild
/.config
8234 # Copy config.asm before printing ALL_COMPONENTS; that's not needed in assembly.
8235 enabled x86asm
&& cp_if_changed
$TMPASM config.asm
8237 # Reopen a new TMPH for config_components.h.
8239 /* Automatically generated by configure - do not modify! */
8240 #ifndef FFMPEG_CONFIG_COMPONENTS_H
8241 #define FFMPEG_CONFIG_COMPONENTS_H
8244 print_config CONFIG_
"$config_files" $ALL_COMPONENTS
8246 echo "#endif /* FFMPEG_CONFIG_COMPONENTS_H */" >> $TMPH
8247 echo "endif # FFMPEG_CONFIG_MAK" >> ffbuild
/config.mak
8249 cp_if_changed
$TMPH config_components.h
8252 /* Generated by ffmpeg configure */
8253 #ifndef AVUTIL_AVCONFIG_H
8254 #define AVUTIL_AVCONFIG_H
8257 print_config AV_HAVE_
$TMPH $HAVE_LIST_PUB
8259 echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
8261 cp_if_changed
$TMPH libavutil
/avconfig.h
8263 # full_filter_name_foo=vf_foo
8264 # full_filter_name_bar=asrc_bar
8266 eval "$(sed -n "s
/^extern const AVFilter ff_\
([avfsinkrc
]\
{2,5\
}\
)_\
(.
*\
);/full_filter_name_\
2=\
1_\
2/p
" $source_path/libavfilter/allfilters.c)"
8268 # generate the lists of enabled components
8269 print_enabled_components
(){
8274 echo "static const $struct_name * const $name[] = {" > $TMPH
8279 eval c
=\
$full_filter_name_${c%_filter}
8282 c
=${c%_indev}_demuxer
8285 c
=${c%_outdev}_muxer
8288 printf " &ff_%s,\n" $c >> $TMPH
8291 if [ "$name" = "filter_list" ]; then
8292 for c
in asrc_abuffer vsrc_buffer asink_abuffer vsink_buffer
; do
8293 printf " &ff_%s,\n" $c >> $TMPH
8296 echo " NULL };" >> $TMPH
8297 cp_if_changed
$TMPH $file
8300 print_enabled_components libavfilter
/filter_list.c AVFilter filter_list
$FILTER_LIST
8301 print_enabled_components libavcodec
/codec_list.c FFCodec codec_list
$CODEC_LIST
8302 print_enabled_components libavcodec
/parser_list.c AVCodecParser parser_list
$PARSER_LIST
8303 print_enabled_components libavcodec
/bsf_list.c FFBitStreamFilter bitstream_filters
$BSF_LIST
8304 print_enabled_components libavformat
/demuxer_list.c FFInputFormat demuxer_list
$DEMUXER_LIST
8305 print_enabled_components libavformat
/muxer_list.c FFOutputFormat muxer_list
$MUXER_LIST
8306 print_enabled_components libavdevice
/indev_list.c FFInputFormat indev_list
$INDEV_LIST
8307 print_enabled_components libavdevice
/outdev_list.c FFOutputFormat outdev_list
$OUTDEV_LIST
8308 print_enabled_components libavformat
/protocol_list.c URLProtocol url_protocols
$PROTOCOL_LIST
8310 # Settings for pkg-config files
8313 # Automatically generated by configure - do not modify!
8315 build_suffix=$build_suffix
8319 rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
8320 source_path=${source_path}
8323 extralibs_avutil="$avutil_extralibs"
8324 extralibs_avcodec="$avcodec_extralibs"
8325 extralibs_avformat="$avformat_extralibs"
8326 extralibs_avdevice="$avdevice_extralibs"
8327 extralibs_avfilter="$avfilter_extralibs"
8328 extralibs_postproc="$postproc_extralibs"
8329 extralibs_swscale="$swscale_extralibs"
8330 extralibs_swresample="$swresample_extralibs"
8333 for lib
in $LIBRARY_LIST; do
8334 lib_deps
="$(eval echo \$${lib}_deps)"
8335 echo ${lib}_deps
=\"$lib_deps\" >> $TMPH
8338 cp_if_changed
$TMPH ffbuild
/config.sh