build: Only install time struct conversion macros where missing

These macros are available in several systems, and we should not install
the man pages for them, otherwise we might end up shadowing the system
man pages if present.
This commit is contained in:
Guillem Jover
2024-03-13 00:56:07 +01:00
parent 3b8416acab
commit 31e9396bf2
3 changed files with 38 additions and 2 deletions

View File

@@ -71,6 +71,22 @@ int main() { return rc; }
[test "$libbsd_cv_gnu_init_array_support" = yes])
])
# LIBBSD_SELECT_API(name, desc)
# -----------------
AC_DEFUN([LIBBSD_SELECT_API], [
AS_IF([test -z "$AS_TR_SH([api_$1])"], [
AC_MSG_ERROR([missing API selection for $1])
], [test "$AS_TR_SH([api_$1])" = "unknown"], [
AC_MSG_ERROR([unknown ABI selection for $1])
], [test "$AS_TR_SH([api_$1])" = "yes"], [
AC_DEFINE(AS_TR_CPP([LIBBSD_API_$1]), [1], [Provide API for $2])
], [
AC_DEFINE(AS_TR_CPP([LIBBSD_API_$1]), [0])
])
AM_CONDITIONAL(AS_TR_CPP([API_$1]),
[test "x$AS_TR_SH([api_$1])" = "xyes"])
])
# LIBBSD_SELECT_ABI(name, desc)
# -----------------
AC_DEFUN([LIBBSD_SELECT_ABI], [