The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Module::Install::XSUtil - Utility functions for XS modules

VERSION

This document describes Module::Install::XSUtil version 0.09.

SYNOPSIS

        # in Makefile.PL
        use inc::Module::Install;

        # This is a special version of requires().
        # If XS::SomeFeature provides header files,
        # this will add its include paths into INC
        requies_xs 'XS::SomeFeature';

        # No need to include ppport.h. It's created here.
        use_ppport 3.19;

        # Enables C compiler warnings, e.g. -Wall -Wextra
        cc_warnings;

        # Sets some C pre-processor macros.
        cc_define q{-DUSE_SOME_FEATURE=42};

        # Sets paths for header files
        cc_include_paths 'include'; # all the header files are in include/

        # Sets paths for source files
        cc_src_paths 'src'; # all the XS and C source files are in src/

        # Installs header files
        install_headers; # all the header files in @cc_include_paths

DESCRIPTION

Module::Install::XSUtil provides a set of utilities to setup distributions which include XS module.

See XS::MRO::Compat and Method::Cumulative for example.

FUNCTIONS

requires_xs $module => ?$version

Does requires() and setup include paths and libraries for what $module provides.

use_ppport ?$version

Create ppport.h using Devel::PPPort::WriteFile().

This command calls configure_requires 'Devel::PPPort' => $version and adds -DUSE_PPPORT to ccflags.

cc_warnings

Enables C compiler warnings.

cc_define @macros

Sets cpp macros as compiler options.

cc_src_paths @source_paths

Sets source file directories which include *.xs or *.c.

cc_include_paths @include_paths

Sets include paths for a C compiler.

install_headers ?@header_files

Declares providing header files.

If @header_files are omitted, all the header files in include paths will be installed.

cc_append_to_inc @include_paths

Low level API.

cc_append_to_libs @libraries

Low level API.

cc_append_to_ccflags @ccflags

Low level API.

cc_append_to_funclist @funclist

Low level API.

DEPENDENCIES

Perl 5.5.3 or later.

BUGS

No bugs have been reported.

Please report any bugs or feature requests to the author.

AUTHOR

Goro Fuji (gfx) <gfuji(at)cpan.org>.

SEE ALSO

ExtUtils::Depends.

Module::Install.

Module::Install::CheckLib.

Devel::CheckLib.

ExtUtils::MakeMaker.

LICENSE AND COPYRIGHT

Copyright (c) 2009, Goro Fuji (gfx). Some rights reserved.

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