ExtUtils::HasCompiler(3pm)

ExtUtils::HasCompiler3pm

Check for the presence of a compiler

Usage

 use ExtUtils::HasCompiler 'can_compile_extension';
 if (can_compile_extension()) {
   ...
 }
 else {
   ...
 }

Version

version 0.025

Overview

This module tries to check if the current system is capable of compiling, linking and loading an XS module.

Notice: this is an early release, interface stability isn't guaranteed yet.

Functions

can_compile_loadable_object(%opts)

This checks if the system can compile, link and load a perl loadable object. It may take the following options:

•

quiet

Do not output the executed compilation commands.

•

config

An ExtUtils::Config (compatible) object for configuration.

•

skip_load

This causes can_compile_loadable_object to not try to load the generated object. This defaults to true on a cross-compiling perl.

can_compile_static_library(%opts)

This checks if the system can compile and link a perl static library. It does not check it it can compile a new perl with it. It may take the following options:

•

quiet

Do not output the executed compilation commands.

•

config

An ExtUtils::Config (compatible) object for configuration.

can_compile_extension(%opts)

This will call either "can_compile_loadable_object", or "can_compile_static_library", depending on which is the default on your configuration. In addition to the arguments listed above, it can take one more optional argument:

•

linktype

This will force the linktype to be either static or dynamic. Dynamic compilation on a static perl won't work, but static libraries can be viable on a dynamic perl.

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

Author

Leon Timmermans <[email protected]>

From libextutils-hascompiler-perl 0.025-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.