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

build gperftools

This commit is contained in:
winlin 2014-03-06 14:10:45 +08:00
parent 34e913c58f
commit 0b17b2a481
4 changed files with 36 additions and 0 deletions

View file

@ -427,3 +427,23 @@ if [ $SRS_UTEST = YES ]; then
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gtest-1.6.0 failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/gtest/include/gtest/gtest.h ]; then echo "build gtest-1.6.0 failed."; exit -1; fi
fi
#####################################################################################
# build gperf code
#####################################################################################
if [ $SRS_GPERF = YES ]; then
if [[ -f ${SRS_OBJS}/gperf/bin/pprof ]]; then
echo "gperftools-2.1 is ok.";
else
echo "build gperftools-2.1";
(
rm -rf ${SRS_OBJS}/gperftools-2.1 && cd ${SRS_OBJS} &&
unzip -q ../3rdparty/gperftools-2.1.zip && cd gperftools-2.1 &&
./configure --prefix=`pwd`/_release --enable-frame-pointers && make ${SRS_JOBS} && make install &&
cd .. && rm -f gperf && ln -sf gperftools-2.1/_release gperf
)
fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "build gperftools-2.1 failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/gperf/bin/pprof ]; then echo "build gperftools-2.1 failed."; exit -1; fi
fi