]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Compat: accept -with-maxfd=N
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Oct 2008 11:42:32 +0000 (00:42 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Oct 2008 11:42:32 +0000 (00:42 +1300)
For backward compatability with Squid-2 we now accept the -with-maxfd
configure setting as an alternative to --with-filedescriptors.

--with-filedescriptors is still preferred, and the only one documented.
If both are set the value of --with-file-descriptors=N will be used.

configure.in

index 6a13a2088c07986621527a418da39508eb35dbfd..8315b5c1f8f658ff2e98658017553102a60f1e44 100755 (executable)
@@ -1991,10 +1991,21 @@ else
         AC_DEFINE(HAVE_SIN6_LEN_IN_SAI, 0, [Does struct sockaddr_in6 have sin6_len? 1: Yes, 0: No])
 fi
 
-
+dnl --with-maxfd present for compatibility with Squid-2.
+dnl undocumented in ./configure --help  to encourage using the Squid-3 directive.
+AC_ARG_WITH(maxfd,,
+[ 
+  case ${withval} in
+    [[0-9]]*)
+      squid_filedescriptors_num=$withval
+      ;;
+    *)
+      AC_MSG_ERROR(--with-maxfd expects a numeric argument)
+      ;;
+    esac
+])
 AC_ARG_WITH(filedescriptors,
-[  --with-filedescriptors=NUMBER
-                          Force squid to support NUMBER filedescriptors],
+  AC_HELP_STRING([--with-filedescriptors=NUMBER],[Force squid to support NUMBER filedescriptors]),
 [ 
   case ${withval} in
     [[0-9]]*)