Browse Source

Check pthread first

tweaked
elbandi 9 years ago
parent
commit
b86f89616c
  1. 21
      configure.ac

21
configure.ac

@ -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 if test "x$has_pthread" != xtrue; then
fi if test "x$have_win32" = xtrue; then
AC_CHECK_LIB(winpthread, nanosleep, ,
if test "x$has_winpthread" != xtrue; then AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
AC_CHECK_LIB(pthread, pthread_create, , PTHREAD_LIBS=-lwinpthread
AC_MSG_ERROR([Could not find pthread library - please install libpthread])) fi
PTHREAD_LIBS=-lpthread
fi fi
AC_ARG_ENABLE([adl], AC_ARG_ENABLE([adl],

Loading…
Cancel
Save