1202 |
# ------------------------- |
# ------------------------- |
1203 |
# The prologue for Autoconf macros. |
# The prologue for Autoconf macros. |
1204 |
m4_define([_m4_defun_pro], |
m4_define([_m4_defun_pro], |
1205 |
[ |
[m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl |
1206 |
|
m4_pushdef([_m4_expanding($1)])dnl |
1207 |
|
m4_ifdef([_m4_divert_dump], |
1208 |
|
[m4_divert_push(m4_defn([_m4_divert_diversion]))], |
1209 |
|
[m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl |
1210 |
|
m4_divert_push([GROW])])dnl |
1211 |
]) |
]) |
1212 |
|
|
1213 |
|
|
1216 |
# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing |
# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing |
1217 |
# the PRO/EPI pairs. |
# the PRO/EPI pairs. |
1218 |
m4_define([_m4_defun_epi], |
m4_define([_m4_defun_epi], |
1219 |
[m4_provide([$1])dnl |
[m4_divert_pop()dnl |
1220 |
|
m4_if(_m4_divert_dump, _m4_divert_diversion, |
1221 |
|
[m4_undivert([GROW])dnl |
1222 |
|
m4_undefine([_m4_divert_dump])])dnl |
1223 |
|
m4_expansion_stack_pop()dnl |
1224 |
|
m4_popdef([_m4_expanding($1)])dnl |
1225 |
|
m4_provide([$1])dnl |
1226 |
]) |
]) |
1227 |
|
|
1228 |
|
|
1313 |
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that |
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that |
1314 |
# it passes to `AC_LANG_COMPILER(C)'. |
# it passes to `AC_LANG_COMPILER(C)'. |
1315 |
m4_define([m4_require], |
m4_define([m4_require], |
1316 |
[m4_provide_if([$1], |
[m4_expansion_stack_push(m4_location[: $1 is required by...])dnl |
1317 |
|
m4_ifdef([_m4_expanding($1)], |
1318 |
|
[m4_fatal([$0: circular dependency of $1])])dnl |
1319 |
|
m4_ifndef([_m4_divert_dump], |
1320 |
|
[m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl |
1321 |
|
m4_provide_if([$1], |
1322 |
[], |
[], |
1323 |
[m4_default([$2], [$1])]) |
[m4_divert_push(m4_eval(m4_divnum - 1))dnl |
1324 |
|
m4_default([$2], [$1]) |
1325 |
|
m4_divert(m4_defn([_m4_divert_dump]))dnl |
1326 |
|
m4_undivert(m4_defn([_m4_divert_diversion]))dnl |
1327 |
|
m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl |
1328 |
|
m4_provide_if([$1], |
1329 |
|
[], |
1330 |
|
[m4_warn([syntax], |
1331 |
|
[$1 is m4_require'd but is not m4_defun'd])])dnl |
1332 |
|
m4_expansion_stack_pop()dnl |
1333 |
]) |
]) |
1334 |
|
|
1335 |
|
|