1 dnl ----------------------------------------------------------------------
2 dnl This whole bit snagged from libstdc++-v3.
6 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
7 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
8 dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
10 dnl See docs/html/17_intro/configury.html#enable for documentation.
12 AC_DEFUN([GCC_ENABLE],[dnl
13 m4_define([_g_switch],[--enable-$1])dnl
14 m4_define([_g_help],[AS_HELP_STRING([_g_switch$3],[$4 @<:@default=$2@:>@])])dnl
15 AC_ARG_ENABLE($1,_g_help,
20 m4_bpatsubst([$5],[permit ])) ;;
21 *) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
22 dnl Idea for future: generate a URL pointing to
23 dnl "onlinedocs/configopts.html#whatever"
30 *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
34 [enable_]m4_bpatsubst([$1],-,_)[=][$2])
35 m4_undefine([_g_switch])dnl
36 m4_undefine([_g_help])dnl