[gnome-packagekit] copy 'strict' option to configure to add -Werror from PK
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] copy 'strict' option to configure to add -Werror from PK
- Date: Sun, 16 Aug 2009 09:31:26 +0000 (UTC)
commit 303ab24010890937b824138668a82fddee277ae8
Author: Anders F Bjorklund <afb users sourceforge net>
Date: Thu Aug 13 20:26:34 2009 +0200
copy 'strict' option to configure to add -Werror from PK
configure.ac | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 32c3748..e0bf963 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,26 @@ AC_SUBST(PYTHON_PACKAGE_DIR)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
dnl ---------------------------------------------------------------------------
+dnl - Use strict options (default enabled for devs, disabled in releases)
+dnl ---------------------------------------------------------------------------
+
+dnl if .git directory is present, considering we are working in the repository
+if test -d ".git"; then
+ default_strict=yes
+else
+ default_strict=no
+fi
+
+AC_ARG_ENABLE(strict, AC_HELP_STRING([--enable-strict],
+ [Enable strict compilation options]), enable_strict=$enableval,
+ enable_strict=$default_strict)
+if test x$enable_strict != xno; then
+ if test "$GCC" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -Werror"
+ fi
+fi
+
+dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------
if test "$GCC" = "yes"; then
@@ -36,7 +56,6 @@ if test "$GCC" = "yes"; then
# CPPFLAGS="$CPPFLAGS -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"
CPPFLAGS="$CPPFLAGS -DGSEAL_ENABLE"
CPPFLAGS="$CPPFLAGS -Wall -Wreturn-type"
- CPPFLAGS="$CPPFLAGS -Werror"
# CPPFLAGS="$CPPFLAGS -Wextra"
CPPFLAGS="$CPPFLAGS -Wdeclaration-after-statement"
# CPPFLAGS="$CPPFLAGS -Wmissing-declarations"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]