summaryrefslogtreecommitdiff
path: root/source4/heimdal_build/wscript_configure
blob: e8f258ca460dbe2ac0ea4a686e845729df2e9462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python

conf.CHECK_TYPE('u_char', 'uint8_t')
conf.CHECK_TYPE('u_int32_t', 'uint32_t')

conf.CHECK_HEADERS('err.h')

conf.CHECK_HEADERS('ifaddrs.h')
conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
                  sys/file.h sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h
              sys/utsname.h time.h timezone.h ttyname.h netinet/in.h
              netinet/in6.h netinet6/in6.h libintl.h''')

conf.CHECK_HEADERS('curses.h term.h termcap.h', together=True)

conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
                    putenv rcmd readv sendmsg setitimer strlwr strncasecmp
            strptime strsep strsep_copy    strtok_r strupr swab umask uname unsetenv
            closefrom err warn errx warnx flock writev''')

conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
                       sethostent endhostent getipnodebyaddr freehostent gethostbyname
                       gethostbyname_r gethostbyaddr''',
                    'socket nsl',
                    checklibc=True)

conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')

conf.CHECK_FUNCS('iruserok')

conf.CHECK_FUNCS('bswap16')
conf.CHECK_FUNCS('bswap32')

conf.CHECK_TYPE('struct winsize', define='HAVE_STRUCT_WINSIZE', headers='sys/termios.h sys/ioctl.h')
conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_xpixel',
                    define='HAVE_WS_XPIXEL', headers='sys/termios.h sys/ioctl.h')
conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_ypixel',
                    define='HAVE_WS_YPIXEL', headers='sys/termios.h sys/ioctl.h')
conf.DEFINE('HAVE_KRB_STRUCT_WINSIZE', 1)
conf.DEFINE('VOID_RETSIGTYPE', 1)

conf.CHECK_VARIABLE('h_errno', headers='netdb.h')

# strangely enough, we need it with another define too
conf.CHECK_DECLS('h_errno', headers='netdb.h')

conf.CHECK_FUNCS_IN('res_search res_nsearch res_ndestroy dns_search dn_expand', 'resolv',
                    checklibc=True, headers='netinet/in.h arpa/nameser.h resolv.h dns.h')
conf.CHECK_VARIABLE('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
conf.CHECK_DECLS('_res', headers='netinet/in.h arpa/nameser.h resolv.h')
conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h libutil.h')

conf.DEFINE('HAVE_KRB5',1)
conf.DEFINE('HAVE_GSSAPI',1)

conf.CHECK_FUNCS('dirfd', headers='dirent.h')
conf.CHECK_DECLS('dirfd', reverse=True, headers='dirent.h')
conf.CHECK_STRUCTURE_MEMBER('DIR', 'dd_fd', define='HAVE_DIR_DD_FD',  headers='dirent.h')

conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)

if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
    conf.define('USING_SYSTEM_COM_ERR', 1)

if conf.find_program('compile_et', var='COMPILE_ET'):
    conf.define('USING_SYSTEM_COMPILE_ET', 1)