1ExtUtils::HasCompiler(3U)ser Contributed Perl DocumentatiEoxntUtils::HasCompiler(3)
2
3
4

NAME

6       ExtUtils::HasCompiler - Check for the presence of a compiler
7

VERSION

9       version 0.023
10

SYNOPSIS

12        use ExtUtils::HasCompiler 'can_compile_extension';
13        if (can_compile_extension()) {
14          ...
15        }
16        else {
17          ...
18        }
19

DESCRIPTION

21       This module tries to check if the current system is capable of
22       compiling, linking and loading an XS module.
23
24       Notice: this is an early release, interface stability isn't guaranteed
25       yet.
26

FUNCTIONS

28   can_compile_loadable_object(%opts)
29       This checks if the system can compile, link and load a perl loadable
30       object. It may take the following options:
31
32       •   quiet
33
34           Do not output the executed compilation commands.
35
36       •   config
37
38           An ExtUtils::Config (compatible) object for configuration.
39
40       •   skip_load
41
42           This causes can_compile_loadable_object to not try to load the
43           generated object. This defaults to true on a cross-compiling perl.
44
45   can_compile_static_library(%opts)
46       This checks if the system can compile and link a perl static library.
47       It does not check it it can compile a new perl with it. It may take the
48       following options:
49
50       •   quiet
51
52           Do not output the executed compilation commands.
53
54       •   config
55
56           An ExtUtils::Config (compatible) object for configuration.
57
58   can_compile_extension(%opts)
59       This will call either "can_compile_loadable_object", or
60       "can_compile_static_library", depending on which is the default on your
61       configuration. In addition to the arguments listed above, it can take
62       one more optional argument:
63
64       •   linktype
65
66           This will force the linktype to be either static or dynamic.
67           Dynamic compilation on a static perl won't work, but static
68           libraries can be viable on a dynamic perl.
69

AUTHOR

71       Leon Timmermans <leont@cpan.org>
72
74       This software is copyright (c) 2014 by Leon Timmermans.
75
76       This is free software; you can redistribute it and/or modify it under
77       the same terms as the Perl 5 programming language system itself.
78
79
80
81perl v5.32.1                      2021-01-27          ExtUtils::HasCompiler(3)
Impressum