]> granicus.if.org Git - libvpx/commitdiff
configure: Disable pthread_h if linking failed
authorMartin Storsjo <martin@martin.st>
Fri, 4 May 2018 06:32:41 +0000 (09:32 +0300)
committerMartin Storsjo <martin@martin.st>
Fri, 4 May 2018 06:37:51 +0000 (09:37 +0300)
When doing both check_header and check_lib, the check_header call
will already enable pthread_h if the header was found. This was
overlooked when the pthread linking check was amended into a header
check and a separate linking check in 9b7d4cce635e.

This brings back the same result as the original check in 38dc27cc6.

Change-Id: I0efb38f5780f7c79e2eb2b14290d6094096ea222

build/make/configure.sh
configure

index 876255bfe98efe3094fc9f794be55ab61be7beee..c4e3b514111b982f4952cacbc510c15170969614 100644 (file)
@@ -1491,7 +1491,7 @@ EOF
         # bionic includes basic pthread functionality, obviating -lpthread.
         ;;
       *)
-        check_header pthread.h && check_lib -lpthread <<EOF && enable_feature pthread_h && add_extralibs -lpthread
+        check_header pthread.h && check_lib -lpthread <<EOF && add_extralibs -lpthread || disable_feature pthread_h
 #include <pthread.h>
 #include <stddef.h>
 int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }
index b021c1212a7e8b22a8e790b5bdb3edb9f0767e6b..702483f132eb64377ca256ed76bd0e73e0823edd 100755 (executable)
--- a/configure
+++ b/configure
@@ -585,7 +585,7 @@ EOF
 
     # 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
+    check_header pthread.h && check_lib -lpthread <<EOF || disable_feature pthread_h
 #include <pthread.h>
 #include <stddef.h>
 int main(void) { return pthread_create(NULL, NULL, NULL, NULL); }