summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:27:52 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 20:27:52 +0000
commitbd82f4cf5d16f70111bf49840a3eb52b3456bac1 (patch)
tree21741bf948a9e7277012670e8f6bc162fd164153 /configure.in
parent03d22a22df852e464d0ec8bb9bfaebdecfcbdadd (diff)
merge revision(s) 14222:14225:
* configure.in (RUBY_CHECK_VARTYPE): check if a variable is defined and its type. * configure.in (timezone, altzone): check for recent cygwin. * missing/strftime.c (strftime): fix for timezone. [ruby-dev:32536] * lib/mkmf.rb (try_var): should fail for functions. * ext/readline/extconf.rb: should use have_func for functions instead of have_var. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@16988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in30
1 files changed, 28 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index fafd398eb7..c4f86267b1 100644
--- a/configure.in
+++ b/configure.in
@@ -544,7 +544,8 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\
lchown lchmod getpgrp setpgrp getpgid setpgid initgroups\
getgroups setgroups getpriority getrlimit setrlimit sysconf\
group_member dlopen sigprocmask\
- sigaction _setjmp setsid telldir seekdir fchmod mktime timegm\
+ sigaction _setjmp setsid telldir seekdir fchmod\
+ mktime timegm gettimeofday\
cosh sinh tanh round setuid setgid setenv unsetenv)
AC_ARG_ENABLE(setreuid,
[ --enable-setreuid use setreuid()/setregid() according to need even if obsolete.],
@@ -571,6 +572,31 @@ AC_CACHE_CHECK(for external int daylight, rb_cv_have_daylight,
if test "$rb_cv_have_daylight" = yes; then
AC_DEFINE(HAVE_DAYLIGHT)
fi
+AC_DEFUN([RUBY_CHECK_VARTYPE], [dnl
+AC_CACHE_CHECK([for external $1], rb_cv_var_$1,
+ [rb_cv_var_$1=no
+ AC_TRY_COMPILE([#define _XOPEN_SOURCE 1
+ $2
+ const volatile void *volatile t;],
+ [t = &(&$1)[0];],
+ [for t in $3; do
+ AC_TRY_COMPILE([#define _XOPEN_SOURCE 1
+ $2
+ extern $t $1;
+ const volatile void *volatile t;],
+ [t = &(&$1)[0];],
+ [rb_cv_var_$1=$t; break])
+ done])])
+if test "[$rb_cv_var_]$1" != no; then
+ AC_DEFINE([HAVE_VAR_]m4_toupper($1))
+ AC_DEFINE_UNQUOTED([TYPEOF_VAR_]m4_toupper($1), $rb_cv_var_$1)
+fi])
+RUBY_CHECK_VARTYPE(timezone, [#include <time.h>], [long int])
+RUBY_CHECK_VARTYPE(altzone, [#include <time.h>], [long int])
+if test "$rb_cv_var_timezone" = no; then
+ AC_CHECK_FUNCS(timezone)
+fi
+
AC_CACHE_CHECK(for negative time_t for gmtime(3), rb_cv_negative_time_t,
[AC_TRY_RUN([
#include <time.h>
@@ -1203,7 +1229,7 @@ case "$target_os" in
human*)
AC_CHECK_LIB(signal, _harderr)
AC_CHECK_LIB(hmem, hmemset)
- AC_CHECK_FUNCS(select gettimeofday)
+ AC_CHECK_FUNCS(select)
AC_CACHE_CHECK(whether PD libc _dtos18 fail to convert big number,
rb_cv_missing__dtos18,
[AC_TRY_RUN(