build-sys: Move TLS check after flags additions

Any compiler flags should be set before asking the compiler to check for
thread-local storage with AX_TLS, since compiler flags (in this case
-mmacosx-version-min=10.5) can influence the outcome of that check.
This commit is contained in:
Philip Chimento 2016-11-09 21:22:53 -08:00 committed by Tanu Kaskinen
parent a4bc0227b3
commit 8405b1fb7f

View file

@ -502,20 +502,6 @@ AC_CACHE_CHECK([whether $CC knows _Bool],
AS_IF([test "$pulseaudio_cv__Bool" = "yes"], AC_DEFINE([HAVE_STD_BOOL], 1, [Have _Bool.]))
#### Thread support ####
AX_TLS
AS_IF([test "$ac_cv_tls" = "__thread"],
AC_DEFINE([SUPPORT_TLS___THREAD], 1, [Define this if the compiler supports __thread for Thread-Local Storage]))
# Win32 build breaks with win32 pthread installed
AS_IF([test "x$os_is_win32" != "x1"],
[AX_PTHREAD])
AS_IF([test "x$ax_pthread_ok" = "xyes"],
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], 1, [Needed on Solaris]))
#### Check for libs ####
# ISO
@ -1405,6 +1391,20 @@ AS_IF([test "x$enable_adrian_aec" != "xno"],
AM_CONDITIONAL([HAVE_ADRIAN_EC], [test "x$HAVE_ADRIAN_EC" = "x1"])
#### Thread support ####
AX_TLS
AS_IF([test "$ac_cv_tls" = "__thread"],
AC_DEFINE([SUPPORT_TLS___THREAD], 1, [Define this if the compiler supports __thread for Thread-Local Storage]))
# Win32 build breaks with win32 pthread installed
AS_IF([test "x$os_is_win32" != "x1"],
[AX_PTHREAD])
AS_IF([test "x$ax_pthread_ok" = "xyes"],
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], 1, [Needed on Solaris]))
###################################
# Output #