source: scripts/untested/autotools/patches/libtool-1.5.14-ltmain_sh-max_cmd_len.patch @ d1afb9e

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since d1afb9e was d1afb9e, checked in by Jim Gifford <clfs@…>, 18 years ago

r587@server (orig r585): ryan | 2005-08-05 21:51:35 -0700
Add a sane autotools build to the mix.
Blatantly stolen from gentoo...



  • Property mode set to 100644
File size: 1.1 KB
  • libtool-1.5.14/ltmain.in

     
    136136lo2o="s/\\.lo\$/.${objext}/"
    137137o2lo="s/\\.${objext}\$/.lo/"
    138138quote_scanset='[[~#^*{};<>?'"'"'        ]'
     139
     140if test -z "$max_cmd_len"; then
     141  i=0
     142  testring="ABCD"
     143  new_result=
     144 
     145  # If test is not a shell built-in, we'll probably end up computing a
     146  # maximum length that is only half of the actual maximum length, but
     147  # we can't tell.
     148  while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
     149             = "XX$testring") >/dev/null 2>&1 &&
     150          new_result=`expr "X$testring" : ".*" 2>&1` &&
     151          max_cmd_len="$new_result" &&
     152          test "$i" != 17 # 1/2 MB should be enough
     153  do
     154    i=`expr $i + 1`
     155    testring="$testring$testring"
     156  done
     157  testring=
     158  # Add a significant safety factor because C++ compilers can tack on massive
     159  # amounts of additional arguments before passing them to the linker.
     160  # It appears as though 1/2 is a usable value.
     161  max_cmd_len=`expr $max_cmd_len \/ 2`
     162fi
    139163
    140164#####################################
    141165# Shell function definitions:
Note: See TracBrowser for help on using the repository browser.