Blame m4/arpa_inet_h.m4

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