add b64_ntop checking and fallback for nc(1)
This commit is contained in:
@@ -2,7 +2,8 @@ AC_DEFUN([CHECK_LIBC_COMPAT], [
|
||||
# Check for libc headers
|
||||
AC_CHECK_HEADERS([err.h readpassphrase.h])
|
||||
# Check for general libc functions
|
||||
AC_CHECK_FUNCS([accept4 asprintf inet_pton memmem poll readpassphrase reallocarray])
|
||||
AC_CHECK_FUNCS([accept4 asprintf inet_pton memmem poll])
|
||||
AC_CHECK_FUNCS([readpassphrase reallocarray])
|
||||
AC_CHECK_FUNCS([strlcat strlcpy strndup strnlen strsep strtonum])
|
||||
AM_CONDITIONAL([HAVE_ACCEPT4], [test "x$ac_cv_func_accept4" = xyes])
|
||||
AM_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])
|
||||
AM_CONDITIONAL([HAVE_STRTONUM], [test "x$ac_cv_func_strtonum" = xyes])
|
||||
])
|
||||
|
||||
AC_DEFUN([CHECK_B64_NTOP], [
|
||||
AC_SEARCH_LIBS([b64_ntop],[resolv])
|
||||
AC_SEARCH_LIBS([__b64_ntop],[resolv])
|
||||
AC_CACHE_CHECK([for b64_ntop], ac_cv_have_b64_ntop_arg, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <resolv.h>
|
||||
]], [[ b64_ntop(NULL, 0, NULL, 0); ]])],
|
||||
[ ac_cv_have_b64_ntop_arg="yes" ],
|
||||
[ ac_cv_have_b64_ntop_arg="no"
|
||||
])
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_B64_NTOP], [test "x$ac_cv_func_b64_ntop" = xyes])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([CHECK_LIBC_CRYPTO_COMPAT], [
|
||||
# Check crypto-related libc functions
|
||||
AC_CHECK_FUNCS([arc4random_buf explicit_bzero getauxval getentropy])
|
||||
|
@@ -17,7 +17,6 @@ case $host_os in
|
||||
BUILD_NC=yes
|
||||
HOST_OS=darwin
|
||||
HOST_ABI=macosx
|
||||
AC_SUBST([PROG_LDADD], ['-lresolv'])
|
||||
;;
|
||||
*freebsd*)
|
||||
HOST_OS=freebsd
|
||||
@@ -39,7 +38,6 @@ case $host_os in
|
||||
HOST_OS=linux
|
||||
HOST_ABI=elf
|
||||
CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE"
|
||||
AC_SUBST([PROG_LDADD], ['-lresolv'])
|
||||
;;
|
||||
*netbsd*)
|
||||
HOST_OS=netbsd
|
||||
|
Reference in New Issue
Block a user