blob: 4f8a3d0775ccc382174a045fe39f0bf76faa5fa2 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001configure.ac: add option --enable-thread-tls to manage thread ssl support
2
3Add option --enable-thread-tls to manage the including of thread
4local storage, so we could explicitly disable it.
5
6Upstream-Status: Pending
7
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9---
10 configure.ac | 17 +++++++++++------
11 1 file changed, 11 insertions(+), 6 deletions(-)
12
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080013Index: syslog-ng-3.15.1/configure.ac
Brad Bishop316dfdd2018-06-25 12:45:53 -040014===================================================================
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015--- syslog-ng-3.15.1.orig/configure.ac
16+++ syslog-ng-3.15.1/configure.ac
17@@ -190,6 +190,9 @@ AC_ARG_ENABLE(gprof,
Brad Bishop316dfdd2018-06-25 12:45:53 -040018 AC_ARG_ENABLE(memtrace,
19 [ --enable-memtrace Enable alternative leak debugging code.])
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21+AC_ARG_ENABLE(thread-tls,
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022+ [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no")
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023+
24 AC_ARG_ENABLE(dynamic-linking,
25 [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto")
26
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027@@ -591,12 +594,14 @@ dnl ***************************************************************************
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028 dnl Is the __thread keyword available?
29 dnl ***************************************************************************
30
31-AC_LINK_IFELSE([AC_LANG_PROGRAM(
32-[[#include <pthread.h>
33-__thread int a;
34-]],
35-[a=0;])],
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036-[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")])
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037+if test "x$enable_thread_tls" != "xno"; then
38+ AC_LINK_IFELSE([AC_LANG_PROGRAM(
39+ [[#include <pthread.h>
40+ __thread int a;
41+ ]],
42+ [a=0;])],
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043+ [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")])
Patrick Williamsb48b7b42016-08-17 15:04:38 -050044+fi
45
46 dnl ***************************************************************************
47 dnl How to do static linking?