From 57519611ffe2cf8394159b262d6dfd2d2055a4ad Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 12 May 2012 19:19:57 +0900 Subject: [PATCH] Added --with-bashcompletiondir configure option. By default, bash_completion file named aria2c is installed to the directory $prefix/share/doc/aria2/bash_completion. To change the install directory of the file, use --with-bashcompletiondir option. --- README.rst | 5 +++++ configure.ac | 8 ++++++++ doc/Makefile.am | 7 +++++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 11bf1b92..8a58f445 100644 --- a/README.rst +++ b/README.rst @@ -206,6 +206,11 @@ using aria2's ``--ca-certificate`` option. If you don't have CA bundle file installed, then the last resort is disable the certificate validation using ``--check-certificate=false``. +By default, bash_completion file named ``aria2c`` is installed to the +directory ``$prefix/share/doc/aria2/bash_completion``. To change the +install directory of the file, use ``--with-bashcompletiondir`` +option. + The executable is 'aria2c' in src directory. aria2 uses CppUnit for automated unit testing. To run the unit test:: diff --git a/configure.ac b/configure.ac index b2a5358b..c20a3cd2 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,11 @@ AC_ARG_WITH([ca-bundle], AS_HELP_STRING([--with-ca-bundle=FILE],[Use FILE as default CA bundle.]), [ca_bundle=$withval], [ca_bundle=""]) +AC_ARG_WITH([bashcompletiondir], + AS_HELP_STRING([--with-bashcompletiondir=DIR], + [Directory to install bash_completion file]), + [bashcompletiondir=$withval], [bashcompletiondir=$docdir/bash_completion]) + # Checks for programs. AC_PROG_CXX AC_PROG_CC @@ -572,6 +577,8 @@ if test "x$enable_message_digest" = "xyes"; then fi AM_CONDITIONAL([ENABLE_WEBSOCKET], [test "x$enable_websocket" = "xyes"]) +AC_SUBST([bashcompletiondir]) + AC_CONFIG_FILES([Makefile src/Makefile test/Makefile @@ -611,3 +618,4 @@ echo "Metalink: $enable_metalink" echo "XML-RPC: $enable_xml_rpc" echo "Message Digest: $enable_message_digest" echo "WebSocket: $enable_websocket" +echo "bash_completion dir: $bashcompletiondir" diff --git a/doc/Makefile.am b/doc/Makefile.am index a91a2ab4..626ee9c6 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -4,6 +4,9 @@ doc_xmlrpcdir = $(docdir)/xmlrpc dist_doc_xmlrpc_DATA = xmlrpc/aria2mon \ xmlrpc/aria2rpc \ xmlrpc/README.txt + doc_bashcompletiondir = $(docdir)/bash_completion -dist_doc_bashcompletion_DATA = bash_completion/README.txt \ - bash_completion/aria2c +dist_doc_bashcompletion_DATA = bash_completion/README.txt + +doc_bashcompletionscriptdir = @bashcompletiondir@ +dist_doc_bashcompletionscript_DATA = bash_completion/aria2c