Blame gettext-tools/m4/hostname.m4
|
Packit Bot |
06c835 |
# hostname.m4 serial 1 (gettext-0.11)
|
|
Packit Bot |
06c835 |
dnl Copyright (C) 2001-2002, 2015 Free Software Foundation, Inc.
|
|
Packit Bot |
06c835 |
dnl This file is free software; the Free Software Foundation
|
|
Packit Bot |
06c835 |
dnl gives unlimited permission to copy and/or distribute it,
|
|
Packit Bot |
06c835 |
dnl with or without modifications, as long as this notice is preserved.
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
# Prerequisites of the hostname.c program.
|
|
Packit Bot |
06c835 |
AC_DEFUN([gt_PREREQ_HOSTNAME],
|
|
Packit Bot |
06c835 |
[
|
|
Packit Bot |
06c835 |
AC_CHECK_HEADERS(arpa/inet.h)
|
|
Packit Bot |
06c835 |
AC_CHECK_FUNCS(gethostname gethostbyname inet_ntop)
|
|
Packit Bot |
06c835 |
|
|
Packit Bot |
06c835 |
AC_MSG_CHECKING([for IPv6 sockets])
|
|
Packit Bot |
06c835 |
AC_CACHE_VAL(gt_cv_socket_ipv6,[
|
|
Packit Bot |
06c835 |
AC_TRY_COMPILE([
|
|
Packit Bot |
06c835 |
#include <sys/types.h>
|
|
Packit Bot |
06c835 |
#include <sys/socket.h>
|
|
Packit Bot |
06c835 |
#include <netinet/in.h>],
|
|
Packit Bot |
06c835 |
[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;],
|
|
Packit Bot |
06c835 |
gt_cv_socket_ipv6=yes, gt_cv_socket_ipv6=no)
|
|
Packit Bot |
06c835 |
])
|
|
Packit Bot |
06c835 |
AC_MSG_RESULT($gt_cv_socket_ipv6)
|
|
Packit Bot |
06c835 |
if test $gt_cv_socket_ipv6 = yes; then
|
|
Packit Bot |
06c835 |
AC_DEFINE(HAVE_IPV6, 1, [Define if <sys/socket.h> defines AF_INET6.])
|
|
Packit Bot |
06c835 |
fi
|
|
Packit Bot |
06c835 |
])
|