apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r757605 - in /apr/apr/trunk/build: aprconf.py aprenv.py
Date Mon, 23 Mar 2009 23:49:01 GMT
Author: pquerna
Date: Mon Mar 23 23:49:00 2009
New Revision: 757605

URL: http://svn.apache.org/viewvc?rev=757605&view=rev
Log:
SCons:
 Make CheckFile into a proper conftest with outputs.
 Finish off most of the check for shared process pthread mutexes.

Modified:
    apr/apr/trunk/build/aprconf.py
    apr/apr/trunk/build/aprenv.py

Modified: apr/apr/trunk/build/aprconf.py
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/aprconf.py?rev=757605&r1=757604&r2=757605&view=diff
==============================================================================
--- apr/apr/trunk/build/aprconf.py (original)
+++ apr/apr/trunk/build/aprconf.py Mon Mar 23 23:49:00 2009
@@ -17,6 +17,15 @@
             context.Result('no')
             return 0
 
+    def CheckFile(self, context, path):
+        context.Message("Checking if %s exists... " % (path))
+        if os.path.exists(path):
+            context.Result('yes')
+            return 1
+        else:
+            context.Result('no')
+            return 0
+
     def CheckTypesCompatible(self, context, t1, t2, includes):
         context.Message('Checking %s is the same as %s... ' % (t1, t2))
         source = """
@@ -418,9 +427,6 @@
         context.Result(result[0] == 1)
         return result[0] == 1
 
-    def CheckFile(self, filename):
-        return os.path.exists(filename)
-
 class APRConfigure(APRConfigureBase):
     def __init__(self, env):
         APRConfigureBase.__init__(self, env)

Modified: apr/apr/trunk/build/aprenv.py
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/aprenv.py?rev=757605&r1=757604&r2=757605&view=diff
==============================================================================
--- apr/apr/trunk/build/aprenv.py (original)
+++ apr/apr/trunk/build/aprenv.py Mon Mar 23 23:49:00 2009
@@ -134,6 +134,8 @@
 
     # TODO Port header detection here etc
     conf = self.Configure(custom_tests = {
+        'CheckFile':
+            self.autoconf.CheckFile,
         'CheckTypesCompatible': 
             self.autoconf.CheckTypesCompatible,
         'Check_apr_atomic_builtins': 
@@ -423,7 +425,7 @@
 
     # check for mmap mapping dev zero
     if mmap_results['mmap'] and \
-       self.autoconf.CheckFile("/dev/zero") and \
+       conf.CheckFile("/dev/zero") and \
        conf.Check_apr_mmap_mapping_dev_zero():
            subst['@havemmapzero@'] = 1
     else:
@@ -585,7 +587,14 @@
     if self['PLATFORM'] in ['os2', 'beos', 'win32', 'cygwin']:
       subst['@proc_mutex_is_global@'] = 1
   
-    subst['@hasprocpthreadser@'] = 0
+    # note: the current APR use of shared mutex requires /dev/zero
+    if conf.CheckFile('/dev/zero') and \
+        conf.CheckDeclaration('PTHREAD_PROCESS_SHARED', includes='#include <pthread.h>')
and \
+        conf.CheckFunc('pthread_mutexattr_setpshared'):
+      subst['@hasprocpthreadser@'] = 1
+    else:
+      subst['@hasprocpthreadser@'] = 0
+    
     
     subst['@havemmaptmp@'] = 0
     subst['@havemmapshm@'] = 0



Mime
View raw message