1 dnl * 2 dnl * Copyright (c) 2001 Motoyuki Kasahara 3 dnl * 4 dnl * Redistribution and use in source and binary forms, with or without 5 dnl * modification, are permitted provided that the following conditions 6 dnl * are met: 7 dnl * 1. Redistributions of source code must retain the above copyright 8 dnl * notice, this list of conditions and the following disclaimer. 9 dnl * 2. Redistributions in binary form must reproduce the above copyright 10 dnl * notice, this list of conditions and the following disclaimer in the 11 dnl * documentation and/or other materials provided with the distribution. 12 dnl * 3. Neither the name of the project nor the names of its contributors 13 dnl * may be used to endorse or promote products derived from this software 14 dnl * without specific prior written permission. 15 dnl * 16 dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 17 dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19 dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE 20 dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26 dnl * THE POSSIBILITY OF SUCH DAMAGE. 27 dnl * 28 29 dnl * 30 dnl * Check for struct sockaddr_in6 31 dnl * 32 AC_DEFUN([AC_STRUCT_SOCKADDR_IN6], 33 [AC_CACHE_CHECK(for struct sockaddr_in6, ac_cv_struct_sockaddr_in6, 34 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 35 #include <sys/types.h> 36 #include <sys/socket.h> 37 #include <netinet/in.h>]], [[ 38 struct sockaddr_in6 address; 39 ]])],[ac_cv_struct_sockaddr_in6=yes],[ac_cv_struct_sockaddr_in6=no])]) 40 if test "$ac_cv_struct_sockaddr_in6" = yes; then 41 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1, 42 [Define to 1 if <netinet/in.h> defines `struct sockaddr_in6']) 43 fi]) 44 45 dnl * 46 dnl * Check for struct sockaddr_storage 47 dnl * 48 AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], 49 [AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_struct_sockaddr_storage, 50 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 51 #include <sys/types.h> 52 #include <sys/socket.h> 53 #include <netinet/in.h>]], [[ 54 struct sockaddr_storage address; 55 ]])],[ac_cv_struct_sockaddr_storage=yes],[ac_cv_struct_sockaddr_storage=no])]) 56 if test "$ac_cv_struct_sockaddr_storage" = yes; then 57 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, 58 [Define to 1 if <netinet/in.h> defines `struct sockaddr_storage']) 59 fi]) 60 61