Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 21983 invoked from network); 20 May 2008 23:35:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 May 2008 23:35:21 -0000 Received: (qmail 55429 invoked by uid 500); 20 May 2008 23:35:22 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 55378 invoked by uid 500); 20 May 2008 23:35:22 -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 55367 invoked by uid 99); 20 May 2008 23:35:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 16:35:22 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=FM_FAKE_HELO_VERIZON,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [206.46.252.44] (HELO vms044pub.verizon.net) (206.46.252.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 May 2008 23:34:28 +0000 Received: from black ([71.245.67.80]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0K16005WEXHOAFRO@vms044.mailsrvcs.net> for dev@apr.apache.org; Tue, 20 May 2008 18:34:37 -0500 (CDT) Received: from bob by black with local (Exim 4.69) (envelope-from ) id 1JybLo-0006Z0-6b; Tue, 20 May 2008 19:34:36 -0400 Date: Tue, 20 May 2008 19:34:36 -0400 From: Bob Rossi Subject: Re: dbd pgsql autotools patch In-reply-to: <1211318084.23239.46.camel@shrek.rexursive.com> To: Bojan Smojver Cc: APR Development List Mail-followup-to: Bojan Smojver , APR Development List Message-id: <20080520233436.GB24464@brasko.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline References: <20080520000540.GF19723@brasko.net> <1211242298.23239.26.camel@shrek.rexursive.com> <20080520004718.GG19723@brasko.net> <1211246462.23239.29.camel@shrek.rexursive.com> <1211246643.23239.31.camel@shrek.rexursive.com> <20080520012731.GI19723@brasko.net> <1211255385.23239.42.camel@shrek.rexursive.com> <20080520105514.GK19723@brasko.net> <1211317193.23239.43.camel@shrek.rexursive.com> <1211318084.23239.46.camel@shrek.rexursive.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Virus-Checked: Checked by ClamAV on apache.org On Wed, May 21, 2008 at 07:14:44AM +1000, Bojan Smojver wrote: > On Wed, 2008-05-21 at 06:59 +1000, Bojan Smojver wrote: > > > OK, not a problem. We'll whack libs in there too. > > Done. Hopefully that should be it. Okay, this still doesn't work on windows, there are a couple changes I would suggest, here they are. After I applied this diff, it appeared to work on windows. --- apr-util-1.3.x-2008-05-19-svn/build/dbd.m4 Tue May 20 17:15:38 2008 +++ apr-util-1.3.x-2008-05-19-svn.changed/build/dbd.m4 Tue May 20 19:18:23 2008 @@ -53,7 +53,8 @@ AC_PATH_PROG([PGSQL_CONFIG],[pg_config],,[$withval/bin]) if test "x$PGSQL_CONFIG" != 'x'; then pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`" - pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir` `$PGSQL_CONFIG --libs`" + pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`" + pgsql_LDFLAGS="$pgsql_LDFLAGS `$PGSQL_CONFIG --libs`" There are a couple places the above is done, I only had to change it here. If this is done in multiple steps, it avoids a ^A inbetween the --libdir and --libs command. I don't know where the ^A comes from, but when the lines are separated, it goes away. Any ideas? else pgsql_CPPFLAGS="-I$withval/include" pgsql_LDFLAGS="-L$withval/lib " @@ -63,9 +64,9 @@ APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS]) I'm not quiet sure you want to do the above. Do you really want apr to depend on all these libraries? I was thinking we should just use those libraries to do the test. I don't know what's correct, but if you don't add the --libs to the APR_ADDTO my link still works. That's because my programs link to apr-util and they know what libraries to link pgsql. So everything works. AC_MSG_NOTICE(checking for pgsql in $withval) - AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_h ave_pgsql=1])) + AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_h ave_pgsql=1], [], [$pgsql_LDFLAGS])) This is the key really. This is the only part of apr (that I know of) that needs to link with these libraries. It's just the test program. Am I wrong? If the --libs are not passed to AC_CHECK_LIB, the test will fail on windows. This is also done in a couple places, and I only modified the case that I was getting coverage on. Is this a sufficient explanation? Thanks, Bob Rossi