commit 7d147f690c96cc424ce3fd78b12b43877ae8a6eb from: Thomas Adam date: Fri Jan 03 10:49:08 2025 UTC portable: define HAVE_TREE_H if libbsd found When using libbsd, ensure that we define HAVE_TREE_H; this means libbsd's is used over the compat version which stops redefinition warnings from libbsd. commit - 992e786b8f5cf5352f511063a514244871b1aeba commit + 7d147f690c96cc424ce3fd78b12b43877ae8a6eb blob - 18e3b9fa48ea95ade2ce6230d07557de4274bdcf blob + 11c980256f2b2e1e96780971d892ff5e672f13f5 --- configure.ac +++ configure.ac @@ -272,6 +272,13 @@ AC_CHECK_FUNCS([ \ sysconf \ wcwidth \ ]) + +AC_CHECK_DECL( + RB_GENERATE_STATIC, + found_sys_tree_h=yes, + found_sys_tree_h=no, + [#include ] +) AM_CONDITIONAL([HAVE_SETPROCTITLE], [test "x$ac_cv_func_setproctitle" = xyes]) @@ -697,6 +704,7 @@ if test "$PLATFORM" = "linux"; then AC_SUBST(libbsd_CFLAGS) AC_SUBST(libbsd_LIBS) AC_DEFINE([HAVE_LIBBSD], [1], [BSD UUID]) + AC_DEFINE([HAVE_TREE_H], [test x"$found_sys_tree_h" = "xyes"], [HAVE_TREE_H]) ], [ AC_MSG_ERROR("*** couldn't find libbsd-overlay via pkg-config") @@ -752,14 +760,6 @@ else AC_MSG_ERROR("*** sys/queue.h missing key defines ***) fi -AC_CHECK_DECL( - RB_GENERATE_STATIC, - found_sys_tree_h=yes, - found_sys_tree_h=no, - [#include ] -) - - # Look for crypto (part of openssl) # Note: libcrypto (via openssl) has a .pc file in pretty-much all distros and # BSDs which we support.