view m4/inet_ntop.m4 @ 10010:d26ac8a528f7

Enable gnulib's <arpa/inet.h> replacement also when inet_ntop or inet_pton need to be declared.
author Bruno Haible <bruno@clisp.org>
date Tue, 29 Apr 2008 13:37:51 +0200
parents 4d5ba95a0dec
children 8406478f0d13
line wrap: on
line source

# inet_ntop.m4 serial 5
dnl Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.

AC_DEFUN([gl_INET_NTOP],
[
  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
  ARPA_INET_H='arpa/inet.h'

  AC_REPLACE_FUNCS(inet_ntop)
  gl_PREREQ_INET_NTOP
])

# Prerequisites of lib/inet_ntop.c.
AC_DEFUN([gl_PREREQ_INET_NTOP], [
  AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>])
  AC_REQUIRE([gl_SOCKET_FAMILIES])
  AC_REQUIRE([AC_C_RESTRICT])
])