Goodbye login
[heimdal.git] / cf / roken-frag.m4
blobf22b43a5dd1c0922c48f01a8a765da8ed49de770
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([LT_INIT])
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/auxv.h                              \
75         sys/bswap.h                             \
76         sys/errno.h                             \
77         sys/ioctl.h                             \
78         sys/mman.h                              \
79         sys/param.h                             \
80         sys/resource.h                          \
81         sys/sockio.h                            \
82         sys/stat.h                              \
83         sys/time.h                              \
84         sys/tty.h                               \
85         sys/types.h                             \
86         sys/uio.h                               \
87         sys/utsname.h                           \
88         sys/wait.h                              \
89         syslog.h                                \
90         termios.h                               \
91         winsock2.h                              \
92         ws2tcpip.h                              \
93         unistd.h                                \
94         userconf.h                              \
95         usersec.h                               \
96         util.h                                  \
99 AC_HAVE_TYPE([uintptr_t],[#ifdef HAVE_STDINT_H
100 #include <stdint.h>
101 #endif])
103 dnl Sunpro 5.2 has a vis.h which is something different.
104 AC_CHECK_HEADERS(vis.h, , , [
105 #include <vis.h>
106 #ifndef VIS_SP
107 #error invis
108 #endif])
109         
110 AC_CHECK_HEADERS(netdb.h, , , [AC_INCLUDES_DEFAULT
111 #ifdef HAVE_SYS_TYPES_H
112 #include <sys/types.h>
113 #endif
116 AC_CHECK_HEADERS(sys/socket.h, , , [AC_INCLUDES_DEFAULT
117 #ifdef HAVE_SYS_TYPES_H
118 #include <sys/types.h>
119 #endif
122 AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
123 #ifdef HAVE_SYS_TYPES_H
124 #include <sys/types.h>
125 #endif
126 #if HAVE_SYS_SOCKET_H
127 #include <sys/socket.h>
128 #endif])
130 AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT
131 #ifdef HAVE_SYS_TYPES_H
132 #include <sys/types.h>
133 #endif
134 #if HAVE_SYS_SOCKET_H
135 #include <sys/socket.h>
136 #endif
137 #ifdef HAVE_NETINET6_IN6_H
138 #include <netinet6/in6.h>
139 #endif
142 AC_CHECK_HEADERS(sys/sysctl.h, , , [AC_INCLUDES_DEFAULT
143 #ifdef HAVE_SYS_PARAM_H
144 #include <sys/param.h>
145 #endif
148 AC_CHECK_HEADERS(sys/proc.h, , , [AC_INCLUDES_DEFAULT
149 #ifdef HAVE_SYS_PARAM_H
150 #include <sys/param.h>
151 #endif
154 AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
156 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
157 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
158 AM_CONDITIONAL(have_search_h, test "$ac_cv_header_search_h" = yes)
159 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
161 dnl Check for functions and libraries
163 AC_FIND_FUNC(socket, socket)
164 AC_FIND_FUNC(gethostbyname, nsl)
165 AC_FIND_FUNC(syslog, syslog)
167 AC_KRB_IPV6
169 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
171 rk_RESOLV
173 AC_BROKEN_SNPRINTF
174 AC_BROKEN_VSNPRINTF
176 AC_BROKEN_GLOB
177 if test "$ac_cv_func_glob_working" != yes; then
178         AC_LIBOBJ(glob)
180 AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes)
183 AC_CHECK_FUNCS([                                \
184         asnprintf                               \
185         asprintf                                \
186         atexit                                  \
187         cgetent                                 \
188         getauxval                               \
189         getconfattr                             \
190         getprogname                             \
191         getrlimit                               \
192         getspnam                                \
193         issetugid                               \
194         on_exit                                 \
195         poll                                    \
196         random                                  \
197         setprogname                             \
198         strsvis                                 \
199         strsvisx                                \
200         strunvis                                \
201         strvis                                  \
202         strvisx                                 \
203         svis                                    \
204         sysconf                                 \
205         sysctl                                  \
206         tdelete                                 \
207         tfind                                   \
208         twalk                                   \
209         uname                                   \
210         unvis                                   \
211         vasnprintf                              \
212         vasprintf                               \
213         vis                                     \
216 if test "$ac_cv_func_cgetent" = no; then
217         AC_LIBOBJ(getcap)
219 AM_CONDITIONAL(have_cgetent, test "$ac_cv_func_cgetent" = yes)
221 AC_REQUIRE([AC_FUNC_GETLOGIN])
223 AC_REQUIRE([AC_FUNC_MMAP])
225 AC_FIND_FUNC_NO_LIBS(getsockopt,,
226 [#ifdef HAVE_SYS_TYPES_H
227 #include <sys/types.h>
228 #endif
229 #ifdef HAVE_SYS_SOCKET_H
230 #include <sys/socket.h>
231 #endif],
232 [0,0,0,0,0])
233 AC_FIND_FUNC_NO_LIBS(setsockopt,,
234 [#ifdef HAVE_SYS_TYPES_H
235 #include <sys/types.h>
236 #endif
237 #ifdef HAVE_SYS_SOCKET_H
238 #include <sys/socket.h>
239 #endif],
240 [0,0,0,0,0])
242 AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
243 [#ifdef HAVE_NETDB_H
244 #include <netdb.h>
245 #endif],
247 AC_NEED_PROTO([
248 #ifdef HAVE_NETDB_H
249 #include <netdb.h>
250 #endif],
251 hstrerror)
253 AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
254         [AC_NEED_PROTO([
255         #include <stdio.h>
256         #include <string.h>],
257         rk_func)])
259 AC_FIND_FUNC_NO_LIBS(bswap16,,
260 [#ifdef HAVE_SYS_TYPES_H
261 #include <sys/types.h>
262 #endif
263 #ifdef HAVE_SYS_BSWAP_H
264 #include <sys/bswap.h>
265 #endif],0)
267 AC_FIND_FUNC_NO_LIBS(bswap32,,
268 [#ifdef HAVE_SYS_TYPES_H
269 #include <sys/types.h>
270 #endif
271 #ifdef HAVE_SYS_BSWAP_H
272 #include <sys/bswap.h>
273 #endif],0)
275 AC_FIND_FUNC_NO_LIBS(bswap64,,
276 [#ifdef HAVE_SYS_TYPES_H
277 #include <sys/types.h>
278 #endif
279 #ifdef HAVE_SYS_BSWAP_H
280 #include <sys/bswap.h>
281 #endif],0)
283 AC_FIND_FUNC_NO_LIBS(pidfile,util,
284 [#ifdef HAVE_UTIL_H
285 #include <util.h>
286 #endif],0)
288 AC_FIND_IF_NOT_BROKEN(getaddrinfo,,
289 [#ifdef HAVE_NETDB_H
290 #include <netdb.h>
291 #endif
292 #ifdef HAVE_WS2TCPIP_H
293 #include <ws2tcpip.h>
294 #endif],[0,0,0,0])
296 AC_FIND_IF_NOT_BROKEN(getnameinfo,,
297 [#ifdef HAVE_NETDB_H
298 #include <netdb.h>
299 #endif
300 #ifdef HAVE_WS2TCPIP_H
301 #include <ws2tcpip.h>
302 #endif],[0,0,0,0,0,0,0])
304 AC_FIND_IF_NOT_BROKEN(freeaddrinfo,,
305 [#ifdef HAVE_NETDB_H
306 #include <netdb.h>
307 #endif
308 #ifdef HAVE_WS2TCPIP_H
309 #include <ws2tcpip.h>
310 #endif],[0])
312 AC_FIND_IF_NOT_BROKEN(gai_strerror,,
313 [#ifdef HAVE_NETDB_H
314 #include <netdb.h>
315 #endif
316 #ifdef HAVE_WS2TCPIP_H
317 #include <ws2tcpip.h>
318 #endif],[0])
320 case "$host_os" in
321         darwin*)
322                 ;;
323         *)
324                 AC_BROKEN([daemon]) ;;
325 esac
327 AC_BROKEN([                                     \
328         chown                                   \
329         copyhostent                             \
330         closefrom                               \
331         ecalloc                                 \
332         emalloc                                 \
333         erealloc                                \
334         estrdup                                 \
335         err                                     \
336         errx                                    \
337         fchown                                  \
338         flock                                   \
339         fnmatch                                 \
340         freehostent                             \
341         getcwd                                  \
342         getdtablesize                           \
343         getegid                                 \
344         geteuid                                 \
345         getgid                                  \
346         gethostname                             \
347         getifaddrs                              \
348         getipnodebyaddr                         \
349         getipnodebyname                         \
350         getopt                                  \
351         gettimeofday                            \
352         getuid                                  \
353         getusershell                            \
354         initgroups                              \
355         innetgr                                 \
356         iruserok                                \
357         localtime_r                             \
358         lstat                                   \
359         memmove                                 \
360         memset_s                                \
361         mkstemp                                 \
362         putenv                                  \
363         rcmd                                    \
364         readv                                   \
365         recvmsg                                 \
366         sendmsg                                 \
367         setegid                                 \
368         setenv                                  \
369         seteuid                                 \
370         strcasecmp                              \
371         strdup                                  \
372         strerror                                \
373         strftime                                \
374         strlcat                                 \
375         strlcpy                                 \
376         strlwr                                  \
377         strncasecmp                             \
378         strndup                                 \
379         strnlen                                 \
380         strptime                                \
381         strsep                                  \
382         strsep_copy                             \
383         strtok_r                                \
384         strtoll                                 \
385         strtoull                                \
386         strupr                                  \
387         swab                                    \
388         tsearch                                 \
389         timegm                                  \
390         unsetenv                                \
391         verr                                    \
392         verrx                                   \
393         vsyslog                                 \
394         vwarn                                   \
395         vwarnx                                  \
396         warn                                    \
397         warnx                                   \
398         writev                                  \
401 AM_CONDITIONAL(have_fnmatch_h,
402         test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes)
404 AC_FOREACH([rk_func], [strndup strsep strtok_r],
405         [AC_NEED_PROTO([#include <string.h>], rk_func)])
407 AC_CHECK_FUNC([strtoll],
408     [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1,
409         [Define if you have the function strtoll.])])
411 AC_CHECK_FUNC([strtoull],
412     [AC_DEFINE_UNQUOTED(HAVE_STRTOULL, 1,
413         [Define if you have the function strtoull.])])
415 AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
416 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
417 #include <vis.h>
418 #endif], rk_func)])
420 AC_MSG_CHECKING([checking for dirfd])
421 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
422 #ifdef HAVE_DIRENT_H
423 #include <dirent.h>
424 #endif
426         [[DIR *d = 0; dirfd(d);]])],
427         [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
428 if test "$ac_rk_have_dirfd" = "yes" ; then
429         AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
431 AC_MSG_RESULT($ac_rk_have_dirfd)
433 AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
434 #ifdef HAVE_DIRENT_H
435 #include <dirent.h>
436 #endif])
439 AC_BROKEN2(inet_aton,
440 [#ifdef HAVE_SYS_TYPES_H
441 #include <sys/types.h>
442 #endif
443 #ifdef HAVE_SYS_SOCKET_H
444 #include <sys/socket.h>
445 #endif
446 #ifdef HAVE_NETINET_IN_H
447 #include <netinet/in.h>
448 #endif
449 #ifdef HAVE_ARPA_INET_H
450 #include <arpa/inet.h>
451 #endif],
452 [0,0])
454 AC_BROKEN2(inet_ntop,
455 [#ifdef HAVE_SYS_TYPES_H
456 #include <sys/types.h>
457 #endif
458 #ifdef HAVE_SYS_SOCKET_H
459 #include <sys/socket.h>
460 #endif
461 #ifdef HAVE_NETINET_IN_H
462 #include <netinet/in.h>
463 #endif
464 #ifdef HAVE_ARPA_INET_H
465 #include <arpa/inet.h>
466 #endif],
467 [0, 0, 0, 0])
469 AC_BROKEN2(inet_pton,
470 [#ifdef HAVE_SYS_TYPES_H
471 #include <sys/types.h>
472 #endif
473 #ifdef HAVE_SYS_SOCKET_H
474 #include <sys/socket.h>
475 #endif
476 #ifdef HAVE_NETINET_IN_H
477 #include <netinet/in.h>
478 #endif
479 #ifdef HAVE_ARPA_INET_H
480 #include <arpa/inet.h>
481 #endif],
482 [0,0,0])
485 dnl Check for sa_len in struct sockaddr, 
486 dnl needs to come before the getnameinfo test
488 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
489 #include <sys/socket.h>])
491 if test "$ac_cv_func_getaddrinfo" = "yes"; then
492   rk_BROKEN_GETADDRINFO
493   if test "$ac_cv_func_getaddrinfo_numserv" = no; then
494         AC_LIBOBJ(getaddrinfo)
495         AC_LIBOBJ(freeaddrinfo)
496   fi
499 AC_NEED_PROTO([#include <stdlib.h>], setenv)
500 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
501 AC_NEED_PROTO([#include <unistd.h>], gethostname)
502 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
503 AC_NEED_PROTO([#include <unistd.h>], getusershell)
504 AC_NEED_PROTO([#include <unistd.h>], daemon)
505 AC_NEED_PROTO([
506 #ifdef HAVE_SYS_TYPES_H
507 #include <sys/types.h>
508 #endif
509 #ifdef HAVE_SYS_SOCKET_H
510 #include <sys/socket.h>
511 #endif
512 #ifdef HAVE_NETINET_IN_H
513 #include <netinet/in.h>
514 #endif
515 #ifdef HAVE_ARPA_INET_H
516 #include <arpa/inet.h>
517 #endif
518 #ifdef HAVE_NETDB_H
519 #include <netdb.h>
520 #endif
521 #ifdef HAVE_UNISTD_H
522 #include <unistd.h>
523 #endif],
524 iruserok)
526 AC_NEED_PROTO([
527 #ifdef HAVE_SYS_TYPES_H
528 #include <sys/types.h>
529 #endif
530 #ifdef HAVE_SYS_SOCKET_H
531 #include <sys/socket.h>
532 #endif
533 #ifdef HAVE_NETINET_IN_H
534 #include <netinet/in.h>
535 #endif
536 #ifdef HAVE_ARPA_INET_H
537 #include <arpa/inet.h>
538 #endif],
539 inet_aton)
541 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
543 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
545 dnl AC_KRB_FUNC_GETCWD_BROKEN
547 dnl strerror_r is great fun, on linux it exists before sus catched up,
548 dnl so the return type is diffrent, lets check for both
550 AC_PROTO_COMPAT([
551 #include <stdio.h>
552 #include <string.h>
554 strerror_r, int strerror_r(int, char *, size_t))
556 AC_CHECK_FUNC([strerror_r],
557     [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1,
558         [Define if you have the function strerror_r.])])
561 dnl Checks for prototypes and declarations
564 AC_PROTO_COMPAT([
565 #ifdef HAVE_SYS_TYPES_H
566 #include <sys/types.h>
567 #endif
568 #ifdef HAVE_SYS_SOCKET_H
569 #include <sys/socket.h>
570 #endif
571 #ifdef HAVE_NETINET_IN_H
572 #include <netinet/in.h>
573 #endif
574 #ifdef HAVE_ARPA_INET_H
575 #include <arpa/inet.h>
576 #endif
577 #ifdef HAVE_NETDB_H
578 #include <netdb.h>
579 #endif
581 gethostbyname, struct hostent *gethostbyname(const char *))
583 AC_PROTO_COMPAT([
584 #ifdef HAVE_SYS_TYPES_H
585 #include <sys/types.h>
586 #endif
587 #ifdef HAVE_SYS_SOCKET_H
588 #include <sys/socket.h>
589 #endif
590 #ifdef HAVE_NETINET_IN_H
591 #include <netinet/in.h>
592 #endif
593 #ifdef HAVE_ARPA_INET_H
594 #include <arpa/inet.h>
595 #endif
596 #ifdef HAVE_NETDB_H
597 #include <netdb.h>
598 #endif
600 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
602 AC_PROTO_COMPAT([
603 #ifdef HAVE_SYS_TYPES_H
604 #include <sys/types.h>
605 #endif
606 #ifdef HAVE_SYS_SOCKET_H
607 #include <sys/socket.h>
608 #endif
609 #ifdef HAVE_NETINET_IN_H
610 #include <netinet/in.h>
611 #endif
612 #ifdef HAVE_ARPA_INET_H
613 #include <arpa/inet.h>
614 #endif
615 #ifdef HAVE_NETDB_H
616 #include <netdb.h>
617 #endif
619 getservbyname, struct servent *getservbyname(const char *, const char *))
621 AC_PROTO_COMPAT([
622 #ifdef HAVE_SYS_TYPES_H
623 #include <sys/types.h>
624 #endif
625 #ifdef HAVE_SYS_SOCKET_H
626 #include <sys/socket.h>
627 #endif
629 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
631 AC_PROTO_COMPAT([
632 #ifdef HAVE_SYSLOG_H
633 #include <syslog.h>
634 #endif
636 openlog, void openlog(const char *, int, int))
638 AC_NEED_PROTO([
639 #ifdef HAVE_CRYPT_H
640 #include <crypt.h>
641 #endif
642 #ifdef HAVE_UNISTD_H
643 #include <unistd.h>
644 #endif
646 crypt)
648 dnl variables
650 rk_CHECK_VAR(h_errno, 
651 [#ifdef HAVE_SYS_TYPES_H
652 #include <sys/types.h>
653 #endif
654 #ifdef HAVE_NETDB_H
655 #include <netdb.h>
656 #endif
657 #ifdef HAVE_WS2TCPIP_H
658 #include <ws2tcpip.h>
659 #endif
662 rk_CHECK_VAR(h_errlist, 
663 [#ifdef HAVE_NETDB_H
664 #include <netdb.h>
665 #endif
666 #ifdef HAVE_WS2TCPIP_H
667 #include <ws2tcpip.h>
668 #endif])
670 rk_CHECK_VAR(h_nerr, 
671 [#ifdef HAVE_NETDB_H
672 #include <netdb.h>
673 #endif
674 #ifdef HAVE_WS2TCPIP_H
675 #include <ws2tcpip.h>
676 #endif])
678 rk_CHECK_VAR([__progname], 
679 [#ifdef HAVE_ERR_H
680 #include <err.h>
681 #endif])
683 AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[
684 #include <stdlib.h>
685 #ifdef HAVE_UNISTD_H
686 #include <unistd.h>
687 #endif])
690 dnl Check for fields in struct tm
693 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
694 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
697 dnl or do we have a variable `timezone' ?
700 rk_CHECK_VAR(timezone,[#include <time.h>])
701 rk_CHECK_VAR(altzone,[#include <time.h>])
703 AC_HAVE_TYPE([sa_family_t],[
704 #include <sys/types.h>
705 #ifdef HAVE_SYS_SOCKET_H
706 #include <sys/socket.h>
707 #endif
708 #ifdef HAVE_WS2TCPIP_H
709 #include <ws2tcpip.h>
710 #endif])
711 AC_HAVE_TYPE([socklen_t],[
712 #include <sys/types.h>
713 #ifdef HAVE_SYS_SOCKET_H
714 #include <sys/socket.h>
715 #endif
716 #ifdef HAVE_WS2TCPIP_H
717 #include <ws2tcpip.h>
718 #endif])
719 AC_HAVE_TYPE([struct sockaddr], [
720 #include <sys/types.h>
721 #ifdef HAVE_SYS_SOCKET_H
722 #include <sys/socket.h>
723 #endif
724 #ifdef HAVE_WS2TCPIP_H
725 #include <ws2tcpip.h>
726 #endif])
727 AC_HAVE_TYPE([struct sockaddr_storage], [
728 #include <sys/types.h>
729 #ifdef HAVE_SYS_SOCKET_H
730 #include <sys/socket.h>
731 #endif
732 #ifdef HAVE_WS2TCPIP_H
733 #include <ws2tcpip.h>
734 #endif])
735 AC_HAVE_TYPE([struct addrinfo], [
736 #include <sys/types.h>
737 #ifdef HAVE_NETDB_H
738 #include <netdb.h>
739 #endif
740 #ifdef HAVE_WS2TCPIP_H
741 #include <ws2tcpip.h>
742 #endif])
743 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
744 AC_HAVE_TYPE([struct iovec],[
745 #include <sys/types.h>
746 #include <sys/uio.h>
748 AC_HAVE_TYPE([struct msghdr],[
749 #include <sys/types.h>
750 #ifdef HAVE_SYS_SOCKET_H
751 #include <sys/socket.h>
752 #endif
753 #ifdef HAVE_WS2TCPIP_H
754 #include <ws2tcpip.h>
755 #endif])
758 dnl Check for struct winsize
761 AC_KRB_STRUCT_WINSIZE
764 dnl Check for struct spwd
767 AC_KRB_STRUCT_SPWD
770 # Check if we want samba's socket wrapper
773 samba_SOCKET_WRAPPER
775 dnl won't work with automake
776 dnl moved to AC_OUTPUT in configure.in
777 dnl AC_CONFIG_FILES($1/Makefile)
779 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
781 AC_SUBST(DIR_roken)dnl
782 AC_SUBST(LIB_roken)dnl
783 AC_SUBST(INCLUDES_roken)dnl