On 01/08/2018 06:17, Andrew Gierth wrote:
> Either way, it's a forced change to the PGXS module's file layout if it
> wants to install headers that work for other people using Tom's
> suggested approach. I'm not on board with this unless there's a better
> solution than I've seen so far.

The problem is that the way we've left it now is so that 50% of the
users will do it wrong.

This reminds me vividly of libxml headers.  For example, on my system
there is a file at

/usr/include/libxml2/libxml/parser.h

How do you use that?

-I/usr/include and #include "libxml2/libxml/parser.h"

or

-I/usr/include/libxml2 and #include "libxml/parser.h"

or

-I/usr/include/libxml2/libxml and #include "parser.h"

Obviously, one can find this out with some experimentation or research,
but in our case there won't be much guidance available.

In the libxml case, the best solution is xml2-config or pkg-config.  I
would like to see something similar here, where users don't have to
fiddle with PG_CPPFLAGS directly.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to