.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "ExtUtils::HasCompiler 3pm" .TH ExtUtils::HasCompiler 3pm 2024-05-14 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME ExtUtils::HasCompiler \- Check for the presence of a compiler .SH VERSION .IX Header "VERSION" version 0.025 .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& use ExtUtils::HasCompiler \*(Aqcan_compile_extension\*(Aq; \& if (can_compile_extension()) { \& ... \& } \& else { \& ... \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module tries to check if the current system is capable of compiling, linking and loading an XS module. .PP \&\fBNotice\fR: this is an early release, interface stability isn't guaranteed yet. .SH FUNCTIONS .IX Header "FUNCTIONS" .SS can_compile_loadable_object(%opts) .IX Subsection "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: .IP \(bu 4 quiet .Sp Do not output the executed compilation commands. .IP \(bu 4 config .Sp An ExtUtils::Config (compatible) object for configuration. .IP \(bu 4 skip_load .Sp This causes can_compile_loadable_object to not try to load the generated object. This defaults to true on a cross-compiling perl. .SS can_compile_static_library(%opts) .IX Subsection "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: .IP \(bu 4 quiet .Sp Do not output the executed compilation commands. .IP \(bu 4 config .Sp An ExtUtils::Config (compatible) object for configuration. .SS can_compile_extension(%opts) .IX Subsection "can_compile_extension(%opts)" This will call either \f(CW\*(C`can_compile_loadable_object\*(C'\fR, or \f(CW\*(C`can_compile_static_library\*(C'\fR, depending on which is the default on your configuration. In addition to the arguments listed above, it can take one more optional argument: .IP \(bu 4 linktype .Sp 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. .SH AUTHOR .IX Header "AUTHOR" Leon Timmermans .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2014 by Leon Timmermans. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.