use Module::Build; use Alien::Libxml2; my $builder = Module::Build->new( ... configure_requires => { 'Alien::Libxml2' => '0', ... }, extra_compiler_flags => Alien::Libxml2->cflags, extra_linker_flags => Alien::Libxml2->libs, ... ); $build->create_build_script;
In your Makefile.PL:
use ExtUtils::MakeMaker; use Config; use Alien::Libxml2; WriteMakefile( ... CONFIGURE_REQUIRES => { 'Alien::Libxml2' => '0', }, CCFLAGS => Alien::Libxml2->cflags . " $Config{ccflags}", LIBS => [ Alien::Libxml2->libs ], ... );
In your FFI::Platypus script or module:
use FFI::Platypus; use Alien::Libxml2; my $ffi = FFI::Platypus->new( lib => [ Alien::Libxml2->dynamic_libs ], );
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.