SYSROOT vs --with-xxx-prefix

Alon Bar-Lev alon.barlev at
Tue Oct 9 22:53:33 CEST 2018

On Mon, Oct 8, 2018 at 4:59 PM Werner Koch <wk at> wrote:
> On Sat,  6 Oct 2018 11:07, alon.barlev at said:
> > 3. Specify SYSROOT as global --with-xxx-prefix.
> I actually liked that and iirc implemented it for one or two packages.
> > 1. Farfetched... can we support pkg-config? I can help to support this
> > in parallel to the existing mechanism.
> Gniibe alreadt started with this but pkg-config will only be the second
> choice.
> > 2. Can you please add SYSROOT support for all dependencies? (npth, ksba, assuan)
> Yes.  Makes a lot of sense and avoid surprises.
> > 3. Can you please search in both SYSROOT/bin and SYSROOT/usr/bin for
> > config script?
> Yes.
> Would you be so kind and open a feature request?


I was about to do that, but first checked out the master of
libgpg-error and found out that you already support pkg-config and
converted the config script to delegate calls to the pkg-config. There
are some gaps that can be solved. Then the same can be replicated to
all other projects.

I created a patch[1] with the required fixes, can you please review? I
added some comments to describe reasoning. Most of the changes in the
gpg-error.m4 are indent changes, please ignore them.

The logic is simple, if a prefix was not provided explicitly and the
config script was not provided explicitly, try autodetection using
pkg-config before fallback of config script detection.

I checked this briefly and it works for native, multilib and cross compile.



More information about the Gnupg-devel mailing list