show stream info with -stats
[libav.git] / configure
CommitLineData
de6d9b64 1#!/bin/sh
0f3cb305 2#
5cbcf02c 3# ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
0f3cb305
FB
4#
5# set temporary file name
57514323 6if test ! -z "$TMPDIR" ; then
0f3cb305 7 TMPDIR1="${TMPDIR}"
57514323 8elif test ! -z "$TEMPDIR" ; then
0f3cb305 9 TMPDIR1="${TEMPDIR}"
3d204385 10else
0f3cb305 11 TMPDIR1="/tmp"
3d204385
NK
12fi
13
0f3cb305
FB
14TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
15TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
f3ec2d46 16TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
0f3cb305
FB
17TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
18TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
19
de6d9b64
FB
20# default parameters
21prefix="/usr/local"
23a65308 22mandir=""
0f3cb305 23cross_prefix=""
de6d9b64
FB
24cc="gcc"
25ar="ar"
be7109c1 26ranlib="ranlib"
4a908fbc 27make="make"
0f3cb305 28strip="strip"
de6d9b64 29cpu=`uname -m`
a4adb608 30tune="generic"
e45a2872 31powerpc_perf="no"
0f3cb305 32mmx="default"
ab6c65f6 33altivec="default"
d46aba26 34mmi="default"
de6d9b64 35case "$cpu" in
ef0bc4c9 36 i386|i486|i586|i686|i86pc|BePC)
de6d9b64 37 cpu="x86"
de6d9b64 38 ;;
93caefc7
AB
39 # armv4l is a subset of armv5tel
40 armv4l|armv5tel)
6ed7422a 41 cpu="armv4l"
6ed7422a 42 ;;
91d1f1a4
NK
43 alpha)
44 cpu="alpha"
91d1f1a4 45 ;;
a43bd1d7 46 "Power Macintosh"|ppc)
90cee0c3
MN
47 cpu="powerpc"
48 ;;
d46aba26
LS
49 mips)
50 cpu="mips"
51 ;;
a7beab73
RS
52 sun4u)
53 cpu="sparc64"
54 ;;
bdb2e37c
AB
55 sh4)
56 cpu="sh4"
57 ;;
de6d9b64 58 *)
0f3cb305 59 cpu="unknown"
de6d9b64
FB
60 ;;
61esac
62gprof="no"
5cbcf02c
FB
63v4l="yes"
64audio_oss="yes"
dfdfa47c 65audio_beos="no"
8aa3ee32 66dv1394="yes"
5cbcf02c 67network="yes"
0147f198 68zlib="yes"
a6741398 69mp3lame="no"
81e0d0b4 70vorbis="no"
0fc50e58
ZK
71faad="no"
72faadbin="no"
ba9261e5 73a52="no"
57514323 74a52bin="no"
ba9261e5 75pp="no"
bba9b16c 76shared_pp="no"
732d9245 77mingw32="no"
3f027ca7 78cygwin="no"
f3ec2d46 79os2="no"
83286d2a 80lshared="no"
ef0bc4c9 81extralibs="-lm"
c02dbee1 82simpleidct="yes"
0f3cb305 83bigendian="no"
a8721c09 84vhook="default"
adbc0510
PG
85dlfcn="no"
86dlopen="no"
1eb2212e 87mpegaudio_hp="yes"
e1707f52 88SHFLAGS=-shared
26b35efb 89netserver="no"
4baca069 90need_inet_aton="no"
8154d2e0 91ffserver="yes"
a86b921c 92ffplay="yes"
4baca069
PG
93LDFLAGS=-Wl,--warn-common
94FFSLDFLAGS=-Wl,-E
f3ec2d46
SG
95LIBPREF="lib"
96LIBSUF=".a"
97SLIBPREF="lib"
98SLIBSUF=".so"
1d0d55da 99risky="yes"
553a6284 100small="no"
891f64b3 101amr_nb="no"
bc634f6f 102amr_nb_fixed="no"
f80f7964 103sunmlib="no"
ef0bc4c9
FR
104
105# OS specific
106targetos=`uname -s`
107case $targetos in
108BeOS)
109prefix="/boot/home/config"
110# helps building libavcodec
e1707f52 111CFLAGS="-O3 -DPIC -fomit-frame-pointer"
31ba0b4d
FR
112# 3 gcc releases known for BeOS, each with ugly bugs
113gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
114case "$gcc_version" in
1152.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
116mmx="no"
117;;
118*20010315*) echo "BeBits gcc"
119CFLAGS="$CFLAGS -fno-expensive-optimizations"
120;;
121esac
e1707f52
MN
122SHFLAGS=-nostart
123# disable linux things
124audio_oss="no"
5cbcf02c 125v4l="no"
8aa3ee32 126dv1394="no"
dfdfa47c
FR
127# enable beos things
128audio_beos="yes"
ef0bc4c9
FR
129# no need for libm, but the inet stuff
130# Check for BONE
131if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
132extralibs="-lbind -lsocket"
133else
26b35efb 134netserver="yes"
4baca069 135need_inet_aton="yes"
26b35efb 136extralibs="-lnet"
ef0bc4c9 137fi ;;
4baca069
PG
138SunOS)
139v4l="no"
140audio_oss="no"
8aa3ee32 141dv1394="no"
4baca069
PG
142make="gmake"
143LDFLAGS=""
144FFSLDFLAGS=""
145need_inet_aton="yes"
146extralibs="$extralibs -lsocket -lnsl"
147;;
9c938e77
PG
148FreeBSD)
149v4l="no"
150audio_oss="yes"
8aa3ee32 151dv1394="no"
9c938e77 152make="gmake"
4baca069 153LDFLAGS="$LDFLAGS -export-dynamic"
9c938e77 154;;
4a908fbc 155BSD/OS)
5cbcf02c 156v4l="no"
6063bce7 157audio_oss="yes"
8aa3ee32 158dv1394="no"
4a908fbc
AB
159extralibs="-lpoll -lgnugetopt -lm"
160make="gmake"
161;;
90cee0c3 162Darwin)
a43bd1d7 163cc="cc"
90cee0c3
MN
164v4l="no"
165audio_oss="no"
8aa3ee32 166dv1394="no"
d3b15036 167ffserver="no"
a43bd1d7 168SHFLAGS="-dynamiclib"
90cee0c3 169extralibs=""
a43bd1d7 170darwin="yes"
47930f09 171strip="strip -x"
6207ba95 172LDFLAGS="-d"
4baca069 173FFSLDFLAGS=-Wl,-bind_at_load
8d6625b6 174gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
4baca069
PG
175case "$gcc_version" in
176*2.95*)
177CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
178;;
8d6625b6
DC
179*3.3*)
180CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
181;;
4baca069
PG
182*)
183CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
184;;
185esac
90cee0c3 186;;
732d9245
BE
187MINGW32*)
188v4l="no"
189audio_oss="no"
8aa3ee32 190dv1394="no"
732d9245
BE
191ffserver="no"
192network="no"
193mingw32="yes"
a17236c5
MN
194LIBPREF=""
195LIBSUF=".lib"
196SLIBPREF=""
197SLIBSUF=".dll"
732d9245 198;;
3f027ca7
FB
199CYGWIN*)
200v4l="no"
201audio_oss="yes"
8aa3ee32 202dv1394="no"
3f027ca7
FB
203extralibs=""
204cygwin="yes"
205test -f /usr/include/inttypes.h || \
206test -f /usr/local/include/inttypes.h || \
207echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
208 "/usr/include/inttypes.h !!!"
209;;
b55e4ef4 210Linux)
4baca069 211LDFLAGS="$LDFLAGS -rdynamic"
b55e4ef4 212;;
f3ec2d46
SG
213OS/2)
214TMPE=$TMPE".exe"
69db4e10
SG
215ar="emxomfar -p64"
216ranlib="echo ignoring ranlib"
217strip="echo ignoring strip"
218CFLAGS="-Zomf -O3"
219LDFLAGS="-Zomf -Zstack 16384 -s"
f3ec2d46
SG
220SHFLAGS=""
221FFSLDFLAGS=""
222LIBPREF=""
223LIBSUF=".lib"
224SLIBPREF=""
225SLIBSUF=".dll"
226extralibs=""
227v4l="no"
228audio_oss="no"
8aa3ee32 229dv1394="no"
f3ec2d46
SG
230network="no"
231ffserver="no"
232os2="yes"
233;;
ef0bc4c9
FR
234*) ;;
235esac
de6d9b64 236
6852ac95
RD
237# From mplayer configure. We need TARGET_OS available
238# to the Makefile, so it can distinguish between flavors
239# of AltiVec on PowerPC
240TARGET_OS=`( uname -s ) 2>&1`
241 case "$TARGET_OS" in
242 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
243 ;;
244 IRIX*)
245 TARGET_OS=IRIX
246 ;;
247 HP-UX*)
248 TARGET_OS=HP-UX
249 ;;
250 [cC][yY][gG][wW][iI][nN]*)
251 TARGET_OS=CYGWIN
252 ;;
253 *)
254 TARGET_OS="$TARGET_OS-UNKNOWN"
255 ;;
256 esac
257
0f3cb305
FB
258# find source path
259# XXX: we assume an absolute path is given when launching configure,
260# except in './configure' case.
586bc755 261source_path="`echo $0 | sed -e 's#/configure##'`"
0f3cb305
FB
262source_path_used="yes"
263if test -z "$source_path" -o "$source_path" = "." ; then
264 source_path=`pwd`
265 source_path_used="no"
de6d9b64
FB
266fi
267
268for opt do
269 case "$opt" in
270 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
271 ;;
23a65308
FB
272 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
273 ;;
0f3cb305
FB
274 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
275 ;;
276 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
277 ;;
de6d9b64
FB
278 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
279 ;;
4a908fbc
AB
280 --make=*) make=`echo $opt | cut -d '=' -f 2`
281 ;;
0f3cb305
FB
282 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
283 ;;
284 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
285 ;;
286 --extra-libs=*) extralibs=${opt#--extra-libs=}
287 ;;
de6d9b64
FB
288 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
289 ;;
a4adb608
MN
290 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
291 ;;
e45a2872
RD
292 --powerpc-perf-enable) powerpc_perf="yes"
293 ;;
de6d9b64
FB
294 --disable-mmx) mmx="no"
295 ;;
ab6c65f6
BF
296 --disable-altivec) altivec="no"
297 ;;
de6d9b64
FB
298 --enable-gprof) gprof="yes"
299 ;;
5cbcf02c
FB
300 --disable-v4l) v4l="no"
301 ;;
302 --disable-audio-oss) audio_oss="no"
303 ;;
dfdfa47c
FR
304 --disable-audio-beos) audio_beos="no"
305 ;;
8aa3ee32
MK
306 --disable-dv1394) dv1394="no"
307 ;;
5cbcf02c
FB
308 --disable-network) network="no"
309 ;;
0147f198
FR
310 --disable-zlib) zlib="no"
311 ;;
ba9261e5 312 --enable-a52) a52="yes"
6ed7422a 313 ;;
9c938e77 314 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
57514323 315 ;;
ba9261e5 316 --enable-pp) pp="yes"
bba9b16c
MN
317 ;;
318 --enable-shared-pp) shared_pp="yes"
319 ;;
a6741398
J
320 --enable-mp3lame) mp3lame="yes"
321 ;;
81e0d0b4
MH
322 --enable-vorbis) vorbis="yes"
323 ;;
445ad18d
ZK
324 --enable-faad) faad="yes"
325 ;;
326 --enable-faadbin) faadbin="yes"
327 ;;
68892110
PG
328 --disable-vhook) vhook="no"
329 ;;
c02dbee1 330 --disable-simple_idct) simpleidct="no"
045ed63f 331 ;;
732d9245
BE
332 --enable-mingw32) mingw32="yes"
333 ;;
83286d2a 334 --enable-shared) lshared="yes"
0319c531 335 ;;
1eb2212e
FB
336 --disable-mpegaudio-hp) mpegaudio_hp="no"
337 ;;
8154d2e0
FB
338 --disable-ffserver) ffserver="no"
339 ;;
a86b921c
FB
340 --disable-ffplay) ffplay="no"
341 ;;
1d0d55da
MN
342 --disable-risky) risky="no"
343 ;;
553a6284
MN
344 --enable-small) small="yes"
345 ;;
891f64b3 346 --enable-amr_nb) amr_nb="yes"
347 ;;
bc634f6f
ZK
348 --enable-amr_nb-fixed) amr_nb_fixed="yes"
349 ;;
f80f7964
RS
350 --enable-sunmlib) sunmlib="yes"
351 ;;
de6d9b64
FB
352 esac
353done
354
0f3cb305
FB
355# compute mmx state
356if test $mmx = "default"; then
357 if test $cpu = "x86"; then
358 mmx="yes"
359 else
360 mmx="no"
361 fi
362fi
363
ab6c65f6
BF
364# Can only do AltiVec on PowerPC
365if test $altivec = "default"; then
366 if test $cpu = "powerpc"; then
367 altivec="yes"
368 else
369 altivec="no"
370 fi
371fi
372
a4adb608
MN
373# Add processor-specific flags
374TUNECPU="generic"
375if test $tune != "generic"; then
376 case $tune in
377 601|ppc601|PowerPC601)
378 CFLAGS="$CFLAGS -mcpu=601"
379 if test $altivec = "yes"; then
380 echo "WARNING: tuning for PPC601 but altivec enabled !";
381 fi
382 TUNECPU=ppc601
383 ;;
384 603*|ppc603*|PowerPC603*)
385 CFLAGS="$CFLAGS -mcpu=603"
386 if test $altivec = "yes"; then
387 echo "WARNING: tuning for PPC603 but altivec enabled !";
388 fi
389 TUNECPU=ppc603
390 ;;
391 604*|ppc604*|PowerPC604*)
392 CFLAGS="$CFLAGS -mcpu=604"
393 if test $altivec = "yes"; then
394 echo "WARNING: tuning for PPC604 but altivec enabled !";
395 fi
396 TUNECPU=ppc604
397 ;;
8d6625b6 398 G3|g3|75*|ppc75*|PowerPC75*)
3efd4952 399 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
a4adb608
MN
400 if test $altivec = "yes"; then
401 echo "WARNING: tuning for PPC75x but altivec enabled !";
402 fi
403 TUNECPU=ppc750
404 ;;
8d6625b6 405 G4|g4|745*|ppc745*|PowerPC745*)
3efd4952
RD
406 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
407 if test $altivec = "no"; then
408 echo "WARNING: tuning for PPC745x but altivec disabled !";
409 fi
410 TUNECPU=ppc7450
411 ;;
412 74*|ppc74*|PowerPC74*)
413 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
a4adb608
MN
414 if test $altivec = "no"; then
415 echo "WARNING: tuning for PPC74xx but altivec disabled !";
416 fi
e45a2872 417 TUNECPU=ppc7400
a4adb608 418 ;;
8d6625b6 419 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
a4adb608
MN
420 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
421 if test $altivec = "no"; then
422 echo "WARNING: tuning for PPC970 but altivec disabled !";
423 fi
424 TUNECPU=ppc970
425 ;;
426 *)
427 echo "WARNING: unknown CPU "$tune", ignored"
428 ;;
429 esac
430fi
431
b6e52719
MD
432# AltiVec flags: The FSF version of GCC differs from the Darwin version
433if test $cpu = "powerpc"; then
434 if test $altivec = "yes"; then
435 if test "$darwin" = "yes"; then
436 CFLAGS="$CFLAGS -faltivec"
437 else
438 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
439 fi
440 fi
441fi
442
a9a07762
MN
443# See if we have <altivec.h>
444cat > $TMPC << EOF
445#include <altivec.h>
446int main( void ) { return 0; }
447EOF
448
449_altivec_h="no"
b6e52719 450if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
a9a07762
MN
451_altivec_h="yes"
452fi
453
ab6c65f6
BF
454# See does our compiler support Motorola AltiVec C API
455if test $altivec = "yes"; then
a9a07762 456if test $_altivec_h = "yes"; then
ab6c65f6 457cat > $TMPC << EOF
a9a07762 458#include <altivec.h>
ab6c65f6
BF
459int main(void) {
460 vector signed int v1, v2, v3;
461 v1 = vec_add(v2,v3);
462 return 0;
463}
464EOF
a9a07762
MN
465else
466cat > $TMPC << EOF
467int main(void) {
468 vector signed int v1, v2, v3;
469 v1 = vec_add(v2,v3);
470 return 0;
471}
472EOF
473fi
b6e52719 474$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
ab6c65f6
BF
475fi
476
d46aba26
LS
477# Can only do mmi on mips
478if test $mmi = "default"; then
479 if test $cpu = "mips"; then
480 mmi="yes"
481 else
482 mmi="no"
483 fi
484fi
485
486# See does our compiler support mmi
487if test $mmi = "yes"; then
488cat > $TMPC << EOF
489int main(void) {
490 __asm__ ("lq \$2, 0(\$2)");
491 return 0;
492}
493EOF
f3ec2d46 494$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
d46aba26
LS
495fi
496
daf8e955
FB
497# Checking for CFLAGS
498if test -z "$CFLAGS"; then
29482cb4 499 CFLAGS="-O3"
daf8e955
FB
500fi
501
732d9245 502if test "$mingw32" = "yes" ; then
732d9245
BE
503 v4l="no"
504 audio_oss="no"
8aa3ee32 505 dv1394="no"
732d9245
BE
506 network="no"
507fi
508
0f3cb305
FB
509cc="${cross_prefix}${cc}"
510ar="${cross_prefix}${ar}"
be7109c1 511ranlib="${cross_prefix}${ranlib}"
0f3cb305
FB
512strip="${cross_prefix}${strip}"
513
487a54d7
FB
514if test -z "$cross_prefix" ; then
515
3d204385 516# ---
a3999908
MN
517# big/little endian test
518cat > $TMPC << EOF
519#include <inttypes.h>
520int main(int argc, char ** argv){
521 volatile uint32_t i=0x01234567;
522 return (*((uint8_t*)(&i))) == 0x67;
523}
524EOF
525
f3ec2d46
SG
526if $cc -o $TMPE $TMPC 2>/dev/null ; then
527$TMPE && bigendian="yes"
a3999908
MN
528else
529echo big/little test failed
530fi
531
487a54d7
FB
532else
533
534# if cross compiling, cannot launch a program, so make a static guess
535if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
536 bigendian="yes"
537fi
538
539fi
540
a3999908 541# ---
3d204385
NK
542# check availability of some header files
543
544cat > $TMPC << EOF
545#include <malloc.h>
546int main( void ) { return 0; }
547EOF
548
549_memalign=no
550_malloc_h=no
f3ec2d46 551if $cc -o $TMPE $TMPC 2> /dev/null ; then
3d204385
NK
552_malloc_h=yes
553_memalign=yes
554# check for memalign - atmos
555cat > $TMPC << EOF
556#include <malloc.h>
557int main ( void ) {
558char *string = NULL;
559string = memalign(64, sizeof(char));
560return 0;
561}
562EOF
f3ec2d46 563$cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
3d204385
NK
564fi
565
68892110 566cat > $TMPC << EOF
5e4639e2
GM
567#include <time.h>
568int main( void ) { localtime_r(NULL, NULL); }
569EOF
570
571localtime_r=no
572if $cc -o $TMPE $TMPC 2> /dev/null ; then
573 localtime_r=yes
574fi
575
0147f198
FR
576if test "$zlib" = "yes"; then
577# check for zlib - mmu_man
578cat > $TMPC << EOF
579#include <zlib.h>
580int main ( void ) {
581if (zlibVersion() != ZLIB_VERSION)
582 puts("zlib version differs !!!");
583 return 1;
584return 0;
585}
586EOF
f3ec2d46
SG
587$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
588# $TMPE 2> /dev/null > /dev/null || zlib="no"
0147f198
FR
589# XXX: more tests needed - runtime test
590fi
591if test "$zlib" = "yes"; then
592extralibs="$extralibs -lz"
593fi
594
95e2ce4a
MN
595# test for lrintf in math.h
596cat > $TMPC << EOF
597#define _ISOC9X_SOURCE 1
598#include <math.h>
599int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
600EOF
601
602have_lrintf="no"
f3ec2d46 603if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
95e2ce4a 604 have_lrintf="yes"
f3ec2d46 605 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
95e2ce4a
MN
606fi
607
c13e1abd
FH
608_restrict=
609for restrict_keyword in restrict __restrict__ __restrict; do
610 echo "void foo(char * $restrict_keyword p);" > $TMPC
611 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
612 _restrict=$restrict_keyword
613 break;
614 fi
615done
616
52b41d7f
FB
617# test gcc version to see if vector builtins can be used
618# currently only used on i386 for MMX builtins
619cat > $TMPC << EOF
620int main(void) {
621#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
622return 0;
623#else
624#error no vector builtins
625#endif
626}
627EOF
628
629builtin_vector=no
630if $cc -o $TMPO $TMPC 2> /dev/null ; then
631 builtin_vector=yes
a8721c09
FB
632fi
633
634# dlopen/dlfcn.h probing
635
636cat > $TMPC << EOF
637#include <dlfcn.h>
638int main( void ) { return (int) dlopen("foo", 0); }
639EOF
640
641ldl=-ldl
642
643if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
644dlfcn=yes
645dlopen=yes
646fi
647
648if $cc -o $TMPE $TMPC 2> /dev/null ; then
649dlfcn=yes
650dlopen=yes
651ldl=""
652fi
653
654cat > $TMPC << EOF
655int main( void ) { return (int) dlopen("foo", 0); }
656EOF
657
658if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
659dlopen=yes
660fi
661
662if $cc -o $TMPE $TMPC 2> /dev/null ; then
663dlopen=yes
664ldl=""
665fi
666
667if test "$vhook" = "default" ; then
668 vhook="$dlopen"
669fi
670
a86b921c
FB
671##########################################
672# imlib probe
673
a8721c09
FB
674cat > $TMPC << EOF
675#include <X11/Xlib.h>
676#include <Imlib2.h>
677int main( void ) { return (int) imlib_load_font("foo"); }
678EOF
679
680imlib2=no
681if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
682imlib2=yes
52b41d7f
FB
683fi
684
a86b921c
FB
685##########################################
686# freetype probe
687
04511d53
PG
688cat > $TMPC << EOF
689#include <ft2build.h>
690int main( void ) { return (int) FT_Init_FreeType(0); }
691EOF
692
693freetype2=no
69db4e10 694if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
6e023978 695 if test "`which freetype-config`" != ""; then
04511d53 696 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
dee076fc 697 freetype2=yes
04511d53 698 fi
dee076fc 699 fi
04511d53
PG
700fi
701
a86b921c
FB
702##########################################
703# SDL probe
704
705cat > $TMPC << EOF
706#include <SDL.h>
31319a8c 707#undef main /* We don't want SDL to override our main() */
a86b921c
FB
708int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
709EOF
710
711sdl_too_old=no
712sdl=no
713if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
714_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
715if test "$_sdlversion" -lt 121 ; then
716sdl_too_old=yes
717else
718sdl=yes
719fi
720fi
721
94a3401e
FB
722if test "$sdl" = "no" ; then
723 ffplay=no
724fi
725
c9f97d82 726if test "$small" = "yes"; then
98ca7790 727# CFLAGS=${CFLAGS//-O3/-Os}
553a6284
MN
728 CFLAGS="$CFLAGS -Os"
729fi
730
23a65308
FB
731if test x"$mandir" = x""; then
732mandir="${prefix}/man"
733fi
734
6063bce7 735if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
0f3cb305
FB
736cat << EOF
737
738Usage: configure [options]
739Options: [defaults in brackets after descriptions]
740
741EOF
742echo "Standard options:"
743echo " --help print this message"
744echo " --prefix=PREFIX install in PREFIX [$prefix]"
23a65308 745echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
0f3cb305 746echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
81e0d0b4 747echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
0fc50e58
ZK
748echo " --enable-faad enable faad support via libfaad [default=no]"
749echo " --enable-faadbin build faad support with runtime linking [default=no]"
7eea5766 750echo " --enable-mingw32 enable mingw32 native/cross windows compile"
ba9261e5 751echo " --enable-a52 enable GPL'ed A52 support [default=no]"
0f3cb305 752echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
ba9261e5 753echo " --enable-pp enable GPL'ed post processing support [default=no]"
bba9b16c 754echo " --enable-shared-pp use libpostproc.so [default=no]"
0f3cb305 755echo " --enable-shared build shared libraries [default=no]"
bc634f6f
ZK
756echo " --enable-amr_nb enable amr_nb float audio codec"
757echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
f80f7964 758echo " --enable-sunmlib use Sun medialib [default=no]"
0f3cb305
FB
759echo ""
760echo "Advanced options (experts only):"
761echo " --source-path=PATH path of source code [$source_path]"
762echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
763echo " --cc=CC use C compiler CC [$cc]"
4a908fbc 764echo " --make=MAKE use specified make [$make]"
0f3cb305
FB
765echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
766echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
767echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
768echo " --cpu=CPU force cpu to CPU [$cpu]"
a4adb608 769echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
e45a2872 770echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
0f3cb305 771echo " --disable-mmx disable mmx usage"
ab6c65f6 772echo " --disable-altivec disable AltiVec usage"
5cbcf02c 773echo " --disable-audio-oss disable OSS audio support [default=no]"
dfdfa47c 774echo " --disable-audio-beos disable BeOS audio support [default=no]"
6063bce7 775echo " --disable-v4l disable video4linux grabbing [default=no]"
8aa3ee32 776echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
5cbcf02c 777echo " --disable-network disable network support [default=no]"
0147f198 778echo " --disable-zlib disable zlib [default=no]"
5cbcf02c 779echo " --disable-simple_idct disable simple IDCT routines [default=no]"
47930f09 780echo " --disable-vhook disable video hooking support"
0f3cb305 781echo " --enable-gprof enable profiling with gprof [$gprof]"
1eb2212e
FB
782echo " --disable-mpegaudio-hp faster (but less accurate)"
783echo " mpegaudio decoding [default=no]"
8154d2e0 784echo " --disable-ffserver disable ffserver build"
a86b921c 785echo " --disable-ffplay disable ffplay build"
1d0d55da 786echo " --disable-risky disables patent encumbered codecs"
553a6284 787echo " --enable-small optimize for size instead of speed"
0f3cb305
FB
788echo ""
789echo "NOTE: The object files are build at the place where configure is launched"
790exit 1
791fi
792
de6d9b64 793echo "Install prefix $prefix"
0f3cb305 794echo "Source path $source_path"
de6d9b64 795echo "C compiler $cc"
4a908fbc 796echo "make $make"
a4adb608 797echo "CPU $cpu ($tune)"
0f3cb305 798echo "Big Endian $bigendian"
e41e8342 799if test $cpu = "x86"; then
de6d9b64 800echo "MMX enabled $mmx"
52b41d7f 801echo "Vector Builtins $builtin_vector"
e41e8342
FB
802fi
803if test $cpu = "mips"; then
d46aba26 804echo "MMI enabled $mmi"
e41e8342
FB
805fi
806if test $cpu = "powerpc"; then
ab6c65f6 807echo "AltiVec enabled $altivec"
e41e8342 808fi
de6d9b64 809echo "gprof enabled $gprof"
0147f198 810echo "zlib enabled $zlib"
a6741398 811echo "mp3lame enabled $mp3lame"
81e0d0b4 812echo "vorbis enabled $vorbis"
445ad18d
ZK
813echo "faad enabled $faad"
814echo "faadbin enabled $faadbin"
5cbcf02c 815echo "a52 support $a52"
57514323 816echo "a52 dlopened $a52bin"
bba9b16c
MN
817echo "pp support $pp"
818echo "shared pp $shared_pp"
47930f09 819echo "Video hooking $vhook"
a86b921c
FB
820echo "SDL support $sdl"
821if test $sdl_too_old = "yes"; then
822echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
823fi
1d0d55da 824echo "risky / patent encumbered codecs $risky"
553a6284 825echo "optimize for size $small"
68892110
PG
826
827if test "$vhook" = "yes" ; then
47930f09 828echo "Imlib2 support $imlib2"
04511d53 829echo "freetype support $freetype2"
68892110 830fi
f80f7964 831echo "Sun medialib support" $sunmlib
bc634f6f
ZK
832echo "AMR-NB float support" $amr_nb
833echo "AMR-NB fixed support" $amr_nb_fixed
de6d9b64 834
980fc7b8 835echo "Creating config.mak and config.h"
de6d9b64 836
980fc7b8 837echo "# Automatically generated by configure - do not modify" > config.mak
045ed63f 838echo "/* Automatically generated by configure - do not modify */" > $TMPH
de6d9b64 839
980fc7b8 840echo "prefix=$prefix" >> config.mak
23a65308 841echo "mandir=$mandir" >> config.mak
4a908fbc 842echo "MAKE=$make" >> config.mak
980fc7b8
FB
843echo "CC=$cc" >> config.mak
844echo "AR=$ar" >> config.mak
be7109c1 845echo "RANLIB=$ranlib" >> config.mak
0f3cb305 846echo "STRIP=$strip" >> config.mak
a9b3f630 847echo "OPTFLAGS=$CFLAGS" >> config.mak
0f3cb305 848echo "LDFLAGS=$LDFLAGS" >> config.mak
4baca069 849echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
e1707f52 850echo "SHFLAGS=$SHFLAGS" >> config.mak
f3ec2d46
SG
851echo "LIBPREF=$LIBPREF" >> config.mak
852echo "LIBSUF=$LIBSUF" >> config.mak
853echo "SLIBPREF=$SLIBPREF" >> config.mak
854echo "SLIBSUF=$SLIBSUF" >> config.mak
6852ac95 855echo "TARGET_OS=$TARGET_OS" >> config.mak
57514323 856if test "$cpu" = "x86" ; then
980fc7b8 857 echo "TARGET_ARCH_X86=yes" >> config.mak
045ed63f 858 echo "#define ARCH_X86 1" >> $TMPH
0f3cb305 859elif test "$cpu" = "armv4l" ; then
6ed7422a 860 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
045ed63f 861 echo "#define ARCH_ARMV4L 1" >> $TMPH
0f3cb305 862elif test "$cpu" = "alpha" ; then
91d1f1a4 863 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
045ed63f 864 echo "#define ARCH_ALPHA 1" >> $TMPH
35fedfc3
PG
865elif test "$cpu" = "sparc64" ; then
866 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
867 echo "#define ARCH_SPARC64 1" >> $TMPH
0f3cb305
FB
868elif test "$cpu" = "powerpc" ; then
869 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
870 echo "#define ARCH_POWERPC 1" >> $TMPH
e45a2872
RD
871 if test "$powerpc_perf" = "yes"; then
872 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
873 fi
d46aba26
LS
874elif test "$cpu" = "mips" ; then
875 echo "TARGET_ARCH_MIPS=yes" >> config.mak
876 echo "#define ARCH_MIPS 1" >> $TMPH
bdb2e37c
AB
877elif test "$cpu" = "sh4" ; then
878 echo "TARGET_ARCH_SH4=yes" >> config.mak
879 echo "#define ARCH_SH4 1" >> $TMPH
880fi
a4adb608 881echo "#define TUNECPU $TUNECPU" >> $TMPH
0f3cb305
FB
882if test "$bigendian" = "yes" ; then
883 echo "WORDS_BIGENDIAN=yes" >> config.mak
884 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
91d1f1a4 885fi
57514323 886if test "$mmx" = "yes" ; then
980fc7b8 887 echo "TARGET_MMX=yes" >> config.mak
045ed63f 888 echo "#define HAVE_MMX 1" >> $TMPH
e82c5a8c 889 echo "#define __CPU__ 586" >> $TMPH
de6d9b64 890fi
a17236c5
MN
891if test "$mingw32" = "yes" ; then
892 echo "TARGET_MINGW32=yes" >> config.mak
893fi
52b41d7f
FB
894if test "$builtin_vector" = "yes" ; then
895 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
896 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
897fi
d46aba26
LS
898if test "$mmi" = "yes" ; then
899 echo "TARGET_MMI=yes" >> config.mak
900 echo "#define HAVE_MMI 1" >> $TMPH
901fi
ab6c65f6
BF
902if test "$altivec" = "yes" ; then
903 echo "TARGET_ALTIVEC=yes" >> config.mak
904 echo "#define HAVE_ALTIVEC 1" >> $TMPH
db40a39a
MN
905 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
906 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
a9a07762
MN
907 if test "$_altivec_h" = "yes" ; then
908 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
909 else
e67e14d5 910 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
a9a07762 911 fi
ab6c65f6 912fi
57514323 913if test "$gprof" = "yes" ; then
980fc7b8 914 echo "TARGET_GPROF=yes" >> config.mak
045ed63f 915 echo "#define HAVE_GPROF 1" >> $TMPH
de6d9b64 916fi
5e4639e2
GM
917if test "$localtime_r" = "yes" ; then
918 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
5e4639e2 919fi
68892110
PG
920if test "$imlib2" = "yes" ; then
921 echo "HAVE_IMLIB2=yes" >> config.mak
922fi
04511d53
PG
923if test "$freetype2" = "yes" ; then
924 echo "HAVE_FREETYPE2=yes" >> config.mak
925fi
f80f7964
RS
926if test "$sunmlib" = "yes" ; then
927 echo "HAVE_MLIB=yes" >> config.mak
928 echo "#define HAVE_MLIB 1" >> $TMPH
929 extralibs="$extralibs -lmlib"
930fi
a86b921c
FB
931if test "$sdl" = "yes" ; then
932 echo "CONFIG_SDL=yes" >> config.mak
933 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
934 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
935fi
95e2ce4a
MN
936if test "$have_lrintf" = "yes" ; then
937 echo "#define HAVE_LRINTF 1" >> $TMPH
938fi
68892110
PG
939if test "$vhook" = "yes" ; then
940 echo "BUILD_VHOOK=yes" >> config.mak
941 echo "#define HAVE_VHOOK 1" >> $TMPH
9c938e77 942 extralibs="$extralibs $ldl"
68892110 943fi
57514323 944if test "$lshared" = "yes" ; then
0319c531 945 echo "BUILD_SHARED=yes" >> config.mak
5cbcf02c 946 echo "PIC=-fPIC" >> config.mak
0319c531 947fi
ef0bc4c9 948echo "EXTRALIBS=$extralibs" >> config.mak
586bc755 949echo "VERSION=`head $source_path/VERSION`" >>config.mak
0319c531 950echo "" >>config.mak
d771bcae 951# if you do not want to use encoders, disable that.
045ed63f 952echo "#define CONFIG_ENCODERS 1" >> $TMPH
d771bcae
FB
953echo "CONFIG_ENCODERS=yes" >> config.mak
954
955# if you do not want to use decoders, disable that.
045ed63f 956echo "#define CONFIG_DECODERS 1" >> $TMPH
d771bcae
FB
957echo "CONFIG_DECODERS=yes" >> config.mak
958
5cbcf02c
FB
959# AC3
960if test "$a52" = "yes" ; then
961 echo "#define CONFIG_AC3 1" >> $TMPH
962 echo "CONFIG_AC3=yes" >> config.mak
d771bcae 963
5cbcf02c
FB
964 if test "$a52bin" = "yes" ; then
965 echo "#define CONFIG_A52BIN 1" >> $TMPH
966 echo "CONFIG_A52BIN=yes" >> config.mak
967 fi
968fi
969
bba9b16c
MN
970# PP
971if test "$pp" = "yes" ; then
972 echo "#define CONFIG_PP 1" >> $TMPH
973 echo "CONFIG_PP=yes" >> config.mak
974
975 if test "$shared_pp" = "yes" ; then
976 echo "#define SHARED_PP 1" >> $TMPH
977 echo "SHARED_PP=yes" >> config.mak
978 fi
979fi
980
1eb2212e
FB
981# mpeg audio high precision mode
982if test "$mpegaudio_hp" = "yes" ; then
983 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
984fi
985
5cbcf02c
FB
986if test "$v4l" = "yes" ; then
987 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
988 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
989fi
990
8aa3ee32
MK
991if test "$dv1394" = "yes" ; then
992 echo "#define CONFIG_DV1394 1" >> $TMPH
993 echo "CONFIG_DV1394=yes" >> config.mak
994fi
995
adbc0510
PG
996if test "$dlopen" = "yes" ; then
997 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
998fi
999
1000if test "$dlfcn" = "yes" ; then
1001 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1002fi
1003
5cbcf02c
FB
1004if test "$audio_oss" = "yes" ; then
1005 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1006 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
57514323
ZK
1007fi
1008
dfdfa47c
FR
1009if test "$audio_beos" = "yes" ; then
1010 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1011 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1012fi
1013
5cbcf02c
FB
1014if test "$network" = "yes" ; then
1015 echo "#define CONFIG_NETWORK 1" >> $TMPH
1016 echo "CONFIG_NETWORK=yes" >> config.mak
6ed7422a 1017fi
daf8e955 1018
0147f198
FR
1019if test "$zlib" = "yes" ; then
1020 echo "#define CONFIG_ZLIB 1" >> $TMPH
1021 echo "CONFIG_ZLIB=yes" >> config.mak
1022fi
1023
57514323 1024if test "$mp3lame" = "yes" ; then
045ed63f 1025 echo "#define CONFIG_MP3LAME 1" >> $TMPH
a6741398
J
1026 echo "CONFIG_MP3LAME=yes" >> config.mak
1027fi
1028
81e0d0b4
MH
1029if test "$vorbis" = "yes" ; then
1030 echo "#define CONFIG_VORBIS 1" >> $TMPH
1031 echo "CONFIG_VORBIS=yes" >> config.mak
1032fi
1033
0fc50e58
ZK
1034if test "$faad" = "yes" ; then
1035 echo "#define CONFIG_FAAD 1" >> $TMPH
1036 echo "CONFIG_FAAD=yes" >> config.mak
1037fi
1038
1039if test "$faadbin" = "yes" ; then
1040 echo "#define CONFIG_FAADBIN 1" >> $TMPH
445ad18d 1041 echo "CONFIG_FAADBIN=yes" >> config.mak
0fc50e58
ZK
1042fi
1043
732d9245
BE
1044if test "$mingw32" = "yes" ; then
1045 echo "#define CONFIG_WIN32 1" >> $TMPH
1046 echo "CONFIG_WIN32=yes" >> config.mak
7eea5766 1047 echo "#ifndef __MINGW32__" >> $TMPH
732d9245 1048 echo "#define __MINGW32__ 1" >> $TMPH
7eea5766 1049 echo "#endif" >> $TMPH
732d9245
BE
1050 echo "__MINGW32__=1" >> config.mak
1051fi
1052
3f027ca7
FB
1053if test "$cygwin" = "yes" ; then
1054 # setup correct exesuffix
1055 echo "CONFIG_WIN32=yes" >> config.mak
1056fi
1057
f3ec2d46
SG
1058if test "$os2" = "yes" ; then
1059 echo "#define CONFIG_OS2 1" >> $TMPH
1060 echo "CONFIG_OS2=yes" >> config.mak
1061fi
1062
6e023978
RS
1063if test "$TARGET_OS" = "SunOS" ; then
1064 echo "#define CONFIG_SUNOS 1" >> $TMPH
1065fi
1066
90cee0c3
MN
1067if test "$darwin" = "yes"; then
1068 echo "#define CONFIG_DARWIN 1" >> $TMPH
1069 echo "CONFIG_DARWIN=yes" >> config.mak
1070fi
1071
57514323 1072if test "$_malloc_h" = "yes" ; then
045ed63f 1073 echo "#define HAVE_MALLOC_H 1" >> $TMPH
3d204385 1074else
045ed63f 1075 echo "#undef HAVE_MALLOC_H" >> $TMPH
3d204385
NK
1076fi
1077
57514323 1078if test "$_memalign" = "yes" ; then
045ed63f
ZK
1079 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1080else
1081 echo "#undef HAVE_MEMALIGN" >> $TMPH
1082fi
1083
26b35efb
FR
1084if test "$netserver" = "yes" ; then
1085 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1086 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1087fi
1088
4baca069
PG
1089if test "$need_inet_aton" = "yes" ; then
1090 echo "NEED_INET_ATON=yes" >> config.mak
1091fi
1092
57514323 1093if test "$simpleidct" = "yes" ; then
045ed63f
ZK
1094 echo "#define SIMPLE_IDCT 1" >> $TMPH
1095fi
1096
8154d2e0
FB
1097if test "$ffserver" = "yes" ; then
1098 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1099 echo "CONFIG_FFSERVER=yes" >> config.mak
1100fi
1101
a86b921c
FB
1102if test "$ffplay" = "yes" ; then
1103 echo "CONFIG_FFPLAY=yes" >> config.mak
1104fi
1105
1d0d55da
MN
1106if test "$risky" = "yes" ; then
1107 echo "#define CONFIG_RISKY 1" >> $TMPH
1108 echo "CONFIG_RISKY=yes" >> config.mak
1109fi
1110
c13e1abd
FH
1111echo "#define restrict $_restrict" >> $TMPH
1112
0f3cb305
FB
1113# build tree in object directory if source path is different from current one
1114if test "$source_path_used" = "yes" ; then
a382b927 1115 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
5f6b58de
MR
1116 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1117 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
0f3cb305
FB
1118 for dir in $DIRS ; do
1119 mkdir -p $dir
1120 done
1121 for f in $FILES ; do
1122 ln -sf $source_path/$f $f
1123 done
1124fi
1125echo "SRC_PATH=$source_path" >> config.mak
1126
891f64b3 1127if test "$amr_nb" = "yes" ; then
1128 echo "#define AMR_NB 1" >> $TMPH
1129 echo "AMR_NB=yes" >> config.mak
1130 echo
bc634f6f
ZK
1131if test "$amr_nb_fixed" = "yes" ; then
1132 echo "AMR_NB_FIXED=yes" >> config.mak
1133 echo "#define AMR_NB_FIXED 1" >> $TMPH
1134 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1135 echo "REL-5 version 5.1.0 from "
891f64b3 1136 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1137 echo "and extracted src to libavcodec/amr"
bc634f6f
ZK
1138 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1139 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1140 echo
1141else
1142 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1143 echo "REL-5 V5.1.0 from "
1144 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1145 echo "and extracted the source to libavcodec/amr_float"
891f64b3 1146 echo
1147fi
1148
bc634f6f
ZK
1149fi
1150
a7c02e25 1151diff $TMPH config.h >/dev/null 2>&1
045ed63f
ZK
1152if test $? -ne 0 ; then
1153 mv -f $TMPH config.h
3d204385 1154else
045ed63f 1155 echo "config.h is unchanged"
3d204385
NK
1156fi
1157
f3ec2d46 1158rm -f $TMPO $TMPC $TMPE $TMPS $TMPH