@@ -81,6 +81,7 @@ m4_include([../m4/header.m4])
AX_XEN_EXPAND_CONFIG()
# Enable/disable options
+AX_ARG_DEFAULT_ENABLE([werror], [Build tools without -Werror])
AX_ARG_DEFAULT_DISABLE([rpath], [Build tools with -Wl,-rpath,LIBDIR])
AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
@@ -133,6 +133,10 @@ endif
CFLAGS_libxenlight += $(CFLAGS_libxenctrl)
+ifeq ($(CONFIG_WERROR),y)
+CFLAGS += -Werror
+endif
+
ifeq ($(debug),y)
# Use -Og if available, -O0 otherwise
dbg_opt_level := $(call cc-option,$(CC),-Og,-O0)
@@ -1,5 +1,6 @@
-include $(XEN_ROOT)/config/Paths.mk
+CONFIG_WERROR := @werror@
CONFIG_RUMP := @CONFIG_RUMP@
ifeq ($(CONFIG_RUMP),y)
XEN_OS := NetBSDRump
@@ -716,6 +716,7 @@ ocamltools
monitors
githttp
rpath
+werror
DEBUG_DIR
XEN_DUMP_DIR
XEN_PAGING_DIR
@@ -805,6 +806,7 @@ with_xen_scriptdir
with_xen_dumpdir
with_rundir
with_debugdir
+enable_werror
enable_rpath
enable_githttp
enable_monitors
@@ -1490,6 +1492,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-largefile omit support for large files
+ --disable-werror Build tools without -Werror (default is ENABLED)
--enable-rpath Build tools with -Wl,-rpath,LIBDIR (default is
DISABLED)
--enable-githttp Download GIT repositories via HTTP (default is
@@ -4111,6 +4114,29 @@ DEBUG_DIR=$debugdir_path
# Enable/disable options
+# Check whether --enable-werror was given.
+if test "${enable_werror+set}" = set; then :
+ enableval=$enable_werror;
+fi
+
+
+if test "x$enable_werror" = "xno"; then :
+
+ ax_cv_werror="n"
+
+elif test "x$enable_werror" = "xyes"; then :
+
+ ax_cv_werror="y"
+
+elif test -z $ax_cv_werror; then :
+
+ ax_cv_werror="y"
+
+fi
+werror=$ax_cv_werror
+
+
+
# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then :
enableval=$enable_rpath;