Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 67818 invoked from network); 23 Mar 2009 23:49:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Mar 2009 23:49:22 -0000 Received: (qmail 89610 invoked by uid 500); 23 Mar 2009 23:49:22 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 89542 invoked by uid 500); 23 Mar 2009 23:49:22 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 89533 invoked by uid 99); 23 Mar 2009 23:49:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 23:49:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Mar 2009 23:49:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8B87F23888D5; Mon, 23 Mar 2009 23:49:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r757605 - in /apr/apr/trunk/build: aprconf.py aprenv.py Date: Mon, 23 Mar 2009 23:49:01 -0000 To: commits@apr.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090323234901.8B87F23888D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 ') and \ + conf.CheckFunc('pthread_mutexattr_setpshared'): + subst['@hasprocpthreadser@'] = 1 + else: + subst['@hasprocpthreadser@'] = 0 + subst['@havemmaptmp@'] = 0 subst['@havemmapshm@'] = 0