in reply to How to best detect availability of C compiler in Makefile.PL?

Module::Install has the can_cc function you can use in your Makefile.PL

use inc::Module::Install; if ( can_cc() ) { # do XS stuff } else { # do pure-perl stuff } # rest of Makefile.PL