@@ -77,7 +77,6 @@ SRS_VALGRIND=NO
77
77
SRS_X86_X64=NO
78
78
# for osx system
79
79
SRS_OSX=NO
80
- SRS_ALLOW_OSX=NO
81
80
# dev, open all features for dev, no gperf/prof/arm.
82
81
SRS_DEV=NO
83
82
# dev, open main server feature for dev, no utest/research/librtmp
@@ -98,7 +97,7 @@ SRS_DISABLE_ALL=NO
98
97
SRS_ENABLE_ALL=NO
99
98
#
100
99
# ####################################################################################
101
- # We don't support crossbuild for ARM/MIPS, please directly build it on ARM/ MIPS server .
100
+ # Whether enable crossbuild for ARM or MIPS.
102
101
SRS_CROSS_BUILD=NO
103
102
104
103
# ####################################################################################
@@ -107,106 +106,79 @@ SRS_CROSS_BUILD=NO
107
106
function show_help() {
108
107
cat << END
109
108
110
- Options:
111
- -h, --help print this message
112
-
113
- --with-ssl enable rtmp complex handshake, requires openssl-devel installed.
114
- --with-hds enable hds streaming, mux RTMP to F4M/F4V files.
115
- --with-nginx enable delivery HTTP stream with nginx.
116
- --with-stream-caster enable stream caster to serve other stream over other protocol.
117
- --with-ffmpeg enable transcoding tool ffmpeg.
118
- --with-transcode enable transcoding features.
119
- --with-ingest enable ingest features.
120
- --with-stat enable the data statistic, for http api.
121
- --with-librtmp enable srs-librtmp, library for client.
122
- --with-research build the research tools.
123
- --with-utest build the utest for SRS.
124
- --with-gperf build SRS with gperf tools(no gmd/gmc/gmp/gcp, with tcmalloc only).
125
- https://blog.csdn.net/win_lin/article/details/53503869
126
- --with-gmc build memory check for SRS with gperf tools.
127
- --with-gmd build memory defense(corrupt memory) for SRS with gperf tools.
128
- --with-gmp build memory profile for SRS with gperf tools.
129
- --with-gcp build cpu profile for SRS with gperf tools.
130
- --with-gprof build SRS with gprof(GNU profile tool).
131
- --with-arm-ubuntu12 cross build SRS on ubuntu12 for armhf(v7cpu).
132
- --with-mips-ubuntu12 cross build SRS on ubuntu12 for mips.
133
-
134
- --without-ssl disable rtmp complex handshake.
135
- --without-hds disable hds, the adobe http dynamic streaming.
136
- --without-nginx disable delivery HTTP stream with nginx.
137
- --without-stream-caster disable stream caster, only listen and serve RTMP/HTTP.
138
- --without-ffmpeg disable the ffmpeg transcode tool feature.
139
- --without-transcode disable the transcoding feature.
140
- --without-ingest disable the ingest feature.
141
- --without-stat disable the data statistic feature.
142
- --without-librtmp disable srs-librtmp, library for client.
143
- --without-research do not build the research tools.
144
- --without-utest do not build the utest for SRS.
145
- --without-gperf do not build SRS with gperf tools(without tcmalloc and gmd/gmc/gmp/gcp).
146
- --without-gmc do not build memory check for SRS with gperf tools.
147
- --without-gmd do not build memory defense for SRS with gperf tools.
148
- --without-gmp do not build memory profile for SRS with gperf tools.
149
- --without-gcp do not build cpu profile for SRS with gperf tools.
150
- --without-gprof do not build srs with gprof(GNU profile tool).
151
- --without-arm-ubuntu12 do not cross build srs on ubuntu12 for armhf(v7cpu).
152
- --without-mips-ubuntu12 do not cross build srs on ubuntu12 for mips.
153
-
109
+ Presets:
110
+ --x86-64, --x86-x64 [default] For x86/x64 cpu, common pc and servers.
111
+ --arm Enable crossbuild for ARM, should also set bellow toolchain options.
112
+ --mips Enable crossbuild for MIPS
113
+
114
+ Features:
115
+ -h, --help Print this message and exit 0.
116
+
117
+ --with-ssl Enable rtmp complex handshake, requires openssl-devel installed.
118
+ --with-hds Enable hds streaming, mux RTMP to F4M/F4V files.
119
+ --with-stream-caster Enable stream caster to serve other stream over other protocol.
120
+ --with-stat Enable the data statistic, for http api.
121
+ --with-librtmp Enable srs-librtmp, library for client.
122
+ --with-research Build the research tools.
123
+ --with-utest Build the utest for SRS.
124
+
125
+ --without-ssl Disable rtmp complex handshake.
126
+ --without-hds Disable hds, the adobe http dynamic streaming.
127
+ --without-stream-caster Disable stream caster, only listen and serve RTMP/HTTP.
128
+ --without-stat Disable the data statistic feature.
129
+ --without-librtmp Disable srs-librtmp, library for client.
130
+ --without-research Do not build the research tools.
131
+ --without-utest Do not build the utest for SRS.
132
+
154
133
--prefix=<path> The absolute installation path for srs. Default: $SRS_PREFIX
155
134
--static Whether add '-static' to link options.
156
135
--gcov Whether enable the GCOV compiler options.
157
136
--jobs[=N] Allow N jobs at once; infinite jobs with no arg.
158
- used for make in the configure, for example, to make ffmpeg.
159
- --log-verbose whether enable the log verbose level. default: no.
160
- --log-info whether enable the log info level. default: no.
161
- --log-trace whether enable the log trace level. default: yes.
162
-
163
- Presets:
164
- --x86-x64 [default] for x86/x64 cpu, common pc and servers.
165
- --osx for osx(darwin) system to build SRS.
166
- --pi for raspberry-pi(directly build), open features hls/ssl/static.
167
- --cubie for cubieboard(directly build), open features except ffmpeg/nginx.
168
- --arm alias for --with-arm-ubuntu12, for ubuntu12, arm crossbuild
169
- --mips alias for --with-mips-ubuntu12, for ubuntu12, mips crossbuild
170
- --fast the most fast compile, nothing, only support vp6 RTMP.
171
- --pure-rtmp only support RTMP with ssl.
172
- --disable-all disable all features, only support vp6 RTMP.
173
- --dev for dev, open all features, no nginx/gperf/gprof/arm.
174
- --fast-dev for dev fast compile, the RTMP server, without librtmp/utest/research.
175
- --demo for srs demo, @see: https://github.com/ossrs/srs/wiki/v1_CN_SampleDemo
176
- --full enable all features, no gperf/gprof/arm.
177
- --x86-64 alias for --x86-x64.
137
+ Used for make in the configure, for example, to make ffmpeg.
138
+ --log-verbose Whether enable the log verbose level. default: no.
139
+ --log-info Whether enable the log info level. default: no.
140
+ --log-trace Whether enable the log trace level. default: yes.
141
+
142
+ Performance:
143
+ https://blog.csdn.net/win_lin/article/details/53503869
144
+ --with-valgrind Support valgrind for memory check.
145
+ --with-gperf Build SRS with gperf tools(no gmd/gmc/gmp/gcp, with tcmalloc only).
146
+ --with-gmc Build memory check for SRS with gperf tools.
147
+ --with-gmd Build memory defense(corrupt memory) for SRS with gperf tools.
148
+ --with-gmp Build memory profile for SRS with gperf tools.
149
+ --with-gcp Build cpu profile for SRS with gperf tools.
150
+ --with-gprof Build SRS with gprof(GNU profile tool).
151
+
152
+ --without-valgrind Do not support valgrind for memory check.
153
+ --without-gperf Do not build SRS with gperf tools(without tcmalloc and gmd/gmc/gmp/gcp).
154
+ --without-gmc Do not build memory check for SRS with gperf tools.
155
+ --without-gmd Do not build memory defense for SRS with gperf tools.
156
+ --without-gmp Do not build memory profile for SRS with gperf tools.
157
+ --without-gcp Do not build cpu profile for SRS with gperf tools.
158
+ --without-gprof Do not build srs with gprof(GNU profile tool).
178
159
179
160
Toolchain options:
180
- --extra-flags=<EFLAGS> Set EFLAGS as CFLAGS and CXXFLAGS. Pass to ST as EXTRA_CFLAGS.
181
-
182
- Recomment to enable:
183
- --with-http-api enable HTTP API, to communicate with SRS.
184
- --with-http-callback enable HTTP hooks, build cherrypy as demo api server.
185
- --with-http-server enable HTTP server to delivery http stream.
186
- --with-hls enable HLS streaming, mux RTMP to M3U8/TS files.
187
- --with-dvr enable DVR, record RTMP to FLV/MP4 files.
188
-
161
+ https://github.com/ossrs/srs/issues/1547#issuecomment-576078411
162
+ --extra-flags=<EFLAGS> Set EFLAGS as CFLAGS and CXXFLAGS. Also passed to ST as EXTRA_CFLAGS.
163
+
189
164
Conflicts:
190
165
1. --with-gmc vs --with-gmp:
191
166
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
192
167
2. --with-gperf/gmc/gmp vs --with-gprof:
193
- gperftools not compatible with gprof.
168
+ The gperftools not compatible with gprof.
194
169
3. --arm vs --with-ffmpeg/gperf/gmc/gmp/gprof:
195
- the complex tools not available for arm.
170
+ The complex tools not available for arm.
196
171
197
172
Experts:
198
- --use-sys-ssl donot compile ssl, use system ssl(-lssl) if required.
199
- --memory-watch enable memory watch to detect memory leaking(hurts performance).
200
- --export-librtmp-project=<path> export srs-librtmp to specified project in path.
201
- --export-librtmp-single=<path> export srs-librtmp to a single file(.h+.cpp) in path.
202
- --with-valgrind support valgrind for memory check.
203
- --without-valgrind donot support valgrind for memory check.
173
+ --use-sys-ssl Do not compile ssl, use system ssl(-lssl) if required.
174
+ --export-librtmp-project=<path> Export srs-librtmp to specified project in path.
175
+ --export-librtmp-single=<path> Export srs-librtmp to a single file(.h+.cpp) in path.
204
176
205
177
Workflow:
206
- 1. apply "Presets". if not specified, use default preset.
207
- 2. apply "Options" . user specified option will override the preset.
208
- 3. check conflicts. @see Conflicts section .
209
- 4. generate detail features .
178
+ 1. Apply "Presets". if not specified, use default preset.
179
+ 2. Apply "Features", "Performance" and others . user specified option will override the preset.
180
+ 3. Check conflicts, fail if exists conflicts .
181
+ 4. Generate Makefile .
210
182
211
183
Remark:
212
184
1. For performance improving, read https://blog.csdn.net/win_lin/article/details/53503869
@@ -271,7 +243,7 @@ function parse_user_option() {
271
243
--x86-x64) SRS_X86_X64=YES ;;
272
244
--x86-64) SRS_X86_X64=YES ;;
273
245
--osx) SRS_OSX=YES ;;
274
- --allow-osx) SRS_ALLOW_OSX =YES ;;
246
+ --allow-osx) SRS_OSX =YES ;;
275
247
--arm) SRS_CROSS_BUILD=YES ;;
276
248
--mips) SRS_CROSS_BUILD=YES ;;
277
249
--pi) SRS_PI=YES ;;
@@ -608,15 +580,5 @@ function check_option_conflicts() {
608
580
if [ $__check_ok = NO ]; then
609
581
exit 1;
610
582
fi
611
-
612
- if [[ $SRS_OSX == YES && $SRS_ALLOW_OSX == NO ]]; then
613
- macOSVersion=` sw_vers -productVersion`
614
- macOSVersionMajor=` echo $macOSVersion | awk -F ' .' ' {print $1}' `
615
- macOSVersionMinor=` echo $macOSVersion | awk -F ' .' ' {print $2}' `
616
- if [[ $macOSVersionMajor -ge 10 && $macOSVersionMinor -ge 14 ]]; then
617
- echo " macOS $macOSVersion is not supported, read https://github.com/ossrs/srs/issues/1250"
618
- exit -1
619
- fi
620
- fi
621
583
}
622
584
check_option_conflicts
0 commit comments