@@ -335,7 +335,7 @@ function apply_user_presets() {
335
335
# set default preset if not specifies
336
336
if [[ $SRS_PURE_RTMP == NO && $SRS_FAST == NO && $SRS_DISABLE_ALL == NO && $SRS_ENABLE_ALL == NO && \
337
337
$SRS_DEV == NO && $SRS_FAST_DEV == NO && $SRS_DEMO == NO && $SRS_PI == NO && $SRS_CUBIE == NO && \
338
- $SRS_X86_X64 == NO && $SRS_OSX == NO \
338
+ $SRS_X86_X64 == NO && $SRS_OSX == NO && $SRS_CROSS_BUILD == NO \
339
339
]]; then
340
340
SRS_X86_X64=YES; opt=" --x86-x64 $opt " ;
341
341
fi
@@ -548,40 +548,24 @@ regenerate_options
548
548
# check user options
549
549
# ####################################################################################
550
550
function check_option_conflicts() {
551
- if [[ $SRS_TOOL_CC == ' ' ]]; then
552
- echo " No c compiler"
553
- exit -1
551
+ if [[ $SRS_TOOL_CC == ' ' || $SRS_TOOL_CXX == ' ' || $SRS_TOOL_AR == ' ' || $SRS_TOOL_LD == ' ' || $SRS_TOOL_RANDLIB == ' ' ]]; then
552
+ echo " No crossbuild tools, cc: $SRS_TOOL_CC , cxx: $SRS_TOOL_CXX , ar: $SRS_TOOL_AR , ld: $SRS_TOOL_LD , randlib: $SRS_TOOL_RANDLIB " ; exit -1
554
553
fi
555
- if [[ $SRS_TOOL_CXX == ' ' ]]; then
556
- echo " No c++ compiler"
557
- exit -1
558
- fi
559
- if [[ $SRS_TOOL_AR == ' ' ]]; then
560
- echo " No arhive tool"
561
- exit -1
562
- fi
563
- if [[ $SRS_TOOL_LD == ' ' ]]; then
564
- echo " No linker tool"
565
- exit -1
566
- fi
567
- if [[ $SRS_TOOL_RANDLIB == ' ' ]]; then
568
- echo " No randlib tool"
569
- exit -1
554
+
555
+ if [[ $SRS_CROSS_BUILD == YES && ($SRS_TOOL_CC == ' gcc' || $SRS_TOOL_CXX == ' g++' || $SRS_TOOL_AR == ' ar' ) ]]; then
556
+ echo " For crossbuild, must not use default toolchain, cc: $SRS_TOOL_CC , cxx: $SRS_TOOL_CXX , ar: $SRS_TOOL_AR " ; exit -1
570
557
fi
571
558
572
559
if [ $SRS_OSX = YES ]; then
573
- echo " We don't support OSX, please use docker https://github.com/ossrs/srs-docker"
574
- exit -1
560
+ echo " We don't support OSX, please use docker https://github.com/ossrs/srs-docker" ; exit -1
575
561
fi
576
562
577
563
if [[ $SRS_NGINX == YES ]]; then
578
- echo " Don't support building NGINX, please use docker https://github.com/ossrs/srs-docker"
579
- exit -1
564
+ echo " Don't support building NGINX, please use docker https://github.com/ossrs/srs-docker" ; exit -1
580
565
fi
581
566
582
567
if [[ $SRS_FFMPEG_TOOL == YES ]]; then
583
- echo " Don't support building FFMPEG, please use docker https://github.com/ossrs/srs-docker"
584
- exit -1
568
+ echo " Don't support building FFMPEG, please use docker https://github.com/ossrs/srs-docker" ; exit -1
585
569
fi
586
570
587
571
# TODO: FIXME: check more os.
0 commit comments