GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ExtUtils::Builder::AutoDetect::C(3) User Contributed Perl Documentation ExtUtils::Builder::AutoDetect::C(3)

ExtUtils::Builder::AutoDetect::C - compiler configuration, derived from perl's configuration

version 0.032

 my $planner = ExtUtils::Builder::Planner->new;
 $planner->load_extension('ExtUtils::Builder::AutoDetect::C', '0.001',
        profiles => ['@Perl'],
        type     => 'loadable-object',
 );
 $planner->compile('foo.c', 'foo.o', include_dirs => ['.']);
 $planner->link([ 'foo.o' ], 'foo.so', libraries => ['foo']);
 my $plan = $planner->materialize;
 $plan->run(['foo.so']);

This module is a ExtUtils::Builder::Planner::Extension that facilitates compiling object.

This adds two delegate methods to the planner, "compile" and "link". It takes named arguments that will be prefixed to the named arguments for all delegate calls. In practice, it's mainly useful with the "config", "profile" and "type" arguments.

If your $planner has a "config" delegate, that will be used as default value for "config".

This is usually not called directly, but through ExtUtils::Builder::Planner's "load_extension" method.

This works the same as with "compile".
This works the same as with "compile".
This works the same as with "compile".
A list of libraries to link to. E.g. "['z']".
A list of directories to find libraries in. E.g. "['/opt/my-app/lib/']".
A list of additional arguments to the linker.

This compiles $source to $target. It takes the following optional arguments:

The type of the final product. This must be one of:
  • executable

    An executable to be run. This is the default.

  • static-library

    A static library to link against.

  • dynamic-library

    A dynamic library to link against.

  • loadable-object

    A loadable extension. On most platforms this is the same as a dynamic library, but some (Mac) make a distinction between these two.

A Perl configuration to take hints from, must be an "ExtUtils::Config" compatible object.
A list of profile that can be used when compiling and linking. One profile comes with this distribution: '@Perl', which sets up the appropriate things to compile/link with "libperl".
A list of directories to add to the include path, e.g. "['include', '.']".
A hash of preprocessor defines, e.g. "{DEBUG => 1, HAVE_FEATURE => 0 }"
A list of additional arguments to the compiler.

Leon Timmermans <fawaka@gmail.com>

This software is copyright (c) 2012 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2025-05-04 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.