# HG changeset patch # User Mark Doliner # Date 1205734172 0 # Node ID 2c757739ee77b07099b605dbbb89ee9ef12ae8c4 # Parent 0c2dd59f91d1cce47a612bf27757fcf94daea08a 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 diff -r 0c2dd59f91d1 -r 2c757739ee77 configure.ac --- 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 + #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,