Skip Menu |

This queue is for tickets about the Devel-CheckLib CPAN distribution.

Report information
The Basics
Id: 48332
Status: resolved
Priority: 0/
Queue: Devel-CheckLib

People
Owner: Nobody in particular
Requestors: jettero [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: wishlist item:
These should really be user definable... I'm just going to edit the files in inc/ -- but it'd be handier (in terms of upgrades) if I could just set it from the Makefile. print $ch qq{#include <$header>\nint main(void) { return 0; }\n}; print $ch "int main(void) { return 0; }\n"; I need to do something besides return 0 to check for the right library version. -- If riding in an airplane is flying, then riding in a boat is swimming. 110 jumps, 45.0 minutes of freefall, 86.2 freefall miles.
The subject appears to be truncated -- what is it that you think needs to be customizable?
Subject: Re: [rt.cpan.org #48332] wishlist item:
Date: Thu, 30 Jul 2009 17:10:20 -0400
To: David Golden via RT <bug-Devel-CheckLib [...] rt.cpan.org>
From: Paul Miller <jettero [...] cpan.org>
On Thu, Jul 30, 2009 at 04:39:50PM -0400, David Golden via RT wrote: Show quoted text
> The subject appears to be truncated -- what is it that you think needs > to be customizable?
Yeah, the subject isn't what I intended, but the body was... I need to check for the existence of a certain function. I did this in my inc/ by commenting out your $cfile (tempfile) and using my own... I'd prefer a config setting I could use from Makefile.PL or support for checking for functions or something. -- If riding in an airplane is flying, then riding in a boat is swimming. 110 jumps, 45.0 minutes of freefall, 86.2 freefall miles.
Show quoted text
> I need to check for the existence of a certain function. > I did this in my inc/ by commenting out your $cfile (tempfile) > and using my own... > > I'd prefer a config setting I could use from Makefile.PL or > support for checking for functions or something.
Would it be sufficient to be able to provide your own body for main()? Then you could pass it something like ... if(function1() && function2() && library_version() > 1.23) { return 0; } else { return 1; } to check that function 1 and function2 exist, and that library_version is high enough. It would be specified something like ... check_lib_or_exit( lib => 'jpeg', header => 'jpeglib.h', checkfunction => 'C code goes here' ); Then finally, we need to run the generated executable and make sure it returns the right value.
Subject: Re: [rt.cpan.org #48332] Wishlist: Check for existence of a specific function
Date: Fri, 31 Jul 2009 13:54:32 -0400
To: David Cantrell via RT <bug-Devel-CheckLib [...] rt.cpan.org>
From: Paul Miller <jettero [...] cpan.org>
On Fri, Jul 31, 2009 at 10:13:12AM -0400, David Cantrell via RT wrote: Show quoted text
> Would it be sufficient to be able to provide your own body for main()? > Then you could pass it something like ... > > if(function1() && function2() && library_version() > 1.23) { return 0; } > else { return 1; }
This is almost fine for my purposes. I just want to see if the function is *there*. Others may need more, so to fix it in the general sense, it does make sense to check the return values and things. I also need to specify an #include though. Perhaps that carries over from the header setting? -Paul -- If riding in an airplane is flying, then riding in a boat is swimming. 110 jumps, 45.0 minutes of freefall, 86.2 freefall miles.
Show quoted text
> This is almost fine for my purposes. I just want to see if the > function is *there*. Others may need more, so to fix it in the > general sense, it does make sense to check the return values and > things.
If the function ain't there, then it should fail at link-time. Show quoted text
> I also need to specify an #include though. Perhaps that carries > over from the header setting?
Yes.
Feature added (I think!) in 0.699_001, will bump to 0.7 once CPAN-testers results are in.