aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/check-libc.m422
-rw-r--r--m4/check-os-options.m42
2 files changed, 21 insertions, 3 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])
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4
index a71e529..6c28ab8 100644
--- a/m4/check-os-options.m4
+++ b/m4/check-os-options.m4
@@ -17,7 +17,6 @@ case $host_os in
17 BUILD_NC=yes 17 BUILD_NC=yes
18 HOST_OS=darwin 18 HOST_OS=darwin
19 HOST_ABI=macosx 19 HOST_ABI=macosx
20 AC_SUBST([PROG_LDADD], ['-lresolv'])
21 ;; 20 ;;
22 *freebsd*) 21 *freebsd*)
23 HOST_OS=freebsd 22 HOST_OS=freebsd
@@ -39,7 +38,6 @@ case $host_os in
39 HOST_OS=linux 38 HOST_OS=linux
40 HOST_ABI=elf 39 HOST_ABI=elf
41 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE" 40 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE"
42 AC_SUBST([PROG_LDADD], ['-lresolv'])
43 ;; 41 ;;
44 *netbsd*) 42 *netbsd*)
45 HOST_OS=netbsd 43 HOST_OS=netbsd