Home | History | Annotate | Download | only in m4
      1 dnl Copyright (c) 1995, 1996, 1997, 1998
      2 dnl tising materials mentioning
      3 dnl dnl features or use of this software display the following acknowledgement:
      4 dnl dnl ``This product includes software developed by the University of California,
      5 dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
      6 dnl dnl the University nor the names of its contributors may be used to endorse
      7 dnl dnl or promote products derived from this software without specific prior
      8 dnl dnl written permission.
      9 dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
     10 dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
     11 dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     12 dnl dnl
     13 dnl dnl LBL autoconf macros
     14 dnl dnl
     15 dnl
     16 dnl
     17 dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
     18 dnl borrowed from LBL libpcap
     19 AC_DEFUN(AC_CHECK_SA_LEN, [
     20         AC_MSG_CHECKING(if sockaddr struct has sa_len member)
     21         AC_CACHE_VAL($1,
     22         AC_TRY_COMPILE([
     23 #               include <sys/types.h>
     24 #               include <sys/socket.h>],
     25                 [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
     26                 $1=yes,
     27                 $1=no))
     28         AC_MSG_RESULT($$1)
     29                 if test $$1 = yes ; then
     30                         AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[Define if struct sockaddr has the sa_len member])
     31         fi
     32 ])
     33