summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2022-10-06 00:26:11 +0000
committerGuillem Jover <guillem@hadrons.org>2022-10-06 00:26:11 +0000
commit81da58f39d274ab7f822fb22e56b5b2027597a51 (patch)
treee7bd76861ae9a669b8810aa682487c82aec441bb /configure.ac
parent96c84e563610d5c7846e601605f675f3d3840dd2 (diff)
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.ac11
1 files changed, 4 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index e131ba8..1c9bcf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,17 +31,14 @@ XORG_CHECK_SGML_DOCTOOLS(1.8)
# Obtain compiler/linker options for dependencies
PKG_CHECK_MODULES(ICE, [xproto >= 7.0.25 xtrans])
+PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay], [
+ CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
+ LIBS="$LIBS $LIBBSD_LIBS"
+], [:])
# Checks for library functions.
-AC_SEARCH_LIBS([arc4random_buf], [bsd])
AC_CHECK_FUNCS([asprintf arc4random_buf getentropy])
-if test "x$ac_cv_search_arc4random_buf" = x-lbsd; then
- AC_DEFINE([HAVE_LIBBSD], [1], [Define to use libbsd])
- BSDLIB=-lbsd
-fi
-AC_SUBST(BSDLIB)
-
# Transport selection macro from xtrans.m4
XTRANS_CONNECTION_FLAGS
AC_DEFINE(ICE_t, 1, [Xtrans transport type])