On (10/01/14 13:38), Stef Walter wrote:
On 10.01.2014 10:26, Jakub Hrozek wrote:
> On Thu, Jan 09, 2014 at 09:26:40PM +0100, Stef Walter wrote:
>> diff --git a/configure.ac b/configure.ac
>> index f89de6e..9156dfa 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -325,7 +325,7 @@ SSS_WARNINGS='
>> for option in $SSS_WARNINGS; do
>> SAVE_CFLAGS="$CFLAGS"
>> CFLAGS="$CFLAGS $option"
>> - AC_MSG_CHECKING([whether compiler understands $option])
>> + AC_MSG_CHECKING([compiler option $option])
>
> Was this hunk intended to be part of patch #1 ?
Moved to first patch.
> I think there should be a default for "enable_strict". Othwerwise the
> configure output looks a bit odd when neither --enable-strict nor
> --disable-strict is selected:
Right ... removed the tristate, now it's just either on or off,
defaulting to off (at least for now).
In other projects I've used it as a tristate where --enable-strict turns
on strictness, and --disable-strict makes things more liberal than
default. But no need to get into that here.
Cheers,
Stef
From c181a90e8493a804b3ff1f5b3d1571cdf04d7681 Mon Sep 17 00:00:00
2001
From: Stef Walter <stefw(a)redhat.com>
Date: Thu, 9 Jan 2014 14:12:08 +0100
Subject: [PATCH 1/2] configure: Enable usual SSSD_WARNINGS automatically
Instead of limiting these to Fedora based sssd developers
via the bashrc_sssd script, enable them automatically in
configure if supported by the compiler.
---
configure.ac | 23 +++++++++++++++++++++++
contrib/fedora/bashrc_sssd | 12 ++----------
2 files changed, 25 insertions(+), 10 deletions(-)
---
With this patch, flag "-Wall" is used two times. 1st occurence if from
CFLAGS
and the 2nd occurence is from AM_CFLAGS (in Makefile.am)
Can we move flags "-Wextra -Wno-unused-parameter -Wno-sign-compare
-Wformat-security"
into AM_CFLAGS?
From f1e1cad379367f21e0a98d7f136ada284954a610 Mon Sep 17 00:00:00
2001
From: Stef Walter <stefw(a)redhat.com>
Date: Thu, 9 Jan 2014 14:26:46 +0100
Subject: [PATCH 2/2] configure: Add strict compilation mode with
--enable-strict
---
configure.ac | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/configure.ac b/configure.ac
index f66bf0b..42941ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,6 +335,22 @@ for option in $SSS_WARNINGS; do
fi
done
+dnl Strict Compilation -- -Werror etc.
+
+AC_ARG_ENABLE(strict, [
+ AS_HELP_STRING([--enable-strict],
+ [Strict code compilation [default: auto]])
^^^^
I think default is no
+ ])
+
+AC_MSG_CHECKING([build strict])
+if test "$enable_strict" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
^^
replace tab with spaces
+else
+ enable_strict="no"
else branch is useless, because default value of
enable_strict is no
It is an default action of 4th optional argument in the macro AC_ARG_ENABLE
+fi
+AC_MSG_RESULT($enable_strict)
+
+
AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config
src/sysv/systemd/sssd.service src/sysv/sssd
src/sysv/gentoo/sssd src/sysv/SUSE/sssd
--
1.8.4.2
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel