autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: possibly undefined macro: dnl (Was: Autoconf 2.50 is released)


From: Akim Demaille
Subject: Re: possibly undefined macro: dnl (Was: Autoconf 2.50 is released)
Date: 22 May 2001 11:43:27 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

| In my configure.in file, I was doing:
| 
|         dnl Check for ANSI C exit success/failure values.
|         AC_EGREP_CPP(yes, [dnl
|             #include <stdlib.h>
|             #ifdef EXIT_SUCCESS
|             yes
|             #endif], AC_DEFINE(HAVE_EXIT_SUCCESS))
| 
| and the resulting output in 2.13 was:
| 
|         cat > conftest.$ac_ext <<EOF
|         #line 5424 "configure"
|         #include "confdefs.h"
|         dnl
|             #include <stdlib.h>
|             #ifdef EXIT_SUCCESS
|             yes
|             #endif
|         EOF
|         if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|           egrep "yes" >/dev/null 2>&1; then
|           rm -rf conftest*
|           cat >> confdefs.h <<\EOF
|         #define HAVE_EXIT_SUCCESS 1
|         EOF
| 
| the output is different, but still contains a dnl, in 2.50:
| 
|         # Check for ANSI C exit success/failure values.
|         cat >conftest.$ac_ext <<_ACEOF
|         #line 7556 "configure"
|         #include "confdefs.h"
|         dnl
|             #include <stdlib.h>
|             #ifdef EXIT_SUCCESS
|             yes
|             #endif
|         _ACEOF
|         if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|           egrep "yes" >/dev/null 2>&1; then
| 
|             cat >>confdefs.h <<\EOF
|         #define HAVE_EXIT_SUCCESS 1
|         EOF

So I'm very happy I added that test for `dnl' :)  2.50 just
denunciated a bug (in your input), which 2.13 kept hidden.

Wazaaaaaaaaaaa!

I should emphasize that this is a *bad* behavior of this macro, what
you wrote should give what you expect (well, not exactly because of
the closing quote masked by the hash): it corresponds to the `single
evaluation' rule.  Here, as you can see, it's a zero evaluation, since
`dnl' is not expanded.  In other words, this macro is double-quoting.

But we had to keep this for bugward compatibility :(



reply via email to

[Prev in Thread] Current Thread [Next in Thread]