summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/collection/Makefile.am11
-rw-r--r--common/collection/configure.ac2
-rw-r--r--common/dhash/Makefile.am8
-rw-r--r--common/dhash/configure.ac2
-rw-r--r--common/ini/Makefile.am11
-rw-r--r--common/ini/configure.ac2
-rw-r--r--sss_client/Makefile.am5
-rw-r--r--sss_client/configure.ac2
8 files changed, 40 insertions, 3 deletions
diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am
index fe0749045..a802cf017 100644
--- a/common/collection/Makefile.am
+++ b/common/collection/Makefile.am
@@ -2,7 +2,16 @@
TRACE_LEVEL=@TRACE_VAR@
topdir=$(srcdir)/..
-AM_CPPFLAGS = -Wall -I$(topdir) -I$(topdir)/trace $(TRACE_LEVEL)
+
+AM_CFLAGS =
+if HAVE_GCC
+ AM_CFLAGS += \
+ -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings
+endif
+
+AM_CPPFLAGS = -I$(topdir) -I$(topdir)/trace $(TRACE_LEVEL)
+
ACLOCAL_AMFLAGS = -I m4
# Set up the pkg-config file
diff --git a/common/collection/configure.ac b/common/collection/configure.ac
index 504cd4d5c..290a31017 100644
--- a/common/collection/configure.ac
+++ b/common/collection/configure.ac
@@ -7,6 +7,8 @@ AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
+AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
+
m4_pattern_allow([AM_SILENT_RULES])
AM_SILENT_RULES
diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am
index 9037bf97c..b8d5ce6ff 100644
--- a/common/dhash/Makefile.am
+++ b/common/dhash/Makefile.am
@@ -1,4 +1,10 @@
-AM_CPPFLAGS = -Wall
+AM_CFLAGS =
+if HAVE_GCC
+ AM_CFLAGS += \
+ -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings
+endif
+
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/common/dhash/configure.ac b/common/dhash/configure.ac
index feabc4845..bd2102877 100644
--- a/common/dhash/configure.ac
+++ b/common/dhash/configure.ac
@@ -7,6 +7,8 @@ AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
+AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
+
m4_pattern_allow([AM_SILENT_RULES])
AM_SILENT_RULES
diff --git a/common/ini/Makefile.am b/common/ini/Makefile.am
index 03d891256..dc30e9471 100644
--- a/common/ini/Makefile.am
+++ b/common/ini/Makefile.am
@@ -2,7 +2,16 @@
TRACE_LEVEL=@TRACE_VAR@
topdir=$(srcdir)/..
-AM_CPPFLAGS = -Wall -I$(topdir) -I$(topdir)/trace -I$(topdir)/collection $(TRACE_LEVEL)
+
+AM_CFLAGS =
+if HAVE_GCC
+ AM_CFLAGS += \
+ -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wwrite-strings
+endif
+
+AM_CPPFLAGS = -I$(topdir) -I$(topdir)/trace -I$(topdir)/collection $(TRACE_LEVEL)
+
ACLOCAL_AMFLAGS = -I m4
# Set up the pkg-config file
diff --git a/common/ini/configure.ac b/common/ini/configure.ac
index 14280cfca..c4732cf79 100644
--- a/common/ini/configure.ac
+++ b/common/ini/configure.ac
@@ -7,6 +7,8 @@ AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
+AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
+
m4_pattern_allow([AM_SILENT_RULES])
AM_SILENT_RULES
diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am
index 346e6b1d4..4552720ed 100644
--- a/sss_client/Makefile.am
+++ b/sss_client/Makefile.am
@@ -11,6 +11,11 @@ if WANT_AUX_INFO
AM_CFLAGS += -aux-info $@.X
endif
+if HAVE_GCC
+ AM_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \
+ -Wcast-qual -Wcast-align -Wwrite-strings
+endif
+
nsslibdir = @nsslibdir@
pamlibdir = $(nsslibdir)/security
diff --git a/sss_client/configure.ac b/sss_client/configure.ac
index be1b4ccb0..97fc83def 100644
--- a/sss_client/configure.ac
+++ b/sss_client/configure.ac
@@ -11,6 +11,8 @@ AC_CONFIG_MACRO_DIR([m4])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
+AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
+
m4_pattern_allow([AM_SILENT_RULES])
AM_SILENT_RULES