Commit 51601a2a authored by Dominik Taborsky's avatar Dominik Taborsky

configure: fix typo and use PKG_VAR_CHECK.

parent ee482ea8
......@@ -64,11 +64,11 @@ AC_CONFIG_FILES([src/libknot.pc
# Get Bash completion scripts directory
bash_completion_dir=""
PKG_CHECK_MODULES([bash_completion],[bash-complretion],[
bash_completion_dir=$(pkg-config --variable=completionsdir bash-completion)
PKG_CHECK_MODULES([bash_completion], [bash-completion],[
PKG_CHECK_VAR([bash_completion_dir], [bash-completion],[],[])
AC_SUBST([BASH_COMPLETION_DIR], $bash_completion_dir)
],[bash_completion_dir=""])
AM_CONDITIONAL([HAVE_BASH_COMPLETION], test -n "$bash_completion_dir")
],[])
AM_CONDITIONAL([HAVE_BASH_COMPLETION], [test -n "$bash_completion_dir"])
# Build Knot DNS daemon
AC_ARG_ENABLE([daemon],
......
  • JFTR for review purposes

    • PKG_CHECK_MODULES and PKG_CHECK_VARS are redundant, you need to call just PKG_CHECK_VARS
    • PKG_CHECK_VARS have 5 arguments, you are missing checked variable name - due to this autoreconf ended with cryptic error message (configure.ac:35: error: possibly undefined macro: AC_SUBST), that's because the output was too garbled, since the "variable" ($3) argument used was in fact "AC_SUBST([BASH_COMPLETION_DIR], $bash_completion_dir)" and this is too much for m4 to handle
    • m4/pkg.m4 was not added to the git repository (I added the slimmed down variant)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment