3 # Updated for more modern systems. Check to see if we need to link against
4 # optional libraries for networking functions.
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])])
17 dnl From Jim Meyering.
19 dnl Check whether struct dirent has a member named d_type.
22 # Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
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.
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,
35 #include <sys/types.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
45 # endif /* HAVE_SYS_DIR_H */
48 # endif /* HAVE_NDIR_H */
49 #endif /* HAVE_DIRENT_H */
51 [struct dirent dp; dp.d_type = 0;],
53 jm_cv_struct_dirent_d_type=yes,
54 jm_cv_struct_dirent_d_type=no)
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