summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2022-10-06 00:38:36 +0000
committerGuillem Jover <guillem@hadrons.org>2022-10-06 00:39:38 +0000
commitf476c0a09c0d0dd22d22f447cae9fa02eb560506 (patch)
treed682b49ff6a7821ff6f5686f6961d608f50e25a2 /configure.ac
parentd54aaf2483df6a1f98fadc09004157e657b7f73e (diff)
downloadxorg-lib-libXfont-f476c0a09c0d0dd22d22f447cae9fa02eb560506.tar.gz
Switch from libbsd to libbsd-overlay
This is the preferred usage form for libbsd, as it makes the code more portable and requires no special includes for libbsd, by transparently injects the needed standard headers that would be used on a BSD. Signed-off-by: Guillem Jover <guillem@hadrons.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 6 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index b78b90e..701f9fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,21 +51,18 @@ XORG_CHECK_SGML_DOCTOOLS(1.7)
AC_CHECK_HEADERS([endian.h poll.h sys/poll.h])
# Checks for library functions.
-AC_CHECK_FUNCS([poll readlink])
-AC_SEARCH_LIBS([strlcat], [bsd])
-if test "$ac_cv_search_strlcat" = "-lbsd"; then
- AC_DEFINE(HAVE_LIBBSD,1,[Has libbsd])
-fi
+PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay], [
+ CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
+ LIBS="$LIBS $LIBBSD_LIBS"
+], [:])
+
+AC_CHECK_FUNCS([poll readlink strlcat])
AC_CONFIG_LIBOBJ_DIR([src/util])
AC_REPLACE_FUNCS([reallocarray realpath strlcat strlcpy])
# Check for BSDish err.h
AC_CHECK_HEADERS([err.h])
-# If the first PKG_CHECK_MODULES appears inside a conditional, pkg-config
-# must first be located explicitly.
-PKG_PROG_PKG_CONFIG
-
#
# select libraries to include
#