r8306: some more heimdal configure checks
[sfrench/samba-autobuild/.git] / source / heimdal_build / config.m4
1 AC_CHECK_HEADERS(sys/file.h signal.h errno.h crypt.h curses.h sys/bittypes.h)
2 AC_CHECK_HEADERS(sys/stropts.h sys/timeb.h sys/times.h sys/uio.h sys/un.h)
3 AC_CHECK_HEADERS(sys/utsname.h termcap.h term.h timezone.h time.h ttyname.h netdb.h)
4
5 AC_CHECK_FUNCS(setitimer uname umask unsetenv socket sendmsg putenv atexit strsep)
6 AC_CHECK_FUNCS(strlwr strncasecmp strptime strsep_copy strtok_r strupr swab writev readv)
7 AC_CHECK_FUNCS(inet_ntop)
8
9 AC_CHECK_DECL(h_errno, 
10               [AC_DEFINE(HAVE_DECL_H_ERRNO,1,whether h_errno is declared)], [], [
11 #ifdef HAVE_SYS_TYPES_H
12 #include <sys/types.h>
13 #endif
14 #ifdef HAVE_NETDB_H
15 #include <netdb.h>
16 #endif])
17
18 # these are disabled unless heimdal is found below
19 SMB_MODULE_DEFAULT(KERBEROS_LIB, NOT)
20 SMB_BINARY_ENABLE(asn1_compile, NO)
21 SMB_BINARY_ENABLE(compile_et, NO)
22
23 # to enable kerberos, unpack a heimdal source tree in the heimdal directory
24 # of the samba source tree
25 if test -d heimdal; then
26         AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available])
27         CFLAGS="${CFLAGS} -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/gssapi -Iheimdal/lib/asn1 -Iheimdal/lib/com_err -Iheimdal/lib/hdb -Iheimdal/kdc"
28         HAVE_KRB5=YES
29         SMB_MODULE_DEFAULT(KERBEROS_LIB, STATIC)
30         SMB_BINARY_ENABLE(asn1_compile, YES)
31         SMB_BINARY_ENABLE(compile_et, YES)
32 fi