Hello Ralf, > > Oops, that did not work. autoconf >= 2.60 supports multiline replacements > > in AC_SUBST, but 'automake' and 'make' don't. > > Well. There is no mapping that will automatically make multiline values > be correctly escaped for makefiles. Maybe it is time to publish > AM_SUBST_NOTMAKE which is like AC_SUBST
Of course! Currently, in projects which use automake, AC_SUBST with multiline values will only work if all lines except possibly the first one start with a '#'. Additionally, I wanted to use the value in a Makefile command. But this resulted in an error message from 'make', because the Makefile looked like this: stdlib.h: stdlib.in.h sed -e 's/@PRAGMA_SYSTEM_HEADER@/#if __GNUC__ >= 3 #pragma GCC system_header #endif/g' < stdlib.in.h > stdlib.h So, what would be useful here, is a way to escape AC_SUBST values so that newlines and '#' characters are hidden from 'make' when the macro is used in the command section of a 'make' rule. IMO, this belongs in automake because - AC_SUBST values are frequently used in Makefile commands, - It's not not trivial to do this escaping in a way that would preserve whitespace (or the lack of whitespace) at the end of the value, - It's out of scope for autoconf to care about special kinds of files, like Makefiles. Bruno