diff options
author | Max Kellermann <max@duempel.org> | 2014-12-09 20:15:35 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-09 21:19:09 +0100 |
commit | 8583689fa4623431472c49f34c6f8ac2710cacc8 (patch) | |
tree | 487813bb4c79092dd0bd78b5490c1a95a69e83ea | |
parent | 7a1e026bb557c07f9b324f5fef64f0a483cbd017 (diff) | |
download | mpd-8583689fa4623431472c49f34c6f8ac2710cacc8.tar.gz mpd-8583689fa4623431472c49f34c6f8ac2710cacc8.tar.xz mpd-8583689fa4623431472c49f34c6f8ac2710cacc8.zip |
configure.ac: use AC_CHECK_FUNCS for pthread_setname_np()
Don't assume "-lpthread". Just use PTHREAD_CFLAGS, as determined by
AX_PTHREAD.
-rw-r--r-- | configure.ac | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 755ff382a..370b69fec 100644 --- a/configure.ac +++ b/configure.ac @@ -198,12 +198,8 @@ LIBS="$PTHREAD_LIBS $LIBS" AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS" AM_CXXFLAGS="$AM_CXXFLAGS $PTHREAD_CFLAGS" -AC_CHECK_LIB([pthread], [pthread_setname_np], - [have_pthread_setname_np=yes], - [have_pthread_setname_np=no]) -if test x$have_pthread_setname_np = xyes; then - AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [Is pthread_setname_np() available?]) -fi +MPD_WITH_LIBRARY([PTHREAD], + [AC_CHECK_FUNCS([pthread_setname_np])]) AC_SEARCH_LIBS([clock_gettime], [rt]) |