1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

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

This commit is contained in:
winlin 2014-04-16 14:27:34 +08:00
parent 406a30e533
commit 78e7a31ddb
4 changed files with 51 additions and 36 deletions

View file

@ -469,43 +469,47 @@ fi
# Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately
# upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS. # upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.
if [ $SRS_SSL = YES ]; then if [ $SRS_SSL = YES ]; then
# check the arm flag file, if flag changed, need to rebuild the st. if [ $SRS_USE_SYS_SSL = YES ]; then
if [ $SRS_ARM_UBUNTU12 = YES ]; then echo "warning: donot compile ssl, use system ssl"
# ok, arm specified, if the flag filed does not exists, need to rebuild.
if [[ -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
echo "openssl-1.0.1f for arm is ok.";
else
echo "build openssl-1.0.1f for arm";
(
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
./Configure --prefix=`pwd`/_release -no-shared no-asm linux-armv4 -DOPENSSL_NO_HEARTBEATS &&
make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \
LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} &&
make install &&
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
cd .. && touch ${SRS_OBJS}/_flag.ssl.arm.tmp
)
fi
else else
# arm not specified, if exists flag, need to rebuild for no-arm platform. # check the arm flag file, if flag changed, need to rebuild the st.
if [[ ! -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then if [ $SRS_ARM_UBUNTU12 = YES ]; then
echo "openssl-1.0.1f is ok."; # ok, arm specified, if the flag filed does not exists, need to rebuild.
if [[ -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
echo "openssl-1.0.1f for arm is ok.";
else
echo "build openssl-1.0.1f for arm";
(
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
./Configure --prefix=`pwd`/_release -no-shared no-asm linux-armv4 -DOPENSSL_NO_HEARTBEATS &&
make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \
LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} &&
make install &&
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
cd .. && touch ${SRS_OBJS}/_flag.ssl.arm.tmp
)
fi
else else
echo "build openssl-1.0.1f"; # arm not specified, if exists flag, need to rebuild for no-arm platform.
( if [[ ! -f ${SRS_OBJS}/_flag.ssl.arm.tmp && -f ${SRS_OBJS}/openssl/lib/libssl.a ]]; then
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && echo "openssl-1.0.1f is ok.";
unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && else
./config --prefix=`pwd`/_release -no-shared -DOPENSSL_NO_HEARTBEATS && echo "build openssl-1.0.1f";
make && make install && (
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
) ./config --prefix=`pwd`/_release -no-shared -DOPENSSL_NO_HEARTBEATS &&
make && make install &&
cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp
)
fi
fi fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "build openssl-1.0.1f failed."; exit -1; fi
fi fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "build openssl-1.0.1f failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/openssl/lib/libssl.a ]; then echo "build openssl-1.0.1f failed."; exit -1; fi
fi fi
if [ $SRS_SSL = YES ]; then if [ $SRS_SSL = YES ]; then

View file

@ -47,6 +47,10 @@ SRS_PREFIX=/usr/local/srs
SRS_JOBS=1 SRS_JOBS=1
SRS_STATIC=RESERVED SRS_STATIC=RESERVED
# #
# experts
# donot compile ssl, use system ssl(-lssl) if required.
SRS_USE_SYS_SSL=NO
#
# presets # presets
# for x86/x64 pc/servers # for x86/x64 pc/servers
SRS_X86_X64=NO SRS_X86_X64=NO
@ -143,6 +147,9 @@ Conflicts:
4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof: 4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof:
the complex tools not available for arm. the complex tools not available for arm.
Experts:
--use-sys-ssl donot compile ssl, use system ssl(-lssl) if required.
Workflow: Workflow:
1. apply "Presets". if not specified, use default preset. 1. apply "Presets". if not specified, use default preset.
2. apply "Options". user specified option will override the preset. 2. apply "Options". user specified option will override the preset.
@ -210,6 +217,8 @@ function parse_user_option() {
--fast) SRS_FAST=YES ;; --fast) SRS_FAST=YES ;;
--pure-rtmp) SRS_PURE_RTMP=YES ;; --pure-rtmp) SRS_PURE_RTMP=YES ;;
--rtmp-hls) SRS_RTMP_HLS=YES ;; --rtmp-hls) SRS_RTMP_HLS=YES ;;
--use-sys-ssl) SRS_USE_SYS_SSL=YES ;;
*) *)
echo "$0: error: invalid option \"$option\"" echo "$0: error: invalid option \"$option\""

6
trunk/configure vendored
View file

@ -396,12 +396,14 @@ LibHttpParserRoot=""; LibHttpParserfile=""
if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi if [ $SRS_HTTP_PARSER = YES ]; then LibHttpParserRoot="${SRS_OBJS}/hp"; LibHttpParserfile="${LibHttpParserRoot}/libhttp_parser.a"; fi
# openssl-1.0.1f, for the RTMP complex handshake. # openssl-1.0.1f, for the RTMP complex handshake.
LibSSLRoot="";LibSSLfile="" LibSSLRoot="";LibSSLfile=""
if [ $SRS_SSL = YES ]; then LibSSLRoot="${SRS_OBJS}/openssl/include"; LibSSLfile="${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"; fi 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
# gperftools-2.1, for mem check and mem/cpu profile # gperftools-2.1, for mem check and mem/cpu profile
LibGperfRoot=""; LibGperfFile="" LibGperfRoot=""; LibGperfFile=""
if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi if [ $SRS_GPERF = YES ]; then LibGperfRoot="${SRS_OBJS}/gperf/include"; LibGperfFile="${SRS_OBJS}/gperf/lib/libtcmalloc_and_profiler.a"; fi
# the link options, always use static link # the link options, always use static link
SrsLinkOptions=""; if [ $SRS_STATIC = YES ]; then SrsLinkOptions="-static"; else SrsLinkOptions="-ldl"; fi SrsLinkOptions="";
if [ $SRS_SSL = YES ]; then if [ $SRS_USE_SYS_SSL = YES ]; then SrsLinkOptions="-lssl"; fi fi
if [ $SRS_STATIC = YES ]; then SrsLinkOptions="${SrsLinkOptions} -static"; else SrsLinkOptions="${SrsLinkOptions} -ldl"; fi
##################################################################################### #####################################################################################
# Modules, compile each module, then link to binary # Modules, compile each module, then link to binary

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR "0" #define VERSION_MAJOR "0"
#define VERSION_MINOR "9" #define VERSION_MINOR "9"
#define VERSION_REVISION "66" #define VERSION_REVISION "67"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "srs" #define RTMP_SIG_SRS_KEY "srs"