diff options
author | Måns Rullgård <mans@mansr.com> | 2006-11-18 16:16:58 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-11-18 16:16:58 +0000 |
commit | 9e7fd10192013dfb0d5bf21342aef1ccaaec1f8f (patch) | |
tree | a2bc1d68aab93698a0caed1ec190ae26ce895be6 /configure | |
parent | 3644d4724120defabf83b726caf097552fbb417d (diff) | |
download | ffmpeg-9e7fd10192013dfb0d5bf21342aef1ccaaec1f8f.tar.gz |
improved pthreads test
Originally committed as revision 7118 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1426,11 +1426,17 @@ enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no" # check for some common methods of building with pthread support # do this before the optional library checks as some of them require pthreads if enabled pthreads; then - { check_cflags -pthread && check_ldflags -pthread; } || - { check_cflags -pthreads && check_ldflags -pthreads; } || - check_lib pthread.h pthread_create -lpthread || - check_func pthread_create || - die "ERROR: can't find pthreads library" + if check_func pthread_create; then + : + elif check_func pthread_create -pthread; then + 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" + fi fi # these are off by default, so fail if requested and not available |