]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
--with-filedescriptors=XX configure option (Francesco Chemolli)
authorhno <>
Fri, 20 Sep 2002 16:56:56 +0000 (16:56 +0000)
committerhno <>
Fri, 20 Sep 2002 16:56:56 +0000 (16:56 +0000)
configure.in

index f9115b3fbe3f4d34f6a6d9f1d426381e5d70da0b..231d5f46e6bba88373c4ac326e10e5d2d71bc9b8 100644 (file)
@@ -3,7 +3,7 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.284 2002/09/16 12:50:13 robertc Exp $
+dnl  $Id: configure.in,v 1.285 2002/09/20 10:56:56 hno Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@ AC_INIT(src/main.c)
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.284 $)dnl
+AC_REVISION($Revision: 1.285 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -1151,6 +1151,10 @@ AC_ARG_ENABLE(x_accelerator_vary,
   fi
 ])
 
+AC_ARG_WITH(filedescriptors,
+[  --with-filedescriptors=NUMBER Force squid to support NUMBER filedescriptors],
+[ squid_filedescriptors_num=$withval ])
+
 # Force some compilers to use ANSI features
 #
 case "$host" in
@@ -1935,17 +1939,22 @@ DEFAULT_FD_SETSIZE=256)
 AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
 AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE)
 
+
 dnl Not cached since people are likely to tune this
 AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
 dnl damn! FreeBSD's pthreads breaks dup2().
-TLDFLAGS="$LDFLAGS"
-case $host in
-i386-unknown-freebsd*)
-    if echo "$LDFLAGS" | grep -q pthread; then
-       LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
-    fi
-esac
-AC_TRY_RUN([
+if test -n "$squid_filedescriptors_num" ; then
+  SQUID_MAXFD=$squid_filedescriptors_num
+  AC_MSG_RESULT($SQUID_MAXFD (user-forced))
+else
+  TLDFLAGS="$LDFLAGS"
+  case $host in
+  i386-unknown-freebsd*)
+      if echo "$LDFLAGS" | grep -q pthread; then
+       LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
+      fi
+  esac
+  AC_TRY_RUN([
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/time.h>  /* needed on FreeBSD */
@@ -2001,11 +2010,12 @@ main() {
        fprintf (fp, "%d\n", i);
        exit(0);
 }
-],
-SQUID_MAXFD=`cat conftestval`,
-SQUID_MAXFD=256,
-SQUID_MAXFD=256)
-AC_MSG_RESULT($SQUID_MAXFD)
+  ],
+  SQUID_MAXFD=`cat conftestval`,
+  SQUID_MAXFD=256,
+  SQUID_MAXFD=256)
+  AC_MSG_RESULT($SQUID_MAXFD)
+fi
 AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
 if test "$SQUID_MAXFD" -lt 512 ; then
     echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"