[PATCH] Find pkg-config on cross compilation

26 views
Skip to first unread message

Bastian Germann

unread,
Dec 6, 2021, 9:54:34 PM12/6/21
to efibootg...@googlegroups.com, Bastian Germann
PKG_PROG_PKG_CONFIG sets $PKG_CONFIG to a pkg-config executable.
Setting it manually via AC_PATH_PROG is superfluous and problematic
with executable name prefixes. Get rid of the AC_PATH_PROG call.

Signed-off-by: Bastian Germann <ba...@debian.org>
---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6dcd386..01a4fdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,11 +174,10 @@ AC_ARG_WITH([mem-uservars],
AC_DEFINE_UNQUOTED([ENV_MEM_USERVARS], [${ENV_MEM_USERVARS}], [Reserved memory for user variables])

dnl pkg-config
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+PKG_PROG_PKG_CONFIG()
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
-PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(LIBCHECK, check)
PKG_CHECK_MODULES(LIBPCI, libpci)
# ------------------------------------------------------------------------------
--
2.34.1


Jan Kiszka

unread,
Dec 7, 2021, 3:48:26 AM12/7/21
to Bastian Germann, efibootg...@googlegroups.com
On 07.12.21 03:54, Bastian Germann wrote:
> PKG_PROG_PKG_CONFIG sets $PKG_CONFIG to a pkg-config executable.
> Setting it manually via AC_PATH_PROG is superfluous and problematic
> with executable name prefixes. Get rid of the AC_PATH_PROG call.
>
> Signed-off-by: Bastian Germann <ba...@debian.org>
> ---
> configure.ac | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 6dcd386..01a4fdb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -174,11 +174,10 @@ AC_ARG_WITH([mem-uservars],
> AC_DEFINE_UNQUOTED([ENV_MEM_USERVARS], [${ENV_MEM_USERVARS}], [Reserved memory for user variables])
>
> dnl pkg-config
> -AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
> +PKG_PROG_PKG_CONFIG()
> if test "x$PKG_CONFIG" = "xno"; then
> AC_MSG_ERROR([You need to install pkg-config])
> fi

But this test for PKG_CONFIG remains useful then? I'm no guru on this,
just trying to understand what [1] wanted to achieve and why.

> -PKG_PROG_PKG_CONFIG()
> PKG_CHECK_MODULES(LIBCHECK, check)
> PKG_CHECK_MODULES(LIBPCI, libpci)
> # ------------------------------------------------------------------------------
>

Thanks,
Jan

[1]
https://github.com/siemens/efibootguard/commit/96339333526ac405b1d1a597dee98e05361c71a7

--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Bastian Germann

unread,
Dec 7, 2021, 4:14:13 AM12/7/21
to Jan Kiszka, efibootg...@googlegroups.com
Am 07.12.21 um 09:48 schrieb Jan Kiszka:
> But this test for PKG_CONFIG remains useful then? I'm no guru on this,
> just trying to understand what [1] wanted to achieve and why.

Yes, the test is still useful.

Jan Kiszka

unread,
Dec 8, 2021, 1:00:47 AM12/8/21
to Bastian Germann, efibootg...@googlegroups.com
On 07.12.21 03:54, Bastian Germann wrote:
Thanks, merged.

Jan
Reply all
Reply to author
Forward
0 new messages