Subject: 'checking length of command line arguments' configure delays
To: NetBSD Packages <>
From: Dick Davies <>
List: tech-pkg
Date: 04/08/2004 16:48:27
When building packages that use GNU configure, I've found that one
of the steps is often

checking the maximum length of command line arguments...

This causes a noticable delay for me, as configure tries to work it
out itself.

I mentioned it to a FreeBSD using friend who pointed me to their fix,
which I added into pkgsrc/mk/

It seems to fix the delays for me, it also uses sysctl to give
an accurate value (GNU configure tends to give up above a certain
value and say 'it's bigger than X so assume X', which is a bit half-assed

I've only tried it on my 1.6X i386, are there any issues with it?

RCS file: /pub/NetBSD-CVS/pkgsrc/mk/,v
retrieving revision 1.1438
diff -r1.1438
> # Maximum command line length
> .if !defined(CONFIGURE_MAX_CMD_LEN)
> .if exists(/sbin/sysctl)
> CONFIGURE_MAX_CMD_LEN!= /sbin/sysctl -n kern.argmax
> .endif
> .endif
> CONFIGURE_ENV+=     lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN}

When you have an efficient government, you have a dictatorship.
		-- Harry Truman
Rasputin :: Jack of All Trades - Master of Nuns