Perhaps a better list.

I want to provide better or more complete instructions in a module's
README for linking with a library installed in a non-standard location.

I just want to make sure I have this correct, and that it will work for
most platforms with Perl >= 5.00503.

For example, build some C library called "foo" and install like:

   $ ./configure --prefix=$HOME/foo

   $ make && make install

And then build a Perl module that links with the above library:

   $ perl Makefile.PL \
     CCFLAGS=-I$HOME/foo/include \
     LIBS="-lz -L$HOME/foo/lib -lfoo"

   $ LD_RUN_PATH=$HOME/foo/lib make

My questions are:

- Is that the recommended way?

- Can someone explain when to use INC vs. CCFLAGS?

- What I don't like about using LIBS in this situation is that it requires
the user to specify all the libs (as defined in the Makefile.PL).

Seems like it would be nice to just be able to specify a list of prefixes.
There's more control with LIBS, but in most cases specifying a prefix-type
dire would be enough.

- seems like LD_RUN_PATH is not always needed.  Is that dependent on the
version of MakeMaker?


BTW -- is there a way to build a ppm module for Windows on Linux?

-- 
Bill Moseley [EMAIL PROTECTED]




Reply via email to