The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ExtUtils::AutoConf - A module to implement some of AutoConf macros in pure perl.

VERSION

Version 0.01_001

ABSTRACT

With this module I pretend to simulate some of the tasks AutoConf macros do. To detect a command, to detect a library, etc.

SYNOPSIS

    use ExtUtils::AutoConf;

    ExtUtils::AutoConf->check_prog("agrep");
    ExtUtils::AutoConf->check_progs("agrep", "egrep", "grep");

    ExtUtils::AutoConf->check_prog_awk;
    ExtUtils::AutoConf->check_prog_egrep;

    ExtUtils::AutoConf->check_cc();

    ExtUtils::AutoConf->check_lib("ncurses", "tgoto");

FUNCTIONS

check_prog

This function checks for a program with the supplied name. In success returns the full path for the executable;

check_progs

This function takes a list of program names. Returns the full path for the first found on the system. Returns undef if none was found.

check_prog_awk

From the autoconf documentation,

  Check for `gawk', `mawk', `nawk', and `awk', in that order, and
  set output [...] to the first one that is found.  It tries
  `gawk' first because that is reported to be the best
  implementation.

Note that it returns the full path, if found.

check_prog_egrep

From the autoconf documentation,

  Check for `grep -E' and `egrep', in that order, and [...] output
  [...] the first one that is found.

Note that it returns the full path, if found.

check_cc

This function checks if you have a running C compiler.

check_lib

This function is used to check if a specific library includes some function. Call it with the library name (without the lib portion), and the name of the function you want to test:

  ExtUtils::AutoConf->check_lib("z", "gzopen");

It returns 1 if the function exist, 0 otherwise.

AUTHOR

Alberto Simões, <ambs@cpan.org>

NEXT STEPS

Although a lot of work needs to be done, this is the next steps I intent to take.

  - detect flex/lex
  - detect yacc/bison/byacc
  - detect ranlib (not sure about its importance)

These are the ones I think not too much important, and will be addressed later, or by request.

  - detect an 'install' command
  - detect a 'ln -s' command -- there should be a module doing
    this kind of task.

BUGS

A lot. Portability is a pain, and I just have a Linux machine. <Patches welcome!>.

Please report any bugs or feature requests to bug-extutils-autoconf@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

ACKNOWLEDGEMENTS

Michael Schwern

Ken Williams

COPYRIGHT & LICENSE

Copyright 2004-2005 Alberto Simões, All Rights Reserved.

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

SEE ALSO

ExtUtils::CBuilder(3)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 225:

Non-ASCII character seen before =encoding in 'Simões,'. Assuming CP1252