r23796: main COPYING file for samba4, plus some formatting varients
[samba.git] / source / lib / talloc / libtalloc.m4
index 14e92b212cd085ab3659b3e92c41b8195ff21989..d2e8eba81a4ce33a05b10689300c55d0c83435d7 100644 (file)
@@ -1,15 +1,25 @@
 dnl find the talloc sources. This is meant to work both for 
 dnl talloc standalone builds, and builds of packages using talloc
 tallocdir=""
-for d in "$srcdir" "$srcdir/lib/talloc" "$srcdir/talloc" "$srcdir/../talloc"; do
+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
-TALLOCOBJ="talloc.o"
-AC_SUBST(TALLOCOBJ)
+if test x"$tallocdir" = "x"; then
+   AC_MSG_ERROR([cannot find talloc source in $tallocpaths])
+fi
+TALLOC_OBJ="talloc.o"
+AC_SUBST(TALLOC_OBJ)
+
+TALLOC_CFLAGS="-I$tallocdir"
+AC_SUBST(TALLOC_CFLAGS)
+
+TALLOC_LIBS=""
+AC_SUBST(TALLOC_LIBS)
 
 AC_CHECK_SIZEOF(size_t,cross)
 AC_CHECK_SIZEOF(void *,cross)