[gnome-disk-utility] Add --enable-strict and default to this for developer builds



commit 5d0ab243b0465ba622074588c72e9d6f1538047e
Author: David Zeuthen <davidz redhat com>
Date:   Fri Jul 8 11:47:53 2011 -0400

    Add --enable-strict and default to this for developer builds
    
    Suggested by Javier Jardósee
    
     http://mail.gnome.org/archives/release-team/2011-June/msg00030.html
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 configure.ac |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 87d8a80..f9598a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,7 +113,24 @@ fi
 GNOME_DOC_INIT
 GNOME_DEBUG_CHECK
 GNOME_COMPILE_WARNINGS([maximum])
-GNOME_MAINTAINER_MODE_DEFINES
+
+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, AS_HELP_STRING([--enable-strict],
+                [Enable strict compilation options]), enable_strict=$enableval,
+                enable_strict=$default_strict)
+if test x$enable_strict != xno; then
+        CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
+fi
+
 
 AC_ARG_ENABLE(gtk-doc, AS_HELP_STRING([--enable-gtk-doc],
   [use gtk-doc to build documentation [default=no]]),,
@@ -281,6 +298,7 @@ echo "
         compiler:                   ${CC}
         cflags:                     ${CFLAGS}
         cppflags:                   ${CPPFLAGS}
+        strict:                     ${enable_strict}
 
         Maintainer mode:            ${USE_MAINTAINER_MODE}
         Building api docs:          ${enable_gtk_doc}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]