14

As part of a long, sordid story whose end goal is simply to get GMP installed for use with code::blocks in Windows, I am trying to configure gmp. I do this with the following command:

./configure --prefix=${gmp_install}

Everything starts out well enough. After a few minutes and a bit of progress, everything grinds to a halt and I get this message:

configure: error: No usable M4 in $PATH or /usr5bin

I don't even know what M4 is, but I discover that it is some sort of macro processor. So I download it, and add the folder to my Path variable. Then I start the configure again, but same result.

Is there something that I need to do to M4 to get it working? I'm truly at a loss. Thanks for your help.

user877329
  • 6,717
  • 8
  • 46
  • 88
AndroidDev
  • 20,466
  • 42
  • 148
  • 239
  • Did you build and install m4, or merely download it? If `/path/to/bin` is in your PATH, what happens when you execute `/path/to/bin/m4`? – William Pursell Aug 10 '12 at 20:15

4 Answers4

16

If you're using debian based OS, do sudo apt-get install m4. If internet isn't there or you have just the package of m4, copy it in /opt, configure it and later on change the $PATH value to the one you have now.

Abhineet Sharma
  • 169
  • 1
  • 5
3

If you are using cygwin, the setup installer has a working package of m4. Then there's no need to download m4 or change $PATH.

qwr
  • 9,525
  • 5
  • 58
  • 102
2

I came up with your same problem, I solved it by running the Mingw package installer, and search for msys-m4 in the list, select all and then Apply Changes, it should let you ./configure just fine :)

Raúl Sanpedro
  • 266
  • 4
  • 15
2

Assuming you are on MSYS2 (You seem to have a sh), you can install m4 via pacman -S m4.

Be careful that if you run configure through a shell, that you don't pick WSL's bash accidentally (which is in %System32%/bash.exe). Which is what happened in our build system...

Sebastian Graf
  • 3,602
  • 3
  • 27
  • 38