]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltconfig.in (lt_cv_sys_max_cmd_len): Improve test to work better
authorAlexandre Oliva <aoliva@redhat.com>
Sun, 20 May 2001 18:20:07 +0000 (18:20 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Sun, 20 May 2001 18:20:07 +0000 (18:20 +0000)
in case of non-built-in echo.  Set bounds correctly.

ChangeLog
ltconfig.in

index 9548e5eb3502fc1e41f7f2865c74290ddff1045f..7695b428337ec95e58b9127568891b547b5ee6c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-05-20  Alexandre Oliva  <aoliva@redhat.com>
 
+       * ltconfig.in (lt_cv_sys_max_cmd_len): Improve test to work better
+       in case of non-built-in echo.  Set bounds correctly.
+
        * ltcf-cxx.sh (allow_undefined_flag) [aix4* | aix5*]: Fix quote
        error.
 
index d97e90655b779534fec7e1d22ee5ff27b143e888..4fb74e5264eae3bfeccca0606829bc94e3ed0604 100755 (executable)
@@ -783,11 +783,15 @@ if test "${lt_cv_sys_max_cmd_len+set}" = set; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   i=0
-  testring="ABCDEF"
-  while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` &&
+  testring="ABCD"
+  # 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
+  # we can't tell.
+  while test X`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+             = "XX$testring" &&
           new_result=`expr "X$testring" : ".*" 2>&1` &&
           lt_cv_sys_max_cmd_len=$new_result &&
-          test $i != 32 # 1 MB should be enough
+          test $i != 18 # 1 MB should be enough
   do
     i=`expr $i + 1`
     testring=$testring$testring