pidgin: b47050c0: Fix a problem with our configure check f...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Mar 17 02:20:42 EDT 2008


-----------------------------------------------------------------
Revision: b47050c07cd8a73aca7a3a9ceb7793febe0d81ac
Ancestor: 42df8ef15f4603d876ab1d764ffb91b9fc071840
Author: markdoliner at pidgin.im
Date: 2008-03-17T06:09:32
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b47050c07cd8a73aca7a3a9ceb7793febe0d81ac

Modified files:
        configure.ac

ChangeLog: 

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 at 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

-------------- next part --------------
============================================================
--- configure.ac	eff4eb1ce4eea274ce57bf7c6e9ab87fe73aa55b
+++ configure.ac	4c576bfea37797f072ca90160c2ccaebbe7c04d4
@@ -2100,7 +2100,17 @@ AC_CHECK_HEADERS(termios.h)
 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,


More information about the Commits mailing list