PKG_CHECK_MODULES macro fails in very annoying to debug ways.
Often, this will fail with:
syntax error near unexpected token `LIBNL3,'
` PKG_CHECK_MODULES(LIBNL3, libnl-genl-3.0 >= 3.1)'
and provide no indication that the real error is that
pkg-config is not installed. Adding an explicit check
for pkg-config will make the error more self-evident.
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Change-Id: Ic2ee8e4c3ec3fa2e03c5ece03e6a9ce335133578
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51716
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
AC_PATH_PROG(FLEX, flex)
AC_PATH_PROG(BISON, bison)
AC_PATH_PROG(RPMBUILD, rpmbuild)
+AC_PATH_PROG(PKGCONF, pkg-config)
LUSTRE_VERSION_CPP_MACROS
LB_CONFIGURE
)
# lnet/utils/lnetconfig/liblnetconfig_netlink.c
+AS_IF([test "x$PKGCONF" = "x"],
+ [AC_MSG_ERROR([pkg-config package is required to configure Lustre])])
+
AS_IF([test "x$enable_dist" = xno], [
PKG_CHECK_MODULES(LIBNL3, [libnl-genl-3.0 >= 3.1])
])