Blame m4/arpa_inet_h.m4

Packit Service 4684c1
# arpa_inet_h.m4 serial 14
Packit Service 4684c1
dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
Packit Service 4684c1
dnl This file is free software; the Free Software Foundation
Packit Service 4684c1
dnl gives unlimited permission to copy and/or distribute it,
Packit Service 4684c1
dnl with or without modifications, as long as this notice is preserved.
Packit Service 4684c1
Packit Service 4684c1
dnl Written by Simon Josefsson and Bruno Haible
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_HEADER_ARPA_INET],
Packit Service 4684c1
[
Packit Service 4684c1
  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
Packit Service 4684c1
  dnl once only, before all statements that occur in other macros.
Packit Service 4684c1
  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
Packit Service 4684c1
Packit Service 4684c1
  AC_CHECK_HEADERS_ONCE([arpa/inet.h])
Packit Service 4684c1
  if test $ac_cv_header_arpa_inet_h = yes; then
Packit Service 4684c1
    HAVE_ARPA_INET_H=1
Packit Service 4684c1
  else
Packit Service 4684c1
    HAVE_ARPA_INET_H=0
Packit Service 4684c1
  fi
Packit Service 4684c1
  AC_SUBST([HAVE_ARPA_INET_H])
Packit Service 4684c1
  dnl <arpa/inet.h> is always overridden, because of GNULIB_POSIXCHECK.
Packit Service 4684c1
  gl_CHECK_NEXT_HEADERS([arpa/inet.h])
Packit Service 4684c1
Packit Service 4684c1
  AC_REQUIRE([gl_FEATURES_H])
Packit Service 4684c1
Packit Service 4684c1
  gl_PREREQ_SYS_H_WS2TCPIP
Packit Service 4684c1
Packit Service 4684c1
  dnl Check for declarations of anything we want to poison if the
Packit Service 4684c1
  dnl corresponding gnulib module is not in use.
Packit Service 4684c1
  gl_WARN_ON_USE_PREPARE([[
Packit Service 4684c1
/* On some systems, this header is not self-consistent.  */
Packit Service 4684c1
#if !(defined __GLIBC__ || defined __UCLIBC__)
Packit Service 4684c1
# include <sys/socket.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
#ifdef __TANDEM
Packit Service 4684c1
# include <netdb.h>
Packit Service 4684c1
#endif
Packit Service 4684c1
#include <arpa/inet.h>
Packit Service 4684c1
    ]], [inet_ntop inet_pton])
Packit Service 4684c1
])
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
Packit Service 4684c1
[
Packit Service 4684c1
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
Packit Service 4684c1
  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
Packit Service 4684c1
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
Packit Service 4684c1
])
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
Packit Service 4684c1
[
Packit Service 4684c1
  GNULIB_INET_NTOP=0;     AC_SUBST([GNULIB_INET_NTOP])
Packit Service 4684c1
  GNULIB_INET_PTON=0;     AC_SUBST([GNULIB_INET_PTON])
Packit Service 4684c1
  dnl Assume proper GNU behavior unless another module says otherwise.
Packit Service 4684c1
  HAVE_DECL_INET_NTOP=1;  AC_SUBST([HAVE_DECL_INET_NTOP])
Packit Service 4684c1
  HAVE_DECL_INET_PTON=1;  AC_SUBST([HAVE_DECL_INET_PTON])
Packit Service 4684c1
  REPLACE_INET_NTOP=0;    AC_SUBST([REPLACE_INET_NTOP])
Packit Service 4684c1
  REPLACE_INET_PTON=0;    AC_SUBST([REPLACE_INET_PTON])
Packit Service 4684c1
])