[evolution-mapi] Introduce --enable-strict configure option
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Introduce --enable-strict configure option
- Date: Tue, 6 Nov 2012 16:05:47 +0000 (UTC)
commit 60e8a3f5da8bb12b2277cc001cbb4ca3bf0c3687
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 6 17:05:19 2012 +0100
Introduce --enable-strict configure option
This is currently used to add extra AM_CPPFLAGS to disable
deprecated symbols from other libraries.
configure.ac | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 51e8fd7..7a614a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,9 +52,7 @@ dnl ***********************
dnl Compiler Warning Flags
dnl ***********************
AS_COMPILER_FLAGS(WARNING_FLAGS,
- "-DE_BOOK_DISABLE_DEPRECATED
- -DE_CAL_DISABLE_DEPRECATED
- -Wall -Wextra
+ "-Wall -Wextra
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unused-parameter
@@ -75,6 +73,29 @@ dnl -Wredundant-decls
CFLAGS="$CFLAGS $WARNING_FLAGS"
+dnl *******************************
+dnl Check for --enable-strict
+dnl *******************************
+AC_ARG_ENABLE([strict],
+ [AS_HELP_STRING([--enable-strict],
+ [enable strict building, like without deprecated symbols (default=auto); auto enables strict building only if .git subdirectory exists])],
+ [enable_strict=$enableval], [enable_strict=auto])
+
+AC_MSG_CHECKING([if strict building is enabled])
+if test "x$enable_strict" = xauto; then
+ dnl Be strict when compiling with .git subdirectory
+ if test -d .git ; then
+ enable_strict=yes
+ else
+ enable_strict=no
+ fi
+fi
+AC_MSG_RESULT([$enable_strict])
+
+if test "x$enable_strict" = xyes; then
+ CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DE_BOOK_DISABLE_DEPRECATED -DE_CAL_DISABLE_DEPRECATED"
+fi
+
dnl ************
dnl i18n stuff
dnl ************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]