• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl Copyright (c) 1995, 1996, 1997, 1998
2dnl tising materials mentioning
3dnl dnl features or use of this software display the following acknowledgement:
4dnl dnl ``This product includes software developed by the University of California,
5dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
6dnl dnl the University nor the names of its contributors may be used to endorse
7dnl dnl or promote products derived from this software without specific prior
8dnl dnl written permission.
9dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
10dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
11dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12dnl dnl
13dnl dnl LBL autoconf macros
14dnl dnl
15dnl
16dnl
17dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
18dnl borrowed from LBL libpcap
19AC_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