1dnl Check for a yp_all() function that does not leak a file descriptor
2dnl to the ypserv process.
3AC_DEFUN([AMU_FUNC_BAD_YP_ALL],
4[
5AC_CACHE_CHECK(for a file-descriptor leakage clean yp_all,
6ac_cv_func_yp_all_clean,
7[
8# clean by default
9ac_cv_func_yp_all_clean=yes
10# select the correct type
11case "${host_os_name}" in
12	irix* )
13		ac_cv_func_yp_all_clean=no ;;
14	linux* )
15		# RedHat 5.1 systems with glibc glibc-2.0.7-19 or below
16		# leak a UDP socket from yp_all()
17		case "`cat /etc/redhat-release /dev/null 2>/dev/null`" in
18			*5.1* )
19				ac_cv_func_yp_all_clean=no ;;
20		esac
21esac
22])
23if test $ac_cv_func_yp_all_clean = no
24then
25  AC_DEFINE(HAVE_BAD_YP_ALL)
26fi
27])
28