develooper Front page | perl.perl5.porters | Postings from January 2001

have_library() and family

Thread Next
Matt Sergeant
January 17, 2001 04:26
have_library() and family
Message ID:
Would anyone be interested in seeing MakeMaker add a have_library(),
have_func() and so on be added? These names are taken from Ruby, where in
a ruby "Makefile.PL" equivalent you can go:


To check it is installed without going all the way to the make phase. You
can also go:

have_library("ghttp", "ghttp_get_header_names");

to check if a certain function exists. If it does, it sets

I've coded this up (mostly copying the Ruby code) for HTTP::GHTTP, but
thought it could be made more generic, and could certainly be useful for
ExtUtils::MakeMaker to be able to do in core.

I've only implemented have_library, but we could implement all of:

have_library($lib, $func)
find_library($lib, $func, @paths)
have_func($func, $header)


    /||    ** Director and CTO **
   //||    ** Ltd   **  ** XML Application Serving **
  // ||    ** **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site:     **
    //  \\

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About