diff --git a/configure.ac b/configure.ac index fec392f8..718c7d44 100644 --- a/configure.ac +++ b/configure.ac @@ -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"], [ diff --git a/dist-build/emscripten.sh b/dist-build/emscripten.sh index e0564a05..3ca0b7ea 100755 --- a/dist-build/emscripten.sh +++ b/dist-build/emscripten.sh @@ -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