mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
* libtool.m4: Update AC_LIBTOOL_SYS_MAX_CMD_LEN bits from upstream.
From-SVN: r98064
This commit is contained in:
parent
e7590e9543
commit
bf070c29a3
@ -1,3 +1,7 @@
|
||||
2005-04-12 Mike Stump <mrs@apple.com>
|
||||
|
||||
* libtool.m4: Update AC_LIBTOOL_SYS_MAX_CMD_LEN bits from upstream.
|
||||
|
||||
2005-04-04 Thomas Koenig <Thomas.Koenig@online.de>
|
||||
|
||||
* MAINTAINERS (Write After Approval): Add myself.
|
||||
|
61
libtool.m4
vendored
61
libtool.m4
vendored
@ -103,6 +103,8 @@ AC_REQUIRE([AC_OBJEXT])dnl
|
||||
AC_REQUIRE([AC_EXEEXT])dnl
|
||||
dnl
|
||||
|
||||
AC_LIBTOOL_SYS_MAX_CMD_LEN
|
||||
|
||||
# Only perform the check for file, if the check method requires it
|
||||
case $deplibs_check_method in
|
||||
file_magic*)
|
||||
@ -279,6 +281,65 @@ ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
# AC_LIBTOOL_SYS_MAX_CMD_LEN
|
||||
# --------------------------
|
||||
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
|
||||
[# find the maximum length of command line arguments
|
||||
AC_MSG_CHECKING([the maximum length of command line arguments])
|
||||
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
i=0
|
||||
teststring="ABCD"
|
||||
|
||||
case $build_os in
|
||||
msdosdjgpp*)
|
||||
# On DJGPP, this test can blow up pretty badly due to problems in libc
|
||||
# (any single argument exceeding 2000 bytes causes a buffer overrun
|
||||
# during glob expansion). Even if it were fixed, the result of this
|
||||
# check would be larger than it should be.
|
||||
lt_cv_sys_max_cmd_len=12288; # 12K is about right
|
||||
;;
|
||||
|
||||
cygwin* | mingw*)
|
||||
# On Win9x/ME, this test blows up -- it succeeds, but takes
|
||||
# about 5 minutes as the teststring grows exponentially.
|
||||
# Worse, since 9x/ME are not pre-emptively multitasking,
|
||||
# you end up with a "frozen" computer, even though with patience
|
||||
# the test eventually succeeds (with a max line length of 256k).
|
||||
# Instead, let's just punt: use the minimum linelength reported by
|
||||
# all of the supported platforms: 8192 (on NT/2K/XP).
|
||||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
amigaos*)
|
||||
# On AmigaOS with pdksh, this test takes hours, literally.
|
||||
# So we just punt and use a minimum line length of 8192.
|
||||
lt_cv_sys_max_cmd_len=8192;
|
||||
;;
|
||||
|
||||
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
|
||||
# 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`
|
||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test -n $lt_cv_sys_max_cmd_len ; then
|
||||
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
|
||||
else
|
||||
AC_MSG_RESULT(none)
|
||||
fi
|
||||
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
|
||||
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user