shithub: libvpx

Download patch

ref: 9b7d4cce635e226f8a932576df22237c67321e5d
parent: d547aced6cfed3c315a55d7071b8ef8cb57532f1
author: Martin Storsjo <martin@martin.st>
date: Thu Apr 19 04:55:44 EDT 2018

configure: Use both check_header and check_lib for pthreads

check_lib can be a stub that always returns true - make sure to
still use check_headers as before 38dc27cc6.

Change-Id: I5d471de56b16c015a0b686fa6c6caefa35bb89b4

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1491,7 +1491,7 @@
         # bionic includes basic pthread functionality, obviating -lpthread.
         ;;
       *)
-        check_lib -lpthread <<EOF && enable_feature pthread_h && add_extralibs -lpthread
+        check_header pthread.h && check_lib -lpthread <<EOF && enable_feature pthread_h && add_extralibs -lpthread
 #include <pthread.h>
 #include <stddef.h>
 int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }
--- a/configure
+++ b/configure
@@ -582,7 +582,10 @@
 int main(void) {return 0;}
 EOF
     # check system headers
-    check_lib -lpthread <<EOF && enable_feature pthread_h
+
+    # Use both check_header and check_lib here, since check_lib
+    # could be a stub that always returns true.
+    check_header pthread.h && check_lib -lpthread <<EOF && enable_feature pthread_h
 #include <pthread.h>
 #include <stddef.h>
 int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }