----- Original Message ----- From: "Greg Ederer" <[EMAIL PROTECTED]>
.
.

When I override environment variables (like PREFIX or PERLPREFIX) on the command line or in the top level Makefile.PL, and then run
    perl Makefile.PL
or
perl Makefile.PL PREFIX=/home/gederer/usr PERLPREFIX=/usr/local/lib/perl
or
   perl Makefile.PL LIB=/home/gederer/usr
those environment variables get set correctly in the top level generated Makefile, but do not seem to get recursively propagated to the generated Makefiles in subdirectories.

You could do it much like ExtUtils::FakeConfig does it:

Create a Config_fix.pm:

-----------------------------------
package Config_fix;
use Config;

$obj = tied %Config::Config;

$obj->{installprivilib} = "somewhere else";

1;
-----------------------------------

Then set the PERL5OPT environment variable to -MConfig_fix. (Not sure if "PERL5OPT" is case sensitive ... and if it is, whether it should be upper or lower case.)

Then, *whenever* perl gets called, it gets called with the rewritten Config value(s) specified in Config_fix.pm.

On windows:

-----------------------------------
C:\_32\pscrpt>perl -V:installprivlib
installprivlib='c:\perl58_M\lib';

C:\_32\pscrpt>set PERL5OPT=-MConfig_fix

C:\_32\pscrpt>perl -V:installprivlib
installprivlib='somewhere else';

C:\_32\pscrpt>
-----------------------------------

EU::FC is written specifically with Win32 and the MinGW compiler in mind. There's probably not much point in installing it unless you're using Win32 and the MinGW compiler. But the concept should apply universally. I've actually used EU::FC, and an appropriately set PERL5OPT, to change Config values and build PDL on Win32 - so the concept definitely works.

However .... would you perhaps be better off just installing your own perl ?

Cheers,
Rob

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to