Peter O'Gorman <peter@pogma.com>

* 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.
This commit is contained in:
Todd Vierling 2004-04-17 15:30:40 +00:00 committed by Peter O'Gorman
parent 51126ba3fd
commit 9e72c23fc8
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2004-04-17 Todd Vierling <tv@duh.org>,
Peter O'Gorman <peter@pogma.com>
* 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 <scott@netsplit.com>
* m4/libtool.m4 (_LT_LANG_DEFAULT_CONFIG): Remove code to handle 'none'

12
m4/libtool.m4 vendored
View File

@ -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.