That’s m4, not C (the .in in the file tells you that).
It’s not clear to me exactly what you’re trying to do here, but I don’t think that treating m4 macro calls as C variables will accomplish it. Those get replaced with “something else”, you most likely want to be working with the output of that process, not its input.
I’m not the best person to answer these questions, all I can contribute is: the file you link to is a .h, not a .h.in, and autoconf will run m4 on those, supplemented with whatever-it-needs.
My guess(!) is that the @define:thing@ output vars get transformed into something without a : in it, in that process. That’s without having spent any time in the guts of autoconf, but having written more m4 than none at all. May that amount never increase!
I don’t think this is about name strictness. I’m assuming @define: and @include: are keywords, and from the code that you linked, it seems like zig did not implement them. I’m not familiar with autoconf, are these standard keywords? If so, maybe you could implement the code for them, as the code looks rather simple.
Thanks everyone. I figured out how to do that. Why do C people like code generation so much… It seems libgpg-error uses custom tool to replace @define:.. with some strings. I decided to link to system’s libgpg-error instead.