[PATCH app-xdm 16/19] config: use AC_CHECK_HEADERS for sys/param.h

Gaetan Nadon memsize at videotron.ca
Thu Sep 2 09:57:20 PDT 2010


This is the FreeBSD porting guide recommended
method to check for BSD 4.3 Net2 or newer systems.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 auth.c       |   10 ++++++----
 chooser.c    |   10 ++++++----
 configure.ac |    2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/auth.c b/auth.c
index 59434ec..1cf03e8 100644
--- a/auth.c
+++ b/auth.c
@@ -99,10 +99,12 @@ from The Open Group.
 # define SYSV_SIOCGIFCONF
 #endif
 
-#ifdef CSRG_BASED
-# include <sys/param.h>
-# if (BSD >= 199103)
-#  define VARIABLE_IFREQ
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+# ifdef BSD
+#  if (BSD >= 199103)
+#   define VARIABLE_IFREQ
+#  endif
 # endif
 #endif
 
diff --git a/chooser.c b/chooser.c
index 1e59a11..d3d08ea 100644
--- a/chooser.c
+++ b/chooser.c
@@ -101,10 +101,12 @@ in this Software without prior written authorization from The Open Group.
 # include    <netdir.h>
 #endif
 
-#ifdef CSRG_BASED
-# include <sys/param.h>
-# if (BSD >= 199103)
-#  define VARIABLE_IFREQ
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+# ifdef BSD
+#  if (BSD >= 199103)
+#   define VARIABLE_IFREQ
+#  endif
 # endif
 #endif
 
diff --git a/configure.ac b/configure.ac
index ac7e828..22f60dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,7 +89,7 @@ if test "x$HAS_SETUSERCONTEXT" = "xyes" ; then
 fi
 
 AC_CHECK_FUNCS([daemon sigaction openlog asprintf])
-AC_CHECK_HEADERS([grp.h syslog.h])
+AC_CHECK_HEADERS([grp.h syslog.h sys/param.h])
 AC_TYPE_SIGNAL
 
 XTRANS_CONNECTION_FLAGS
-- 
1.6.0.4



More information about the xorg-devel mailing list