mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add configure preset, add test for configure
This commit is contained in:
parent
47927ab460
commit
406a30e533
3 changed files with 374 additions and 247 deletions
|
@ -536,10 +536,7 @@ fi
|
||||||
|
|
||||||
# whatever the FFMPEG tools, if transcode and ingest specified,
|
# whatever the FFMPEG tools, if transcode and ingest specified,
|
||||||
# srs always compile the FFMPEG tool stub which used to start the FFMPEG process.
|
# srs always compile the FFMPEG tool stub which used to start the FFMPEG process.
|
||||||
__SRS_FFMPEG_STUB=NO
|
if [ $SRS_FFMPEG_STUB = YES ]; then
|
||||||
if [ $SRS_TRANSCODE = YES ]; then __SRS_FFMPEG_STUB=YES; fi
|
|
||||||
if [ $SRS_INGEST = YES ]; then __SRS_FFMPEG_STUB=YES; fi
|
|
||||||
if [ $__SRS_FFMPEG_STUB = YES ]; then
|
|
||||||
echo "#define SRS_AUTO_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
echo "#define SRS_AUTO_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
||||||
else
|
else
|
||||||
echo "#undef SRS_AUTO_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
echo "#undef SRS_AUTO_FFMPEG" >> $SRS_AUTO_HEADERS_H
|
||||||
|
|
|
@ -20,7 +20,6 @@ SRS_SSL=RESERVED
|
||||||
SRS_FFMPEG_TOOL=RESERVED
|
SRS_FFMPEG_TOOL=RESERVED
|
||||||
SRS_TRANSCODE=RESERVED
|
SRS_TRANSCODE=RESERVED
|
||||||
SRS_INGEST=RESERVED
|
SRS_INGEST=RESERVED
|
||||||
SRS_HTTP_PARSER=RESERVED
|
|
||||||
SRS_HTTP_CALLBACK=RESERVED
|
SRS_HTTP_CALLBACK=RESERVED
|
||||||
SRS_HTTP_SERVER=RESERVED
|
SRS_HTTP_SERVER=RESERVED
|
||||||
SRS_HTTP_API=RESERVED
|
SRS_HTTP_API=RESERVED
|
||||||
|
@ -39,7 +38,10 @@ SRS_GPERF_MP=RESERVED
|
||||||
SRS_GPERF_CP=RESERVED
|
SRS_GPERF_CP=RESERVED
|
||||||
# gprof
|
# gprof
|
||||||
SRS_GPROF=RESERVED
|
SRS_GPROF=RESERVED
|
||||||
#
|
#
|
||||||
|
# libraries
|
||||||
|
SRS_FFMPEG_STUB=RESERVED
|
||||||
|
SRS_HTTP_PARSER=RESERVED
|
||||||
# arguments
|
# arguments
|
||||||
SRS_PREFIX=/usr/local/srs
|
SRS_PREFIX=/usr/local/srs
|
||||||
SRS_JOBS=1
|
SRS_JOBS=1
|
||||||
|
@ -54,6 +56,12 @@ SRS_ARM_UBUNTU12=NO
|
||||||
SRS_DEV=NO
|
SRS_DEV=NO
|
||||||
# raspberry-pi, open hls/ssl/static
|
# raspberry-pi, open hls/ssl/static
|
||||||
SRS_PI=NO
|
SRS_PI=NO
|
||||||
|
# the most fast compile, nothing, only support vp6 RTMP.
|
||||||
|
SRS_FAST=NO
|
||||||
|
# only support RTMP with ssl.
|
||||||
|
SRS_PURE_RTMP=NO
|
||||||
|
# only support RTMP+HLS with ssl.
|
||||||
|
SRS_RTMP_HLS=NO
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# menu
|
# menu
|
||||||
|
@ -117,13 +125,16 @@ Options:
|
||||||
used for make in the configure, for example, to make ffmpeg.
|
used for make in the configure, for example, to make ffmpeg.
|
||||||
|
|
||||||
Presets:
|
Presets:
|
||||||
--x86_x64 [default] for x86/x64 cpu, common pc and servers.
|
--x86-x64 [default] for x86/x64 cpu, common pc and servers.
|
||||||
--pi for raspberry-pi(directly build), open features hls/ssl/static.
|
--pi for raspberry-pi(directly build), open features hls/ssl/static.
|
||||||
--arm alias for --with-arm-ubuntu12
|
--arm alias for --with-arm-ubuntu12
|
||||||
--dev for dev, open all features, no gperf/gprof/arm.
|
--dev for dev, open all features, no gperf/gprof/arm.
|
||||||
|
--fast the most fast compile, nothing, only support vp6 RTMP.
|
||||||
|
--pure-rtmp only support RTMP with ssl.
|
||||||
|
--rtmp-hls only support RTMP+HLS with ssl.
|
||||||
|
|
||||||
Conflicts:
|
Conflicts:
|
||||||
1. --dev/x86_x64 vs --static:
|
1. --dev/x86-x64 vs --static:
|
||||||
the --static only for arm cpus.
|
the --static only for arm cpus.
|
||||||
2. --with-gmc vs --with-gmp:
|
2. --with-gmc vs --with-gmp:
|
||||||
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
|
@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
|
||||||
|
@ -192,10 +203,13 @@ function parse_user_option() {
|
||||||
--prefix) SRS_PREFIX=${value} ;;
|
--prefix) SRS_PREFIX=${value} ;;
|
||||||
--static) SRS_STATIC=YES ;;
|
--static) SRS_STATIC=YES ;;
|
||||||
|
|
||||||
--dev) SRS_DEV=YES ;;
|
--x86-x64) SRS_X86_X64=YES ;;
|
||||||
--x86_x64) SRS_X86_X64=YES ;;
|
|
||||||
--arm) SRS_ARM_UBUNTU12=YES ;;
|
--arm) SRS_ARM_UBUNTU12=YES ;;
|
||||||
--pi) SRS_PI=YES ;;
|
--pi) SRS_PI=YES ;;
|
||||||
|
--dev) SRS_DEV=YES ;;
|
||||||
|
--fast) SRS_FAST=YES ;;
|
||||||
|
--pure-rtmp) SRS_PURE_RTMP=YES ;;
|
||||||
|
--rtmp-hls) SRS_RTMP_HLS=YES ;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "$0: error: invalid option \"$option\""
|
echo "$0: error: invalid option \"$option\""
|
||||||
|
@ -204,6 +218,16 @@ function parse_user_option() {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parse_user_option_to_value_and_option() {
|
||||||
|
case "$option" in
|
||||||
|
-*=*)
|
||||||
|
value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`
|
||||||
|
option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`
|
||||||
|
;;
|
||||||
|
*) value="" ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# parse preset options
|
# parse preset options
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
@ -212,270 +236,342 @@ opt=
|
||||||
for option
|
for option
|
||||||
do
|
do
|
||||||
opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
|
opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
|
||||||
|
parse_user_option_to_value_and_option
|
||||||
case "$option" in
|
|
||||||
-*=*)
|
|
||||||
value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`
|
|
||||||
option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`
|
|
||||||
;;
|
|
||||||
*) value="" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
parse_user_option
|
parse_user_option
|
||||||
done
|
done
|
||||||
|
|
||||||
# set default preset if not specifies
|
if [ $help = yes ]; then
|
||||||
if [ $SRS_DEV = NO ]; then
|
show_help
|
||||||
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
exit 0
|
||||||
if [ $SRS_PI = NO ]; then
|
fi
|
||||||
if [ $SRS_X86_X64 = NO ]; then
|
|
||||||
SRS_X86_X64=YES; opt="--x86_x64 $opt";
|
function apply_user_presets() {
|
||||||
|
# set default preset if not specifies
|
||||||
|
if [ $SRS_RTMP_HLS = NO ]; then
|
||||||
|
if [ $SRS_PURE_RTMP = NO ]; then
|
||||||
|
if [ $SRS_FAST = NO ]; then
|
||||||
|
if [ $SRS_DEV = NO ]; then
|
||||||
|
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
||||||
|
if [ $SRS_PI = NO ]; then
|
||||||
|
if [ $SRS_X86_X64 = NO ]; then
|
||||||
|
SRS_X86_X64=YES; opt="--x86-x64 $opt";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# if arm specified, set some default to disabled.
|
# all disabled.
|
||||||
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
if [ $SRS_FAST = YES ]; then
|
||||||
SRS_HLS=YES
|
SRS_HLS=NO
|
||||||
SRS_DVR=YES
|
SRS_DVR=NO
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=NO
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=NO
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=NO
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=NO
|
||||||
SRS_LIBRTMP=NO
|
SRS_LIBRTMP=NO
|
||||||
SRS_BWTC=NO
|
SRS_BWTC=NO
|
||||||
SRS_RESEARCH=NO
|
SRS_RESEARCH=NO
|
||||||
SRS_UTEST=NO
|
SRS_UTEST=NO
|
||||||
SRS_GPERF=NO
|
SRS_GPERF=NO
|
||||||
SRS_GPERF_MC=NO
|
SRS_GPERF_MC=NO
|
||||||
SRS_GPERF_MP=NO
|
SRS_GPERF_MP=NO
|
||||||
SRS_GPERF_CP=NO
|
SRS_GPERF_CP=NO
|
||||||
SRS_GPROF=NO
|
SRS_GPROF=NO
|
||||||
SRS_STATIC=YES
|
SRS_STATIC=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# defaults for x86/x64
|
# all disabled.
|
||||||
if [ $SRS_X86_X64 = YES ]; then
|
if [ $SRS_RTMP_HLS = YES ]; then
|
||||||
SRS_HLS=YES
|
SRS_HLS=YES
|
||||||
SRS_DVR=YES
|
SRS_DVR=NO
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=YES
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=NO
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=NO
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=NO
|
||||||
SRS_LIBRTMP=YES
|
SRS_LIBRTMP=NO
|
||||||
SRS_BWTC=YES
|
SRS_BWTC=NO
|
||||||
SRS_RESEARCH=NO
|
SRS_RESEARCH=NO
|
||||||
SRS_UTEST=YES
|
SRS_UTEST=NO
|
||||||
SRS_GPERF=NO
|
SRS_GPERF=NO
|
||||||
SRS_GPERF_MC=NO
|
SRS_GPERF_MC=NO
|
||||||
SRS_GPERF_MP=NO
|
SRS_GPERF_MP=NO
|
||||||
SRS_GPERF_CP=NO
|
SRS_GPERF_CP=NO
|
||||||
SRS_GPROF=NO
|
SRS_GPROF=NO
|
||||||
SRS_STATIC=NO
|
SRS_STATIC=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if dev specified, open features if possible.
|
# only ssl for RTMP with complex handshake.
|
||||||
if [ $SRS_DEV = YES ]; then
|
if [ $SRS_PURE_RTMP = YES ]; then
|
||||||
SRS_HLS=YES
|
SRS_HLS=NO
|
||||||
SRS_DVR=YES
|
SRS_DVR=NO
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=YES
|
||||||
SRS_FFMPEG_TOOL=YES
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=NO
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=NO
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=NO
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=NO
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=NO
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=NO
|
||||||
SRS_LIBRTMP=YES
|
SRS_LIBRTMP=NO
|
||||||
SRS_BWTC=YES
|
SRS_BWTC=NO
|
||||||
SRS_RESEARCH=YES
|
SRS_RESEARCH=NO
|
||||||
SRS_UTEST=YES
|
SRS_UTEST=NO
|
||||||
SRS_GPERF=NO
|
SRS_GPERF=NO
|
||||||
SRS_GPERF_MC=NO
|
SRS_GPERF_MC=NO
|
||||||
SRS_GPERF_MP=NO
|
SRS_GPERF_MP=NO
|
||||||
SRS_GPERF_CP=NO
|
SRS_GPERF_CP=NO
|
||||||
SRS_GPROF=NO
|
SRS_GPROF=NO
|
||||||
SRS_STATIC=NO
|
SRS_STATIC=NO
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if raspberry-pi specified, open ssl/hls/static features
|
# if arm specified, set some default to disabled.
|
||||||
if [ $SRS_PI = YES ]; then
|
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
||||||
SRS_HLS=YES
|
SRS_HLS=YES
|
||||||
SRS_DVR=YES
|
SRS_DVR=YES
|
||||||
SRS_NGINX=NO
|
SRS_NGINX=NO
|
||||||
SRS_SSL=YES
|
SRS_SSL=YES
|
||||||
SRS_FFMPEG_TOOL=NO
|
SRS_FFMPEG_TOOL=NO
|
||||||
SRS_TRANSCODE=YES
|
SRS_TRANSCODE=YES
|
||||||
SRS_INGEST=YES
|
SRS_INGEST=YES
|
||||||
SRS_HTTP_PARSER=YES
|
SRS_HTTP_PARSER=YES
|
||||||
SRS_HTTP_CALLBACK=YES
|
SRS_HTTP_CALLBACK=YES
|
||||||
SRS_HTTP_SERVER=YES
|
SRS_HTTP_SERVER=YES
|
||||||
SRS_HTTP_API=YES
|
SRS_HTTP_API=YES
|
||||||
SRS_LIBRTMP=NO
|
SRS_LIBRTMP=NO
|
||||||
SRS_BWTC=NO
|
SRS_BWTC=NO
|
||||||
SRS_RESEARCH=NO
|
SRS_RESEARCH=NO
|
||||||
SRS_UTEST=NO
|
SRS_UTEST=NO
|
||||||
SRS_GPERF=NO
|
SRS_GPERF=NO
|
||||||
SRS_GPERF_MC=NO
|
SRS_GPERF_MC=NO
|
||||||
SRS_GPERF_MP=NO
|
SRS_GPERF_MP=NO
|
||||||
SRS_GPERF_CP=NO
|
SRS_GPERF_CP=NO
|
||||||
SRS_GPROF=NO
|
SRS_GPROF=NO
|
||||||
SRS_STATIC=YES
|
SRS_STATIC=YES
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# defaults for x86/x64
|
||||||
|
if [ $SRS_X86_X64 = YES ]; then
|
||||||
|
SRS_HLS=YES
|
||||||
|
SRS_DVR=YES
|
||||||
|
SRS_NGINX=NO
|
||||||
|
SRS_SSL=YES
|
||||||
|
SRS_FFMPEG_TOOL=NO
|
||||||
|
SRS_TRANSCODE=YES
|
||||||
|
SRS_INGEST=YES
|
||||||
|
SRS_HTTP_PARSER=YES
|
||||||
|
SRS_HTTP_CALLBACK=YES
|
||||||
|
SRS_HTTP_SERVER=YES
|
||||||
|
SRS_HTTP_API=YES
|
||||||
|
SRS_LIBRTMP=YES
|
||||||
|
SRS_BWTC=YES
|
||||||
|
SRS_RESEARCH=NO
|
||||||
|
SRS_UTEST=YES
|
||||||
|
SRS_GPERF=NO
|
||||||
|
SRS_GPERF_MC=NO
|
||||||
|
SRS_GPERF_MP=NO
|
||||||
|
SRS_GPERF_CP=NO
|
||||||
|
SRS_GPROF=NO
|
||||||
|
SRS_STATIC=NO
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if dev specified, open features if possible.
|
||||||
|
if [ $SRS_DEV = YES ]; then
|
||||||
|
SRS_HLS=YES
|
||||||
|
SRS_DVR=YES
|
||||||
|
SRS_NGINX=NO
|
||||||
|
SRS_SSL=YES
|
||||||
|
SRS_FFMPEG_TOOL=YES
|
||||||
|
SRS_TRANSCODE=YES
|
||||||
|
SRS_INGEST=YES
|
||||||
|
SRS_HTTP_PARSER=YES
|
||||||
|
SRS_HTTP_CALLBACK=YES
|
||||||
|
SRS_HTTP_SERVER=YES
|
||||||
|
SRS_HTTP_API=YES
|
||||||
|
SRS_LIBRTMP=YES
|
||||||
|
SRS_BWTC=YES
|
||||||
|
SRS_RESEARCH=YES
|
||||||
|
SRS_UTEST=YES
|
||||||
|
SRS_GPERF=NO
|
||||||
|
SRS_GPERF_MC=NO
|
||||||
|
SRS_GPERF_MP=NO
|
||||||
|
SRS_GPERF_CP=NO
|
||||||
|
SRS_GPROF=NO
|
||||||
|
SRS_STATIC=NO
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if raspberry-pi specified, open ssl/hls/static features
|
||||||
|
if [ $SRS_PI = YES ]; then
|
||||||
|
SRS_HLS=YES
|
||||||
|
SRS_DVR=YES
|
||||||
|
SRS_NGINX=NO
|
||||||
|
SRS_SSL=YES
|
||||||
|
SRS_FFMPEG_TOOL=NO
|
||||||
|
SRS_TRANSCODE=YES
|
||||||
|
SRS_INGEST=YES
|
||||||
|
SRS_HTTP_PARSER=YES
|
||||||
|
SRS_HTTP_CALLBACK=YES
|
||||||
|
SRS_HTTP_SERVER=YES
|
||||||
|
SRS_HTTP_API=YES
|
||||||
|
SRS_LIBRTMP=NO
|
||||||
|
SRS_BWTC=NO
|
||||||
|
SRS_RESEARCH=NO
|
||||||
|
SRS_UTEST=NO
|
||||||
|
SRS_GPERF=NO
|
||||||
|
SRS_GPERF_MC=NO
|
||||||
|
SRS_GPERF_MP=NO
|
||||||
|
SRS_GPERF_CP=NO
|
||||||
|
SRS_GPROF=NO
|
||||||
|
SRS_STATIC=YES
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
apply_user_presets
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# parse detail feature options
|
# parse detail feature options
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
for option
|
for option
|
||||||
do
|
do
|
||||||
case "$option" in
|
parse_user_option_to_value_and_option
|
||||||
-*=*)
|
|
||||||
value=`echo "$option" | sed -e 's|[-_a-zA-Z0-9/]*=||'`
|
|
||||||
option=`echo "$option" | sed -e 's|=[-_a-zA-Z0-9/]*||'`
|
|
||||||
;;
|
|
||||||
*) value="" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
parse_user_option
|
parse_user_option
|
||||||
done
|
done
|
||||||
|
|
||||||
#####################################################################################
|
function apply_user_detail_options() {
|
||||||
# show help and exit
|
# if transcode/ingest specified, requires the ffmpeg stub classes.
|
||||||
#####################################################################################
|
SRS_FFMPEG_STUB=NO
|
||||||
if [ $help = yes ]; then
|
if [ $SRS_TRANSCODE = YES ]; then SRS_FFMPEG_STUB=YES; fi
|
||||||
show_help
|
if [ $SRS_INGEST = YES ]; then SRS_FFMPEG_STUB=YES; fi
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
#####################################################################################
|
# if http-xxxx specified, open the SRS_HTTP_PARSER
|
||||||
# generate the internal values from user specifies options
|
SRS_HTTP_PARSER=NO
|
||||||
#####################################################################################
|
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
# if transcode specified, try ffmpeg if possible.
|
if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
if [ $SRS_TRANSCODE = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi
|
if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi
|
||||||
if [ $SRS_INGEST = YES ]; then if [ $SRS_FFMPEG_TOOL = RESERVED ]; then SRS_FFMPEG_TOOL=YES; fi fi
|
|
||||||
|
|
||||||
# if http-xxxx specified, open the SRS_HTTP_PARSER
|
# parse the jobs for make
|
||||||
SRS_HTTP_PARSER=NO
|
if [[ "" -eq SRS_JOBS ]]; then
|
||||||
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_HTTP_PARSER=YES; fi
|
export SRS_JOBS="--jobs=1"
|
||||||
if [ $SRS_HTTP_SERVER = YES ]; then SRS_HTTP_PARSER=YES; fi
|
else
|
||||||
if [ $SRS_HTTP_API = YES ]; then SRS_HTTP_PARSER=YES; fi
|
export SRS_JOBS="--jobs=${SRS_JOBS}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
apply_user_detail_options
|
||||||
|
|
||||||
# parse the jobs for make
|
function regenerate_options() {
|
||||||
if [[ "" -eq SRS_JOBS ]]; then
|
# save all config options to macro to write to auto headers file
|
||||||
export SRS_JOBS="--jobs"
|
SRS_AUTO_USER_CONFIGURE="$opt"
|
||||||
else
|
# regenerate the options for default values.
|
||||||
export SRS_JOBS="--jobs=${SRS_JOBS}"
|
SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
|
||||||
fi
|
if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
|
||||||
|
if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
|
||||||
# save all config options to macro to write to auto headers file
|
if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
|
||||||
SRS_AUTO_USER_CONFIGURE="$opt"
|
if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi
|
||||||
|
if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ffmpeg"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ffmpeg"; fi
|
||||||
|
if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-transcode"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-transcode"; fi
|
||||||
|
if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ingest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ingest"; fi
|
||||||
|
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi
|
||||||
|
if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi
|
||||||
|
if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi
|
||||||
|
if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi
|
||||||
|
if [ $SRS_BWTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-bwtc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-bwtc"; fi
|
||||||
|
if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi
|
||||||
|
if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-utest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-utest"; fi
|
||||||
|
if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi
|
||||||
|
if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi
|
||||||
|
if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmp"; fi
|
||||||
|
if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gcp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gcp"; fi
|
||||||
|
if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi
|
||||||
|
if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi
|
||||||
|
if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi
|
||||||
|
echo "regenerate config: ${SRS_AUTO_CONFIGURE}"
|
||||||
|
}
|
||||||
|
regenerate_options
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
# check user options
|
# check user options
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
__check_ok=YES
|
function check_option_conflicts() {
|
||||||
# check conflict
|
__check_ok=YES
|
||||||
if [ $SRS_GPERF = NO ]; then
|
# check conflict
|
||||||
if [ $SRS_GPERF_MC = YES ]; then echo "gperf-mc depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF = NO ]; then
|
||||||
if [ $SRS_GPERF_MP = YES ]; then echo "gperf-mp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF_MC = YES ]; then echo "gperf-mc depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF_CP = YES ]; then echo "gperf-cp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF_MP = YES ]; then echo "gperf-mp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
||||||
fi
|
if [ $SRS_GPERF_CP = YES ]; then echo "gperf-cp depends on gperf, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF_MC = YES ]; then
|
|
||||||
if [ $SRS_GPERF_MP = YES ]; then
|
|
||||||
echo "gperf-mc not compatible with gperf-mp, see: ./configure --help";
|
|
||||||
echo "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html";
|
|
||||||
echo "Note that since the heap-checker uses the heap-profiling framework internally, it is not possible to run both the heap-checker and heap profiler at the same time";
|
|
||||||
__check_ok=NO
|
|
||||||
fi
|
fi
|
||||||
fi
|
if [ $SRS_GPERF_MC = YES ]; then
|
||||||
# generate the group option: SRS_GPERF
|
if [ $SRS_GPERF_MP = YES ]; then
|
||||||
__gperf_slow=NO
|
echo "gperf-mc not compatible with gperf-mp, see: ./configure --help";
|
||||||
if [ $SRS_GPERF_MC = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
echo "@see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html";
|
||||||
if [ $SRS_GPERF_MP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
echo "Note that since the heap-checker uses the heap-profiling framework internally, it is not possible to run both the heap-checker and heap profiler at the same time";
|
||||||
if [ $SRS_GPERF_CP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
__check_ok=NO
|
||||||
if [ $__gperf_slow = YES ]; then if [ $SRS_GPROF = YES ]; then
|
|
||||||
echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; __check_ok=NO;
|
|
||||||
fi fi
|
|
||||||
|
|
||||||
# check arm, if arm enabled, only allow st/ssl/librtmp,
|
|
||||||
# user should disable all other features
|
|
||||||
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
|
||||||
if [ $SRS_FFMPEG_TOOL = YES ]; then echo "ffmpeg for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_BWTC = YES ]; then echo "bwtc for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_RESEARCH = YES ]; then echo "research for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF = YES ]; then echo "gperf for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_MC = YES ]; then echo "gmc for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_MP = YES ]; then echo "gmp for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_CP = YES ]; then echo "gcp for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPROF = YES ]; then echo "gprof for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if x86/x64 or directly build, never use static
|
|
||||||
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
|
||||||
if [ $SRS_PI = NO ]; then
|
|
||||||
if [ $SRS_STATIC = YES ]; then
|
|
||||||
echo "x86/x64 should never use static, see: ./configure --help"; __check_ok=NO;
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
# generate the group option: SRS_GPERF
|
||||||
|
__gperf_slow=NO
|
||||||
|
if [ $SRS_GPERF_MC = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
||||||
|
if [ $SRS_GPERF_MP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
||||||
|
if [ $SRS_GPERF_CP = YES ]; then SRS_GPERF=YES; __gperf_slow=YES; fi
|
||||||
|
if [ $__gperf_slow = YES ]; then if [ $SRS_GPROF = YES ]; then
|
||||||
|
echo "gmc/gmp/gcp not compatible with gprof, see: ./configure --help"; __check_ok=NO;
|
||||||
|
fi fi
|
||||||
|
|
||||||
# check variable neccessary
|
# check arm, if arm enabled, only allow st/ssl/librtmp,
|
||||||
if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi
|
# user should disable all other features
|
||||||
if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
||||||
if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_FFMPEG_TOOL = YES ]; then echo "ffmpeg for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_BWTC = YES ]; then echo "bwtc for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_FFMPEG_TOOL = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_RESEARCH = YES ]; then echo "research for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF = YES ]; then echo "gperf for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF_MC = YES ]; then echo "gmc for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF_MP = YES ]; then echo "gmp for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPERF_CP = YES ]; then echo "gcp for arm is not available, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi
|
if [ $SRS_GPROF = YES ]; then echo "gprof for arm is not available, 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
|
fi
|
||||||
if [ $SRS_UTEST = RESERVED ]; then echo "you must specifies the utest, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF = RESERVED ]; then echo "you must specifies the gperf, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_MC = RESERVED ]; then echo "you must specifies the gperf-mc, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_MP = RESERVED ]; then echo "you must specifies the gperf-mp, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPERF_CP = RESERVED ]; then echo "you must specifies the gperf-cp, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_GPROF = RESERVED ]; then echo "you must specifies the gprof, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [ $SRS_ARM_UBUNTU12 = RESERVED ]; then echo "you must specifies the arm-ubuntu12, see: ./configure --help"; __check_ok=NO; fi
|
|
||||||
if [[ -z $SRS_PREFIX ]]; then echo "you must specifies the prefix, see: ./configure --prefix"; __check_ok=NO; fi
|
|
||||||
if [ $__check_ok = NO ]; then
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# regenerate the options for default values.
|
# if x86/x64 or directly build, never use static
|
||||||
SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
|
if [ $SRS_ARM_UBUNTU12 = NO ]; then
|
||||||
if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
|
if [ $SRS_PI = NO ]; then
|
||||||
if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
|
if [ $SRS_STATIC = YES ]; then
|
||||||
if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
|
echo "x86/x64 should never use static, see: ./configure --help"; __check_ok=NO;
|
||||||
if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi
|
fi
|
||||||
if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ffmpeg"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ffmpeg"; fi
|
fi
|
||||||
if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-transcode"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-transcode"; fi
|
fi
|
||||||
if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ingest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ingest"; fi
|
|
||||||
if [ $SRS_HTTP_CALLBACK = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-callback"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-callback"; fi
|
# check variable neccessary
|
||||||
if [ $SRS_HTTP_SERVER = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-server"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-server"; fi
|
if [ $SRS_HLS = RESERVED ]; then echo "you must specifies the hls, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_HTTP_API = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-http-api"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-http-api"; fi
|
if [ $SRS_DVR = RESERVED ]; then echo "you must specifies the dvr, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_LIBRTMP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-librtmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-librtmp"; fi
|
if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_BWTC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-bwtc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-bwtc"; fi
|
if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_RESEARCH = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-research"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-research"; fi
|
if [ $SRS_FFMPEG_TOOL = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_UTEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-utest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-utest"; fi
|
if [ $SRS_HTTP_CALLBACK = RESERVED ]; then echo "you must specifies the http-callback, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gperf"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gperf"; fi
|
if [ $SRS_HTTP_SERVER = RESERVED ]; then echo "you must specifies the http-server, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF_MC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmc"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmc"; fi
|
if [ $SRS_HTTP_API = RESERVED ]; then echo "you must specifies the http-api, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF_MP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gmp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gmp"; fi
|
if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPERF_CP = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gcp"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gcp"; fi
|
if [ $SRS_BWTC = RESERVED ]; then echo "you must specifies the bwtc, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_GPROF = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-gprof"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-gprof"; fi
|
if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_ARM_UBUNTU12 = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-arm-ubuntu12"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-arm-ubuntu12"; fi
|
if [ $SRS_UTEST = RESERVED ]; then echo "you must specifies the utest, see: ./configure --help"; __check_ok=NO; fi
|
||||||
if [ $SRS_STATIC = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --static"; fi
|
if [ $SRS_GPERF = RESERVED ]; then echo "you must specifies the gperf, see: ./configure --help"; __check_ok=NO; fi
|
||||||
echo "regenerate config: ${SRS_AUTO_CONFIGURE}"
|
if [ $SRS_GPERF_MC = RESERVED ]; then echo "you must specifies the gperf-mc, see: ./configure --help"; __check_ok=NO; fi
|
||||||
|
if [ $SRS_GPERF_MP = RESERVED ]; then echo "you must specifies the gperf-mp, see: ./configure --help"; __check_ok=NO; fi
|
||||||
|
if [ $SRS_GPERF_CP = RESERVED ]; then echo "you must specifies the gperf-cp, see: ./configure --help"; __check_ok=NO; fi
|
||||||
|
if [ $SRS_GPROF = RESERVED ]; then echo "you must specifies the gprof, see: ./configure --help"; __check_ok=NO; fi
|
||||||
|
if [ $SRS_ARM_UBUNTU12 = RESERVED ]; then echo "you must specifies the arm-ubuntu12, see: ./configure --help"; __check_ok=NO; fi
|
||||||
|
if [[ -z $SRS_PREFIX ]]; then echo "you must specifies the prefix, see: ./configure --prefix"; __check_ok=NO; fi
|
||||||
|
if [ $__check_ok = NO ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
check_option_conflicts
|
||||||
|
|
|
@ -17,4 +17,38 @@ package_dir=${build_objs}/package
|
||||||
log="${build_objs}/logs/package.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
|
log="${build_objs}/logs/package.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
||||||
|
|
||||||
# test default configure.
|
item="default configure"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
||||||
|
item="preset --x86-x64"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure --x86-x64 && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
||||||
|
item="preset --dev"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure --dev && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
||||||
|
item="preset --fast"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure --fast && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
||||||
|
item="preset --pure-rtmp"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure --pure-rtmp && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
||||||
|
item="preset --rtmp-hls"
|
||||||
|
ok_msg "test ${item}"
|
||||||
|
(./configure --rtmp-hls && make) >>$log 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "test ${item} failed. ret=$ret"; exit $ret; fi
|
||||||
|
ok_msg "test ${item} success"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue