r13121: Tag 4.0.0TP1
[Samba.git] / source / lib / ldb / aclocal.m4
blobcdc2a2fa5210c9d8eafbb558b947917579f27d83
1 dnl see if a declaration exists for a function or variable
2 dnl defines HAVE_function_DECL if it exists
3 dnl AC_HAVE_DECL(var, includes)
4 AC_DEFUN(AC_HAVE_DECL,
6  AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
7     AC_TRY_COMPILE([$2],[int i = (int)$1],
8         ac_cv_have_$1_decl=yes,ac_cv_have_$1_decl=no)])
9  if test x"$ac_cv_have_$1_decl" = x"yes"; then
10     AC_DEFINE([HAVE_]translit([$1], [a-z], [A-Z])[_DECL],1,[Whether $1() is available])
11  fi