Subject: bug#19631: Libtoolize doesn't recognise local installations of m4

From: "Gary V. Vaughan" <[email-masked]>
Date: Mon, 19 Jan 2015 23:24:16 +0000

wontfix
close 19631

> On Jan 19, 2015, at 7:40 PM, Riley Baird <[email-masked]> wrote:
> 
> Hi,
> 
> If m4 is installed from source into the default location of
> /usr/local/bin/m4, libtoolise cannot find it when run from autogen.sh.
> This problem can be fixed by the command `export M4=/usr/local/bin/m4`,
> but automatic recognition of this path would be best. I am running
> OpenBSD 5.6.
> 
> # ./autogen.sh
> creating libtransmission/version.h
> libtoolize:   error: One of these is required:
> libtoolize:                 gm4 gnum4 m4
> libtoolize:   error: Please install GNU M4, or 'export M4=/path/to/gnu/m4'.
> autoreconf: libtoolize failed with exit status: 1
> 
> Yours thankfully,

At least with the recent Libtool 2.4.5 release, if you have /usr/local/bin
in your command search PATH when your autogen.sh script runs libtoolize, it
will find and use /usr/local/bin/m4 automatically if that m4 is suitable.

You can also use variations such as (assuming a bourns-like shell):

  M4=/path/to/gnu/m4 ./autogen.sh
  PATH=$PATH:/path/to/gnu/m4 ./autogen.sh
  env M4=/path/to/gnu/m4 ./autogen.sh

HTH,
-- 
Gary V. Vaughan (gary AT gnu DOT org)