1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 06:18:06 +00:00

Check pthread first

This commit is contained in:
elbandi 2016-03-31 20:03:51 +02:00
parent 72a15389c9
commit b86f89616c

View File

@ -161,17 +161,16 @@ AC_LINK_IFELSE(
LIBS=$SAVED_LIBS LIBS=$SAVED_LIBS
CFLAGS=$SAVED_CFLAGS CFLAGS=$SAVED_CFLAGS
has_winpthread=false has_pthread=false
if test "x$have_win32" = xtrue; then AC_CHECK_LIB(pthread, pthread_create, has_pthread=true)
has_winpthread=true PTHREAD_LIBS=-lpthread
AC_CHECK_LIB(winpthread, nanosleep, , has_winpthread=false)
PTHREAD_LIBS=-lwinpthread
fi
if test "x$has_winpthread" != xtrue; then if test "x$has_pthread" != xtrue; then
AC_CHECK_LIB(pthread, pthread_create, , if test "x$have_win32" = xtrue; then
AC_CHECK_LIB(winpthread, nanosleep, ,
AC_MSG_ERROR([Could not find pthread library - please install libpthread])) AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
PTHREAD_LIBS=-lpthread PTHREAD_LIBS=-lwinpthread
fi
fi fi
AC_ARG_ENABLE([adl], AC_ARG_ENABLE([adl],