apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr configure.in
Date Tue, 11 Feb 2003 15:18:24 GMT
jorton      2003/02/11 07:18:24

  Modified:    .        configure.in
  Log:
  Fix tests for PROCESS_SHARED locks and pthread_mutexattr_setrobust_np
  to print "checking for " message & result, and to cache results properly.
  (No logic changes here, hopefully)
  
  Revision  Changes    Path
  1.513     +12 -6     apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apr/configure.in,v
  retrieving revision 1.512
  retrieving revision 1.513
  diff -u -r1.512 -r1.513
  --- configure.in	11 Feb 2003 15:05:19 -0000	1.512
  +++ configure.in	11 Feb 2003 15:18:24 -0000	1.513
  @@ -1444,8 +1444,9 @@
       dnl really support PROCESS_SHARED locks.  So, we must validate that we 
       dnl can go through the steps without receiving some sort of system error.
       dnl Linux and older versions of AIX have this problem.
  -    APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared,

  -    AC_TRY_RUN([
  +    APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared,
[
  +      AC_CACHE_CHECK([for working PROCESS_SHARED locks], apr_cv_process_shared_works, [
  +      AC_TRY_RUN([
   #include <sys/types.h>
   #include <pthread.h>
           int main()
  @@ -1463,11 +1464,15 @@
               if (pthread_mutex_destroy(&mutex))
                   exit(5);
               exit(0);
  -        }], [], [ac_cv_func_pthread_mutexattr_setpshared=no], 
  -        [ac_cv_func_pthread_mutexattr_setpshared=no]))
  +        }], [apr_cv_process_shared_works=yes], [apr_cv_process_shared_works=no])])
  +      # Override detection of pthread_mutexattr_setpshared
  +      ac_cv_func_pthread_mutexattr_setpshared=$apr_cv_process_shared_works])
  +
       if test "$ac_cv_func_pthread_mutexattr_setpshared" = "yes"; then
           AC_CHECK_FUNCS(pthread_mutexattr_setrobust_np)
           if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "no"; then
  +            AC_CACHE_CHECK([for pthread_mutexattr_setrobust_np with _POSIX_THREAD_PRIO_INHERIT],
  +            [apr_cv_setrobust_with_prio_inherit], [
               AC_TRY_COMPILE([#define _POSIX_THREAD_PRIO_INHERIT
   #include <sys/types.h>
   #include <pthread.h>],[
  @@ -1476,8 +1481,9 @@
                   pthread_mutexattr_t attr;
                   pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP);
                   return 0;
  -            }], [ac_cv_func_pthread_mutexattr_setrobust_np=yes], [])
  -            if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "yes"; then
  +            }], [apr_cv_setrobust_with_prio_inherit=yes], [apr_cv_setrobust_with_prio_inherit=no])])
  +            if test "$apr_cv_setrobust_with_prio_inherit" = "yes"; then
  +                ac_cv_func_pthread_mutexattr_setrobust_np=yes
                   APR_ADDTO(CPPFLAGS, -D_POSIX_THREAD_PRIO_INHERIT)
               fi
           fi
  
  
  

Mime
View raw message