Merge branch 'master' of ssh://git.samba.org/data/git/samba into wmi
[sfrench/samba-autobuild/.git] / source4 / lib / talloc / libtalloc.m4
index 06d5a15ff420750af3a067ed5206ea807970feed..fd2b4b22cdbb21777d5ea90a7e303d4a9f12a7b5 100644 (file)
@@ -1,19 +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=""
-tallocpaths="$srcdir $srcdir/lib/talloc $srcdir/talloc $srcdir/../talloc"
+tallocpaths=". lib/talloc talloc ../talloc"
 for d in $tallocpaths; do
-       if test -f "$d/talloc.c"; then
-               tallocdir="$d"          
+       if test -f "$srcdir/$d/talloc.c"; then
+               tallocdir="$d"
                AC_SUBST(tallocdir)
                break;
        fi
 done
-if [ x"$tallocdir" = "x" ];  then
+if test x"$tallocdir" = "x"; then
    AC_MSG_ERROR([cannot find talloc source in $tallocpaths])
 fi
-TALLOCOBJ="talloc.o"
-AC_SUBST(TALLOCOBJ)
+TALLOC_OBJ="talloc.o"
+AC_SUBST(TALLOC_OBJ)
+
+TALLOC_CFLAGS="-I$srcdir/$tallocdir"
+AC_SUBST(TALLOC_CFLAGS)
+
+TALLOC_LIBS=""
+AC_SUBST(TALLOC_LIBS)
 
 AC_CHECK_SIZEOF(size_t,cross)
 AC_CHECK_SIZEOF(void *,cross)