From: Todd Vierling Date: Sat, 17 Apr 2004 15:30:40 +0000 (+0000) Subject: Peter O'Gorman X-Git-Tag: release-1-9b~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e72c23fc80c9790266208e88db92b5c9dfdd5e4;p=thirdparty%2Flibtool.git Peter O'Gorman * m4/libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): Use sysctl to get the max cmd length on BSD* and darwin. Make sure that there is a safety factor too. --- diff --git a/ChangeLog b/ChangeLog index 7532c5ed9..9f42fad75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-04-17 Todd Vierling , + Peter O'Gorman + + * m4/libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN): Use sysctl to get the + max cmd length on BSD* and darwin. Make sure that there is a safety + factor too. + 2004-04-15 Scott James Remnant * m4/libtool.m4 (_LT_LANG_DEFAULT_CONFIG): Remove code to handle 'none' diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 1ceda3282..5ae8637ce 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1107,6 +1107,18 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; + netbsd* | freebsd* | openbsd* | darwin* ) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` + elif test -x /usr/sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` + else + lt_cv_sys_max_cmd_len=65536 # usable default for *BSD + fi + # And add a safety zone + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + ;; *) # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start.