2 m4_define([upcase],`echo $1 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`)dnl
4 dnl love_FIND_FUNC(func, includes, arguments)
5 dnl kind of like AC_CHECK_FUNC, but with headerfiles
6 AC_DEFUN([love_FIND_FUNC], [
8 AC_MSG_CHECKING([for $1])
9 AC_CACHE_VAL(ac_cv_love_func_$1,
11 AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]],[[$1($3)]])],
12 [eval "ac_cv_love_func_$1=yes"],[eval "ac_cv_love_func_$1=no"])])
14 eval "ac_res=\$ac_cv_love_func_$1"
20 eval "ac_tr_func=HAVE_[]upcase($1)"
24 AC_DEFINE_UNQUOTED($ac_tr_func)
85 love_FIND_FUNC(bswap16, [#ifdef HAVE_SYS_BSWAP_H
86 #include <sys/bswap.h>
89 love_FIND_FUNC(bswap32, [#ifdef HAVE_SYS_BSWAP_H
90 #include <sys/bswap.h>
94 AC_CHECK_DECL(h_errno,
95 [AC_DEFINE(HAVE_DECL_H_ERRNO,1,whether h_errno is declared)], [], [
96 #ifdef HAVE_SYS_TYPES_H
97 #include <sys/types.h>
103 # these are disabled unless heimdal is found below
104 SMB_MODULE_DEFAULT(KERBEROS_LIB, NOT)
105 SMB_BINARY_ENABLE(asn1_compile, NO)
106 SMB_BINARY_ENABLE(compile_et, NO)
108 # to enable kerberos, unpack a heimdal source tree in the heimdal directory
109 # of the samba source tree
110 if test -d heimdal; then
111 AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available])
112 CFLAGS="${CFLAGS} -Iheimdal_build -Iheimdal/lib/krb5 -Iheimdal/lib/gssapi -Iheimdal/lib/asn1 -Iheimdal/lib/com_err -Iheimdal/lib/hdb -Iheimdal/kdc"
114 SMB_MODULE_DEFAULT(KERBEROS_LIB, STATIC)
115 SMB_BINARY_ENABLE(asn1_compile, YES)
116 SMB_BINARY_ENABLE(compile_et, YES)