Dear Nick, Yes, your email was definitely helpful and clear! Many thanks for that! Now the macro works like a charm. The only thing that remains osbcure to me is what would be the best way to generate our "VERSION" file, the one I am trying to replace. ONe simple way would be to have a VERSION.in and let configure generate VERSION from there. My preference would be to have VERSION generated at the same time than the configure script, i.e. during the autoconf invocation. Is that possible? I started to investigate diversions, but it felt like this kkind of thing is not their real purpose. Is there another way? Perhaps macros are available that let one write some content to a file directly from aclocal.m4? Many thanks, Sébastien.