diff --git a/configure.ac b/configure.ac index 29d51f5c..e4d35512 100644 --- a/configure.ac +++ b/configure.ac @@ -148,13 +148,13 @@ AC_CHECK_DECLS([TIOCSRS485], [], [], [[#include ]]) AC_CHECK_DECLS([TIOCM_RTS], [], [], [[#include ]]) # Wtype-limits is not supported by gcc 4.2 (default on recent Mac OS X) -my_CFLAGS="-Wall \ +WARNING_CFLAGS="-Wall \ -Wmissing-declarations -Wmissing-prototypes \ -Wnested-externs -Wpointer-arith \ -Wsign-compare -Wchar-subscripts \ -Wstrict-prototypes -Wshadow \ -Wformat-security" -AC_SUBST([my_CFLAGS]) +AC_SUBST([WARNING_CFLAGS]) # Build options AC_ARG_ENABLE(tests, @@ -184,7 +184,7 @@ AC_MSG_RESULT([ includedir: ${includedir} compiler: ${CC} - cflags: ${CFLAGS} + cflags: ${CFLAGS} ${WARNING_CFLAGS} ldflags: ${LDFLAGS} tests: ${enable_tests} diff --git a/src/Makefile.am b/src/Makefile.am index 551fe432..fc6c8dbb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,7 @@ AM_CPPFLAGS = \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -I${top_srcdir}/src -AM_CFLAGS = ${my_CFLAGS} +AM_CFLAGS = ${WARNING_CFLAGS} libmodbus_la_SOURCES = \ modbus.c \ diff --git a/tests/Makefile.am b/tests/Makefile.am index 7302c8d7..79a66c22 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -44,7 +44,7 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src -AM_CFLAGS = ${my_CFLAGS} +AM_CFLAGS = ${WARNING_CFLAGS} CLEANFILES = *~ *.log