$NetBSD: patch-ah,v 1.1 2002/10/14 11:49:56 skrll Exp $ --- aclocal.m4.orig Sun Jan 27 11:03:40 2002 +++ aclocal.m4 @@ -1254,6 +1254,48 @@ AC_DEFINE_UNQUOTED($1, $nsig) ]) dnl ## +dnl ## Check for FD_SETSIZE +dnl ## +dnl ## configure.in: +dnl ## AC_FDSETSIZE() + +AC_DEFUN(AC_FDSETSIZE,[dnl +AC_MSG_CHECKING(for value of FD_SETSIZE) +cross_compile=no +AC_TRY_RUN( +changequote(<<, >>)dnl +<< +#include +#include + +int main(int argc, char *argv[]) +{ + FILE *fp; + int ac_fdsetsize; + +#if defined(FD_SETSIZE) + ac_fdsetsize = FD_SETSIZE; +#else + ac_fdsetsize = (sizeof(fd_set)*8); +#endif + if ((fp = fopen("conftestval", "w")) == NULL) + exit(1); + fprintf(fp, "%d\n", ac_fdsetsize); + fclose(fp); + exit(0); +} +>> +changequote([, ])dnl +, +ac_fdsetsize=`cat conftestval`, +ac_fdsetsize=1024, +ac_fdsetsize=1024 +)dnl +AC_MSG_RESULT([$ac_fdsetsize]) +$1="$ac_fdsetsize" +]) + +dnl ## dnl ## Check for an external/extension library. dnl ## - is aware of -config style scripts dnl ## - searches under standard paths include, lib, etc.