Subject: Re: 'checking length of command line arguments' configure delays
To: Thomas Klausner <wiz@NetBSD.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 04/08/2004 21:32:12
On Thu, 8 Apr 2004 17:50:24 +0200
Thomas Klausner <wiz@NetBSD.org> wrote:

> On Thu, Apr 08, 2004 at 04:48:27PM +0100, Dick Davies wrote:
> > I've only tried it on my 1.6X i386, are there any issues with it?
> 
> Yes, it uses the empty string for all platforms where /sbin/sysctl
> doesn't exist or doesn't report anything useful....

Maybe we could add this then?  It seems safe enough, and avoids the need
of an external utility (like autoswc) that does much more than just this.

Index: defs.NetBSD.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defs.NetBSD.mk,v
retrieving revision 1.62
diff -u -r1.62 defs.NetBSD.mk
--- defs.NetBSD.mk	7 Apr 2004 14:26:51 -0000	1.62
+++ defs.NetBSD.mk	8 Apr 2004 19:31:36 -0000
@@ -200,3 +200,10 @@
 .if exists(/usr/include/sys/event.h)
 PKG_HAVE_KQUEUE=	# defined
 .endif
+
+# check for maximum command line length, to avoid a test in GNU configure
+# scripts that takes forever.
+.if defined(GNU_CONFIGURE) && !empty(GNU_CONFIGURE:M[Yy][Ee][Ss])
+_OPSYS_MAX_CMDLEN!=	/sbin/sysctl -n kern.argmax
+CONFIGURE_ENV+=		lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN}
+.endif

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/