summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-12-21 18:28:36 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-12-28 17:41:01 -0800
commitdc63c253e33b1012c08cd274e6e37bf0fa87c624 (patch)
treeb07a1b9cad97365227e6547f30e5babe7ca6dc68
parent4b4ec3aeaa7cf5f5a6490ad2ddc2b07d090214cb (diff)
Add AC_USE_SYSTEM_EXTENSIONS to make asprintf() visible in GNU libc
asprintf is considered a GNU extension and thus one needs to define _GNU_SOURCE before including stdio.h. Reported-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 03432f5..52e00cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,6 +8,11 @@ AC_INIT([libICE], [1.0.7],
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL or XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE