build-sys: Move TLS check after flags additions
authorPhilip Chimento <philip.chimento@gmail.com>
Thu, 10 Nov 2016 05:22:53 +0000 (21:22 -0800)
committerTanu Kaskinen <tanuk@iki.fi>
Thu, 19 Jan 2017 01:00:45 +0000 (03:00 +0200)
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.

configure.ac

index 65a9eba..7a87432 100644 (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               #