- NAME
- SYNOPSIS
- DESCRIPTION
  - Windows overrides
  - Mac OS X overrides
  - HP-UX and Solaris overrides
- ENVIRONMENT
- SEE ALSO

# NAME

ActivePerl::Config - Override the ActivePerl configuration

# SYNOPSIS

      use Config qw(%Config);

# DESCRIPTION

The standard `Config` module provides the %Config hash containing information about how this perl was built. These configuration values are used by modules and programs with the assumption that they still apply for the system where perl is deployed. This assumption does not always hold. The `ExtUtils::MakeMaker` module will for instance assume that it can use the compiler $Config{cc} for building new extensions, but another compiler might be the only one available.

The `ActivePerl::Config` module provides a solution for this. It overrides the values of %Config to better match the system where perl currently runs. For example, on Windows allows you to build extensions with the free compiler gcc (see http://www.mingw.org/) even though ActivePerl for Windows itself is built with the commercial Microsoft Visual Studio 6 compiler.

The `ActivePerl::Config` module is not used directly. It is automatically loaded by `Config` if available and works behind the scenes, overriding the values that are found in the %Config hash. The overriden values from `ActivePerl::Config` will also show when `perl -V:foo` is invoked from the command line.

## Windows overrides

For ActivePerl on Windows the following %Config overrides are provided:

$Config{make}

  This will be `nmake` by default, but if no nmake program can be found and other compatible make programs are found, then this value will reflect that. Currently dmake is the only other make implementation that is compatible enough to build perl extensions.

$Config{cc}, $Config{ccflags},...

  The value of $Config{cc} will be `cl` by default, but if no `cl` program can be found and gcc is found, then this value is `gcc` and other values related to the compiler environment is adjusted accordingly.

  The ACTIVEPERL_CONFIG_CC environment variable can be set to `gcc` to use `gcc` even when `cl` is found.

## Mac OS X overrides

For ActivePerl on Mac OS X the compilation flags (like `$Config{ccflags}` ) are adjusted to make it possible to compile extentions on systems that don't have the SDK for generating Universal binaries installed.

## HP-UX and Solaris overrides

For ActivePerl on HP-UX and Solaris the following %Config overrides are provided:

$Config{make}

  This will be `make` by default, but if make can't be found via the PATH, then it's set to /usr/ccs/bin/make if that one is available.

$Config{cc}, $Config{ccflags},...

  The value of $Config{cc} will be `cc` by default and the other compiler environment values are set up for compilation with the HP-UX ANSI C compiler or the Sun Forte/WorkShop compiler respectively. If cc can't be found via the PATH and gcc is found, then $Config{cc} is set to `gcc` and other values related to the compiler environment is adjusted accordingly.

  The ACTIVEPERL_CONFIG_CC environment variable can be set to `gcc` to use `gcc` even when `cc` is found.

# ENVIRONMENT

The following environment variables can influence the operation of the `ActivePerl::Config` module:

ACTIVEPERL_CONFIG_DISABLE

  If set to a TRUE value (e.g. "1"), prevent `ActivePerl::Config` from overriding any %Config value; the only values seen in %Config would be those determined at perl build time. Another way to disable `ActivePerl::Config` permanently is to remove it using ppm (`ppm remove ActivePerl-Config`)

ACTIVEPERL_CONFIG_SILENT

  If set to a TRUE value (e.g. "1"), suppress warnings on STDERR when new compilation environments are set up. This happens when a supported compiler is detected that is different from the one that perl was originally built with.

ACTIVEPERL_CONFIG_FOO

  Override the $Config{foo} value. For example if the ACTIVEPERL_CONFIG_MAKE environment variable has the value `dmake`, then so would $Config{make}.

  If the ACTIVEPERL_CONFIG_DISABLE variable is set, all other ACTIVEPERL_CONFIG_FOO variables are ignored.

# SEE ALSO

Config