]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Peter O'Gorman <peter@pogma.com>
authorTodd Vierling <tv@duh.org>
Mon, 2 Aug 2004 14:27:25 +0000 (14:27 +0000)
committerPeter O'Gorman <peter@pogma.com>
Mon, 2 Aug 2004 14:27:25 +0000 (14:27 +0000)
* 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.

ChangeLog
libtool.m4

index ce3630601b146abdfb2c6c13dbdb88f2fd9023c1..69b955d57f51a068ea374daa5274e4e9540bd3fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index d74f133bb3f2bd66b4bd009bf3bc9f8758c174c3..a654848900dc895d33e8294703b949bfb8322e8d 100644 (file)
@@ -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