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

refine the configure

This commit is contained in:
winlin 2013-11-30 14:12:19 +08:00
parent ad618702aa
commit 9a582b0e4a
2 changed files with 37 additions and 6 deletions

View file

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
ff_src_dir="../../3rdparty"
ff_current_dir=$(pwd -P) ff_current_dir=$(pwd -P)
ff_build_dir="${ff_current_dir}/_build" ff_build_dir="${ff_current_dir}/_build"
ff_release_dir="${ff_current_dir}/_release" ff_release_dir="${ff_current_dir}/_release"
@ -18,7 +20,7 @@ if [[ -f ${ff_yasm_bin} ]]; then
else else
echo "build yasm-1.2.0" echo "build yasm-1.2.0"
cd $ff_current_dir && cd $ff_current_dir &&
rm -rf yasm-1.2.0 && unzip -q ../../3rdparty/yasm-1.2.0.zip && rm -rf yasm-1.2.0 && unzip -q ${ff_src_dir}/yasm-1.2.0.zip &&
cd yasm-1.2.0 && ./configure --prefix=${ff_release_dir} && cd yasm-1.2.0 && ./configure --prefix=${ff_release_dir} &&
make && make install make && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build yasm-1.2.0 failed"; exit 1; fi ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build yasm-1.2.0 failed"; exit 1; fi
@ -30,8 +32,8 @@ if [[ -f ${ff_release_dir}/lib/libaacplus.a ]]; then
else else
echo "build yasm-1.2.0" echo "build yasm-1.2.0"
cd $ff_current_dir && cd $ff_current_dir &&
rm -rf libaacplus-2.0.2 && unzip -q ../../3rdparty/libaacplus-2.0.2.zip && rm -rf libaacplus-2.0.2 && unzip -q ${ff_src_dir}/libaacplus-2.0.2.zip &&
cd libaacplus-2.0.2 && cp ../../../3rdparty/libaacplus-patch-26410-800.zip src/26410-800.zip && cd libaacplus-2.0.2 && cp ../${ff_src_dir}/libaacplus-patch-26410-800.zip src/26410-800.zip &&
bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install bash autogen.sh && ./configure --prefix=${ff_release_dir} --enable-static && make && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build libaacplus-2.0.2 failed"; exit 1; fi
fi fi
@ -42,7 +44,7 @@ if [[ -f ${ff_release_dir}/lib/libmp3lame.a ]]; then
else else
echo "build lame-3.99.5" echo "build lame-3.99.5"
cd $ff_current_dir && cd $ff_current_dir &&
rm -rf lame-3.99.5 && unzip -q ../../3rdparty/lame-3.99.5.zip && rm -rf lame-3.99.5 && unzip -q ${ff_src_dir}/lame-3.99.5.zip &&
cd lame-3.99.5 && ./configure --prefix=${ff_release_dir} --enable-static && make && make install cd lame-3.99.5 && ./configure --prefix=${ff_release_dir} --enable-static && make && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build lame-3.99.5 failed"; exit 1; fi ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build lame-3.99.5 failed"; exit 1; fi
fi fi
@ -53,7 +55,7 @@ if [[ -f ${ff_release_dir}/lib/libx264.a ]]; then
else else
echo "build x264" echo "build x264"
cd $ff_current_dir && cd $ff_current_dir &&
rm -rf x264-snapshot-20131129-2245-stable && unzip -q ../../3rdparty/x264-snapshot-20131129-2245-stable.zip && rm -rf x264-snapshot-20131129-2245-stable && unzip -q ${ff_src_dir}/x264-snapshot-20131129-2245-stable.zip &&
cd x264-snapshot-20131129-2245-stable && ./configure --prefix=${ff_release_dir} --bit-depth=10 --enable-static && make && make install cd x264-snapshot-20131129-2245-stable && ./configure --prefix=${ff_release_dir} --bit-depth=10 --enable-static && make && make install
ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi ret=$?; if [[ 0 -ne ${ret} ]]; then echo "build x264 failed"; exit 1; fi
fi fi
@ -64,7 +66,7 @@ if [[ -f ${ff_release_dir}/bin/ffmpeg ]]; then
else else
echo "build ffmpeg-2.1.1" echo "build ffmpeg-2.1.1"
cd $ff_current_dir && cd $ff_current_dir &&
rm -rf ffmpeg-2.1.1 && unzip -q ../../3rdparty/ffmpeg-2.1.1.zip && rm -rf ffmpeg-2.1.1 && unzip -q ${ff_src_dir}/ffmpeg-2.1.1.zip &&
echo "remove all so to force the ffmpeg to build in static" && echo "remove all so to force the ffmpeg to build in static" &&
rm -f ${ff_release_dir}/lib/*.so* && rm -f ${ff_release_dir}/lib/*.so* &&
echo "export the dir to enable the build command canbe use." && echo "export the dir to enable the build command canbe use." &&

29
trunk/configure vendored
View file

@ -6,6 +6,12 @@ SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp"
mkdir -p ${SRS_OBJS} mkdir -p ${SRS_OBJS}
# linux shell color support.
RED="\\e[31m"
GREEN="\\e[32m"
YELLOW="\\e[33m"
BLACK="\\e[0m"
# parse user options. # parse user options.
. auto/options.sh . auto/options.sh
@ -119,11 +125,34 @@ BUILD_KEY="simple_rtmp_server" APP_MAIN="srs_main_server" APP_NAME="simple_rtmp_
echo 'configure ok! ' echo 'configure ok! '
# summary
echo ""
echo "configure summary:"
if [ $SRS_HLS = YES ]; then
echo -e "${GREEN}HLS over nginx is enabled${BLACK}"
else
echo -e "warning: without HLS support"
fi
if [ $SRS_SSL = YES ]; then
echo -e "${GREEN}rtmp complex handshake is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without rtmp complex handshake support, donot support h264/aac to adobe flash player${BLACK}"
fi
if [ $SRS_FFMPEG = YES ]; then
echo -e "${GREEN}live stream transcoding over FFMPEG is enabled${BLACK}"
else
echo -e "${YELLOW}warning: without live stream transcoding over FFMPEG support${BLACK}"
fi
# next step. # next step.
echo ""
echo "you can:" echo "you can:"
echo "\" make \" to build the srs(simple rtmp server)." echo "\" make \" to build the srs(simple rtmp server)."
echo "\" make help \" to get the usage of make" echo "\" make help \" to get the usage of make"
if [ $SRS_HLS = YES ]; then if [ $SRS_HLS = YES ]; then
echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls" echo "\" sudo ./objs/nginx/sbin/nginx \" to start the nginx http server for hls"
fi fi
if [ $SRS_FFMPEG = YES ]; then
echo -e "\" ./objs/ffmpeg/bin/ffmpeg \" is used for live stream transcoding"
fi
echo "\" ./objs/simple_rtmp_server -c conf/srs.conf \" to start the srs live server" echo "\" ./objs/simple_rtmp_server -c conf/srs.conf \" to start the srs live server"