apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Bowsher" <m...@ukf.net>
Subject [PATCH] Stop installing apr-config, and give clients an APR_FIND_APR that works with apr-1-config.
Date Thu, 15 Jul 2004 23:37:08 GMT
Log message:
Make the config script be named apr-MAJOR-config, even in the build

* .cvsignore: Add apr-*-config.

* Makefile.in: Throughout, change apr-config to $(APR_CONFIG).
    Do not install the config script as apr-config as well as $(APR_CONFIG).

* apr-config.in: Add @APR_MAJOR_VERSION@ where appropriate so the help
    reflects reality.

* configure.in: Generate apr-MAJOR-config from apr-config.in .

Enhance the APR_FIND_APR macro, to correctly handle multiple major API

* build/find_apr.m4 (APR_FIND_APR): Introduce an additional argument
    desired major versions. Correct text not accounting for the full range
    possible types of arguments to --with-apr.

I see from the mail on the dev list that I need to explain my rationale for
some of what I've done above.

Summary aim: Allow apr-0 and apr-1 to be installed and used side-by-side in
the same prefix.

Stopping installing apr-config alongside apr-1-config permits side-by-side

The APR_FIND_APR macro is updated to take a new mandatory argument listing
acceptable apr major versions.

Any library which uses apr and exposes apr types in it's own ABI *must*
limit itself to one major version of apr, if it is to maintain any ABI
guarantees itself. Therefore, the ability to require just 1 version of apr
is required.

Any app coded to the intersection of the apr-0 and apr-1 APIs may be able to
work with either, so the macro allows for multiple apr versions to be deemed

Note: I also make the apr-config be named apr-MAJOR-config in the *build*
directory, as well as in the install. This means that when a bundled apr is
used, the patch uses sed to probe the major, so it knows the name of the
apr-MAJOR-config that will be created.

This change is important! Apr currently
supports --with-apr=path/to/built/but/not/installed/apr. We cannot continue
to do this without the above change, as we must *not* accept a bare
apr-config file as valid unless apr-0 is deemed acceptable by the macro
invoker. Therefore the apr-config in a build directory must include the
major version, so that APR_FIND_APR can know it is acceptable to use.

OK, so here it is, the patch, complete AFAIK.

Comments welcomed.

As soon as this is approved, I will produce the equivalent patch for

Regarding httpd-HEAD: the only change they need to make is to call
APR_FIND_APR with a new 4th argument of "1".

Regarding httpd-2.0.x: will remain using apr-0.9.x, will never see any of
these changes.

Regarding subversion: will probably want to absorb the new find_apr.m4, in
order to permit experimental building against apr-1.0.0, but are locked into
apr-0 for the 1.x release cycle officially by ABI guarantees, AFAIK.
Subversion can absorb the new find_apr.m4, and just needs to add a 4th
argument of "0" to the APR_FIND_APR invocation. Apr-1 builds can be forced
despite this with --with-apr=/path/to/apr-1-config when desired.


View raw message