libraries were necessary to run threads.
Also updated PTHREADLIB, so '-lpthread' (or whatever) is just
dropped in as part of LIBS. This allows the sem_init() check to
work, so I guess it's a Good Thing.
LIBTOOL = @LIBTOOL@
-PTHREADLIB = @PTHREADLIB@
LCRYPT = @CRYPTLIB@
LDBM = @DBMLIB@
SOCKETLIB = @SOCKETLIB@
PTHREADLIB="-lc_r"
)
fi
- AC_SUBST(PTHREADLIB)
+ LIBS="$LIBS $PTHREADLIB"
fi
if test "$WITH_THREAD_POOL" = "yes"; then
AC_MSG_ERROR(You must have threading libraries for thread pools to work.)
fi
- AC_DEFINE(WITH_THREAD_POOL,1)
+ AC_CHECK_FUNC(sem_init,
+ HAVE_SEM_INIT=1,
+ HAVE_SEM_INIT=0)
+ if test "$HAVE_SEM_INIT" != "1"; then
+ AC_MSG_WARN(You do not have posix semaphores. Disabling thread pools)
+ else
+ AC_DEFINE(WITH_THREAD_POOL,1)
+ fi
fi
dnl Check for -lsocket