source: trunk/libs/newlib/src/config/enable.m4 @ 529

Last change on this file since 529 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.1 KB
Line 
1dnl ----------------------------------------------------------------------
2dnl This whole bit snagged from libstdc++-v3.
3
4dnl
5dnl GCC_ENABLE
6dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
7dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
8dnl    (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
9dnl
10dnl See docs/html/17_intro/configury.html#enable for documentation.
11dnl
12AC_DEFUN([GCC_ENABLE],[dnl
13m4_define([_g_switch],[--enable-$1])dnl
14m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
15 AC_ARG_ENABLE($1,_g_help,
16  m4_bmatch([$5],
17   [^permit ],
18     [[
19      case "$enableval" in
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"
24      esac
25     ]],
26   [^$],
27     [[
28      case "$enableval" in
29       yes|no) ;;
30       *) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
31      esac
32     ]],
33   [[$5]]),
34  [enable_]m4_bpatsubst([$1],-,_)[=][$2])
35m4_undefine([_g_switch])dnl
36m4_undefine([_g_help])dnl
37])
38
Note: See TracBrowser for help on using the repository browser.