winlin

build openssl for osx, for bug #155.

@@ -554,6 +554,19 @@ fi @@ -554,6 +554,19 @@ fi
554 ##################################################################################### 554 #####################################################################################
555 # openssl, for rtmp complex handshake 555 # openssl, for rtmp complex handshake
556 ##################################################################################### 556 #####################################################################################
  557 +# extra configure options
  558 +EXTRA_CONFIGURE=""
  559 +if [ $SRS_OSX = YES ]; then
  560 + arch=`uname -m` && echo "OSX $arch";
  561 + if [ $arch = x86_64 ]; then
  562 + echo "configure 64bit openssl";
  563 + EXTRA_CONFIGURE=darwin64-x86_64-cc
  564 + else
  565 + echo "configure 32bit openssl";
  566 + EXTRA_CONFIGURE=darwin-i386-cc
  567 + fi
  568 + echo "openssl extra config options: $EXTRA_CONFIGURE"
  569 +fi
557 # @see http://www.openssl.org/news/secadv_20140407.txt 570 # @see http://www.openssl.org/news/secadv_20140407.txt
558 # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately 571 # Affected users should upgrade to OpenSSL 1.0.1g. Users unable to immediately
559 # upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS. 572 # upgrade can alternatively recompile OpenSSL with -DOPENSSL_NO_HEARTBEATS.
@@ -571,7 +584,7 @@ if [ $SRS_SSL = YES ]; then @@ -571,7 +584,7 @@ if [ $SRS_SSL = YES ]; then
571 ( 584 (
572 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && 585 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
573 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && 586 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
574 - ./Configure --prefix=`pwd`/_release -no-shared no-asm linux-armv4 -DOPENSSL_NO_HEARTBEATS && 587 + ./Configure --prefix=`pwd`/_release -no-shared no-asm linux-armv4 -DOPENSSL_NO_HEARTBEATS ${EXTRA_CONFIGURE} &&
575 make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \ 588 make CC=${SrsArmCC} GCC=${SrsArmGCC} AR="${SrsArmAR} r" \
576 LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} && 589 LD=${SrsArmLD} LINK=${SrsArmGCC} RANDLIB=${SrsArmRANDLIB} &&
577 make install_sw && 590 make install_sw &&
@@ -588,7 +601,7 @@ if [ $SRS_SSL = YES ]; then @@ -588,7 +601,7 @@ if [ $SRS_SSL = YES ]; then
588 ( 601 (
589 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} && 602 rm -rf ${SRS_OBJS}/openssl-1.0.1f && cd ${SRS_OBJS} &&
590 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f && 603 unzip -q ../3rdparty/openssl-1.0.1f.zip && cd openssl-1.0.1f &&
591 - ./config --prefix=`pwd`/_release -no-shared -DOPENSSL_NO_HEARTBEATS && 604 + ./Configure --prefix=`pwd`/_release -no-shared -DOPENSSL_NO_HEARTBEATS ${EXTRA_CONFIGURE} &&
592 make && make install_sw && 605 make && make install_sw &&
593 cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl && 606 cd .. && rm -rf openssl && ln -sf openssl-1.0.1f/_release openssl &&
594 cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp 607 cd .. && rm -f ${SRS_OBJS}/_flag.ssl.arm.tmp
@@ -590,7 +590,7 @@ function apply_user_presets() { @@ -590,7 +590,7 @@ function apply_user_presets() {
590 SRS_HLS=YES 590 SRS_HLS=YES
591 SRS_DVR=YES 591 SRS_DVR=YES
592 SRS_NGINX=NO 592 SRS_NGINX=NO
593 - SRS_SSL=NO 593 + SRS_SSL=YES
594 SRS_FFMPEG_TOOL=NO 594 SRS_FFMPEG_TOOL=NO
595 SRS_TRANSCODE=YES 595 SRS_TRANSCODE=YES
596 SRS_INGEST=NO 596 SRS_INGEST=NO
@@ -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 "196" 34 +#define VERSION_REVISION "197"
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"