mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SRT: Upgrade libsrt from 1.4.1 to 1.5.1. v6.0.12 (#3362)
Co-authored-by: winlin <winlin@vip.126.com>
This commit is contained in:
parent
7a56208f2f
commit
fe086dfc31
143 changed files with 38185 additions and 15108 deletions
106
trunk/3rdparty/srt-1-fit/configure-data.tcl
vendored
106
trunk/3rdparty/srt-1-fit/configure-data.tcl
vendored
|
@ -25,47 +25,55 @@
|
|||
|
||||
# Options processed here internally, not passed to cmake
|
||||
set internal_options {
|
||||
with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++"
|
||||
with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++"
|
||||
with-srt-name=<name> "Override srt library name"
|
||||
with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)"
|
||||
with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++"
|
||||
with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++"
|
||||
with-srt-name=<name> "Override srt library name"
|
||||
with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)"
|
||||
with-atomic=<spec> "Select implementation for atomics (compiler-intrinsics or sync-mutex)"
|
||||
}
|
||||
|
||||
# Options that refer directly to variables used in CMakeLists.txt
|
||||
set cmake_options {
|
||||
cygwin-use-posix "Should the POSIX API be used for cygwin. Ignored if the system isn't cygwin. (default: OFF)"
|
||||
enable-encryption "Should encryption features be enabled (default: ON)"
|
||||
enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON)"
|
||||
enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON, with gcc < 4.7 OFF)"
|
||||
enable-apps "Should the Support Applications be Built? (default: ON)"
|
||||
enable-bonding "Enable 'bonding' SRT feature (default: OFF)"
|
||||
enable-testing "Should developer testing applications be built (default: OFF)"
|
||||
enable-c++-deps "Extra library dependencies in srt.pc for C language (default: OFF)"
|
||||
enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)"
|
||||
enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)"
|
||||
enable-logging "Should logging be enabled (default: ON)"
|
||||
enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)"
|
||||
enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)"
|
||||
enable-haicrypt-logging "Should logging in haicrypt be enabled (default: OFF)"
|
||||
enable-shared "Should libsrt be built as a shared library (default: ON)"
|
||||
enable-static "Should libsrt be built as a static library (default: ON)"
|
||||
enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)"
|
||||
enable-getnameinfo "In-logs sockaddr-to-string should do rev-dns (default: OFF)"
|
||||
enable-unittests "Enable Unit Tests (will download Google UT) (default: OFF)"
|
||||
enable-encryption "Should encryption features be enabled (default: ON)"
|
||||
enable-c++-deps "Extra library dependencies in srt.pc for C language (default: ON)"
|
||||
use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)"
|
||||
enable-inet-pton "Set to OFF to prevent usage of inet_pton when building against modern SDKs (default: ON)"
|
||||
enable-code-coverage "Enable code coverage reporting (default: OFF)"
|
||||
enable-monotonic-clock "Enforced clock_gettime with monotonic clock on GC CV /temporary fix for #729/ (default: OFF)"
|
||||
enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)"
|
||||
enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)"
|
||||
enable-shared "Should libsrt be built as a shared library (default: ON)"
|
||||
enable-static "Should libsrt be built as a static library (default: ON)"
|
||||
enable-suflip "Should suflip tool be built (default: OFF)"
|
||||
enable-getnameinfo "In-logs sockaddr-to-string should do rev-dns (default: OFF)"
|
||||
enable-unittests "Enable unit tests (default: OFF)"
|
||||
enable-thread-check "Enable #include <threadcheck.h> that implements THREAD_* macros"
|
||||
openssl-crypto-library=<filepath> "Path to a library."
|
||||
openssl-include-dir=<path> "Path to a file."
|
||||
openssl-ssl-library=<filepath> "Path to a library."
|
||||
pkg-config-executable=<filepath> "pkg-config executable"
|
||||
pthread-include-dir=<path> "Path to a file."
|
||||
pthread-library=<filepath> "Path to a library."
|
||||
enable-stdc++-sync "Use standard C++11 chrono/threads instead of pthread wrapper (default: OFF, on Windows: ON)"
|
||||
use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)"
|
||||
openssl-use-static-libs "Link OpenSSL statically (default: OFF)."
|
||||
use-busy-waiting "Enable more accurate sending times at a cost of potentially higher CPU load (default: OFF)"
|
||||
use-gnustl "Get c++ library/headers from the gnustl.pc"
|
||||
enable-sock-cloexec "Enable setting SOCK_CLOEXEC on a socket (default: ON)"
|
||||
enable-show-project-config "Enables use of ShowProjectConfig() in cmake (default: OFF)"
|
||||
enable-new-rcvbuffer "Enables the new receiver buffer implementation (default: ON)"
|
||||
enable-clang-tsa "Enable Clang's Thread-Safety-Analysis (default: OFF)"
|
||||
atomic-use-srt-sync-mutex "Use mutex to implement atomics (alias: --with-atomic=sync-mutex) (default: OFF)"
|
||||
|
||||
use-enclib "Encryption library to be used: openssl(default), gnutls, mbedtls"
|
||||
use-gnutls "DEPRECATED. Use USE_ENCLIB=openssl|gnutls|mbedtls instead"
|
||||
use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)"
|
||||
use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)"
|
||||
enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)"
|
||||
pkg-config-executable=<filepath> "pkg-config executable"
|
||||
openssl-crypto-library=<filepath> "OpenSSL: Path to a libcrypto library."
|
||||
openssl-include-dir=<path> "OpenSSL: Path to includes."
|
||||
openssl-ssl-library=<filepath> "OpenSSL: Path to a libssl library."
|
||||
pthread-include-dir=<path> "PThread: Path to includes"
|
||||
pthread-library=<filepath> "PThread: Path to the pthread library."
|
||||
}
|
||||
|
||||
set options $internal_options$cmake_options
|
||||
|
@ -162,6 +170,24 @@ proc preprocess {} {
|
|||
set ::haicrypt_name $::optval(--with-haicrypt-name)
|
||||
unset ::optval(--with-haicrypt-name)
|
||||
}
|
||||
|
||||
if { "--with-atomic" in $::optkeys } {
|
||||
switch -- $::optval(--with-atomic) {
|
||||
compiler-intrinsics {
|
||||
}
|
||||
|
||||
sync-mutex {
|
||||
set ::optval(--atomic-use-srt-sync-mutex) 1
|
||||
}
|
||||
|
||||
default {
|
||||
puts "ERROR: --with-atomic option accepts two values: compiler-intrinsics (default) or sync-mutex"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
unset ::optval(--with-atomic)
|
||||
}
|
||||
}
|
||||
|
||||
proc GetCompilerCommand {} {
|
||||
|
@ -170,9 +196,16 @@ proc GetCompilerCommand {} {
|
|||
# --cmake-c[++]-compiler
|
||||
# (cmake-toolchain-file will set things up without the need to check things here)
|
||||
|
||||
set compiler gcc
|
||||
if { [info exists ::optval(--with-compiler-type)] } {
|
||||
set compiler $::optval(--with-compiler-type)
|
||||
}
|
||||
|
||||
if { [info exists ::optval(--with-compiler-prefix)] } {
|
||||
set prefix $::optval(--with-compiler-prefix)
|
||||
return ${prefix}gcc
|
||||
return ${prefix}$compiler
|
||||
} else {
|
||||
return $compiler
|
||||
}
|
||||
|
||||
if { [info exists ::optval(--cmake-c-compiler)] } {
|
||||
|
@ -201,6 +234,7 @@ proc postprocess {} {
|
|||
set toolchain_changed no
|
||||
foreach changer {
|
||||
--with-compiler-prefix
|
||||
--with-compiler-type
|
||||
--cmake-c-compiler
|
||||
--cmake-c++-compiler
|
||||
--cmake-cxx-compiler
|
||||
|
@ -223,6 +257,7 @@ proc postprocess {} {
|
|||
# Check characteristics of the compiler - in particular, whether the target is different
|
||||
# than the current target.
|
||||
set compiler_path ""
|
||||
set target_platform ""
|
||||
set cmd [GetCompilerCommand]
|
||||
if { $cmd != "" } {
|
||||
set gcc_version [exec $cmd -v 2>@1]
|
||||
|
@ -237,7 +272,7 @@ proc postprocess {} {
|
|||
}
|
||||
|
||||
if { $target_platform == "" } {
|
||||
puts "NOTE: can't obtain target from gcc -v: $l"
|
||||
puts "NOTE: can't obtain target from '[file tail $cmd] -v': $l - ASSUMING HOST compiler"
|
||||
} else {
|
||||
if { $target_platform != $::tcl_platform(machine) } {
|
||||
puts "NOTE: foreign target type detected ($target)" ;# - setting CROSSCOMPILING flag"
|
||||
|
@ -245,6 +280,8 @@ proc postprocess {} {
|
|||
set iscross 1
|
||||
}
|
||||
}
|
||||
} else {
|
||||
puts "CONFIGURE: default compiler used"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,8 +369,19 @@ proc postprocess {} {
|
|||
# Otherwise don't set PKG_CONFIG_PATH and we'll see.
|
||||
}
|
||||
|
||||
if { $::HAVE_DARWIN && !$toolchain_changed} {
|
||||
|
||||
set use_brew 0
|
||||
if { $::HAVE_DARWIN && !$toolchain_changed } {
|
||||
set use_brew 1
|
||||
}
|
||||
if { $use_brew } {
|
||||
foreach item $::cmakeopt {
|
||||
if { [string first "Android" $item] != -1 } {
|
||||
set use_brew 0
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if { $use_brew } {
|
||||
if { $have_gnutls } {
|
||||
# Use gnutls explicitly, as found in brew
|
||||
set er [catch {exec brew info gnutls} res]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue