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
|