From dev-return-16438-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Tue May 23 20:39:15 2006 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 60983 invoked from network); 23 May 2006 20:39:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 May 2006 20:39:14 -0000 Received: (qmail 53333 invoked by uid 500); 23 May 2006 20:39:13 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 53289 invoked by uid 500); 23 May 2006 20:39:12 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 53278 invoked by uid 99); 23 May 2006 20:39:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 13:39:12 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of bojan@rexursive.com designates 203.171.74.242 as permitted sender) Received: from [203.171.74.242] (HELO beauty.rexursive.com) (203.171.74.242) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2006 13:39:11 -0700 Received: from coyote.rexursive.com (coyote.rexursive.com [172.27.0.22]) by beauty.rexursive.com (Postfix) with ESMTP id EB36F253E28 for ; Wed, 24 May 2006 06:38:49 +1000 (EST) Subject: Re: [PATCH]: Make MySQL detection a bit more accurate From: Bojan Smojver To: APR Development List In-Reply-To: <20060523125155.GA24440@redhat.com> References: <20060522110653.x40o7l4j404840wc@www.rexursive.com> <20060522101235.GA3391@redhat.com> <1148375380.2146.44.camel@coyote.rexursive.com> <20060523125155.GA24440@redhat.com> Content-Type: text/plain Date: Wed, 24 May 2006 06:38:49 +1000 Message-Id: <1148416729.2956.5.camel@coyote.rexursive.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 (2.6.1-1.fc5.2) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Tue, 2006-05-23 at 13:51 +0100, Joe Orton wrote: > > - APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/postgresql]) > > + APR_ADDTO(APRUTIL_INCLUDES, [-I/usr/include/postgresql]) > > This also isn't really correct; it presumes that the *only* include path > is /usr/include which isn't necessarily true. The normal way to handle > this is to do directly: > > #ifdef HAVE_LIBPQ_FE_H > #include > #elif defined(HAVE_POSTGRESQL_LIBPQ_FE_H) > #include > #elendif > > and to ensure that the appropriate HAVE_ symbol gets defined, e.g. by > using AC_CHECK_HEADERS (note plural). Yeah, all those hard coded things did seem a bit out of place to me too. In the above, I was actually trying to fix the "yes/include/postgresql" problem (i.e. $withval in that part of the code is literally "yes" :-) Again, thanks for reviewing and for the suggestions. I'll work on changing the actual drivers as per above and won't be setting APRUTIL_INCLUDES there at all. -- Bojan