pg_config --configure ...

Started by Marc G. Fournierover 20 years ago8 messages
#1Marc G. Fournier
scrappy@postgresql.org

How are ppl using this? I'm trying to use it to re-configure, having
tried both tcsh and bash, and neither seem to 'work':

# ./configure `pg_config --configure`
configure: error: invalid variable name: '--with-libraries

So, is there another way I can use the output from pg_config to pass to
configure?

Thanks ...

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664

#2Brett Schwarz
brett_schwarz@yahoo.com
In reply to: Marc G. Fournier (#1)
Re: pg_config --configure ...

I usually just look at config.log, and copy and
paste...but I am guessing you are trying to automate
this. Looks like pg_config adds '' around each option
when specifying --configure (i.e. '--with-libraries'),
at least on my system (Linux, PG803). You can try to
get rid of the ''. This seems to work on my system:

./configure `pg_config --configure | tr "'" " "`

I'm not a shell guru by any means, so there might be a
better way...

--- "Marc G. Fournier" <scrappy@postgresql.org> wrote:

How are ppl using this? I'm trying to use it to
re-configure, having
tried both tcsh and bash, and neither seem to
'work':

# ./configure `pg_config --configure`
configure: error: invalid variable name:
'--with-libraries

So, is there another way I can use the output from
pg_config to pass to
configure?

Thanks ...

----
Marc G. Fournier Hub.Org Networking
Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy
ICQ: 7615664

---------------------------(end of
broadcast)---------------------------
TIP 2: you can get off all lists at once with the
unregister command
(send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)

--brett

__________________________________
Discover Yahoo!
Use Yahoo! to plan a weekend, have fun online and more. Check it out!
http://discover.yahoo.com/

#3Marc G. Fournier
scrappy@postgresql.org
In reply to: Brett Schwarz (#2)
Re: pg_config --configure ...

On Wed, 8 Jun 2005, Brett Schwarz wrote:

I usually just look at config.log, and copy and
paste...but I am guessing you are trying to automate
this. Looks like pg_config adds '' around each option
when specifying --configure (i.e. '--with-libraries'),
at least on my system (Linux, PG803). You can try to
get rid of the ''. This seems to work on my system:

./configure `pg_config --configure | tr "'" " "`

I'm not a shell guru by any means, so there might be a
better way...

Thought of that too, still blows up:

pgsql74# ./configure `pg_config --configure | tr "'" " "`
configure: WARNING: you should use --build, --host, --target
configure: error: unrecognized option: -rpath=/usr/lib:/usr/local/lib
Try `./configure --help' for more information.

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664

#4Michael Fuhr
mike@fuhr.org
In reply to: Marc G. Fournier (#3)
Re: pg_config --configure ...

On Thu, Jun 09, 2005 at 12:26:06AM -0300, Marc G. Fournier wrote:

pgsql74# ./configure `pg_config --configure | tr "'" " "`
configure: WARNING: you should use --build, --host, --target
configure: error: unrecognized option: -rpath=/usr/lib:/usr/local/lib
Try `./configure --help' for more information.

Have you tried eval or xargs?

eval ./configure `pg_config --configure`
pg_config --configure | xargs ./configure

Both work for me in simple tests; I haven't given much thought to
what might make them fail, though....

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

#5Mark Kirkwood
markir@paradise.net.nz
In reply to: Marc G. Fournier (#3)
Re: pg_config --configure ...

Marc G. Fournier wrote:

On Wed, 8 Jun 2005, Brett Schwarz wrote:

./configure `pg_config --configure | tr "'" " "`

Thought of that too, still blows up:

How about

./configure `pg_config --configure|sed s/\'//g`

Cheers

Mark

#6Peter Eisentraut
peter_e@gmx.net
In reply to: Marc G. Fournier (#1)
Re: pg_config --configure ...

Marc G. Fournier wrote:

# ./configure `pg_config --configure`
configure: error: invalid variable name: '--with-libraries

The intended mode of usage is

eval ./configure `pg_config --configure`

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#7Marc G. Fournier
scrappy@postgresql.org
In reply to: Peter Eisentraut (#6)
Re: pg_config --configure ...

Sweet, that's it ... could you add an EXAMPLE section to the man page
showing this? Seems I'm not the only one that was a bit confused how to
use it, based on other 'try this' that ppl sent :)

On Thu, 9 Jun 2005, Peter Eisentraut wrote:

Marc G. Fournier wrote:

# ./configure `pg_config --configure`
configure: error: invalid variable name: '--with-libraries

The intended mode of usage is

eval ./configure `pg_config --configure`

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664

#8Peter Eisentraut
peter_e@gmx.net
In reply to: Marc G. Fournier (#7)
Re: pg_config --configure ...

Marc G. Fournier wrote:

Sweet, that's it ... could you add an EXAMPLE section to the man page
showing this? Seems I'm not the only one that was a bit confused how
to use it, based on other 'try this' that ppl sent :)

Done.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/