From d9bbd97d7265889c5c6dbc71e8c53620e12ac7b0 Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 26 Jan 2020 17:41:05 +0800 Subject: [PATCH] Allow use libsrt.so for SRT is MPL license. --- README.md | 1 + trunk/auto/options.sh | 5 +++++ trunk/configure | 1 + trunk/src/core/srs_core.hpp | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d193eda3..ac4c9c136 100755 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ For previous versions, please read: ## V4 changes +* v4.0, 2020-01-26, Allow use libsrt.so for SRT is MPL license. 4.0.2 * v4.0, 2020-01-24, Fix [#1147][bug #1147], support SRT(Secure Reliable Transport). 4.0.1 ## V3 changes diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index d1f769006..8c7cdae51 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -50,6 +50,8 @@ SRS_JOBS=1 SRS_STATIC=NO # If enabled, link shared libraries for libst.so which uses MPL license. SRS_SHARED_ST=NO +# If enabled, link shared libraries for libsrt.so which uses MPL license. +SRS_SHARED_SRT=NO # whether enable the gcov SRS_GCOV=NO # whether enable the log verbose/info/trace level. @@ -186,6 +188,7 @@ Conflicts: Experts: --use-sys-ssl Do not compile ssl, use system ssl(-lssl) if required. --use-shared-st Use link shared libraries for ST which uses MPL license. + --use-shared-srt Use link shared libraries for SRT which uses MPL license. --export-librtmp-project= Export srs-librtmp to specified project in path. --export-librtmp-single= Export srs-librtmp to a single file(.h+.cpp) in path. @@ -276,6 +279,7 @@ function parse_user_option() { --use-sys-ssl) SRS_USE_SYS_SSL=YES ;; --use-shared-st) SRS_SHARED_ST=YES ;; + --use-shared-srt) SRS_SHARED_SRT=YES ;; --memory-watch) SRS_MEM_WATCH=YES ;; --export-librtmp-project) SRS_EXPORT_LIBRTMP_PROJECT=${value} ;; @@ -541,6 +545,7 @@ function regenerate_options() { if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi if [ $SRS_SHARED_ST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-st"; fi + if [ $SRS_SHARED_SRT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --use-shared-srt"; fi if [ $SRS_LOG_VERBOSE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-verbose"; fi if [ $SRS_LOG_INFO = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-info"; fi if [ $SRS_LOG_TRACE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --log-trace"; fi diff --git a/trunk/configure b/trunk/configure index 843d18376..2f65cbbe2 100755 --- a/trunk/configure +++ b/trunk/configure @@ -164,6 +164,7 @@ fi # srt code path if [[ $SRS_SRT == YES ]]; then LibSRTRoot="${SRS_WORKDIR}/src/srt"; LibSRTfile="${SRS_OBJS_DIR}/srt/lib/libsrt.a" + if [[ $SRS_SHARED_SRT == YES ]]; then LibSRTfile="-lsrt"; fi fi # the link options, always use static link SrsLinkOptions="-ldl"; diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index d1febe177..0f8f8c3c7 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -27,7 +27,7 @@ // The version config. #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 1 +#define VERSION_REVISION 2 // The macros generated by configure script. #include