Hi.
Reading the documentation of AC_LANG_PUSH and AC_LANG_POP one (e.g. me :-) might be lured to use them this way:
AC_DEFUN([CHECK1],
[
AC_LANG_PUSH(C)
...
AC_LANG_POP(C)
])AC_DEFUN([CHECK2],
[
find2()
{
...
CHECK1
...
AC_LINK_IFELSE(...)
...
} AC_LANG_PUSH(C++)
find2
AC_LANG_POP(C++)
])The AC_LINK_IFELSE expansion will be executed with the language set to C, because there is actually no stack during configure's execution. The workaround is simple - just move AC_LANG_PUSH(C++) at the very beginning of CHECK2.
So, I would suggest that the documentation makes it clear that the stack is not a runtime one. And maybe give the advice that AC_LANG_PUSH/POP are placed immediately at the top/bottom of the macro, thus surrounding shell functions (which make the execution non-linear).
Vlado
_______________________________________________ Autoconf mailing list [email protected] http://lists.gnu.org/mailman/listinfo/autoconf
