That's exactly what I think *must* be the only solution. Well, if it's not the best solution, at least I know at least one other fool is using it, right? Thanks!
Michael On 3/11/2012 12:24 AM, David Oswald wrote: > I don't know if this is necessarily the best strategy in your case (it > may be, but defer judgment until you've heard a few other opinions). > > If you are able to detect where the libraries are located while > Makefile.PL executes, you can then actually open your Image::Magick.pm > source file and write the custom location into the source code during > the Makefile.PL step of the mantra. In this way, Makefile.PL is > actually configuring Image::Magick module. > > An example of such a technique can be found in the Makefile.PL for > Inline::CPP, where I use Makefile.PL to detect certain defaults, and > then to write those defaults right into the source code of CPP.pm. > Each installation of Inline::CPP has code that is specifically > customized for the target system. > > I assume you do know how to actually specify that library location > (via the "use Inline C => Config => INC ...." and/or "use Inline::C => > Config => LIBS => ...." configuration directives). > > So in this case you're not configuring Inline::C, but rather your > module that uses it. > > On a side note, if you intend to use Inline::C as a dependency for > your module (rather than just using it once to create the XS code), > have a look at Math::Prime::FastSieve (in particular Makefile.PL) for > an example of how to make the dependency work correctly. > > I hope this helps, and that I haven't completely missed the point. ;) lol > > Dave > > > On Sat, Mar 10, 2012 at 8:45 PM, Michael Roberts <mich...@vivtek.com> wrote: >> I'm toying with the idea of writing a new Image::Magick wrapper that, >> you know, actually compiles on systems like mine. Here's my question, >> and this is really more a module configuration question than strictly an >> Inline question, but: given that the LIB and INCLUDE directories could >> be essentially anywhere and have to be found at install time, how do I >> tell Inline *at install time* what values to use for LIB and INCLUDE? >> >> I know how to find these directories at install time - the existing >> PerlMagick does that already - although it does it wrong for the latest >> version of ImageMagick, ugh - and I know how to tell Inline where >> directories are for its compilation step, but I don't actually see how >> to combine these two, so that the invocation of Inline::C in the module >> would reflect the paths found at install time. >> >> Any ideas would be welcome, even just pointers to something on CPAN that >> does this already. Thanks! >> >> Michael >> > >