Skip to content

Commit 73e2623

Browse files
authored
[build] Synchronized changes in configure script with CMake (#2353)
1 parent 0bbc62d commit 73e2623

File tree

1 file changed

+50
-26
lines changed

1 file changed

+50
-26
lines changed

configure-data.tcl

+50-26
Original file line numberDiff line numberDiff line change
@@ -25,48 +25,54 @@
2525

2626
# Options processed here internally, not passed to cmake
2727
set internal_options {
28-
with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++"
29-
with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++"
30-
with-srt-name=<name> "Override srt library name"
31-
with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)"
28+
with-compiler-prefix=<prefix> "set C/C++ toolchains <prefix>gcc and <prefix>g++"
29+
with-compiler-type=<name> "compiler type: gcc(default), cc, others simply add ++ for C++"
30+
with-srt-name=<name> "Override srt library name"
31+
with-haicrypt-name=<name> "Override haicrypt library name (if compiled separately)"
32+
with-atomic=<spec> "Select implementation for atomics (compiler-intrinsics or sync-mutex)"
3233
}
3334

3435
# Options that refer directly to variables used in CMakeLists.txt
3536
set cmake_options {
3637
cygwin-use-posix "Should the POSIX API be used for cygwin. Ignored if the system isn't cygwin. (default: OFF)"
37-
enable-encryption "Should encryption features be enabled (default: ON)"
38-
enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON)"
38+
enable-c++11 "Should the c++11 parts (srt-live-transmit) be enabled (default: ON, with gcc < 4.7 OFF)"
3939
enable-apps "Should the Support Applications be Built? (default: ON)"
40+
enable-bonding "Enable 'bonding' SRT feature (default: OFF)"
4041
enable-testing "Should developer testing applications be built (default: OFF)"
41-
enable-c++-deps "Extra library dependencies in srt.pc for C language (default: OFF)"
42-
enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)"
42+
enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)"
4343
enable-logging "Should logging be enabled (default: ON)"
44-
enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)"
44+
enable-heavy-logging "Should heavy debug logging be enabled (default: OFF)"
4545
enable-haicrypt-logging "Should logging in haicrypt be enabled (default: OFF)"
46-
enable-inet-pton "Set to OFF to prevent usage of inet_pton when building against modern SDKs (default: ON)"
47-
enable-code-coverage "Enable code coverage reporting (default: OFF)"
48-
enable-monotonic-clock "Enforced clock_gettime with monotonic clock on GC CV /temporary fix for #729/ (default: OFF)"
49-
enable-profile "Should instrument the code for profiling. Ignored for non-GNU compiler. (default: OFF)"
50-
enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)"
5146
enable-shared "Should libsrt be built as a shared library (default: ON)"
5247
enable-static "Should libsrt be built as a static library (default: ON)"
53-
enable-suflip "Should suflip tool be built (default: OFF)"
48+
enable-relative-libpath "Should applications contain relative library paths, like ../lib (default: OFF)"
5449
enable-getnameinfo "In-logs sockaddr-to-string should do rev-dns (default: OFF)"
55-
enable-unittests "Enable unit tests (default: OFF)"
50+
enable-unittests "Enable Unit Tests (will download Google UT) (default: OFF)"
51+
enable-encryption "Should encryption features be enabled (default: ON)"
52+
enable-c++-deps "Extra library dependencies in srt.pc for C language (default: ON)"
53+
use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)"
54+
enable-inet-pton "Set to OFF to prevent usage of inet_pton when building against modern SDKs (default: ON)"
55+
enable-code-coverage "Enable code coverage reporting (default: OFF)"
56+
enable-monotonic-clock "Enforced clock_gettime with monotonic clock on GC CV /temporary fix for #729/ (default: OFF)"
5657
enable-thread-check "Enable #include <threadcheck.h> that implements THREAD_* macros"
57-
enable-experimental-bonding "Enable experimental bonding (default: OFF)"
58-
openssl-crypto-library=<filepath> "Path to a library."
59-
openssl-include-dir=<path> "Path to a file."
60-
openssl-ssl-library=<filepath> "Path to a library."
61-
pkg-config-executable=<filepath> "pkg-config executable"
62-
pthread-include-dir=<path> "Path to a file."
63-
pthread-library=<filepath> "Path to a library."
58+
enable-stdc++-sync "Use standard C++11 chrono/threads instead of pthread wrapper (default: OFF, on Windows: ON)"
59+
use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)"
6460
use-busy-waiting "Enable more accurate sending times at a cost of potentially higher CPU load (default: OFF)"
6561
use-gnustl "Get c++ library/headers from the gnustl.pc"
62+
enable-sock-cloexec "Enable setting SOCK_CLOEXEC on a socket (default: ON)"
63+
enable-show-project-config "Enables use of ShowProjectConfig() in cmake (default: OFF)"
64+
enable-new-rcvbuffer "Enables the new receiver buffer implementation (default: ON)"
65+
enable-clang-tsa "Enable Clang's Thread-Safety-Analysis (default: OFF)"
66+
atomic-use-srt-sync-mutex "Use mutex to implement atomics (alias: --with-atomic=sync-mutex) (default: OFF)"
67+
6668
use-enclib "Encryption library to be used: openssl(default), gnutls, mbedtls"
67-
use-gnutls "DEPRECATED. Use USE_ENCLIB=openssl|gnutls|mbedtls instead"
68-
use-openssl-pc "Use pkg-config to find OpenSSL libraries (default: ON)"
69-
use-static-libstdc++ "Should use static rather than shared libstdc++ (default: OFF)"
69+
enable-debug=<0,1,2> "Enable debug mode (0=disabled, 1=debug, 2=rel-with-debug)"
70+
pkg-config-executable=<filepath> "pkg-config executable"
71+
openssl-crypto-library=<filepath> "OpenSSL: Path to a libcrypto library."
72+
openssl-include-dir=<path> "OpenSSL: Path to includes."
73+
openssl-ssl-library=<filepath> "OpenSSL: Path to a libssl library."
74+
pthread-include-dir=<path> "PThread: Path to includes"
75+
pthread-library=<filepath> "PThread: Path to the pthread library."
7076
}
7177

7278
set options $internal_options$cmake_options
@@ -163,6 +169,24 @@ proc preprocess {} {
163169
set ::haicrypt_name $::optval(--with-haicrypt-name)
164170
unset ::optval(--with-haicrypt-name)
165171
}
172+
173+
if { "--with-atomic" in $::optkeys } {
174+
switch -- $::optval(--with-atomic) {
175+
compiler-intrinsics {
176+
}
177+
178+
sync-mutex {
179+
set ::optval(--atomic-use-srt-sync-mutex) 1
180+
}
181+
182+
default {
183+
puts "ERROR: --with-atomic option accepts two values: compiler-intrinsics (default) or sync-mutex"
184+
exit 1
185+
}
186+
}
187+
188+
unset ::optval(--with-atomic)
189+
}
166190
}
167191

168192
proc GetCompilerCommand {} {

0 commit comments

Comments
 (0)