mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use local openssl and link libssl.a
This commit is contained in:
parent
bcb719bf18
commit
a6f4815994
4 changed files with 25 additions and 16 deletions
BIN
trunk/3rdparty/openssl-1.0.1f.zip
vendored
Normal file
BIN
trunk/3rdparty/openssl-1.0.1f.zip
vendored
Normal file
Binary file not shown.
6
trunk/3rdparty/readme.txt
vendored
6
trunk/3rdparty/readme.txt
vendored
|
@ -6,6 +6,9 @@ nginx-1.5.7.zip
|
||||||
|
|
||||||
st-1.9.zip
|
st-1.9.zip
|
||||||
basic framework for srs.
|
basic framework for srs.
|
||||||
|
|
||||||
|
openssl-1.0.1f.zip
|
||||||
|
openssl for SRS(with-ssl) RTMP complex handshake to delivery h264+aac stream.
|
||||||
|
|
||||||
CherryPy-3.2.4.zip
|
CherryPy-3.2.4.zip
|
||||||
sample api server for srs.
|
sample api server for srs.
|
||||||
|
@ -44,4 +47,7 @@ links:
|
||||||
cherrypy:
|
cherrypy:
|
||||||
http://www.cherrypy.org/
|
http://www.cherrypy.org/
|
||||||
https://pypi.python.org/pypi/CherryPy/3.2.4
|
https://pypi.python.org/pypi/CherryPy/3.2.4
|
||||||
|
openssl:
|
||||||
|
http://www.openssl.org/
|
||||||
|
http://www.openssl.org/source/openssl-1.0.1f.tar.gz
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ function require_sudoer()
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: check gcc/g++
|
# TODO: check gcc/g++
|
||||||
echo "check gcc/g++/gdb/make/openssl-devel"
|
echo "check gcc/g++/gdb/make"
|
||||||
echo "depends tools are ok"
|
echo "depends tools are ok"
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# for Ubuntu, auto install tools by apt-get
|
# for Ubuntu, auto install tools by apt-get
|
||||||
|
@ -91,13 +91,6 @@ function Ubuntu_prepare()
|
||||||
echo "install libfreetype6-dev success"
|
echo "install libfreetype6-dev success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d /usr/include/openssl ]]; then
|
|
||||||
echo "install libssl-dev"
|
|
||||||
require_sudoer "sudo apt-get install -y libssl-dev"
|
|
||||||
sudo apt-get install -y libssl-dev
|
|
||||||
echo "install libssl-dev success"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Ubuntu install tools success"
|
echo "Ubuntu install tools success"
|
||||||
}
|
}
|
||||||
Ubuntu_prepare
|
Ubuntu_prepare
|
||||||
|
@ -175,13 +168,6 @@ function Centos_prepare()
|
||||||
echo "install freetype-devel success"
|
echo "install freetype-devel success"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d /usr/include/openssl ]]; then
|
|
||||||
echo "install openssl-devel"
|
|
||||||
require_sudoer "sudo yum install -y openssl-devel"
|
|
||||||
sudo yum install -y openssl-devel
|
|
||||||
echo "install openssl-devel success"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Centos install tools success"
|
echo "Centos install tools success"
|
||||||
}
|
}
|
||||||
Centos_prepare
|
Centos_prepare
|
||||||
|
@ -355,6 +341,23 @@ fi
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# openssl, for rtmp complex handshake
|
# openssl, for rtmp complex handshake
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
if [ $SRS_SSL = YES ]; then
|
||||||
|
if [[ -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 && make && make install &&
|
||||||
|
cd .. && ln -sf openssl-1.0.1f/_release openssl
|
||||||
|
)
|
||||||
|
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
|
if [ $SRS_SSL = YES ]; then
|
||||||
echo "#define SRS_SSL" >> $SRS_AUTO_HEADERS_H
|
echo "#define SRS_SSL" >> $SRS_AUTO_HEADERS_H
|
||||||
else
|
else
|
||||||
|
|
2
trunk/configure
vendored
2
trunk/configure
vendored
|
@ -151,7 +151,7 @@ fi
|
||||||
# all depends objects
|
# all depends objects
|
||||||
MODULE_OBJS="${CORE_OBJS[@]} ${CONFIG_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}"
|
MODULE_OBJS="${CORE_OBJS[@]} ${CONFIG_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}"
|
||||||
if [ $SRS_SSL = YES ]; then
|
if [ $SRS_SSL = YES ]; then
|
||||||
LINK_OPTIONS="-ldl -lssl -lcrypto"
|
LINK_OPTIONS="-ldl ${SRS_OBJS}/openssl/lib/libssl.a ${SRS_OBJS}/openssl/lib/libcrypto.a"
|
||||||
else
|
else
|
||||||
LINK_OPTIONS="-ldl"
|
LINK_OPTIONS="-ldl"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue