mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix build script
This commit is contained in:
parent
c143c80fd6
commit
6e9e0d6ce3
4 changed files with 24 additions and 10 deletions
|
@ -84,15 +84,6 @@ function Ubuntu_prepare()
|
|||
echo "The unzip is installed."
|
||||
fi
|
||||
|
||||
if [[ $SRS_NASM == YES ]]; then
|
||||
nasm -v >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "Installing nasm."
|
||||
require_sudoer "sudo apt-get install -y --force-yes nasm"
|
||||
sudo apt-get install -y --force-yes nasm; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
|
||||
echo "The nasm is installed."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $SRS_VALGRIND == YES ]]; then
|
||||
valgrind --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "Installing valgrind."
|
||||
|
@ -281,6 +272,10 @@ function OSX_prepare()
|
|||
echo "install unzip success"
|
||||
fi
|
||||
|
||||
pkg-config --version >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
echo "Please install pkg-config"; exit -1;
|
||||
fi
|
||||
|
||||
echo "OSX install tools success"
|
||||
return 0
|
||||
}
|
||||
|
@ -614,9 +609,16 @@ fi
|
|||
#####################################################################################
|
||||
if [[ $SRS_EXPORT_LIBRTMP_PROJECT == NO && $SRS_RTC == YES ]]; then
|
||||
FFMPEG_OPTIONS=""
|
||||
|
||||
# If disable nasm, disable all ASMs.
|
||||
if [[ $SRS_NASM == NO ]]; then
|
||||
FFMPEG_OPTIONS="--disable-asm --disable-x86asm --disable-inline-asm"
|
||||
fi
|
||||
# If no nasm, we disable the x86asm.
|
||||
nasm -v >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
|
||||
FFMPEG_OPTIONS="--disable-x86asm"
|
||||
fi
|
||||
|
||||
if [[ -f ${SRS_OBJS}/${SRS_PLATFORM}/ffmpeg/lib/libavcodec.a ]]; then
|
||||
echo "The ffmpeg-4.2-fit is ok.";
|
||||
else
|
||||
|
|
|
@ -569,6 +569,7 @@ function apply_user_detail_options() {
|
|||
|
||||
# Detect whether has sendmmsg.
|
||||
# @see http://man7.org/linux/man-pages/man2/sendmmsg.2.html
|
||||
mkdir -p ${SRS_OBJS} &&
|
||||
echo "#include <sys/socket.h>" > ${SRS_OBJS}/_tmp_sendmmsg_detect.c
|
||||
echo "int main(int argc, char** argv) {" >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c
|
||||
echo " struct mmsghdr hdr;" >> ${SRS_OBJS}/_tmp_sendmmsg_detect.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue