mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
385576a748
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@29024 a95241bf-73f2-0310-859d-f6bbb57e9c96
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
dnl ----------------------------------------------------------------------
|
|
dnl This whole bit snagged from libstdc++-v3.
|
|
|
|
dnl
|
|
dnl GCC_ENABLE
|
|
dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING)
|
|
dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, permit a|b|c)
|
|
dnl (FEATURE, DEFAULT, HELP-ARG, HELP-STRING, SHELL-CODE-HANDLER)
|
|
dnl
|
|
dnl See docs/html/17_intro/configury.html#enable for documentation.
|
|
dnl
|
|
AC_DEFUN([GCC_ENABLE],[dnl
|
|
m4_define([_g_switch],[--enable-$1])dnl
|
|
m4_define([_g_help],[AC_HELP_STRING(_g_switch$3,[$4 @<:@default=$2@:>@])])dnl
|
|
AC_ARG_ENABLE($1,_g_help,
|
|
m4_bmatch([$5],
|
|
[^permit ],
|
|
[[
|
|
case "$enableval" in
|
|
m4_bpatsubst([$5],[permit ])) ;;
|
|
*) AC_MSG_ERROR(Unknown argument to enable/disable $1) ;;
|
|
dnl Idea for future: generate a URL pointing to
|
|
dnl "onlinedocs/configopts.html#whatever"
|
|
esac
|
|
]],
|
|
[^$],
|
|
[[
|
|
case "$enableval" in
|
|
yes|no) ;;
|
|
*) AC_MSG_ERROR(Argument to enable/disable $1 must be yes or no) ;;
|
|
esac
|
|
]],
|
|
[[$5]]),
|
|
[enable_]m4_bpatsubst([$1],-,_)[=][$2])
|
|
m4_undefine([_g_switch])dnl
|
|
m4_undefine([_g_help])dnl
|
|
])
|
|
|