Hi Elias,
I believe you can set CXXFLAGS before AC_CHECK_HEADER([term.h], [], [],
[]) like:
*CXXFLAGS=-I. -I**/usr/include/postgres
**AC_CHECK_HEADER([**libpq-fe**.h], [], [], []) *
If it fails then config.log tells you why. Alternatively you could call
AC_CHECK_HEADER again
if the first one fails:
*AC_CHECK_HEADER(
[**libpq-fe**.h],
[],
[***AC_CHECK_HEADER([*****postgres/*******libpq-fe**.h***], []. [], []),
[])
*
In the found clauses (2. argument - empty in above example) you can do
whats needed in the respective cases.
Haven't tested this, though.
/// Jürgen
On 04/20/2014 03:39 PM, Elias Mårtenson wrote:
I've struggling with integrating the SQL stuff with Autoconf. My
intent was (and still, to some degree, is) to provide a simple patch
for Jürgen.
But alas! My plan has been foiled! Bu that creature of the shadows
that go by the name Autoconf.
My question to anyone here (especially Jürgen) how can I fix the
following two problems:
*Problem number 1:*
The Postgres detection script that is available at the Autoconf
Archive fails on my Ubuntu system because its include file is in
/usr/include/postgres/libpq-fe.h instead of /usr/include/libpq-fe.h.
Of course, one can override it using an option, but I would like to
fix the macro instead. However, the content of the macro is somewhat
impenetrable to me.
*Problem number 2:*
When I activate the macros that check for Postgres and SQLite, the
configure step will fail if they are not found. What I want is that
these should be optional, and if one is missing support for these
databases will simply not be provided.
Would anyone be willing to help out getting this to work? I'm getting
frustrated here (it's no secret that I'm not a huge fan of Autoconf).
Regards,
Elias