Skip to contentSkip to conversation

configure: Improve error message on missing pkg-config

PATCH New Petr Vorel 2 participants 5 messages Feb 15, 2021 – Feb 18, 2021

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 configure: Improve error message on missing pkg-config

make autotools
configure:7350: error: possibly undefined macro: AC_DEFINE

Fixes #787
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)
configure.ac +3 -0
index d4bef5e45..c1f24891d 100644
@@ -30,6 +30,9 @@ AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
 AC_PROG_STRIP
 AC_PROG_YACC
 
+m4_ifndef([PKG_PREREQ],
+	[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency)])])
+
 AC_PREFIX_DEFAULT(/opt/ltp)
 
 AC_CHECK_DECLS([IFLA_NET_NS_PID],,,[#include <linux/if_link.h>])
Signature · 1 line
2.30.0
author
#1 lore raw

PATCH 1/1 configure: Improve error message on missing pkg-config

Hi,

configure.ac AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) · line 34

Quoted 7 lines

+++ b/configure.ac

configure.ac +2 -0
@@ -30,6 +30,9 @@ AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)])
 AC_PROG_STRIP
 AC_PROG_YACC
 
+m4_ifndef([PKG_PREREQ],
+	[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency)])])

Maybe mention also INSTALL file (feedback from
https://github.com/linux-test-project/ltp/issues/787):

[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency), see INSTALL for all dependencies])])

Kind regards,
Petr

#2 lore raw

PATCH 1/1 configure: Improve error message on missing pkg-config

Hi!

Quoted 6 lines

configure.ac AC_DEFUN([AC_PROG_STRIP], [AC_CHECK_TOOL(STRIP, strip, :)]) · line 34

Quoted 2 lines
configure.ac +2 -0
+m4_ifndef([PKG_PREREQ],
+	[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency)])])

Maybe mention also INSTALL file (feedback from
https://github.com/linux-test-project/ltp/issues/787):

[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency), see INSTALL for all dependencies])])

Maybe just shorten it to "..., see INSTALL"

Other than that no complaints, anything that prints reasonable message is much better than the cryptic error we produce without this patch.

So Acked-by: Cyril Hrubis <[email protected]>

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#3 lore raw

PATCH 1/1 configure: Improve error message on missing pkg-config

Hi Cyril,

Quoted 3 lines
Quoted 1 line

[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency), see INSTALL for all dependencies])])

Maybe just shorten it to "..., see INSTALL"

Good point, merged with this change.
Thanks for your review!

Petr

Quoted 4 lines

Other than that no complaints, anything that prints reasonable message is much better than the cryptic error we produce without this patch.

So Acked-by: Cyril Hrubis <[email protected]>

author
#4 lore raw

PATCH 1/1 configure: Improve error message on missing pkg-config

Hi Cyril,

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

[m4_fatal([must install pkg-config or pkgconfig and pkg.m4 macro (usual dependency), see INSTALL for all dependencies])])

Maybe just shorten it to "..., see INSTALL"

Good point, merged with this change.
Thanks for your review!

It looks it broke Centos 7, looking into it.

Kind regards,
Petr