NAME

Parrot::Configure::Step::Methods - Methods for selected configuration steps

DESCRIPTION

The Parrot::Configure::Step::Methods module provides methods inherited by Parrot::Configure::Step which are used internally by the runstep() method of more than one configuration step class but which are not intended for general use in all configuration step classes.

The methods in this module should not be considered part of the public interface of Parrot::Configure::Step. They merely refactor code which at one point was repeated in multiple configuration step classes and which need access to the data in the Parrot::Configure::Step object.

Since the methods are not part of the public interface, their names should begin with an underscore '_'.

METHODS

_recheck_settings()

$self->_recheck_settings($conf, $libs, $ccflags, $linkflags, $verbose);

Currently used in configuration step classes auto::gmp, auto::readline, auto::gdbm, and auto::opengl.

_handle_darwin_for_fink()

$self->_handle_darwin_for_fink($conf, $libs, $osname, $file);

Currently used in configuration step classes auto::gmp, auto::readline and auto::gdbm.

Modifies settings for linkflags, ldflags and ccflags in the Parrot::Configure object's data structure.

_handle_darwin_for_macports()

$self->_handle_darwin_for_macports($conf, $libs, $osname, $file);

Currently used in configuration step classes auto::gmp, auto::readline and auto::opengl.

Modifies settings for linkflags, ldflags and ccflags in the Parrot::Configure object's data structure.

Potentially expandable to cover all BSD-ports systems -- but as yet there has been no demand.

_add_to_libs()

$self->_add_to_libs( {
    conf            => $conf,
    osname          => $osname,
    cc              => $cc,
    win32_gcc       => '-lalpha32 -lalpha32 -lopenalpha32',
    win32_nongcc    => 'alpha.lib',
    darwin          => 'alphadarwin.lib',
    default         => '-lalpha',
} );

Purpose: In a number of configuration step classes, the class's runstep() method adds libraries to the single whitespace-delimited string found in the Parrot::Configure object's libs attribute. The libraries to be added are either OS-specific or OS/C-compiler-specific. This method enables the developer of a configuration step class to define a default value for such a flag -- usually the value that is appropriate to Unix-like systems -- and, optionally, to define non-default values for certain OSes or OS/C-compiler combinations. We currently support settings for:

  • MSWin32 with gcc as the C-compiler.

  • MSWin32 with any C-compiler other than gcc.

  • Darwin.

Arguments: Reference to a hash. Four of the hash's key-value pairs are required:

  • conf

    The Parrot::Configure object. Supplied within runstep().

  • osname

    The name of the operating system. Supplied within runstep().

  • cc

    The name of the C-compiler. Supplied within runstep().

  • default

    Libraries to be added where no OS-specific or OS/C-compiler-specific libraries are to be added. Single whitespace-delimited string.

These optional settings are currently supported and, if provided, will supersede the value in default.

  • win32_gcc

    Libraries to be added where OS is mswin32 and C-compiler is gcc. Single whitespace-delimited string.

  • win32_nongcc

    Libraries to be added where OS is mswin32 and C-compiler is not gcc. Single whitespace-delimited string.

  • darwin

    Libraries to be added where OS is Darwin. Do not supply a value if the value you need is the same as default. Single whitespace-delimited string.

Return Value: Returns true value upon success.

SEE ALSO

Parrot::Configure::Step.