Some fixes for compiling on Cygwin: x264, pthreads, taglib and dirac.
[vlc.git] / extras / contrib / src / Patches / x264-svn-win32.patch
1 Index: configure
2 ===================================================================
3 --- configure   (revision 672)
4 +++ configure   (working copy)
5 @@ -339,13 +339,13 @@
6              pthread="yes"
7              ;;
8          MINGW|CYGWIN)
9 -            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0);" ; then
10 +            if cc_check pthread.h -lpthread "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
11                  pthread="yes"
12                  libpthread="-lpthread"
13 -            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0);" ; then
14 +            elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
15                  pthread="yes"
16                  libpthread="-lpthreadGC2"
17 -            elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0);" ; then
18 +            elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
19                  pthread="yes"
20                  libpthread="-lpthreadGC2 -lwsock32"
21                  CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
22 @@ -428,6 +428,10 @@
23  ASFLAGS=$ASFLAGS
24  GTK=$gtk
25  EXE=$EXE
26 +AR=$AR
27 +STRIP=$STRIP
28 +AROPTS=$AROPTS
29 +RANLIB=$RANLIB
30  VIS=$vis
31  HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
32  DEVNULL=$DEVNULL
33 Index: Makefile
34 ===================================================================
35 --- Makefile    (revision 672)
36 +++ Makefile    (working copy)
37 @@ -73,8 +73,8 @@
38  default: $(DEP) x264$(EXE)
39  
40  libx264.a: .depend $(OBJS) $(OBJASM)
41 -       ar rc libx264.a $(OBJS) $(OBJASM)
42 -       ranlib libx264.a
43 +       $(AR) rc libx264.a $(OBJS) $(OBJASM)
44 +       $(RANLIB) libx264.a
45  
46  $(SONAME): .depend $(OBJS) $(OBJASM)
47         $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
48 @@ -93,7 +93,7 @@
49  %.o: %.asm
50         $(AS) $(ASFLAGS) -o $@ $<
51  # delete local/anonymous symbols, so they don't show up in oprofile
52 -       -@ strip -x $@
53 +       -@ $(STRIP) -x $@
54  
55  .depend: config.mak
56         rm -f .depend
57 @@ -146,14 +146,14 @@
58         rm -rf test/
59         $(MAKE) -C gtk distclean
60  
61 -install: x264 $(SONAME)
62 +install: x264$(EXE)
63         install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
64         install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
65         install -m 644 x264.h $(DESTDIR)$(includedir)
66         install -m 644 libx264.a $(DESTDIR)$(libdir)
67         install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
68 -       install x264 $(DESTDIR)$(bindir)
69 -       ranlib $(DESTDIR)$(libdir)/libx264.a
70 +       install x264$(EXE) $(DESTDIR)$(bindir)
71 +       $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
72         $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
73         $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
74