aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-10-07 08:55:05 -0500
committerBrent Cook <bcook@openbsd.org>2015-10-07 08:55:05 -0500
commit442cc6f1b4a5ff25a6301acee58199b65800730d (patch)
tree2280b15c8dd37a98a2a482ec2491859f18a48e8f /m4
parenta615d3c6d31b6e7790fb17d46fecba3e4ebfc986 (diff)
downloadportable-442cc6f1b4a5ff25a6301acee58199b65800730d.tar.gz
portable-442cc6f1b4a5ff25a6301acee58199b65800730d.tar.bz2
portable-442cc6f1b4a5ff25a6301acee58199b65800730d.zip
add tame(2) check
Diffstat (limited to 'm4')
-rw-r--r--m4/check-libc.m417
1 files changed, 10 insertions, 7 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index 63fd893..2e3e820 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -2,14 +2,11 @@ AC_DEFUN([CHECK_LIBC_COMPAT], [
2# Check for libc headers 2# Check for libc headers
3AC_CHECK_HEADERS([err.h readpassphrase.h]) 3AC_CHECK_HEADERS([err.h readpassphrase.h])
4# Check for general libc functions 4# Check for general libc functions
5AC_CHECK_FUNCS([accept4 asprintf inet_pton memmem poll]) 5AC_CHECK_FUNCS([asprintf inet_pton memmem readpassphrase reallocarray])
6AC_CHECK_FUNCS([readpassphrase reallocarray])
7AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) 6AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
8AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes])
9AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) 7AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
10AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes]) 8AM_CONDITIONAL([HAVE_INET_PTON], [test "x$ac_cv_func_inet_pton" = xyes])
11AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes]) 9AM_CONDITIONAL([HAVE_MEMMEM], [test "x$ac_cv_func_memmem" = xyes])
12AM_CONDITIONAL([HAVE_POLL], [test "x$ac_cv_func_poll" = xyes])
13AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes]) 10AM_CONDITIONAL([HAVE_READPASSPHRASE], [test "x$ac_cv_func_readpassphrase" = xyes])
14AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes]) 11AM_CONDITIONAL([HAVE_REALLOCARRAY], [test "x$ac_cv_func_reallocarray" = xyes])
15AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes]) 12AM_CONDITIONAL([HAVE_STRLCAT], [test "x$ac_cv_func_strlcat" = xyes])
@@ -20,6 +17,13 @@ AM_CONDITIONAL([HAVE_STRSEP], [test "x$ac_cv_func_strsep" = xyes])
20AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes]) 17AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
21]) 18])
22 19
20AC_DEFUN([CHECK_SYSCALL_COMPAT], [
21AC_CHECK_FUNCS([accept4 poll tame])
22AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes])
23AM_CONDITIONAL([HAVE_POLL], [test "x$ac_cv_func_poll" = xyes])
24AM_CONDITIONAL([HAVE_TAME], [test "x$ac_cv_func_tame" = xyes])
25])
26
23AC_DEFUN([CHECK_B64_NTOP], [ 27AC_DEFUN([CHECK_B64_NTOP], [
24AC_SEARCH_LIBS([b64_ntop],[resolv]) 28AC_SEARCH_LIBS([b64_ntop],[resolv])
25AC_SEARCH_LIBS([__b64_ntop],[resolv]) 29AC_SEARCH_LIBS([__b64_ntop],[resolv])
@@ -38,9 +42,8 @@ AC_CACHE_CHECK([for b64_ntop], ac_cv_have_b64_ntop_arg, [
38AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes]) 42AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes])
39]) 43])
40 44
41 45AC_DEFUN([CHECK_CRYPTO_COMPAT], [
42AC_DEFUN([CHECK_LIBC_CRYPTO_COMPAT], [ 46# Check crypto-related libc functions and syscalls
43# Check crypto-related libc functions
44AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy]) 47AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy])
45AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp]) 48AC_CHECK_FUNCS([timingsafe_bcmp timingsafe_memcmp])
46AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes]) 49AM_CONDITIONAL([HAVE_ARC4RANDOM_BUF], [test "x$ac_cv_func_arc4random_buf" = xyes])