Обсуждение: pg_config --configure ...

Поиск
Список
Период
Сортировка

pg_config --configure ...

От
"Marc G. Fournier"
Дата:
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


Re: pg_config --configure ...

От
Brett Schwarz
Дата:
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/


Re: pg_config --configure ...

От
"Marc G. Fournier"
Дата:
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


Re: pg_config --configure ...

От
Michael Fuhr
Дата:
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/


Re: pg_config --configure ...

От
Mark Kirkwood
Дата:
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




Re: pg_config --configure ...

От
Peter Eisentraut
Дата:
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/


Re: pg_config --configure ...

От
"Marc G. Fournier"
Дата:
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


Re: pg_config --configure ...

От
Peter Eisentraut
Дата:
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/