Thread: --with-perl=/path/to/prefered/perl?

--with-perl=/path/to/prefered/perl?

From
Larry Rosenman
Date:
Would it be possible to add a path spec to the --with-perl configure
option so that if we have 2 or more PERL versions on the system we can
pick which one to use? 

Larry

-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Re: --with-perl=/path/to/prefered/perl?

From
Peter Eisentraut
Date:
Larry Rosenman writes:

> Would it be possible to add a path spec to the --with-perl configure
> option so that if we have 2 or more PERL versions on the system we can
> pick which one to use? 

PERL=/else/where/perl ./configure ...

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



Re: --with-perl=/path/to/prefered/perl?

From
Bruce Momjian
Date:
> Would it be possible to add a path spec to the --with-perl configure
> option so that if we have 2 or more PERL versions on the system we can
> pick which one to use? 

We used to have a configure switch, but it is not there anymore.  The
way I do it is to add PERL=perl5 in /pgsql/src/Makefile.custom.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: --with-perl=/path/to/prefered/perl?

From
Tom Lane
Date:
Larry Rosenman <ler@lerctr.org> writes:
> Would it be possible to add a path spec to the --with-perl configure
> option so that if we have 2 or more PERL versions on the system we can
> pick which one to use? 

Why do you need that, as opposed to just setting your PATH so that
configure finds the right one first?
        regards, tom lane


Re: --with-perl=/path/to/prefered/perl?

From
Larry Rosenman
Date:
* Tom Lane <tgl@sss.pgh.pa.us> [001025 11:10]:
> Larry Rosenman <ler@lerctr.org> writes:
> > Would it be possible to add a path spec to the --with-perl configure
> > option so that if we have 2 or more PERL versions on the system we can
> > pick which one to use? 
> 
> Why do you need that, as opposed to just setting your PATH so that
> configure finds the right one first?
I may be testing a new version of PERL and want PG to compile against
that one as WELL as the system default. 

LER
> 
>             regards, tom lane
-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


Re: --with-perl=/path/to/prefered/perl?

From
Bruce Momjian
Date:
> Larry Rosenman <ler@lerctr.org> writes:
> > Would it be possible to add a path spec to the --with-perl configure
> > option so that if we have 2 or more PERL versions on the system we can
> > pick which one to use? 
> 
> Why do you need that, as opposed to just setting your PATH so that
> configure finds the right one first?

On BSD/OS, there is perl (perl4) and perl5 (perl5).  You have to set the
name of the perl executable.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: --with-perl=/path/to/prefered/perl?

From
Larry Rosenman
Date:
* Tom Lane <tgl@sss.pgh.pa.us> [001025 13:20]:
> 
> Oh, so it wouldn't be a search path but a specific executable name
> (with or without full path info).  OK, that makes sense to me.
> I've had different perls installed with different executable names
> myself.
Bingo.  Larry


Re: --with-perl=/path/to/prefered/perl?

From
Peter Eisentraut
Date:
Bruce Momjian writes:

> > Larry Rosenman <ler@lerctr.org> writes:
> > > Would it be possible to add a path spec to the --with-perl configure
> > > option so that if we have 2 or more PERL versions on the system we can
> > > pick which one to use? 
> > 
> > Why do you need that, as opposed to just setting your PATH so that
> > configure finds the right one first?
> 
> On BSD/OS, there is perl (perl4) and perl5 (perl5).  You have to set the
> name of the perl executable.

The standard interface to any Autoconf configure script to override the
name of a program has always been and will always be setting environment
variables like this:

PERL=perl3 CC=cc YACC='bison -y' TCLSH=/usr/local/bin/tclsh AWK=mawk ./configure --options ...

(Okay, I lied, in Autoconf 2.50-to-be you can also put the variable
assignments after the "./configure", but that doesn't change the overall
principle.)

The idea here is that you might set some of these environment variables
permanently on your system and then every configure script you run will
use the same defaults.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



Re: --with-perl=/path/to/prefered/perl?

From
Bruce Momjian
Date:
> > On BSD/OS, there is perl (perl4) and perl5 (perl5).  You have to set the
> > name of the perl executable.
> 
> The standard interface to any Autoconf configure script to override the
> name of a program has always been and will always be setting environment
> variables like this:
> 
> PERL=perl3 CC=cc YACC='bison -y' TCLSH=/usr/local/bin/tclsh AWK=mawk ./configure --options ...
> 
> (Okay, I lied, in Autoconf 2.50-to-be you can also put the variable
> assignments after the "./configure", but that doesn't change the overall
> principle.)
> 
> The idea here is that you might set some of these environment variables
> permanently on your system and then every configure script you run will
> use the same defaults.

The trick here is that the software not call perl directly, but use the
PREL environment variable if defined.  I wish all software followed that
practice like we do.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


Re: --with-perl=/path/to/prefered/perl?

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
>> Larry Rosenman <ler@lerctr.org> writes:
>>>> Would it be possible to add a path spec to the --with-perl configure
>>>> option so that if we have 2 or more PERL versions on the system we can
>>>> pick which one to use? 
>> 
>> Why do you need that, as opposed to just setting your PATH so that
>> configure finds the right one first?

> On BSD/OS, there is perl (perl4) and perl5 (perl5).  You have to set the
> name of the perl executable.

Oh, so it wouldn't be a search path but a specific executable name
(with or without full path info).  OK, that makes sense to me.
I've had different perls installed with different executable names
myself.
        regards, tom lane