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

Build: Refine the options for configure

This commit is contained in:
winlin 2020-06-24 17:03:56 +08:00
parent c8892c4009
commit 98924943a6
2 changed files with 9 additions and 22 deletions

View file

@ -203,8 +203,7 @@ Experts:
--use-shared-st Use link shared libraries for ST which uses MPL license. --use-shared-st Use link shared libraries for ST which uses MPL license.
--use-shared-srt Use link shared libraries for SRT which uses MPL license. --use-shared-srt Use link shared libraries for SRT which uses MPL license.
--build-tag=<TAG> Set the build object directory suffix. --build-tag=<TAG> Set the build object directory suffix.
--with-clean Configure SRS and do make clean if possible. --clean=on|off Whether do 'make clean' when configure.
--without-clean Configure SRS and never make clean even possible.
--detect-sendmmsg=on|off Whether detect the sendmmsg API. --detect-sendmmsg=on|off Whether detect the sendmmsg API.
--has-sendmmsg=on|off Whether OS supports sendmmsg API. --has-sendmmsg=on|off Whether OS supports sendmmsg API.
--simulator=on|off Whether enable RTC network simulator. --simulator=on|off Whether enable RTC network simulator.
@ -437,7 +436,7 @@ if [ $help = yes ]; then
exit 0 exit 0
fi fi
function apply_user_presets() { function apply_detail_options() {
# always set the log level for all presets. # always set the log level for all presets.
SRS_LOG_VERBOSE=NO SRS_LOG_VERBOSE=NO
SRS_LOG_INFO=NO SRS_LOG_INFO=NO
@ -536,19 +535,7 @@ function apply_user_presets() {
if [[ $SRS_RTC == YES && $SRS_FFMPEG_FIT == RESERVED ]]; then if [[ $SRS_RTC == YES && $SRS_FFMPEG_FIT == RESERVED ]]; then
SRS_FFMPEG_FIT=YES SRS_FFMPEG_FIT=YES
fi fi
}
apply_user_presets
#####################################################################################
# parse detail feature options
#####################################################################################
for option
do
parse_user_option_to_value_and_option
parse_user_option
done
function apply_user_detail_options() {
# if transcode/ingest specified, requires the ffmpeg stub classes. # if transcode/ingest specified, requires the ffmpeg stub classes.
SRS_FFMPEG_STUB=NO SRS_FFMPEG_STUB=NO
if [ $SRS_TRANSCODE = YES ]; then SRS_FFMPEG_STUB=YES; fi if [ $SRS_TRANSCODE = YES ]; then SRS_FFMPEG_STUB=YES; fi
@ -611,7 +598,7 @@ function apply_user_detail_options() {
SRS_SENDMMSG=NO SRS_SENDMMSG=NO
fi fi
} }
apply_user_detail_options apply_detail_options
function regenerate_options() { function regenerate_options() {
# save all config options to macro to write to auto headers file # save all config options to macro to write to auto headers file

12
trunk/configure vendored
View file

@ -499,13 +499,13 @@ destroy:
(cd ${SRS_OBJS_DIR} && rm -rf ${SRS_PLATFORM}) (cd ${SRS_OBJS_DIR} && rm -rf ${SRS_PLATFORM})
clean_srs: clean_srs:
(cd ${SRS_OBJS_DIR} && rm -rf srs srs_utest) @(cd ${SRS_OBJS_DIR} && rm -rf srs srs_utest)
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf include/* lib/*) @(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf include/* lib/*)
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && find src -name "*.o" -delete) @(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && find src -name "*.o" -delete)
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && find utest -name "*.o" -delete) @(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && find utest -name "*.o" -delete)
clean_modules: clean_modules:
(cd ${SRS_OBJS_DIR} && rm -rf $__mdefaults) @(cd ${SRS_OBJS_DIR} && rm -rf $__mdefaults)
clean_openssl: clean_openssl:
(cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf openssl*) (cd ${SRS_OBJS_DIR}/${SRS_PLATFORM} && rm -rf openssl*)
@ -783,7 +783,7 @@ done
# Do cleanup when configure done. # Do cleanup when configure done.
##################################################################################### #####################################################################################
if [[ $SRS_CLEAN == YES && -f Makefile ]]; then if [[ $SRS_CLEAN == YES && -f Makefile ]]; then
echo "Do full cleanup, you can disable it by: --without-clean" echo "Do full cleanup, you can disable it by: --clean=off"
make clean make clean
fi fi