Executing code before AM_INIT_AUTOMAKE

Sébastien Hinderer <[email protected]> Tue, 6 May 2025 10:40:17 +0200
Newsgroups gmane.comp.sysutils.autoconf.general
Message-ID <aBnK8XtZKV0zVqC0@jnana>
Dear all,

If a  configure.ac file contains:

AM_INIT_AUTOMAKE([foreign])

It seems this gets executed very early in the generated configure
script.

For instance I tried to add the  following invocation

AC_MSG_NOTICE([Configuring mytool version AC_PACKAGE_VERSION])

_before_ the call to AM_INIT_AUTOMAKE, so the two following lines, in
this order:

AC_MSG_NOTICE([Configuring mytool version AC_PACKAGE_VERSION])
AM_INIT_AUTOMAKE([foreign])

I was expecting the message to be printed before the tests implied by
the call to AM_INIT_AUTOMAKE but htis is not what happened.

Is there a possibility to get anything done before AM_INIT_AUTOMAKE
takes place?

Thanks,

Seb.