So strange even the GCC 6 documentation implies that -Wno-error=pedantic should cause -Werror=pedantic warnings to not be treated as errors.
"This switch takes a negative form, to be used to negate -Werror for specific warnings; for example -Wno-error=switch makes -Wswitch warnings not be errors, even when -Werror is in effect."
https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Warning-Options.html#Warning-Options
I would guess if you really want to install you could remove -Werror from AM_INIT_AUTOMAKE (or add -Wno-error=pedantic)
https://github.com/apache/incubator-guacamole-server/blob/master/configure.ac#L22