summaryrefslogtreecommitdiff
path: root/build/make
diff options
context:
space:
mode:
Diffstat (limited to 'build/make')
-rw-r--r--build/make/configure.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh
index a6c76612f..5efafdf95 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -319,6 +319,12 @@ check_ld() {
&& check_cmd ${LD} ${LDFLAGS} "$@" -o ${TMP_X} ${TMP_O} ${extralibs}
}
+check_lib() {
+ log check_lib "$@"
+ check_cc $@ \
+ && check_cmd ${LD} ${LDFLAGS} -o ${TMP_X} ${TMP_O} "$@" ${extralibs}
+}
+
check_header(){
log check_header "$@"
header=$1
@@ -1485,7 +1491,11 @@ EOF
# bionic includes basic pthread functionality, obviating -lpthread.
;;
*)
- check_header pthread.h && add_extralibs -lpthread
+ 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); }
+EOF
;;
esac
fi