Support Emscripten
diff --git a/configure.py b/configure.py
index 4b1e93f..75fa736 100755
--- a/configure.py
+++ b/configure.py
@@ -12,7 +12,11 @@
     build.export_cpath("include", ["pthreadpool.h"])
 
     with build.options(source_dir="src", extra_include_dirs="src", deps=build.deps.fxdiv):
-        build.static_library("pthreadpool", build.cc("pthreadpool.c"))
+        if build.target.is_emscripten:
+            source = "threadpool-shim.c"
+        else:
+            source = "threadpool-pthreads.c"
+        build.static_library("pthreadpool", build.cc(source))
 
     with build.options(source_dir="test", deps=[build, build.deps.googletest]):
         build.unittest("pthreadpool-test", build.cxx("pthreadpool.cc"))