Changeset 670

Show
Ignore:
Timestamp:
03/15/07 01:08:51 (2 years ago)
Author:
alo
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cherokee/trunk/configure.in

    r667 r670  
    428428if test "x$with_pthread" = "xyes" 
    429429then 
    430         ACX_PTHREAD( , AC_MSG_ERROR([POSIX threads missing])) 
    431  
    432         if test "$acx_pthread_ok" = "yes"; then 
    433                 AC_MSG_CHECKING([for pthread_rwlock_t support]) 
    434                 have_pthread_rwlock_t=yes 
    435  
    436                 AC_TRY_COMPILE([#include <pthread.h>], 
     430        dnl 
     431     dnl Basic checkings (c&p'ed from squid) 
     432        dnl 
     433        AC_MSG_CHECKING([for special a pthread case]) 
     434 
     435     CFLAGS="$CFLAGS -D_REENTRANT" 
     436        case "$host" in 
     437           i386-unknown-freebsd*) 
     438           if test "$GCC" = "yes" ; then 
     439              if test -z "$PRESET_LDFLAGS"; then 
     440                LDFLAGS="$LDFLAGS -pthread" 
     441              fi 
     442           fi 
     443                 AC_MSG_RESULT([-pthread]) 
     444           ;; 
     445       *-solaris2.*) 
     446           if test "$GCC" = "yes" ; then 
     447              CFLAGS="$CFLAGS -pthreads" 
     448                    AC_MSG_RESULT([-pthreads]) 
     449           else 
     450              CFLAGS="$CFLAGS -mt" 
     451                    AC_MSG_RESULT([-mt]) 
     452           fi 
     453           ;; 
     454          *) 
     455                 AC_MSG_RESULT([no]) 
     456                 ;; 
     457     esac 
     458 
     459     AC_CHECK_LIB(pthread, main) 
     460 
     461        dnl 
     462        dnl More detailed checks on the pthread support 
     463        dnl 
     464        AC_MSG_CHECKING([for pthread_rwlock_t support]) 
     465        have_pthread_rwlock_t=yes 
     466 
     467        AC_TRY_COMPILE([#include <pthread.h>], 
    437468                        [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], 
    438469                        AC_MSG_RESULT([ok]), 
     
    459490                ) 
    460491 
    461                if test "$have_pthread_rwlock_t" = yes; then 
    462                        AC_DEFINE(HAVE_PTHREAD_RWLOCK_T, 1, [Define if your pthread library includes pthread_rwlock_t]) 
    463                fi 
    464  
    465                AC_CHECK_FUNC(pthread_attr_setschedpolicy, have_pthread_attr_setschedpolicy=yes) 
    466                if test x"$have_pthread_attr_setschedpolicy" = "xyes"; then 
    467                  AC_DEFINE(HAVE_PTHREAD_SETSCHEDPOLICY, 1, [Pthread support pthread_attr_setschedpolicy]) 
    468                fi 
     492        if test "$have_pthread_rwlock_t" = yes; then 
     493                AC_DEFINE(HAVE_PTHREAD_RWLOCK_T, 1, [Define if your pthread library includes pthread_rwlock_t]) 
     494        fi 
     495 
     496        AC_CHECK_FUNC(pthread_attr_setschedpolicy, have_pthread_attr_setschedpolicy=yes) 
     497        if test x"$have_pthread_attr_setschedpolicy" = "xyes"; then 
     498             AC_DEFINE(HAVE_PTHREAD_SETSCHEDPOLICY, 1, [Pthread support pthread_attr_setschedpolicy]) 
     499        fi 
    469500                 
    470                 with_pthread="yes" 
    471         fi 
     501        with_pthread="yes" 
    472502fi 
    473503