diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-22 07:21:30 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-11-22 07:21:30 +0000 |
commit | b8f2ee898450661a6568f0fd27a9f2266b55239a (patch) | |
tree | 62227daf9846e0c8add829666562fee0af9091fa /configure.in | |
parent | e740d1eead9e3828a735882deb600b066384f453 (diff) |
Wed, 23 Jun 2010 12:48:31 +0000 kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
merge revision(s) 28404,28595,28597:
* configure.in: avoid getcontext() overhead if possible.
[ruby-core:27380][Bug #2553]
Thanks, Joe Damato, Dan Peterson and Patrick Mohr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>
* configure.in: fix use_context condition inversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>
Fix changelog of revision 28595
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@28597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Signed-off-by: URABE, Shyouhei <shyouhei@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@29854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 62b34a8c62..73688088fc 100644 --- a/configure.in +++ b/configure.in @@ -522,7 +522,7 @@ AC_CHECK_HEADERS(stdlib.h string.h unistd.h limits.h sys/file.h sys/ioctl.h sys/ fcntl.h sys/fcntl.h sys/select.h sys/time.h sys/times.h sys/param.h\ syscall.h pwd.h grp.h a.out.h utime.h memory.h direct.h sys/resource.h \ sys/mkdev.h sys/utime.h netinet/in_systm.h float.h ieeefp.h pthread.h \ - ucontext.h intrinsics.h time.h) + intrinsics.h time.h) dnl Check additional types. AC_CHECK_SIZEOF(rlim_t, 0, [ @@ -1085,8 +1085,22 @@ if test x"$enable_pthread" = xyes; then fi fi fi -if test x"$ac_cv_header_ucontext_h" = xyes; then - if test x"$rb_with_pthread" = xyes; then + +use_context=no +if test x"$rb_with_pthread" = xyes; then + AS_CASE("$target_cpu:$target_os:$cross_compiling", + [*:linux*:no], [ + if test -n "`(/lib/libc.so.6 2>/dev/null | fgrep 'linuxthreads') 2> /dev/null`"; then + use_context=yes + fi + ], + [sparc*], [ + use_context=yes + ]) +fi +if test x"$use_context" = xyes; then + AC_CHECK_HEADERS(ucontext.h) + if test x"$ac_cv_header_ucontext_h" = xyes; then AC_CHECK_FUNCS(getcontext setcontext) fi fi |