1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Compile with pthreads

This commit is contained in:
Frank Denis 2016-04-18 20:54:46 +02:00
parent 8ab4334945
commit bdf5c8246b
2 changed files with 13 additions and 1 deletions

View File

@ -106,6 +106,18 @@ AC_ARG_ENABLE(minimal,
])
AM_CONDITIONAL([MINIMAL], [test x$enable_minimal = xyes])
AC_ARG_WITH(pthreads, AC_HELP_STRING([--with-pthreads],
[use pthreads library, or --without-pthreads to disable threading support.]),
[ ], [withval="yes"])
AS_IF([test "x$withval" = "xyes"], [
AX_PTHREAD([
AC_DEFINE(HAVE_PTHREAD, 1, [Define if you have POSIX threads libraries and header files])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"])
])
AC_ARG_WITH(safecode,
[AS_HELP_STRING(--with-safecode,For maintainers only - please do not use)],
[AS_IF([test "x$withval" = "xyes"], [

View File

@ -55,7 +55,7 @@ rm -f "$DONE_FILE"
echo
emconfigure ./configure --enable-minimal --disable-shared --prefix="$PREFIX" \
CFLAGS="$CFLAGS" && \
--without-pthreads CFLAGS="$CFLAGS" && \
emmake make clean
[ $? = 0 ] || exit 1