fix calling conventions
[heimdal.git] / cf / roken-frag.m4
blob0557acfa277f57c4a7031b4d32a6c2b3dafc76b4
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         auxv.h                                  \
54         arpa/inet.h                             \
55         config.h                                \
56         crypt.h                                 \
57         dirent.h                                \
58         errno.h                                 \
59         err.h                                   \
60         fcntl.h                                 \
61         fnmatch.h                               \
62         grp.h                                   \
63         ifaddrs.h                               \
64         netinet/in.h                            \
65         netinet/in6.h                           \
66         netinet/in_systm.h                      \
67         netinet6/in6.h                          \
68         paths.h                                 \
69         poll.h                                  \
70         pwd.h                                   \
71         rpcsvc/ypclnt.h                         \
72         search.h                                \
73         shadow.h                                \
74         stdint.h                                \
75         sys/auxv.h                              \
76         sys/bswap.h                             \
77         sys/errno.h                             \
78         sys/exec_elf.h                          \
79         sys/ioctl.h                             \
80         sys/mman.h                              \
81         sys/param.h                             \
82         sys/resource.h                          \
83         sys/sockio.h                            \
84         sys/stat.h                              \
85         sys/time.h                              \
86         sys/tty.h                               \
87         sys/types.h                             \
88         sys/uio.h                               \
89         sys/utsname.h                           \
90         sys/wait.h                              \
91         syslog.h                                \
92         termios.h                               \
93         winsock2.h                              \
94         ws2tcpip.h                              \
95         unistd.h                                \
96         userconf.h                              \
97         usersec.h                               \
98         util.h                                  \
101 AC_HAVE_TYPE([auxv_t],[#ifdef HAVE_AUXV_H
102 #include <auxv.h>
103 #endif
104 #ifdef HAVE_SYS_AUXV_H
105 #include <sys/auxv.h>
106 #endif
109 AC_HAVE_TYPE([uintptr_t],[#ifdef HAVE_STDINT_H
110 #include <stdint.h>
111 #endif])
113 dnl Sunpro 5.2 has a vis.h which is something different.
114 AC_CHECK_HEADERS(vis.h, , , [
115 #include <vis.h>
116 #ifndef VIS_SP
117 #error invis
118 #endif])
119         
120 AC_CHECK_HEADERS(netdb.h, , , [AC_INCLUDES_DEFAULT
121 #ifdef HAVE_SYS_TYPES_H
122 #include <sys/types.h>
123 #endif
126 AC_CHECK_HEADERS(sys/socket.h, , , [AC_INCLUDES_DEFAULT
127 #ifdef HAVE_SYS_TYPES_H
128 #include <sys/types.h>
129 #endif
132 AC_CHECK_HEADERS(net/if.h, , , [AC_INCLUDES_DEFAULT
133 #ifdef HAVE_SYS_TYPES_H
134 #include <sys/types.h>
135 #endif
136 #if HAVE_SYS_SOCKET_H
137 #include <sys/socket.h>
138 #endif])
140 AC_CHECK_HEADERS(netinet6/in6_var.h, , , [AC_INCLUDES_DEFAULT
141 #ifdef HAVE_SYS_TYPES_H
142 #include <sys/types.h>
143 #endif
144 #if HAVE_SYS_SOCKET_H
145 #include <sys/socket.h>
146 #endif
147 #ifdef HAVE_NETINET6_IN6_H
148 #include <netinet6/in6.h>
149 #endif
152 AC_CHECK_HEADERS(sys/sysctl.h, , , [AC_INCLUDES_DEFAULT
153 #ifdef HAVE_SYS_PARAM_H
154 #include <sys/param.h>
155 #endif
158 AC_CHECK_HEADERS(sys/proc.h, , , [AC_INCLUDES_DEFAULT
159 #ifdef HAVE_SYS_PARAM_H
160 #include <sys/param.h>
161 #endif
164 AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
166 AM_CONDITIONAL(have_err_h, test "$ac_cv_header_err_h" = yes)
167 AM_CONDITIONAL(have_ifaddrs_h, test "$ac_cv_header_ifaddrs_h" = yes)
168 AM_CONDITIONAL(have_search_h, test "$ac_cv_header_search_h" = yes)
169 AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes)
171 dnl Check for functions and libraries
173 AC_FIND_FUNC(socket, socket)
174 AC_FIND_FUNC(gethostbyname, nsl)
175 AC_FIND_FUNC(syslog, syslog)
177 AC_KRB_IPV6
179 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
181 rk_RESOLV
183 AC_BROKEN_SNPRINTF
184 AC_BROKEN_VSNPRINTF
186 AC_CHECK_FUNCS([                                \
187         asnprintf                               \
188         asprintf                                \
189         atexit                                  \
190         cgetent                                 \
191         getauxval                               \
192         getconfattr                             \
193         getprogname                             \
194         getrlimit                               \
195         getspnam                                \
196         issetugid                               \
197         memmem                                  \
198         mkdtemp                                 \
199         mkostemp                                \
200         on_exit                                 \
201         poll                                    \
202         random                                  \
203         secure_getenv                           \
204         setprogname                             \
205         strsvis                                 \
206         strsvisx                                \
207         strunvis                                \
208         strvis                                  \
209         strvisx                                 \
210         svis                                    \
211         sysconf                                 \
212         sysctl                                  \
213         tdelete                                 \
214         tfind                                   \
215         twalk                                   \
216         uname                                   \
217         unlinkat                                \
218         unvis                                   \
219         vasnprintf                              \
220         vasprintf                               \
221         vis                                     \
224 if test "$ac_cv_func_cgetent" = no; then
225         AC_LIBOBJ(getcap)
227 AM_CONDITIONAL(have_cgetent, test "$ac_cv_func_cgetent" = yes)
229 AC_REQUIRE([AC_FUNC_GETLOGIN])
231 AC_REQUIRE([AC_FUNC_MMAP])
233 AC_FIND_FUNC_NO_LIBS(getsockopt,,
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])
241 AC_FIND_FUNC_NO_LIBS(setsockopt,,
242 [#ifdef HAVE_SYS_TYPES_H
243 #include <sys/types.h>
244 #endif
245 #ifdef HAVE_SYS_SOCKET_H
246 #include <sys/socket.h>
247 #endif],
248 [0,0,0,0,0])
250 AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
251 [#ifdef HAVE_NETDB_H
252 #include <netdb.h>
253 #endif],
255 AC_NEED_PROTO([
256 #ifdef HAVE_NETDB_H
257 #include <netdb.h>
258 #endif],
259 hstrerror)
261 AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
262         [AC_NEED_PROTO([
263         #include <stdio.h>
264         #include <string.h>],
265         rk_func)])
267 AC_FIND_FUNC_NO_LIBS(bswap16,,
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(bswap32,,
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(bswap64,,
284 [#ifdef HAVE_SYS_TYPES_H
285 #include <sys/types.h>
286 #endif
287 #ifdef HAVE_SYS_BSWAP_H
288 #include <sys/bswap.h>
289 #endif],0)
291 AC_FIND_FUNC_NO_LIBS(pidfile,util,
292 [#ifdef HAVE_UTIL_H
293 #include <util.h>
294 #endif],0)
296 AC_FIND_IF_NOT_BROKEN(getaddrinfo,,
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])
304 AC_FIND_IF_NOT_BROKEN(getnameinfo,,
305 [#ifdef HAVE_NETDB_H
306 #include <netdb.h>
307 #endif
308 #ifdef HAVE_WS2TCPIP_H
309 #include <ws2tcpip.h>
310 #endif],[0,0,0,0,0,0,0])
312 AC_FIND_IF_NOT_BROKEN(freeaddrinfo,,
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_FIND_IF_NOT_BROKEN(gai_strerror,,
321 [#ifdef HAVE_NETDB_H
322 #include <netdb.h>
323 #endif
324 #ifdef HAVE_WS2TCPIP_H
325 #include <ws2tcpip.h>
326 #endif],[0])
328 AC_CHECK_LIB(util, emalloc)
330 case "$host_os" in
331         darwin*)
332                 ;;
333         *)
334                 AC_BROKEN([daemon]) ;;
335 esac
337 AC_BROKEN([                                     \
338         chown                                   \
339         copyhostent                             \
340         closefrom                               \
341         ecalloc                                 \
342         emalloc                                 \
343         erealloc                                \
344         estrdup                                 \
345         err                                     \
346         errx                                    \
347         fchown                                  \
348         flock                                   \
349         fnmatch                                 \
350         freehostent                             \
351         getcwd                                  \
352         getdtablesize                           \
353         getegid                                 \
354         geteuid                                 \
355         getgid                                  \
356         gethostname                             \
357         getifaddrs                              \
358         getipnodebyaddr                         \
359         getipnodebyname                         \
360         getopt                                  \
361         gettimeofday                            \
362         getuid                                  \
363         getusershell                            \
364         initgroups                              \
365         innetgr                                 \
366         localtime_r                             \
367         lstat                                   \
368         memmove                                 \
369         memset_s                                \
370         mergesort                               \
371         mergesort_r                             \
372         mkstemp                                 \
373         putenv                                  \
374         rcmd                                    \
375         readv                                   \
376         recvmsg                                 \
377         sendmsg                                 \
378         setegid                                 \
379         setenv                                  \
380         seteuid                                 \
381         strcasecmp                              \
382         strdup                                  \
383         strerror                                \
384         strftime                                \
385         strlcat                                 \
386         strlcpy                                 \
387         strlwr                                  \
388         strncasecmp                             \
389         strndup                                 \
390         strnlen                                 \
391         strptime                                \
392         strsep                                  \
393         strsep_copy                             \
394         strtok_r                                \
395         strtoll                                 \
396         strtoull                                \
397         strupr                                  \
398         swab                                    \
399         tsearch                                 \
400         timegm                                  \
401         unsetenv                                \
402         verr                                    \
403         verrx                                   \
404         vsyslog                                 \
405         vwarn                                   \
406         vwarnx                                  \
407         warn                                    \
408         warnx                                   \
409         writev                                  \
412 AM_CONDITIONAL(have_fnmatch_h,
413         test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes)
415 AC_FOREACH([rk_func], [strndup strsep strtok_r],
416         [AC_NEED_PROTO([#include <string.h>], rk_func)])
418 AC_CHECK_FUNC([strtoll],
419     [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1,
420         [Define if you have the function strtoll.])])
422 AC_CHECK_FUNC([strtoull],
423     [AC_DEFINE_UNQUOTED(HAVE_STRTOULL, 1,
424         [Define if you have the function strtoull.])])
426 AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
427 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
428 #include <vis.h>
429 #endif], rk_func)])
431 AC_MSG_CHECKING([checking for dirfd])
432 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
433 #ifdef HAVE_DIRENT_H
434 #include <dirent.h>
435 #endif
437         [[DIR *d = 0; dirfd(d);]])],
438         [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
439 if test "$ac_rk_have_dirfd" = "yes" ; then
440         AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
442 AC_MSG_RESULT($ac_rk_have_dirfd)
444 AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
445 #ifdef HAVE_DIRENT_H
446 #include <dirent.h>
447 #endif])
449 AC_HAVE_STRUCT_FIELD(DIR, d_fd, [#include <sys/types.h>
450 #ifdef HAVE_DIRENT_H
451 #include <dirent.h>
452 #endif])
454 AC_BROKEN2(inet_aton,
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])
469 AC_BROKEN2(inet_ntop,
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, 0])
484 AC_BROKEN2(inet_pton,
485 [#ifdef HAVE_SYS_TYPES_H
486 #include <sys/types.h>
487 #endif
488 #ifdef HAVE_SYS_SOCKET_H
489 #include <sys/socket.h>
490 #endif
491 #ifdef HAVE_NETINET_IN_H
492 #include <netinet/in.h>
493 #endif
494 #ifdef HAVE_ARPA_INET_H
495 #include <arpa/inet.h>
496 #endif],
497 [0,0,0])
500 dnl Check for sa_len in struct sockaddr, 
501 dnl needs to come before the getnameinfo test
503 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
504 #include <sys/socket.h>])
506 if test "$ac_cv_func_getaddrinfo" = "yes"; then
507   rk_BROKEN_GETADDRINFO
508   if test "$ac_cv_func_getaddrinfo_numserv" = no; then
509         AC_LIBOBJ(getaddrinfo)
510         AC_LIBOBJ(freeaddrinfo)
511   fi
514 AC_NEED_PROTO([#include <stdlib.h>], setenv)
515 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
516 AC_NEED_PROTO([#include <unistd.h>], gethostname)
517 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
518 AC_NEED_PROTO([#include <unistd.h>], getusershell)
519 AC_NEED_PROTO([#include <unistd.h>], daemon)
521 AC_NEED_PROTO([
522 #ifdef HAVE_SYS_TYPES_H
523 #include <sys/types.h>
524 #endif
525 #ifdef HAVE_SYS_SOCKET_H
526 #include <sys/socket.h>
527 #endif
528 #ifdef HAVE_NETINET_IN_H
529 #include <netinet/in.h>
530 #endif
531 #ifdef HAVE_ARPA_INET_H
532 #include <arpa/inet.h>
533 #endif],
534 inet_aton)
536 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
538 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
540 dnl AC_KRB_FUNC_GETCWD_BROKEN
542 dnl strerror_r is great fun, on linux it exists before sus catched up,
543 dnl so the return type is diffrent, lets check for both
545 AC_PROTO_COMPAT([
546 #include <stdio.h>
547 #include <string.h>
549 strerror_r, int strerror_r(int, char *, size_t))
551 AC_CHECK_FUNC([strerror_r],
552     [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1,
553         [Define if you have the function strerror_r.])])
556 dnl Checks for prototypes and declarations
559 AC_PROTO_COMPAT([
560 #ifdef HAVE_SYS_TYPES_H
561 #include <sys/types.h>
562 #endif
563 #ifdef HAVE_SYS_SOCKET_H
564 #include <sys/socket.h>
565 #endif
566 #ifdef HAVE_NETINET_IN_H
567 #include <netinet/in.h>
568 #endif
569 #ifdef HAVE_ARPA_INET_H
570 #include <arpa/inet.h>
571 #endif
572 #ifdef HAVE_NETDB_H
573 #include <netdb.h>
574 #endif
576 gethostbyname, struct hostent *gethostbyname(const char *))
578 AC_PROTO_COMPAT([
579 #ifdef HAVE_SYS_TYPES_H
580 #include <sys/types.h>
581 #endif
582 #ifdef HAVE_SYS_SOCKET_H
583 #include <sys/socket.h>
584 #endif
585 #ifdef HAVE_NETINET_IN_H
586 #include <netinet/in.h>
587 #endif
588 #ifdef HAVE_ARPA_INET_H
589 #include <arpa/inet.h>
590 #endif
591 #ifdef HAVE_NETDB_H
592 #include <netdb.h>
593 #endif
595 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
597 AC_PROTO_COMPAT([
598 #ifdef HAVE_SYS_TYPES_H
599 #include <sys/types.h>
600 #endif
601 #ifdef HAVE_SYS_SOCKET_H
602 #include <sys/socket.h>
603 #endif
604 #ifdef HAVE_NETINET_IN_H
605 #include <netinet/in.h>
606 #endif
607 #ifdef HAVE_ARPA_INET_H
608 #include <arpa/inet.h>
609 #endif
610 #ifdef HAVE_NETDB_H
611 #include <netdb.h>
612 #endif
614 getservbyname, struct servent *getservbyname(const char *, const char *))
616 AC_PROTO_COMPAT([
617 #ifdef HAVE_SYS_TYPES_H
618 #include <sys/types.h>
619 #endif
620 #ifdef HAVE_SYS_SOCKET_H
621 #include <sys/socket.h>
622 #endif
624 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
626 AC_PROTO_COMPAT([
627 #ifdef HAVE_SYSLOG_H
628 #include <syslog.h>
629 #endif
631 openlog, void openlog(const char *, int, int))
633 AC_NEED_PROTO([
634 #ifdef HAVE_CRYPT_H
635 #include <crypt.h>
636 #endif
637 #ifdef HAVE_UNISTD_H
638 #include <unistd.h>
639 #endif
641 crypt)
643 dnl variables
645 rk_CHECK_VAR(h_errno, 
646 [#ifdef HAVE_SYS_TYPES_H
647 #include <sys/types.h>
648 #endif
649 #ifdef HAVE_NETDB_H
650 #include <netdb.h>
651 #endif
652 #ifdef HAVE_WS2TCPIP_H
653 #include <ws2tcpip.h>
654 #endif
657 rk_CHECK_VAR(h_errlist, 
658 [#ifdef HAVE_NETDB_H
659 #include <netdb.h>
660 #endif
661 #ifdef HAVE_WS2TCPIP_H
662 #include <ws2tcpip.h>
663 #endif])
665 rk_CHECK_VAR(h_nerr, 
666 [#ifdef HAVE_NETDB_H
667 #include <netdb.h>
668 #endif
669 #ifdef HAVE_WS2TCPIP_H
670 #include <ws2tcpip.h>
671 #endif])
673 rk_CHECK_VAR([__progname], 
674 [#ifdef HAVE_ERR_H
675 #include <err.h>
676 #endif])
678 AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[
679 #include <stdlib.h>
680 #ifdef HAVE_UNISTD_H
681 #include <unistd.h>
682 #endif])
685 dnl Check for fields in struct tm
688 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
689 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
692 dnl or do we have a variable `timezone' ?
695 rk_CHECK_VAR(timezone,[#include <time.h>])
696 rk_CHECK_VAR(altzone,[#include <time.h>])
698 AC_HAVE_TYPE([sa_family_t],[
699 #include <sys/types.h>
700 #ifdef HAVE_SYS_SOCKET_H
701 #include <sys/socket.h>
702 #endif
703 #ifdef HAVE_WS2TCPIP_H
704 #include <ws2tcpip.h>
705 #endif])
706 AC_HAVE_TYPE([socklen_t],[
707 #include <sys/types.h>
708 #ifdef HAVE_SYS_SOCKET_H
709 #include <sys/socket.h>
710 #endif
711 #ifdef HAVE_WS2TCPIP_H
712 #include <ws2tcpip.h>
713 #endif])
714 AC_HAVE_TYPE([struct sockaddr], [
715 #include <sys/types.h>
716 #ifdef HAVE_SYS_SOCKET_H
717 #include <sys/socket.h>
718 #endif
719 #ifdef HAVE_WS2TCPIP_H
720 #include <ws2tcpip.h>
721 #endif])
722 AC_HAVE_TYPE([struct sockaddr_storage], [
723 #include <sys/types.h>
724 #ifdef HAVE_SYS_SOCKET_H
725 #include <sys/socket.h>
726 #endif
727 #ifdef HAVE_WS2TCPIP_H
728 #include <ws2tcpip.h>
729 #endif])
730 AC_HAVE_TYPE([struct addrinfo], [
731 #include <sys/types.h>
732 #ifdef HAVE_NETDB_H
733 #include <netdb.h>
734 #endif
735 #ifdef HAVE_WS2TCPIP_H
736 #include <ws2tcpip.h>
737 #endif])
738 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
739 AC_HAVE_TYPE([struct iovec],[
740 #include <sys/types.h>
741 #include <sys/uio.h>
743 AC_HAVE_TYPE([struct msghdr],[
744 #include <sys/types.h>
745 #ifdef HAVE_SYS_SOCKET_H
746 #include <sys/socket.h>
747 #endif
748 #ifdef HAVE_WS2TCPIP_H
749 #include <ws2tcpip.h>
750 #endif])
753 dnl Check for struct winsize
756 AC_KRB_STRUCT_WINSIZE
759 dnl Check for struct spwd
762 AC_KRB_STRUCT_SPWD
765 # Check if we want samba's socket wrapper
768 samba_SOCKET_WRAPPER
770 dnl won't work with automake
771 dnl moved to AC_OUTPUT in configure.in
772 dnl AC_CONFIG_FILES($1/Makefile)
774 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
776 AC_SUBST(DIR_roken)dnl
777 AC_SUBST(LIB_roken)dnl
778 AC_SUBST(INCLUDES_roken)dnl