--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libx265 enable HEVC encoding via x265 [no]
--enable-libxavs enable AVS encoding via xavs [no]
+ --enable-libxcb enable X11 grabbing using XCB [auto]
+ --enable-libxcb-shm enable X11 grabbing shm communication [auto]
+ --enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto]
+ --enable-libxcb-shape enable X11 grabbing shape rendering [auto]
--enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
--enable-libzmq enable message passing via libzmq [no]
--enable-libzvbi enable teletext support via libzvbi [no]
--disable-lzma disable lzma [autodetect]
- --enable-decklink enable Blackmagick DeckLink output [no]
+ --enable-decklink enable Blackmagick DeckLink I/O support [no]
--enable-openal enable OpenAL 1.1 capture support [no]
--enable-opencl enable OpenCL code
--enable-opengl enable OpenGL rendering [no]
--enable-openssl enable openssl [no]
- --enable-x11grab enable X11 grabbing [no]
+ --disable-sdl disable sdl [autodetect]
+ --enable-x11grab enable X11 grabbing (legacy) [no]
--disable-xlib disable xlib [autodetect]
--disable-zlib disable zlib [autodetect]
check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
}
-require_pkg_config(){
+use_pkg_config(){
pkg="$1"
- check_pkg_config "$@" || die "ERROR: $pkg not found"
+ check_pkg_config "$@" || return 1
add_cflags $(get_safe ${pkg}_cflags)
add_extralibs $(get_safe ${pkg}_libs)
}
+require_pkg_config(){
+ use_pkg_config "$@" || die "ERROR: $pkg not found using pkg-config$pkg_config_fail_message"
+}
+
require_libfreetype(){
log require_libfreetype "$@"
pkg="freetype2"
libx264
libx265
libxavs
+ libxcb
+ libxcb_shm
+ libxcb_shape
+ libxcb_xfixes
libxvid
libzmq
libzvbi
opencl
opengl
openssl
+ sdl
x11grab
xlib
zlib
BUILTIN_LIST="
atomic_cas_ptr
+ atomic_compare_exchange
machine_rw_barrier
MemoryBarrier
mm_empty
sys_un_h
sys_videoio_h
termios_h
+ udplite_h
unistd_h
windows_h
winsock2_h
exp2
exp2f
expf
- fminf
isinf
isnan
ldexpf
gettimeofday
glob
glXGetProcAddress
+ gmtime_r
inet_aton
isatty
jack_port_get_latency_range
lzo1x_999_compress
mach_absolute_time
MapViewOfFile
+ MoveFileExA
memalign
mkstemp
mmap
"
TYPES_LIST="
+ CONDITION_VARIABLE_Ptr
socklen_t
struct_addrinfo
struct_group_source_req
symver_if_any="symver_asm_label symver_gnu_asm"
# threading support
-atomics_gcc_if="sync_val_compare_and_swap"
+atomics_gcc_if_any="sync_val_compare_and_swap atomic_compare_exchange"
atomics_suncc_if="atomic_cas_ptr machine_rw_barrier"
atomics_win32_if="MemoryBarrier"
atomics_native_if_any="$ATOMICS_LIST"
amv_decoder_select="sp5x_decoder exif"
amv_encoder_select="aandcttables mpegvideoenc"
ape_decoder_select="bswapdsp llauddsp"
+apng_decoder_select="zlib"
asv1_decoder_select="blockdsp bswapdsp idctdsp"
asv1_encoder_select="bswapdsp fdctdsp pixblockdsp"
asv2_decoder_select="blockdsp bswapdsp idctdsp"
avisynth_demuxer_deps="avisynth"
avisynth_demuxer_select="riffdec"
caf_demuxer_select="riffdec"
+dash_muxer_select="mp4_muxer"
dirac_demuxer_select="dirac_parser"
dts_demuxer_select="dca_parser"
dtshd_demuxer_select="dca_parser"
mmf_muxer_select="riffenc"
mov_demuxer_select="riffdec"
mov_demuxer_suggest="zlib"
-mov_muxer_select="riffenc rtpenc_chain"
+mov_muxer_select="riffenc rtpenc_chain ac3_parser"
mp3_demuxer_select="mpegaudio_parser"
mp4_muxer_select="mov_muxer"
mpegts_muxer_select="adts_muxer latm_muxer"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
alsa_outdev_deps="alsa_asoundlib_h"
-avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia"
+avfoundation_indev_extralibs="-framework CoreVideo -framework Foundation -framework AVFoundation -framework CoreMedia -framework CoreGraphics"
avfoundation_indev_select="avfoundation"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
caca_outdev_deps="libcaca"
decklink_outdev_deps="decklink pthreads"
decklink_outdev_extralibs="-lstdc++"
+decklink_indev_deps="decklink pthreads"
+decklink_indev_extralibs="-lstdc++"
dshow_indev_deps="IBaseFilter"
dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
dv1394_indev_deps="dv1394"
xv_outdev_deps="X11_extensions_Xvlib_h XvGetPortAttribute"
xv_outdev_extralibs="-lXv -lX11 -lXext"
x11grab_indev_deps="x11grab"
+x11grab_xcb_indev_deps="libxcb"
# protocols
bluray_protocol_deps="libbluray"
tls_protocol_deps_any="openssl gnutls"
tls_protocol_select="tcp_protocol"
udp_protocol_select="network"
+udplite_protocol_select="network"
unix_protocol_deps="sys_un_h"
unix_protocol_select="network"
# filters
-aconvert_filter_deps="swresample"
amovie_filter_deps="avcodec avformat"
aresample_filter_deps="swresample"
ass_filter_deps="libass"
ebur128_filter_deps="gpl"
flite_filter_deps="libflite"
frei0r_filter_deps="frei0r dlopen"
-frei0r_filter_extralibs='$ldl'
frei0r_src_filter_deps="frei0r dlopen"
-frei0r_src_filter_extralibs='$ldl'
geq_filter_deps="gpl"
histeq_filter_deps="gpl"
hqdn3d_filter_deps="gpl"
interlace_filter_deps="gpl"
kerndeint_filter_deps="gpl"
ladspa_filter_deps="ladspa dlopen"
-ladspa_filter_extralibs='$ldl'
mcdeint_filter_deps="avcodec gpl"
movie_filter_deps="avcodec avformat"
-mp_filter_deps="gpl avcodec swscale inline_asm"
+mp_filter_deps="gpl avcodec swscale"
mpdecimate_filter_deps="gpl"
mpdecimate_filter_select="pixelutils"
mptestsrc_filter_deps="gpl"
add_ldflags -fprofile-arcs -ftest-coverage
;;
hardened)
- add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all
- add_ldflags -Wl,-z,relro -Wl,-z,now
+ add_cppflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
+ add_cflags -fno-strict-overflow -fstack-protector-all
+ add_ldflags -Wl,-z,relro -Wl,-z,now
;;
?*)
die "Unknown toolchain $toolchain"
enabled cross_compile || host_cc_default=$cc
set_default host_cc
+pkg_config_fail_message=""
if ! $pkg_config --version >/dev/null 2>&1; then
warn "$pkg_config not found, library detection may fail."
pkg_config=false
+elif is_in -static $cc $LDFLAGS && ! is_in --static $pkg_config $pkg_config_flags; then
+ pkg_config_fail_message="
+Note: When building a static binary, add --pkg-config-flags=\"--static\"."
fi
if test $doxygen != $doxygen_default && \
# 4509: "This form of conditional instruction is deprecated"
_flags="-nologo -ignore 4509"
_flags_filter=armasm_flags
- elif $_cc 2>&1 | grep -q Microsoft; then
- _type=msvc
+ elif $_cc 2>&1 | grep -q Intel; then
+ _type=icl
_ident=$($cc 2>&1 | head -n1)
- _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
- _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
+ _depflags='-QMMD -QMF$(@:.o=.d) -QMT$@'
+ # Not only is O3 broken on 13.x+ but it is slower on all previous
+ # versions (tested) as well.
_cflags_speed="-O2"
- _cflags_size="-O1"
+ _cflags_size="-O1 -Oi" # -O1 without -Oi miscompiles stuff
if $_cc 2>&1 | grep -q Linker; then
_ld_o='-out:$@'
else
_ld_o='-Fe$@'
fi
_cc_o='-Fo$@'
- _cc_e='-P -Fi$@'
- _flags_filter=msvc_flags
+ _cc_e='-P'
+ _flags_filter=icl_flags
_ld_lib='lib%.a'
_ld_path='-libpath:'
- _flags='-nologo'
- _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
+ # -Qdiag-error to make icl error when seeing certain unknown arguments
+ _flags='-nologo -Qdiag-error:4044,10157'
+ # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
+ # with MSVC which enables it by default.
+ _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS -fp:precise'
if [ $pfx = hostcc ]; then
append _cflags -Dsnprintf=_snprintf
fi
disable stripping
- elif $_cc 2>&1 | grep -q Intel; then
- _type=icl
+ elif $_cc 2>&1 | grep -q Microsoft; then
+ _type=msvc
_ident=$($cc 2>&1 | head -n1)
- _depflags='-QMMD -QMF$(@:.o=.d) -QMT$@'
- # Not only is O3 broken on 13.x+ but it is slower on all previous
- # versions (tested) as well.
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
+ _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
_cflags_speed="-O2"
- _cflags_size="-O1 -Oi" # -O1 without -Oi miscompiles stuff
+ _cflags_size="-O1"
if $_cc 2>&1 | grep -q Linker; then
_ld_o='-out:$@'
else
_ld_o='-Fe$@'
fi
_cc_o='-Fo$@'
- _cc_e='-P'
- _flags_filter=icl_flags
+ _cc_e='-P -Fi$@'
+ _flags_filter=msvc_flags
_ld_lib='lib%.a'
_ld_path='-libpath:'
- # -Qdiag-error to make icl error when seeing certain unknown arguments
- _flags='-nologo -Qdiag-error:4044,10157'
- # -Qvec- -Qsimd- to prevent miscompilation, -GS, fp:precise for consistency
- # with MSVC which enables it by default.
- _cflags='-D_USE_MATH_DEFINES -FIstdlib.h -Dstrtoll=_strtoi64 -Qms0 -Qvec- -Qsimd- -GS -fp:precise'
+ _flags='-nologo'
+ _cflags='-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
if [ $pfx = hostcc ]; then
append _cflags -Dsnprintf=_snprintf
fi
+ disable stripping
elif $_cc --version 2>/dev/null | grep -q ^cparser; then
_type=cparser
_ident=$($_cc --version | head -n1)
;;
x86)
check_64bit x86_32 x86_64 'sizeof(void *) > 4'
+ # Treat x32 as x64 for now. Note it also needs spic=$shared
+ test "$subarch" = "x86_32" && check_cpp_condition stddef.h 'defined(__x86_64__)' &&
+ subarch=x86_64
if test "$subarch" = "x86_64"; then
spic=$shared
fi
enabled shared && ! enabled small && check_cmd $windres --version && enable gnu_windres
check_ldflags -Wl,--nxcompat
check_ldflags -Wl,--dynamicbase
+ enabled x86_32 && check_ldflags -Wl,--large-address-aware
shlibdir_default="$bindir_default"
SLIBPREF=""
SLIBSUF=".dll"
# Cannot build both shared and static libs with MSVC or icl.
disable static
fi
+ enabled x86_32 && check_ldflags -LARGEADDRESSAWARE
shlibdir_default="$bindir_default"
SLIBPREF=""
SLIBSUF=".dll"
eval ${pfx}libc_type=solaris
add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
fi
+ check_${pfx}cc <<EOF
+#include <time.h>
+void *v = localtime_r;
+EOF
+test "$?" != 0 && check_${pfx}cc -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 <<EOF && add_${pfx}cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
+#include <time.h>
+void *v = localtime_r;
+EOF
+
}
probe_libc
od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
if [ "$cpu" = "power7" ] || [ "$cpu" = "power8" ] ;then
- if ! enabled bigendian ;then
+ if ! enabled bigendian && enabled altivec ;then
enable vsx
fi
fi
if enabled gcc; then
case $($cc -dumpversion) in
- 4.[3-8].*) check_cflags -fno-optimize-sibling-calls ;;
+ 4.[3-9].*) check_cflags -fno-optimize-sibling-calls ;;
esac
fi
ldl=-ldl
fi
+frei0r_filter_extralibs='$ldl'
+frei0r_src_filter_extralibs='$ldl'
+ladspa_filter_extralibs='$ldl'
+
if ! disabled network; then
check_func getaddrinfo $network_extralibs
check_func getservbyport $network_extralibs
fi
check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)"
+check_builtin atomic_compare_exchange "" "int *ptr, *oldval; int newval; __atomic_compare_exchange_n(ptr, oldval, newval, 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)"
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
check_builtin MemoryBarrier windows.h "MemoryBarrier()"
check_builtin sarestart signal.h "SA_RESTART"
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
check_func access
-check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt; }
+check_func_headers time.h clock_gettime || { check_func_headers time.h clock_gettime -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func fcntl
check_func fork
check_func gethrtime
check_func getopt
check_func getrusage
check_func gettimeofday
+check_func gmtime_r
check_func isatty
check_func localtime_r
check_func mach_absolute_time
check_func mmap
check_func mprotect
# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
-check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt; }
+check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt && LIBRT="-lrt"; }
check_func sched_getaffinity
check_func setrlimit
check_struct "sys/stat.h" "struct stat" st_mtim.tv_nsec -D_BSD_SOURCE
check_func_headers windows.h GetProcessTimes
check_func_headers windows.h GetSystemTimeAsFileTime
check_func_headers windows.h MapViewOfFile
+check_func_headers windows.h MoveFileExA
check_func_headers windows.h PeekNamedPipe
check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
+check_struct windows.h "CONDITION_VARIABLE" Ptr
check_func_headers glob.h glob
enabled xlib &&
check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
check_header libcrystalhd/libcrystalhd_if.h
check_header mach/mach_time.h
check_header malloc.h
+check_header net/udplite.h
check_header poll.h
check_header sys/mman.h
check_header sys/param.h
atan2f_args=2
ldexpf_args=2
powf_args=2
-fminf_args=2
for func in $MATH_FUNCS; do
eval check_mathfunc $func \${${func}_args:-1}
enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
enabled libopencv && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader
-enabled libopenjpeg && { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC ||
+enabled libopenjpeg && { check_lib openjpeg.h opj_version -lopenmj2 -DOPJ_STATIC ||
+ check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC ||
check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC ||
die "ERROR: libopenjpeg not found"; }
enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libshine && require_pkg_config shine shine/layer3.h shine_encode_buffer
-enabled libsmbclient && { { check_pkg_config smbclient libsmbclient.h smbc_init &&
- require_pkg_config smbclient libsmbclient.h smbc_init; } ||
- require smbclient libsmbclient.h smbc_init -lsmbclient; }
+enabled libsmbclient && { use_pkg_config smbclient libsmbclient.h smbc_init ||
+ require smbclient libsmbclient.h smbc_init -lsmbclient; }
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config speex speex/speex.h speex_decoder_init -lspeex
enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } }
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
-enabled libwebp && require_pkg_config libwebp webp/encode.h WebPGetEncoderVersion &&
- { check_code cc webp/encode.h "WebPPicture wp; wp.use_argb++" ||
- die "ERROR: libwebp too old."; }
-enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
+enabled libwebp && require_pkg_config "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
+enabled libx264 && { use_pkg_config x264 "stdint.h x264.h" x264_encoder_encode ||
+ { require libx264 x264.h x264_encoder_encode -lx264 &&
+ warn "using libx264 without pkg-config"; } } &&
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
die "ERROR: libx264 must be installed and version must be >= 0.118."; }
enabled libx265 && require_pkg_config x265 x265.h x265_encoder_encode &&
enable libdc1394_1; } ||
die "ERROR: No version of libdc1394 found "
fi
-
-SDL_CONFIG="${cross_prefix}sdl-config"
-if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
- check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
- check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
- enable sdl
-else
- if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
- sdl_cflags=$("${SDL_CONFIG}" --cflags)
- sdl_libs=$("${SDL_CONFIG}" --libs)
- check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
- check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
- check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
- enable sdl
- fi
+if ! disabled sdl; then
+ SDL_CONFIG="${cross_prefix}sdl-config"
+ if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+ enable sdl
+ else
+ if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+ sdl_cflags=$("${SDL_CONFIG}" --cflags)
+ sdl_libs=$("${SDL_CONFIG}" --libs)
+ check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+ enable sdl
+ elif enabled sdl ; then
+ die "ERROR: SDL not found"
+ else
+ disable sdl
+ fi
+ fi
fi
enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
check_header sys/videoio.h
+check_code cc sys/videoio.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
# check that WM_CAP_DRIVER_CONNECT is defined to the proper value
enabled xlib &&
check_lib X11/Xlib.h XOpenDisplay -lX11 || disable xlib
-enabled x11grab &&
-require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
-require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes &&
-{ enabled xlib || die "ERROR: Xlib not found"; }
+if ! disabled libxcb; then
+ check_pkg_config xcb xcb/xcb.h xcb_connect || {
+ enabled libxcb && die "ERROR: libxcb not found";
+ } && disable x11grab && enable libxcb
+
+if enabled libxcb; then
+ disabled libxcb_shm || {
+ check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || {
+ enabled libxcb_shm && die "ERROR: libxcb_shm not found";
+ } && check_header sys/shm.h && enable libxcb_shm; }
+
+ disabled libxcb_xfixes || {
+ check_pkg_config xcb-xfixes xcb/xfixes.h xcb_xfixes_get_cursor_image || {
+ enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found";
+ } && enable libxcb_xfixes; }
+
+ disabled libxcb_shape || {
+ check_pkg_config xcb-shape xcb/shape.h xcb_shape_get_rectangles || {
+ enabled libxcb_shape && die "ERROR: libxcb_shape not found";
+ } && enable libxcb_shape; }
+
+ add_cflags $xcb_cflags $xcb_shm_cflags $xcb_xfixes_cflags $xcb_shape_cflags
+ add_extralibs $xcb_libs $xcb_shm_libs $xcb_xfixes_libs $xcb_shape_libs
+fi
+fi
+
+if enabled x11grab; then
+ enabled xlib || die "ERROR: Xlib not found"
+ require Xext X11/extensions/XShm.h XShmCreateImage -lXext
+ require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes
+fi
check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs"
enabled zlib && add_cppflags -DZLIB_CONST
# conditional library dependencies, in linking order
-enabled aconvert_filter && prepend avfilter_deps "swresample"
enabled amovie_filter && prepend avfilter_deps "avformat avcodec"
enabled aresample_filter && prepend avfilter_deps "swresample"
enabled asyncts_filter && prepend avfilter_deps "avresample"
mkdir -p doc
+mkdir -p tests
echo "@c auto-generated by configure" > doc/config.texi
print_config ARCH_ "$config_files" $ARCH_LIST
EOF
}
-pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM"
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBRT $LIBM"
pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs"
pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs"
pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs"