Statistics
| Branch: | Revision:

ffmpeg / configure @ 24689bce

History | View | Annotate | Download (34.3 KB)

1 de6d9b64 Fabrice Bellard
#!/bin/sh
2 0f3cb305 Fabrice Bellard
#
3 5cbcf02c Fabrice Bellard
# ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
4 0f3cb305 Fabrice Bellard
#
5 cf9d24ad Dan Christiansen
6
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
7
cat << EOF
8
9
Usage: configure [options]
10
Options: [defaults in brackets after descriptions]
11
12
EOF
13
echo "Standard options:"
14
echo "  --help                   print this message"
15
echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
16
echo "  --mandir=DIR             man documentation in DIR [PREFIX/man]"
17
echo "  --enable-mp3lame         enable mp3 encoding via libmp3lame [default=no]"
18
echo "  --enable-vorbis          enable vorbis support via libvorbisenc [default=no]"
19
echo "  --enable-faad            enable faad support via libfaad [default=no]"
20
echo "  --enable-faadbin         build faad support with runtime linking [default=no]"
21
echo "  --enable-faac            enable faac support via libfaac [default=no]"
22 1ddadfa9 Adam Thayer
echo "  --enable-xvid            enable xvid support via xvidcore [default=no]"
23 cf9d24ad Dan Christiansen
echo "  --enable-mingw32         enable mingw32 native/cross windows compile"
24
echo "  --enable-a52             enable GPL'ed A52 support [default=no]"
25
echo "  --enable-a52bin          open liba52.so.0 at runtime [default=no]"
26 23c99253 Michael Niedermayer
echo "  --enable-dts             enable GPL'ed DTS support [default=no]"
27 cf9d24ad Dan Christiansen
echo "  --enable-pp              enable GPL'ed post processing support [default=no]"
28
echo "  --enable-shared-pp       use libpostproc.so [default=no]"
29
echo "  --enable-shared          build shared libraries [default=no]"
30
echo "  --enable-amr_nb          enable amr_nb float audio codec"
31
echo "  --enable-amr_nb-fixed    use fixed point for amr-nb codec"
32 64cba748 Michael Niedermayer
echo "  --enable-amr_wb          enable amr_wb float audio codec"
33 cf9d24ad Dan Christiansen
echo "  --enable-sunmlib         use Sun medialib [default=no]"
34 9c3d33d6 Michael Niedermayer
echo "  --enable-pthreads        use pthreads [default=no]"
35 b2e3c528 Michael Niedermayer
echo "  --enable-gpl             allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
36 cf9d24ad Dan Christiansen
echo ""
37
echo "Advanced options (experts only):"
38
echo "  --source-path=PATH       path of source code [$source_path]"
39
echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
40
echo "  --cc=CC                  use C compiler CC [$cc]"
41
echo "  --make=MAKE              use specified make [$make]"
42
echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
43
echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
44
echo "  --extra-libs=ELIBS       add ELIBS [$ELIBS]"
45
echo "  --cpu=CPU                force cpu to CPU  [$cpu]"
46
echo "  --tune=PROCESSOR         tune code for a particular CPU (may fails or misperforms on other CPUs)"
47
echo "  --powerpc-perf-enable    enable performance report on PPC (requires enabling PMC)"
48
echo "  --disable-mmx            disable mmx usage"
49
echo "  --disable-altivec        disable AltiVec usage"
50
echo "  --disable-audio-oss      disable OSS audio support [default=no]"
51
echo "  --disable-audio-beos     disable BeOS audio support [default=no]"
52
echo "  --disable-v4l            disable video4linux grabbing [default=no]"
53
echo "  --disable-dv1394         disable DV1394 grabbing [default=no]"
54
echo "  --disable-network        disable network support [default=no]"
55
echo "  --disable-zlib           disable zlib [default=no]"
56
echo "  --disable-simple_idct    disable simple IDCT routines [default=no]"
57
echo "  --disable-vhook          disable video hooking support"
58
echo "  --enable-gprof           enable profiling with gprof [$gprof]"
59
echo "  --disable-debug          disable debugging symbols"
60
echo "  --disable-opts           disable compiler optimizations"
61
echo "  --disable-mpegaudio-hp   faster (but less accurate)"
62
echo "                           mpegaudio decoding [default=no]"
63
echo "  --disable-ffserver       disable ffserver build"
64
echo "  --disable-ffplay         disable ffplay build"
65
echo "  --disable-risky          disables patent encumbered codecs"
66
echo "  --enable-small           optimize for size instead of speed"
67 da9b170c Michael Niedermayer
echo "  --enable-memalign-hack   emulate memalign, interferes with memory debuggers"
68 cf9d24ad Dan Christiansen
echo ""
69
echo "NOTE: The object files are build at the place where configure is launched"
70
exit 1
71
fi
72
73 0f3cb305 Fabrice Bellard
# set temporary file name
74 57514323 Zdenek Kabelac
if test ! -z "$TMPDIR" ; then
75 0f3cb305 Fabrice Bellard
    TMPDIR1="${TMPDIR}"
76 57514323 Zdenek Kabelac
elif test ! -z "$TEMPDIR" ; then
77 0f3cb305 Fabrice Bellard
    TMPDIR1="${TEMPDIR}"
78 3d204385 Nick Kurshev
else
79 0f3cb305 Fabrice Bellard
    TMPDIR1="/tmp"
80 3d204385 Nick Kurshev
fi
81
82 0f3cb305 Fabrice Bellard
TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
83
TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
84 f3ec2d46 Slavik Gnatenko
TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
85 0f3cb305 Fabrice Bellard
TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
86
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
87
88 de6d9b64 Fabrice Bellard
# default parameters
89
prefix="/usr/local"
90 23a65308 Fabrice Bellard
mandir=""
91 951bf3e6 Fabrice Bellard
bindir=""
92 0f3cb305 Fabrice Bellard
cross_prefix=""
93 de6d9b64 Fabrice Bellard
cc="gcc"
94
ar="ar"
95 be7109c1 Michael Niedermayer
ranlib="ranlib"
96 4a908fbc Alex Beregszaszi
make="make"
97 0f3cb305 Fabrice Bellard
strip="strip"
98 de6d9b64 Fabrice Bellard
cpu=`uname -m`
99 a4adb608 Michael Niedermayer
tune="generic"
100 e45a2872 Romain Dolbeau
powerpc_perf="no"
101 0f3cb305 Fabrice Bellard
mmx="default"
102 ab6c65f6 Brian Foley
altivec="default"
103 d46aba26 Leon van Stuivenberg
mmi="default"
104 de6d9b64 Fabrice Bellard
case "$cpu" in
105 ef0bc4c9 François Revol
  i386|i486|i586|i686|i86pc|BePC)
106 de6d9b64 Fabrice Bellard
    cpu="x86"
107
  ;;
108 93caefc7 Alex Beregszaszi
  # armv4l is a subset of armv5tel
109
  armv4l|armv5tel)
110 6ed7422a Fabrice Bellard
    cpu="armv4l"
111
  ;;
112 91d1f1a4 Nick Kurshev
  alpha)
113
    cpu="alpha"
114
  ;;
115 a43bd1d7 Heliodoro Tammaro
  "Power Macintosh"|ppc)
116 90cee0c3 Michael Niedermayer
    cpu="powerpc"
117
  ;;
118 d46aba26 Leon van Stuivenberg
  mips)
119
    cpu="mips"
120
  ;;
121 bb476ff3 James Morrison
  sun4u|sparc64)
122 a7beab73 Roman Shaposhnik
    cpu="sparc64"
123
  ;;
124 bb476ff3 James Morrison
  sparc)
125
    cpu="sparc"
126
  ;;
127 bdb2e37c Alex Beregszaszi
  sh4)
128
    cpu="sh4"
129
  ;;
130 de6d9b64 Fabrice Bellard
  *)
131 0f3cb305 Fabrice Bellard
    cpu="unknown"
132 de6d9b64 Fabrice Bellard
  ;;
133
esac
134
gprof="no"
135 5cbcf02c Fabrice Bellard
v4l="yes"
136
audio_oss="yes"
137 dfdfa47c François Revol
audio_beos="no"
138 8aa3ee32 Max Krasnyansky
dv1394="yes"
139 5cbcf02c Fabrice Bellard
network="yes"
140 0147f198 François Revol
zlib="yes"
141 a6741398 Juanjo
mp3lame="no"
142 81e0d0b4 Mark Hills
vorbis="no"
143 0fc50e58 Zdenek Kabelac
faad="no"
144
faadbin="no"
145 29d48296 Michael Niedermayer
faac="no"
146 1ddadfa9 Adam Thayer
xvid="no"
147 ba9261e5 Michael Niedermayer
a52="no"
148 57514323 Zdenek Kabelac
a52bin="no"
149 23c99253 Michael Niedermayer
dts="no"
150 ba9261e5 Michael Niedermayer
pp="no"
151 bba9b16c Michael Niedermayer
shared_pp="no"
152 732d9245 Bill Eldridge
mingw32="no"
153 3f027ca7 Felix Bünemann
cygwin="no"
154 f3ec2d46 Slavik Gnatenko
os2="no"
155 83286d2a Zdenek Kabelac
lshared="no"
156 cddf3f45 Glenn Maynard
optimize="yes"
157
debug="yes"
158 ef0bc4c9 François Revol
extralibs="-lm"
159 c02dbee1 Michael Niedermayer
simpleidct="yes"
160 0f3cb305 Fabrice Bellard
bigendian="no"
161 7f965c1c Chris Flerackers
inttypes="yes"
162 b5c950c4 Michael Niedermayer
emu_fast_int="no"
163 a8721c09 Fabrice Bellard
vhook="default"
164 adbc0510 Philip Gladstone
dlfcn="no"
165
dlopen="no"
166 1eb2212e Fabrice Bellard
mpegaudio_hp="yes"
167 e1707f52 Michael Niedermayer
SHFLAGS=-shared
168 26b35efb François Revol
netserver="no"
169 4baca069 Philip Gladstone
need_inet_aton="no"
170 8154d2e0 Fabrice Bellard
ffserver="yes"
171 a86b921c Fabrice Bellard
ffplay="yes"
172 4baca069 Philip Gladstone
LDFLAGS=-Wl,--warn-common
173
FFSLDFLAGS=-Wl,-E
174 f3ec2d46 Slavik Gnatenko
LIBPREF="lib"
175
LIBSUF=".a"
176
SLIBPREF="lib"
177
SLIBSUF=".so"
178 951bf3e6 Fabrice Bellard
EXESUF=""
179 1d0d55da Michael Niedermayer
risky="yes"
180 891f64b3 joca@rixmail.se
amr_nb="no"
181 d663a1fd Michael Niedermayer
amr_wb="no"
182 bc634f6f Zdenek Kabelac
amr_nb_fixed="no"
183 f80f7964 Roman Shaposhnik
sunmlib="no"
184 9c3d33d6 Michael Niedermayer
pthreads="no"
185 b2e3c528 Michael Niedermayer
gpl="no"
186 da9b170c Michael Niedermayer
memalignhack="no"
187 ef0bc4c9 François Revol
188
# OS specific
189
targetos=`uname -s`
190
case $targetos in
191
BeOS)
192
prefix="/boot/home/config"
193
# helps building libavcodec
194 cddf3f45 Glenn Maynard
CFLAGS="-DPIC -fomit-frame-pointer"
195 31ba0b4d François Revol
# 3 gcc releases known for BeOS, each with ugly bugs
196 b2924696 Roman Shaposhnik
gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
197 31ba0b4d François Revol
case "$gcc_version" in
198
2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
199
mmx="no"
200
;;
201
*20010315*) echo "BeBits gcc"
202
CFLAGS="$CFLAGS -fno-expensive-optimizations"
203
;;
204
esac
205 e1707f52 Michael Niedermayer
SHFLAGS=-nostart
206
# disable linux things
207
audio_oss="no"
208 5cbcf02c Fabrice Bellard
v4l="no"
209 8aa3ee32 Max Krasnyansky
dv1394="no"
210 dfdfa47c François Revol
# enable beos things
211
audio_beos="yes"
212 ef0bc4c9 François Revol
# no need for libm, but the inet stuff
213
# Check for BONE
214
if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
215
extralibs="-lbind -lsocket"
216
else
217 26b35efb François Revol
netserver="yes"
218 4baca069 Philip Gladstone
need_inet_aton="yes"
219 26b35efb François Revol
extralibs="-lnet"
220 ef0bc4c9 François Revol
fi ;;
221 4baca069 Philip Gladstone
SunOS)
222
v4l="no"
223
audio_oss="no"
224 8aa3ee32 Max Krasnyansky
dv1394="no"
225 4baca069 Philip Gladstone
make="gmake"
226
LDFLAGS=""
227
FFSLDFLAGS=""
228
need_inet_aton="yes"
229
extralibs="$extralibs -lsocket -lnsl"
230
;;
231 9c938e77 Philip Gladstone
FreeBSD)
232
v4l="no"
233
audio_oss="yes"
234 8aa3ee32 Max Krasnyansky
dv1394="no"
235 9c938e77 Philip Gladstone
make="gmake"
236 12043e1d Steven M. Schultz
CFLAGS="-pthread"
237
LDFLAGS="$LDFLAGS -export-dynamic -pthread"
238 9c938e77 Philip Gladstone
;;
239 4a908fbc Alex Beregszaszi
BSD/OS)
240 5cbcf02c Fabrice Bellard
v4l="no"
241 6063bce7 Fabrice Bellard
audio_oss="yes"
242 8aa3ee32 Max Krasnyansky
dv1394="no"
243 4a908fbc Alex Beregszaszi
extralibs="-lpoll -lgnugetopt -lm"
244
make="gmake"
245
;;
246 90cee0c3 Michael Niedermayer
Darwin)
247 a43bd1d7 Heliodoro Tammaro
cc="cc"
248 90cee0c3 Michael Niedermayer
v4l="no"
249
audio_oss="no"
250 8aa3ee32 Max Krasnyansky
dv1394="no"
251 d3b15036 Steven M. Schultz
ffserver="no"
252 a43bd1d7 Heliodoro Tammaro
SHFLAGS="-dynamiclib"
253 90cee0c3 Michael Niedermayer
extralibs=""
254 a43bd1d7 Heliodoro Tammaro
darwin="yes"
255 47930f09 Philip Gladstone
strip="strip -x"
256 4850b2d2 Michael Niedermayer
LDFLAGS="-Wl,-d"
257 4baca069 Philip Gladstone
FFSLDFLAGS=-Wl,-bind_at_load
258 90cee0c3 Michael Niedermayer
;;
259 732d9245 Bill Eldridge
MINGW32*)
260 951bf3e6 Fabrice Bellard
# Note: the rest of the mingw32 config is done afterwards as mingw32
261
# can be forced on command line for linux cross compilation
262 732d9245 Bill Eldridge
mingw32="yes"
263
;;
264 3f027ca7 Felix Bünemann
CYGWIN*)
265
v4l="no"
266
audio_oss="yes"
267 8aa3ee32 Max Krasnyansky
dv1394="no"
268 3f027ca7 Felix Bünemann
extralibs=""
269
cygwin="yes"
270
test -f /usr/include/inttypes.h || \
271
test -f /usr/local/include/inttypes.h || \
272
echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
273 24689bce Michael Niedermayer
     "/usr/local/include/inttypes.h !!!"
274 3f027ca7 Felix Bünemann
;;
275 b55e4ef4 Philip Gladstone
Linux)
276 4baca069 Philip Gladstone
LDFLAGS="$LDFLAGS -rdynamic"
277 b55e4ef4 Philip Gladstone
;;
278 99614dd4 Michel Bardiaux
IRIX*)
279
ranlib="echo ignoring ranlib"
280
v4l="no"
281
audio_oss="no"
282
make="gmake"
283
;;
284 f3ec2d46 Slavik Gnatenko
OS/2)
285
TMPE=$TMPE".exe"
286 69db4e10 Slavik Gnatenko
ar="emxomfar -p64"
287
ranlib="echo ignoring ranlib"
288
strip="echo ignoring strip"
289 cddf3f45 Glenn Maynard
CFLAGS="-Zomf"
290 69db4e10 Slavik Gnatenko
LDFLAGS="-Zomf -Zstack 16384 -s"
291 f3ec2d46 Slavik Gnatenko
SHFLAGS=""
292
FFSLDFLAGS=""
293
LIBPREF=""
294
LIBSUF=".lib"
295
SLIBPREF=""
296
SLIBSUF=".dll"
297 951bf3e6 Fabrice Bellard
EXESUF=".exe"
298 f3ec2d46 Slavik Gnatenko
extralibs=""
299
v4l="no"
300
audio_oss="no"
301 8aa3ee32 Max Krasnyansky
dv1394="no"
302 f3ec2d46 Slavik Gnatenko
network="no"
303
ffserver="no"
304
os2="yes"
305
;;
306 ef0bc4c9 François Revol
*) ;;
307
esac
308 de6d9b64 Fabrice Bellard
309 6852ac95 Romain Dolbeau
# From mplayer configure. We need TARGET_OS available
310
# to the Makefile, so it can distinguish between flavors
311
# of AltiVec on PowerPC
312
TARGET_OS=`( uname -s ) 2>&1`
313
  case "$TARGET_OS" in
314
  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
315
    ;;
316
  IRIX*)
317
    TARGET_OS=IRIX
318
    ;;
319
  HP-UX*)
320
    TARGET_OS=HP-UX
321
    ;;
322
  [cC][yY][gG][wW][iI][nN]*)
323
    TARGET_OS=CYGWIN
324
    ;;
325
  *)
326
    TARGET_OS="$TARGET_OS-UNKNOWN"
327
    ;;
328
  esac
329
330 0f3cb305 Fabrice Bellard
# find source path
331
# XXX: we assume an absolute path is given when launching configure, 
332
# except in './configure' case.
333 586bc755 Roman Shaposhnik
source_path="`echo $0 | sed -e 's#/configure##'`"
334 0f3cb305 Fabrice Bellard
source_path_used="yes"
335
if test -z "$source_path" -o "$source_path" = "." ; then
336
    source_path=`pwd`
337
    source_path_used="no"
338 de6d9b64 Fabrice Bellard
fi
339
340
for opt do
341
  case "$opt" in
342
  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
343
  ;;
344 23a65308 Fabrice Bellard
  --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
345
  ;;
346 0f3cb305 Fabrice Bellard
  --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
347
  ;;
348
  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
349
  ;;
350 de6d9b64 Fabrice Bellard
  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
351
  ;;
352 4a908fbc Alex Beregszaszi
  --make=*) make=`echo $opt | cut -d '=' -f 2`
353
  ;;
354 0f3cb305 Fabrice Bellard
  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
355
  ;;
356
  --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
357
  ;;
358
  --extra-libs=*) extralibs=${opt#--extra-libs=}
359
  ;;
360 de6d9b64 Fabrice Bellard
  --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
361
  ;;
362 a4adb608 Michael Niedermayer
  --tune=*) tune=`echo $opt | cut -d '=' -f 2`
363
  ;;
364 e45a2872 Romain Dolbeau
  --powerpc-perf-enable) powerpc_perf="yes"
365
  ;;
366 de6d9b64 Fabrice Bellard
  --disable-mmx) mmx="no"
367
  ;;
368 ab6c65f6 Brian Foley
  --disable-altivec) altivec="no"
369
  ;;
370 de6d9b64 Fabrice Bellard
  --enable-gprof) gprof="yes"
371
  ;;
372 5cbcf02c Fabrice Bellard
  --disable-v4l) v4l="no"
373
  ;;
374
  --disable-audio-oss) audio_oss="no"
375
  ;;
376 dfdfa47c François Revol
  --disable-audio-beos) audio_beos="no"
377
  ;;
378 8aa3ee32 Max Krasnyansky
  --disable-dv1394) dv1394="no"
379
  ;;
380 ffc0ef96 Luca Abeni
  --disable-network) network="no"; ffserver="no"
381 5cbcf02c Fabrice Bellard
  ;;
382 0147f198 François Revol
  --disable-zlib) zlib="no"
383
  ;;
384 ba9261e5 Michael Niedermayer
  --enable-a52) a52="yes"
385 6ed7422a Fabrice Bellard
  ;;
386 9c938e77 Philip Gladstone
  --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
387 57514323 Zdenek Kabelac
  ;;
388 23c99253 Michael Niedermayer
  --enable-dts) dts="yes" ; extralibs="$extralibs -ldts"
389
  ;;
390 ba9261e5 Michael Niedermayer
  --enable-pp) pp="yes"
391 bba9b16c Michael Niedermayer
  ;;
392
  --enable-shared-pp) shared_pp="yes"
393
  ;;
394 a6741398 Juanjo
  --enable-mp3lame) mp3lame="yes"
395
  ;;
396 81e0d0b4 Mark Hills
  --enable-vorbis) vorbis="yes"
397
  ;;
398 445ad18d Zdenek Kabelac
  --enable-faad) faad="yes"
399
  ;;
400
  --enable-faadbin) faadbin="yes"
401
  ;;
402 29d48296 Michael Niedermayer
  --enable-faac) faac="yes"
403
  ;;
404 1ddadfa9 Adam Thayer
  --enable-xvid) xvid="yes"
405
  ;;
406 68892110 Philip Gladstone
  --disable-vhook) vhook="no"
407
  ;;
408 c02dbee1 Michael Niedermayer
  --disable-simple_idct) simpleidct="no"
409 045ed63f Zdenek Kabelac
  ;;
410 732d9245 Bill Eldridge
  --enable-mingw32) mingw32="yes"
411
  ;;
412 83286d2a Zdenek Kabelac
  --enable-shared) lshared="yes"
413 0319c531 Nick Kurshev
  ;;
414 cddf3f45 Glenn Maynard
  --disable-debug) debug="no"
415
  ;;
416
  --disable-opts) optimize="no"
417
  ;;
418 1eb2212e Fabrice Bellard
  --disable-mpegaudio-hp) mpegaudio_hp="no"
419
  ;;
420 8154d2e0 Fabrice Bellard
  --disable-ffserver) ffserver="no"
421
  ;;
422 a86b921c Fabrice Bellard
  --disable-ffplay) ffplay="no"
423
  ;;
424 1d0d55da Michael Niedermayer
  --disable-risky) risky="no"
425
  ;;
426 cddf3f45 Glenn Maynard
  --enable-small) optimize="small"
427 553a6284 Michael Niedermayer
  ;;
428 891f64b3 joca@rixmail.se
  --enable-amr_nb) amr_nb="yes"
429
  ;;
430 bc634f6f Zdenek Kabelac
  --enable-amr_nb-fixed) amr_nb_fixed="yes"
431
  ;;
432 64cba748 Michael Niedermayer
  --enable-amr_wb) amr_wb="yes"
433
  ;; 
434 f80f7964 Roman Shaposhnik
  --enable-sunmlib) sunmlib="yes"
435
  ;;
436 9c3d33d6 Michael Niedermayer
  --enable-pthreads) pthreads="yes"
437
  ;;
438 b2e3c528 Michael Niedermayer
  --enable-gpl) gpl="yes"
439
  ;;
440 da9b170c Michael Niedermayer
  --enable-memalign-hack) memalignhack="yes"
441
  ;;
442 de6d9b64 Fabrice Bellard
  esac
443
done
444
445 b2e3c528 Michael Niedermayer
if test "$gpl" != "yes"; then
446
    if test "$pp" != "no" -o "$shared_pp" != "no"; then
447
        echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
448
        fail="yes"
449
    fi
450
451
    if test "$a52" != "no" -o "$a52bin" != "no"; then
452
        echo "liba52 is under GPL and --enable-gpl is not specified"
453
        fail="yes"
454
    fi
455 23c99253 Michael Niedermayer
456 1ddadfa9 Adam Thayer
    if test "$xvid" != "no"; then
457
        echo "libxvidcore is under GPL and --enable-gpl is not specified"
458
        fail="yes"
459
    fi
460
461 23c99253 Michael Niedermayer
    if test "$dts" != "no"; then
462
        echo "libdts is under GPL and --enable-gpl is not specified"
463
        fail="yes"
464
    fi
465 b2e3c528 Michael Niedermayer
    
466
    if test "$faad" != "no" -o "$faadbin" != "no"; then
467
        cat > $TMPC << EOF
468
            #include <faad.h>
469
            int main( void ) { return 0; }
470
EOF
471
    
472
        if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
473
            cat > $TMPC << EOF
474
                #include <faad.h>
475
                #ifndef FAAD2_VERSION
476
                ok faad1
477
                #endif
478
                int main( void ) { return 0; }
479
EOF
480
            if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
481
                echo "faad2 is under GPL and --enable-gpl is not specified"
482
                fail="yes"
483
            fi
484
        else
485
            faad="no"
486
            faadbin="no"
487
            echo "faad test failed"
488
        fi
489
    fi
490
   
491
492 a18b5183 Michael Niedermayer
    if test "$fail" = "yes"; then
493 b2e3c528 Michael Niedermayer
        exit 1
494
    fi
495
fi
496
497 0f3cb305 Fabrice Bellard
# compute mmx state
498
if test $mmx = "default"; then
499
    if test $cpu = "x86"; then
500
        mmx="yes"
501
    else
502
        mmx="no"
503
    fi
504
fi
505
506 cf9d24ad Dan Christiansen
#Darwin CC versions
507 75388c74 Michael Niedermayer
needmdynamicnopic="no"
508 cf9d24ad Dan Christiansen
if test $targetos = Darwin; then
509 b2924696 Roman Shaposhnik
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
510 747a0554 Tinic Uro
	CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
511 cf9d24ad Dan Christiansen
    else
512 b2924696 Roman Shaposhnik
	gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
513 cf9d24ad Dan Christiansen
	case "$gcc_version" in
514
	    *2.95*) 
515 747a0554 Tinic Uro
		CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
516 cf9d24ad Dan Christiansen
		;;
517 75388c74 Michael Niedermayer
	    *3.*)
518 747a0554 Tinic Uro
		CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
519 75388c74 Michael Niedermayer
		if test "$lshared" = no; then
520
		   needmdynamicnopic="yes"
521
		fi
522 cf9d24ad Dan Christiansen
		;;
523
	    *)
524 747a0554 Tinic Uro
		CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
525 75388c74 Michael Niedermayer
		if test "$lshared" = no; then
526
		   needmdynamicnopic="yes"
527
		fi
528 cf9d24ad Dan Christiansen
		;;
529
	esac
530
    fi
531
fi
532
533 ab6c65f6 Brian Foley
# Can only do AltiVec on PowerPC
534
if test $altivec = "default"; then
535
    if test $cpu = "powerpc"; then
536
        altivec="yes"
537
    else
538
        altivec="no"
539
    fi
540
fi
541
542 a4adb608 Michael Niedermayer
# Add processor-specific flags
543
TUNECPU="generic"
544 9007f514 Romain Dolbeau
POWERPCMODE="32bits"
545 a4adb608 Michael Niedermayer
if test $tune != "generic"; then
546
    case $tune in
547
	601|ppc601|PowerPC601)
548
	    CFLAGS="$CFLAGS -mcpu=601"
549
	    if test $altivec = "yes"; then
550
		echo "WARNING: tuning for PPC601 but altivec enabled !";
551
	    fi
552
	    TUNECPU=ppc601
553
	;;
554
	603*|ppc603*|PowerPC603*)
555
	    CFLAGS="$CFLAGS -mcpu=603"
556
	    if test $altivec = "yes"; then
557
		echo "WARNING: tuning for PPC603 but altivec enabled !";
558
	    fi
559
	    TUNECPU=ppc603
560
	;;
561
	604*|ppc604*|PowerPC604*)
562
	    CFLAGS="$CFLAGS -mcpu=604"
563
	    if test $altivec = "yes"; then
564
		echo "WARNING: tuning for PPC604 but altivec enabled !";
565
	    fi
566
	    TUNECPU=ppc604
567
	;;
568 8d6625b6 Dan Christiansen
	G3|g3|75*|ppc75*|PowerPC75*)
569 fe0f2a97 Dan Christiansen
	    CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
570 a4adb608 Michael Niedermayer
	    if test $altivec = "yes"; then
571
		echo "WARNING: tuning for PPC75x but altivec enabled !";
572
	    fi
573
	    TUNECPU=ppc750
574
	;;
575 8d6625b6 Dan Christiansen
	G4|g4|745*|ppc745*|PowerPC745*)
576 fe0f2a97 Dan Christiansen
	    CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
577 3efd4952 Romain Dolbeau
	    if test $altivec = "no"; then
578
		echo "WARNING: tuning for PPC745x but altivec disabled !";
579
	    fi
580
	    TUNECPU=ppc7450
581
	;;
582
	74*|ppc74*|PowerPC74*)
583 fe0f2a97 Dan Christiansen
	    CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
584 a4adb608 Michael Niedermayer
	    if test $altivec = "no"; then
585
		echo "WARNING: tuning for PPC74xx but altivec disabled !";
586
	    fi
587 e45a2872 Romain Dolbeau
	    TUNECPU=ppc7400
588 a4adb608 Michael Niedermayer
	;;
589 8d6625b6 Dan Christiansen
	G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
590 9007f514 Romain Dolbeau
	    CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
591 a4adb608 Michael Niedermayer
	    if test $altivec = "no"; then
592
		echo "WARNING: tuning for PPC970 but altivec disabled !";
593
	    fi
594
	    TUNECPU=ppc970
595 9007f514 Romain Dolbeau
            POWERPCMODE="64bits"
596 a4adb608 Michael Niedermayer
	;;
597
	*)
598
	echo "WARNING: unknown CPU "$tune", ignored"
599
	;;
600
    esac
601
fi
602
603 cf9d24ad Dan Christiansen
# AltiVec flags: The FSF version of GCC differs from the Apple version 
604 b6e52719 Magnus Damm
if test $cpu = "powerpc"; then
605
    if test $altivec = "yes"; then
606 b2924696 Roman Shaposhnik
        if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
607 b6e52719 Magnus Damm
            CFLAGS="$CFLAGS -faltivec"
608
        else
609
            CFLAGS="$CFLAGS -maltivec -mabi=altivec"
610
        fi
611
    fi
612
fi
613
614 a9a07762 Michael Niedermayer
# See if we have <altivec.h>
615
cat > $TMPC << EOF
616
#include <altivec.h>
617
int main( void ) { return 0; }
618
EOF
619
620
_altivec_h="no"
621 b6e52719 Magnus Damm
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
622 a9a07762 Michael Niedermayer
_altivec_h="yes"
623
fi
624
625 ab6c65f6 Brian Foley
# See does our compiler support Motorola AltiVec C API
626
if test $altivec = "yes"; then
627 a9a07762 Michael Niedermayer
if test $_altivec_h = "yes"; then
628 ab6c65f6 Brian Foley
cat > $TMPC << EOF
629 a9a07762 Michael Niedermayer
#include <altivec.h>
630 ab6c65f6 Brian Foley
int main(void) {
631
    vector signed int v1, v2, v3;
632
    v1 = vec_add(v2,v3);
633
    return 0;
634
}
635
EOF
636 a9a07762 Michael Niedermayer
else
637
cat > $TMPC << EOF
638
int main(void) {
639
    vector signed int v1, v2, v3;
640
    v1 = vec_add(v2,v3);
641
    return 0;
642
}
643
EOF
644
fi
645 b6e52719 Magnus Damm
$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
646 ab6c65f6 Brian Foley
fi
647
648 d46aba26 Leon van Stuivenberg
# Can only do mmi on mips
649
if test $mmi = "default"; then
650
    if test $cpu = "mips"; then
651
        mmi="yes"
652
    else
653
        mmi="no"
654
    fi
655
fi
656
657
# See does our compiler support mmi
658
if test $mmi = "yes"; then
659
cat > $TMPC << EOF
660
int main(void) {
661
    __asm__ ("lq \$2, 0(\$2)");
662
    return 0;
663
}
664
EOF
665 f3ec2d46 Slavik Gnatenko
$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
666 d46aba26 Leon van Stuivenberg
fi
667
668 732d9245 Bill Eldridge
if test "$mingw32" = "yes" ; then
669
    v4l="no"
670
    audio_oss="no"
671 8aa3ee32 Max Krasnyansky
    dv1394="no"
672 951bf3e6 Fabrice Bellard
    ffserver="no"
673 732d9245 Bill Eldridge
    network="no"
674 951bf3e6 Fabrice Bellard
    LIBPREF=""
675
    LIBSUF=".lib"
676
    SLIBPREF=""
677
    SLIBSUF=".dll"
678
    EXESUF=".exe"
679
    prefix="/c/Program Files/FFmpeg"
680
    bindir="$prefix"
681 732d9245 Bill Eldridge
fi
682
683 0f3cb305 Fabrice Bellard
cc="${cross_prefix}${cc}"
684
ar="${cross_prefix}${ar}"
685 be7109c1 Michael Niedermayer
ranlib="${cross_prefix}${ranlib}"
686 0f3cb305 Fabrice Bellard
strip="${cross_prefix}${strip}"
687
688 487a54d7 Fabrice Bellard
if test -z "$cross_prefix" ; then
689
690 3d204385 Nick Kurshev
# ---
691 a3999908 Michael Niedermayer
# big/little endian test
692
cat > $TMPC << EOF
693
#include <inttypes.h>
694
int main(int argc, char ** argv){
695
	volatile uint32_t i=0x01234567;
696
	return (*((uint8_t*)(&i))) == 0x67;
697
}
698
EOF
699
700 f3ec2d46 Slavik Gnatenko
if $cc -o $TMPE $TMPC 2>/dev/null ; then
701
$TMPE && bigendian="yes"
702 a3999908 Michael Niedermayer
else
703
echo big/little test failed
704
fi
705
706 487a54d7 Fabrice Bellard
else
707
708
# if cross compiling, cannot launch a program, so make a static guess
709
if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
710
    bigendian="yes"
711
fi
712
713
fi
714
715 a3999908 Michael Niedermayer
# ---
716 7f965c1c Chris Flerackers
# *inttypes.h* test
717
cat > $TMPC << EOF
718
#include <inttypes.h>
719
int main(int argc, char ** argv){
720
    return 0;
721
}
722
EOF
723
724
$cc -o $TMPE $TMPC 2>/dev/null || inttypes="no"
725
726
# ---
727 b5c950c4 Michael Niedermayer
# *int_fast* test
728
cat > $TMPC << EOF
729
#include <inttypes.h>
730
int main(int argc, char ** argv){
731
	volatile uint_fast64_t i=0x01234567;
732
	return 0;
733
}
734
EOF
735
736
$cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
737
738
# ---
739 3d204385 Nick Kurshev
# check availability of some header files
740
741
cat > $TMPC << EOF
742
#include <malloc.h>
743
int main( void ) { return 0; }
744
EOF
745
746
_memalign=no
747
_malloc_h=no
748 f3ec2d46 Slavik Gnatenko
if $cc -o $TMPE $TMPC 2> /dev/null ; then
749 3d204385 Nick Kurshev
_malloc_h=yes
750
_memalign=yes
751
# check for memalign - atmos
752
cat > $TMPC << EOF
753
#include <malloc.h>
754
int main ( void ) {
755
char *string = NULL;
756
string = memalign(64, sizeof(char));
757
return 0;
758
}
759
EOF
760 f3ec2d46 Slavik Gnatenko
$cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
761 3d204385 Nick Kurshev
fi
762
763 68892110 Philip Gladstone
cat > $TMPC << EOF
764 5e4639e2 Glenn Maynard
#include <time.h>
765
int main( void ) { localtime_r(NULL, NULL); }
766
EOF
767
768
localtime_r=no
769
if $cc -o $TMPE $TMPC 2> /dev/null ; then
770
  localtime_r=yes
771
fi
772
773 0147f198 François Revol
if test "$zlib" = "yes"; then
774
# check for zlib - mmu_man
775
cat > $TMPC << EOF
776
#include <zlib.h>
777
int main ( void ) {
778
if (zlibVersion() != ZLIB_VERSION)
779
   puts("zlib version differs !!!");
780
   return 1;
781
return 0;
782
}
783
EOF
784 16806499 Michael Niedermayer
$cc $CFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
785 f3ec2d46 Slavik Gnatenko
# $TMPE 2> /dev/null > /dev/null || zlib="no"
786 0147f198 François Revol
# XXX: more tests needed - runtime test
787
fi
788
if test "$zlib" = "yes"; then
789
extralibs="$extralibs -lz"
790
fi
791
792 95e2ce4a Michael Niedermayer
# test for lrintf in math.h
793
cat > $TMPC << EOF
794
#define _ISOC9X_SOURCE  1
795
#include <math.h>
796
int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
797
EOF
798
799
have_lrintf="no"
800 f3ec2d46 Slavik Gnatenko
if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
801 95e2ce4a Michael Niedermayer
  have_lrintf="yes"
802 f3ec2d46 Slavik Gnatenko
  $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
803 95e2ce4a Michael Niedermayer
fi
804
805 c13e1abd Falk Hüffner
_restrict=
806
for restrict_keyword in restrict __restrict__ __restrict; do
807
  echo "void foo(char * $restrict_keyword p);" > $TMPC
808
  if $cc -c -o $TMPO $TMPC 2> /dev/null; then
809
    _restrict=$restrict_keyword
810
    break;
811
  fi
812
done
813
814 52b41d7f Fabrice Bellard
# test gcc version to see if vector builtins can be used
815
# currently only used on i386 for MMX builtins
816
cat > $TMPC << EOF
817
int main(void) { 
818
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
819
return 0;
820
#else
821
#error no vector builtins
822
#endif
823
}
824
EOF
825
826
builtin_vector=no
827
if $cc -o $TMPO $TMPC 2> /dev/null ; then
828
  builtin_vector=yes
829 a8721c09 Fabrice Bellard
fi
830
831
# dlopen/dlfcn.h probing
832
833
cat > $TMPC << EOF
834
#include <dlfcn.h>
835
int main( void ) { return (int) dlopen("foo", 0); }
836
EOF
837
838
ldl=-ldl
839
840 cf9d24ad Dan Christiansen
if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
841 a8721c09 Fabrice Bellard
dlfcn=yes
842
dlopen=yes
843
fi
844
845 cf9d24ad Dan Christiansen
if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
846 a8721c09 Fabrice Bellard
dlfcn=yes
847
dlopen=yes
848
ldl=""
849
fi
850
851
cat > $TMPC << EOF
852
int main( void ) { return (int) dlopen("foo", 0); }
853
EOF
854
855 cf9d24ad Dan Christiansen
if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1  ; then
856 a8721c09 Fabrice Bellard
dlopen=yes
857
fi
858
859 cf9d24ad Dan Christiansen
if $cc -o $TMPE $TMPC > /dev/null 2>&1  ; then
860 a8721c09 Fabrice Bellard
dlopen=yes
861
ldl=""
862
fi
863
864
if test "$vhook" = "default" ; then
865
  vhook="$dlopen"
866
fi
867
868 a86b921c Fabrice Bellard
##########################################
869
# imlib probe
870
871 a8721c09 Fabrice Bellard
cat > $TMPC << EOF
872
#include <X11/Xlib.h>
873
#include <Imlib2.h>
874
int main( void ) { return (int) imlib_load_font("foo"); }
875
EOF
876
877
imlib2=no
878 7802d373 Michael Niedermayer
if $cc -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1  ; then
879 a8721c09 Fabrice Bellard
imlib2=yes
880 52b41d7f Fabrice Bellard
fi
881
882 a86b921c Fabrice Bellard
##########################################
883
# freetype probe
884
885 04511d53 Philip Gladstone
cat > $TMPC << EOF
886
#include <ft2build.h>
887
int main( void ) { return (int) FT_Init_FreeType(0); }
888
EOF
889
890
freetype2=no
891 69db4e10 Slavik Gnatenko
if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
892 e2a3cd59 Roman Shaposhnik
  if (freetype-config --version) >/dev/null 2>&1 ; then
893 cf9d24ad Dan Christiansen
    if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs`  > /dev/null 2>&1 ; then
894 dee076fc François Revol
      freetype2=yes
895 04511d53 Philip Gladstone
    fi
896 dee076fc François Revol
  fi
897 04511d53 Philip Gladstone
fi
898
899 a86b921c Fabrice Bellard
##########################################
900
# SDL probe
901
902
cat > $TMPC << EOF
903
#include <SDL.h>
904 31319a8c Fabrice Bellard
#undef main /* We don't want SDL to override our main() */
905 a86b921c Fabrice Bellard
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
906
EOF
907
908
sdl_too_old=no
909
sdl=no
910 e2a3cd59 Roman Shaposhnik
if (sdl-config --version) >/dev/null 2>&1 ; then
911 cf9d24ad Dan Christiansen
if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs`  > /dev/null 2>&1  ; then
912 a86b921c Fabrice Bellard
_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
913
if test "$_sdlversion" -lt 121 ; then
914
sdl_too_old=yes
915
else
916
sdl=yes
917
fi
918
fi
919 c3f6b472 Michael Niedermayer
fi
920 a86b921c Fabrice Bellard
921 146ea952 Nicolas Boos
##########################################
922
# texi2html probe
923
924
texi2html=no
925 e2a3cd59 Roman Shaposhnik
if (texi2html -version) >/dev/null 2>&1; then
926 146ea952 Nicolas Boos
texi2html=yes
927
fi
928
929 b2924696 Roman Shaposhnik
case "`$cc -v 2>&1 | grep version`" in
930 cf9d24ad Dan Christiansen
    *gcc*)
931
	CFLAGS="-Wall $CFLAGS"
932
	;;
933
    *)
934
	;;
935
esac
936
937 94a3401e Fabrice Bellard
if test "$sdl" = "no" ; then
938
   ffplay=no
939
fi
940
941 cddf3f45 Glenn Maynard
if test "$debug" = "yes"; then
942 7906085f Falk Hüffner
	CFLAGS="-g $CFLAGS"
943 cddf3f45 Glenn Maynard
fi
944
945
if test "$optimize" = "small"; then
946 98ca7790 Michael Niedermayer
#  CFLAGS=${CFLAGS//-O3/-Os}
947 553a6284 Michael Niedermayer
  CFLAGS="$CFLAGS -Os"
948
fi
949
950 cddf3f45 Glenn Maynard
if test "$optimize" = "yes"; then
951 b2924696 Roman Shaposhnik
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
952 cf9d24ad Dan Christiansen
	CFLAGS="$CFLAGS -O5"
953
	LDFLAGS="$LDFLAGS -O5"
954
    else
955 7906085f Falk Hüffner
	CFLAGS="-O3 $CFLAGS"
956 cf9d24ad Dan Christiansen
    fi
957 cddf3f45 Glenn Maynard
fi
958
959 951bf3e6 Fabrice Bellard
if test x"$bindir" = x""; then
960
bindir="${prefix}/bin"
961
fi
962
963 23a65308 Fabrice Bellard
if test x"$mandir" = x""; then
964
mandir="${prefix}/man"
965
fi
966
967 de6d9b64 Fabrice Bellard
echo "Install prefix   $prefix"
968 0f3cb305 Fabrice Bellard
echo "Source path      $source_path"
969 de6d9b64 Fabrice Bellard
echo "C compiler       $cc"
970 4a908fbc Alex Beregszaszi
echo "make             $make"
971 a4adb608 Michael Niedermayer
echo "CPU              $cpu ($tune)"
972 0f3cb305 Fabrice Bellard
echo "Big Endian       $bigendian"
973 7f965c1c Chris Flerackers
echo "inttypes.h       $inttypes"
974 b5c950c4 Michael Niedermayer
echo "broken inttypes.h $emu_fast_int"
975 e41e8342 Fabrice Bellard
if test $cpu = "x86"; then
976 de6d9b64 Fabrice Bellard
echo "MMX enabled      $mmx"
977 52b41d7f Fabrice Bellard
echo "Vector Builtins  $builtin_vector"
978 e41e8342 Fabrice Bellard
fi
979
if test $cpu = "mips"; then
980 d46aba26 Leon van Stuivenberg
echo "MMI enabled      $mmi"
981 e41e8342 Fabrice Bellard
fi
982
if test $cpu = "powerpc"; then
983 ab6c65f6 Brian Foley
echo "AltiVec enabled  $altivec"
984 e41e8342 Fabrice Bellard
fi
985 de6d9b64 Fabrice Bellard
echo "gprof enabled    $gprof"
986 0147f198 François Revol
echo "zlib enabled     $zlib"
987 a6741398 Juanjo
echo "mp3lame enabled  $mp3lame"
988 81e0d0b4 Mark Hills
echo "vorbis enabled   $vorbis"
989 445ad18d Zdenek Kabelac
echo "faad enabled     $faad"
990
echo "faadbin enabled  $faadbin"
991 29d48296 Michael Niedermayer
echo "faac enabled     $faac"
992 1ddadfa9 Adam Thayer
echo "xvid enabled     $xvid"
993 5cbcf02c Fabrice Bellard
echo "a52 support      $a52"
994 57514323 Zdenek Kabelac
echo "a52 dlopened     $a52bin"
995 23c99253 Michael Niedermayer
echo "dts support      $dts"
996 bba9b16c Michael Niedermayer
echo "pp support       $pp"
997 cddf3f45 Glenn Maynard
echo "debug symbols    $debug"
998
echo "optimize         $optimize"
999 bba9b16c Michael Niedermayer
echo "shared pp        $shared_pp"
1000 47930f09 Philip Gladstone
echo "Video hooking    $vhook"
1001 a86b921c Fabrice Bellard
echo "SDL support      $sdl"
1002
if test $sdl_too_old = "yes"; then
1003
echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
1004
fi
1005 1d0d55da Michael Niedermayer
echo "risky / patent encumbered codecs $risky"
1006 68892110 Philip Gladstone
1007
if test "$vhook" = "yes" ; then
1008 47930f09 Philip Gladstone
echo "Imlib2 support   $imlib2"
1009 04511d53 Philip Gladstone
echo "freetype support $freetype2"
1010 68892110 Philip Gladstone
fi
1011 f80f7964 Roman Shaposhnik
echo "Sun medialib support"  $sunmlib
1012 9c3d33d6 Michael Niedermayer
echo "pthreads support"      $pthreads
1013 bc634f6f Zdenek Kabelac
echo "AMR-NB float support"  $amr_nb
1014
echo "AMR-NB fixed support"  $amr_nb_fixed
1015 d663a1fd Michael Niedermayer
echo "AMR-WB float support"  $amr_wb
1016 b2e3c528 Michael Niedermayer
if test "$gpl" = "no" ; then
1017
echo "License: LGPL"
1018
else
1019
echo "License: GPL"
1020
fi
1021 de6d9b64 Fabrice Bellard
1022 980fc7b8 Fabrice Bellard
echo "Creating config.mak and config.h"
1023 de6d9b64 Fabrice Bellard
1024 980fc7b8 Fabrice Bellard
echo "# Automatically generated by configure - do not modify" > config.mak
1025 045ed63f Zdenek Kabelac
echo "/* Automatically generated by configure - do not modify */" > $TMPH
1026 de6d9b64 Fabrice Bellard
1027 980fc7b8 Fabrice Bellard
echo "prefix=$prefix" >> config.mak
1028 951bf3e6 Fabrice Bellard
echo "bindir=$bindir" >> config.mak
1029 23a65308 Fabrice Bellard
echo "mandir=$mandir" >> config.mak
1030 4a908fbc Alex Beregszaszi
echo "MAKE=$make" >> config.mak
1031 980fc7b8 Fabrice Bellard
echo "CC=$cc" >> config.mak
1032
echo "AR=$ar" >> config.mak
1033 be7109c1 Michael Niedermayer
echo "RANLIB=$ranlib" >> config.mak
1034 0f3cb305 Fabrice Bellard
echo "STRIP=$strip" >> config.mak
1035 75388c74 Michael Niedermayer
1036
# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic.  Used when building 
1037
# shared modules on OS/X (vhook/Makefile).
1038
SHCFLAGS=$CFLAGS
1039
if test "$needmdynamicnopic" = yes; then
1040
   CFLAGS="$CFLAGS -mdynamic-no-pic"
1041
fi
1042
1043 a9b3f630 Nick Kurshev
echo "OPTFLAGS=$CFLAGS" >> config.mak
1044 75388c74 Michael Niedermayer
echo "SHCFLAGS=$SHCFLAGS">>config.mak
1045 0f3cb305 Fabrice Bellard
echo "LDFLAGS=$LDFLAGS" >> config.mak
1046 4baca069 Philip Gladstone
echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
1047 e1707f52 Michael Niedermayer
echo "SHFLAGS=$SHFLAGS" >> config.mak
1048 f3ec2d46 Slavik Gnatenko
echo "LIBPREF=$LIBPREF" >> config.mak
1049
echo "LIBSUF=$LIBSUF" >> config.mak
1050
echo "SLIBPREF=$SLIBPREF" >> config.mak
1051
echo "SLIBSUF=$SLIBSUF" >> config.mak
1052 951bf3e6 Fabrice Bellard
echo "EXESUF=$EXESUF" >> config.mak
1053 6852ac95 Romain Dolbeau
echo "TARGET_OS=$TARGET_OS" >> config.mak
1054 57514323 Zdenek Kabelac
if test "$cpu" = "x86" ; then
1055 980fc7b8 Fabrice Bellard
  echo "TARGET_ARCH_X86=yes" >> config.mak
1056 045ed63f Zdenek Kabelac
  echo "#define ARCH_X86 1" >> $TMPH
1057 0f3cb305 Fabrice Bellard
elif test "$cpu" = "armv4l" ; then
1058 6ed7422a Fabrice Bellard
  echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1059 045ed63f Zdenek Kabelac
  echo "#define ARCH_ARMV4L 1" >> $TMPH
1060 0f3cb305 Fabrice Bellard
elif test "$cpu" = "alpha" ; then
1061 91d1f1a4 Nick Kurshev
  echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1062 045ed63f Zdenek Kabelac
  echo "#define ARCH_ALPHA 1" >> $TMPH
1063 35fedfc3 Philip Gladstone
elif test "$cpu" = "sparc64" ; then
1064
  echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1065
  echo "#define ARCH_SPARC64 1" >> $TMPH
1066 bb476ff3 James Morrison
  echo "TARGET_ARCH_SPARC=yes" >> config.mak
1067
  echo "#define ARCH_SPARC 1" >> $TMPH
1068
elif test "$cpu" = "sparc" ; then
1069
  echo "TARGET_ARCH_SPARC=yes" >> config.mak
1070
  echo "#define ARCH_SPARC 1" >> $TMPH
1071 0f3cb305 Fabrice Bellard
elif test "$cpu" = "powerpc" ; then
1072
  echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1073
  echo "#define ARCH_POWERPC 1" >> $TMPH
1074 9007f514 Romain Dolbeau
  if test $POWERPCMODE = "32bits"; then
1075
    echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1076
  else
1077
    echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1078
  fi
1079 e45a2872 Romain Dolbeau
  if test "$powerpc_perf" = "yes"; then
1080
    echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1081
  fi
1082 d46aba26 Leon van Stuivenberg
elif test "$cpu" = "mips" ; then
1083
  echo "TARGET_ARCH_MIPS=yes" >> config.mak
1084
  echo "#define ARCH_MIPS 1" >> $TMPH
1085 bdb2e37c Alex Beregszaszi
elif test "$cpu" = "sh4" ; then
1086
  echo "TARGET_ARCH_SH4=yes" >> config.mak
1087
  echo "#define ARCH_SH4 1" >> $TMPH
1088
fi
1089 a4adb608 Michael Niedermayer
echo "#define TUNECPU $TUNECPU" >> $TMPH
1090 0f3cb305 Fabrice Bellard
if test "$bigendian" = "yes" ; then
1091
  echo "WORDS_BIGENDIAN=yes" >> config.mak
1092
  echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1093 91d1f1a4 Nick Kurshev
fi
1094 d2a9bddd Michael Niedermayer
if test "$inttypes" != "yes" ; then
1095
  echo "#define EMULATE_INTTYPES 1" >> $TMPH
1096 7f965c1c Chris Flerackers
fi
1097 b5c950c4 Michael Niedermayer
if test "$emu_fast_int" = "yes" ; then
1098 19d053c5 Roman Shaposhnik
  echo "#define EMULATE_FAST_INT 1" >> $TMPH
1099 b5c950c4 Michael Niedermayer
fi
1100 57514323 Zdenek Kabelac
if test "$mmx" = "yes" ; then
1101 980fc7b8 Fabrice Bellard
  echo "TARGET_MMX=yes" >> config.mak
1102 045ed63f Zdenek Kabelac
  echo "#define HAVE_MMX 1" >> $TMPH
1103 e82c5a8c Michael Niedermayer
  echo "#define __CPU__ 586" >> $TMPH
1104 de6d9b64 Fabrice Bellard
fi
1105 52b41d7f Fabrice Bellard
if test "$builtin_vector" = "yes" ; then
1106
  echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1107
  echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1108
fi
1109 d46aba26 Leon van Stuivenberg
if test "$mmi" = "yes" ; then
1110
  echo "TARGET_MMI=yes" >> config.mak
1111
  echo "#define HAVE_MMI 1" >> $TMPH
1112
fi
1113 ab6c65f6 Brian Foley
if test "$altivec" = "yes" ; then
1114
  echo "TARGET_ALTIVEC=yes" >> config.mak
1115
  echo "#define HAVE_ALTIVEC 1" >> $TMPH
1116 db40a39a Michael Niedermayer
  echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
1117
  echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
1118 a9a07762 Michael Niedermayer
  if test "$_altivec_h" = "yes" ; then
1119
    echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1120
  else
1121 e67e14d5 Alex Beregszaszi
    echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1122 a9a07762 Michael Niedermayer
  fi
1123 ab6c65f6 Brian Foley
fi
1124 57514323 Zdenek Kabelac
if test "$gprof" = "yes" ; then
1125 980fc7b8 Fabrice Bellard
  echo "TARGET_GPROF=yes" >> config.mak
1126 045ed63f Zdenek Kabelac
  echo "#define HAVE_GPROF 1" >> $TMPH
1127 de6d9b64 Fabrice Bellard
fi
1128 5e4639e2 Glenn Maynard
if test "$localtime_r" = "yes" ; then
1129
  echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1130
fi
1131 68892110 Philip Gladstone
if test "$imlib2" = "yes" ; then
1132
  echo "HAVE_IMLIB2=yes" >> config.mak
1133
fi
1134 04511d53 Philip Gladstone
if test "$freetype2" = "yes" ; then
1135
  echo "HAVE_FREETYPE2=yes" >> config.mak
1136
fi
1137 f80f7964 Roman Shaposhnik
if test "$sunmlib" = "yes" ; then
1138
  echo "HAVE_MLIB=yes" >> config.mak
1139
  echo "#define HAVE_MLIB 1" >> $TMPH
1140
  extralibs="$extralibs -lmlib"
1141
fi
1142 9c3d33d6 Michael Niedermayer
if test "$pthreads" = "yes" ; then
1143
  echo "HAVE_PTHREADS=yes" >> config.mak
1144
  echo "#define HAVE_PTHREADS 1" >> $TMPH
1145 0abd6916 Michael Niedermayer
  if test $targetos != FreeBSD; then
1146 12043e1d Steven M. Schultz
     extralibs="$extralibs -lpthread"
1147
  fi
1148 9c3d33d6 Michael Niedermayer
fi
1149 a86b921c Fabrice Bellard
if test "$sdl" = "yes" ; then
1150
  echo "CONFIG_SDL=yes" >> config.mak
1151
  echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1152
  echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1153
fi
1154 146ea952 Nicolas Boos
if test "$texi2html" = "yes"; then
1155
  echo "BUILD_DOC=yes" >> config.mak
1156
fi
1157 95e2ce4a Michael Niedermayer
if test "$have_lrintf" = "yes" ; then
1158
  echo "#define HAVE_LRINTF 1" >> $TMPH
1159
fi
1160 68892110 Philip Gladstone
if test "$vhook" = "yes" ; then
1161
  echo "BUILD_VHOOK=yes" >> config.mak
1162
  echo "#define HAVE_VHOOK 1" >> $TMPH
1163 9c938e77 Philip Gladstone
  extralibs="$extralibs $ldl"
1164 68892110 Philip Gladstone
fi
1165 57514323 Zdenek Kabelac
if test "$lshared" = "yes" ; then
1166 0319c531 Nick Kurshev
  echo "BUILD_SHARED=yes" >> config.mak
1167 5cbcf02c Fabrice Bellard
  echo "PIC=-fPIC" >> config.mak
1168 0319c531 Nick Kurshev
fi
1169 ef0bc4c9 François Revol
echo "EXTRALIBS=$extralibs" >> config.mak
1170 258207b7 Fabrice Bellard
version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
1171
 cut -d '"' -f 2`
1172
echo "VERSION=$version" >>config.mak
1173 d771bcae Fabrice Bellard
# if you do not want to use encoders, disable that.
1174 045ed63f Zdenek Kabelac
echo "#define CONFIG_ENCODERS 1" >> $TMPH
1175 d771bcae Fabrice Bellard
echo "CONFIG_ENCODERS=yes" >> config.mak
1176
1177
# if you do not want to use decoders, disable that.
1178 045ed63f Zdenek Kabelac
echo "#define CONFIG_DECODERS 1" >> $TMPH
1179 d771bcae Fabrice Bellard
echo "CONFIG_DECODERS=yes" >> config.mak
1180
1181 5cbcf02c Fabrice Bellard
# AC3
1182
if test "$a52" = "yes" ; then
1183
  echo "#define CONFIG_AC3 1" >> $TMPH
1184
  echo "CONFIG_AC3=yes" >> config.mak
1185 d771bcae Fabrice Bellard
1186 5cbcf02c Fabrice Bellard
  if test "$a52bin" = "yes" ; then
1187
    echo "#define CONFIG_A52BIN 1" >> $TMPH
1188
    echo "CONFIG_A52BIN=yes" >> config.mak
1189
  fi
1190
fi
1191
1192 23c99253 Michael Niedermayer
# DTS
1193
if test "$dts" = "yes" ; then
1194
  echo "#define CONFIG_DTS 1" >> $TMPH
1195
  echo "CONFIG_DTS=yes" >> config.mak
1196
fi
1197
1198 bba9b16c Michael Niedermayer
# PP
1199
if test "$pp" = "yes" ; then
1200
  echo "#define CONFIG_PP 1" >> $TMPH
1201
  echo "CONFIG_PP=yes" >> config.mak
1202
1203
  if test "$shared_pp" = "yes" ; then
1204
    echo "#define SHARED_PP 1" >> $TMPH
1205
    echo "SHARED_PP=yes" >> config.mak
1206
  fi
1207
fi
1208
1209 1eb2212e Fabrice Bellard
# mpeg audio high precision mode
1210
if test "$mpegaudio_hp" = "yes" ; then
1211
  echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1212
fi
1213
1214 5cbcf02c Fabrice Bellard
if test "$v4l" = "yes" ; then
1215
  echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1216
  echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1217
fi
1218
1219 8aa3ee32 Max Krasnyansky
if test "$dv1394" = "yes" ; then
1220
  echo "#define CONFIG_DV1394 1" >> $TMPH
1221
  echo "CONFIG_DV1394=yes" >> config.mak
1222
fi
1223
1224 adbc0510 Philip Gladstone
if test "$dlopen" = "yes" ; then
1225
  echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1226
fi
1227
1228
if test "$dlfcn" = "yes" ; then
1229
  echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1230
fi
1231
1232 5cbcf02c Fabrice Bellard
if test "$audio_oss" = "yes" ; then
1233
  echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1234
  echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1235 57514323 Zdenek Kabelac
fi
1236
1237 dfdfa47c François Revol
if test "$audio_beos" = "yes" ; then
1238
  echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1239
  echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1240
fi
1241
1242 5cbcf02c Fabrice Bellard
if test "$network" = "yes" ; then
1243
  echo "#define CONFIG_NETWORK 1" >> $TMPH
1244
  echo "CONFIG_NETWORK=yes" >> config.mak
1245 6ed7422a Fabrice Bellard
fi
1246 daf8e955 Fabrice Bellard
1247 0147f198 François Revol
if test "$zlib" = "yes" ; then
1248
  echo "#define CONFIG_ZLIB 1" >> $TMPH
1249
  echo "CONFIG_ZLIB=yes" >> config.mak
1250
fi
1251
1252 57514323 Zdenek Kabelac
if test "$mp3lame" = "yes" ; then
1253 045ed63f Zdenek Kabelac
  echo "#define CONFIG_MP3LAME 1" >> $TMPH
1254 a6741398 Juanjo
  echo "CONFIG_MP3LAME=yes" >> config.mak
1255
fi
1256
1257 81e0d0b4 Mark Hills
if test "$vorbis" = "yes" ; then
1258
  echo "#define CONFIG_VORBIS 1" >> $TMPH
1259
  echo "CONFIG_VORBIS=yes" >> config.mak
1260
fi
1261
1262 0fc50e58 Zdenek Kabelac
if test "$faad" = "yes" ; then
1263
  echo "#define CONFIG_FAAD 1" >> $TMPH
1264
  echo "CONFIG_FAAD=yes" >> config.mak
1265
fi
1266
1267
if test "$faadbin" = "yes" ; then
1268
  echo "#define CONFIG_FAADBIN 1" >> $TMPH
1269 445ad18d Zdenek Kabelac
  echo "CONFIG_FAADBIN=yes" >> config.mak
1270 0fc50e58 Zdenek Kabelac
fi
1271
1272 29d48296 Michael Niedermayer
if test "$faac" = "yes" ; then
1273
  echo "#define CONFIG_FAAC 1" >> $TMPH
1274
  echo "CONFIG_FAAC=yes" >> config.mak
1275
fi
1276
1277 1ddadfa9 Adam Thayer
if test "$xvid" = "yes" ; then
1278
  echo "#define CONFIG_XVID 1" >> $TMPH
1279
  echo "CONFIG_XVID=yes" >> config.mak
1280
fi
1281
1282 732d9245 Bill Eldridge
if test "$mingw32" = "yes" ; then
1283
  echo "#define CONFIG_WIN32 1" >> $TMPH
1284
  echo "CONFIG_WIN32=yes" >> config.mak
1285 16806499 Michael Niedermayer
  echo "HAVE_W32THREADS=yes" >> config.mak
1286
  echo "#define HAVE_W32THREADS 1" >> $TMPH
1287 7eea5766 Fabrice Bellard
  echo "#ifndef __MINGW32__" >> $TMPH
1288 732d9245 Bill Eldridge
  echo "#define __MINGW32__ 1" >> $TMPH
1289 7eea5766 Fabrice Bellard
  echo "#endif" >> $TMPH
1290 3f027ca7 Felix Bünemann
fi
1291
1292 f3ec2d46 Slavik Gnatenko
if test "$os2" = "yes" ; then
1293
  echo "#define CONFIG_OS2 1" >> $TMPH
1294
  echo "CONFIG_OS2=yes" >> config.mak
1295
fi
1296
1297 6e023978 Roman Shaposhnik
if test "$TARGET_OS" = "SunOS" ; then
1298
  echo "#define CONFIG_SUNOS 1" >> $TMPH
1299
fi
1300
1301 90cee0c3 Michael Niedermayer
if test "$darwin" = "yes"; then
1302
  echo "#define CONFIG_DARWIN 1"  >> $TMPH
1303
  echo "CONFIG_DARWIN=yes" >> config.mak
1304
fi
1305
1306 57514323 Zdenek Kabelac
if test "$_malloc_h" = "yes" ; then
1307 045ed63f Zdenek Kabelac
  echo "#define HAVE_MALLOC_H 1" >> $TMPH
1308 3d204385 Nick Kurshev
else
1309 045ed63f Zdenek Kabelac
  echo "#undef  HAVE_MALLOC_H" >> $TMPH
1310 3d204385 Nick Kurshev
fi
1311
1312 57514323 Zdenek Kabelac
if test "$_memalign" = "yes" ; then
1313 045ed63f Zdenek Kabelac
  echo "#define HAVE_MEMALIGN 1" >> $TMPH
1314
else
1315
  echo "#undef  HAVE_MEMALIGN" >> $TMPH
1316
fi
1317
1318 da9b170c Michael Niedermayer
if test "$memalignhack" = "yes" ; then
1319
  echo "#define MEMALIGN_HACK 1" >> $TMPH
1320
fi
1321
1322
1323 26b35efb François Revol
if test "$netserver" = "yes" ; then
1324
  echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1325
  echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1326
fi
1327
1328 4baca069 Philip Gladstone
if test "$need_inet_aton" = "yes" ; then
1329
  echo "NEED_INET_ATON=yes" >> config.mak
1330
fi
1331
1332 57514323 Zdenek Kabelac
if test "$simpleidct" = "yes" ; then
1333 045ed63f Zdenek Kabelac
  echo "#define SIMPLE_IDCT 1" >> $TMPH
1334
fi
1335
1336 8154d2e0 Fabrice Bellard
if test "$ffserver" = "yes" ; then
1337
  echo "#define CONFIG_FFSERVER 1" >> $TMPH
1338
  echo "CONFIG_FFSERVER=yes" >> config.mak
1339
fi
1340
1341 a86b921c Fabrice Bellard
if test "$ffplay" = "yes" ; then
1342
  echo "CONFIG_FFPLAY=yes" >> config.mak
1343
fi
1344
1345 1d0d55da Michael Niedermayer
if test "$risky" = "yes" ; then
1346
  echo "#define CONFIG_RISKY 1" >> $TMPH
1347
  echo "CONFIG_RISKY=yes" >> config.mak
1348
fi
1349
1350 b2e3c528 Michael Niedermayer
if test "$gpl" = "yes" ; then
1351
  echo "#define CONFIG_GPL 1" >> $TMPH
1352
  echo "CONFIG_GPL=yes" >> config.mak
1353
fi
1354
1355 c13e1abd Falk Hüffner
echo "#define restrict $_restrict" >> $TMPH
1356
1357 bb801c97 Michael Niedermayer
if test "$optimize" = "small"; then
1358
  echo "#define always_inline"  >> $TMPH
1359
fi
1360
1361 0f3cb305 Fabrice Bellard
# build tree in object directory if source path is different from current one
1362
if test "$source_path_used" = "yes" ; then
1363 a382b927 Fabrice Bellard
    DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1364 5f6b58de Måns Rullgård
          libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1365
    FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1366 0f3cb305 Fabrice Bellard
    for dir in $DIRS ; do
1367
            mkdir -p $dir
1368
    done
1369
    for f in $FILES ; do
1370
        ln -sf $source_path/$f $f
1371
    done
1372
fi
1373
echo "SRC_PATH=$source_path" >> config.mak
1374
1375 d663a1fd Michael Niedermayer
if test "$amr_wb" = "yes" ; then
1376
  echo "#define AMR_WB 1" >> $TMPH
1377
  echo "AMR_WB=yes" >> config.mak
1378
  echo
1379
  echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1380
  echo "V5.1.0 from "
1381
  echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1382
  echo "and extracted the source to libavcodec/amrwb_float"
1383
  echo
1384
fi
1385
1386 891f64b3 joca@rixmail.se
if test "$amr_nb" = "yes" ; then
1387
  echo "#define AMR_NB 1" >> $TMPH
1388
  echo "AMR_NB=yes" >> config.mak
1389
  echo
1390 bc634f6f Zdenek Kabelac
if test "$amr_nb_fixed" = "yes" ; then
1391
  echo "AMR_NB_FIXED=yes" >> config.mak
1392
  echo "#define AMR_NB_FIXED 1" >> $TMPH
1393
  echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1394
  echo "REL-5 version 5.1.0 from "
1395 891f64b3 joca@rixmail.se
  echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1396
  echo "and extracted src to libavcodec/amr"
1397 bc634f6f Zdenek Kabelac
  echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1398
  echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1399
  echo
1400
else
1401
  echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1402
  echo "REL-5 V5.1.0 from "
1403
  echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1404
  echo "and extracted the source to libavcodec/amr_float"
1405 821e46f4 Michael Niedermayer
  echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
1406 891f64b3 joca@rixmail.se
  echo
1407
fi
1408
1409 bc634f6f Zdenek Kabelac
fi
1410
1411 a7c02e25 Zdenek Kabelac
diff $TMPH config.h >/dev/null 2>&1
1412 045ed63f Zdenek Kabelac
if test $? -ne 0 ; then
1413
	mv -f $TMPH config.h
1414 3d204385 Nick Kurshev
else
1415 045ed63f Zdenek Kabelac
	echo "config.h is unchanged"
1416 3d204385 Nick Kurshev
fi
1417
1418 f3ec2d46 Slavik Gnatenko
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH