AC_DEFUN(AG_CHECK_POSIX_SYSINFO,[
AC_MSG_CHECKING([whether sysinfo(2) is POSIX])
AC_CACHE_VAL([ag_cv_posix_sysinfo],[
AC_TRY_RUN([#include <sys/systeminfo.h>
int main() { char z[ 256 ];
long sz = sysinfo( SI_SYSNAME, z, sizeof( z ));
return (sz > 0) ? 0 : 1; }],[ag_cv_posix_sysinfo=yes],[ag_cv_posix_sysinfo=no],[ag_cv_posix_sysinfo=no]
) # end of TRY_RUN]) # end of CACHE_VAL
AC_MSG_RESULT([$ag_cv_posix_sysinfo])
if test x$ag_cv_posix_sysinfo = xyes
then
AC_DEFINE(HAVE_POSIX_SYSINFO, 1,
[Define this if sysinfo(2) is POSIX])
fi
]) # end of AC_DEFUN