dnl CF_WITH_NC_ALLOC_H version: 4 updated: 2008/11/01 12:44:02
dnl ------------------
dnl Applications that use ncurses can provide better leak-checking if they
dnl call ncurses' functions to free its memory on exit.  That is normally not
dnl configured (--disable-leaks), but is useful in a debugging library.
dnl
dnl Use this after checking for ncurses/ncursesw libraries.
AC_DEFUN([CF_WITH_NC_ALLOC_H],
[
AC_REQUIRE([CF_DISABLE_LEAKS])

case $LIBS in #(vi
*ncurses*)

if test "$with_no_leaks" = yes ; then
	AC_CHECK_HEADER(nc_alloc.h)
	AC_CHECK_FUNCS(_nc_free_and_exit)
fi
;;
esac
])dnl
