check for sys/errno.h
[heimdal.git] / cf / roken-frag.m4
blob0001b9211bb04812215be243da182b957f5a1d7f
1 dnl $Id$
2 dnl
3 dnl some code to get roken working
4 dnl
5 dnl rk_ROKEN(subdir)
6 dnl
7 AC_DEFUN([rk_ROKEN], [
9 AC_REQUIRE([rk_CONFIG_HEADER])
11 DIR_roken=roken
12 LIB_roken='$(top_builddir)/$1/libroken.la'
13 INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1'
15 dnl Checks for programs
16 AC_REQUIRE([AC_PROG_CC])
17 AC_REQUIRE([AC_PROG_AWK])
18 AC_REQUIRE([AC_OBJEXT])
19 AC_REQUIRE([AC_EXEEXT])
20 AC_REQUIRE([AC_PROG_LIBTOOL])
22 AC_REQUIRE([AC_MIPS_ABI])
24 AC_DEFINE(rk_PATH_DELIM, '/', [Path name delimiter])
26 dnl C characteristics
28 AC_REQUIRE([AC_C___ATTRIBUTE__])
29 AC_REQUIRE([AC_C_INLINE])
30 AC_REQUIRE([AC_C_CONST])
31 rk_WFLAGS(-Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -Wshadow)
33 dnl -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes
34 dnl -Wcast-qual -Wswitch -Wformat=2 -Wwrite-strings
36 AC_REQUIRE([rk_DB])
38 dnl C types
40 AC_REQUIRE([AC_TYPE_SIZE_T])
41 AC_HAVE_TYPE([ssize_t],[#include <unistd.h>])
42 AC_REQUIRE([AC_TYPE_PID_T])
43 AC_REQUIRE([AC_TYPE_UID_T])
44 AC_HAVE_TYPE([long long])
46 AC_REQUIRE([rk_RETSIGTYPE])
48 dnl Checks for header files.
49 AC_REQUIRE([AC_HEADER_STDC])
50 AC_REQUIRE([AC_HEADER_TIME])
52 AC_CHECK_HEADERS([\
53         arpa/inet.h                             \
54         config.h                                \
55         crypt.h                                 \
56         dirent.h                                \
57         errno.h                                 \
58         err.h                                   \
59         fcntl.h                                 \
60         fnmatch.h                               \
61         grp.h                                   \
62         ifaddrs.h                               \
63         netinet/in.h                            \
64         netinet/in6.h                           \
65         netinet/in_systm.h                      \
66         netinet6/in6.h                          \
67         paths.h                                 \
68         poll.h                                  \
69         pwd.h                                   \
70         rpcsvc/ypclnt.h                         \
71         search.h                                \
72         shadow.h                                \
73         stdint.h                                \
74         sys/bswap.h                             \
75         sys/errno.h                             \
76         sys/ioctl.h                             \
77         sys/mman.h                              \
78         sys/param.h                             \
79         sys/resource.h                          \
80         sys/sockio.h                            \
81         sys/stat.h                              \
82         sys/time.h                              \
83         sys/tty.h                               \
84         sys/types.h                             \
85         sys/uio.h                               \
86         sys/utsname.h                           \
87         sys/wait.h                              \
88         syslog.h                                \
89         termios.h                               \
90         winsock2.h                              \
91         ws2tcpip.h                              \
92         unistd.h                                \
93         userconf.h                              \
94         usersec.h                               \
95         util.h                                  \
98 AC_HAVE_TYPE([uintptr_t],[#ifdef HAVE_STDINT_H
99 #include <stdint.h>
100 #endif])
102 dnl Sunpro 5.2 has a vis.h which is something different.
103 AC_CHECK_HEADERS(vis.h, , , [
104 #include <vis.h>
105 #ifndef VIS_SP
106 #error invis
107 #endif])
108         
109 AC_CHECK_HEADERS(netdb.h, , , [AC_INCLUDES_DEFAULT
110 #ifdef HAVE_SYS_TYPES_H
111 #include <sys/types.h>
112 #endif
115 AC_CHECK_HEADERS(sys/socket.h, , , [AC_INCLUDES_DEFAULT
116 #ifdef HAVE_SYS_TYPES_H
117 #include <sys/types.h>
118 #endif
121 AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
122 #ifdef HAVE_SYS_TYPES_H
123 #include <sys/types.h>
124 #endif
125 #if HAVE_SYS_SOCKET_H
126 #include <sys/socket.h>
127 #endif])
129 AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT
130 #ifdef HAVE_SYS_TYPES_H
131 #include <sys/types.h>
132 #endif
133 #if HAVE_SYS_SOCKET_H
134 #include <sys/socket.h>
135 #endif
136 #ifdef HAVE_NETINET6_IN6_H
137 #include <netinet6/in6.h>
138 #endif
141 AC_CHECK_HEADERS(sys/sysctl.h, , , [AC_INCLUDES_DEFAULT
142 #ifdef HAVE_SYS_PARAM_H
143 #include <sys/param.h>
144 #endif
147 AC_CHECK_HEADERS(sys/proc.h, , , [AC_INCLUDES_DEFAULT
148 #ifdef HAVE_SYS_PARAM_H
149 #include <sys/param.h>
150 #endif
153 AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
155 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
156 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
157 AM_CONDITIONAL(have_search_h, test "$ac_cv_header_search_h" = yes)
158 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
160 dnl Check for functions and libraries
162 AC_FIND_FUNC(socket, socket)
163 AC_FIND_FUNC(gethostbyname, nsl)
164 AC_FIND_FUNC(syslog, syslog)
166 AC_KRB_IPV6
168 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
170 rk_RESOLV
172 AC_BROKEN_SNPRINTF
173 AC_BROKEN_VSNPRINTF
175 AC_BROKEN_GLOB
176 if test "$ac_cv_func_glob_working" != yes; then
177         AC_LIBOBJ(glob)
179 AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes)
182 AC_CHECK_FUNCS([                                \
183         asnprintf                               \
184         asprintf                                \
185         atexit                                  \
186         cgetent                                 \
187         getconfattr                             \
188         getprogname                             \
189         getrlimit                               \
190         getspnam                                \
191         issetugid                               \
192         on_exit                                 \
193         poll                                    \
194         random                                  \
195         setprogname                             \
196         strsvis                                 \
197         strsvisx                                \
198         strunvis                                \
199         strvis                                  \
200         strvisx                                 \
201         svis                                    \
202         sysconf                                 \
203         sysctl                                  \
204         tdelete                                 \
205         tfind                                   \
206         twalk                                   \
207         uname                                   \
208         unvis                                   \
209         vasnprintf                              \
210         vasprintf                               \
211         vis                                     \
214 if test "$ac_cv_func_cgetent" = no; then
215         AC_LIBOBJ(getcap)
217 AM_CONDITIONAL(have_cgetent, test "$ac_cv_func_cgetent" = yes)
219 AC_REQUIRE([AC_FUNC_GETLOGIN])
221 AC_REQUIRE([AC_FUNC_MMAP])
223 AC_FIND_FUNC_NO_LIBS(getsockopt,,
224 [#ifdef HAVE_SYS_TYPES_H
225 #include <sys/types.h>
226 #endif
227 #ifdef HAVE_SYS_SOCKET_H
228 #include <sys/socket.h>
229 #endif],
230 [0,0,0,0,0])
231 AC_FIND_FUNC_NO_LIBS(setsockopt,,
232 [#ifdef HAVE_SYS_TYPES_H
233 #include <sys/types.h>
234 #endif
235 #ifdef HAVE_SYS_SOCKET_H
236 #include <sys/socket.h>
237 #endif],
238 [0,0,0,0,0])
240 AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
241 [#ifdef HAVE_NETDB_H
242 #include <netdb.h>
243 #endif],
245 AC_NEED_PROTO([
246 #ifdef HAVE_NETDB_H
247 #include <netdb.h>
248 #endif],
249 hstrerror)
251 AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
252         [AC_NEED_PROTO([
253         #include <stdio.h>
254         #include <string.h>],
255         rk_func)])
257 AC_FIND_FUNC_NO_LIBS(bswap16,,
258 [#ifdef HAVE_SYS_TYPES_H
259 #include <sys/types.h>
260 #endif
261 #ifdef HAVE_SYS_BSWAP_H
262 #include <sys/bswap.h>
263 #endif],0)
265 AC_FIND_FUNC_NO_LIBS(bswap32,,
266 [#ifdef HAVE_SYS_TYPES_H
267 #include <sys/types.h>
268 #endif
269 #ifdef HAVE_SYS_BSWAP_H
270 #include <sys/bswap.h>
271 #endif],0)
273 AC_FIND_FUNC_NO_LIBS(pidfile,util,
274 [#ifdef HAVE_UTIL_H
275 #include <util.h>
276 #endif],0)
278 AC_FIND_IF_NOT_BROKEN(getaddrinfo,,
279 [#ifdef HAVE_NETDB_H
280 #include <netdb.h>
281 #endif
282 #ifdef HAVE_WS2TCPIP_H
283 #include <ws2tcpip.h>
284 #endif],[0,0,0,0])
286 AC_FIND_IF_NOT_BROKEN(getnameinfo,,
287 [#ifdef HAVE_NETDB_H
288 #include <netdb.h>
289 #endif
290 #ifdef HAVE_WS2TCPIP_H
291 #include <ws2tcpip.h>
292 #endif],[0,0,0,0,0,0,0])
294 AC_FIND_IF_NOT_BROKEN(freeaddrinfo,,
295 [#ifdef HAVE_NETDB_H
296 #include <netdb.h>
297 #endif
298 #ifdef HAVE_WS2TCPIP_H
299 #include <ws2tcpip.h>
300 #endif],[0])
302 AC_FIND_IF_NOT_BROKEN(gai_strerror,,
303 [#ifdef HAVE_NETDB_H
304 #include <netdb.h>
305 #endif
306 #ifdef HAVE_WS2TCPIP_H
307 #include <ws2tcpip.h>
308 #endif],[0])
310 dnl Darwin is weird, and in some senses not unix, launchd doesn't want
311 dnl servers to use daemon(), so its deprecated.
312 case "$host_os" in
313         darwin*)
314                 ;;
315         *)
316                 AC_DEFINE([SUPPORT_DETACH], 1,
317                     [Define if os support want to detach is daemonens.])
318                 AC_BROKEN([daemon]) ;;
319 esac
321 AC_BROKEN([                                     \
322         chown                                   \
323         copyhostent                             \
324         closefrom                               \
325         ecalloc                                 \
326         emalloc                                 \
327         erealloc                                \
328         estrdup                                 \
329         err                                     \
330         errx                                    \
331         fchown                                  \
332         flock                                   \
333         fnmatch                                 \
334         freehostent                             \
335         getcwd                                  \
336         getdtablesize                           \
337         getegid                                 \
338         geteuid                                 \
339         getgid                                  \
340         gethostname                             \
341         getifaddrs                              \
342         getipnodebyaddr                         \
343         getipnodebyname                         \
344         getopt                                  \
345         gettimeofday                            \
346         getuid                                  \
347         getusershell                            \
348         initgroups                              \
349         innetgr                                 \
350         iruserok                                \
351         localtime_r                             \
352         lstat                                   \
353         memmove                                 \
354         mkstemp                                 \
355         putenv                                  \
356         rcmd                                    \
357         readv                                   \
358         recvmsg                                 \
359         sendmsg                                 \
360         setegid                                 \
361         setenv                                  \
362         seteuid                                 \
363         strcasecmp                              \
364         strdup                                  \
365         strerror                                \
366         strftime                                \
367         strlcat                                 \
368         strlcpy                                 \
369         strlwr                                  \
370         strncasecmp                             \
371         strndup                                 \
372         strnlen                                 \
373         strptime                                \
374         strsep                                  \
375         strsep_copy                             \
376         strtok_r                                \
377         strtoll                                 \
378         strtoull                                \
379         strupr                                  \
380         swab                                    \
381         tsearch                                 \
382         timegm                                  \
383         unsetenv                                \
384         verr                                    \
385         verrx                                   \
386         vsyslog                                 \
387         vwarn                                   \
388         vwarnx                                  \
389         warn                                    \
390         warnx                                   \
391         writev                                  \
394 AM_CONDITIONAL(have_fnmatch_h,
395         test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes)
397 AC_FOREACH([rk_func], [strndup strsep strtok_r],
398         [AC_NEED_PROTO([#include <string.h>], rk_func)])
400 AC_CHECK_FUNC([strtoll],
401     [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1,
402         [Define if you have the function strtoll.])])
404 AC_CHECK_FUNC([strtoull],
405     [AC_DEFINE_UNQUOTED(HAVE_STRTOULL, 1,
406         [Define if you have the function strtoull.])])
408 AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
409 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
410 #include <vis.h>
411 #endif], rk_func)])
413 AC_MSG_CHECKING([checking for dirfd])
414 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
415 #ifdef HAVE_DIRENT_H
416 #include <dirent.h>
417 #endif
419         [[DIR *d = 0; dirfd(d);]])],
420         [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
421 if test "$ac_rk_have_dirfd" = "yes" ; then
422         AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
424 AC_MSG_RESULT($ac_rk_have_dirfd)
426 AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
427 #ifdef HAVE_DIRENT_H
428 #include <dirent.h>
429 #endif])
432 AC_BROKEN2(inet_aton,
433 [#ifdef HAVE_SYS_TYPES_H
434 #include <sys/types.h>
435 #endif
436 #ifdef HAVE_SYS_SOCKET_H
437 #include <sys/socket.h>
438 #endif
439 #ifdef HAVE_NETINET_IN_H
440 #include <netinet/in.h>
441 #endif
442 #ifdef HAVE_ARPA_INET_H
443 #include <arpa/inet.h>
444 #endif],
445 [0,0])
447 AC_BROKEN2(inet_ntop,
448 [#ifdef HAVE_SYS_TYPES_H
449 #include <sys/types.h>
450 #endif
451 #ifdef HAVE_SYS_SOCKET_H
452 #include <sys/socket.h>
453 #endif
454 #ifdef HAVE_NETINET_IN_H
455 #include <netinet/in.h>
456 #endif
457 #ifdef HAVE_ARPA_INET_H
458 #include <arpa/inet.h>
459 #endif],
460 [0, 0, 0, 0])
462 AC_BROKEN2(inet_pton,
463 [#ifdef HAVE_SYS_TYPES_H
464 #include <sys/types.h>
465 #endif
466 #ifdef HAVE_SYS_SOCKET_H
467 #include <sys/socket.h>
468 #endif
469 #ifdef HAVE_NETINET_IN_H
470 #include <netinet/in.h>
471 #endif
472 #ifdef HAVE_ARPA_INET_H
473 #include <arpa/inet.h>
474 #endif],
475 [0,0,0])
478 dnl Check for sa_len in struct sockaddr, 
479 dnl needs to come before the getnameinfo test
481 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
482 #include <sys/socket.h>])
484 if test "$ac_cv_func_getaddrinfo" = "yes"; then
485   rk_BROKEN_GETADDRINFO
486   if test "$ac_cv_func_getaddrinfo_numserv" = no; then
487         AC_LIBOBJ(getaddrinfo)
488         AC_LIBOBJ(freeaddrinfo)
489   fi
492 AC_NEED_PROTO([#include <stdlib.h>], setenv)
493 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
494 AC_NEED_PROTO([#include <unistd.h>], gethostname)
495 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
496 AC_NEED_PROTO([#include <unistd.h>], getusershell)
497 AC_NEED_PROTO([#include <unistd.h>], daemon)
498 AC_NEED_PROTO([
499 #ifdef HAVE_SYS_TYPES_H
500 #include <sys/types.h>
501 #endif
502 #ifdef HAVE_SYS_SOCKET_H
503 #include <sys/socket.h>
504 #endif
505 #ifdef HAVE_NETINET_IN_H
506 #include <netinet/in.h>
507 #endif
508 #ifdef HAVE_ARPA_INET_H
509 #include <arpa/inet.h>
510 #endif
511 #ifdef HAVE_NETDB_H
512 #include <netdb.h>
513 #endif
514 #ifdef HAVE_UNISTD_H
515 #include <unistd.h>
516 #endif],
517 iruserok)
519 AC_NEED_PROTO([
520 #ifdef HAVE_SYS_TYPES_H
521 #include <sys/types.h>
522 #endif
523 #ifdef HAVE_SYS_SOCKET_H
524 #include <sys/socket.h>
525 #endif
526 #ifdef HAVE_NETINET_IN_H
527 #include <netinet/in.h>
528 #endif
529 #ifdef HAVE_ARPA_INET_H
530 #include <arpa/inet.h>
531 #endif],
532 inet_aton)
534 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
536 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
538 dnl AC_KRB_FUNC_GETCWD_BROKEN
540 dnl strerror_r is great fun, on linux it exists before sus catched up,
541 dnl so the return type is diffrent, lets check for both
543 AC_PROTO_COMPAT([
544 #include <stdio.h>
545 #include <string.h>
547 strerror_r, int strerror_r(int, char *, size_t))
549 AC_CHECK_FUNC([strerror_r],
550     [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1,
551         [Define if you have the function strerror_r.])])
554 dnl Checks for prototypes and declarations
557 AC_PROTO_COMPAT([
558 #ifdef HAVE_SYS_TYPES_H
559 #include <sys/types.h>
560 #endif
561 #ifdef HAVE_SYS_SOCKET_H
562 #include <sys/socket.h>
563 #endif
564 #ifdef HAVE_NETINET_IN_H
565 #include <netinet/in.h>
566 #endif
567 #ifdef HAVE_ARPA_INET_H
568 #include <arpa/inet.h>
569 #endif
570 #ifdef HAVE_NETDB_H
571 #include <netdb.h>
572 #endif
574 gethostbyname, struct hostent *gethostbyname(const char *))
576 AC_PROTO_COMPAT([
577 #ifdef HAVE_SYS_TYPES_H
578 #include <sys/types.h>
579 #endif
580 #ifdef HAVE_SYS_SOCKET_H
581 #include <sys/socket.h>
582 #endif
583 #ifdef HAVE_NETINET_IN_H
584 #include <netinet/in.h>
585 #endif
586 #ifdef HAVE_ARPA_INET_H
587 #include <arpa/inet.h>
588 #endif
589 #ifdef HAVE_NETDB_H
590 #include <netdb.h>
591 #endif
593 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
595 AC_PROTO_COMPAT([
596 #ifdef HAVE_SYS_TYPES_H
597 #include <sys/types.h>
598 #endif
599 #ifdef HAVE_SYS_SOCKET_H
600 #include <sys/socket.h>
601 #endif
602 #ifdef HAVE_NETINET_IN_H
603 #include <netinet/in.h>
604 #endif
605 #ifdef HAVE_ARPA_INET_H
606 #include <arpa/inet.h>
607 #endif
608 #ifdef HAVE_NETDB_H
609 #include <netdb.h>
610 #endif
612 getservbyname, struct servent *getservbyname(const char *, const char *))
614 AC_PROTO_COMPAT([
615 #ifdef HAVE_SYS_TYPES_H
616 #include <sys/types.h>
617 #endif
618 #ifdef HAVE_SYS_SOCKET_H
619 #include <sys/socket.h>
620 #endif
622 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
624 AC_PROTO_COMPAT([
625 #ifdef HAVE_SYSLOG_H
626 #include <syslog.h>
627 #endif
629 openlog, void openlog(const char *, int, int))
631 AC_NEED_PROTO([
632 #ifdef HAVE_CRYPT_H
633 #include <crypt.h>
634 #endif
635 #ifdef HAVE_UNISTD_H
636 #include <unistd.h>
637 #endif
639 crypt)
641 dnl variables
643 rk_CHECK_VAR(h_errno, 
644 [#ifdef HAVE_SYS_TYPES_H
645 #include <sys/types.h>
646 #endif
647 #ifdef HAVE_NETDB_H
648 #include <netdb.h>
649 #endif
650 #ifdef HAVE_WS2TCPIP_H
651 #include <ws2tcpip.h>
652 #endif
655 rk_CHECK_VAR(h_errlist, 
656 [#ifdef HAVE_NETDB_H
657 #include <netdb.h>
658 #endif
659 #ifdef HAVE_WS2TCPIP_H
660 #include <ws2tcpip.h>
661 #endif])
663 rk_CHECK_VAR(h_nerr, 
664 [#ifdef HAVE_NETDB_H
665 #include <netdb.h>
666 #endif
667 #ifdef HAVE_WS2TCPIP_H
668 #include <ws2tcpip.h>
669 #endif])
671 rk_CHECK_VAR([__progname], 
672 [#ifdef HAVE_ERR_H
673 #include <err.h>
674 #endif])
676 AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[
677 #include <stdlib.h>
678 #ifdef HAVE_UNISTD_H
679 #include <unistd.h>
680 #endif])
683 dnl Check for fields in struct tm
686 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
687 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
690 dnl or do we have a variable `timezone' ?
693 rk_CHECK_VAR(timezone,[#include <time.h>])
694 rk_CHECK_VAR(altzone,[#include <time.h>])
696 AC_HAVE_TYPE([sa_family_t],[
697 #include <sys/types.h>
698 #ifdef HAVE_SYS_SOCKET_H
699 #include <sys/socket.h>
700 #endif
701 #ifdef HAVE_WS2TCPIP_H
702 #include <ws2tcpip.h>
703 #endif])
704 AC_HAVE_TYPE([socklen_t],[
705 #include <sys/types.h>
706 #ifdef HAVE_SYS_SOCKET_H
707 #include <sys/socket.h>
708 #endif
709 #ifdef HAVE_WS2TCPIP_H
710 #include <ws2tcpip.h>
711 #endif])
712 AC_HAVE_TYPE([struct sockaddr], [
713 #include <sys/types.h>
714 #ifdef HAVE_SYS_SOCKET_H
715 #include <sys/socket.h>
716 #endif
717 #ifdef HAVE_WS2TCPIP_H
718 #include <ws2tcpip.h>
719 #endif])
720 AC_HAVE_TYPE([struct sockaddr_storage], [
721 #include <sys/types.h>
722 #ifdef HAVE_SYS_SOCKET_H
723 #include <sys/socket.h>
724 #endif
725 #ifdef HAVE_WS2TCPIP_H
726 #include <ws2tcpip.h>
727 #endif])
728 AC_HAVE_TYPE([struct addrinfo], [
729 #include <sys/types.h>
730 #ifdef HAVE_NETDB_H
731 #include <netdb.h>
732 #endif
733 #ifdef HAVE_WS2TCPIP_H
734 #include <ws2tcpip.h>
735 #endif])
736 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
737 AC_HAVE_TYPE([struct iovec],[
738 #include <sys/types.h>
739 #include <sys/uio.h>
741 AC_HAVE_TYPE([struct msghdr],[
742 #include <sys/types.h>
743 #ifdef HAVE_SYS_SOCKET_H
744 #include <sys/socket.h>
745 #endif
746 #ifdef HAVE_WS2TCPIP_H
747 #include <ws2tcpip.h>
748 #endif])
751 dnl Check for struct winsize
754 AC_KRB_STRUCT_WINSIZE
757 dnl Check for struct spwd
760 AC_KRB_STRUCT_SPWD
763 # Check if we want samba's socket wrapper
766 samba_SOCKET_WRAPPER
768 dnl won't work with automake
769 dnl moved to AC_OUTPUT in configure.in
770 dnl AC_CONFIG_FILES($1/Makefile)
772 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
774 AC_SUBST(DIR_roken)dnl
775 AC_SUBST(LIB_roken)dnl
776 AC_SUBST(INCLUDES_roken)dnl