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 | 30b3ce3445f5cbf94080a8408b83eaafaa264baa (patch) | |
tree | 2d4f83bd92ceb3819e918613b31eb5a64465713f /configure.in | |
parent | e77fc758024989891f1852f27575eaed9d3053c2 (diff) | |
download | ruby-30b3ce3445f5cbf94080a8408b83eaafaa264baa.tar.gz |
* configure.in: check rlim_t more portably. [ruby-core:3735]
git-svn-id: svn+ssh://ci.ruby-lang.org/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 3dfe9e79db..30444e6765 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 |