Avoid make dist fail when doxyout/ does not exist
[heimdal.git] / cf / roken-frag.m4
blobf077cf8a522cd7487b6971f178d4b850a1de7765
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 AC_CHECK_LIB(util, emalloc)
322 case "$host_os" in
323         darwin*)
324                 ;;
325         *)
326                 AC_BROKEN([daemon]) ;;
327 esac
329 AC_BROKEN([                                     \
330         chown                                   \
331         copyhostent                             \
332         closefrom                               \
333         ecalloc                                 \
334         emalloc                                 \
335         erealloc                                \
336         estrdup                                 \
337         err                                     \
338         errx                                    \
339         fchown                                  \
340         flock                                   \
341         fnmatch                                 \
342         freehostent                             \
343         getcwd                                  \
344         getdtablesize                           \
345         getegid                                 \
346         geteuid                                 \
347         getgid                                  \
348         gethostname                             \
349         getifaddrs                              \
350         getipnodebyaddr                         \
351         getipnodebyname                         \
352         getopt                                  \
353         gettimeofday                            \
354         getuid                                  \
355         getusershell                            \
356         initgroups                              \
357         innetgr                                 \
358         iruserok                                \
359         localtime_r                             \
360         lstat                                   \
361         memmove                                 \
362         memset_s                                \
363         mkstemp                                 \
364         putenv                                  \
365         rcmd                                    \
366         readv                                   \
367         recvmsg                                 \
368         sendmsg                                 \
369         setegid                                 \
370         setenv                                  \
371         seteuid                                 \
372         strcasecmp                              \
373         strdup                                  \
374         strerror                                \
375         strftime                                \
376         strlcat                                 \
377         strlcpy                                 \
378         strlwr                                  \
379         strncasecmp                             \
380         strndup                                 \
381         strnlen                                 \
382         strptime                                \
383         strsep                                  \
384         strsep_copy                             \
385         strtok_r                                \
386         strtoll                                 \
387         strtoull                                \
388         strupr                                  \
389         swab                                    \
390         tsearch                                 \
391         timegm                                  \
392         unsetenv                                \
393         verr                                    \
394         verrx                                   \
395         vsyslog                                 \
396         vwarn                                   \
397         vwarnx                                  \
398         warn                                    \
399         warnx                                   \
400         writev                                  \
403 AM_CONDITIONAL(have_fnmatch_h,
404         test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes)
406 AC_FOREACH([rk_func], [strndup strsep strtok_r],
407         [AC_NEED_PROTO([#include <string.h>], rk_func)])
409 AC_CHECK_FUNC([strtoll],
410     [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1,
411         [Define if you have the function strtoll.])])
413 AC_CHECK_FUNC([strtoull],
414     [AC_DEFINE_UNQUOTED(HAVE_STRTOULL, 1,
415         [Define if you have the function strtoull.])])
417 AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
418 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
419 #include <vis.h>
420 #endif], rk_func)])
422 AC_MSG_CHECKING([checking for dirfd])
423 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
424 #ifdef HAVE_DIRENT_H
425 #include <dirent.h>
426 #endif
428         [[DIR *d = 0; dirfd(d);]])],
429         [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
430 if test "$ac_rk_have_dirfd" = "yes" ; then
431         AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
433 AC_MSG_RESULT($ac_rk_have_dirfd)
435 AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
436 #ifdef HAVE_DIRENT_H
437 #include <dirent.h>
438 #endif])
441 AC_BROKEN2(inet_aton,
442 [#ifdef HAVE_SYS_TYPES_H
443 #include <sys/types.h>
444 #endif
445 #ifdef HAVE_SYS_SOCKET_H
446 #include <sys/socket.h>
447 #endif
448 #ifdef HAVE_NETINET_IN_H
449 #include <netinet/in.h>
450 #endif
451 #ifdef HAVE_ARPA_INET_H
452 #include <arpa/inet.h>
453 #endif],
454 [0,0])
456 AC_BROKEN2(inet_ntop,
457 [#ifdef HAVE_SYS_TYPES_H
458 #include <sys/types.h>
459 #endif
460 #ifdef HAVE_SYS_SOCKET_H
461 #include <sys/socket.h>
462 #endif
463 #ifdef HAVE_NETINET_IN_H
464 #include <netinet/in.h>
465 #endif
466 #ifdef HAVE_ARPA_INET_H
467 #include <arpa/inet.h>
468 #endif],
469 [0, 0, 0, 0])
471 AC_BROKEN2(inet_pton,
472 [#ifdef HAVE_SYS_TYPES_H
473 #include <sys/types.h>
474 #endif
475 #ifdef HAVE_SYS_SOCKET_H
476 #include <sys/socket.h>
477 #endif
478 #ifdef HAVE_NETINET_IN_H
479 #include <netinet/in.h>
480 #endif
481 #ifdef HAVE_ARPA_INET_H
482 #include <arpa/inet.h>
483 #endif],
484 [0,0,0])
487 dnl Check for sa_len in struct sockaddr, 
488 dnl needs to come before the getnameinfo test
490 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
491 #include <sys/socket.h>])
493 if test "$ac_cv_func_getaddrinfo" = "yes"; then
494   rk_BROKEN_GETADDRINFO
495   if test "$ac_cv_func_getaddrinfo_numserv" = no; then
496         AC_LIBOBJ(getaddrinfo)
497         AC_LIBOBJ(freeaddrinfo)
498   fi
501 AC_NEED_PROTO([#include <stdlib.h>], setenv)
502 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
503 AC_NEED_PROTO([#include <unistd.h>], gethostname)
504 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
505 AC_NEED_PROTO([#include <unistd.h>], getusershell)
506 AC_NEED_PROTO([#include <unistd.h>], daemon)
507 AC_NEED_PROTO([
508 #ifdef HAVE_SYS_TYPES_H
509 #include <sys/types.h>
510 #endif
511 #ifdef HAVE_SYS_SOCKET_H
512 #include <sys/socket.h>
513 #endif
514 #ifdef HAVE_NETINET_IN_H
515 #include <netinet/in.h>
516 #endif
517 #ifdef HAVE_ARPA_INET_H
518 #include <arpa/inet.h>
519 #endif
520 #ifdef HAVE_NETDB_H
521 #include <netdb.h>
522 #endif
523 #ifdef HAVE_UNISTD_H
524 #include <unistd.h>
525 #endif],
526 iruserok)
528 AC_NEED_PROTO([
529 #ifdef HAVE_SYS_TYPES_H
530 #include <sys/types.h>
531 #endif
532 #ifdef HAVE_SYS_SOCKET_H
533 #include <sys/socket.h>
534 #endif
535 #ifdef HAVE_NETINET_IN_H
536 #include <netinet/in.h>
537 #endif
538 #ifdef HAVE_ARPA_INET_H
539 #include <arpa/inet.h>
540 #endif],
541 inet_aton)
543 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
545 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
547 dnl AC_KRB_FUNC_GETCWD_BROKEN
549 dnl strerror_r is great fun, on linux it exists before sus catched up,
550 dnl so the return type is diffrent, lets check for both
552 AC_PROTO_COMPAT([
553 #include <stdio.h>
554 #include <string.h>
556 strerror_r, int strerror_r(int, char *, size_t))
558 AC_CHECK_FUNC([strerror_r],
559     [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1,
560         [Define if you have the function strerror_r.])])
563 dnl Checks for prototypes and declarations
566 AC_PROTO_COMPAT([
567 #ifdef HAVE_SYS_TYPES_H
568 #include <sys/types.h>
569 #endif
570 #ifdef HAVE_SYS_SOCKET_H
571 #include <sys/socket.h>
572 #endif
573 #ifdef HAVE_NETINET_IN_H
574 #include <netinet/in.h>
575 #endif
576 #ifdef HAVE_ARPA_INET_H
577 #include <arpa/inet.h>
578 #endif
579 #ifdef HAVE_NETDB_H
580 #include <netdb.h>
581 #endif
583 gethostbyname, struct hostent *gethostbyname(const char *))
585 AC_PROTO_COMPAT([
586 #ifdef HAVE_SYS_TYPES_H
587 #include <sys/types.h>
588 #endif
589 #ifdef HAVE_SYS_SOCKET_H
590 #include <sys/socket.h>
591 #endif
592 #ifdef HAVE_NETINET_IN_H
593 #include <netinet/in.h>
594 #endif
595 #ifdef HAVE_ARPA_INET_H
596 #include <arpa/inet.h>
597 #endif
598 #ifdef HAVE_NETDB_H
599 #include <netdb.h>
600 #endif
602 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
604 AC_PROTO_COMPAT([
605 #ifdef HAVE_SYS_TYPES_H
606 #include <sys/types.h>
607 #endif
608 #ifdef HAVE_SYS_SOCKET_H
609 #include <sys/socket.h>
610 #endif
611 #ifdef HAVE_NETINET_IN_H
612 #include <netinet/in.h>
613 #endif
614 #ifdef HAVE_ARPA_INET_H
615 #include <arpa/inet.h>
616 #endif
617 #ifdef HAVE_NETDB_H
618 #include <netdb.h>
619 #endif
621 getservbyname, struct servent *getservbyname(const char *, const char *))
623 AC_PROTO_COMPAT([
624 #ifdef HAVE_SYS_TYPES_H
625 #include <sys/types.h>
626 #endif
627 #ifdef HAVE_SYS_SOCKET_H
628 #include <sys/socket.h>
629 #endif
631 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
633 AC_PROTO_COMPAT([
634 #ifdef HAVE_SYSLOG_H
635 #include <syslog.h>
636 #endif
638 openlog, void openlog(const char *, int, int))
640 AC_NEED_PROTO([
641 #ifdef HAVE_CRYPT_H
642 #include <crypt.h>
643 #endif
644 #ifdef HAVE_UNISTD_H
645 #include <unistd.h>
646 #endif
648 crypt)
650 dnl variables
652 rk_CHECK_VAR(h_errno, 
653 [#ifdef HAVE_SYS_TYPES_H
654 #include <sys/types.h>
655 #endif
656 #ifdef HAVE_NETDB_H
657 #include <netdb.h>
658 #endif
659 #ifdef HAVE_WS2TCPIP_H
660 #include <ws2tcpip.h>
661 #endif
664 rk_CHECK_VAR(h_errlist, 
665 [#ifdef HAVE_NETDB_H
666 #include <netdb.h>
667 #endif
668 #ifdef HAVE_WS2TCPIP_H
669 #include <ws2tcpip.h>
670 #endif])
672 rk_CHECK_VAR(h_nerr, 
673 [#ifdef HAVE_NETDB_H
674 #include <netdb.h>
675 #endif
676 #ifdef HAVE_WS2TCPIP_H
677 #include <ws2tcpip.h>
678 #endif])
680 rk_CHECK_VAR([__progname], 
681 [#ifdef HAVE_ERR_H
682 #include <err.h>
683 #endif])
685 AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[
686 #include <stdlib.h>
687 #ifdef HAVE_UNISTD_H
688 #include <unistd.h>
689 #endif])
692 dnl Check for fields in struct tm
695 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
696 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
699 dnl or do we have a variable `timezone' ?
702 rk_CHECK_VAR(timezone,[#include <time.h>])
703 rk_CHECK_VAR(altzone,[#include <time.h>])
705 AC_HAVE_TYPE([sa_family_t],[
706 #include <sys/types.h>
707 #ifdef HAVE_SYS_SOCKET_H
708 #include <sys/socket.h>
709 #endif
710 #ifdef HAVE_WS2TCPIP_H
711 #include <ws2tcpip.h>
712 #endif])
713 AC_HAVE_TYPE([socklen_t],[
714 #include <sys/types.h>
715 #ifdef HAVE_SYS_SOCKET_H
716 #include <sys/socket.h>
717 #endif
718 #ifdef HAVE_WS2TCPIP_H
719 #include <ws2tcpip.h>
720 #endif])
721 AC_HAVE_TYPE([struct sockaddr], [
722 #include <sys/types.h>
723 #ifdef HAVE_SYS_SOCKET_H
724 #include <sys/socket.h>
725 #endif
726 #ifdef HAVE_WS2TCPIP_H
727 #include <ws2tcpip.h>
728 #endif])
729 AC_HAVE_TYPE([struct sockaddr_storage], [
730 #include <sys/types.h>
731 #ifdef HAVE_SYS_SOCKET_H
732 #include <sys/socket.h>
733 #endif
734 #ifdef HAVE_WS2TCPIP_H
735 #include <ws2tcpip.h>
736 #endif])
737 AC_HAVE_TYPE([struct addrinfo], [
738 #include <sys/types.h>
739 #ifdef HAVE_NETDB_H
740 #include <netdb.h>
741 #endif
742 #ifdef HAVE_WS2TCPIP_H
743 #include <ws2tcpip.h>
744 #endif])
745 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
746 AC_HAVE_TYPE([struct iovec],[
747 #include <sys/types.h>
748 #include <sys/uio.h>
750 AC_HAVE_TYPE([struct msghdr],[
751 #include <sys/types.h>
752 #ifdef HAVE_SYS_SOCKET_H
753 #include <sys/socket.h>
754 #endif
755 #ifdef HAVE_WS2TCPIP_H
756 #include <ws2tcpip.h>
757 #endif])
760 dnl Check for struct winsize
763 AC_KRB_STRUCT_WINSIZE
766 dnl Check for struct spwd
769 AC_KRB_STRUCT_SPWD
772 # Check if we want samba's socket wrapper
775 samba_SOCKET_WRAPPER
777 dnl won't work with automake
778 dnl moved to AC_OUTPUT in configure.in
779 dnl AC_CONFIG_FILES($1/Makefile)
781 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
783 AC_SUBST(DIR_roken)dnl
784 AC_SUBST(LIB_roken)dnl
785 AC_SUBST(INCLUDES_roken)dnl