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

have_library() and family

Thread Next
From:
Matt Sergeant
Date:
January 17, 2001 04:26
Subject:
have_library() and family
Message ID:
Pine.LNX.4.30.0101171218280.1406-100000@ted.sergeant.org
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:

have_library("ghttp");

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
-DHAVE_GHTTP_GET_HEADER_NAMES in DEFINES.

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)
have_header($header)

-- 
<Matt/>

    /||    ** Director and CTO **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // **     Personal Web Site: http://sergeant.org/     **
     \\//
     //\\
    //  \\



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About