File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ our $Is_FreeBSD = $^O eq 'freebsd';
1717
1818our @EXPORT = qw( which_perl perl_lib makefile_name makefile_backup
1919 make make_run run make_macro calibrate_mtime
20- have_compiler slurp
20+ have_compiler have_cplusplus slurp
2121 $Is_VMS $Is_MacOS
2222 run_ok
2323 hash2files
@@ -367,6 +367,24 @@ sub have_compiler {
367367 return $have_compiler ;
368368}
369369
370+ =item have_cplusplus
371+
372+ $have_compiler = have_cplusplus;
373+
374+ Returns true if there is a C++ compiler available for XS builds.
375+
376+ =cut
377+
378+ sub have_cplusplus {
379+ my $have_cplusplus = 0;
380+ eval {
381+ require ExtUtils::CBuilder;
382+ my $cb = ExtUtils::CBuilder-> new(quiet => 1);
383+ $have_cplusplus = $cb -> have_cplusplus;
384+ };
385+ return $have_cplusplus ;
386+ }
387+
370388=item slurp
371389
372390 $contents = slurp($filename);
You can’t perform that action at this time.
0 commit comments