On Tue, May 23, 2006 at 07:09:40PM +1000, Bojan Smojver wrote:
> On Mon, 2006-05-22 at 11:12 +0100, Joe Orton wrote:
> > Hi Bojan - some comments on the autoconf code:
>
> Here is a patch that hopefully deals with the issues you mentioned in
> the new code, as well as the stuff that was already in dbd.m4. I tested
> this on FC5 (i386) and it seems to work for PostgreSQL, SQLite3 and
> MySQL.
Nice work, this looks good; one minor problem below, otherwise looks
fine to commit.
> Index: build/dbd.m4
> ===================================================================
> --- build/dbd.m4 (revision 408793)
> +++ build/dbd.m4 (working copy)
> @@ -33,15 +33,21 @@
> if test "$apu_have_pgsql" == "0"; then
> AC_CHECK_HEADER(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared,
[apu_have_pgsql=1]))
> if test "$apu_have_pgsql" != "0"; then
> - 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 <libpq_fe.h>
#elif defined(HAVE_POSTGRESQL_LIBPQ_FE_H)
#include <postgresql/libpq-fe.h>
#elendif
and to ensure that the appropriate HAVE_ symbol gets defined, e.g. by
using AC_CHECK_HEADERS (note plural).
|