1 dnl Macros that test for specific features.
2 dnl This file is part of Autoconf.
3 dnl Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2, or (at your option)
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with this program; if not, write to the Free Software
17 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 dnl As a special exception, the Free Software Foundation gives unlimited
21 dnl permission to copy, distribute and modify the configure scripts that
22 dnl are the output of Autoconf. You need not follow the terms of the GNU
23 dnl General Public License when using or distributing such scripts, even
24 dnl though portions of the text of Autoconf appear in them. The GNU
25 dnl General Public License (GPL) does govern all other use of the material
26 dnl that constitutes the Autoconf program.
28 dnl Certain portions of the Autoconf source text are designed to be copied
29 dnl (in certain cases, depending on the input) into the output of
30 dnl Autoconf. We call these the "data" portions. The rest of the Autoconf
31 dnl source text consists of comments plus executable code that decides which
32 dnl of the data portions to output in any given case. We call these
33 dnl comments and executable code the "non-data" portions. Autoconf never
34 dnl copies any of the non-data portions into its output.
36 dnl This special exception to the GPL applies to versions of Autoconf
37 dnl released by the Free Software Foundation. When you make and
38 dnl distribute a modified version of Autoconf, you may extend this special
39 dnl exception to the GPL to apply to your modified version as well, *unless*
40 dnl your modified version has the potential to copy into its output some
41 dnl of the text that was the non-data portion of the version that you started
42 dnl with. (In other words, unless your change moves or copies text from
43 dnl the non-data portions to the data portions.) If your modification has
44 dnl such potential, you must delete any notice of this special exception
45 dnl to the GPL from your modified version.
47 dnl Written by David MacKenzie, with help from
48 dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
49 dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
51 dnl AC_STRUCT_ST_BLKSIZE extracted from the file in qustion,
52 dnl "acspecific.m4" in GNU Autoconf 2.12, and turned into
53 dnl AC_ETHEREAL_STRUCT_SA_LEN, which checks if "struct sockaddr"
54 dnl has the 4.4BSD "sa_len" member, and defines HAVE_SA_LEN; that's
55 dnl what's in this file.
56 dnl Done by Guy Harris <guy@netapp.com> on 1998-11-14.
58 dnl ### Checks for structure members
61 AC_DEFUN(AC_ETHEREAL_STRUCT_SA_LEN,
62 [AC_CACHE_CHECK([for sa_len in struct sockaddr], ac_cv_ethereal_struct_sa_len,
63 [AC_TRY_COMPILE([#include <sys/types.h>
64 #include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
65 ac_cv_ethereal_struct_sa_len=yes, ac_cv_ethereal_struct_sa_len=no)])
66 if test $ac_cv_ethereal_struct_sa_len = yes; then
67 AC_DEFINE(HAVE_SA_LEN)