From a982dee961671a36b71884bde21658831830088d Mon Sep 17 00:00:00 2001 From: Nils Maier Date: Fri, 16 Aug 2013 22:10:54 +0200 Subject: [PATCH] Switch CA_BUNDLE to AC_DEFINE --- configure.ac | 5 +++-- src/Makefile.am | 2 +- src/OptionHandlerFactory.cc | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6ab9ca35..365ae9e9 100644 --- a/configure.ac +++ b/configure.ac @@ -52,7 +52,9 @@ ARIA2_ARG_ENABLE([libaria2]) AC_ARG_WITH([ca-bundle], AS_HELP_STRING([--with-ca-bundle=FILE],[Use FILE as default CA bundle.]), - [ca_bundle=$withval], [ca_bundle=""]) + [AC_DEFINE_UNQUOTED([CA_BUNDLE], ["$withval"], [Define to choose default CA bundle.]) + ca_bundle=$withval + ], []) AC_ARG_WITH([disk-cache], AS_HELP_STRING([--with-disk-cache=SIZE],[Use SIZE as the default disk-cache size.]), @@ -405,7 +407,6 @@ if test "x$have_appletls" = "xyes" || test "x$have_libgnutls" = "xyes" || test " have_ssl="yes" AC_DEFINE([ENABLE_SSL], [1], [Define to 1 if ssl support is enabled.]) AM_CONDITIONAL([ENABLE_SSL], true) - AC_SUBST([ca_bundle]) else AM_CONDITIONAL([ENABLE_SSL], false) fi diff --git a/src/Makefile.am b/src/Makefile.am index 7b76f9c9..209ad75f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -671,4 +671,4 @@ LDADD = libaria2.la @LIBINTL@ @ALLOCA@ #-lprofiler AM_CPPFLAGS = -Wall\ -I$(top_srcdir)/lib -I$(top_srcdir)/intl\ -I$(srcdir)/includes -I$(builddir)/includes\ - -DLOCALEDIR=\"@localedir@\" -DCA_BUNDLE=\"$(ca_bundle)\" @DEFS@ #-pg + -DLOCALEDIR=\"@localedir@\" @DEFS@ #-pg diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc index 03c8f087..ab236886 100644 --- a/src/OptionHandlerFactory.cc +++ b/src/OptionHandlerFactory.cc @@ -1144,7 +1144,11 @@ std::vector OptionHandlerFactory::createOptionHandlers() OptionHandler* op(new DefaultOptionHandler (PREF_CA_CERTIFICATE, TEXT_CA_CERTIFICATE, +#ifdef CA_BUNDLE CA_BUNDLE, +#else + "", +#endif PATH_TO_FILE)); op->addTag(TAG_HTTP); op->addTag(TAG_HTTPS);