bug-autoconf
[Top][All Lists]
Advanced

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

autoconf 2.61: AC_DEFINE variable with parenthesis


From: Andrey Simonenko
Subject: autoconf 2.61: AC_DEFINE variable with parenthesis
Date: Thu, 14 Dec 2006 14:32:54 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Hello,

There is something different between 2.59 and 2.61 versions,
which does not allow to AC_DEFINE variable with parenthesis
in the same way as in 2.59.

Environment: FreeBSD, perl-5.8.8, m4-1.4.8, autoconf-2.61.

configure.ac:

AC_INIT([TEST], [1], [somebody])

AC_DEFINE([ABC], [something])
AC_DEFINE([DEF(x)], [somevalue])

AC_CONFIG_HEADERS([config.h])
AC_OUTPUT

config.h.in:

#ifndef lint
# undef ABC
# undef DEF
#else
# define ABC
# define DEF(x)
#endif /* !lint */

Now let's test this with autoconf-2.59:

/* config.h.  Generated by configure.  */
#ifndef lint
# define ABC something
# define DEF(x) somevalue
#else
# define ABC
# define DEF(x)
#endif /* !lint */

The same, but with autoconf-2.61:

/* config.h.  Generated from config.h.in by configure.  */
#ifndef lint
# define ABC something
# define DEF(x) somevalue
#else
# define ABC
# define DEF(x) somevalue
#endif /* !lint */

Now, if I change config.in.h:

#ifndef lint
# undef ABC
# undef DEF
#else
# define ABC
# define \
    DEF(x)
#endif /* !lint */

And test this with autoconf-2.61, then everything work as expected:

/* config.h.  Generated from config.h.in by configure.  */
#ifndef lint
# define ABC something
# define DEF(x) somevalue
#else
# define ABC
# define \
    DEF(x)
#endif /* !lint */

Why DEF is defined two times in config.h and why ABC is not defined
two times?  Why this did not happen with autoconf-2.59?  What is the
correct way to solve this problem?

Thanks.




reply via email to

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