From ce75d1c6d6595bcb26dbacf7393098a8f9accb3f Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 4 Nov 2010 17:08:26 +0100 Subject: Stricter compilation flags Use a little stricter compilation flags, in particular -Wall and treat implicit function declarations as errors. Signed-off-by: Simo Sorce --- daemons/Makefile.am | 8 ++++++++ daemons/configure.ac | 2 ++ daemons/ipa-kpasswd/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-version/Makefile.am | 1 + daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am | 1 + 9 files changed, 17 insertions(+) (limited to 'daemons') diff --git a/daemons/Makefile.am b/daemons/Makefile.am index 9960789a..7b2b9974 100644 --- a/daemons/Makefile.am +++ b/daemons/Makefile.am @@ -4,6 +4,14 @@ AUTOMAKE_OPTIONS = 1.7 NULL = +AM_CFLAGS = $(NULL) +if HAVE_GCC + AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \ + -Wcast-align -Werror-implicit-function-declaration \ + $(NULL) +endif +export AM_CFLAGS + SUBDIRS = \ ipa-kpasswd \ ipa-slapi-plugins \ diff --git a/daemons/configure.ac b/daemons/configure.ac index 53806f52..da86557d 100644 --- a/daemons/configure.ac +++ b/daemons/configure.ac @@ -16,6 +16,8 @@ AC_PROG_LIBTOOL AC_HEADER_STDC +AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes]) + AC_SUBST(VERSION) dnl --------------------------------------------------------------------------- diff --git a/daemons/ipa-kpasswd/Makefile.am b/daemons/ipa-kpasswd/Makefile.am index ce241ca0..40e8c58f 100644 --- a/daemons/ipa-kpasswd/Makefile.am +++ b/daemons/ipa-kpasswd/Makefile.am @@ -8,6 +8,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(OPENLDAP_CFLAGS) \ $(KRB5_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am b/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am index fc3c55cc..d041815a 100644 --- a/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-enrollment/Makefile.am @@ -11,6 +11,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(KRB5_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am b/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am index 3b0ff629..b7986874 100644 --- a/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-modrdn/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(WARN_CFLAGS) \ $(NULL) diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am index 3577e48c..6f6092d2 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am @@ -11,6 +11,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(KRB5_CFLAGS) \ $(SSL_CFLAGS) \ diff --git a/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am b/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am index 1e5d9793..7c3709b5 100644 --- a/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-uuid/Makefile.am @@ -12,6 +12,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(WARN_CFLAGS) \ $(NULL) diff --git a/daemons/ipa-slapi-plugins/ipa-version/Makefile.am b/daemons/ipa-slapi-plugins/ipa-version/Makefile.am index f90543ee..d26a7d24 100644 --- a/daemons/ipa-slapi-plugins/ipa-version/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-version/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(KRB5_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am b/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am index 79c37bec..82a934a2 100644 --- a/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-winsync/Makefile.am @@ -11,6 +11,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(AM_CFLAGS) \ $(MOZLDAP_CFLAGS) \ $(WARN_CFLAGS) \ $(NULL) -- cgit