4 dnl Test if hstrerror wants const or not
7 dnl AC_FUNC_HSTRERROR_CONST(includes, function)
9 AC_DEFUN([AC_FUNC_HSTRERROR_CONST], [
10 AC_CACHE_CHECK([if hstrerror needs const], ac_cv_func_hstrerror_const,
11 AC_TRY_COMPILE([netdb.h],
12 [const char *hstrerror(int);],
13 ac_cv_func_hstrerror_const=no,
14 ac_cv_func_hstrerror_const=yes))
15 if test "$ac_cv_func_hstrerror_const" = "yes"; then
16 AC_DEFINE(NEED_HSTRERROR_CONST, 1, [define if hstrerror is const])