From 48343e4f3a7621aaf3f74bcdd6e5a81b683fa0cc Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 8 Mar 2014 11:25:02 +0800 Subject: [PATCH] refien build script, regenereate all options. change to 0.9.12 --- trunk/auto/options.sh | 121 +++++++++++-------------------- trunk/configure | 7 +- trunk/src/app/srs_app_config.cpp | 2 +- trunk/src/core/srs_core.hpp | 2 +- 4 files changed, 48 insertions(+), 84 deletions(-) diff --git a/trunk/auto/options.sh b/trunk/auto/options.sh index d59511358..7f5e0e75d 100755 --- a/trunk/auto/options.sh +++ b/trunk/auto/options.sh @@ -33,7 +33,7 @@ SRS_SSL=YES SRS_FFMPEG=YES SRS_HTTP=YES SRS_LIBRTMP=YES -SRS_BWTC=YES +SRS_BWTC=NO SRS_RESEARCH=NO SRS_UTEST=YES SRS_GPERF=NO @@ -160,18 +160,9 @@ fi __check_ok=YES # check conflict if [ $SRS_GPERF = NO ]; then - if [ $SRS_GPERF_MC = YES ]; then - echo "gperf-mc depends on gperf, see: ./configure --help"; - __check_ok=NO - fi - if [ $SRS_GPERF_MP = YES ]; then - echo "gperf-mp depends on gperf, see: ./configure --help"; - __check_ok=NO - fi - if [ $SRS_GPERF_CP = YES ]; then - echo "gperf-cp depends on gperf, see: ./configure --help"; - __check_ok=NO - fi + if [ $SRS_GPERF_MC = YES ]; then echo "gperf-mc depends on gperf, see: ./configure --help"; __check_ok=NO; fi + if [ $SRS_GPERF_MP = YES ]; then echo "gperf-mp depends on gperf, see: ./configure --help"; __check_ok=NO; fi + if [ $SRS_GPERF_CP = YES ]; then echo "gperf-cp depends on gperf, see: ./configure --help"; __check_ok=NO; fi fi if [ $SRS_GPERF_MC = YES ]; then if [ $SRS_GPERF_MP = YES ]; then @@ -183,73 +174,45 @@ if [ $SRS_GPERF_MC = YES ]; then fi # generate the group option: SRS_GPERF __gperf_slow=NO -if [ $SRS_GPERF_MC = YES ]; then - SRS_GPERF=YES - __gperf_slow=YES -fi -if [ $SRS_GPERF_MP = YES ]; then - SRS_GPERF=YES - __gperf_slow=YES -fi -if [ $SRS_GPERF_CP = YES ]; then - SRS_GPERF=YES - __gperf_slow=YES -fi -if [ $__gperf_slow = YES ]; then - if [ $SRS_GPROF = YES ]; then - echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; - __check_ok=NO - fi -fi +if [ $SRS_GPERF_MC = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi +if [ $SRS_GPERF_MP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi +if [ $SRS_GPERF_CP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi +if [ $__gperf_slow = YES ]; then if [ $SRS_GPROF = YES ]; then + echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; __check_ok=NO; +fi fi + # check variable neccessary -if [ $SRS_SSL = RESERVED ]; then - echo "you must specifies the ssl, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_HLS = RESERVED ]; then - echo "you must specifies the hls, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_FFMPEG = RESERVED ]; then - echo "you must specifies the ffmpeg, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_HTTP = RESERVED ]; then - echo "you must specifies the http, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_RESEARCH = RESERVED ]; then - echo "you must specifies the research, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_UTEST = RESERVED ]; then - echo "you must specifies the utest, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_GPROF = RESERVED ]; then - echo "you must specifies the gprof, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_GPERF_MC = RESERVED ]; then - echo "you must specifies the gperf-mc, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_GPERF_MP = RESERVED ]; then - echo "you must specifies the gperf-mp, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_GPERF_CP = RESERVED ]; then - echo "you must specifies the gperf-cp, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_LIBRTMP = RESERVED ]; then - echo "you must specifies the librtmp, see: ./configure --help"; - __check_ok=NO -fi -if [ $SRS_BWTC = RESERVED ]; then - echo "you must specifies the bwtc, see: ./configure --help"; - __check_ok=NO -fi +if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_HTTP = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_UTEST = RESERVED ]; then echo "you must specifies the utest, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_GPERF = RESERVED ]; then echo "you must specifies the gperf, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_GPERF_MC = RESERVED ]; then echo "you must specifies the gperf-mc, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_GPERF_MP = RESERVED ]; then echo "you must specifies the gperf-mp, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_GPERF_CP = RESERVED ]; then echo "you must specifies the gperf-cp, see: ./configure --help"; __check_ok=NO; fi +if [ $SRS_GPROF = RESERVED ]; then echo "you must specifies the gprof, see: ./configure --help"; __check_ok=NO; fi if [ $__check_ok = NO ]; then exit 1; fi + +# regenerate the options for default values. +SRS_CONFIGURE="" +if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi +if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi +if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi +if [ $SRS_HTTP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http"; fi +if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi +if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi +if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi +if [ $SRS_UTEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-utest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-utest"; fi +if [ $SRS_GPERF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gperf"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gperf"; fi +if [ $SRS_GPERF_MC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmc"; fi +if [ $SRS_GPERF_MP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmp"; fi +if [ $SRS_GPERF_CP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gcp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gcp"; fi +if [ $SRS_GPROF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gprof"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gprof"; fi +SRS_CONFIGURE="${SRS_CONFIGURE} ${SRS_JOBS}" +echo "regenerate config: ${SRS_CONFIGURE}" diff --git a/trunk/configure b/trunk/configure index e40c7c5c4..22b5e3826 100755 --- a/trunk/configure +++ b/trunk/configure @@ -64,7 +64,7 @@ SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then Sr SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi -SrsBWTCSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi +SrsBWTCSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi SrsResearchSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\$(GREEN)"; fi SrsUtestSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\$(GREEN)"; fi SrsGperfSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\$(GREEN)"; fi @@ -369,6 +369,7 @@ mkdir -p ${SRS_OBJS}/logs # summary echo "" echo "configure summary:" +echo " ${SRS_CONFIGURE}" if [ $SRS_HLS = YES ]; then echo -e "${GREEN}HLS over nginx is enabled${BLACK}" else @@ -397,12 +398,12 @@ fi if [ $SRS_BWTC = YES ]; then echo -e "${GREEN}srs bandwidth test client is enabled${BLACK}" else - echo -e "${YELLOW}note: srs bandwidth test client is disabled${BLACK}" + echo -e "${GREEN}note: srs bandwidth test client is disabled${BLACK}" fi if [ $SRS_RESEARCH = YES ]; then echo -e "${GREEN}research tools are builded${BLACK}" else - echo -e "${YELLOW}note: research tools are not builded${BLACK}" + echo -e "${GREEN}note: research tools are not builded${BLACK}" fi if [ $SRS_UTEST = YES ]; then echo -e "${GREEN}utest for srs are builded${BLACK}" diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index fd3fa330b..a4106142a 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -737,7 +737,7 @@ void SrsConfig::print_help(char** argv) printf( RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n" - "Build: "SRS_BUILD_DATE" Configuration: "SRS_CONFIGURE"\n" + "Build: "SRS_BUILD_DATE" Configuration:"SRS_CONFIGURE"\n" "Usage: %s [-h?vV] [-c ]\n" "\n" "Options:\n" diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index a82a2ffc2..4085cadc5 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR "0" #define VERSION_MINOR "9" -#define VERSION_REVISION "11" +#define VERSION_REVISION "12" #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION // server info. #define RTMP_SIG_SRS_KEY "srs"