 +	$(RANLIB) libx264.a
  
  $(SONAME): .depend $(OBJS) $(OBJASM)
- 	$(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
-@@ -94,7 +94,7 @@
+ 	$(CC) -shared -o $@ $(OBJS) $(OBJASM) $(SOFLAGS) $(LDFLAGS)
+@@ -90,7 +90,7 @@
  %.o: %.asm
  	$(AS) $(ASFLAGS) -o $@ $<
  # delete local/anonymous symbols, so they don't show up in oprofile

 if test "$pthread" = "auto" ; then
     pthread="no"
     case $SYS in
@@ -345,16 +346,18 @@
             pthread="yes"
             ;;
         MINGW|CYGWIN)
-            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0);" ; then
+            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
                 pthread="yes"
                 libpthread="-lpthread"
-            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0);" ; then
+            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
                 pthread="yes"
                 libpthread="-lpthreadGC2"
-            elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0);" ; then

 VIS=$vis
 HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
 DEVNULL=$DEVNULL
@@ -495,7 +500,7 @@
 Description: H.264 (MPEG4 AVC) encoder library
 Version: $(grep POINTVER < config.h | sed -e 's/.* "//; s/".*//')
 Libs: $pclibs
