-m4_define([AT_FULL_COMPILE],
-[m4_case(AT_LANG,
-[java],
- [AT_BISON_CHECK([-o $1.java $1.y])
- AT_LANG_COMPILE([$1],
- m4_join([ ],
- [$1.java],
- m4_ifval($2, [[$1-$2.java]]),
- m4_ifval($3, [[$1-$3.java]])))],
-[c++],
- [AT_BISON_CHECK([-o $1.cc $1.y])
- AT_LANG_COMPILE([$1],
- m4_join([ ],
- [$1.cc],
- m4_ifval($2, [[$1-$2.cc]]),
- m4_ifval($3, [[$1-$3.cc]])))],
-[c],
- [AT_BISON_CHECK([-o $1.c $1.y])
- AT_LANG_COMPILE([$1],
- m4_join([ ],
- [$1.c],
- m4_ifval($2, [[$1-$2.c]]),
- m4_ifval($3, [[$1-$3.c]])))])
-])
+m4_define([AT_FULL_COMPILE], [AT_LANG_DISPATCH([$0], $@)])
+m4_define([AT_FULL_COMPILE(c)],
+[AT_BISON_CHECK([-o $1.c $1.y])
+ AT_LANG_COMPILE([$1],
+ m4_join([ ],
+ [$1.c],
+ m4_ifval($2, [[$1-$2.c]]),
+ m4_ifval($3, [[$1-$3.c]])))])
+
+m4_define([AT_FULL_COMPILE(c++)],
+[AT_BISON_CHECK([-o $1.cc $1.y])
+ AT_LANG_COMPILE([$1],
+ m4_join([ ],
+ [$1.cc],
+ m4_ifval($2, [[$1-$2.cc]]),
+ m4_ifval($3, [[$1-$3.cc]])))])
+
+m4_define([AT_FULL_COMPILE(java)],
+[AT_BISON_CHECK([-o $1.java $1.y])
+ AT_LANG_COMPILE([$1],
+ m4_join([ ],
+ [$1.java],
+ m4_ifval($2, [[$1-$2.java]]),
+ m4_ifval($3, [[$1-$3.java]])))])
+