summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-01-23 03:23:02 -0800
committerRoland McGrath <roland@redhat.com>2009-01-23 03:23:02 -0800
commit8181739c44410da185ca2da897e0cc9fb2361c87 (patch)
treeab3f0ecd3b716dbe9bafd9a6757da59ebd281d18 /configure.ac
parent7a2a59144d6de340e8f4a3340a6bf3f5a4ac6dcd (diff)
downloadelfutils-8181739c44410da185ca2da897e0cc9fb2361c87.tar.gz
(__thread check): Use AC_LINK_IFELSE, in case of building with compiler support but no working runtime support.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 3dcabbe1..657bf501 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,12 +74,13 @@ CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
AC_MSG_ERROR([gcc with C99 support required]))
-AC_CACHE_CHECK([for gcc with TLS support], ac_cv_tls, [dnl
-AC_COMPILE_IFELSE([dnl
-__thread int a; int foo (int b) { return a + b; }],
- ac_cv_tls=yes, ac_cv_tls=no)])
+AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
+AC_LINK_IFELSE([dnl
+AC_LANG_PROGRAM([[static __thread int a; int foo (int b) { return a + b; }]],
+ [[exit (foo (0));]])],
+ ac_cv_tls=yes, ac_cv_tls=no)])
AS_IF([test "x$ac_cv_tls" != xyes],
- AC_MSG_ERROR([gcc with TLS support required]))
+ AC_MSG_ERROR([__thread support required]))
LOCALEDIR=$datadir
AC_SUBST(LOCALEDIR)