From 77d2f5b2b244fd9cff2c177b7ffad73b18111b10 Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Fri, 12 Apr 2013 20:16:04 +0200 Subject: [PATCH] make MAX_CONFIGS a autoconf precious variable You can now define up to how many configuration files you want to support by stating something like ./configure MAX_CONFIGS=150 ... when invoking configure. Default value remains 50. --- configure.ac | 6 ++++++ options.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a8bc34c..5cf26ee 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,12 @@ AC_ARG_ENABLE( [enable_distonly="no"] ) +AC_ARG_VAR([MAX_CONFIGS], [specify the maximum number of configs @<:@default=50@:>@]) +if test -z "$MAX_CONFIGS"; then + MAX_CONFIGS=50 +fi +AC_DEFINE_UNQUOTED([MAX_CONFIGS], [$MAX_CONFIGS], [Maximum number of config files supported.]) + case "$host" in *-mingw*) CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" diff --git a/options.h b/options.h index ef05634..cc49d2b 100644 --- a/options.h +++ b/options.h @@ -37,7 +37,6 @@ typedef struct connection connection_t; * including the option name itself. */ #define MAX_PARMS 5 /* May number of parameters per option */ -#define MAX_CONFIGS 50 /* Max number of config-files to read */ #define MAX_CONFIG_SUBDIRS 50 /* Max number of subdirs to scan for configs */