Default to --enable-error-on-warning only in svn based source

trees. Fixes #330687.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13873 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-04-29 02:04:57 +00:00
parent 4a5f6e30ca
commit 17241af786
2 changed files with 24 additions and 10 deletions

View File

@ -1,5 +1,8 @@
2006-04-28 David Hampton <hampton@employees.org> 2006-04-28 David Hampton <hampton@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/window-reconcile.c:
* src/gnome/gnc-plugin-page-account-tree.c: * src/gnome/gnc-plugin-page-account-tree.c:
* src/engine/gnc-lot.[ch]: * src/engine/gnc-lot.[ch]:

View File

@ -2007,15 +2007,22 @@ then
#warnFLAGS="${warnFLAGS} -Wmissing-declarations" #warnFLAGS="${warnFLAGS} -Wmissing-declarations"
#warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall #warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
# error-on-warning should not be active in (stable) release tarballs
## Disable error-on-warning by default again because this seriously if test -h ${srcdir}/Makefile.am
## breaks quite a number of configure tests (due to, like, 'warning: then
## unused variable some_variable') -- cstim, 02/02/2003 tmp_srcdir=`readlink ${srcdir}/Makefile.am`
# real_srcdir="${srcdir}/`dirname ${tmp_srcdir}`"
# Re-enabled and moved to later in the build process. This should allow else
# us to keep it turned on, but also not break configure proceses. real_srcdir=${srcdir}
# -- warlord, 02/02/2003 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
# Enable error-on-warning by default -- I'm tired of fixing other # Enable error-on-warning by default -- I'm tired of fixing other
# people's missing #includes, etc. # people's missing #includes, etc.
@ -2026,7 +2033,11 @@ then
no) gnc_error_on_warning=no ;; no) gnc_error_on_warning=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-error-on-warning) ;;
esac], 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 # For gcc >= 3.4.x, specifically enable the new warning switch
# -Wdeclaration-after-statement in order to preserve source code # -Wdeclaration-after-statement in order to preserve source code