OK, I noticed, that my previous question was not the right one. I now rewrote acinclude.m4, which is included if you call aclocal; autoconf in all the directectories where configure will be called.