From cc338fdb7cd33ee85bc2868fe6767dc92f8617d7 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 16 Apr 2014 12:37:19 +0800 Subject: [PATCH] fix bug for default configure --- trunk/auto/depends.sh | 14 ++++++++++++++ trunk/auto/options.sh | 14 ++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index a1147b212..bce30a7ac 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -63,6 +63,13 @@ function Ubuntu_prepare() echo "install make success" fi + patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install patch" + require_sudoer "sudo apt-get install -y --force-yes patch" + sudo apt-get install -y --force-yes patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi + echo "install patch success" + fi + autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then echo "install autoconf" require_sudoer "sudo apt-get install -y --force-yes autoconf" @@ -146,6 +153,13 @@ function Centos_prepare() echo "install make success" fi + patch --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then + echo "install patch" + require_sudoer "sudo yum install -y patch" + sudo yum install -y patch; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi + echo "install patch success" + fi + automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then echo "install automake" require_sudoer "sudo yum install -y automake" diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index 7cd9764b5..f4ce93086 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -133,14 +133,6 @@ done ##################################################################################### # apply the default value when user donot specified. ##################################################################################### -# if http-xxxx specified, open the SRS_HTTP_PARSER -__compile_http_parser=NO -if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES;__compile_http_parser=YES; fi -if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES;__compile_http_parser=YES; fi -if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES;__compile_http_parser=YES; fi -# if no http specified, disable http parser -if [ $__compile_http_parser = NO ]; then SRS_HTTP_PARSER=NO; fi - # if transcode specified, try ffmpeg if possible. if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi @@ -254,6 +246,12 @@ if [ $SRS_PI = YES ]; then SRS_STATIC=YES fi +# if http-xxxx specified, open the SRS_HTTP_PARSER +SRS_HTTP_PARSER=NO +if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi +if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi +if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi + # parse the jobs for make if [[ "" -eq SRS_JOBS ]]; then export SRS_JOBS="--jobs"