mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
* m4/libtool.m4: Speed up max_cmd_len check.
This commit is contained in:
parent
438422eaf8
commit
884ec923bd
@ -1,3 +1,7 @@
|
||||
2003-10-12 Peter O'Gorman <peter@pogma.com>
|
||||
|
||||
* m4/libtool.m4: Speed up max_cmd_len check.
|
||||
|
||||
2003-10-08 Gary V. Vaughan <gary@gnu.org>
|
||||
|
||||
* libtoolize.in: AC_CONFIG_M4_DIR has landed in CVS autoconf.
|
||||
|
1
NEWS
1
NEWS
@ -14,6 +14,7 @@ New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team:
|
||||
* Mode inferrence removed, shorthand for choosing modes added.
|
||||
* Specifying -allow-undefined is now an error.
|
||||
* Initial support for amigaos-ppc.
|
||||
* Speed up max_cmd_len check.
|
||||
* Bug fixes.
|
||||
|
||||
New in 1.5.1: 2003-??-??; CVS version 1.5.0a, Libtool team:
|
||||
|
13
m4/libtool.m4
vendored
13
m4/libtool.m4
vendored
@ -677,18 +677,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
;;
|
||||
|
||||
*)
|
||||
# Make testring a little bigger before we do anything with it.
|
||||
# a 1K string should be a reasonable start.
|
||||
for i in 1 2 3 4 5 6 7 8 ; do
|
||||
testring=$testring$testring
|
||||
done
|
||||
# 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") >/dev/null 2>&1 &&
|
||||
new_result=`expr "X$testring" : ".*" 2>&1` &&
|
||||
lt_cv_sys_max_cmd_len=$new_result &&
|
||||
while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring$testring" 2>/dev/null` \
|
||||
= "XX$testring$testring") >/dev/null 2>&1 &&
|
||||
test $i != 17 # 1/2 MB should be enough
|
||||
do
|
||||
i=`expr $i + 1`
|
||||
testring=$testring$testring
|
||||
done
|
||||
# Only check the string length outside the loop.
|
||||
lt_cv_sys_max_cmd_len=`expr "X$testring" : ".*" 2>&1`
|
||||
testring=
|
||||
# Add a significant safety factor because C++ compilers can tack on massive
|
||||
# amounts of additional arguments before passing them to the linker.
|
||||
|
Loading…
Reference in New Issue
Block a user