Subject: Re: Determining the "maximum length of command line argument"
To: Johnny C. Lam <>
From: Andrew Grillet <>
List: tech-pkg
Date: 01/23/2004 23:01:41
> On Friday 23 Jan 2004 5:30 pm, Johnny C. Lam wrote:
> Newer GNU configure scripts try to determine the maximum length of
> command line arguments by trying trying to echo longer and longer
> strings until it find the longest string that it can echo (65536 on
> my i386 box).  This takes a fairly significant amount of time on my
> pretty muscular i386 system.  FreeBSD ports has recently decided to
> set this to 16384 for all builds to skip this time-consuming step of
> GNU configure scripts.  Can we do something similar?  How should we
> determine this on NetBSD systems? If it's exceptionally variable, can
> we arbitrarily choose a reasonble default for various
I have noticed this is a pain in the **** as well.

I guess the algorithm is the stupidest possible. What is wrong with a 
mroe sensible one, like doubling the length until failure, and then 
doing a binary search of the space between the last good try and the 
one that failed?

Perhaps this could be passed to the configure people.