After getting my other code out the door I came back to this problem and I think I have a solution that works.
I basically took the typemap file mentioned by tonyc and the
$Config{foo} method mentioned by syphilis. I only had one other problem relating to my top-level Makefile.PL not passing the -D defines through to the make in the subdirectory (I need them both for the library in the subdir and the Perl XS code in the toplevel that was going to link against it). I managed to solve this with a bit of custom make action:
sub MY::postamble {
'$(MYEXTLIB): clib/Makefile
cd clib && perl Makefile.PL DEFINE="' .
(join ' ', @defines) . '" && $(MAKE) $(PASSTHRU)
...
I also mentioned the possibility raised by DrHyde of using stdint.h in the comments in the library header file, and gave the user the option of using their own custom typedefs when calling the top-level Makefile.PL. All in all, thanks to your help it wasn't too difficult, and I think the code should be easy enough to understand too. Just what I wanted: simple and clean.
Thanks again,
dec
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.