From 303f987ee90dc56edf75df7e1e5d6002bdc514aa Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Fri, 16 Aug 2013 22:02:00 +0200 Subject: [PATCH] Add --with-disk-cache configure option Enables packagers more fine grained control over the default value without having to mess with config files. See GH-115 --- configure.ac | 5 +++++ src/OptionHandlerFactory.cc | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 3f57d832..6ab9ca35 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,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([disk-cache], + AS_HELP_STRING([--with-disk-cache=SIZE],[Use SIZE as the default disk-cache size.]), + [AC_DEFINE_UNQUOTED([DEFAULT_DISK_CACHE], ["$withval"], [Define to choose default disk-cache size])], + []) + AC_ARG_WITH([bashcompletiondir], AS_HELP_STRING([--with-bashcompletiondir=DIR], [Directory to install bash_completion file]), diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 59a61423..03c8f087 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -210,7 +210,11 @@ std::vector OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new UnitNumberOptionHandler (PREF_DISK_CACHE, TEXT_DISK_CACHE, +#ifdef DEFAULT_DISK_CACHE + DEFAULT_DISK_CACHE, +#else "16M", +#endif 0)); op->addTag(TAG_ADVANCED); handlers.push_back(op);