winlin

refien build script, regenereate all options. change to 0.9.12

@@ -33,7 +33,7 @@ SRS_SSL=YES @@ -33,7 +33,7 @@ SRS_SSL=YES
33 SRS_FFMPEG=YES 33 SRS_FFMPEG=YES
34 SRS_HTTP=YES 34 SRS_HTTP=YES
35 SRS_LIBRTMP=YES 35 SRS_LIBRTMP=YES
36 -SRS_BWTC=YES 36 +SRS_BWTC=NO
37 SRS_RESEARCH=NO 37 SRS_RESEARCH=NO
38 SRS_UTEST=YES 38 SRS_UTEST=YES
39 SRS_GPERF=NO 39 SRS_GPERF=NO
@@ -160,18 +160,9 @@ fi @@ -160,18 +160,9 @@ fi
160 __check_ok=YES 160 __check_ok=YES
161 # check conflict 161 # check conflict
162 if [ $SRS_GPERF = NO ]; then 162 if [ $SRS_GPERF = NO ]; then
163 - if [ $SRS_GPERF_MC = YES ]; then  
164 - echo "gperf-mc depends on gperf, see: ./configure --help";  
165 - __check_ok=NO  
166 - fi  
167 - if [ $SRS_GPERF_MP = YES ]; then  
168 - echo "gperf-mp depends on gperf, see: ./configure --help";  
169 - __check_ok=NO  
170 - fi  
171 - if [ $SRS_GPERF_CP = YES ]; then  
172 - echo "gperf-cp depends on gperf, see: ./configure --help";  
173 - __check_ok=NO  
174 - fi 163 + if [ $SRS_GPERF_MC = YES ]; then echo "gperf-mc depends on gperf, see: ./configure --help"; __check_ok=NO; fi
  164 + if [ $SRS_GPERF_MP = YES ]; then echo "gperf-mp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
  165 + if [ $SRS_GPERF_CP = YES ]; then echo "gperf-cp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
175 fi 166 fi
176 if [ $SRS_GPERF_MC = YES ]; then 167 if [ $SRS_GPERF_MC = YES ]; then
177 if [ $SRS_GPERF_MP = YES ]; then 168 if [ $SRS_GPERF_MP = YES ]; then
@@ -183,73 +174,45 @@ if [ $SRS_GPERF_MC = YES ]; then @@ -183,73 +174,45 @@ if [ $SRS_GPERF_MC = YES ]; then
183 fi 174 fi
184 # generate the group option: SRS_GPERF 175 # generate the group option: SRS_GPERF
185 __gperf_slow=NO 176 __gperf_slow=NO
186 -if [ $SRS_GPERF_MC = YES ]; then  
187 - SRS_GPERF=YES  
188 - __gperf_slow=YES  
189 -fi  
190 -if [ $SRS_GPERF_MP = YES ]; then  
191 - SRS_GPERF=YES  
192 - __gperf_slow=YES  
193 -fi  
194 -if [ $SRS_GPERF_CP = YES ]; then  
195 - SRS_GPERF=YES  
196 - __gperf_slow=YES  
197 -fi  
198 -if [ $__gperf_slow = YES ]; then  
199 - if [ $SRS_GPROF = YES ]; then  
200 - echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help";  
201 - __check_ok=NO  
202 - fi  
203 -fi 177 +if [ $SRS_GPERF_MC = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
  178 +if [ $SRS_GPERF_MP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
  179 +if [ $SRS_GPERF_CP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
  180 +if [ $__gperf_slow = YES ]; then if [ $SRS_GPROF = YES ]; then
  181 + echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; __check_ok=NO;
  182 +fi fi
  183 +
204 # check variable neccessary 184 # check variable neccessary
205 -if [ $SRS_SSL = RESERVED ]; then  
206 - echo "you must specifies the ssl, see: ./configure --help";  
207 - __check_ok=NO  
208 -fi  
209 -if [ $SRS_HLS = RESERVED ]; then  
210 - echo "you must specifies the hls, see: ./configure --help";  
211 - __check_ok=NO  
212 -fi  
213 -if [ $SRS_FFMPEG = RESERVED ]; then  
214 - echo "you must specifies the ffmpeg, see: ./configure --help";  
215 - __check_ok=NO  
216 -fi  
217 -if [ $SRS_HTTP = RESERVED ]; then  
218 - echo "you must specifies the http, see: ./configure --help";  
219 - __check_ok=NO  
220 -fi  
221 -if [ $SRS_RESEARCH = RESERVED ]; then  
222 - echo "you must specifies the research, see: ./configure --help";  
223 - __check_ok=NO  
224 -fi  
225 -if [ $SRS_UTEST = RESERVED ]; then  
226 - echo "you must specifies the utest, see: ./configure --help";  
227 - __check_ok=NO  
228 -fi  
229 -if [ $SRS_GPROF = RESERVED ]; then  
230 - echo "you must specifies the gprof, see: ./configure --help";  
231 - __check_ok=NO  
232 -fi  
233 -if [ $SRS_GPERF_MC = RESERVED ]; then  
234 - echo "you must specifies the gperf-mc, see: ./configure --help";  
235 - __check_ok=NO  
236 -fi  
237 -if [ $SRS_GPERF_MP = RESERVED ]; then  
238 - echo "you must specifies the gperf-mp, see: ./configure --help";  
239 - __check_ok=NO  
240 -fi  
241 -if [ $SRS_GPERF_CP = RESERVED ]; then  
242 - echo "you must specifies the gperf-cp, see: ./configure --help";  
243 - __check_ok=NO  
244 -fi  
245 -if [ $SRS_LIBRTMP = RESERVED ]; then  
246 - echo "you must specifies the librtmp, see: ./configure --help";  
247 - __check_ok=NO  
248 -fi  
249 -if [ $SRS_BWTC = RESERVED ]; then  
250 - echo "you must specifies the bwtc, see: ./configure --help";  
251 - __check_ok=NO  
252 -fi 185 +if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi
  186 +if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
  187 +if [ $SRS_FFMPEG = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi
  188 +if [ $SRS_HTTP = RESERVED ]; then echo "you must specifies the http, see: ./configure --help"; __check_ok=NO; fi
  189 +if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
  190 +if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi
  191 +if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi
  192 +if [ $SRS_UTEST = RESERVED ]; then echo "you must specifies the utest, see: ./configure --help"; __check_ok=NO; fi
  193 +if [ $SRS_GPERF = RESERVED ]; then echo "you must specifies the gperf, see: ./configure --help"; __check_ok=NO; fi
  194 +if [ $SRS_GPERF_MC = RESERVED ]; then echo "you must specifies the gperf-mc, see: ./configure --help"; __check_ok=NO; fi
  195 +if [ $SRS_GPERF_MP = RESERVED ]; then echo "you must specifies the gperf-mp, see: ./configure --help"; __check_ok=NO; fi
  196 +if [ $SRS_GPERF_CP = RESERVED ]; then echo "you must specifies the gperf-cp, see: ./configure --help"; __check_ok=NO; fi
  197 +if [ $SRS_GPROF = RESERVED ]; then echo "you must specifies the gprof, see: ./configure --help"; __check_ok=NO; fi
253 if [ $__check_ok = NO ]; then 198 if [ $__check_ok = NO ]; then
254 exit 1; 199 exit 1;
255 fi 200 fi
  201 +
  202 +# regenerate the options for default values.
  203 +SRS_CONFIGURE=""
  204 +if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi
  205 +if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi
  206 +if [ $SRS_FFMPEG = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi
  207 +if [ $SRS_HTTP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http"; fi
  208 +if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi
  209 +if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi
  210 +if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi
  211 +if [ $SRS_UTEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-utest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-utest"; fi
  212 +if [ $SRS_GPERF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gperf"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gperf"; fi
  213 +if [ $SRS_GPERF_MC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmc"; fi
  214 +if [ $SRS_GPERF_MP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmp"; fi
  215 +if [ $SRS_GPERF_CP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gcp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gcp"; fi
  216 +if [ $SRS_GPROF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gprof"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gprof"; fi
  217 +SRS_CONFIGURE="${SRS_CONFIGURE} ${SRS_JOBS}"
  218 +echo "regenerate config: ${SRS_CONFIGURE}"
@@ -64,7 +64,7 @@ SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then Sr @@ -64,7 +64,7 @@ SrsFfmpegSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_FFMPEG = YES ]; then Sr
64 SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi 64 SrsHttpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_HTTP = YES ]; then SrsHttpSummaryColor="\$(GREEN)"; fi
65 SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi 65 SrsLibrtmpSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then SrsLibrtmpSummaryColor="\$(GREEN)"; fi
66 SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi 66 SrsLibrtmpSSLSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_LIBRTMP = YES ]; then if [ $SRS_SSL = YES ]; then SrsLibrtmpSSLSummaryColor="\$(GREEN)"; fi fi
67 -SrsBWTCSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi 67 +SrsBWTCSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_BWTC = YES ]; then SrsBWTCSummaryColor="\$(GREEN)"; fi
68 SrsResearchSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\$(GREEN)"; fi 68 SrsResearchSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_RESEARCH = YES ]; then SrsResearchSummaryColor="\$(GREEN)"; fi
69 SrsUtestSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\$(GREEN)"; fi 69 SrsUtestSummaryColor="\$(YELLOW)(disabled) "; if [ $SRS_UTEST = YES ]; then SrsUtestSummaryColor="\$(GREEN)"; fi
70 SrsGperfSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\$(GREEN)"; fi 70 SrsGperfSummaryColor="\$(GREEN)(disabled) "; if [ $SRS_GPERF = YES ]; then SrsGperfSummaryColor="\$(GREEN)"; fi
@@ -369,6 +369,7 @@ mkdir -p ${SRS_OBJS}/logs @@ -369,6 +369,7 @@ mkdir -p ${SRS_OBJS}/logs
369 # summary 369 # summary
370 echo "" 370 echo ""
371 echo "configure summary:" 371 echo "configure summary:"
  372 +echo " ${SRS_CONFIGURE}"
372 if [ $SRS_HLS = YES ]; then 373 if [ $SRS_HLS = YES ]; then
373 echo -e "${GREEN}HLS over nginx is enabled${BLACK}" 374 echo -e "${GREEN}HLS over nginx is enabled${BLACK}"
374 else 375 else
@@ -397,12 +398,12 @@ fi @@ -397,12 +398,12 @@ fi
397 if [ $SRS_BWTC = YES ]; then 398 if [ $SRS_BWTC = YES ]; then
398 echo -e "${GREEN}srs bandwidth test client is enabled${BLACK}" 399 echo -e "${GREEN}srs bandwidth test client is enabled${BLACK}"
399 else 400 else
400 - echo -e "${YELLOW}note: srs bandwidth test client is disabled${BLACK}" 401 + echo -e "${GREEN}note: srs bandwidth test client is disabled${BLACK}"
401 fi 402 fi
402 if [ $SRS_RESEARCH = YES ]; then 403 if [ $SRS_RESEARCH = YES ]; then
403 echo -e "${GREEN}research tools are builded${BLACK}" 404 echo -e "${GREEN}research tools are builded${BLACK}"
404 else 405 else
405 - echo -e "${YELLOW}note: research tools are not builded${BLACK}" 406 + echo -e "${GREEN}note: research tools are not builded${BLACK}"
406 fi 407 fi
407 if [ $SRS_UTEST = YES ]; then 408 if [ $SRS_UTEST = YES ]; then
408 echo -e "${GREEN}utest for srs are builded${BLACK}" 409 echo -e "${GREEN}utest for srs are builded${BLACK}"
@@ -737,7 +737,7 @@ void SrsConfig::print_help(char** argv) @@ -737,7 +737,7 @@ void SrsConfig::print_help(char** argv)
737 printf( 737 printf(
738 RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" 738 RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n"
739 "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n" 739 "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n"
740 - "Build: "SRS_BUILD_DATE" Configuration: "SRS_CONFIGURE"\n" 740 + "Build: "SRS_BUILD_DATE" Configuration:"SRS_CONFIGURE"\n"
741 "Usage: %s [-h?vV] [-c <filename>]\n" 741 "Usage: %s [-h?vV] [-c <filename>]\n"
742 "\n" 742 "\n"
743 "Options:\n" 743 "Options:\n"
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 // current release version 31 // current release version
32 #define VERSION_MAJOR "0" 32 #define VERSION_MAJOR "0"
33 #define VERSION_MINOR "9" 33 #define VERSION_MINOR "9"
34 -#define VERSION_REVISION "11" 34 +#define VERSION_REVISION "12"
35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION 35 #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
36 // server info. 36 // server info.
37 #define RTMP_SIG_SRS_KEY "srs" 37 #define RTMP_SIG_SRS_KEY "srs"