[config] Fix check for pthread_setname_np on linux
This commit is contained in:
parent
c4195239d2
commit
20e19d9fe9
20
configure.ac
20
configure.ac
|
@ -65,15 +65,17 @@ AC_SEARCH_LIBS([timer_settime], [rt], [],
|
||||||
|
|
||||||
AC_SEARCH_LIBS([pthread_exit], [pthread], [],
|
AC_SEARCH_LIBS([pthread_exit], [pthread], [],
|
||||||
[AC_MSG_ERROR([[pthreads library is required]])])
|
[AC_MSG_ERROR([[pthreads library is required]])])
|
||||||
dnl Validate pthread_setname_np with 2 args (some have 1)
|
AC_SEARCH_LIBS([pthread_setname_np], [pthread],
|
||||||
AC_MSG_CHECKING([[for pthread_setname_np]])
|
[dnl Validate pthread_setname_np with 2 args (some have 1)
|
||||||
AC_TRY_LINK([@%:@include <pthread.h>],
|
AC_MSG_CHECKING([[for two-parameter pthread_setname_np]])
|
||||||
[pthread_setname_np(pthread_self(), "name");],
|
AC_TRY_LINK([@%:@include <pthread.h>],
|
||||||
[AC_MSG_RESULT([yes])
|
[pthread_setname_np(pthread_self(), "name");],
|
||||||
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1,
|
[AC_MSG_RESULT([yes])
|
||||||
[Define to 1 if you have pthread_setname_np])],
|
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1,
|
||||||
[AC_MSG_RESULT([[no]])])
|
[Define to 1 if you have pthread_setname_np])],
|
||||||
AC_CHECK_FUNCS([pthread_set_name_np])
|
[AC_MSG_RESULT([[no]])])],
|
||||||
|
[AC_SEARCH_LIBS([pthread_set_name_np], [pthread],
|
||||||
|
[AC_CHECK_FUNCS([pthread_set_name_np])])])
|
||||||
|
|
||||||
dnl Large File Support (LFS)
|
dnl Large File Support (LFS)
|
||||||
AC_SYS_LARGEFILE
|
AC_SYS_LARGEFILE
|
||||||
|
|
Loading…
Reference in New Issue