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
pull/117/merge
Nils Maier 2013-08-16 22:02:00 +02:00
parent 90c39522a2
commit 303f987ee9
2 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,11 @@ AC_ARG_WITH([ca-bundle],
AS_HELP_STRING([--with-ca-bundle=FILE],[Use FILE as default CA bundle.]), AS_HELP_STRING([--with-ca-bundle=FILE],[Use FILE as default CA bundle.]),
[ca_bundle=$withval], [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], AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], AS_HELP_STRING([--with-bashcompletiondir=DIR],
[Directory to install bash_completion file]), [Directory to install bash_completion file]),

View File

@ -210,7 +210,11 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
OptionHandler* op(new UnitNumberOptionHandler OptionHandler* op(new UnitNumberOptionHandler
(PREF_DISK_CACHE, (PREF_DISK_CACHE,
TEXT_DISK_CACHE, TEXT_DISK_CACHE,
#ifdef DEFAULT_DISK_CACHE
DEFAULT_DISK_CACHE,
#else
"16M", "16M",
#endif
0)); 0));
op->addTag(TAG_ADVANCED); op->addTag(TAG_ADVANCED);
handlers.push_back(op); handlers.push_back(op);