Re: Distributing C code
You might find Memcached::libmemcached interesting. http://search.cpan.org/dist/Memcached-libmemcached/ It ships with a bundled copy of the libmemcached source. Makefile.PL not only runs the libmemcached configure script, but also make and make install. (The "install" directory is actually a temp directory in which the rest of Makefile.PL expects to find the built libs.) Tim. On Mon, Mar 17, 2008 at 05:23:38PM +, Alberto Simões wrote: > Hi > > I have a C package that has a Perl Module associated. At the moment it > follows the following file system structure: > > [/] >| >|- configure.ac >|- Makefile.am >|- *.c >|- perl > |- file.pm > |- Makefile.PL > |- MANIFEST > | ... > > At the moment the approach is to run the configure script that is hacked to > produce a Makefile.AM from the output of Makefile.PL. Also, the dist rule > is hacked to follow the MANIFEST files. > > What I would like was to rewrite this configure system and base it in Perl. > I want to make all the package installable from CPAN as all users of the C > package uses the Perl module interface. > > My question is: what is the best and easier approach? > Any module I might give a peek to steal some ideas? > > TIA > ambs > -- > Alberto Simões - Departamento de Informática - Universidade do Minho > Campus de Gualtar - 4710-057 Braga - Portugal
Re: Distributing C code
Hi Guy Hulbert wrote: On Mon, 2008-17-03 at 17:23 +, Alberto Simões wrote: What I would like was to rewrite this configure system and base it in Perl. I want to make all the package installable from CPAN as all users of the C package uses the Perl module interface. My question is: what is the best and easier approach? The standard way is to use h2xs but there is also swig and I seem to recall reading recently that Incline::C may be easier but I don't know how much it is used. h2xs: http://search.cpan.org/~rgarcia/perl-5.10.0/utils/h2xs.PL Swig: http://www.swig.org/exec.html Inline: http://search.cpan.org/src/INGY/Inline-0.44/README Ok, the question was nor exactly regarding how to buid the Perl module interface. The question was more, what is the correct way to distribute it. I normally use ExtUtils::MakeMaker for Perl Modules, but I am not sure if it has all the nuts I need to detect libraries and so on. What I really want is something to replace autoconf/automake/libtool. Cheers ambs -- Alberto Simões - Departamento de Informática - Universidade do Minho Campus de Gualtar - 4710-057 Braga - Portugal
Re: Distributing C code
On Mon, Mar 17, 2008 at 12:45 PM, Guy Hulbert <[EMAIL PROTECTED]> wrote: > Inline::C may be easier but I don't know how much it is used. It's used less than it used to, thanks to this guy: InlineX::CPP2XS Convert from Inline C++ code to XS. InlineX-CPP2XS-0.12 - 19 Sep 2007 - Sisyphus InlineX::C2XS Convert from Inline C code to XS. InlineX-C2XS-0.12 - 19 Sep 2007 - Sisyphus
Re: Distributing C code
# from Alberto Simões # on Monday 17 March 2008 10:23: >What I would like was to rewrite this configure system and base it in >Perl. I want to make all the package installable from CPAN as all > users of the C package uses the Perl module interface. Is there anything in the 'configure' that can't be done with Module::Build? What object files result from the C compilation? Where do they get installed? --Eric -- Don't worry about what anybody else is going to do. The best way to predict the future is to invent it. --Alan Kay --- http://scratchcomputing.com ---
Re: Distributing C code
On Mon, 2008-17-03 at 17:23 +, Alberto Simões wrote: > What I would like was to rewrite this configure system and base it in > Perl. I want to make all the package installable from CPAN as all users > of the C package uses the Perl module interface. > > My question is: what is the best and easier approach? The standard way is to use h2xs but there is also swig and I seem to recall reading recently that Incline::C may be easier but I don't know how much it is used. h2xs: http://search.cpan.org/~rgarcia/perl-5.10.0/utils/h2xs.PL Swig: http://www.swig.org/exec.html Inline: http://search.cpan.org/src/INGY/Inline-0.44/README -- --gh
Distributing C code
Hi I have a C package that has a Perl Module associated. At the moment it follows the following file system structure: [/] | |- configure.ac |- Makefile.am |- *.c |- perl |- file.pm |- Makefile.PL |- MANIFEST | ... At the moment the approach is to run the configure script that is hacked to produce a Makefile.AM from the output of Makefile.PL. Also, the dist rule is hacked to follow the MANIFEST files. What I would like was to rewrite this configure system and base it in Perl. I want to make all the package installable from CPAN as all users of the C package uses the Perl module interface. My question is: what is the best and easier approach? Any module I might give a peek to steal some ideas? TIA ambs -- Alberto Simões - Departamento de Informática - Universidade do Minho Campus de Gualtar - 4710-057 Braga - Portugal