Skip to content
Permalink
Browse files
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
  • Loading branch information
bblough committed Sep 2, 2020
1 parent 5d48db7 commit 89ea0ed9f6146ecc85d7928f1c0a7110da0bd6c2
Showing 4 changed files with 7 additions and 0 deletions.
@@ -66,6 +66,8 @@ if test "$GCC" = "yes"; then
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
@@ -116,6 +116,8 @@ dnl AC_FUNC_MALLOC
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'.
@@ -50,6 +50,8 @@ if test "$GCC" = "yes"; then
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
@@ -52,6 +52,7 @@ AC_CHECK_FUNCS([memmove])
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,

0 comments on commit 89ea0ed

Please sign in to comment.