aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDag Wieers <dag@wieers.com>2013-03-01 05:11:30 +0100
committerDag Wieers <dag@wieers.com>2013-03-01 21:39:26 +0100
commit66d191e3bbce5a5dba6b2aaf7bae648ce88cb61e (patch)
tree20da558eb8626200d0c7fc2e52c3a8cd7bc8d790 /configure.in
parent8d2e0fe0d3cd5592765910de545ff471c90cea8c (diff)
Name threads on Linux properly
I implemented this as part of the OpenELEC project. It helps debug issues if we can easily identify the XBMC thread by name. This patch implements just that. This second incarnation now implements a proper configure check to ensure we are using the capabilities of the library on various platforms (esp. when using glibc < 1.12).
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index b1769193bf..95103f9703 100644
--- a/configure.in
+++ b/configure.in
@@ -976,9 +976,15 @@ AC_CHECK_LIB([jpeg], [main],, AC_MSG_ERROR($missing_library)) # check for
AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
if echo "$ARCH" | grep -q freebsd; then
AC_CHECK_LIB([pthread], [main],LIBS="-pthread $LIBS", AC_MSG_ERROR($missing_library))
+AC_CHECK_LIB([pthread], [pthread_set_name_np],
+ AC_DEFINE([HAVE_PTHREAD_SET_NAME_NP],[1],["Define to 1 if pthread has pthread_set_name_np"]),
+ AC_MSG_RESULT([Could not find pthread_set_name_np in pthread]))
else
if test "$target_platform" != "target_android" ; then
AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([pthread], [pthread_setname_np],
+ AC_DEFINE([HAVE_PTHREAD_SETNAME_NP],[1],["Define to 1 if pthread has pthread_setname_np"]),
+ AC_MSG_RESULT([Could not find pthread_setname_np in pthread]))
fi
fi
AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))