summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-12-21 08:18:24 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-12-21 08:18:26 +0100
commit63e3b15f187ecc8f1dc7a6d20a17f4f7b8313721 (patch)
tree98b3ad32e2f0b282dcd139997eb6f05e64c133c3
parent5f578c41d8449da5487a1aa23615ebb0b99cedc2 (diff)
downloadgnutls-tmp-default-prio-string.tar.gz
configure: introduced --with-priority-string optiontmp-default-prio-string
This allows specifying the priority string to be used with gnutls_set_default_priority() on configure time.
-rw-r--r--configure.ac6
-rw-r--r--lib/priority.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e96c75d356..e3f03b7230 100644
--- a/configure.ac
+++ b/configure.ac
@@ -588,6 +588,12 @@ system_priority_file="/etc/gnutls/default-priorities"
AC_DEFINE_UNQUOTED([SYSTEM_PRIORITY_FILE],
["$system_priority_file"], [The system priority file])
+AC_ARG_WITH(default-priority-string, AS_HELP_STRING([--with-default-priority-string],
+ [specify the default priority string (e.g. @SYSTEM)]),
+ prio_string="$withval",
+ prio_string="NORMAL")
+
+AC_DEFINE_UNQUOTED([DEFAULT_PRIORITY_STRING], ["$prio_string"], [The default priority string])
dnl Check for p11-kit
P11_KIT_MINIMUM=0.23.1
diff --git a/lib/priority.c b/lib/priority.c
index 94454f4981..3fa7a9d934 100644
--- a/lib/priority.c
+++ b/lib/priority.c
@@ -1236,7 +1236,7 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
(*priority_cache)->min_record_version = 1;
if (priorities == NULL)
- priorities = "NORMAL";
+ priorities = DEFAULT_PRIORITY_STRING;
darg = _gnutls_resolve_priorities(priorities);
if (darg == NULL) {