Debian Codegraph @

cf/roken-frag.m4

raw ◀ ▶
1 Debian patch touch this file
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], [
8
9 AC_REQUIRE([rk_CONFIG_HEADER])
10
11 DIR_roken=roken
12 LIB_roken='$(top_builddir)/$1/libroken.la'
13 INCLUDES_roken='-I$(top_builddir)/$1 -I$(top_srcdir)/$1'
14
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])
21
22 AC_REQUIRE([AC_MIPS_ABI])
23
24 AC_DEFINE(rk_PATH_DELIM, '/', [Path name delimiter])
25
26 dnl C characteristics
27
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)
32
33 dnl -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes
34 dnl -Wcast-qual -Wswitch -Wformat=2 -Wwrite-strings
35
36 AC_REQUIRE([rk_DB])
37
38 dnl C types
39
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])
45
46 AC_REQUIRE([rk_RETSIGTYPE])
47
48 dnl Checks for header files.
49 AC_REQUIRE([AC_HEADER_STDC])
50 AC_REQUIRE([AC_HEADER_TIME])
51
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 \
97 ])
98
99 AC_HAVE_TYPE([uintptr_t],[#ifdef HAVE_STDINT_H
100 #include <stdint.h>
101 #endif])
102
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
114 ])
115
116 AC_CHECK_HEADERS(sys/socket.h, , , [AC_INCLUDES_DEFAULT
117 #ifdef HAVE_SYS_TYPES_H
118 #include <sys/types.h>
119 #endif
120 ])
121
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])
129
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
140 ])
141
142 AC_CHECK_HEADERS(sys/sysctl.h, , , [AC_INCLUDES_DEFAULT
143 #ifdef HAVE_SYS_PARAM_H
144 #include <sys/param.h>
145 #endif
146 ])
147
148 AC_CHECK_HEADERS(sys/proc.h, , , [AC_INCLUDES_DEFAULT
149 #ifdef HAVE_SYS_PARAM_H
150 #include <sys/param.h>
151 #endif
152 ])
153
154 AC_REQUIRE([CHECK_NETINET_IP_AND_TCP])
155
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)
160
161 dnl Check for functions and libraries
162
163 AC_FIND_FUNC(socket, socket)
164 AC_FIND_FUNC(gethostbyname, nsl)
165 AC_FIND_FUNC(syslog, syslog)
166
167 AC_KRB_IPV6
168
169 AC_FIND_FUNC(gethostbyname2, inet6 ip6)
170
171 rk_RESOLV
172
173 AC_BROKEN_SNPRINTF
174 AC_BROKEN_VSNPRINTF
175
176 AC_BROKEN_GLOB
177 if test "$ac_cv_func_glob_working" != yes; then
178 AC_LIBOBJ(glob)
179 fi
180 AM_CONDITIONAL(have_glob_h, test "$ac_cv_func_glob_working" = yes)
181
182
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 \
214 ])
215
216 if test "$ac_cv_func_cgetent" = no; then
217 AC_LIBOBJ(getcap)
218 fi
219 AM_CONDITIONAL(have_cgetent, test "$ac_cv_func_cgetent" = yes)
220
221 AC_REQUIRE([AC_FUNC_GETLOGIN])
222
223 AC_REQUIRE([AC_FUNC_MMAP])
224
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])
241
242 AC_FIND_IF_NOT_BROKEN(hstrerror, resolv,
243 [#ifdef HAVE_NETDB_H
244 #include <netdb.h>
245 #endif],
246 17)
247 AC_NEED_PROTO([
248 #ifdef HAVE_NETDB_H
249 #include <netdb.h>
250 #endif],
251 hstrerror)
252
253 AC_FOREACH([rk_func], [asprintf vasprintf asnprintf vasnprintf],
254 [AC_NEED_PROTO([
255 #include <stdio.h>
256 #include <string.h>],
257 rk_func)])
258
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)
266
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)
274
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)
282
283 AC_FIND_FUNC_NO_LIBS(pidfile,util,
284 [#ifdef HAVE_UTIL_H
285 #include <util.h>
286 #endif],0)
287
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])
295
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])
303
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])
311
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])
319
320 case "$host_os" in
321 darwin*)
322 ;;
323 *)
324 AC_BROKEN([daemon]) ;;
325 esac
326
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 strlwr \
375 strncasecmp \
376 strndup \
377 strnlen \
378 strptime \
379 strsep \
380 strsep_copy \
381 strtok_r \
382 strtoll \
383 strtoull \
384 strupr \
385 swab \
386 tsearch \
387 timegm \
388 unsetenv \
389 verr \
390 verrx \
391 vsyslog \
392 vwarn \
393 vwarnx \
394 warn \
395 warnx \
396 writev \
397 ])
398
•399 rk_LIBOBJ(strlcpy)
400 rk_LIBOBJ(strlcat)
401
402 AM_CONDITIONAL(have_fnmatch_h,
403 test "$ac_cv_header_fnmatch_h" = yes -a "$ac_cv_func_fnmatch" = yes)
404
405 AC_FOREACH([rk_func], [strndup strsep strtok_r],
406 [AC_NEED_PROTO([#include <string.h>], rk_func)])
407
408 AC_CHECK_FUNC([strtoll],
409 [AC_DEFINE_UNQUOTED(HAVE_STRTOLL, 1,
410 [Define if you have the function strtoll.])])
411
412 AC_CHECK_FUNC([strtoull],
413 [AC_DEFINE_UNQUOTED(HAVE_STRTOULL, 1,
414 [Define if you have the function strtoull.])])
415
416 AC_FOREACH([rk_func], [strsvis strsvisx strunvis strvis strvisx svis unvis vis],
417 [AC_NEED_PROTO([#ifdef HAVE_VIS_H
418 #include <vis.h>
419 #endif], rk_func)])
420
421 AC_MSG_CHECKING([checking for dirfd])
422 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
423 #ifdef HAVE_DIRENT_H
424 #include <dirent.h>
425 #endif
426 ]],
427 [[DIR *d = 0; dirfd(d);]])],
428 [ac_rk_have_dirfd=yes], [ac_rk_have_dirfd=no])
429 if test "$ac_rk_have_dirfd" = "yes" ; then
430 AC_DEFINE_UNQUOTED(HAVE_DIRFD, 1, [have a dirfd function/macro])
431 fi
432 AC_MSG_RESULT($ac_rk_have_dirfd)
433
434 AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
435 #ifdef HAVE_DIRENT_H
436 #include <dirent.h>
437 #endif])
438
439
440 AC_BROKEN2(inet_aton,
441 [#ifdef HAVE_SYS_TYPES_H
442 #include <sys/types.h>
443 #endif
444 #ifdef HAVE_SYS_SOCKET_H
445 #include <sys/socket.h>
446 #endif
447 #ifdef HAVE_NETINET_IN_H
448 #include <netinet/in.h>
449 #endif
450 #ifdef HAVE_ARPA_INET_H
451 #include <arpa/inet.h>
452 #endif],
453 [0,0])
454
455 AC_BROKEN2(inet_ntop,
456 [#ifdef HAVE_SYS_TYPES_H
457 #include <sys/types.h>
458 #endif
459 #ifdef HAVE_SYS_SOCKET_H
460 #include <sys/socket.h>
461 #endif
462 #ifdef HAVE_NETINET_IN_H
463 #include <netinet/in.h>
464 #endif
465 #ifdef HAVE_ARPA_INET_H
466 #include <arpa/inet.h>
467 #endif],
468 [0, 0, 0, 0])
469
470 AC_BROKEN2(inet_pton,
471 [#ifdef HAVE_SYS_TYPES_H
472 #include <sys/types.h>
473 #endif
474 #ifdef HAVE_SYS_SOCKET_H
475 #include <sys/socket.h>
476 #endif
477 #ifdef HAVE_NETINET_IN_H
478 #include <netinet/in.h>
479 #endif
480 #ifdef HAVE_ARPA_INET_H
481 #include <arpa/inet.h>
482 #endif],
483 [0,0,0])
484
485 dnl
486 dnl Check for sa_len in struct sockaddr,
487 dnl needs to come before the getnameinfo test
488 dnl
489 AC_HAVE_STRUCT_FIELD(struct sockaddr, sa_len, [#include <sys/types.h>
490 #include <sys/socket.h>])
491
492 #if test "$ac_cv_func_getaddrinfo" = "yes"; then
493 # rk_BROKEN_GETADDRINFO
494 # if test "$ac_cv_func_getaddrinfo_numserv" = no; then
495 # AC_LIBOBJ(getaddrinfo)
496 # AC_LIBOBJ(freeaddrinfo)
497 # fi
498 #fi
499
500 AC_NEED_PROTO([#include <stdlib.h>], setenv)
501 AC_NEED_PROTO([#include <stdlib.h>], unsetenv)
502 AC_NEED_PROTO([#include <unistd.h>], gethostname)
503 AC_NEED_PROTO([#include <unistd.h>], mkstemp)
504 AC_NEED_PROTO([#include <unistd.h>], getusershell)
505 AC_NEED_PROTO([#include <unistd.h>], daemon)
506 AC_NEED_PROTO([
507 #ifdef HAVE_SYS_TYPES_H
508 #include <sys/types.h>
509 #endif
510 #ifdef HAVE_SYS_SOCKET_H
511 #include <sys/socket.h>
512 #endif
513 #ifdef HAVE_NETINET_IN_H
514 #include <netinet/in.h>
515 #endif
516 #ifdef HAVE_ARPA_INET_H
517 #include <arpa/inet.h>
518 #endif
519 #ifdef HAVE_NETDB_H
520 #include <netdb.h>
521 #endif
522 #ifdef HAVE_UNISTD_H
523 #include <unistd.h>
524 #endif],
525 iruserok)
526
527 AC_NEED_PROTO([
528 #ifdef HAVE_SYS_TYPES_H
529 #include <sys/types.h>
530 #endif
531 #ifdef HAVE_SYS_SOCKET_H
532 #include <sys/socket.h>
533 #endif
534 #ifdef HAVE_NETINET_IN_H
535 #include <netinet/in.h>
536 #endif
537 #ifdef HAVE_ARPA_INET_H
538 #include <arpa/inet.h>
539 #endif],
540 inet_aton)
541
542 AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl
543
544 AC_REQUIRE([rk_BROKEN_REALLOC])dnl
545
546 dnl AC_KRB_FUNC_GETCWD_BROKEN
547
548 dnl strerror_r is great fun, on linux it exists before sus catched up,
549 dnl so the return type is diffrent, lets check for both
550
551 AC_PROTO_COMPAT([
552 #include <stdio.h>
553 #include <string.h>
554 ],
555 strerror_r, int strerror_r(int, char *, size_t))
556
557 AC_CHECK_FUNC([strerror_r],
558 [AC_DEFINE_UNQUOTED(HAVE_STRERROR_R, 1,
559 [Define if you have the function strerror_r.])])
560
561 dnl
562 dnl Checks for prototypes and declarations
563 dnl
564
565 AC_PROTO_COMPAT([
566 #ifdef HAVE_SYS_TYPES_H
567 #include <sys/types.h>
568 #endif
569 #ifdef HAVE_SYS_SOCKET_H
570 #include <sys/socket.h>
571 #endif
572 #ifdef HAVE_NETINET_IN_H
573 #include <netinet/in.h>
574 #endif
575 #ifdef HAVE_ARPA_INET_H
576 #include <arpa/inet.h>
577 #endif
578 #ifdef HAVE_NETDB_H
579 #include <netdb.h>
580 #endif
581 ],
582 gethostbyname, struct hostent *gethostbyname(const char *))
583
584 AC_PROTO_COMPAT([
585 #ifdef HAVE_SYS_TYPES_H
586 #include <sys/types.h>
587 #endif
588 #ifdef HAVE_SYS_SOCKET_H
589 #include <sys/socket.h>
590 #endif
591 #ifdef HAVE_NETINET_IN_H
592 #include <netinet/in.h>
593 #endif
594 #ifdef HAVE_ARPA_INET_H
595 #include <arpa/inet.h>
596 #endif
597 #ifdef HAVE_NETDB_H
598 #include <netdb.h>
599 #endif
600 ],
601 gethostbyaddr, struct hostent *gethostbyaddr(const void *, size_t, int))
602
603 AC_PROTO_COMPAT([
604 #ifdef HAVE_SYS_TYPES_H
605 #include <sys/types.h>
606 #endif
607 #ifdef HAVE_SYS_SOCKET_H
608 #include <sys/socket.h>
609 #endif
610 #ifdef HAVE_NETINET_IN_H
611 #include <netinet/in.h>
612 #endif
613 #ifdef HAVE_ARPA_INET_H
614 #include <arpa/inet.h>
615 #endif
616 #ifdef HAVE_NETDB_H
617 #include <netdb.h>
618 #endif
619 ],
620 getservbyname, struct servent *getservbyname(const char *, const char *))
621
622 AC_PROTO_COMPAT([
623 #ifdef HAVE_SYS_TYPES_H
624 #include <sys/types.h>
625 #endif
626 #ifdef HAVE_SYS_SOCKET_H
627 #include <sys/socket.h>
628 #endif
629 ],
630 getsockname, int getsockname(int, struct sockaddr*, socklen_t*))
631
632 AC_PROTO_COMPAT([
633 #ifdef HAVE_SYSLOG_H
634 #include <syslog.h>
635 #endif
636 ],
637 openlog, void openlog(const char *, int, int))
638
639 AC_NEED_PROTO([
640 #ifdef HAVE_CRYPT_H
641 #include <crypt.h>
642 #endif
643 #ifdef HAVE_UNISTD_H
644 #include <unistd.h>
645 #endif
646 ],
647 crypt)
648
649 dnl variables
650
651 rk_CHECK_VAR(h_errno,
652 [#ifdef HAVE_SYS_TYPES_H
653 #include <sys/types.h>
654 #endif
655 #ifdef HAVE_NETDB_H
656 #include <netdb.h>
657 #endif
658 #ifdef HAVE_WS2TCPIP_H
659 #include <ws2tcpip.h>
660 #endif
661 ])
662
663 rk_CHECK_VAR(h_errlist,
664 [#ifdef HAVE_NETDB_H
665 #include <netdb.h>
666 #endif
667 #ifdef HAVE_WS2TCPIP_H
668 #include <ws2tcpip.h>
669 #endif])
670
671 rk_CHECK_VAR(h_nerr,
672 [#ifdef HAVE_NETDB_H
673 #include <netdb.h>
674 #endif
675 #ifdef HAVE_WS2TCPIP_H
676 #include <ws2tcpip.h>
677 #endif])
678
679 rk_CHECK_VAR([__progname],
680 [#ifdef HAVE_ERR_H
681 #include <err.h>
682 #endif])
683
684 AC_CHECK_DECLS([optarg, optind, opterr, optopt, environ],[],[],[
685 #include <stdlib.h>
686 #ifdef HAVE_UNISTD_H
687 #include <unistd.h>
688 #endif])
689
690 dnl
691 dnl Check for fields in struct tm
692 dnl
693
694 AC_HAVE_STRUCT_FIELD(struct tm, tm_gmtoff, [#include <time.h>])
695 AC_HAVE_STRUCT_FIELD(struct tm, tm_zone, [#include <time.h>])
696
697 dnl
698 dnl or do we have a variable `timezone' ?
699 dnl
700
701 rk_CHECK_VAR(timezone,[#include <time.h>])
702 rk_CHECK_VAR(altzone,[#include <time.h>])
703
704 AC_HAVE_TYPE([sa_family_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([socklen_t],[
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], [
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 sockaddr_storage], [
729 #include <sys/types.h>
730 #ifdef HAVE_SYS_SOCKET_H
731 #include <sys/socket.h>
732 #endif
733 #ifdef HAVE_WS2TCPIP_H
734 #include <ws2tcpip.h>
735 #endif])
736 AC_HAVE_TYPE([struct addrinfo], [
737 #include <sys/types.h>
738 #ifdef HAVE_NETDB_H
739 #include <netdb.h>
740 #endif
741 #ifdef HAVE_WS2TCPIP_H
742 #include <ws2tcpip.h>
743 #endif])
744 AC_HAVE_TYPE([struct ifaddrs], [#include <ifaddrs.h>])
745 AC_HAVE_TYPE([struct iovec],[
746 #include <sys/types.h>
747 #include <sys/uio.h>
748 ])
749 AC_HAVE_TYPE([struct msghdr],[
750 #include <sys/types.h>
751 #ifdef HAVE_SYS_SOCKET_H
752 #include <sys/socket.h>
753 #endif
754 #ifdef HAVE_WS2TCPIP_H
755 #include <ws2tcpip.h>
756 #endif])
757
758 dnl
759 dnl Check for struct winsize
760 dnl
761
762 AC_KRB_STRUCT_WINSIZE
763
764 dnl
765 dnl Check for struct spwd
766 dnl
767
768 AC_KRB_STRUCT_SPWD
769
770 #
771 # Check if we want samba's socket wrapper
772 #
773
774 samba_SOCKET_WRAPPER
775
776 dnl won't work with automake
777 dnl moved to AC_OUTPUT in configure.in
778 dnl AC_CONFIG_FILES($1/Makefile)
779
780 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
781
782 AC_SUBST(DIR_roken)dnl
783 AC_SUBST(LIB_roken)dnl
784 AC_SUBST(INCLUDES_roken)dnl
785 ])