Alien::m4(3)

πŸ“¦
version 0.21 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– Alien::m4 πŸ’–

okay bestie, so this little gem is straight out of the User Contributed Perl Documentation collection, and it's literally the manual page for Alien::m4. Yes, THE Alien::m4. We're gonna go through it together, no cap. πŸ¦‹


✨ NAME ✨

Alien::m4 β€” find or build GNU m4 πŸ’…


πŸŽ€ VERSION πŸŽ€

version 0.21 β€” that's the one, periodt.


🌸 SYNOPSIS 🌸

Two ways to pull up, depending on your vibe.

🫢 From a Perl script

use Alien::m4;
use Env qw( @PATH );
unshift @PATH, Alien::m4->bin_dir;  # m4 is now in your path

🫢 From Alien::Base Build.PL

use Alien:Base::ModuleBuild;
my $builder = Module::Build->new(
  ...
  alien_bin_requires => {
    'Alien::m4' => '0.07',
  },
  ...
);
$builder->create_build_script;

🌈 DESCRIPTION 🌈

This package is here for all the other CPAN modules out there that need GNU m4 in their life. It's giving ✨supportive bestie✨ energy. It just finds it for you, or builds it, no drama.


πŸ‘‘ METHODS πŸ‘‘

exe

my $m4 = Alien::m4->exe;

Returns the "name" of m4. Like, normally that name is "m4", but on some platforms it might be gm4 or gnum4, or honestly whatever tf $ENV{M4} says it is. She's flexible like that. πŸ’β™€οΈ


🧚 HELPERS 🧚

m4

%{m4}

Returns the name of the m4 command. Usually just "m4". Short, sweet, iconic. ⭐


πŸ’€ CAVEATS πŸ’€

okay so, why GNU m4 specifically?? Valid question, bestie.

Lots of Unixen come with BSD or other variants of m4, and ngl those are perfectly good. Like, genuinely fine.

BUT 😭 the main use case for this module is Alien::Autotools and friends, and Autoconf requires the GNU m4. Probably for political reasons, possibly for technical reasons β€” we don't make the rules, we just report them. πŸ™ˆ

So if you're on one of these Unixen, don't despair!! 🫢 You can usually install the GNU version of m4 either by building from source or by installing a binary package, and it might go by the name "gm4" or "gnum4". This module will find it, and Alien::Autotools will be able to use it. Slay. πŸ”₯


🌟 AUTHOR 🌟

Graham Ollis <plicease@cpan.org> β€” the main character who made this happen. πŸ‘‘


This software is copyright (c) 2017 by Graham Ollis.

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


fr fr, that's the whole page. go forth and find your m4. πŸ’–

and that's a wrap!! this one shipped with perl v5.42.0 on 2026-02-19 β€” mwah, catch you on the next manpage bestie πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from