~alpine/devel

Introducing autoconf-policy

Details
Message ID
<7966744.GHKkF7OKMO@localhost>
DKIM signature
missing
Download raw message
Hello,

I have been working on a helper package[1] based on autoconf's config.site[2] 
functionality.  This package can be used to do a few things that are useful to 
the Alpine ecosystem:

* Enforcing a specific layout (e.g. FHS) in a centralized place.

Much as like how we now have abuild-meson, it is possible for us to use 
autoconf-policy to enforce a specific layout, using the CONFIG_SITE 
environmental variable.  This particular functionality is not yet enabled, as 
we need to make some changes to how builders are configured before it will work 
(declaring the CONFIG_SITE env variable, since the default CONFIG_SITE is 
$prefix/share/config.site), but once we decide to proceed it can be trivially 
implemented.  This will allow for ./configure in abuild environment to pick up 
the site configuration, and accordingly, the desired layout for packaging, 
without having to specify --prefix and so on.

* Bypassing broken tests.

Right now, we are using GNU libiconv and GNU libintl primarily because 
autoconf's tests look for internal symbols in both to see if the libiconv and 
libintl implementations are "good enough."  By implementing autoconf-policy, 
we have the capability of skipping these broken tests.

* Improving configure script runtimes.

Most autoconf scripts do the same basic checks.  By supplying the appropriate 
answers for each architecture, we can reduce the number of checks that the 
script does.  This improves configure script runtime by an order of magnitude 
already[3] and also improves cross-compilation.

My plan is to implement the layout stuff in autoconf-policy 0.2 and promote it 
to main, adding it as a dependency of alpine-sdk.  Why not build-base?  The 
build-base package is for the toolchain itself, this is an alpine thing.

The autoconf-policy package is likely useful to other apk-based distributions, 
contributions and usage are welcome there, feel free to contribute!  Also, 
thanks to the Sabotage and Void distributions for doing a lot of the work on 
finding the right autoconf variables to override.

Ariadne

[1]: https://gitlab.alpinelinux.org/kaniini/autoconf-policy
[2]: https://www.gnu.org/software/automake/manual/html_node/
config_002esite.html
[3]: binutils configure phase runtime on dabuild+qemu setup is cut by ~40%.
Reply to thread Export thread (mbox)