diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-13 14:50:51 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-08-13 15:35:32 -0700 |
commit | 7e039ed98ad9ef4083a01d3e5a03e54302706550 (patch) | |
tree | a4b21509e6bcf2dcccce64c8387964668441c085 /configure.ac | |
parent | 23fa33d7061a2bba7f0732ea0c8c324a560a65d3 (diff) |
Use reallocarray() if it is available in libc or libbsd
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index fe1e011..bff7560 100644 --- a/configure.ac +++ b/configure.ac @@ -40,6 +40,12 @@ XORG_DEFAULT_OPTIONS # Checks for pkg-config packages PKG_CHECK_MODULES(FSLSFONTS, [xproto >= 7.0.25 libfs]) +# Checks for library functions +AC_SEARCH_LIBS([reallocarray], [bsd]) +AS_IF([test "x$ac_cv_search_reallocarray" = "x-lbsd"], + [AC_CHECK_HEADERS([bsd/stdlib.h])]) +AC_CHECK_FUNCS([reallocarray]) + AC_CONFIG_FILES([ Makefile man/Makefile]) |