dnl CF_WITH_NC_ALLOC_H version: 6 updated: 2021/03/24 18:52:45
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 "$enable_leaks" = no ; then
	AC_CHECK_HEADER(nc_alloc.h)
	AC_CHECK_FUNCS(exit_curses exit_terminfo _nc_free_and_exit)
fi
;;
esac
])dnl
