libtalloc.m4 971 B

123456789101112131415161718192021222324252627282930313233
  1. dnl find the talloc sources. This is meant to work both for
  2. dnl talloc standalone builds, and builds of packages using talloc
  3. tallocdir=""
  4. tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc"
  5. for d in $tallocpaths; do
  6. if test -f "$d/talloc.c"; then
  7. tallocdir="$d"
  8. AC_SUBST(tallocdir)
  9. break;
  10. fi
  11. done
  12. if test x"$tallocdir" = "x"; then
  13. AC_MSG_ERROR([cannot find talloc source in $tallocpaths])
  14. fi
  15. TALLOC_OBJ="talloc.o"
  16. AC_SUBST(TALLOC_OBJ)
  17. TALLOC_CFLAGS="-I$tallocdir"
  18. AC_SUBST(TALLOC_CFLAGS)
  19. TALLOC_LIBS=""
  20. AC_SUBST(TALLOC_LIBS)
  21. AC_CHECK_SIZEOF(size_t,cross)
  22. AC_CHECK_SIZEOF(void *,cross)
  23. if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
  24. AC_WARN([size_t cannot represent the amount of used memory of a process])
  25. AC_WARN([please report this to <samba-technical@samba.org>])
  26. AC_WARN([sizeof(size_t) = $ac_cv_sizeof_size_t])
  27. AC_WARN([sizeof(void *) = $ac_cv_sizeof_void_p])
  28. AC_ERROR([sizeof(size_t) < sizeof(void *)])
  29. fi