Fail configure if pkg-config isn't found
Trying to run configure without pkg-config installed produces a
cryptic error due to the PKG_CHECK_MODULES macro not being available.
Add a check for pkg-config and fail with a clearer error message if it
isn't installed.
Fixes: AXIS2C-1638
diff --git a/axiom/configure.ac b/axiom/configure.ac
index a952199..8ffa13c 100644
--- a/axiom/configure.ac
+++ b/axiom/configure.ac
@@ -66,6 +66,8 @@
CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration "
fi
+AC_PATH_TOOL(PKGCONFIG, pkg-config)
+
AC_MSG_CHECKING(whether to set -Werror)
AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build],
[ case "${enableval}" in
diff --git a/configure.ac b/configure.ac
index 057c57e..0557d76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,8 @@
dnl AC_FUNC_REALLOC
#AC_CHECK_FUNCS([memmove])
+AC_PATH_TOOL(PKGCONFIG, pkg-config)
+
AC_MSG_CHECKING(whether to use archive)
AC_ARG_WITH(archive,
[ --with-archive[=PATH] Find the zlib header files in 'PATH'.
diff --git a/neethi/configure.ac b/neethi/configure.ac
index abe069a..c093b7f 100644
--- a/neethi/configure.ac
+++ b/neethi/configure.ac
@@ -50,6 +50,8 @@
CFLAGS="$CFLAGS -ansi -Wall -Wno-implicit-function-declaration "
fi
+AC_PATH_TOOL(PKGCONFIG, pkg-config)
+
AC_MSG_CHECKING(whether to set -Werror)
AC_ARG_ENABLE(werror, [ --disable-werror do not treat warnings as errors during build],
[ case "${enableval}" in
diff --git a/tools/tcpmon/configure.ac b/tools/tcpmon/configure.ac
index d5987c5..151f1c9 100644
--- a/tools/tcpmon/configure.ac
+++ b/tools/tcpmon/configure.ac
@@ -52,6 +52,7 @@
AC_CHECK_LIB(z, inflate)
dnl AC_CHECK_LIB(cutest, CuTestInit)
+AC_PATH_TOOL(PKGCONFIG, pkg-config)
AC_MSG_CHECKING(whether to build tests)
AC_ARG_ENABLE(tests,