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
# upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.
if [ $SRS_SSL = YES ]; then
# check the arm flag file, if flag changed, need to rebuild the st.
if [ $SRS_ARM_UBUNTU12 = YES ]; then
# 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
if [ $SRS_USE_SYS_SSL = YES ]; then
echo "warning: donot compile ssl, use system ssl"
else
# 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
echo "openssl-1.0.1f is ok.";
# check the arm flag file, if flag changed, need to rebuild the st.
if [ $SRS_ARM_UBUNTU12 = YES ]; then
# 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
echo "build openssl-1.0.1f";
(
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
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
)
# 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
echo "openssl-1.0.1f is ok.";
else
echo "build openssl-1.0.1f";
(
rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
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
# 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
# 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
if [ $SRS_SSL = YES ]; then

View file

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