2010-03-28 01:48:49 +03:00
#!/usr/bin/env python
2010-06-23 12:09:02 +04:00
conf.CHECK_TYPE('u_char', 'uint8_t')
conf.CHECK_TYPE('u_int32_t', 'uint32_t')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_HEADERS('err.h')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_HEADERS('ifaddrs.h')
conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
2010-10-04 17:23:24 +04:00
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''')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_HEADERS('curses.h term.h termcap.h', together=True)
2010-03-15 11:22:12 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
putenv rcmd readv sendmsg setitimer strlwr strncasecmp
2010-10-04 17:23:24 +04:00
strptime strsep strsep_copy strtok_r strupr swab umask uname unsetenv
closefrom err warn errx warnx flock writev''')
2010-03-20 09:51:55 +03:00
2010-06-23 12:09:02 +04:00
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)
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h')
2010-03-30 09:52:08 +04:00
2010-06-23 12:09:02 +04:00
conf.CHECK_FUNCS('iruserok')
2010-03-07 09:20:32 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_FUNCS('bswap16')
conf.CHECK_FUNCS('bswap32')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_TYPE('struct winsize', define='HAVE_STRUCT_WINSIZE', headers='sys/termios.h sys/ioctl.h')
conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_xpixel',
2010-10-04 17:23:24 +04:00
define='HAVE_WS_XPIXEL', headers='sys/termios.h sys/ioctl.h')
2010-06-23 12:09:02 +04:00
conf.CHECK_STRUCTURE_MEMBER('struct winsize', 'ws_ypixel',
2010-10-04 17:23:24 +04:00
define='HAVE_WS_YPIXEL', headers='sys/termios.h sys/ioctl.h')
2010-06-23 12:09:02 +04:00
conf.DEFINE('HAVE_KRB_STRUCT_WINSIZE', 1)
conf.DEFINE('VOID_RETSIGTYPE', 1)
2010-03-07 05:49:03 +03:00
2010-06-23 12:09:02 +04:00
conf.CHECK_VARIABLE('h_errno', headers='netdb.h')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
# strangely enough, we need it with another define too
conf.CHECK_DECLS('h_errno', headers='netdb.h')
2010-03-17 12:40:03 +03:00
2010-06-23 12:09:02 +04:00
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')
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
conf.DEFINE('HAVE_KRB5',1)
conf.DEFINE('HAVE_GSSAPI',1)
2010-03-17 12:21:47 +03:00
2010-06-23 12:09:02 +04:00
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')
2010-03-28 15:24:15 +04:00
2010-06-23 12:09:02 +04:00
conf.DEFINE('SAMBA4_INTERNAL_HEIMDAL', 1)
2010-10-04 16:13:24 +04:00
2010-10-05 19:15:14 +04:00
if conf.CHECK_BUNDLED_SYSTEM('com_err', checkfunctions='com_right_r com_err', headers='com_err.h'):
2010-10-04 16:13:24 +04:00
conf.define('USING_SYSTEM_COM_ERR', 1)
2010-10-04 17:23:24 +04:00
2010-10-06 11:03:07 +04:00
# disable trying to use an external compile_et until we have a configure
# test that checks that the system one actually works. On some systems it
# results in missing symbols (eg. OpenSUSE 10.2 'opi' in the build farm)
#if conf.find_program('compile_et', var='COMPILE_ET'):
# conf.define('USING_SYSTEM_COMPILE_ET', 1)