From: Francesco Chemolli Date: Thu, 29 Jul 2010 18:38:41 +0000 (+0200) Subject: Shuffled FD_SETSIZE detection into os-deps.m4 X-Git-Tag: take1~402^2~2^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ca3e305eee25fe77d04ca211cd50c75970d4a04;p=thirdparty%2Fsquid.git Shuffled FD_SETSIZE detection into os-deps.m4 --- diff --git a/acinclude/os-deps.m4 b/acinclude/os-deps.m4 index 7e88aba71a..8c57217645 100644 --- a/acinclude/os-deps.m4 +++ b/acinclude/os-deps.m4 @@ -194,3 +194,43 @@ AC_CHECK_MEMBERS([struct mallinfo.mxfast],,,[ #endif]) ]) +dnl check the default FD_SETSIZE size. +dnl not cached, people are likely to tune this +dnl defines DEFAULT_FD_SETSIZE + +AC_DEFUN([SQUID_CHECK_DEFAULT_FD_SETSIZE],[ +AC_MSG_CHECKING(Default FD_SETSIZE value) +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#if HAVE_STDIO_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_SYS_TIME_H +#include +#endif +#if HAVE_SYS_SELECT_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_WINSOCK_H +#include +#endif +#if HAVE_WINSOCK2_H +#include +#endif +int main(int argc, char **argv) { + FILE *fp = fopen("conftestval", "w"); + fprintf (fp, "%d\n", FD_SETSIZE); + return 0; +} +]])],[DEFAULT_FD_SETSIZE=`cat conftestval`],[DEFAULT_FD_SETSIZE=256],[DEFAULT_FD_SETSIZE=256]) +AC_MSG_RESULT($DEFAULT_FD_SETSIZE) +AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, [Default FD_SETSIZE value]) +]) diff --git a/configure.in b/configure.in index 3075bb3528..cb11c065a0 100644 --- a/configure.in +++ b/configure.in @@ -2969,6 +2969,7 @@ AC_ARG_ENABLE(gnuregex, library built in.]), [ SQUID_YESNO([$enableval],[unrecognized argument to --enable-gnuregex: $enableval]) ]) +# force-enbable on old solaris and nextstep if test "${enable_gnuregex:=auto}" = "auto" ; then case "$host" in *-sun-solaris2.[[0-4]]) @@ -3004,42 +3005,7 @@ fi SQUID_DEFINE_BOOL(USE_GNUREGEX,$enable_gnuregex,[Define if we should use GNU regex]) AC_SUBST(REGEXLIB) -dnl Not cached since people are likely to tune this -AC_MSG_CHECKING(Default FD_SETSIZE value) -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#if HAVE_STDIO_H -#include -#endif -#if HAVE_UNISTD_H -#include -#endif -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_SYS_TIME_H -#include -#endif -#if HAVE_SYS_SELECT_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_WINSOCK_H -#include -#endif -#if HAVE_WINSOCK2_H -#include -#endif -int main(int argc, char **argv) { - FILE *fp = fopen("conftestval", "w"); - fprintf (fp, "%d\n", FD_SETSIZE); - return 0; -} -]])],[DEFAULT_FD_SETSIZE=`cat conftestval`],[DEFAULT_FD_SETSIZE=256],[DEFAULT_FD_SETSIZE=256]) -AC_MSG_RESULT($DEFAULT_FD_SETSIZE) -AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, [Default FD_SETSIZE value]) - +SQUID_CHECK_DEFAULT_FD_SETSIZE dnl Not cached since people are likely to tune this AC_MSG_CHECKING(Maximum number of filedescriptors we can open)