# [PATCH] gnome-keyring: Don't hard-code pkg-config executable

3 messages from 2016-06-16 to 2016-06-16. Participants: Heiko Becker, Jeff King, Brandon Casey.
Thread: https://gitlist.dev/t/42604

## Heiko Becker, 2016-06-14 11:27

Subject: [PATCH] gnome-keyring: Don't hard-code pkg-config executable
Message-ID: <20160614112705.7162-1-heirecka@exherbo.org>
URL: https://gitlist.dev/e/20160614112705.7162-1-heirecka%40exherbo.org

```
Helpful if your pkg-config executable has a prefix based on the
architecture, for example.

Signed-off-by: Heiko Becker <heirecka@exherbo.org>
---
 contrib/credential/gnome-keyring/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/credential/gnome-keyring/Makefile b/contrib/credential/gnome-keyring/Makefile
index c3c7c98..22c19df 100644
--- a/contrib/credential/gnome-keyring/Makefile
+++ b/contrib/credential/gnome-keyring/Makefile
@@ -4,12 +4,13 @@ all:: $(MAIN)
 CC = gcc
 RM = rm -f
 CFLAGS = -g -O2 -Wall
+PKG_CONFIG = pkg-config
 
 -include ../../../config.mak.autogen
 -include ../../../config.mak
 
-INCS:=$(shell pkg-config --cflags gnome-keyring-1 glib-2.0)
-LIBS:=$(shell pkg-config --libs gnome-keyring-1 glib-2.0)
+INCS:=$(shell $(PKG_CONFIG) --cflags gnome-keyring-1 glib-2.0)
+LIBS:=$(shell $(PKG_CONFIG) --libs gnome-keyring-1 glib-2.0)
 
 SRCS:=$(MAIN).c
 OBJS:=$(SRCS:.c=.o)
-- 
2.9.0

```

## Jeff King, 2016-06-16 09:50

Subject: Re: [PATCH] gnome-keyring: Don't hard-code pkg-config executable
Message-ID: <20160616095001.GI15851@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160616095001.GI15851%40sigill.intra.peff.net
In-Reply-To: <20160614112705.7162-1-heirecka@exherbo.org>

```
On Tue, Jun 14, 2016 at 01:27:05PM +0200, Heiko Becker wrote:

> Helpful if your pkg-config executable has a prefix based on the
> architecture, for example.
> 
> Signed-off-by: Heiko Becker <heirecka@exherbo.org>

Sounds like a reasonable thing to want to do...

> diff --git a/contrib/credential/gnome-keyring/Makefile b/contrib/credential/gnome-keyring/Makefile
> index c3c7c98..22c19df 100644
> --- a/contrib/credential/gnome-keyring/Makefile
> +++ b/contrib/credential/gnome-keyring/Makefile
> @@ -4,12 +4,13 @@ all:: $(MAIN)
>  CC = gcc
>  RM = rm -f
>  CFLAGS = -g -O2 -Wall
> +PKG_CONFIG = pkg-config
>  
>  -include ../../../config.mak.autogen
>  -include ../../../config.mak
>  
> -INCS:=$(shell pkg-config --cflags gnome-keyring-1 glib-2.0)
> -LIBS:=$(shell pkg-config --libs gnome-keyring-1 glib-2.0)
> +INCS:=$(shell $(PKG_CONFIG) --cflags gnome-keyring-1 glib-2.0)
> +LIBS:=$(shell $(PKG_CONFIG) --libs gnome-keyring-1 glib-2.0)

...and the implementation looks obviously correct.

Thanks.

-Peff

```

## Brandon Casey, 2016-06-16 18:56

Subject: Re: [PATCH] gnome-keyring: Don't hard-code pkg-config executable
Message-ID: <CA+sFfMf_NQSqrz0FRPyTcD7zgfe7VbeHUoFccVCJzW3Bon3j5g@mail.gmail.com>
URL: https://gitlist.dev/e/CA%2BsFfMf_NQSqrz0FRPyTcD7zgfe7VbeHUoFccVCJzW3Bon3j5g%40mail.gmail.com
In-Reply-To: <20160616095001.GI15851@sigill.intra.peff.net>

```
On Thu, Jun 16, 2016 at 2:50 AM, Jeff King <peff@peff.net> wrote:
> On Tue, Jun 14, 2016 at 01:27:05PM +0200, Heiko Becker wrote:
>
>> Helpful if your pkg-config executable has a prefix based on the
>> architecture, for example.
>>
>> Signed-off-by: Heiko Becker <heirecka@exherbo.org>
>
> Sounds like a reasonable thing to want to do...

ditto.

> ...and the implementation looks obviously correct.

ditto.

> Thanks.

ditto.

See I'm still alive, really!

-Brandon

```
