mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 19:31:53 +00:00
Support configure for generic linux. v5.0.145, v6.0.32 (#3445)
If your OS is not CentOS, Ubuntu, macOS, cygwin64, run of configure will fail with:
```
Your OS Linux is not supported.
```
For other linux systems, we should support an option:
```
./configure --generic-linux=on
```
Please note that you might still fail for other issues while configuring or building.
PICK b31940a15a
-------
Co-authored-by: chundonglinlin <chundonglinlin@163.com>
Co-authored-by: ChenGH <chengh_math@126.com>
This commit is contained in:
parent
36a72282e6
commit
47aa42f1e2
4 changed files with 19 additions and 4 deletions
|
@ -14,9 +14,14 @@
|
|||
#####################################################################################
|
||||
# Check OS and CPU architectures.
|
||||
#####################################################################################
|
||||
if [[ $OS_IS_UBUNTU != YES && $OS_IS_CENTOS != YES && $OS_IS_OSX != YES && $SRS_CROSS_BUILD != YES && $SRS_CYGWIN64 != YES ]]; then
|
||||
echo "Your OS `uname -s` is not supported."
|
||||
exit 1
|
||||
if [[ $OS_IS_UBUNTU != YES && $OS_IS_CENTOS != YES && $OS_IS_OSX != YES && $SRS_CYGWIN64 != YES ]]; then
|
||||
if [[ $SRS_CROSS_BUILD != YES && $SRS_GENERIC_LINUX != YES ]]; then
|
||||
echo "Your OS `uname -s` is not supported."
|
||||
if [[ $(uname -s) == "Linux" ]]; then
|
||||
echo "Please try --generic-linux=on for other Linux systems."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# The absolute path of SRS_OBJS, for prefix and PKG_CONFIG_PATH
|
||||
|
|
|
@ -90,6 +90,7 @@ SRS_GPROF=NO # Performance test: gprof
|
|||
#
|
||||
################################################################
|
||||
# Preset options
|
||||
SRS_GENERIC_LINUX= # Try to run as generic linux, not CentOS or Ubuntu.
|
||||
SRS_OSX= #For OSX/macOS/Darwin PC.
|
||||
SRS_CYGWIN64= # For Cygwin64 for Windows PC or servers.
|
||||
SRS_CROSS_BUILD= #For cross build, for example, on Ubuntu.
|
||||
|
@ -145,6 +146,10 @@ function apply_system_options() {
|
|||
if [[ $OS_IS_LINUX == YES || $OS_IS_CYGWIN == YES ]]; then
|
||||
SRS_JOBS=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || echo 1)
|
||||
fi
|
||||
|
||||
if [[ $OS_IS_UBUNTU != YES && $OS_IS_CENTOS != YES && $OS_IS_OSX != YES && $SRS_CYGWIN64 != YES ]]; then
|
||||
echo "Warning: Your OS is not Ubuntu(no apt-get), CentOS(no yum), maxOS(not Darwin), Windows(not CYGWIN)"
|
||||
fi
|
||||
}
|
||||
apply_system_options
|
||||
|
||||
|
@ -223,6 +228,7 @@ Experts:
|
|||
--log-trace=on|off Whether enable the log trace level. Default: $(value2switch $SRS_LOG_TRACE)
|
||||
--log-level_v2=on|off Whether use v2.0 log level definition, see log4j specs. Default: $(value2switch $SRS_LOG_LEVEL_V2)
|
||||
--backtrace=on|off Whether show backtrace when crashing. Default: $(value2switch $SRS_BACKTRACE)
|
||||
--generic-linux=on|off Whether run as generic linux, if not CentOS or Ubuntu. Default: $(value2switch $SRS_GENERIC_LINUX)
|
||||
|
||||
Deprecated:
|
||||
--hds=on|off Whether build the hds streaming, mux RTMP to F4M/F4V files. Default: $(value2switch $SRS_HDS)
|
||||
|
@ -404,6 +410,8 @@ function parse_user_option() {
|
|||
--debug) SRS_DEBUG=$(switch2value $value) ;;
|
||||
--debug-stats) SRS_DEBUG_STATS=$(switch2value $value) ;;
|
||||
|
||||
--generic-linux) SRS_GENERIC_LINUX=$(switch2value $value) ;;
|
||||
|
||||
# Alias for --arm, cross build.
|
||||
--cross-build) SRS_CROSS_BUILD=YES ;;
|
||||
--enable-cross-compile) SRS_CROSS_BUILD=YES ;;
|
||||
|
@ -652,6 +660,7 @@ function regenerate_options() {
|
|||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --sanitizer-log=$(value2switch $SRS_SANITIZER_LOG)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --cygwin64=$(value2switch $SRS_CYGWIN64)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --single-thread=$(value2switch $SRS_SINGLE_THREAD)"
|
||||
SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --generic-linux=$(value2switch $SRS_GENERIC_LINUX)"
|
||||
if [[ $SRS_CROSS_BUILD_ARCH != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --arch=$SRS_CROSS_BUILD_ARCH"; fi
|
||||
if [[ $SRS_CROSS_BUILD_CPU != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --cpu=$SRS_CROSS_BUILD_CPU"; fi
|
||||
if [[ $SRS_CROSS_BUILD_HOST != "" ]]; then SRS_AUTO_CONFIGURE="$SRS_AUTO_CONFIGURE --host=$SRS_CROSS_BUILD_HOST"; fi
|
||||
|
|
|
@ -8,6 +8,7 @@ The changelog for SRS.
|
|||
|
||||
## SRS 5.0 Changelog
|
||||
|
||||
* v5.0, 2023-03-06, Merge [#3445](https://github.com/ossrs/srs/pull/3445): Support configure for generic linux. v5.0.145 (#3445)
|
||||
* v5.0, 2023-03-04, Merge [#3105](https://github.com/ossrs/srs/pull/3105): Kickoff publisher when stream is idle, which means no players. v5.0.144 (#3105)
|
||||
* v5.0, 2023-02-25, Merge [#3424](https://github.com/ossrs/srs/pull/3424): API: Add service_id for http_hooks, which identify the process. v5.0.143 (#3424)
|
||||
* v5.0, 2023-02-22, Compatible with legacy RTMP URL. v5.0.142
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 144
|
||||
#define VERSION_REVISION 145
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue