1Alien::m4(3) User Contributed Perl Documentation Alien::m4(3)
2
3
4
6 Alien::m4 - Find or build GNU m4
7
9 version 0.21
10
12 From a Perl script
13
14 use Alien::m4;
15 use Env qw( @PATH );
16 unshift @PATH, Alien::m4->bin_dir; # m4 is now in your path
17
18 From Alien::Base Build.PL
19
20 use Alien:Base::ModuleBuild;
21 my $builder = Module::Build->new(
22 ...
23 alien_bin_requires => {
24 'Alien::m4' => '0.07',
25 },
26 ...
27 );
28 $builder->create_build_script;
29
31 This package can be used by other CPAN modules that require GNU m4.
32
34 exe
35 my $m4 = Alien::m4->exe;
36
37 Returns the "name" of m4. Normally this is "m4", but on some platforms
38 it may be gm4 or gnum4, or whatever is specified by $ENV{M4}.
39
41 m4
42 %{m4}
43
44 Returns the name of the m4 command. Usually just "m4".
45
47 Why GNU m4? Many Unixen come with BSD or other variants of m4 which
48 are perfectly good. Unfortunately, the main use case for this module
49 is Alien::Autotools and friends. Autoconf requires the GNU m4,
50 probably for political reasons, possibly for technical reasons. If you
51 are using one of these Unixen, don't despair, you can usually install
52 the GNU version of m4 either by building from source or by installing a
53 binary package, with either the name "gm4" or "gnum4", and this module
54 will find it, and Alien::Autotools will be able to use it.
55
57 Graham Ollis <plicease@cpan.org>
58
60 This software is copyright (c) 2017 by Graham Ollis.
61
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64
65
66
67perl v5.38.0 2023-07-20 Alien::m4(3)