1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/lib/talloc/libtalloc.m4
Simo Sorce e83f4b868b Add exports file and abi checker for talloc
This is a first attempt at exporting symbols only for public functions
We also provide a rudimentary ABI checker that tries to check that
function signatures are not changed by mistake.
Given our use of macros this is not an API checker.
It's all based on talloc.h contents and the gcc -aux-info option
2009-06-15 16:31:12 -04:00

39 lines
1.0 KiB
Plaintext

dnl find the talloc sources. This is meant to work both for
dnl talloc standalone builds, and builds of packages using talloc
tallocdir=""
tallocpaths=". lib/talloc talloc ../talloc ../lib/talloc"
for d in $tallocpaths; do
if test -f "$srcdir/$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
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)
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
if test x"$VERSIONSCRIPT" != "x"; then
EXPORTSFILE=talloc.exports
AC_SUBST(EXPORTSFILE)
fi