diff mbox series

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

Message ID 20210215110419.2964-1-pvorel@suse.cz
State Accepted
Headers show
Series [1/1] configure: Improve error message on missing pkg-config | expand

Commit Message

Petr Vorel Feb. 15, 2021, 11:04 a.m. UTC
make autotools
configure:7350: error: possibly undefined macro: AC_DEFINE

Fixes: #787

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

Comments

Petr Vorel Feb. 16, 2021, 10:36 a.m. UTC | #1
Hi,

> +++ b/configure.ac
> @@ -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
Cyril Hrubis Feb. 18, 2021, 10:16 a.m. UTC | #2
Hi!
> > +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 <chrubis@suse.cz>
Petr Vorel Feb. 18, 2021, 1:55 p.m. UTC | #3
Hi Cyril,

> > 	[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

> 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 <chrubis@suse.cz>
Petr Vorel Feb. 18, 2021, 2:36 p.m. UTC | #4
Hi Cyril,

> > > 	[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
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index d4bef5e45..c1f24891d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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>])