I’m trying to install m4
in MINGW
After ./configure
ended normally I tried make
but error was occurred.
make[1]: Entering directory `/c/src/autotools/build_m4/src'
gcc -c -DHAVE_CONFIG_H -I.. -I../../m4-1.4/src -I../../m4-1.4/src/../lib -g -O
../../m4-1.4/src/m4.c
../../m4-1.4/src/m4.c:22:24: fatal error: sys/signal.h: No such file or director
y
#include <sys/signal.h>
^
compilation terminated.
make[1]: *** [m4.o] Error 1
make[1]: Leaving directory `/c/src/autotools/build_m4/src'
make: *** [all] Error 1
signal.h
is in \c\mingw\include
that is set in PATH environment.
How can I tell make
where signal.h
is?
Converting a comment into an answer:
On most Unix systems, the file
/usr/include/signal.h
contains#include <sys/signal.h>
. It seems thatm4
is assuming that there will be a<sys/signal.h>
— presumably without havingautoconf
check that it exists. This could be a bug in (the configuration process for)m4
, or it could be a problem with your setup.Have you been able to compile other GNU programs before? Is there a directory
/c/mingw/include/sys
(or\c\mingw\include\sys
)? If not, you may be able to get going by creating asys
subdirectory in\c\mingw\include
(if it is missing) and copyingsignal.h
into it. But it is a hack workaround for a probable bug.
If this works — as it seems to — check whether your MinGW installation was correct and up to date. If so, report the problem to the maintainers of m4
(email bug-m4
at gnu.org
), but check the web site for instructions on how to do that.
Consider removing the copied signal.h
as it wasn't there originally. OTOH, you may need it again in the future — but personally, I'd feel happier if the installation were in its pristine state normally and the hack was only made when absolutely necessary.