I have a simple project with a simple configure.ac
script:
AC_INIT(...)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES(...)
AC_OUTPUT
using GNU Autoconf version 2.69 (OpenSUSE Linux with gcc 9.2.1), but gcc is being called with no warning flags:
gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT aprog.o -MD -MP -MF .deps/aprog.Tpo -c -o aprog.o aprog.c
mv ...
gcc -g -O2 -o aprog aprog.o -lgmp
In particular, I found -Wformat
not working. Shouldn't -Wall
include -Wformat
? And shouldn't all warnings appear on the make line? If I run gcc line directly with -Wformat
the warning shows in compile but it doesn't when I run autoconf
, configure
and make
.
What I'm doing wrong?