"Fossies" - the Fresh Open Source Software Archive

Member "zsync-0.6.2/autotools/in6addr.m4" (16 Sep 2010, 3527 Bytes) of package /linux/privat/old/zsync-0.6.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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 in6_addr
   31 dnl * 
   32 AC_DEFUN([X_STRUCT_IN6_ADDR],
   33 [AC_CACHE_CHECK(for struct in6_addr, ac_cv_struct_in6_addr,
   34 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   35 #include <sys/types.h>
   36 #include <sys/socket.h>
   37 #include <netinet/in.h>]], [[
   38 struct in6_addr address;
   39 ]])],[ac_cv_struct_in6_addr=yes],[ac_cv_struct_in6_addr=no])])
   40 if test "$ac_cv_struct_in6_addr" = yes; then
   41     AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1,
   42 [Define to 1 if <netinet/in.h> defines `struct in6_addr'])
   43 fi])
   44 
   45 dnl * 
   46 dnl * Check for in6addr_any.
   47 dnl *
   48 AC_DEFUN([X_DECL_IN6ADDR_ANY],
   49 [AC_REQUIRE([AC_STRUCT_IN6_ADDR])
   50 if test $ac_cv_struct_in6_addr = no; then
   51     ac_cv_decl_in6addr_any=no
   52 else
   53     AC_CACHE_CHECK(for in6addr_any declaration in netinet/in.h,
   54     ac_cv_decl_in6addr_any,
   55     [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   56 #include <sys/types.h>
   57 #include <sys/socket.h>
   58 #include <netinet/in.h>]], [[
   59 unsigned char *address;
   60 address = (char *)&in6addr_any;
   61 ]])],[ac_cv_decl_in6addr_any=yes],[ac_cv_decl_in6addr_any=no])])
   62     if test "$ac_cv_decl_in6addr_any" = yes; then
   63         AC_DEFINE(IN6ADDR_ANY_DECLARED, 1,
   64 [Define to 1 if `in6addr_any' is declared by <netinet/in.h>])
   65     fi
   66 fi])
   67 
   68 dnl *
   69 dnl * Check for in6addr_loopback.
   70 dnl *
   71 AC_DEFUN([X_DECL_IN6ADDR_LOOPBACK],
   72 [AC_REQUIRE([AC_STRUCT_IN6_ADDR])
   73 if test $ac_cv_struct_in6_addr = no; then
   74     ac_cv_decl_in6addr_loopback=no
   75 else
   76     AC_CACHE_CHECK(for in6addr_loopback declaration in netinet/in.h,
   77     ac_cv_decl_in6addr_loopback,
   78     [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   79 #include <sys/types.h>
   80 #include <sys/socket.h>
   81 #include <netinet/in.h>]], [[
   82 unsigned char *address;
   83 address = (char *)&in6addr_loopback;
   84 ]])],[ac_cv_decl_in6addr_loopback=yes],[ac_cv_decl_in6addr_loopback=no])])
   85     if test "$ac_cv_decl_in6addr_loopback" = yes; then
   86         AC_DEFINE(IN6ADDR_LOOPBACK_DECLARED, 1,
   87 [Define to 1 if `in6addr_loopback' is declared by <netinet/in.h>])
   88     fi
   89 fi])