From 81da58f39d274ab7f822fb22e56b5b2027597a51 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 6 Oct 2022 00:26:11 +0000 Subject: 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 --- configure.ac | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'configure.ac') 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]) -- cgit v1.2.3