1 dnl Check to see if we should use the included talloc
4 AC_ARG_WITH(included-talloc,
5 [AC_HELP_STRING([--with-included-talloc], [use bundled talloc library, not from system])],
6 [ INCLUDED_TALLOC=$withval ])
9 AC_SUBST(TALLOC_CFLAGS)
11 if test x"$INCLUDED_TALLOC" != x"yes" ; then
12 AC_CHECK_HEADERS(talloc.h)
13 AC_CHECK_LIB(talloc, talloc_init, [ TALLOC_LIBS="-ltalloc" ])
14 if test x"$ac_cv_header_talloc_h" = x"no" -o x"$ac_cv_lib_talloc_talloc_init" = x"no" ; then
22 AC_MSG_CHECKING(whether to use included talloc)
23 AC_MSG_RESULT($INCLUDED_TALLOC)
24 if test x"$INCLUDED_TALLOC" != x"no" ; then
25 dnl find the talloc sources. This is meant to work both for
26 dnl talloc standalone builds, and builds of packages using talloc
28 tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
29 for d in $tallocpaths; do
30 if test -f "$srcdir/$d/talloc.c"; then
36 if test x"$tallocdir" = "x"; then
37 AC_MSG_ERROR([cannot find talloc source in $tallocpaths])
42 TALLOC_CFLAGS="-I$srcdir/$tallocdir"
43 AC_SUBST(TALLOC_CFLAGS)
49 AC_CHECK_SIZEOF(size_t,cross)
50 AC_CHECK_SIZEOF(void *,cross)
52 if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
53 AC_WARN([size_t cannot represent the amount of used memory of a process])
54 AC_WARN([please report this to <samba-technical@samba.org>])
55 AC_WARN([sizeof(size_t) = $ac_cv_sizeof_size_t])
56 AC_WARN([sizeof(void *) = $ac_cv_sizeof_void_p])
57 AC_ERROR([sizeof(size_t) < sizeof(void *)])
60 if test x"$VERSIONSCRIPT" != "x"; then
61 EXPORTSFILE=talloc.exports