[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The documentation of AC_LANG_PUSH/POP is not clear enough
From: |
Vladimir Panov |
Subject: |
The documentation of AC_LANG_PUSH/POP is not clear enough |
Date: |
Sun, 06 Mar 2005 03:20:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- The documentation of AC_LANG_PUSH/POP is not clear enough,
Vladimir Panov <=