aboutsummaryrefslogtreecommitdiff
path: root/m4/check-libc.m4
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2015-10-01 07:40:26 -0500
committerBrent Cook <bcook@openbsd.org>2015-10-01 07:40:26 -0500
commita7f031ba55ac4a69263000357eb7f6d7fb88101a (patch)
tree22683754da45f65561d4ae8465311b8eb0a43ec5 /m4/check-libc.m4
parent497a47c5fcf137b73816ee8e9165ddd12f90fcef (diff)
downloadportable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.tar.gz
portable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.tar.bz2
portable-a7f031ba55ac4a69263000357eb7f6d7fb88101a.zip
add b64_ntop checking and fallback for nc(1)
Diffstat (limited to 'm4/check-libc.m4')
-rw-r--r--m4/check-libc.m422
1 files changed, 21 insertions, 1 deletions
diff --git a/m4/check-libc.m4 b/m4/check-libc.m4
index c189ac9..63fd893 100644
--- a/m4/check-libc.m4
+++ b/m4/check-libc.m4
@@ -2,7 +2,8 @@ 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 readpassphrase reallocarray]) 5AC_CHECK_FUNCS([accept4 asprintf inet_pton memmem poll])
6AC_CHECK_FUNCS([readpassphrase reallocarray])
6AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum]) 7AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
7AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes]) 8AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes])
8AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes]) 9AM_CONDITIONAL([HAVE_ASPRINTF], [test "x$ac_cv_func_asprintf" = xyes])
@@ -19,6 +20,25 @@ AM_CONDITIONAL([HAVE_STRSEP], [test "x$ac_cv_func_strsep" = xyes])
19AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes]) 20AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
20]) 21])
21 22
23AC_DEFUN([CHECK_B64_NTOP], [
24AC_SEARCH_LIBS([b64_ntop],[resolv])
25AC_SEARCH_LIBS([__b64_ntop],[resolv])
26AC_CACHE_CHECK([for b64_ntop], ac_cv_have_b64_ntop_arg, [
27 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
28#include <sys/types.h>
29#include <sys/socket.h>
30#include <netinet/in.h>
31#include <arpa/inet.h>
32#include <resolv.h>
33 ]], [[ b64_ntop(NULL, 0, NULL, 0); ]])],
34 [ ac_cv_have_b64_ntop_arg="yes" ],
35 [ ac_cv_have_b64_ntop_arg="no"
36 ])
37])
38AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes])
39])
40
41
22AC_DEFUN([CHECK_LIBC_CRYPTO_COMPAT], [ 42AC_DEFUN([CHECK_LIBC_CRYPTO_COMPAT], [
23# Check crypto-related libc functions 43# Check crypto-related libc functions
24AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy]) 44AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy])