]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Peter O'Gorman <peter@pogma.com>
authorTodd Vierling <tv@duh.org>
Sat, 17 Apr 2004 15:30:40 +0000 (15:30 +0000)
committerPeter O'Gorman <peter@pogma.com>
Sat, 17 Apr 2004 15:30:40 +0000 (15:30 +0000)
* 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.

ChangeLog
m4/libtool.m4

index 7532c5ed9144638b0188d796dcf6daa69731500b..9f42fad7511d4199f859af7cd8b087c30d3dbd9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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'
index 1ceda32823b67238729b148918ceff99f7cc38ab..5ae8637ced5358eb077e9afb9c6bb643bd6c0100 100644 (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.