s4-heimdal: disable using the system compile_et for now
[mat/samba.git] / source4 / heimdal_build / wscript_configure
1 #!/usr/bin/env python
2
3 conf.CHECK_TYPE('u_char', 'uint8_t')
4 conf.CHECK_TYPE('u_int32_t', 'uint32_t')
5
6 conf.CHECK_HEADERS('err.h')
7
8 conf.CHECK_HEADERS('ifaddrs.h')
9 conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
10                   sys/file.h sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h
11               sys/utsname.h time.h timezone.h ttyname.h netinet/in.h
12               netinet/in6.h netinet6/in6.h libintl.h''')
13
14 conf.CHECK_HEADERS('curses.h term.h termcap.h', together=True)
15
16 conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
17                     putenv rcmd readv sendmsg setitimer strlwr strncasecmp
18             strptime strsep strsep_copy    strtok_r strupr swab umask uname unsetenv
19             closefrom err warn errx warnx flock writev''')
20
21 conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
22 conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
23                        sethostent endhostent getipnodebyaddr freehostent gethostbyname
24                        gethostbyname_r gethostbyaddr''',
25                     'socket nsl',
26                     checklibc=True)
27
28 conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')
29
30 conf.CHECK_FUNCS('iruserok')
31
32 conf.CHECK_FUNCS('bswap16')
33 conf.CHECK_FUNCS('bswap32')
34
35 conf.CHECK_TYPE('struct winsize', define='HAVE_STRUCT_WINSIZE', headers='sys/termios.h sys/ioctl.h')
36 conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_xpixel',
37                     define='HAVE_WS_XPIXEL', headers='sys/termios.h sys/ioctl.h')
38 conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_ypixel',
39                     define='HAVE_WS_YPIXEL', headers='sys/termios.h sys/ioctl.h')
40 conf.DEFINE('HAVE_KRB_STRUCT_WINSIZE', 1)
41 conf.DEFINE('VOID_RETSIGTYPE', 1)
42
43 conf.CHECK_VARIABLE('h_errno', headers='netdb.h')
44
45 # strangely enough, we need it with another define too
46 conf.CHECK_DECLS('h_errno', headers='netdb.h')
47
48 conf.CHECK_FUNCS_IN('res_search res_nsearch res_ndestroy dns_search dn_expand', 'resolv',
49                     checklibc=True, headers='netinet/in.h arpa/nameser.h resolv.h dns.h')
50 conf.CHECK_VARIABLE('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
51 conf.CHECK_DECLS('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
52 conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')
53
54 conf.DEFINE('HAVE_KRB5',1)
55 conf.DEFINE('HAVE_GSSAPI',1)
56
57 conf.CHECK_FUNCS('dirfd', headers='dirent.h')
58 conf.CHECK_DECLS('dirfd', reverse=True, headers='dirent.h')
59 conf.CHECK_STRUCTURE_MEMBER('DIR', 'dd_fd', define='HAVE_DIR_DD_FD',  headers='dirent.h')
60
61 conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
62
63 if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
64     conf.define('USING_SYSTEM_COM_ERR', 1)
65
66 # disable trying to use an external compile_et until we have a configure
67 # test that checks that the system one actually works. On some systems it
68 # results in missing symbols (eg. OpenSUSE 10.2 'opi' in the build farm)
69 #if conf.find_program('compile_et', var='COMPILE_ET'):
70 #    conf.define('USING_SYSTEM_COMPILE_ET', 1)