mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-14 23:08:00 +02:00
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:
15
configure.ac
15
configure.ac
@@ -42,6 +42,8 @@ LIBBSD_LINKER_VERSION_SCRIPT
|
|||||||
|
|
||||||
is_windows=no
|
is_windows=no
|
||||||
|
|
||||||
|
api_time_macros=unknown
|
||||||
|
|
||||||
abi_accmode=unknown
|
abi_accmode=unknown
|
||||||
abi_arc4random=unknown
|
abi_arc4random=unknown
|
||||||
abi_arc4random_stir=unknown
|
abi_arc4random_stir=unknown
|
||||||
@@ -86,6 +88,8 @@ abi_wcsl=unknown
|
|||||||
|
|
||||||
AS_CASE([$host_os],
|
AS_CASE([$host_os],
|
||||||
[*-gnu* | gnu*], [
|
[*-gnu* | gnu*], [
|
||||||
|
api_time_macros=no
|
||||||
|
|
||||||
abi_accmode=yes
|
abi_accmode=yes
|
||||||
# DROP: On glibc >= 2.36.
|
# DROP: On glibc >= 2.36.
|
||||||
#abi_arc4random=no
|
#abi_arc4random=no
|
||||||
@@ -145,6 +149,8 @@ AS_CASE([$host_os],
|
|||||||
abi_wcsl=yes
|
abi_wcsl=yes
|
||||||
],
|
],
|
||||||
[*-musl*], [
|
[*-musl*], [
|
||||||
|
api_time_macros=no
|
||||||
|
|
||||||
abi_accmode=yes
|
abi_accmode=yes
|
||||||
abi_arc4random=yes
|
abi_arc4random=yes
|
||||||
abi_arc4random_stir=yes
|
abi_arc4random_stir=yes
|
||||||
@@ -209,6 +215,8 @@ AS_CASE([$host_os],
|
|||||||
abi_wcsl=yes
|
abi_wcsl=yes
|
||||||
],
|
],
|
||||||
[darwin*], [
|
[darwin*], [
|
||||||
|
api_time_macros=no
|
||||||
|
|
||||||
abi_accmode=no
|
abi_accmode=no
|
||||||
abi_arc4random=no
|
abi_arc4random=no
|
||||||
abi_arc4random_stir=no
|
abi_arc4random_stir=no
|
||||||
@@ -255,6 +263,8 @@ AS_CASE([$host_os],
|
|||||||
abi_wcsl=no
|
abi_wcsl=no
|
||||||
],
|
],
|
||||||
[solaris2*], [
|
[solaris2*], [
|
||||||
|
api_time_macros=yes
|
||||||
|
|
||||||
abi_accmode=yes
|
abi_accmode=yes
|
||||||
abi_arc4random=no
|
abi_arc4random=no
|
||||||
abi_arc4random_stir=no
|
abi_arc4random_stir=no
|
||||||
@@ -301,6 +311,8 @@ AS_CASE([$host_os],
|
|||||||
abi_wcsl=yes
|
abi_wcsl=yes
|
||||||
],
|
],
|
||||||
[aix*], [
|
[aix*], [
|
||||||
|
api_time_macros=yes
|
||||||
|
|
||||||
abi_accmode=yes
|
abi_accmode=yes
|
||||||
abi_arc4random=yes
|
abi_arc4random=yes
|
||||||
abi_arc4random_stir=yes
|
abi_arc4random_stir=yes
|
||||||
@@ -545,6 +557,9 @@ AC_CHECK_FUNCS([\
|
|||||||
|
|
||||||
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xyes"])
|
AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xyes"])
|
||||||
|
|
||||||
|
# API selection
|
||||||
|
LIBBSD_SELECT_API([time_macros], [time struct conversion macros])
|
||||||
|
|
||||||
# ABI selection
|
# ABI selection
|
||||||
LIBBSD_SELECT_ABI([accmode], [setmode()/getmode()])
|
LIBBSD_SELECT_ABI([accmode], [setmode()/getmode()])
|
||||||
LIBBSD_SELECT_ABI([arc4random], [arc4random() API])
|
LIBBSD_SELECT_ABI([arc4random], [arc4random() API])
|
||||||
|
@@ -71,6 +71,22 @@ int main() { return rc; }
|
|||||||
[test "$libbsd_cv_gnu_init_array_support" = yes])
|
[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)
|
# LIBBSD_SELECT_ABI(name, desc)
|
||||||
# -----------------
|
# -----------------
|
||||||
AC_DEFUN([LIBBSD_SELECT_ABI], [
|
AC_DEFUN([LIBBSD_SELECT_ABI], [
|
||||||
|
@@ -141,8 +141,6 @@ dist_man_MANS = \
|
|||||||
TAILQ_PREV.3bsd \
|
TAILQ_PREV.3bsd \
|
||||||
TAILQ_REMOVE.3bsd \
|
TAILQ_REMOVE.3bsd \
|
||||||
TAILQ_SWAP.3bsd \
|
TAILQ_SWAP.3bsd \
|
||||||
TIMESPEC_TO_TIMEVAL.3bsd \
|
|
||||||
TIMEVAL_TO_TIMESPEC.3bsd \
|
|
||||||
be16dec.3bsd \
|
be16dec.3bsd \
|
||||||
be16enc.3bsd \
|
be16enc.3bsd \
|
||||||
be32dec.3bsd \
|
be32dec.3bsd \
|
||||||
@@ -182,6 +180,13 @@ dist_man_MANS = \
|
|||||||
tree.3bsd \
|
tree.3bsd \
|
||||||
# EOL
|
# EOL
|
||||||
|
|
||||||
|
if API_TIME_MACROS
|
||||||
|
dist_man_MANS += \
|
||||||
|
TIMESPEC_TO_TIMEVAL.3bsd \
|
||||||
|
TIMEVAL_TO_TIMESPEC.3bsd \
|
||||||
|
# EOL
|
||||||
|
endif
|
||||||
|
|
||||||
if ABI_ACCMODE
|
if ABI_ACCMODE
|
||||||
dist_man_MANS += \
|
dist_man_MANS += \
|
||||||
getmode.3bsd \
|
getmode.3bsd \
|
||||||
|
Reference in New Issue
Block a user