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

for bug #155, refine for osx, with ssl/http, disable statistics. 0.9.198.

This commit is contained in:
winlin 2014-08-17 20:38:51 +08:00
parent 554a9763db
commit 3111870316
5 changed files with 55 additions and 13 deletions

32
trunk/auto/depends.sh Executable file → Normal file
View file

@ -351,8 +351,21 @@ if [ ! -f ${SRS_OBJS}/st/libst.a ]; then echo "build st-1.9 static lib failed.";
#####################################################################################
# check the arm flag file, if flag changed, need to rebuild the st.
if [ $SRS_HTTP_PARSER = YES ]; then
# for osx(darwin), donot use sed.
if [ $SRS_OSX = YES ]; then
if [[ -f ${SRS_OBJS}/hp/http_parser.h && -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then
echo "http-parser-2.1 is ok.";
else
echo "build http-parser-2.1 for osx(darwin)";
(
rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip &&
cd http-parser-2.1 &&
make package &&
cd .. && rm -rf hp && ln -sf http-parser-2.1 hp
)
fi
# ok, arm specified, if the flag filed does not exists, need to rebuild.
if [ $SRS_EMBEDED_CPU = YES ]; then
elif [ $SRS_EMBEDED_CPU = YES ]; then
if [[ -f ${SRS_OBJS}/_flag.st.hp.tmp && -f ${SRS_OBJS}/hp/http_parser.h && -f ${SRS_OBJS}/hp/libhttp_parser.a ]]; then
echo "http-parser-2.1 for arm is ok.";
else
@ -795,14 +808,21 @@ echo "#define SRS_AUTO_PREFIX \"${SRS_PREFIX}\"" >> $SRS_AUTO_HEADERS_H
echo "" >> $SRS_AUTO_HEADERS_H
# os specified
echo "" >> $SRS_AUTO_HEADERS_H
if [ $SRS_OSX = YES ]; then
echo "#define SRS_AUTO_OSX" >> $SRS_AUTO_HEADERS_H
else
echo "#undef SRS_AUTO_OSX" >> $SRS_AUTO_HEADERS_H
fi
echo "" >> $SRS_AUTO_HEADERS_H
#####################################################################################
# generated the contributors from AUTHORS.txt
#####################################################################################
if [ $OS_IS_CENTOS = YES ]; then
SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk -F '* ' '{print $2}'`
else
SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk -F '\* ' '{print $2}'`
fi
SRS_CONSTRIBUTORS=`cat ../AUTHORS.txt|grep "*"|awk '{print $2}'`
echo "#define SRS_AUTO_CONSTRIBUTORS \"\\" >> $SRS_AUTO_HEADERS_H
for CONTRIBUTOR in $SRS_CONSTRIBUTORS; do
echo "${CONTRIBUTOR} \\" >> $SRS_AUTO_HEADERS_H

25
trunk/auto/options.sh Executable file → Normal file
View file

@ -593,11 +593,11 @@ function apply_user_presets() {
SRS_SSL=YES
SRS_FFMPEG_TOOL=NO
SRS_TRANSCODE=YES
SRS_INGEST=NO
SRS_HTTP_PARSER=NO
SRS_HTTP_CALLBACK=NO
SRS_HTTP_SERVER=NO
SRS_HTTP_API=NO
SRS_INGEST=YES
SRS_HTTP_PARSER=YES
SRS_HTTP_CALLBACK=YES
SRS_HTTP_SERVER=YES
SRS_HTTP_API=YES
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -794,6 +794,21 @@ function check_option_conflicts() {
echo "x86/x64 should never use static, see: ./configure --help"; __check_ok=NO;
fi
fi
# for darwin, must use --osx, vice versa
if [ $SRS_OSX = YES ]; then
if [ `uname -s` = Darwin ]; then
echo "osx(darwin) is ok"
else
echo "--osx is for darwin(your os is not), see: ./configure --help"; __check_ok=NO;
fi
else
if [ `uname -s` = Darwin ]; then
echo "use --osx for darwin, see: ./configure --help"; __check_ok=NO;
fi
fi
# TODO: FIXME: check more os.
# check variable neccessary
if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi