aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/aclocal.m4
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 06:50:34 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2001-08-10 06:50:34 +0000
commit1b66d30ab707f6ef0876616ea71d6253c4102ecb (patch)
tree04b8551ca00883edbe9b5d35597357f71f960e3d /libstdc++-v3/aclocal.m4
parentd6175f0f157496312d6e9028057e5d7426776fae (diff)
2001-08-09 Benjamin Kosnik <bkoz@redhat.com>
* acconfig.h (_GLIBCPP_MEM_LIMITS): Define. * config.h.in: Regenerate. * acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT): Check for setrlimit function. * aclocal.m4: Regenerate. * configure.in: Remove duplicate AM_CONFIG_HEADER. (AM_CONFIG_HEADER): Remove testsuite/testsuite_hooks.h. Only call GLIBCPP_CHECK_SETRLIMIT for native compiles. * configure: Regenerate. * testsuite_hooks.h.in: Move to... * testsuite_hooks.h: Here, include c++config.h. Use it. * Makefile.am (SUBDIRS): Move testsuite to last directory. * Makefile.in: Regenerate. * po/Makefile.am (stamp-po): Add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44752 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/aclocal.m4')
-rw-r--r--libstdc++-v3/aclocal.m424
1 files changed, 21 insertions, 3 deletions
diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4
index ae019f06969..d4968fa56d8 100644
--- a/libstdc++-v3/aclocal.m4
+++ b/libstdc++-v3/aclocal.m4
@@ -1831,19 +1831,37 @@ AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT_ancilliary, [
[Only used in build directory testsuite_hooks.h.])
])
AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT, [
- setrlimit_have_needed_headers=yes
+ setrlimit_have_headers=yes
AC_CHECK_HEADERS(sys/resource.h unistd.h,
[],
- setrlimit_have_needed_headers=no)
+ setrlimit_have_headers=no)
# If don't have the headers, then we can't run the tests now, and we
# won't be seeing any of these during testsuite compilation.
- if test $setrlimit_have_needed_headers = yes; then
+ if test $setrlimit_have_headers = yes; then
# Can't do these in a loop, else the resulting syntax is wrong.
GLIBCPP_CHECK_SETRLIMIT_ancilliary(DATA)
GLIBCPP_CHECK_SETRLIMIT_ancilliary(RSS)
GLIBCPP_CHECK_SETRLIMIT_ancilliary(VMEM)
GLIBCPP_CHECK_SETRLIMIT_ancilliary(AS)
+
+ # Check for rlimit, setrlimit.
+ AC_CACHE_VAL(ac_setrlimit, [
+ AC_TRY_COMPILE([#include <sys/resource.h>
+ #include <unistd.h>
+ ],
+ [ struct rlimit r; setrlimit(0, &r);],
+ [ac_setrlimit=yes], [ac_setrlimit=no])
+ ])
+ fi
+
+ AC_MSG_CHECKING([for testsuite memory limit support])
+ if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+ ac_mem_limits=yes
+ AC_DEFINE(_GLIBCPP_MEM_LIMITS)
+ else
+ ac_mem_limits=no
fi
+ AC_MSG_RESULT($ac_mem_limits)
])