From e78cb14774c3c08f1475299bb684b933ba2591b0 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 17 Dec 2003 06:38:18 +0000 Subject: * lib/cgi.rb (CGI::QueryExtension::Value::[]): should work like String#[] if more than one arguments are specified. * lib/delegate.rb: avoid using common instance name as "@obj". * lib/cgi.rb (CGI::QueryExtension::Value): Value is no longer subclass of String, but DelegateClass(String). * ext/curses/extconf.rb: restore function check for init_color. [ruby-list:38905] * Makefile.in: need to specify $(MAINLIBS) for the miniruby generation rule. * configure.in: better FreeBSD -lc_r support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- configure.in | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 9d26600869..ee6cf7bb94 100644 --- a/configure.in +++ b/configure.in @@ -323,7 +323,7 @@ freebsd*) LIBS="-lm $LIBS" if test "$rb_cv_lib_xpg4_needed" = yes; then AC_CHECK_LIB(xpg4, setlocale) fi - if test "$with_libc_r" = yes -a "$enable_pthread" = 'yes'; then + if test "$with_libc_r" = yes; then AC_CACHE_CHECK([whether libc_r is supplementary to libc], rb_cv_supplementary_lib_c_r, [AC_TRY_CPP([ @@ -335,12 +335,8 @@ freebsd*) LIBS="-lm $LIBS" rb_cv_supplementary_lib_c_r=no, rb_cv_supplementary_lib_c_r=yes, rb_cv_supplementary_lib_c_r=yes)]) - if test "$rb_cv_supplementary_lib_c_r" = yes; then - MAINLIBS="-lc_r $MAINLIBS" - else - AC_DEFINE(HAVE_LIBPTHREAD) - MAINLIBS="-pthread $MAINLIBS" - CFLAGS="-D_THREAD_SAFE -D_REENTRANT $CFLAGS" + if test ; then + MAINLIBS="-lc_r $MAINLIBS" fi fi ;; @@ -679,19 +675,15 @@ int main() AC_DEFINE_UNQUOTED(STACK_GROW_DIRECTION, $rb_cv_stack_grow_dir) if test "$enable_pthread" = "yes"; then - AC_CHECK_LIB(pthread, pthread_mutex_init, + AC_CHECK_LIB(pthread, pthread_kill, rb_with_pthread=yes, rb_with_pthread=no) - if test "$rb_with_pthread" = "no"; then - AC_CHECK_LIB(pthread, __pthread_mutex_init, - rb_with_pthread=yes, rb_with_pthread=no) - fi if test "$rb_with_pthread" = "yes"; then LIBS="-lpthread $LIBS" AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) AC_DEFINE(HAVE_LIBPTHREAD) else - AC_CHECK_LIB(pthreads, pthread_mutex_init, + AC_CHECK_LIB(pthreads, pthread_kill, rb_with_pthread=yes, rb_with_pthread=no) if test "$rb_with_pthread" = "yes"; then LIBS="-lpthreads $LIBS" @@ -699,29 +691,20 @@ if test "$enable_pthread" = "yes"; then AC_DEFINE(_THREAD_SAFE) AC_DEFINE(HAVE_LIBPTHREAD) else - AC_CHECK_LIB(c, pthread_mutex_init, + AC_CHECK_LIB(c, pthread_kill, rb_with_pthread=yes, rb_with_pthread=no) if test "$rb_with_pthread" = "yes"; then AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) AC_DEFINE(HAVE_LIBPTHREAD) else - AC_CHECK_LIB(c_r, pthread_mutex_init, + AC_CHECK_LIB(c_r, pthread_kill, rb_with_pthread=yes, rb_with_pthread=no) if test "$rb_with_pthread" = "yes"; then - if test "$with_libc_r" = "yes"; then - if test "$rb_cv_supplementary_lib_c_r" = "yes"; then - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) - AC_DEFINE(HAVE_LIBPTHREAD) - MAINLIBS="-pthread $MAINLIBS" - fi - else - MAINLIBS="-pthread $MAINLIBS" - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) - AC_DEFINE(HAVE_LIBPTHREAD) - fi + AC_DEFINE(_REENTRANT) + AC_DEFINE(_THREAD_SAFE) + AC_DEFINE(HAVE_LIBPTHREAD) + MAINLIBS="-pthread $MAINLIBS" else AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled") fi -- cgit v1.2.3