Subject: | configure does not properly detect pthread_np.h on openbsd |
Date: | Thu, 03 Aug 2017 23:06:36 +0000 |
To: | bind9-public@isc.org |
From: | ckb@isc.org |
configuring on openbsd gives the following:
checking pthread_np.h presence... yes
configure: WARNING: pthread_np.h: present but cannot be compiled
configure: WARNING: pthread_np.h: check for missing prerequisite headers?
configure: WARNING: pthread_np.h: see the Autoconf documentation
configure: WARNING: pthread_np.h: section "Present But Cannot Be Compiled"
configure: WARNING: pthread_np.h: proceeding with the compiler's result
configure: WARNING: ## --------------------------------- ##
configure: WARNING: ## Report this to bind9-bugs@isc.org ##
configure: WARNING: ## --------------------------------- ##
checking for pthread_np.h... no
this is because the file does not include pthread.h, so the test for it fails.
the following patch fixes it:
diff --git a/configure.in b/configure.in
index 737b1c1..059189b 100644
--- a/configure.in
+++ b/configure.in
@@ -1353,7 +1353,7 @@ then
# Look for functions relating to thread naming
AC_CHECK_FUNCS(pthread_setname_np pthread_set_name_np)
- AC_CHECK_HEADERS(pthread_np.h)
+ AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
#
# Look for sysconf to allow detection of the number of processors.