From c6eded76e212419518bd955cad58c96b8653840e 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 Fixes: #4 Signed-off-by: Alan Coopersmith --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index cffefcf..eff477b 100644 --- a/configure.ac +++ b/configure.ac @@ -7,6 +7,11 @@ AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) +# 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.1