Commit 98eec01a authored by Ondřej Surý's avatar Ondřej Surý

Revert "Makefile: don't install bash completition"

This reverts commit 9411e875.
parent 631830c6
...@@ -5,7 +5,8 @@ singlehtml install-singlehtml: ...@@ -5,7 +5,8 @@ singlehtml install-singlehtml:
$(MAKE) -C doc $@ $(MAKE) -C doc $@
AM_DISTCHECK_CONFIGURE_FLAGS = \ AM_DISTCHECK_CONFIGURE_FLAGS = \
--disable-code-coverage --disable-code-coverage \
--without-bash-completions
CODE_COVERAGE_INFO = coverage.info CODE_COVERAGE_INFO = coverage.info
CODE_COVERAGE_HTML = coverage.html CODE_COVERAGE_HTML = coverage.html
......
...@@ -374,6 +374,24 @@ AS_IF([test "$with_libidn" != "no"],[ ...@@ -374,6 +374,24 @@ AS_IF([test "$with_libidn" != "no"],[
]) # Knot DNS utilities dependencies ]) # Knot DNS utilities dependencies
# Bash completions
AC_ARG_WITH([bash-completions],
AC_HELP_STRING([--with-bash-completions=[DIR]], [Bash completions directory [default=auto]]),
[with_bash_completions="$withval"],
[with_bash_completions=auto]
)
AS_CASE([$with_bash_completions],
[auto], [PKG_CHECK_VAR([bash_completions_dir], [bash-completion], [completionsdir])],
[yes], [PKG_CHECK_VAR([bash_completions_dir], [bash-completion], [completionsdir], [], [AC_MSG_ERROR([bash completions not found])])],
[no], [bash_completions_dir=],
[bash_completions_dir="$with_bash_completions"]
)
AM_CONDITIONAL([HAVE_BASH_COMPLETIONS], [test -n "$bash_completions_dir"])
AS_IF([test -n "$bash_completions_dir"],
[bash_completions_output="${bash_completions_dir}"],
[bash_completions_output=no]
)
AC_SEARCH_LIBS([pow], [m]) AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthreads not found])]) AC_SEARCH_LIBS([pthread_create], [pthread], [], [AC_MSG_ERROR([pthreads not found])])
AC_SEARCH_LIBS([dlopen], [dl]) AC_SEARCH_LIBS([dlopen], [dl])
......
...@@ -24,10 +24,19 @@ install-data-local: knot.sample.conf ...@@ -24,10 +24,19 @@ install-data-local: knot.sample.conf
$(INSTALL) -d $(DESTDIR)/$(config_dir); \ $(INSTALL) -d $(DESTDIR)/$(config_dir); \
$(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \ $(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \
fi fi
if HAVE_BASH_COMPLETIONS
if [ \! -f $(DESTDIR)/$(bash_completions_dir)/keymgr ]; then \
$(INSTALL) -d $(DESTDIR)/$(bash_completions_dir); \
$(INSTALL_DATA) $(srcdir)/keymgr-completion.sh $(DESTDIR)/$(bash_completions_dir)/keymgr; \
fi
endif # HAVE_BASH_COMPLETIONS
uninstall-local: uninstall-local:
-rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \ -rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \
$(DESTDIR)/$(config_dir)/example.com.zone $(DESTDIR)/$(config_dir)/example.com.zone
if HAVE_BASH_COMPLETIONS
-rm -rf $(DESTDIR)/$(bash_completions_dir)/keymgr
endif # HAVE_BASH_COMPLETIONS
endif # HAVE_DAEMON endif # HAVE_DAEMON
......
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