On Wed, 12 Dec 2007, Curtis Leach wrote:
> I'm using Perl v5.8.8 on AIX, and I have a question about how Perl
> locates libraries (*.a & *.so files) used by it's modules.
>
> I know Perl looks in the following directories for these libraries on
> my machine.
>
> > perl -V:libpth
> libpth='/lib /usr/lib /usr/ccs/lib /usr/local/lib';
>
> But one of the libraries I need to link to for a module isn't located
> in one of these 4 locations & since I don't own the machine, the Unix
> admin doesn't want to reinstall the library in one of these locations.
>
> Is there any environment variable that can be set to add that
> additional directory? Or am I screwed until I can build a new Perl
> release that includes that directory? (Luckily I do own the Perl
> Install)
>
> Or is there some option I can add to "perl Makefile.PL" that would
> help during the build/test/install?

You can add alternate paths with -L/path.

Look at `perldoc ExtUtils::MakeMaker`:

    LIBS
      An anonymous array of alternative library specifications to be
      searched for (in order) until at least one library is found. E.g.

        'LIBS' => ["-lgdbm", "-ldbm -lfoo", "-L/path -ldbm.nfs"]

      Mind, that any element of the array contains a complete set of
      arguments for the ld command. So do not specify

        'LIBS' => ["-ltcl", "-ltk", "-lX11"]

      See ODBM_File/Makefile.PL for an example, where an array is needed. If
      you specify a scalar as in

        'LIBS' => "-ltcl -ltk -lX11"

      MakeMaker will turn it into an array with one element.

Cheers,
-Jan

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to