How to automatically find the *right* libpq_fe.h? - Mailing list pgsql-general

From Kynn Jones
Subject How to automatically find the *right* libpq_fe.h?
Date
Msg-id c2350ba40911031009x6f452a84gbd60bdcc6ece036d@mail.gmail.com
Whole thread Raw
Responses Re: How to automatically find the *right* libpq_fe.h?  (Steve Atkins <steve@blighty.com>)
Re: How to automatically find the *right* libpq_fe.h?  (Grzegorz Jaśkiewicz <gryzman@gmail.com>)
List pgsql-general
I'm trying to automate an installation of a collection of Perl modules, which requires determining the path to the correct libpq_fe.h file.

My original implementation of the Makefile.PL file for this installation set this path as the first valid path that it could extract from the output of the system command "locate libpq_fe.h".

Not surprisingly this leads to serious problems when the path so "discovered" does not really correspond to the Pg server actually running on the machine.

Is there a better way to determine the path to the correct libpq_fe.h for a given Pg server, short of asking the user to enter it by hand?  (I'm trying to make this installation automatic rather than interactive.)

E.g. is there some way to interrogate the running server for this information?

TIA!

kynn

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: question
Next
From: Steve Atkins
Date:
Subject: Re: How to automatically find the *right* libpq_fe.h?