From be77631bbc5fee12c9028f9ffd577dc1066231b7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 17 Jul 2022 13:00:37 -0700 Subject: 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 --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) 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]) -- cgit v1.2.3