Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | configure.ac: add option --enable-thread-tls to manage thread ssl support |
| 2 | |
| 3 | Add option --enable-thread-tls to manage the including of thread |
| 4 | local storage, so we could explicitly disable it. |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 9 | --- |
| 10 | configure.ac | 17 +++++++++++------ |
| 11 | 1 file changed, 11 insertions(+), 6 deletions(-) |
| 12 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | Index: syslog-ng-3.15.1/configure.ac |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | =================================================================== |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | --- 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | AC_ARG_ENABLE(memtrace, |
| 19 | [ --enable-memtrace Enable alternative leak debugging code.]) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | |
| 21 | +AC_ARG_ENABLE(thread-tls, |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | + [ --enable-thread-tls Enable Thread Local Storage support.],,enable_thread_tls="no") |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 23 | + |
| 24 | AC_ARG_ENABLE(dynamic-linking, |
| 25 | [ --enable-dynamic-linking Link everything dynamically.],,enable_dynamic_linking="auto") |
| 26 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | @@ -591,12 +594,14 @@ dnl *************************************************************************** |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 28 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | -[ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 37 | +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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | + [ac_cv_have_tls=yes; AC_DEFINE_UNQUOTED(HAVE_THREAD_KEYWORD, 1, "Whether Thread Local Storage is supported by the system")]) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 44 | +fi |
| 45 | |
| 46 | dnl *************************************************************************** |
| 47 | dnl How to do static linking? |