Not a blocker for me, but a report ‘for the record’:

I include ac_config_headers([config.h]) in configure.ac
and use XT_USE_XT_PACKAGES (this requires XT_WITH_XTC_ARGS in autoxt.m4)
The resulting config.h.in contains:

/* Location of the XTC repository. */
#undef XTC_REPOSITORY()

After configuring, this produces a config.h with:

/* Location of the XTC repository. /
/
#undef XTC_REPOSITORY */()

This gives problems (in gcc 3.4.4-2):
../../config.h:59: error expected unqualified-id before ‘)’ token

It’s probably the ‘()’ chars in the name of this XTC_REPOSITORY() macro.

Submitted on 15 March 2006 at 16:45

On 15 March 2006 at 19:57 Jira commented:

STR-537, adam:
typo in filename


On 16 March 2006 at 12:38 Jira commented:

STR-537, adam:
More in-depth:
The autoconf (2.59) manual states in Sec.4.8.2 about on AC_DEFINEs that end up in a config.h: “An additional constraint is that the first argument of AC_DEFINE must be a literal.”. It’s even more strict: no ‘(’ ‘)’ chars are allowed in the name literal, or maybe they are, but processing fails.

In the generated configure file, there’s a section ‘# Transform confdefs.h into two sed scripts’
The confdef2sed.sed script reads the line
#define XTC_REPOSITORY() ATmakeString(“@REPOSITORY@”)

and picks out XTC_REPOSITORY as variable name (without ‘()’).
The scripts conftest.defines and conftest.undefs use this variable name, hence incorrectly transform the config.h.in into config.h with as result:
/* #undef XTC_REPOSITORY */()

I don’t know why the ‘()’ is used in the autoxt macro for XTC_REPOSITORY, but if possible, removing the () would fix this problem.


On 16 March 2006 at 17:38 Jira commented:

STR-537, martin:
I think the () was there to make it a function call, but I’m not sure. We’ll need to check that.


On 1 June 2006 at 22:49 Jira commented:

STR-537, martin:
Same problem is worked around in stratego-runtime library.


On 6 June 2006 at 23:54 Jira commented:

STR-537, martin:
Maybe this is solved by using AC_DEFINE_UNQUOTED. I’ll try that.

Log in to post comments