How to automatically find the *right* libpq_fe.h?

From: Kynn Jones <kynnjo(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: How to automatically find the *right* libpq_fe.h?
Date: 2009-11-03 18:09:42
Message-ID: c2350ba40911031009x6f452a84gbd60bdcc6ece036d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2009-11-03 18:39:10 Re: How to automatically find the *right* libpq_fe.h?
Previous Message Scott Marlowe 2009-11-03 18:04:56 Re: question