winlin

add configure options --disable-all

@@ -66,6 +66,8 @@ SRS_FAST=NO @@ -66,6 +66,8 @@ SRS_FAST=NO
66 SRS_PURE_RTMP=NO 66 SRS_PURE_RTMP=NO
67 # only support RTMP+HLS with ssl. 67 # only support RTMP+HLS with ssl.
68 SRS_RTMP_HLS=NO 68 SRS_RTMP_HLS=NO
  69 +# the most fast compile, nothing, only support vp6 RTMP.
  70 +SRS_DISABLE_ALL=NO
69 71
70 ##################################################################################### 72 #####################################################################################
71 # menu 73 # menu
@@ -136,6 +138,7 @@ Presets: @@ -136,6 +138,7 @@ Presets:
136 --fast the most fast compile, nothing, only support vp6 RTMP. 138 --fast the most fast compile, nothing, only support vp6 RTMP.
137 --pure-rtmp only support RTMP with ssl. 139 --pure-rtmp only support RTMP with ssl.
138 --rtmp-hls only support RTMP+HLS with ssl. 140 --rtmp-hls only support RTMP+HLS with ssl.
  141 + --disable-all disable all features, only support vp6 RTMP.
139 142
140 Conflicts: 143 Conflicts:
141 1. --dev/x86-x64 vs --static: 144 1. --dev/x86-x64 vs --static:
@@ -215,6 +218,7 @@ function parse_user_option() { @@ -215,6 +218,7 @@ function parse_user_option() {
215 --pi) SRS_PI=YES ;; 218 --pi) SRS_PI=YES ;;
216 --dev) SRS_DEV=YES ;; 219 --dev) SRS_DEV=YES ;;
217 --fast) SRS_FAST=YES ;; 220 --fast) SRS_FAST=YES ;;
  221 + --disable-all) SRS_DISABLE_ALL=YES ;;
218 --pure-rtmp) SRS_PURE_RTMP=YES ;; 222 --pure-rtmp) SRS_PURE_RTMP=YES ;;
219 --rtmp-hls) SRS_RTMP_HLS=YES ;; 223 --rtmp-hls) SRS_RTMP_HLS=YES ;;
220 224
@@ -259,11 +263,13 @@ function apply_user_presets() { @@ -259,11 +263,13 @@ function apply_user_presets() {
259 if [ $SRS_RTMP_HLS = NO ]; then 263 if [ $SRS_RTMP_HLS = NO ]; then
260 if [ $SRS_PURE_RTMP = NO ]; then 264 if [ $SRS_PURE_RTMP = NO ]; then
261 if [ $SRS_FAST = NO ]; then 265 if [ $SRS_FAST = NO ]; then
262 - if [ $SRS_DEV = NO ]; then  
263 - if [ $SRS_ARM_UBUNTU12 = NO ]; then  
264 - if [ $SRS_PI = NO ]; then  
265 - if [ $SRS_X86_X64 = NO ]; then  
266 - SRS_X86_X64=YES; opt="--x86-x64 $opt"; 266 + if [ $SRS_DISABLE_ALL = NO ]; then
  267 + if [ $SRS_DEV = NO ]; then
  268 + if [ $SRS_ARM_UBUNTU12 = NO ]; then
  269 + if [ $SRS_PI = NO ]; then
  270 + if [ $SRS_X86_X64 = NO ]; then
  271 + SRS_X86_X64=YES; opt="--x86-x64 $opt";
  272 + fi
267 fi 273 fi
268 fi 274 fi
269 fi 275 fi
@@ -273,6 +279,31 @@ function apply_user_presets() { @@ -273,6 +279,31 @@ function apply_user_presets() {
273 fi 279 fi
274 280
275 # all disabled. 281 # all disabled.
  282 + if [ $SRS_DISABLE_ALL = YES ]; then
  283 + SRS_HLS=NO
  284 + SRS_DVR=NO
  285 + SRS_NGINX=NO
  286 + SRS_SSL=NO
  287 + SRS_FFMPEG_TOOL=NO
  288 + SRS_TRANSCODE=NO
  289 + SRS_INGEST=NO
  290 + SRS_HTTP_PARSER=NO
  291 + SRS_HTTP_CALLBACK=NO
  292 + SRS_HTTP_SERVER=NO
  293 + SRS_HTTP_API=NO
  294 + SRS_LIBRTMP=NO
  295 + SRS_BWTC=NO
  296 + SRS_RESEARCH=NO
  297 + SRS_UTEST=NO
  298 + SRS_GPERF=NO
  299 + SRS_GPERF_MC=NO
  300 + SRS_GPERF_MP=NO
  301 + SRS_GPERF_CP=NO
  302 + SRS_GPROF=NO
  303 + SRS_STATIC=NO
  304 + fi
  305 +
  306 + # only rtmp vp6
276 if [ $SRS_FAST = YES ]; then 307 if [ $SRS_FAST = YES ]; then
277 SRS_HLS=NO 308 SRS_HLS=NO
278 SRS_DVR=NO 309 SRS_DVR=NO
@@ -29,6 +29,12 @@ ok_msg "test \" ${item} \"" @@ -29,6 +29,12 @@ ok_msg "test \" ${item} \""
29 ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi 29 ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
30 ok_msg "test \" ${item} \" success" 30 ok_msg "test \" ${item} \" success"
31 31
  32 +item="./configure --disable-all"
  33 +ok_msg "test \" ${item} \""
  34 +(./configure --disable-all && make) >>$log 2>&1
  35 +ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test \" ${item} \" failed. ret=$ret"; exit $ret; fi
  36 +ok_msg "test \" ${item} \" success"
  37 +
32 item="./configure --fast" 38 item="./configure --fast"
33 ok_msg "test \" ${item} \"" 39 ok_msg "test \" ${item} \""
34 (./configure --fast && make) >>$log 2>&1 40 (./configure --fast && make) >>$log 2>&1