changeset 22493:2c757739ee77

Fix a problem with our configure check for sys/sysctl.h on OpenBSD 4.2. It was printing the following message: checking sys/sysctl.h usability... no checking sys/sysctl.h presence... yes configure: WARNING: sys/sysctl.h: present but cannot be compiled configure: WARNING: sys/sysctl.h: check for missing prerequisite headers? configure: WARNING: sys/sysctl.h: see the Autoconf documentation configure: WARNING: sys/sysctl.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/sysctl.h: proceeding with the preprocessor's result configure: WARNING: sys/sysctl.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------ ## configure: WARNING: ## Report this to devel@pidgin.im ## configure: WARNING: ## ------------------------------ ## Turns out sys/sysctl.h on OpenBSD 4.2 requires that sys/param.h be included for it to compile. This was reported to our devel mailing list by David Hill on December 11th, 2007. See http://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Headers for the documentation on AC_CHECK_HEADERS
author Mark Doliner <mark@kingant.net>
date Mon, 17 Mar 2008 06:09:32 +0000
parents 0c2dd59f91d1
children 14c476bcdaee
files configure.ac
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Mar 17 02:12:31 2008 +0000
+++ b/configure.ac	Mon Mar 17 06:09:32 2008 +0000
@@ -2100,7 +2100,17 @@
 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
 AC_CHECK_HEADERS(termios.h)
-AC_CHECK_HEADERS(sys/sysctl.h sys/socket.h)
+
+# sys/sysctl.h on OpenBSD 4.2 requires sys/param.h
+AC_CHECK_HEADERS(sys/param.h)
+AC_CHECK_HEADERS(sys/sysctl.h, [], [],
+	[[
+		#ifdef HAVE_PARAM_H
+		# include <sys/param.h>
+		#endif
+	]])
+
+AC_CHECK_HEADERS(sys/socket.h)
 AC_VAR_TIMEZONE_EXTERNALS
 
 AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,