mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-28 20:14:02 +08:00
improved pthreads test
Originally committed as revision 7118 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
14
configure
vendored
14
configure
vendored
@ -1426,12 +1426,18 @@ enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
|
|||||||
# check for some common methods of building with pthread support
|
# check for some common methods of building with pthread support
|
||||||
# do this before the optional library checks as some of them require pthreads
|
# do this before the optional library checks as some of them require pthreads
|
||||||
if enabled pthreads; then
|
if enabled pthreads; then
|
||||||
{ check_cflags -pthread && check_ldflags -pthread; } ||
|
if check_func pthread_create; then
|
||||||
{ check_cflags -pthreads && check_ldflags -pthreads; } ||
|
:
|
||||||
check_lib pthread.h pthread_create -lpthread ||
|
elif check_func pthread_create -pthread; then
|
||||||
check_func pthread_create ||
|
add_cflags -pthread
|
||||||
|
add_ldflags -pthread
|
||||||
|
elif check_func pthread_create -pthreads; then
|
||||||
|
add_cflags -pthreads
|
||||||
|
add_ldflags -pthreads
|
||||||
|
elif ! check_lib pthread.h pthread_create -lpthread; then
|
||||||
die "ERROR: can't find pthreads library"
|
die "ERROR: can't find pthreads library"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# these are off by default, so fail if requested and not available
|
# these are off by default, so fail if requested and not available
|
||||||
enabled dts && require libdts dts.h dts_init -ldts -lm
|
enabled dts && require libdts dts.h dts_init -ldts -lm
|
||||||
|
Reference in New Issue
Block a user