From db36ca5cd527136243431baf26608729f0d8a219 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 27 Jan 2017 16:20:04 +0100 Subject: [PATCH] Disable multi-threading in libjte of GNU xorriso if pthread_cancel() is missing --- xorriso/configure_ac.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xorriso/configure_ac.txt b/xorriso/configure_ac.txt index 6f7b7f21..8c65c28b 100644 --- a/xorriso/configure_ac.txt +++ b/xorriso/configure_ac.txt @@ -338,6 +338,17 @@ AC_ARG_ENABLE(jtethreads, , enable_jtethreads=yes) if test x$LIBJTE_DEF = xyes then + if test "x$enable_jtethreads" = xyes; then + mem_LDFLAGs="$LDFLAGS" + LDFLAGS="$LDFLAGS $THREAD_LIBS" + AC_MSG_CHECKING([for pthread_cancel()]) + AC_TRY_LINK([#include ], + [pthread_cancel((pthread_t) NULL);], + [], + [enable_jtethreads=no]) + AC_MSG_RESULT([$enable_jtethreads]) + LDFLAGS="$mem_LDFLAGS" + fi if test "x$enable_jtethreads" = xyes; then AC_DEFINE([THREADED_CHECKSUMS], []) echo "enabled multi-threading in libjte"