Switch CA_BUNDLE to AC_DEFINE

pull/117/merge
Nils Maier 2013-08-16 22:10:54 +02:00
parent 303f987ee9
commit a982dee961
3 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -1144,7 +1144,11 @@ std::vector<OptionHandler*> 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);