I'm not overly familiar with test specifics in APU, but it would seem
that LIBS doesn't gets set at all, which then causes AC_CHECK_FUNCS to
return false even if the function is actually available. So, the test
is a bit more "manual": check for the function inside the library
using AC_CHECK_LIB and through explicit use of -lpq (once we know we
have PGSQL). Then define HAVE_PQPREPARE explicitly as well.
I'm not sure if there is a better way to do this. Anyhow, once we
settle on the way of determining how to figure out if the function is
there, I can rework apr_dbd_pgsql.c to actually use it if detected.
--
Bojan
diff -rauN apr-util-vanilla/build/dbd.m4 apr-util/build/dbd.m4
--- apr-util-vanilla/build/dbd.m4 2006-04-10 08:55:44.000000000 +1000
+++ apr-util/build/dbd.m4 2006-04-10 09:48:08.000000000 +1000
@@ -66,6 +66,7 @@
if test "$apu_have_pgsql" = "1"; then
APR_ADDTO(APRUTIL_EXPORT_LIBS,[-lpq])
APR_ADDTO(APRUTIL_LIBS,[-lpq])
+ AC_CHECK_LIB(pq, PQprepare, [AC_DEFINE([HAVE_PQPREPARE], [1], [Define to 1 if you have the `PQprepare' function.])],, [-lpq])
fi
])
dnl