view release on metacpan or search on metacpan
Config::AutoConf->check_decl("basename(char *)")
This method caches its result in the `ac_cv_decl_<set lang>`\_symbol
variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_decls( symbols, \\%options? )
For each of the symbols (with optional function argument types for C++
overloads), run [check\_decl](https://metacpan.org/pod/check_decl).
Contrary to GNU autoconf, this method does not declare HAVE\_DECL\_symbol
macros for the resulting `confdefs.h`, because it differs as `check_decl`
between compiling languages.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
Given callbacks for _action\_on\_symbol\_true_ or _action\_on\_symbol\_false_ are
called for each symbol checked using ["check\_decl"](#check_decl) receiving the symbol as
first argument.
## check\_func( $function, \\%options? )
This method actually tests whether _$funcion_ can be linked into a program
trying to call _$function_. This method caches its result in the
ac\_cv\_func\_FUNCTION variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to `check_cached`, respectively.
Returns: True if the function was found, false otherwise
## check\_funcs( \\@functions-list, $action-if-true?, $action-if-false? )
The same as check\_func, but takes a list of functions in _\\@functions-list_
to look for and checks for each in turn. Define HAVE\_FUNCTION for each
function that was found.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to `check_cached`, respectively. Given callbacks
for _action\_on\_function\_true_ or _action\_on\_function\_false_ are called for
each symbol checked using ["check\_func"](#check_func) receiving the symbol as first
argument.
## check\_builtin( $builtin, \\%options? )
This method actually tests whether _$builtin_ is a supported built-in
known by the compiler. Either, by giving us the type of the built-in or
by taking the value from `__has_builtin`. This method caches its result
in the ac\_cv\_builtin\_FUNCTION variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to `check_cached`, respectively.
Returns: True if the function was found, false otherwise
## check\_type( $symbol, \\%options? )
Check whether type is defined. It may be a compiler builtin type or defined
by the includes. In C, type must be a type-name, so that the expression
`sizeof (type)` is valid (but `sizeof ((type))` is not).
If _type_ type is defined, preprocessor macro HAVE\__type_ (in all
capitals, with "\*" replaced by "P" and spaces and dots replaced by
underscores) is defined.
This method caches its result in the `ac_cv_type_`type variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_types( \\@type-list, \\%options? )
For each type in _@type-list_, call [check\_type](https://metacpan.org/pod/check_type) is called to check
for type and return the accumulated result (accumulation op is binary and).
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
Given callbacks for _action\_on\_type\_true_ or _action\_on\_type\_false_ are
called for each symbol checked using ["check\_type"](#check_type) receiving the symbol as
first argument.
## compute\_int( $expression, @decls?, \\%options )
Returns the value of the integer _expression_. The value should fit in an
initializer in a C variable of type signed long. It should be possible
to evaluate the expression at compile-time. If no includes are specified,
the default includes are used.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_sizeof\_type( $type, \\%options? )
Checks for the size of the specified type by compiling and define
`SIZEOF_type` using the determined size.
In opposition to GNU AutoConf, this method can determine size of structure
members, eg.
$ac->check_sizeof_type( "SV.sv_refcnt", { prologue => $include_perl } );
# or
$ac->check_sizeof_type( "struct utmpx.ut_id", { prologue => "#include <utmpx.h>" } );
This method caches its result in the `ac_cv_sizeof_<set lang>`\_type variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_sizeof\_types( type, \\%options? )
For each type [check\_sizeof\_type](https://metacpan.org/pod/check_sizeof_type) is called to check for size of type.
If _action-if-found_ is given, it is additionally executed when all of the
sizes of the types could determined. If _action-if-not-found_ is given, it
is executed when one size of the types could not determined.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
Given callbacks for _action\_on\_size\_true_ or _action\_on\_size\_false_ are
called for each symbol checked using ["check\_sizeof\_type"](#check_sizeof_type) receiving the
symbol as first argument.
## check\_alignof\_type( type, \\%options? )
Define ALIGNOF\_type to be the alignment in bytes of type. _type_ must
be valid as a structure member declaration or _type_ must be a structure
member itself.
This method caches its result in the `ac_cv_alignof_<set lang>`\_type
variable, with _\*_ mapped to `p` and other characters not suitable for a
variable name mapped to underscores.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_alignof\_types (type, \[action-if-found\], \[action-if-not-found\], \[prologue = default includes\])
For each type [check\_alignof\_type](https://metacpan.org/pod/check_alignof_type) is called to check for align of type.
If _action-if-found_ is given, it is additionally executed when all of the
aligns of the types could determined. If _action-if-not-found_ is given, it
is executed when one align of the types could not determined.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
Given callbacks for _action\_on\_align\_true_ or _action\_on\_align\_false_ are
called for each symbol checked using ["check\_alignof\_type"](#check_alignof_type) receiving the
symbol as first argument.
## check\_member( member, \\%options? )
Check whether _member_ is in form of _aggregate_._member_ and
_member_ is a member of the _aggregate_ aggregate.
which are used prior to the aggregate under test.
If _aggregate_ aggregate has _member_ member, preprocessor
macro HAVE\__aggregate_\__MEMBER_ (in all capitals, with spaces
and dots replaced by underscores) is defined.
This macro caches its result in the `ac_cv_`aggr\_member variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_members( members, \\%options? )
For each member [check\_member](https://metacpan.org/pod/check_member) is called to check for member of aggregate.
This function will return a true value (1) if at least one member is found.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be favoured
over `default includes` (represented by ["\_default\_includes"](#_default_includes)). If any of
_action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined, both callbacks
are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
Given callbacks for _action\_on\_member\_true_ or _action\_on\_member\_false_ are
called for each symbol checked using ["check\_member"](#check_member) receiving the symbol as
first argument.
## check\_header( $header, \\%options? )
This function is used to check if a specific header file is present in
the system: if we detect it and if we can compile anything with that
header included. Note that normally you want to check for a header
first, and then check for the corresponding library (not all at once).
Config::AutoConf->check_header("ncurses.h");
This function will return a true value (1) on success, and a false value
if the header is not present or not available for common usage.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
When a _prologue_ exists in the optional hash at end, it will be prepended
to the tested header. If any of _action\_on\_cache\_true_,
_action\_on\_cache\_false_ is defined, both callbacks are passed to
["check\_cached"](#check_cached) as _action\_on\_true_ or _action\_on\_false_ to
`check_cached`, respectively.
## check\_headers
This function uses check\_header to check if a set of include files exist
in the system and can be included and compiled by the available compiler.
Returns the name of the first header file found.
Passes an optional \\%options hash to each ["check\_header"](#check_header) call.
## check\_all\_headers
This function checks each given header for usability and returns true
when each header can be used -- otherwise false.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
Each of existing key/value pairs using _prologue_, _action\_on\_cache\_true_
or _action\_on\_cache\_false_ as key are passed-through to each call of
["check\_header"](#check_header).
Given callbacks for _action\_on\_header\_true_ or _action\_on\_header\_false_ are
called for each symbol checked using ["check\_header"](#check_header) receiving the symbol as
first argument.
## check\_stdc\_headers
Checks for standard C89 headers, namely stdlib.h, stdarg.h, string.h and float.h.
If those are found, additional all remaining C89 headers are checked: assert.h,
ctype.h, errno.h, limits.h, locale.h, math.h, setjmp.h, signal.h, stddef.h,
stdio.h and time.h.
libraries have `<dirent.h>`. Programs supporting only newer OS
might not need to use this method.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
Each of existing key/value pairs using _prologue_, _action\_on\_header\_true_
(as _action\_on\_true_ having the name of the tested header as first argument)
or _action\_on\_header\_false_ (as _action\_on\_false_ having the name of the
tested header as first argument) as key are passed-through to each call of
["\_check\_header"](#_check_header).
Given callbacks for _action\_on\_cache\_true_ or _action\_on\_cache\_false_ are
passed to the call of ["check\_cached"](#check_cached).
## \_check\_perlapi\_program
This method provides the program source which is suitable to do basic
compile/link tests to prove perl development environment.
## \_check\_compile\_perlapi
This method can be used from other checks to prove whether we have a perl
because linking the test program can fail with unresolved symbols.
The other-libraries argument should be limited to cases where it is
desirable to test for one library in the presence of another that
is not already in LIBS.
This method caches its result in the `ac_cv_lib_`lib\_func variable.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to `check_cached`, respectively.
It's recommended to use [search\_libs](https://metacpan.org/pod/search_libs) instead of check\_lib these days.
## search\_libs( function, search-libs, @other-libs?, \\%options? )
Search for a library defining function if it's not already available.
This equates to calling
Config::AutoConf->link_if_else(
symbols.
The result of this test is cached in the ac\_cv\_search\_function variable
as "none required" if function is already available, as `0` if no
library containing function was found, otherwise as the -llibrary option
that needs to be prepended to LIBS.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to `check_cached`, respectively. Given callbacks
for _action\_on\_lib\_true_ or _action\_on\_lib\_false_ are called for
each library checked using ["link\_if\_else"](#link_if_else) receiving the library as
first argument and all `@other_libs` subsequently.
## check\_lm( \\%options? )
This method is used to check if some common `math.h` functions are
available, and if `-lm` is needed. Returns the empty string if no
library is needed, or the "-lm" string if libm is needed.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
Each of existing key/value pairs using _action\_on\_func\_true_ (as
_action\_on\_true_ having the name of the tested functions as first argument),
_action\_on\_func\_false_ (as _action\_on\_false_ having the name of the tested
functions as first argument), _action\_on\_func\_lib\_true_ (as
_action\_on\_lib\_true_ having the name of the tested functions as first
argument), _action\_on\_func\_lib\_false_ (as _action\_on\_lib\_false_ having
the name of the tested functions as first argument) as key are passed-
through to each call of ["search\_libs"](#search_libs).
Given callbacks for _action\_on\_lib\_true_, _action\_on\_lib\_false_,
_action\_on\_cache\_true_ or _action\_on\_cache\_false_ are passed to the
call of ["search\_libs"](#search_libs).
**Note** that _action\_on\_lib\_true_ and _action\_on\_func\_lib\_true_ or
_action\_on\_lib\_false_ and _action\_on\_func\_lib\_false_ cannot be used
at the same time, respectively.
## pkg\_config\_package\_flags($package, \\%options?)
Search for pkg-config flags for package as specified. The flags which are
to the global `extra_compile_flags` and `extra_link_flags`, respectively.
In case, no _package configuration_ matching given criteria could be found,
return a `false` value (`0`).
Call it with the package you're looking for and optional callback whether
found or not.
If the very last parameter contains a hash reference, `CODE` references
to _action\_on\_true_ or _action\_on\_false_ are executed, respectively.
If any of _action\_on\_cache\_true_, _action\_on\_cache\_false_ is defined,
both callbacks are passed to ["check\_cached"](#check_cached) as _action\_on\_true_ or
_action\_on\_false_ to ["check\_cached"](#check_cached), respectively.
## \_check\_mm\_pureperl\_build\_wanted
This method proves the `_argv` attribute and (when set) the `PERL_MM_OPT`
whether they contain _PUREPERL\_ONLY=(0|1)_ or not. The attribute `_force_xs`
is set as appropriate, which allows a compile test to bail out when `Makefile.PL`
is called with _PUREPERL\_ONLY=0_.
## \_check\_mb\_pureperl\_build\_wanted
lib/Config/AutoConf.pm view on Meta::CPAN
Config::AutoConf->check_decl("basename(char *)")
This method caches its result in the C<ac_cv_decl_E<lt>set langE<gt>>_symbol
variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub check_decl
{
my ($self, $symbol) = @_;
$self = $self->_get_instance();
my $options = {};
lib/Config/AutoConf.pm view on Meta::CPAN
overloads), run L<check_decl>.
Contrary to B<GNU Autoconf>, this method does not declare C<HAVE_DECL_symbol>
macros for the resulting C<confdefs.h>, because it differs as C<check_decl>
between compiling languages.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
Given callbacks for I<action_on_symbol_true> or I<action_on_symbol_false> are
called for each symbol checked using L</check_decl> receiving the symbol as
first argument.
=cut
sub check_decls
{
my ($self, $symbols) = @_;
$self = $self->_get_instance();
my $options = {};
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_func( $function, \%options? )
This method actually tests whether I<$funcion> can be linked into a program
trying to call I<$function>. This method caches its result in the
ac_cv_func_FUNCTION variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to C<check_cached>, respectively.
Returns: True if the function was found, false otherwise
=cut
sub check_func
{
my ($self, $function) = @_;
$self = $self->_get_instance();
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_funcs( \@functions-list, $action-if-true?, $action-if-false? )
The same as check_func, but takes a list of functions in I<\@functions-list>
to look for and checks for each in turn. Define HAVE_FUNCTION for each
function that was found.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to C<check_cached>, respectively. Given callbacks
for I<action_on_function_true> or I<action_on_function_false> are called for
each symbol checked using L</check_func> receiving the symbol as first
argument.
=cut
sub check_funcs
{
my ($self, $functions_ref) = @_;
$self = $self->_get_instance();
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_builtin( $builtin, \%options? )
This method actually tests whether I<$builtin> is a supported built-in
known by the compiler. Either, by giving us the type of the built-in or
by taking the value from C<__has_builtin>. This method caches its result
in the ac_cv_builtin_FUNCTION variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to C<check_cached>, respectively.
Returns: True if the function was found, false otherwise
=cut
sub _have_builtin_define_name
{
my $builtin = $_[0];
my $have_name = "HAVE_BUILTIN_" . uc($builtin);
lib/Config/AutoConf.pm view on Meta::CPAN
If I<type> type is defined, preprocessor macro HAVE_I<type> (in all
capitals, with "*" replaced by "P" and spaces and dots replaced by
underscores) is defined.
This method caches its result in the C<ac_cv_type_>type variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub check_type
{
my ($self, $type) = @_;
$self = $self->_get_instance();
my $options = {};
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_types( \@type-list, \%options? )
For each type in I<@type-list>, call L<check_type> is called to check
for type and return the accumulated result (accumulation op is binary and).
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
Given callbacks for I<action_on_type_true> or I<action_on_type_false> are
called for each symbol checked using L</check_type> receiving the symbol as
first argument.
=cut
sub check_types
{
my ($self, $types) = @_;
$self = $self->_get_instance();
my $options = {};
lib/Config/AutoConf.pm view on Meta::CPAN
Returns the value of the integer I<expression>. The value should fit in an
initializer in a C variable of type signed long. It should be possible
to evaluate the expression at compile-time. If no includes are specified,
the default includes are used.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub _expr_value_define_name
{
my $expr = $_[0];
my $have_name = "EXPR_" . uc($expr);
$have_name =~ tr/*/P/;
lib/Config/AutoConf.pm view on Meta::CPAN
$ac->check_sizeof_type( "SV.sv_refcnt", { prologue => $include_perl } );
# or
$ac->check_sizeof_type( "struct utmpx.ut_id", { prologue => "#include <utmpx.h>" } );
This method caches its result in the C<ac_cv_sizeof_E<lt>set langE<gt>>_type variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub _sizeof_type_define_name
{
my $type = $_[0];
my $have_name = "SIZEOF_" . uc($type);
$have_name =~ tr/*/P/;
lib/Config/AutoConf.pm view on Meta::CPAN
For each type L<check_sizeof_type> is called to check for size of type.
If I<action-if-found> is given, it is additionally executed when all of the
sizes of the types could determined. If I<action-if-not-found> is given, it
is executed when one size of the types could not determined.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
Given callbacks for I<action_on_size_true> or I<action_on_size_false> are
called for each symbol checked using L</check_sizeof_type> receiving the
symbol as first argument.
=cut
sub check_sizeof_types
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $types) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
member itself.
This method caches its result in the C<ac_cv_alignof_E<lt>set langE<gt>>_type
variable, with I<*> mapped to C<p> and other characters not suitable for a
variable name mapped to underscores.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub check_alignof_type
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $type) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
For each type L<check_alignof_type> is called to check for align of type.
If I<action-if-found> is given, it is additionally executed when all of the
aligns of the types could determined. If I<action-if-not-found> is given, it
is executed when one align of the types could not determined.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
Given callbacks for I<action_on_align_true> or I<action_on_align_false> are
called for each symbol checked using L</check_alignof_type> receiving the
symbol as first argument.
=cut
sub check_alignof_types
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $types) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
If I<aggregate> aggregate has I<member> member, preprocessor
macro HAVE_I<aggregate>_I<MEMBER> (in all capitals, with spaces
and dots replaced by underscores) is defined.
This macro caches its result in the C<ac_cv_>aggr_member variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub check_member
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $member) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_members( members, \%options? )
For each member L<check_member> is called to check for member of aggregate.
This function will return a true value (1) if at least one member is found.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be favored
over C<default includes> (represented by L</_default_includes>). If any of
I<action_on_cache_true>, I<action_on_cache_false> is defined, both callbacks
are passed to L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
Given callbacks for I<action_on_member_true> or I<action_on_member_false> are
called for each symbol checked using L</check_member> receiving the symbol as
first argument.
=cut
sub check_members
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $members) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
Config::AutoConf->check_header("ncurses.h");
This function will return a true value (1) on success, and a false value
if the header is not present or not available for common usage.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
When a I<prologue> exists in the optional hash at end, it will be prepended
to the tested header. If any of I<action_on_cache_true>,
I<action_on_cache_false> is defined, both callbacks are passed to
L</check_cached> as I<action_on_true> or I<action_on_false> to
C<check_cached>, respectively.
=cut
sub check_header
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my ($self, $header) = @_;
lib/Config/AutoConf.pm view on Meta::CPAN
=head2 check_all_headers
This function checks each given header for usability and returns true
when each header can be used -- otherwise false.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
Each of existing key/value pairs using I<prologue>, I<action_on_cache_true>
or I<action_on_cache_false> as key are passed-through to each call of
L</check_header>.
Given callbacks for I<action_on_header_true> or I<action_on_header_false> are
called for each symbol checked using L</check_header> receiving the symbol as
first argument.
=cut
sub check_all_headers
{
my $options = {};
scalar @_ > 2 and ref $_[-1] eq "HASH" and $options = pop @_;
my $self = shift->_get_instance();
lib/Config/AutoConf.pm view on Meta::CPAN
libraries have C<< E<lt>dirent.hE<gt> >>. Programs supporting only newer OS
might not need to use this method.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
Each of existing key/value pairs using I<prologue>, I<action_on_header_true>
(as I<action_on_true> having the name of the tested header as first argument)
or I<action_on_header_false> (as I<action_on_false> having the name of the
tested header as first argument) as key are passed-through to each call of
L</_check_header>.
Given callbacks for I<action_on_cache_true> or I<action_on_cache_false> are
passed to the call of L</check_cached>.
=cut
sub _have_dirent_header_define_name
{
my $header = $_[0];
my $have_name = "HAVE_DIRENT_IN_" . uc($header);
$have_name =~ tr/_A-Za-z0-9/_/c;
return $have_name;
lib/Config/AutoConf.pm view on Meta::CPAN
because linking the test program can fail with unresolved symbols.
The other-libraries argument should be limited to cases where it is
desirable to test for one library in the presence of another that
is not already in LIBS.
This method caches its result in the C<ac_cv_lib_>lib_func variable.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to C<check_cached>, respectively.
It's recommended to use L<search_libs> instead of check_lib these days.
=cut
sub check_lib
{
my $options = {};
scalar @_ > 1 and ref $_[-1] eq "HASH" and $options = pop @_;
lib/Config/AutoConf.pm view on Meta::CPAN
symbols.
The result of this test is cached in the ac_cv_search_function variable
as "none required" if function is already available, as C<0> if no
library containing function was found, otherwise as the -llibrary option
that needs to be prepended to LIBS.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to C<check_cached>, respectively. Given callbacks
for I<action_on_lib_true> or I<action_on_lib_false> are called for
each library checked using L</link_if_else> receiving the library as
first argument and all C<@other_libs> subsequently.
=cut
sub search_libs
{
my $options = {};
scalar @_ > 1 and ref $_[-1] eq "HASH" and $options = pop @_;
lib/Config/AutoConf.pm view on Meta::CPAN
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
Each of existing key/value pairs using I<action_on_func_true> (as
I<action_on_true> having the name of the tested functions as first argument),
I<action_on_func_false> (as I<action_on_false> having the name of the tested
functions as first argument), I<action_on_func_lib_true> (as
I<action_on_lib_true> having the name of the tested functions as first
argument), I<action_on_func_lib_false> (as I<action_on_lib_false> having
the name of the tested functions as first argument) as key are passed-
through to each call of L</search_libs>.
Given callbacks for I<action_on_lib_true>, I<action_on_lib_false>,
I<action_on_cache_true> or I<action_on_cache_false> are passed to the
call of L</search_libs>.
B<Note> that I<action_on_lib_true> and I<action_on_func_lib_true> or
I<action_on_lib_false> and I<action_on_func_lib_false> cannot be used
at the same time, respectively.
=cut
sub check_lm
lib/Config/AutoConf.pm view on Meta::CPAN
To support stage compiling properly (C<rpath> vs. library file location),
the internal representation is a moving target. Do not use the result
directly - the getters L<_get_extra_compiler_flags|/_get_extra_compiler_flags>
and L<_get_extra_linker_flags|/_get_extra_linker_flags> are strongly
encouraged. In case this is not possible, please open a ticket to get
informed on invasive changes.
If the very last parameter contains a hash reference, C<CODE> references
to I<action_on_true> or I<action_on_false> are executed, respectively.
If any of I<action_on_cache_true>, I<action_on_cache_false> is defined,
both callbacks are passed to L</check_cached> as I<action_on_true> or
I<action_on_false> to L</check_cached>, respectively.
=cut
my $_pkg_config_prog;
sub _pkg_config_flag
{
defined $_pkg_config_prog or croak("pkg_config_prog required");
my @pkg_config_args = @_;