]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Shuffled FD_SETSIZE detection into os-deps.m4
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jul 2010 18:38:41 +0000 (20:38 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jul 2010 18:38:41 +0000 (20:38 +0200)
acinclude/os-deps.m4
configure.in

index 7e88aba71ac6f88893c3488443d7a18883cf06d0..8c5721764597639054341bf56b21970c23e8d7fa 100644 (file)
@@ -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 <stdio.h>
+#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#if HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_WINSOCK_H
+#include <winsock.h>
+#endif
+#if HAVE_WINSOCK2_H
+#include <winsock2.h>
+#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])
+])
index 3075bb352836cda6f19f3f28d0353c1ec40a7a85..cb11c065a0f282bd79aa11f508ce859acb232ffb 100644 (file)
@@ -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 <stdio.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-#if HAVE_WINSOCK2_H
-#include <winsock2.h>
-#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)