[FFmpeg-cvslog] configure: Reorder pthreads checks

Luca Barbato git at videolan.org
Sat Dec 14 12:45:46 CET 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Dec 12 17:05:34 2013 +0100| [a5a3b398fd9dce38ca50b20f182b17a256d209f2] | committer: Luca Barbato

configure: Reorder pthreads checks

Some pthreads symbols might be present in libc (as shown on various *BSD)
but not all of them, leading to false positives.

Check for the most common compiler flags before the plain symbol check
to avoid known pitfalls.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a5a3b398fd9dce38ca50b20f182b17a256d209f2
---

 configure |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 541d080..6e28e4e 100755
--- a/configure
+++ b/configure
@@ -3842,9 +3842,7 @@ fi
 # do this before the optional library checks as some of them require pthreads
 if ! disabled pthreads && ! enabled w32threads; then
     enable pthreads
-    if check_func pthread_join; then
-        :
-    elif check_func pthread_join -pthread; then
+    if check_func pthread_join -pthread; then
         add_cflags -pthread
         add_extralibs -pthread
     elif check_func pthread_join -pthreads; then
@@ -3852,7 +3850,9 @@ if ! disabled pthreads && ! enabled w32threads; then
         add_extralibs -pthreads
     elif check_func pthread_join -lpthreadGC2; then
         add_extralibs -lpthreadGC2
-    elif ! check_lib pthread.h pthread_join -lpthread; then
+    elif check_lib pthread.h pthread_join -lpthread; then
+        :
+    elif ! check_func pthread_join; then
         disable pthreads
     fi
 fi



More information about the ffmpeg-cvslog mailing list