build: Disable default -Werror if source is a git repository

By default configure script detected if source directory is a
git repository and by default enable -Werror option.
This normally detects that you are developing but some build
packagers (like rpm spec with git_am option) uses git to manage
additional patches on top of source making the detection fail
and causing the build to fail.
Build packagers should not use -Werror.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
This commit is contained in:
Frediano Ziglio 2021-04-20 18:19:44 +01:00 committed by Victor Toso
parent ed25d920ea
commit b24da37074

View File

@ -10,12 +10,7 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [Use -Werror (if supported)]),
[set_werror="$enableval"],
[if test -d $srcdir/.git; then
is_git_version=true
set_werror=yes
else
set_werror=no
fi])
[set_werror=no])
# List of warnings that are not relevant / wanted