From 26951e1d5160db32441fe6fbac6fb05bb2666f8a Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Mon, 14 Apr 2014 02:13:59 -0300 Subject: [PATCH] Include extra compiler flags 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]) -- 2.20.1