autoconf: modernize and modularize
[tftp-hpa.git] / autoconf / m4 / pa_lang_foreach.m4
blob650913d85c520fbe2aad0dc86788ce330703b675
1 dnl --------------------------------------------------------------------------
2 dnl PA_LANG_FOREACH(subset, body)
3 dnl
4 dnl  Expand [body] for each language encountered in the configure script also
5 dnl  present in [subset], or all if [subset] is empty
6 dnl --------------------------------------------------------------------------
7 AC_DEFUN([_PA_LANG_DO],dnl
8 [AC_LANG([$2])dnl
9 $1])
11 AC_DEFUN([PA_LANG_FOREACH],dnl
12 [m4_pushdef([_pa_lang_foreach_current],[_AC_LANG])dnl
13 m4_map_args([m4_curry([_PA_LANG_DO],[$2])],m4_unquote(PA_LANG_SEEN_LIST($1)))dnl
14 AC_LANG(_pa_lang_foreach_current)dnl
15 m4_popdef([_pa_lang_foreach_current])])