summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-07-17 13:00:37 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-07-17 13:48:45 -0700
commitbe77631bbc5fee12c9028f9ffd577dc1066231b7 (patch)
treee558e31b39d60d521eea612d613a020792c40657
parent1aeb6a2d1673c1ae23763f55f09fb18d8e188fe0 (diff)
configure: Use AC_USE_SYSTEM_EXTENSIONS to set GNU_SOURCE & other defines
Ensures reallocarray is visible in system headers if available. (See libxext#4.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7735f51..75ebf56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,11 @@ AC_INIT([libfontenc], [1.1.4],
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)
+# to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-xz])