--enable-libsnappy enable Snappy compression, needed for hap encoding [no]
--enable-libsoxr enable Include libsoxr resampling [no]
--enable-libspeex enable Speex de/encoding via libspeex [no]
+ --enable-libsrt enable Haivision SRT protocol via libsrt [no]
--enable-libssh enable SFTP protocol via libssh [no]
--enable-libtesseract enable Tesseract, needed for ocr filter [no]
--enable-libtheora enable Theora encoding via libtheora [no]
test_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPS
}
+x86asm_o(){
+ eval printf '%s\\n' $X86ASM_O
+}
+
+test_x86asm(){
+ log test_x86asm "$@"
+ echo "$1" > $TMPASM
+ log_file $TMPASM
+ shift
+ test_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" $(x86asm_o $TMPO) $TMPASM
+}
+
check_cmd(){
log check_cmd "$@"
cmd=$1
check_as ${1}_external "$2"
}
-test_x86asm(){
- log test_x86asm "$@"
- echo "$1" > $TMPASM
- log_file $TMPASM
- shift 1
- test_cmd $x86asmexe $X86ASMFLAGS -Werror "$@" -o $TMPO $TMPASM
+check_x86asm(){
+ log check_x86asm "$@"
+ name=$1
+ shift
+ disable $name
+ test_x86asm "$@" && enable $name
}
ld_o(){
libsnappy
libsoxr
libspeex
+ libsrt
libssh
libtesseract
libtheora
TOOLCHAIN_FEATURES="
as_arch_directive
+ as_dn_directive
as_fpu_directive
as_func
as_object_arch
libtls_conflict="openssl gnutls"
mmsh_protocol_select="http_protocol"
mmst_protocol_select="network"
+libsrt_protocol_deps="libsrt"
+libsrt_protocol_select="network"
rtmp_protocol_conflict="librtmp_protocol"
rtmp_protocol_select="tcp_protocol"
rtmp_protocol_suggest="zlib"
check_gas() {
log "check_gas using '$as' as AS"
# :vararg is used on aarch64, arm and ppc altivec
- test_as <<EOF || return 1
+ check_as vararg "
.macro m n, y:vararg=0
\n: .int \y
.endm
-m x
-EOF
+m x" || return 1
# .altmacro is only used in arm asm
! enabled arm || check_as gnu_as ".altmacro"
}
check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
check_as as_arch_directive ".arch armv7-a"
+ check_as as_dn_directive "ra .dn d0.i16"
check_as as_fpu_directive ".fpu neon"
# llvm's integrated assembler supports .object_arch from llvm 3.5
X86ASMDEP='$(DEPX86ASM) $(X86ASMFLAGS) -M $(X86ASM_O) $< > $(@:.o=.d)'
X86ASM_DEPFLAGS=
fi
- test_x86asm "movbe ecx, [5]" && enable x86asm
+ check_x86asm x86asm "movbe ecx, [5]"
}
if ! disabled_any asm mmx x86asm; then
elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;;
esac
- test_x86asm "vmovdqa32 [eax]{k1}{z}, zmm0" || disable avx512_external
- test_x86asm "vextracti128 xmm0, ymm0, 0" || disable avx2_external
- test_x86asm "vpmacsdd xmm0, xmm1, xmm2, xmm3" || disable xop_external
- test_x86asm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
- test_x86asm "CPU amdnop" || disable cpunop
+ check_x86asm avx512_external "vmovdqa32 [eax]{k1}{z}, zmm0"
+ check_x86asm avx2_external "vextracti128 xmm0, ymm0, 0"
+ check_x86asm xop_external "vpmacsdd xmm0, xmm1, xmm2, xmm3"
+ check_x86asm fma4_external "vfmaddps ymm0, ymm1, ymm2, ymm3"
+ check_x86asm cpunop "CPU amdnop"
fi
case "$cpu" in
enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
+enabled libsrt && require_pkg_config libsrt "srt >= 1.2.0" srt/srt.h srt_socket
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libtls && require_pkg_config libtls libtls tls.h tls_configure