2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

configure: Add option --enable-Werror to add -Werror to CFLAGS.

-Werror is useful for development, but it screws up configure because it's
impossible to guess what new warnings compilers will add in the future.
This commit adds a new configure option to add CFLAGS after the configure
checks are done.

The use of AC_CONFIG_COMMANDS_PRE is based on Eric Blake's suggestion on
the autoconf mailing list: "AC_CONFIG_COMMANDS_PRE probably fits the bill
as the ideal macro to use for guaranteeing that you inject your shell code
at the last possible moment."

Requested-by: Andrew Evans <aevans@nicira.com>
This commit is contained in:
Ben Pfaff
2011-04-12 11:43:11 -07:00
parent 024405698d
commit a64e37a1d3
2 changed files with 12 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ OVS_ENABLE_OPTION([-Wmissing-field-initializers])
OVS_ENABLE_OPTION([-Wno-override-init])
OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
OVS_ENABLE_WERROR
AC_ARG_VAR(KARCH, [Kernel Architecture String])
AC_SUBST(KARCH)