+2004-08-02 Todd Vierling <tv@duh.org>,
+ Peter O'Gorman <peter@pogma.com>
+
+ * 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 <geoffk@apple.com>
* libtool.m4 [darwin]: Don't use -all_load.
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