mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support use other g++ when configure.
This commit is contained in:
parent
cd7e6cc321
commit
72d477f466
5 changed files with 63 additions and 19 deletions
|
@ -1,18 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
#####################################################################################
|
||||
#####################################################################################
|
||||
# parse user options, do this at first
|
||||
#####################################################################################
|
||||
#####################################################################################
|
||||
|
||||
#####################################################################################
|
||||
# output variables
|
||||
#####################################################################################
|
||||
help=no
|
||||
|
||||
SRS_HLS=RESERVED
|
||||
SRS_SSL=RESERVED
|
||||
SRS_FFMPEG=RESERVED
|
||||
SRS_HTTP=RESERVED
|
||||
SRS_RESEARCH=RESERVED
|
||||
|
||||
# TODO: remove the default to yes.
|
||||
SRS_HLS=YES
|
||||
SRS_SSL=YES
|
||||
SRS_FFMPEG=YES
|
||||
SRS_HTTP=YES
|
||||
SRS_RESEARCH=NO
|
||||
|
||||
#####################################################################################
|
||||
# parse options
|
||||
#####################################################################################
|
||||
opt=
|
||||
|
||||
for option
|
||||
|
@ -31,11 +45,13 @@ do
|
|||
--with-hls) SRS_HLS=YES ;;
|
||||
--with-ffmpeg) SRS_FFMPEG=YES ;;
|
||||
--with-http) SRS_HTTP=YES ;;
|
||||
--with-research) SRS_RESEARCH=YES ;;
|
||||
|
||||
--without-ssl) SRS_SSL=NO ;;
|
||||
--without-hls) SRS_HLS=NO ;;
|
||||
--without-ffmpeg) SRS_FFMPEG=NO ;;
|
||||
--without-http) SRS_HTTP=NO ;;
|
||||
--without-research) SRS_RESEARCH=NO ;;
|
||||
|
||||
*)
|
||||
echo "$0: error: invalid option \"$option\""
|
||||
|
@ -44,11 +60,14 @@ do
|
|||
esac
|
||||
done
|
||||
|
||||
# save all config options to macro.
|
||||
# save all config options to macro to write to auto headers file
|
||||
SRS_CONFIGURE="$opt"
|
||||
|
||||
#####################################################################################
|
||||
# show help and exit
|
||||
#####################################################################################
|
||||
if [ $help = yes ]; then
|
||||
cat << END
|
||||
cat << END
|
||||
|
||||
--help print this message
|
||||
|
||||
|
@ -58,17 +77,21 @@ cat << END
|
|||
--with-http enable http hooks, build cherrypy as demo api server.
|
||||
srs will call the http hooks, such as: on_connect.
|
||||
--with-ffmpeg enable transcoding with ffmpeg.
|
||||
--with-research build the research tools.
|
||||
|
||||
--without-ssl disable rtmp complex handshake.
|
||||
--without-hls disable hls, rtmp streaming only.
|
||||
--without-http disable http, http hooks callback.
|
||||
--without-ffmpeg disable the ffmpeg transcoding feature.
|
||||
--without-research do not build the research tools.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#####################################################################################
|
||||
# check user options
|
||||
#####################################################################################
|
||||
__check_ok=YES
|
||||
if [ $SRS_SSL = RESERVED ]; then
|
||||
echo "you must specifies the ssl, see: ./configure --help";
|
||||
|
@ -86,6 +109,10 @@ if [ $SRS_HTTP = RESERVED ]; then
|
|||
echo "you must specifies the http, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $SRS_RESEARCH = RESERVED ]; then
|
||||
echo "you must specifies the research, see: ./configure --help";
|
||||
__check_ok=NO
|
||||
fi
|
||||
if [ $__check_ok = NO ]; then
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue