Commit 973a9a5e by Steve Ellcey Committed by Paolo Bonzini

libtool.m4 (LT_CMD_MAX_LEN): Try using getconf to set lt_cv_sys_max_cmd_len.

2007-06-01  Steve Ellcey  <sje@cup.hp.com>

	* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN): Try using getconf
	to set lt_cv_sys_max_cmd_len.

From-SVN: r125262
parent b8637750
2007-06-01 Steve Ellcey <sje@cup.hp.com>
* libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN): Try using getconf
to set lt_cv_sys_max_cmd_len.
2007-05-31 Dorit Nuzman <dorit@il.ibm.com>
* MAINTAINERS (Various Maintainers): Add myself as
......
......@@ -1439,6 +1439,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
fi
;;
*)
lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
if test -n $lt_cv_sys_max_cmd_len; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring 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
......@@ -1458,10 +1463,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
# Only check the string length outside the loop.
lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
teststring=
# Add a significant safety factor because C++ compilers can tack on massive
# amounts of additional arguments before passing them to the linker.
# It appears as though 1/2 is a usable value.
# Add a significant safety factor because C++ compilers can tack on
# massive amounts of additional arguments before passing them to the
# linker. It appears as though 1/2 is a usable value.
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
fi
;;
esac
])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment