正在显示
3 个修改的文件
包含
37 行增加
和
29 行删除
| @@ -262,7 +262,7 @@ else | @@ -262,7 +262,7 @@ else | ||
| 262 | fi | 262 | fi |
| 263 | 263 | ||
| 264 | # save all config options to macro to write to auto headers file | 264 | # save all config options to macro to write to auto headers file |
| 265 | -SRS_CONFIGURE="$opt" | 265 | +SRS_AUTO_USER_CONFIGURE="$opt" |
| 266 | 266 | ||
| 267 | ##################################################################################### | 267 | ##################################################################################### |
| 268 | # show help and exit | 268 | # show help and exit |
| @@ -371,6 +371,13 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | @@ -371,6 +371,13 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then | ||
| 371 | if [ $SRS_GPROF = YES ]; then echo "gprof for arm is not available, see: ./configure --help"; __check_ok=NO; fi | 371 | if [ $SRS_GPROF = YES ]; then echo "gprof for arm is not available, see: ./configure --help"; __check_ok=NO; fi |
| 372 | fi | 372 | fi |
| 373 | 373 | ||
| 374 | +# if x86/x64 or directly build, never use static | ||
| 375 | +if [ $SRS_ARM_UBUNTU12 = NO ]; then | ||
| 376 | + if [ $SRS_STATIC = YES ]; then | ||
| 377 | + echo "x86/x64/pi should never use static, see: ./configure --help"; __check_ok=NO; | ||
| 378 | + fi | ||
| 379 | +fi | ||
| 380 | + | ||
| 374 | # check variable neccessary | 381 | # check variable neccessary |
| 375 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi | 382 | if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi |
| 376 | if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi | 383 | if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi |
| @@ -396,29 +403,27 @@ if [ $__check_ok = NO ]; then | @@ -396,29 +403,27 @@ if [ $__check_ok = NO ]; then | ||
| 396 | fi | 403 | fi |
| 397 | 404 | ||
| 398 | # regenerate the options for default values. | 405 | # regenerate the options for default values. |
| 399 | -SRS_CONFIGURE="" | ||
| 400 | -if [ $SRS_DEV = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --dev"; fi | ||
| 401 | -if [ $SRS_PI = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --pi"; fi | ||
| 402 | -if [ $SRS_HLS = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-hls"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-hls"; fi | ||
| 403 | -if [ $SRS_DVR = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-dvr"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-dvr"; fi | ||
| 404 | -if [ $SRS_NGINX = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-nginx"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-nginx"; fi | ||
| 405 | -if [ $SRS_SSL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ssl"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ssl"; fi | ||
| 406 | -if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ffmpeg"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ffmpeg"; fi | ||
| 407 | -if [ $SRS_TRANSCODE = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-transcode"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-transcode"; fi | ||
| 408 | -if [ $SRS_INGEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-ingest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-ingest"; fi | ||
| 409 | -if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-callback"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-callback"; fi | ||
| 410 | -if [ $SRS_HTTP_SERVER = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-server"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-server"; fi | ||
| 411 | -if [ $SRS_HTTP_API = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-http-api"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-http-api"; fi | ||
| 412 | -if [ $SRS_LIBRTMP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-librtmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-librtmp"; fi | ||
| 413 | -if [ $SRS_BWTC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-bwtc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-bwtc"; fi | ||
| 414 | -if [ $SRS_RESEARCH = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-research"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-research"; fi | ||
| 415 | -if [ $SRS_UTEST = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-utest"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-utest"; fi | ||
| 416 | -if [ $SRS_GPERF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gperf"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gperf"; fi | ||
| 417 | -if [ $SRS_GPERF_MC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmc"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmc"; fi | ||
| 418 | -if [ $SRS_GPERF_MP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gmp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gmp"; fi | ||
| 419 | -if [ $SRS_GPERF_CP = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gcp"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gcp"; fi | ||
| 420 | -if [ $SRS_GPROF = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-gprof"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-gprof"; fi | ||
| 421 | -if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --with-arm-ubuntu12"; else SRS_CONFIGURE="${SRS_CONFIGURE} --without-arm-ubuntu12"; fi | ||
| 422 | -if [ $SRS_STATIC = YES ]; then SRS_CONFIGURE="${SRS_CONFIGURE} --static"; fi | ||
| 423 | -SRS_CONFIGURE="${SRS_CONFIGURE} ${SRS_JOBS} --prefix=${SRS_PREFIX}" | ||
| 424 | -echo "regenerate config: ${SRS_CONFIGURE}" | 406 | +SRS_AUTO_CONFIGURE="" |
| 407 | +if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi | ||
| 408 | +if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi | ||
| 409 | +if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi | ||
| 410 | +if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi | ||
| 411 | +if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ffmpeg"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ffmpeg"; fi | ||
| 412 | +if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-transcode"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-transcode"; fi | ||
| 413 | +if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ingest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ingest"; fi | ||
| 414 | +if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi | ||
| 415 | +if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi | ||
| 416 | +if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi | ||
| 417 | +if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi | ||
| 418 | +if [ $SRS_BWTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-bwtc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-bwtc"; fi | ||
| 419 | +if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi | ||
| 420 | +if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-utest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-utest"; fi | ||
| 421 | +if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi | ||
| 422 | +if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi | ||
| 423 | +if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmp"; fi | ||
| 424 | +if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gcp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gcp"; fi | ||
| 425 | +if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi | ||
| 426 | +if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi | ||
| 427 | +if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi | ||
| 428 | +SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} ${SRS_JOBS} --prefix=${SRS_PREFIX}" | ||
| 429 | +echo "regenerate config: ${SRS_AUTO_CONFIGURE}" |
| @@ -38,6 +38,7 @@ echo "" >> $SRS_AUTO_HEADERS_H | @@ -38,6 +38,7 @@ echo "" >> $SRS_AUTO_HEADERS_H | ||
| 38 | echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H | 38 | echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H |
| 39 | echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H | 39 | echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H |
| 40 | echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H | 40 | echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H |
| 41 | +echo "#define SRS_AUTO_USER_CONFIGURE \"${SRS_AUTO_USER_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | ||
| 41 | echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H | 42 | echo "#define SRS_AUTO_CONFIGURE \"${SRS_AUTO_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H |
| 42 | 43 | ||
| 43 | # new empty line to auto headers file. | 44 | # new empty line to auto headers file. |
| @@ -400,7 +401,7 @@ if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile | @@ -400,7 +401,7 @@ if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile | ||
| 400 | LibGperfRoot=""; LibGperfFile="" | 401 | LibGperfRoot=""; LibGperfFile="" |
| 401 | if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi | 402 | if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi |
| 402 | # the link options, always use static link | 403 | # the link options, always use static link |
| 403 | -SrsLinkOptions="-ldl"; if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; fi | 404 | +SrsLinkOptions=""; if [ $SRS_STATIC = YES ]; then SrsLinkOptions="-static"; else SrsLinkOptions="-ldl"; fi |
| 404 | 405 | ||
| 405 | ##################################################################################### | 406 | ##################################################################################### |
| 406 | # Modules, compile each module, then link to binary | 407 | # Modules, compile each module, then link to binary |
| @@ -507,6 +508,7 @@ mkdir -p ${SRS_OBJS}/logs | @@ -507,6 +508,7 @@ mkdir -p ${SRS_OBJS}/logs | ||
| 507 | # summary | 508 | # summary |
| 508 | echo "" | 509 | echo "" |
| 509 | echo "configure summary:" | 510 | echo "configure summary:" |
| 511 | +echo " ${SRS_AUTO_USER_CONFIGURE}" | ||
| 510 | echo " ${SRS_AUTO_CONFIGURE}" | 512 | echo " ${SRS_AUTO_CONFIGURE}" |
| 511 | if [ $SRS_HLS = YES ]; then | 513 | if [ $SRS_HLS = YES ]; then |
| 512 | echo -e "${GREEN}HLS is enabled${BLACK}" | 514 | echo -e "${GREEN}HLS is enabled${BLACK}" |
| @@ -1206,7 +1206,8 @@ void SrsConfig::print_help(char** argv) | @@ -1206,7 +1206,8 @@ void SrsConfig::print_help(char** argv) | ||
| 1206 | printf( | 1206 | printf( |
| 1207 | RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" | 1207 | RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION" "RTMP_SIG_SRS_COPYRIGHT"\n" |
| 1208 | "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n" | 1208 | "Primary Authors: "RTMP_SIG_SRS_PRIMARY_AUTHROS"\n" |
| 1209 | - "Build: "SRS_AUTO_BUILD_DATE" Configuration:"SRS_AUTO_CONFIGURE"\n" | 1209 | + "Build: "SRS_AUTO_BUILD_DATE" Configuration:"SRS_AUTO_USER_CONFIGURE"\n" |
| 1210 | + "Features:"SRS_AUTO_CONFIGURE"\n" | ||
| 1210 | "Usage: %s [-h?vV] [[-t] -c <filename>]\n" | 1211 | "Usage: %s [-h?vV] [[-t] -c <filename>]\n" |
| 1211 | "\n" | 1212 | "\n" |
| 1212 | "Options:\n" | 1213 | "Options:\n" |
-
请 注册 或 登录 后发表评论