diff --git a/trunk/3rdparty/openssl-1.0.1f.zip b/trunk/3rdparty/openssl-1.0.1f.zip new file mode 100644 index 000000000..edcde9dcd Binary files /dev/null and b/trunk/3rdparty/openssl-1.0.1f.zip differ diff --git a/trunk/3rdparty/readme.txt b/trunk/3rdparty/readme.txt index be1a3f1c1..2f4037679 100755 --- a/trunk/3rdparty/readme.txt +++ b/trunk/3rdparty/readme.txt @@ -6,6 +6,9 @@ nginx-1.5.7.zip st-1.9.zip 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 sample api server for srs. @@ -44,4 +47,7 @@ links: cherrypy: http://www.cherrypy.org/ 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 diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index f66342f28..bf043c1fe 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -21,7 +21,7 @@ function require_sudoer() } # TODO: check gcc/g++ -echo "check gcc/g++/gdb/make/openssl-devel" +echo "check gcc/g++/gdb/make" echo "depends tools are ok" ##################################################################################### # for Ubuntu, auto install tools by apt-get @@ -91,13 +91,6 @@ function Ubuntu_prepare() echo "install libfreetype6-dev success" 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" } Ubuntu_prepare @@ -175,13 +168,6 @@ function Centos_prepare() echo "install freetype-devel success" 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" } Centos_prepare @@ -355,6 +341,23 @@ fi ##################################################################################### # 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 echo "#define SRS_SSL" >> $SRS_AUTO_HEADERS_H else diff --git a/trunk/configure b/trunk/configure index 3a74e4844..4f8aed74d 100755 --- a/trunk/configure +++ b/trunk/configure @@ -151,7 +151,7 @@ fi # all depends objects MODULE_OBJS="${CORE_OBJS[@]} ${CONFIG_OBJS[@]} ${PROTOCOL_OBJS[@]} ${MAIN_OBJS[@]}" 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 LINK_OPTIONS="-ldl" fi