summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 13:49:56 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commite02e32f71f6c24fcc69bdaf58f6f9e973a017896 (patch)
tree942bf0f4eafd2fac63249fb0250c4867403abde5 /configure.ac
parent75af06f5f8ffc41fabd100253aad222cb4ab8662 (diff)
Replace uTypedRealloc() with direct reallocarray() calls
Falls back to realloc() if platform doesn't offer reallocarray(). Also removes uRealloc() since it had no other uses. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 3aedf48..bdf5589 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,11 @@ AC_INIT([xkbcomp], [1.4.6],
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])
@@ -45,7 +50,7 @@ if test ! -f "$srcdir/xkbparse.c"; then
fi
fi
-AC_CHECK_FUNCS([strdup strcasecmp])
+AC_CHECK_FUNCS([reallocarray strdup strcasecmp])
# Checks for pkg-config packages
PKG_CHECK_MODULES(XKBCOMP, [x11 xkbfile xproto >= 7.0.17])