Stricter compilation flags

Use a little stricter compilation flags, in particular -Wall and treat
implicit function declarations as errors.

Signed-off-by: Simo Sorce <ssorce@redhat.com>
This commit is contained in:
Jakub Hrozek 2010-11-04 17:08:26 +01:00 committed by Simo Sorce
parent 5da451876e
commit ce75d1c6d6
11 changed files with 28 additions and 0 deletions

View File

@ -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 \

View File

@ -16,6 +16,8 @@ AC_PROG_LIBTOOL
AC_HEADER_STDC
AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
AC_SUBST(VERSION)
dnl ---------------------------------------------------------------------------

View File

@ -8,6 +8,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(OPENLDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(WARN_CFLAGS) \

View File

@ -11,6 +11,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(WARN_CFLAGS) \

View File

@ -12,6 +12,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)

View File

@ -11,6 +11,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(SSL_CFLAGS) \

View File

@ -12,6 +12,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)

View File

@ -13,6 +13,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(KRB5_CFLAGS) \
$(WARN_CFLAGS) \

View File

@ -11,6 +11,7 @@ INCLUDES = \
-DLIBDIR=\""$(libdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
$(AM_CFLAGS) \
$(MOZLDAP_CFLAGS) \
$(WARN_CFLAGS) \
$(NULL)

View File

@ -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
INCLUDES = \
-I. \
-I$(srcdir) \
@ -13,6 +21,7 @@ INCLUDES = \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DLOCALEDIR=\""$(localedir)"\" \
$(AM_CFLAGS) \
$(KRB5_CFLAGS) \
$(OPENLDAP_CFLAGS) \
$(MOZLDAP_CFLAGS) \

View File

@ -19,6 +19,8 @@ AC_DISABLE_STATIC
AC_HEADER_STDC
AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
AC_SUBST(VERSION)
dnl ---------------------------------------------------------------------------