From f224c62b89e484ef2fff8499d329e9aeae1c3529 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 27 Dec 2013 11:01:35 -0800 Subject: Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Required on Solaris to expose definitions in system headers that are not defined in the XPG standards now that xtrans 1.3 defines _XOPEN_SOURCE to 600 on Solaris. Fixes build failures: In file included from /usr/include/rpc/rpcb_clnt.h:34:0, from /usr/include/rpc/rpc.h:49, from xhost.c:98: /usr/include/rpc/rpcb_prot.h:159:3: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:195:3: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:223:2: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:476:1: error: unknown type name ‘u_int’ /usr/include/rpc/rpcb_prot.h:489:1: error: unknown type name ‘u_int’ xhost.c: In function ‘change_host’: xhost.c:554:11: error: ‘INET6_ADDRSTRLEN’ undeclared (first use in this function) xhost.c:554:11: note: each undeclared identifier is reported only once for each function it appears in xhost.c: In function ‘get_hostname’: xhost.c:665:23: error: ‘NI_MAXHOST’ undeclared (first use in this function) Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 0d6f506..4ec4de0 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,11 @@ AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like +# XORG_DEFAULT_OPTIONS) to avoid autoconf errors. +AC_USE_SYSTEM_EXTENSIONS + # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) -- cgit v1.2.3