X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=Makefile.PL;h=adf29be9dec6fac0b40f3231930a92470b097eeb;hb=e2ef1f21e2626aa4e019f1398b53f533b80bbc97;hp=7b4d612c333186cb15cacf02a08493da0ae26840;hpb=bcf524c10c0ad85fcef711acffc3251bb8472352;p=linux-seccomp.git diff --git a/Makefile.PL b/Makefile.PL index 7b4d612..adf29be 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,10 +1,6 @@ use 5.014000; -use Devel::CheckLib; use ExtUtils::MakeMaker; -check_lib_or_exit - lib => 'seccomp'; - WriteMakefile( NAME => 'Linux::Seccomp', VERSION_FROM => 'lib/Linux/Seccomp.pm', @@ -13,12 +9,10 @@ WriteMakefile( MIN_PERL_VERSION => '5.14.0', LICENSE => 'perl', SIGN => 1, - CONFIGURE_REQUIRES => { - qw/Devel::CheckLib 0 - ExtUtils::MakeMaker 0/, - }, PREREQ_PM => {}, - LIBS => ['-lseccomp'], + INC => '-Ilibseccomp/include', + MYEXTLIB => 'libseccomp/src/.libs/libseccomp$(LIB_EXT)', + clean => { FILES => 'libseccomp/src/.libs/libseccomp$(LIB_EXT)' }, META_ADD => { dynamic_config => 1, resources => { @@ -27,6 +21,13 @@ WriteMakefile( } ); +sub MY::postamble { +' +$(MYEXTLIB): libseccomp/configure + cd libseccomp && ./configure && `which gmake || echo $(MAKE)` all +' +} + if (eval {require ExtUtils::Constant; 1}) { # If you edit these definitions to change the constants used by this module, # you will need to use the generated const-c.inc and const-xs.inc