Disable multi-threading in libjte of GNU xorriso if pthread_cancel() is missing

This commit is contained in:
Thomas Schmitt 2017-01-27 16:20:04 +01:00
parent 3cac9fe558
commit db36ca5cd5
1 changed files with 11 additions and 0 deletions

View File

@ -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.h>],
[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"