+# Set misc options
+
+# By default, do build with -Wall, unless the user asks not to
+[wall_CFLAGS=-Wall]
+AC_ARG_ENABLE(
+ [wall],
+ [AS_HELP_STRING(
+ [--disable-wall],
+ [build with -Wall (default=yes)])],
+ [AS_CASE(
+ ["$enableval"],
+ [yes], [wall_CFLAGS=-Wall],
+ [*], [wall_CFLAGS=""])])
+AC_SUBST([wall_CFLAGS],[${wall_CFLAGS}])
+
+# For releases, do not build with -Werror, unless the user explicitly
+# requests to build with -Werror.
+# For the devel tree, do build with -Werror by default, unless user
+# explicitly disables -Werror
+AS_IF(
+ [test "$(${srcdir}/scripts/version.sh --internal)" = "git"],
+ [werror_CFLAGS=-Werror])
+AC_ARG_ENABLE(
+ [werror],
+ [AS_HELP_STRING(
+ [--enable-werror],
+ [build with -Werror (default=no)])],
+ [AS_CASE(
+ ["$enableval"],
+ [yes], [werror_CFLAGS=-Werror],
+ [*], [werror_CFLAGS=""])])
+AC_SUBST([werror_CFLAGS],[${werror_CFLAGS}])
+
+# Although there is a default (="linux") in the code, we do provide
+# a default here, to get a consistent autostuff behavior
+AC_ARG_ENABLE(
+ [root-menu-prompt],
+ [AS_HELP_STRING(
+ [--enable-root-menu-prompt=PROMPT],
+ [set the root-menu prompt (default=Configuration)])],
+ [AS_CASE(
+ ["$enableval"],
+ [yes], [root_menu=Configuration],
+ [no], [root_menu=],
+ [# Escape the $ signs, otherwise they would get munged by make
+ root_menu="$( echo "$enableval" |sed -e 's/\$/\\$$/g;' )"])])
+AC_SUBST([root_menu], [${root_menu=Configuration}])
+
+AC_ARG_ENABLE(
+ [config-prefix],
+ [AS_HELP_STRING(
+ [--enable-config-prefix=PREFIX],
+ [the prefix to the config option (default=CONFIG_)])],
+ [AS_CASE(
+ ["$enableval"],
+ [*" "*],[AC_MSG_ERROR([config prefix can not contain spaces: '$enableval'])],
+ [yes], [config_prefix=CONFIG_],
+ [no], [config_prefix=],
+ [config_prefix=$enableval])])
+AC_SUBST([config_prefix], [${config_prefix-CONFIG_}])
+
+AC_ARG_ENABLE(
+ [utils],
+ [AS_HELP_STRING(
+ [--disable-utils],
+ [install utilities to manage .config files (default=yes)])])
+AC_SUBST([enable_utils], [${enable_utils:-yes}])
+
+AC_ARG_ENABLE(
+ [L10n],
+ [AS_HELP_STRING(
+ [--disable-L10n],
+ [enable localisation (L10n) (default=auto)])])
+AC_SUBST([enable_L10n], [${enable_L10n:-yes}])