From: Todd Vierling Date: Mon, 2 Aug 2004 14:27:25 +0000 (+0000) Subject: Peter O'Gorman X-Git-Tag: release-1-5-8~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=832f6c16f67c66c4b95ed879554d0867014d96c6;p=thirdparty%2Flibtool.git Peter O'Gorman * 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 ce3630601..69b955d57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-08-02 Todd Vierling , + Peter O'Gorman + + * 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-08-02 Geoffrey Keating * libtool.m4 [darwin]: Don't use -all_load. diff --git a/libtool.m4 b/libtool.m4 index d74f133bb..a65484890 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -678,6 +678,19 @@ 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` + ;; + *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but