[PATCH 3/4] Include extra compiler flags

Sergio Durigan Junior sergiodj en sergiodj.net
Lun Abr 14 06:10:36 UTC 2014


Given the last attempts to clean up the code, this commit adds extra
compiler flags that are useful to keep the codebase sane.  The added
flags, for now, are:

  -Wall -Werror -Wextra -Wunused -Wunused-variable
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a9cce1f..77fc984 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,6 +29,7 @@ AM_INIT_AUTOMAKE
 dnl Do we have a usable compiler and 'install'?
 AC_PROG_CC
 AC_PROG_INSTALL
+AC_LANG_WERROR
 
 dnl Checking for GNUTLS and libgcrypt.
 PKG_CHECK_MODULES(GNUTLS, gnutls >= 1.4.0, , AC_MSG_ERROR(Could not find gnutls))
@@ -36,7 +37,9 @@ AM_PATH_LIBGCRYPT(,,AC_MSG_ERROR(Could not find gcrypt))
 
 dnl Setting useful flags.
 LIBS="$LIBGCRYPT_LIBS $GNUTLS_LIBS $LIBS -lz"
-CFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS $CFLAGS"
+CFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS \
+	-Wall -Werror -Wextra -Wunused -Wunused-variable \
+	$CFLAGS"
 
 dnl Outputting the necessary files for the build.
 AC_CONFIG_HEADERS([config.h])
-- 
1.9.0



Más información sobre la lista de distribución Softwares-impostos