mh-format.man5: Restored the warning placeholder.
[mmh] / aclocal.m4
1
2 #
3 # Updated for more modern systems.  Check to see if we need to link against
4 # optional libraries for networking functions.
5 #
6
7 AC_DEFUN([AC_CHECK_NETLIBS],
8 [AC_SEARCH_LIBS([gethostbyname], [nsl], ,
9                 [AC_MSG_ERROR([gethostbyname not found])])
10  AC_SEARCH_LIBS([connect], [socket], , [AC_MSG_ERROR([connect not found])])
11 ])dnl
12
13 dnl ----------------
14 dnl CHECK FOR d_type
15 dnl ----------------
16 dnl
17 dnl From Jim Meyering.
18 dnl
19 dnl Check whether struct dirent has a member named d_type.
20 dnl
21
22 # Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
23 # Foundation, Inc.
24 #
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
28
29 AC_DEFUN([CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
30   [AC_REQUIRE([AC_HEADER_DIRENT])dnl
31    AC_CACHE_CHECK([for d_type member in directory struct],
32                   jm_cv_struct_dirent_d_type,
33      [AC_TRY_LINK(dnl
34        [
35 #include <sys/types.h>
36 #ifdef HAVE_DIRENT_H
37 # include <dirent.h>
38 #else /* not HAVE_DIRENT_H */
39 # define dirent direct
40 # ifdef HAVE_SYS_NDIR_H
41 #  include <sys/ndir.h>
42 # endif /* HAVE_SYS_NDIR_H */
43 # ifdef HAVE_SYS_DIR_H
44 #  include <sys/dir.h>
45 # endif /* HAVE_SYS_DIR_H */
46 # ifdef HAVE_NDIR_H
47 #  include <ndir.h>
48 # endif /* HAVE_NDIR_H */
49 #endif /* HAVE_DIRENT_H */
50        ],
51        [struct dirent dp; dp.d_type = 0;],
52
53        jm_cv_struct_dirent_d_type=yes,
54        jm_cv_struct_dirent_d_type=no)
55      ]
56    )
57    if test $jm_cv_struct_dirent_d_type = yes; then
58      AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1,
59        [Define if there is a member named d_type in the struct describing
60         directory headers.])
61    fi
62   ]
63 )