Sisyphus <[EMAIL PROTECTED]> writes:
>Hi,
>
>I'm wanting to add libraries to 'EXTRALIBS' and 'LDLOADLIBS' in a 
>generated makefile. Can this be done from the Makefile.PL that generates 
>that makefile ? 

Yes.

>if so, how? :-)

Two main ways:
A. Compute something in Makefile.PL before calling WriteMakefile
   and adjust args passed to that so that vars end up the way you want.
   In this case it means adding something to 
       LIBS => 
   passed in.  (This is what Tk does - it is well behaved for once.)

B. A MY::something which messes with the data structures via the 
   object passed to it as 1st arg.
   In this case it needs to be something at or before const_loadlibs 
   so this would work.

package MY;   
sub const_loadlibs
{
 my ($self,@args) = @_;
 # diddle with $self - you have to poke about in real const_loadlibs
 # do find out where things are. 
 return $self->SUPER::const_loadlibs(@args); 
}

  

>
>Cheers,
>Rob

Reply via email to