view m4/sockpfaf.m4 @ 14473:acd1454e6a45

New module 'unictype/category-LC'. * lib/unictype.in.h (UC_CATEGORY_MASK_LC): New enumeration value. (UC_CATEGORY_LC): New declaration. (UC_CASED_LETTER): New macro. * lib/gen-uni-tables.c (is_category_LC): New function. (output_categories): Also handle category LC. (UC_CATEGORY_MASK_LC): New enumeration value. (general_category_byname): Also handle category LC. * lib/unictype/categ_LC.c: New file. * lib/unictype/categ_LC.h: New file, automatically generated. * lib/unictype/categ_name.c (uc_general_category_name): Also handle category LC. * lib/unictype/categ_byname.c (uc_general_category_byname): Likewise. * modules/unictype/category-LC: New file. * modules/unictype/category-all (Depends-on): Add unictype/category-LC.
author Bruno Haible <bruno@clisp.org>
date Fri, 25 Mar 2011 20:23:43 +0100
parents 70c46ee1fb5b
children 8250f2777afc
line wrap: on
line source

# sockpfaf.m4 serial 8
dnl Copyright (C) 2004, 2006, 2009-2011 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.

dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...)
dnl and some common address families (AF_INET, AF_INET6, ...).
dnl This test assumes that a system supports an address family if and only if
dnl it supports the corresponding protocol family.

dnl From Bruno Haible.

AC_DEFUN([gl_SOCKET_FAMILIES],
[
  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
  AC_CHECK_HEADERS_ONCE([netinet/in.h])

  AC_MSG_CHECKING([for IPv4 sockets])
  AC_CACHE_VAL([gl_cv_socket_ipv4],
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif]],
[[int x = AF_INET; struct in_addr y; struct sockaddr_in z;
 if (&x && &y && &z) return 0;]])],
       gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
  AC_MSG_RESULT([$gl_cv_socket_ipv4])
  if test $gl_cv_socket_ipv4 = yes; then
    AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
  fi

  AC_MSG_CHECKING([for IPv6 sockets])
  AC_CACHE_VAL([gl_cv_socket_ipv6],
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif]],
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
 if (&x && &y && &z) return 0;]])],
       gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
  AC_MSG_RESULT([$gl_cv_socket_ipv6])
  if test $gl_cv_socket_ipv6 = yes; then
    AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
  fi
])

AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
[
  AC_REQUIRE([gl_HEADER_SYS_SOCKET])
  AC_CHECK_HEADERS_ONCE([sys/un.h])

  AC_MSG_CHECKING([for UNIX domain sockets])
  AC_CACHE_VAL([gl_cv_socket_unix],
    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif]],
[[int x = AF_UNIX; struct sockaddr_un y;
 if (&x && &y) return 0;]])],
       gl_cv_socket_unix=yes, gl_cv_socket_unix=no)])
  AC_MSG_RESULT([$gl_cv_socket_unix])
  if test $gl_cv_socket_unix = yes; then
    AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.])
  fi
])