ExtUtils::Autoconf

ExtUtils::Autoconf is a Perl interface to GNU autoconf.
Download

ExtUtils::Autoconf Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Florian Ragwitz
  • Publisher web site:
  • http://search.cpan.org/~flora/

ExtUtils::Autoconf Tags


ExtUtils::Autoconf Description

ExtUtils::Autoconf is a Perl interface to GNU autoconf. ExtUtils::Autoconf is a Perl interface to GNU autoconf.SYNOPSIS use ExtUtils::Autoconf; my $ac = ExtUtils::Autoconf->new; $ac->autogen; $ac->configure; $ac->clean; $ac->realclean;ExtUtils::Autoconf is a thin wrapper around GNU autoconf/autoheader which allows to run those tools easily from perl. This allows using autoconf for configuring perl modules and especially extensions in a portable way without messing around with the compilation of C code from perl.TYPICAL USAGETypically ExtUtils::Autoconf is being used from Makefile.PLs in Perl module distributions.AUTOCONFTo use it in your module you first need to create a directory called autoconf (or call it something else and set wd accordingly. This is the working directory for ExtUtils::Autoconf and the programs it invokes.Create a configure.ac or configure.in file in this directory. This file contains invocations of autoconf macros that test the system features your package needs or can use. Autoconf macros already exist to check for many features; see Existing Tests, for heir descriptions. For most other features, you can use Autoconf template macros to produce custom checks; see Writing Tests, for information about them.A typical configure.ac might look like this: AC_PREREQ(2.50) AC_INIT AC_CONFIG_HEADERS() AC_DEFINE_UNQUOTED(PERL_OSNAME, "$osname", ) AC_OUTPUTIn this script we first require autoconf version 2.50, then initialize the system and tell it to create a config header file called config.h with the results it gathered while running the configure script.In this script we only have one result called PERL_OSNAME. This is simply set to the value of the environment variable $osname, which corresponds to perls $Config{osname}.After our tests we do AC_OUTPUT to write our results to config.h.That's it for the configure.ac part. Now include the autoconf/config.h file in your C or C++ code of the module and use the defines in there.Requirements:· Perl Requirements: · Perl


ExtUtils::Autoconf Related Software