winlin

refine build for osx

@@ -256,6 +256,30 @@ function OSX_prepare() @@ -256,6 +256,30 @@ function OSX_prepare()
256 256
257 OS_IS_OSX=YES 257 OS_IS_OSX=YES
258 echo "OSX detected, install tools if needed" 258 echo "OSX detected, install tools if needed"
  259 + # requires the osx when os
  260 + if [ $OS_IS_OSX = YES ]; then
  261 + if [ $SRS_OSX = NO ]; then
  262 + echo "OSX detected, must specifies the --osx"
  263 + exit 1
  264 + fi
  265 + # TODO: FIXME: support following features.
  266 + if [ $SRS_HTTP_API = YES ]; then
  267 + echo "OSX does not support http-api, use --without-http-api"
  268 + exit 1
  269 + fi
  270 + if [ $SRS_STAT = YES ]; then
  271 + echo "OSX does not support stat, use --without-stat"
  272 + exit 1
  273 + fi
  274 + if [ $SRS_FFMPEG_TOOL = YES ]; then
  275 + echo "OSX does not support ffmpeg, use --without-ffmpeg"
  276 + exit 1
  277 + fi
  278 + if [ $SRS_NGINX = YES ]; then
  279 + echo "OSX does not support nginx, use --without-nginx"
  280 + exit 1
  281 + fi
  282 + fi
259 283
260 brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then 284 brew --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
261 echo "install brew" 285 echo "install brew"
@@ -343,30 +367,6 @@ function OSX_prepare() @@ -343,30 +367,6 @@ function OSX_prepare()
343 if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then 367 if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
344 OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$ret"; exit $ret; fi 368 OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$ret"; exit $ret; fi
345 fi 369 fi
346 -# requires the osx when os  
347 -if [ $OS_IS_OSX = YES ]; then  
348 - if [ $SRS_OSX = NO ]; then  
349 - echo "OSX detected, must specifies the --osx"  
350 - exit 1  
351 - fi  
352 - # TODO: FIXME: support following features.  
353 - if [ $SRS_HTTP_API = YES ]; then  
354 - echo "OSX does not support http-api, use --without-http-api"  
355 - exit 1  
356 - fi  
357 - if [ $SRS_STAT = YES ]; then  
358 - echo "OSX does not support stat, use --without-stat"  
359 - exit 1  
360 - fi  
361 - if [ $SRS_FFMPEG_TOOL = YES ]; then  
362 - echo "OSX does not support ffmpeg, use --without-ffmpeg"  
363 - exit 1  
364 - fi  
365 - if [ $SRS_NGINX = YES ]; then  
366 - echo "OSX does not support nginx, use --without-nginx"  
367 - exit 1  
368 - fi  
369 -fi  
370 370
371 ##################################################################################### 371 #####################################################################################
372 # st-1.9 372 # st-1.9