summaryrefslogtreecommitdiffstats
path: root/source3/lib/talloc/libtalloc.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-09-22 04:16:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:01:02 -0500
commit21931b1ca834f41c5ca931cdfb6f0347b5cb3c96 (patch)
tree0e93b2474ef97d0f68e2da0d73bd1fc3ad924926 /source3/lib/talloc/libtalloc.m4
parent200d2383020c105447b214b40ecd50821d654388 (diff)
downloadsamba-21931b1ca834f41c5ca931cdfb6f0347b5cb3c96.tar.gz
samba-21931b1ca834f41c5ca931cdfb6f0347b5cb3c96.tar.xz
samba-21931b1ca834f41c5ca931cdfb6f0347b5cb3c96.zip
r18810: use a copy of samba4's talloc under lib/talloc/
to make mergeing easier. metze (This used to be commit d49ffbc19b29f7620e427de133ffab74721f37e8)
Diffstat (limited to 'source3/lib/talloc/libtalloc.m4')
-rw-r--r--source3/lib/talloc/libtalloc.m427
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/lib/talloc/libtalloc.m4 b/source3/lib/talloc/libtalloc.m4
new file mode 100644
index 00000000000..4a0ee3c8fc5
--- /dev/null
+++ b/source3/lib/talloc/libtalloc.m4
@@ -0,0 +1,27 @@
+dnl find the talloc sources. This is meant to work both for
+dnl talloc standalone builds, and builds of packages using talloc
+tallocdir=""
+tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc"
+for d in $tallocpaths; do
+ if test -f "$d/talloc.c"; then
+ tallocdir="$d"
+ AC_SUBST(tallocdir)
+ break;
+ fi
+done
+if test x"$tallocdir" = "x"; then
+ AC_MSG_ERROR([cannot find talloc source in $tallocpaths])
+fi
+TALLOCOBJ="talloc.o"
+AC_SUBST(TALLOCOBJ)
+
+AC_CHECK_SIZEOF(size_t,cross)
+AC_CHECK_SIZEOF(void *,cross)
+
+if test $ac_cv_sizeof_size_t -lt $ac_cv_sizeof_void_p; then
+ AC_WARN([size_t cannot represent the amount of used memory of a process])
+ AC_WARN([please report this to <samba-technical@samba.org>])
+ AC_WARN([sizeof(size_t) = $ac_cv_sizeof_size_t])
+ AC_WARN([sizeof(void *) = $ac_cv_sizeof_void_p])
+ AC_ERROR([sizeof(size_t) < sizeof(void *)])
+fi