diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-15 10:05:17 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-15 10:05:17 +0000 |
commit | 81a6adebf9c8c33ad697da0425db8570775cd985 (patch) | |
tree | 2d4f83bd92ceb3819e918613b31eb5a64465713f /configure.in | |
parent | 2faecf4d81790677e3251bd37a2196496b050b68 (diff) | |
download | ruby-81a6adebf9c8c33ad697da0425db8570775cd985.tar.gz ruby-81a6adebf9c8c33ad697da0425db8570775cd985.tar.xz ruby-81a6adebf9c8c33ad697da0425db8570775cd985.zip |
* configure.in: check rlim_t more portably. [ruby-core:3735]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/configure.in b/configure.in index 3dfe9e79d..30444e676 100644 --- a/configure.in +++ b/configure.in @@ -205,12 +205,6 @@ AC_CHECK_SIZEOF(float, 4) AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF(time_t, 0) -AC_CHECK_TYPE(rlim_t, [AC_DEFINE(HAVE_RLIM_T)], [], [#include <sys/resource.h>]) -AC_CHECK_SIZEOF(rlim_t, 0, [ - #include <stdio.h> - #include <sys/resource.h> -]) - AC_CACHE_CHECK(for prototypes, rb_cv_have_prototypes, [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);], rb_cv_have_prototypes=yes, @@ -388,6 +382,36 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h\ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ ucontext.h intrinsics.h unwind.h) +dnl Check additional types. +AC_CHECK_TYPE(rlim_t, [AC_DEFINE(HAVE_RLIM_T)], [], [ + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include <sys/resource.h> + #endif + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif +]) +AC_CHECK_SIZEOF(rlim_t, 0, [ + #ifdef HAVE_SYS_TYPES_H + # include <sys/types.h> + #endif + #ifdef HAVE_SYS_TIME_H + # include <sys/time.h> + #endif + #ifdef HAVE_SYS_RESOURCE_H + # include <sys/resource.h> + #endif + #ifdef HAVE_UNISTD_H + # include <unistd.h> + #endif +]) + dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UID_T AC_TYPE_SIZE_T |