From 8583689fa4623431472c49f34c6f8ac2710cacc8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 9 Dec 2014 20:15:35 +0100 Subject: [PATCH] configure.ac: use AC_CHECK_FUNCS for pthread_setname_np() Don't assume "-lpthread". Just use PTHREAD_CFLAGS, as determined by AX_PTHREAD. --- configure.ac | 8 ++------ 1 file 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])