Michael J. Pedersen wrote:

I'm a moron. Meant to send this to the list, sent it just to Jer
instead.

Here it is, take two.
----- Forwarded message from "Michael J. Pedersen" <[EMAIL PROTECTED]> -----

Date: Thu, 13 Oct 2005 07:42:34 -0400
From: "Michael J. Pedersen" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [libpqxx-general] pqxx-config script ideas

On Thu, Oct 13, 2005 at 08:40:52AM +0200, [EMAIL PROTECTED] wrote:
However i found the pqxx-config doesn't do what most packages do and
instead actually gives the linker lines like:
pqxx-config --libs
output:    -L/usr/local/lib -lpqxx -L/usr/local/lib/libpq -lpq
This script was contributed by Arjen Baart.  Frankly I have no idea what
similar scripts do in other packages, and don't want to mess with
something that may break compatibility...  Could you help me out with a
reference or standard somewhere?


I'll agree it's not very pretty to have the option names in there, but
OTOH it could save a lot of trouble when using multiple libraries--and I
think "-L" is just about universally accepted.  Removing it would
certainly break compatibility with existing Makefiles.

Mine included, if that matters at all :)

Possible solution: Another option which JUST prints the options, instead
of printing everything? For instance,

pqxx-config --libs --noflags
output: /usr/local/lib pqxx /usr/local/lib/libpq pq
Well, i certainly didn't mean remove --libs and --cflags.
I believe what gets me is that libpqxx depends on libpq, and libpq doesn't include the flags in it's pg_config. Also, I know that libpqxx depends on libpq, but for pqxx-config to automatically assume i want libpg linked is correct, but what if I just wanted to know pqxx's include and lib dir for use not only in compiling but other things such as install scripts and such.

What i prepose is maybe:
   pqxx-config --cflags    - stays the same
   pqxx-config --libs         - stays the same

and adding
pqxx-config --includedir to output dir of the headers "/usr/lib/pqxx" on my system pqxx-config --libdir to output dir of the headers "/opt/local/pgsql8/pqxx" on my system

as far as examples of behavior, i know of no standards. I've never looked for a standard. However, that being said there are packages that use both ways.

sdl-config is the same as current pqxx
pg_config however doesn't include flags.
pdflib-config  uses both --libs with flags and --libdir without flags etc.
prce-config  uses just flags

This was just something I noticed while hand writing Makefiles...

_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to