Seij has asked for the wisdom of the Perl Monks concerning the following question:

Hello there,

currently I try to develop a little module to call function of the StormLib library (http://www.zezula.net/en/mpq/stormlib.html).

I have already created a directory structure with "h2xs -On Game::Archive::MoPaQ" and all was OK.

But now my problem is: how to handle the source of the StormLib library?

Should I include it with the module (and then where should I put it in and how to handle cross plattform builds)?
Or should I only say to the user that he must build the StormLib and then link to it (and how should I do this while building my module)?

Thanks for your time (and maybe help).

Greets Seij

Replies are listed 'Best First'.
Re: XS Module for external library
by Corion (Patriarch) on Dec 22, 2010 at 08:39 UTC

    There is Devel::Checklib for checking whether a library is available.

    For building the alien library, I would look at how Alien::wxWidgets does it. It knows how to download and build the wxWidgets library, and seems to work on multiple platforms.