winlin

refine option, add --use-sys-ssl, change to 0.9.67

@@ -469,6 +469,9 @@ fi @@ -469,6 +469,9 @@ fi
469 # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately 469 # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately
470 # upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS. 470 # upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.
471 if [ $SRS_SSL = YES ]; then 471 if [ $SRS_SSL = YES ]; then
  472 + if [ $SRS_USE_SYS_SSL = YES ]; then
  473 + echo "warning: donot compile ssl, use system ssl"
  474 + else
472 # check the arm flag file, if flag changed, need to rebuild the st. 475 # check the arm flag file, if flag changed, need to rebuild the st.
473 if [ $SRS_ARM_UBUNTU12 = YES ]; then 476 if [ $SRS_ARM_UBUNTU12 = YES ]; then
474 # ok, arm specified, if the flag filed does not exists, need to rebuild. 477 # ok, arm specified, if the flag filed does not exists, need to rebuild.
@@ -506,6 +509,7 @@ if [ $SRS_SSL = YES ]; then @@ -506,6 +509,7 @@ if [ $SRS_SSL = YES ]; then
506 # check status 509 # check status
507 ret=$?; if [[ $ret -ne 0 ]]; then echo "build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi 510 ret=$?; if [[ $ret -ne 0 ]]; then echo "build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi
508 if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "build openssl-1.0.1f failed."; exit -1; fi 511 if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "build openssl-1.0.1f failed."; exit -1; fi
  512 + fi
509 fi 513 fi
510 514
511 if [ $SRS_SSL = YES ]; then 515 if [ $SRS_SSL = YES ]; then
@@ -47,6 +47,10 @@ SRS_PREFIX=/usr/local/srs @@ -47,6 +47,10 @@ SRS_PREFIX=/usr/local/srs
47 SRS_JOBS=1 47 SRS_JOBS=1
48 SRS_STATIC=RESERVED 48 SRS_STATIC=RESERVED
49 # 49 #
  50 +# experts
  51 +# donot compile ssl, use system ssl(-lssl) if required.
  52 +SRS_USE_SYS_SSL=NO
  53 +#
50 # presets 54 # presets
51 # for x86/x64 pc/servers 55 # for x86/x64 pc/servers
52 SRS_X86_X64=NO 56 SRS_X86_X64=NO
@@ -143,6 +147,9 @@ Conflicts: @@ -143,6 +147,9 @@ Conflicts:
143 4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof: 147 4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof:
144 the complex tools not available for arm. 148 the complex tools not available for arm.
145 149
  150 +Experts:
  151 + --use-sys-ssl donot compile ssl, use system ssl(-lssl) if required.
  152 +
146 Workflow: 153 Workflow:
147 1. apply "Presets". if not specified, use default preset. 154 1. apply "Presets". if not specified, use default preset.
148 2. apply "Options". user specified option will override the preset. 155 2. apply "Options". user specified option will override the preset.
@@ -211,6 +218,8 @@ function parse_user_option() { @@ -211,6 +218,8 @@ function parse_user_option() {
211 --pure-rtmp) SRS_PURE_RTMP=YES ;; 218 --pure-rtmp) SRS_PURE_RTMP=YES ;;
212 --rtmp-hls) SRS_RTMP_HLS=YES ;; 219 --rtmp-hls) SRS_RTMP_HLS=YES ;;
213 220
  221 + --use-sys-ssl) SRS_USE_SYS_SSL=YES ;;
  222 +
214 *) 223 *)
215 echo "$0: error: invalid option \"$option\"" 224 echo "$0: error: invalid option \"$option\""
216 exit 1 225 exit 1
@@ -396,12 +396,14 @@ LibHttpParserRoot=""; LibHttpParserfile="" @@ -396,12 +396,14 @@ LibHttpParserRoot=""; LibHttpParserfile=""
396 if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi 396 if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi
397 # openssl-1.0.1f, for the RTMP complex handshake. 397 # openssl-1.0.1f, for the RTMP complex handshake.
398 LibSSLRoot="";LibSSLfile="" 398 LibSSLRoot="";LibSSLfile=""
399 -if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi 399 +if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = NO ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi fi
400 # gperftools-2.1, for mem check and mem/cpu profile 400 # gperftools-2.1, for mem check and mem/cpu profile
401 LibGperfRoot=""; LibGperfFile="" 401 LibGperfRoot=""; LibGperfFile=""
402 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
403 # the link options, always use static link 403 # the link options, always use static link
404 -SrsLinkOptions=""; if [ $SRS_STATIC = YES ]; then SrsLinkOptions="-static"; else SrsLinkOptions="-ldl"; fi 404 +SrsLinkOptions="";
  405 +if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="-lssl"; fi fi
  406 +if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; else SrsLinkOptions="${SrsLinkOptions} -ldl"; fi
405 407
406 ##################################################################################### 408 #####################################################################################
407 # Modules, compile each module, then link to binary 409 # Modules, compile each module, then link to binary
@@ -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 "66" 34 +#define VERSION_REVISION "67"
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"