]> git.sesse.net Git - vlc/blob - extras/contrib/src/Patches/x264-svn-win32.patch
Gettext produce libintl.h or libgnuintl.h depending the situation.
[vlc] / extras / contrib / src / Patches / x264-svn-win32.patch
1 Index: configure
2 ===================================================================
3 --- configure   (revision 612)
4 +++ configure   (working copy)
5 @@ -64,8 +64,101 @@
6  
7  EXE=""
8  
9 +AR="ar"
10 +AROPTS="rc"
11 +RANLIB="ranlib"
12 +
13  MACHINE="$(./config.guess)"
14  
15 +# parse options
16 +
17 +for opt do
18 +    optarg="${opt#*=}"
19 +    case "$opt" in
20 +       --crosscompile=*)
21 +            CROSS="$optarg"
22 +            CC="$CROSS-gcc"
23 +            AR="$CROSS-ar"
24 +            RANLIB="$CROSS-ranlib"
25 +            MACHINE="`echo $CROSS | sed -e 's/-/-x-/g'`"
26 +           ;;
27 +        --prefix=*)
28 +            prefix="$optarg"
29 +            ;;
30 +        --exec-prefix=*)
31 +            exec_prefix="$optarg"
32 +            ;;
33 +        --bindir=*)
34 +            bindir="$optarg"
35 +            ;;
36 +        --libdir=*)
37 +            libdir="$optarg"
38 +            ;;
39 +        --includedir=*)
40 +            includedir="$optarg"
41 +            ;;
42 +        --enable-avis-input)
43 +            avis_input="yes"
44 +            ;;
45 +        --disable-avis-input)
46 +            avis_input="no"
47 +            ;;
48 +        --enable-mp4-output)
49 +            mp4_output="yes"
50 +            ;;
51 +        --disable-mp4-output)
52 +            mp4_output="no"
53 +            ;;
54 +        --extra-asflags=*)
55 +            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
56 +            ;;
57 +        --extra-cflags=*)
58 +            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
59 +            ;;
60 +        --extra-ldflags=*)
61 +            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
62 +            ;;
63 +        --enable-pthread)
64 +            pthread="yes"
65 +            ;;
66 +        --disable-pthread)
67 +            pthread="no"
68 +            ;;
69 +        --enable-debug)
70 +            debug="yes"
71 +            ;;
72 +        --enable-gprof)
73 +            CFLAGS="$CFLAGS -pg"
74 +            LDFLAGS="$LDFLAGS -pg"
75 +            gprof="yes"
76 +            ;;
77 +        --enable-pic)
78 +            pic="yes"
79 +            ;;
80 +        --enable-gtk)
81 +            gtk="yes"
82 +            ;;
83 +        --disable-gtk)
84 +            gtk="no"
85 +            ;;
86 +        --enable-shared)
87 +            shared="yes"
88 +            if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
89 +                pic="yes"
90 +            fi
91 +            ;;
92 +        --enable-visualize)
93 +            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
94 +            CFLAGS="$CFLAGS -DVISUALIZE=1"
95 +            vis="yes"
96 +            ;;
97 +        *)
98 +            echo "Unknown option $opt, ignored"
99 +            ;;
100 +    esac
101 +done
102 +
103 +
104  case "${MACHINE#*-*-}" in
105    beos*)
106      SYS="BEOS"
107 @@ -183,88 +276,6 @@
108  esac
109  
110  CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
111 -
112 -# parse options
113 -
114 -for opt do
115 -    optarg="${opt#*=}"
116 -    case "$opt" in
117 -        --prefix=*)
118 -            prefix="$optarg"
119 -            ;;
120 -        --exec-prefix=*)
121 -            exec_prefix="$optarg"
122 -            ;;
123 -        --bindir=*)
124 -            bindir="$optarg"
125 -            ;;
126 -        --libdir=*)
127 -            libdir="$optarg"
128 -            ;;
129 -        --includedir=*)
130 -            includedir="$optarg"
131 -            ;;
132 -        --enable-avis-input)
133 -            avis_input="yes"
134 -            ;;
135 -        --disable-avis-input)
136 -            avis_input="no"
137 -            ;;
138 -        --enable-mp4-output)
139 -            mp4_output="yes"
140 -            ;;
141 -        --disable-mp4-output)
142 -            mp4_output="no"
143 -            ;;
144 -        --extra-asflags=*)
145 -            ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
146 -            ;;
147 -        --extra-cflags=*)
148 -            CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
149 -            ;;
150 -        --extra-ldflags=*)
151 -            LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
152 -            ;;
153 -        --enable-pthread)
154 -            pthread="auto" # can't skip detection, since it differs by OS
155 -            ;;
156 -        --disable-pthread)
157 -            pthread="no"
158 -            ;;
159 -        --enable-debug)
160 -            debug="yes"
161 -            ;;
162 -        --enable-gprof)
163 -            CFLAGS="$CFLAGS -pg"
164 -            LDFLAGS="$LDFLAGS -pg"
165 -            gprof="yes"
166 -            ;;
167 -        --enable-pic)
168 -            pic="yes"
169 -            ;;
170 -        --enable-gtk)
171 -            gtk="yes"
172 -            ;;
173 -        --disable-gtk)
174 -            gtk="no"
175 -            ;;
176 -        --enable-shared)
177 -            shared="yes"
178 -            if [ $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" ] ; then
179 -                pic="yes"
180 -            fi
181 -            ;;
182 -        --enable-visualize)
183 -            LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
184 -            CFLAGS="$CFLAGS -DVISUALIZE=1"
185 -            vis="yes"
186 -            ;;
187 -        *)
188 -            echo "Unknown option $opt, ignored"
189 -            ;;
190 -    esac
191 -done
192 -
193  # autodetect options that weren't forced nor disabled
194  
195  libpthread=""
196 @@ -363,6 +374,9 @@
197  ASFLAGS=$ASFLAGS
198  GTK=$gtk
199  EXE=$EXE
200 +AR=$AR 
201 +AROPTS=$AROPTS 
202 +RANLIB=$RANLIB 
203  VIS=$vis
204  HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
205  DEVNULL=$DEVNULL
206 Index: Makefile
207 ===================================================================
208 --- Makefile    (revision 590)
209 +++ Makefile    (working copy)
210 @@ -66,8 +66,8 @@
211  default: $(DEP) x264$(EXE)
212  
213  libx264.a: .depend $(OBJS) $(OBJASM)
214 -       ar rc libx264.a $(OBJS) $(OBJASM)
215 -       ranlib libx264.a
216 +       $(AR) rc libx264.a $(OBJS) $(OBJASM)
217 +       $(RANLIB) libx264.a
218  
219  $(SONAME): .depend $(OBJS) $(OBJASM)
220         $(CC) -shared -o $@ $(OBJS) $(OBJASM) -Wl,-soname,$(SONAME) $(LDFLAGS)
221 @@ -138,14 +138,14 @@
222         rm -f config.mak config.h x264.pc
223         $(MAKE) -C gtk distclean
224  
225 -install: x264 $(SONAME)
226 +install: x264$(EXE)
227         install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
228         install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
229         install -m 644 x264.h $(DESTDIR)$(includedir)
230         install -m 644 libx264.a $(DESTDIR)$(libdir)
231         install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
232 -       install x264 $(DESTDIR)$(bindir)
233 -       ranlib $(DESTDIR)$(libdir)/libx264.a
234 +       install x264$(EXE) $(DESTDIR)$(bindir)
235 +       $(RANLIB) $(DESTDIR)$(libdir)/libx264.a
236         $(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.so)
237         $(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
238