From 7b2b09fe7f4bd20cba4dae3e9104970c94618da5 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 25 May 2019 17:42:45 +0200 Subject: configure.ac: Make sure pthread_cancel is properly detected --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 55ba1cd..cd5879a 100644 --- a/configure.ac +++ b/configure.ac @@ -84,7 +84,9 @@ case ${host_os} in *) AC_MSG_RESULT([${host_os}]) AX_PTHREAD([], [AC_MSG_ERROR([pthread is required to build $PACKAGE])]) - AC_CHECK_FUNCS([pthread_cancel]) + AC_CHECK_FUNC(pthread_cancel, [AC_DEFINE(HAVE_PTHREAD_CANCEL)], [ + AC_CHECK_LIB(pthread, [pthread_cancel],[AC_DEFINE(HAVE_PTHREAD_CANCEL)]) + ]) AC_CACHE_CHECK(for program_invocation_short_name, ac_cv_program_invocation_short_name,[ AC_TRY_LINK([extern char* program_invocation_short_name;],[return program_invocation_short_name;], [ac_cv_program_invocation_short_name=yes], -- cgit v1.1-32-gdbae