[Gnucash-changes] r13873 - gnucash/trunk - Default to --enable-error-on-warning only in svn based source

David Hampton hampton at cvs.gnucash.org
Fri Apr 28 22:04:59 EDT 2006


Author: hampton
Date: 2006-04-28 22:04:57 -0400 (Fri, 28 Apr 2006)
New Revision: 13873
Trac: http://svn.gnucash.org/trac/changeset/13873

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/configure.in
Log:
Default to --enable-error-on-warning only in svn based source
trees. Fixes #330687.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-04-28 21:11:01 UTC (rev 13872)
+++ gnucash/trunk/ChangeLog	2006-04-29 02:04:57 UTC (rev 13873)
@@ -1,5 +1,8 @@
 2006-04-28  David Hampton  <hampton at employees.org>
 
+	* configure.in: Default to --enable-error-on-warning only in svn
+	based source trees. Fixes #330687.
+
 	* src/gnome/window-reconcile.c:
 	* src/gnome/gnc-plugin-page-account-tree.c:
 	* src/engine/gnc-lot.[ch]:

Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2006-04-28 21:11:01 UTC (rev 13872)
+++ gnucash/trunk/configure.in	2006-04-29 02:04:57 UTC (rev 13873)
@@ -2007,16 +2007,23 @@
   #warnFLAGS="${warnFLAGS} -Wmissing-declarations"
   #warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
 
+  # error-on-warning should not be active in (stable) release tarballs
+  if test -h ${srcdir}/Makefile.am
+  then 
+    tmp_srcdir=`readlink ${srcdir}/Makefile.am`
+    real_srcdir="${srcdir}/`dirname ${tmp_srcdir}`"
+  else
+    real_srcdir=${srcdir}
+  fi
+  if test -d ${real_srcdir}/.svn
+  then
+    # This code is from SVN, so enable error-on-warning
+    error_on_warning_as_default="yes"
+  else
+    # This is from a tarball, so disable error-on-warning
+    error_on_warning_as_default="no"
+  fi
 
-  ## Disable error-on-warning by default again because this seriously
-  ## breaks quite a number of configure tests (due to, like, 'warning:
-  ## unused variable some_variable') -- cstim, 02/02/2003
-  #
-  # Re-enabled and moved to later in the build process.  This should allow
-  # us to keep it turned on, but also not break configure proceses.
-  # -- warlord, 02/02/2003
-
-
   # Enable error-on-warning by default -- I'm tired of fixing other
   # people's missing #includes, etc.
   AC_ARG_ENABLE(error-on-warning,
@@ -2026,7 +2033,11 @@
        no)  gnc_error_on_warning=no ;;
        *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
      esac],
-       [  warnFLAGS="${warnFLAGS} -Werror"; gnc_error_on_warning=auto ])
+    [   if test "${error_on_warning_as_default}" = "yes"; then
+	  warnFLAGS="${warnFLAGS} -Werror"; 
+	fi
+	gnc_error_on_warning=auto
+    ])
 
   # For gcc >= 3.4.x, specifically enable the new warning switch
   # -Wdeclaration-after-statement in order to preserve source code



More information about the gnucash-changes mailing list