-./configure @ac_configure_args@ %{?configure_flags:configure_flags} \
- --sysconfdir=%{_sysconfdir} \
- --mandir=%{_mandir} \
- --libdir=%{_libdir}
+# override %optflags so that the vendor's overzealous flags don't create
+# build failures
+%define optflags -g -O2 -Werror
+%configure @ac_configure_args@ %{?configure_flags:configure_flags}