MingW patches by (Glenn Maynard <g_sf at zewt dot org>)
[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"
5cbcf02c 73a52="yes"
57514323 74a52bin="no"
bba9b16c
MN
75pp="yes"
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 ;;
5cbcf02c 312 --disable-a52) a52="no"
6ed7422a 313 ;;
9c938e77 314 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
57514323 315 ;;
bba9b16c
MN
316 --disable-pp) pp="no"
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
PG
566cat > $TMPC << EOF
567#define _GNU_SOURCE
568#include <time.h>
569int main( void ) { return *strptime("", "", 0); }
570EOF
571
572strptime=no
f3ec2d46 573if $cc -o $TMPE $TMPC 2> /dev/null ; then
68892110
PG
574 strptime=yes
575fi
576
0147f198
FR
577if test "$zlib" = "yes"; then
578# check for zlib - mmu_man
579cat > $TMPC << EOF
580#include <zlib.h>
581int main ( void ) {
582if (zlibVersion() != ZLIB_VERSION)
583 puts("zlib version differs !!!");
584 return 1;
585return 0;
586}
587EOF
f3ec2d46
SG
588$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
589# $TMPE 2> /dev/null > /dev/null || zlib="no"
0147f198
FR
590# XXX: more tests needed - runtime test
591fi
592if test "$zlib" = "yes"; then
593extralibs="$extralibs -lz"
594fi
595
95e2ce4a
MN
596# test for lrintf in math.h
597cat > $TMPC << EOF
598#define _ISOC9X_SOURCE 1
599#include <math.h>
600int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
601EOF
602
603have_lrintf="no"
f3ec2d46 604if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
95e2ce4a 605 have_lrintf="yes"
f3ec2d46 606 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
95e2ce4a
MN
607fi
608
c13e1abd
FH
609_restrict=
610for restrict_keyword in restrict __restrict__ __restrict; do
611 echo "void foo(char * $restrict_keyword p);" > $TMPC
612 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
613 _restrict=$restrict_keyword
614 break;
615 fi
616done
617
52b41d7f
FB
618# test gcc version to see if vector builtins can be used
619# currently only used on i386 for MMX builtins
620cat > $TMPC << EOF
621int main(void) {
622#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
623return 0;
624#else
625#error no vector builtins
626#endif
627}
628EOF
629
630builtin_vector=no
631if $cc -o $TMPO $TMPC 2> /dev/null ; then
632 builtin_vector=yes
a8721c09
FB
633fi
634
635# dlopen/dlfcn.h probing
636
637cat > $TMPC << EOF
638#include <dlfcn.h>
639int main( void ) { return (int) dlopen("foo", 0); }
640EOF
641
642ldl=-ldl
643
644if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
645dlfcn=yes
646dlopen=yes
647fi
648
649if $cc -o $TMPE $TMPC 2> /dev/null ; then
650dlfcn=yes
651dlopen=yes
652ldl=""
653fi
654
655cat > $TMPC << EOF
656int main( void ) { return (int) dlopen("foo", 0); }
657EOF
658
659if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
660dlopen=yes
661fi
662
663if $cc -o $TMPE $TMPC 2> /dev/null ; then
664dlopen=yes
665ldl=""
666fi
667
668if test "$vhook" = "default" ; then
669 vhook="$dlopen"
670fi
671
a86b921c
FB
672##########################################
673# imlib probe
674
a8721c09
FB
675cat > $TMPC << EOF
676#include <X11/Xlib.h>
677#include <Imlib2.h>
678int main( void ) { return (int) imlib_load_font("foo"); }
679EOF
680
681imlib2=no
682if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
683imlib2=yes
52b41d7f
FB
684fi
685
a86b921c
FB
686##########################################
687# freetype probe
688
04511d53
PG
689cat > $TMPC << EOF
690#include <ft2build.h>
691int main( void ) { return (int) FT_Init_FreeType(0); }
692EOF
693
694freetype2=no
69db4e10 695if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
6e023978 696 if test "`which freetype-config`" != ""; then
04511d53 697 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
dee076fc 698 freetype2=yes
04511d53 699 fi
dee076fc 700 fi
04511d53
PG
701fi
702
a86b921c
FB
703##########################################
704# SDL probe
705
706cat > $TMPC << EOF
707#include <SDL.h>
31319a8c 708#undef main /* We don't want SDL to override our main() */
a86b921c
FB
709int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
710EOF
711
712sdl_too_old=no
713sdl=no
714if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
715_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
716if test "$_sdlversion" -lt 121 ; then
717sdl_too_old=yes
718else
719sdl=yes
720fi
721fi
722
94a3401e
FB
723if test "$sdl" = "no" ; then
724 ffplay=no
725fi
726
c9f97d82 727if test "$small" = "yes"; then
98ca7790 728# CFLAGS=${CFLAGS//-O3/-Os}
553a6284
MN
729 CFLAGS="$CFLAGS -Os"
730fi
731
23a65308
FB
732if test x"$mandir" = x""; then
733mandir="${prefix}/man"
734fi
735
6063bce7 736if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
0f3cb305
FB
737cat << EOF
738
739Usage: configure [options]
740Options: [defaults in brackets after descriptions]
741
742EOF
743echo "Standard options:"
744echo " --help print this message"
745echo " --prefix=PREFIX install in PREFIX [$prefix]"
23a65308 746echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
0f3cb305 747echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
81e0d0b4 748echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
0fc50e58
ZK
749echo " --enable-faad enable faad support via libfaad [default=no]"
750echo " --enable-faadbin build faad support with runtime linking [default=no]"
7eea5766 751echo " --enable-mingw32 enable mingw32 native/cross windows compile"
5cbcf02c 752echo " --disable-a52 disable GPL'ed A52 support [default=no]"
0f3cb305 753echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
bba9b16c
MN
754echo " --disable-pp disable GPL'ed post processing support [default=no]"
755echo " --enable-shared-pp use libpostproc.so [default=no]"
0f3cb305 756echo " --enable-shared build shared libraries [default=no]"
bc634f6f
ZK
757echo " --enable-amr_nb enable amr_nb float audio codec"
758echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
f80f7964 759echo " --enable-sunmlib use Sun medialib [default=no]"
0f3cb305
FB
760echo ""
761echo "Advanced options (experts only):"
762echo " --source-path=PATH path of source code [$source_path]"
763echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
764echo " --cc=CC use C compiler CC [$cc]"
4a908fbc 765echo " --make=MAKE use specified make [$make]"
0f3cb305
FB
766echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
767echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
768echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
769echo " --cpu=CPU force cpu to CPU [$cpu]"
a4adb608 770echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
e45a2872 771echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
0f3cb305 772echo " --disable-mmx disable mmx usage"
ab6c65f6 773echo " --disable-altivec disable AltiVec usage"
5cbcf02c 774echo " --disable-audio-oss disable OSS audio support [default=no]"
dfdfa47c 775echo " --disable-audio-beos disable BeOS audio support [default=no]"
6063bce7 776echo " --disable-v4l disable video4linux grabbing [default=no]"
8aa3ee32 777echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
5cbcf02c 778echo " --disable-network disable network support [default=no]"
0147f198 779echo " --disable-zlib disable zlib [default=no]"
5cbcf02c 780echo " --disable-simple_idct disable simple IDCT routines [default=no]"
47930f09 781echo " --disable-vhook disable video hooking support"
0f3cb305 782echo " --enable-gprof enable profiling with gprof [$gprof]"
1eb2212e
FB
783echo " --disable-mpegaudio-hp faster (but less accurate)"
784echo " mpegaudio decoding [default=no]"
8154d2e0 785echo " --disable-ffserver disable ffserver build"
a86b921c 786echo " --disable-ffplay disable ffplay build"
1d0d55da 787echo " --disable-risky disables patent encumbered codecs"
553a6284 788echo " --enable-small optimize for size instead of speed"
0f3cb305
FB
789echo ""
790echo "NOTE: The object files are build at the place where configure is launched"
791exit 1
792fi
793
de6d9b64 794echo "Install prefix $prefix"
0f3cb305 795echo "Source path $source_path"
de6d9b64 796echo "C compiler $cc"
4a908fbc 797echo "make $make"
a4adb608 798echo "CPU $cpu ($tune)"
0f3cb305 799echo "Big Endian $bigendian"
e41e8342 800if test $cpu = "x86"; then
de6d9b64 801echo "MMX enabled $mmx"
52b41d7f 802echo "Vector Builtins $builtin_vector"
e41e8342
FB
803fi
804if test $cpu = "mips"; then
d46aba26 805echo "MMI enabled $mmi"
e41e8342
FB
806fi
807if test $cpu = "powerpc"; then
ab6c65f6 808echo "AltiVec enabled $altivec"
e41e8342 809fi
de6d9b64 810echo "gprof enabled $gprof"
0147f198 811echo "zlib enabled $zlib"
a6741398 812echo "mp3lame enabled $mp3lame"
81e0d0b4 813echo "vorbis enabled $vorbis"
445ad18d
ZK
814echo "faad enabled $faad"
815echo "faadbin enabled $faadbin"
5cbcf02c 816echo "a52 support $a52"
57514323 817echo "a52 dlopened $a52bin"
bba9b16c
MN
818echo "pp support $pp"
819echo "shared pp $shared_pp"
47930f09 820echo "Video hooking $vhook"
a86b921c
FB
821echo "SDL support $sdl"
822if test $sdl_too_old = "yes"; then
823echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
824fi
1d0d55da 825echo "risky / patent encumbered codecs $risky"
553a6284 826echo "optimize for size $small"
68892110
PG
827
828if test "$vhook" = "yes" ; then
47930f09 829echo "Imlib2 support $imlib2"
04511d53 830echo "freetype support $freetype2"
68892110 831fi
f80f7964 832echo "Sun medialib support" $sunmlib
bc634f6f
ZK
833echo "AMR-NB float support" $amr_nb
834echo "AMR-NB fixed support" $amr_nb_fixed
de6d9b64 835
980fc7b8 836echo "Creating config.mak and config.h"
de6d9b64 837
980fc7b8 838echo "# Automatically generated by configure - do not modify" > config.mak
045ed63f 839echo "/* Automatically generated by configure - do not modify */" > $TMPH
de6d9b64 840
980fc7b8 841echo "prefix=$prefix" >> config.mak
23a65308 842echo "mandir=$mandir" >> config.mak
4a908fbc 843echo "MAKE=$make" >> config.mak
980fc7b8
FB
844echo "CC=$cc" >> config.mak
845echo "AR=$ar" >> config.mak
be7109c1 846echo "RANLIB=$ranlib" >> config.mak
0f3cb305 847echo "STRIP=$strip" >> config.mak
a9b3f630 848echo "OPTFLAGS=$CFLAGS" >> config.mak
0f3cb305 849echo "LDFLAGS=$LDFLAGS" >> config.mak
4baca069 850echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
e1707f52 851echo "SHFLAGS=$SHFLAGS" >> config.mak
f3ec2d46
SG
852echo "LIBPREF=$LIBPREF" >> config.mak
853echo "LIBSUF=$LIBSUF" >> config.mak
854echo "SLIBPREF=$SLIBPREF" >> config.mak
855echo "SLIBSUF=$SLIBSUF" >> config.mak
6852ac95 856echo "TARGET_OS=$TARGET_OS" >> config.mak
57514323 857if test "$cpu" = "x86" ; then
980fc7b8 858 echo "TARGET_ARCH_X86=yes" >> config.mak
045ed63f 859 echo "#define ARCH_X86 1" >> $TMPH
0f3cb305 860elif test "$cpu" = "armv4l" ; then
6ed7422a 861 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
045ed63f 862 echo "#define ARCH_ARMV4L 1" >> $TMPH
0f3cb305 863elif test "$cpu" = "alpha" ; then
91d1f1a4 864 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
045ed63f 865 echo "#define ARCH_ALPHA 1" >> $TMPH
35fedfc3
PG
866elif test "$cpu" = "sparc64" ; then
867 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
868 echo "#define ARCH_SPARC64 1" >> $TMPH
0f3cb305
FB
869elif test "$cpu" = "powerpc" ; then
870 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
871 echo "#define ARCH_POWERPC 1" >> $TMPH
e45a2872
RD
872 if test "$powerpc_perf" = "yes"; then
873 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
874 fi
d46aba26
LS
875elif test "$cpu" = "mips" ; then
876 echo "TARGET_ARCH_MIPS=yes" >> config.mak
877 echo "#define ARCH_MIPS 1" >> $TMPH
bdb2e37c
AB
878elif test "$cpu" = "sh4" ; then
879 echo "TARGET_ARCH_SH4=yes" >> config.mak
880 echo "#define ARCH_SH4 1" >> $TMPH
881fi
a4adb608 882echo "#define TUNECPU $TUNECPU" >> $TMPH
0f3cb305
FB
883if test "$bigendian" = "yes" ; then
884 echo "WORDS_BIGENDIAN=yes" >> config.mak
885 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
91d1f1a4 886fi
57514323 887if test "$mmx" = "yes" ; then
980fc7b8 888 echo "TARGET_MMX=yes" >> config.mak
045ed63f 889 echo "#define HAVE_MMX 1" >> $TMPH
e82c5a8c 890 echo "#define __CPU__ 586" >> $TMPH
de6d9b64 891fi
a17236c5
MN
892if test "$mingw32" = "yes" ; then
893 echo "TARGET_MINGW32=yes" >> config.mak
894fi
52b41d7f
FB
895if test "$builtin_vector" = "yes" ; then
896 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
897 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
898fi
d46aba26
LS
899if test "$mmi" = "yes" ; then
900 echo "TARGET_MMI=yes" >> config.mak
901 echo "#define HAVE_MMI 1" >> $TMPH
902fi
ab6c65f6
BF
903if test "$altivec" = "yes" ; then
904 echo "TARGET_ALTIVEC=yes" >> config.mak
905 echo "#define HAVE_ALTIVEC 1" >> $TMPH
db40a39a
MN
906 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
907 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
a9a07762
MN
908 if test "$_altivec_h" = "yes" ; then
909 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
910 else
e67e14d5 911 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
a9a07762 912 fi
ab6c65f6 913fi
57514323 914if test "$gprof" = "yes" ; then
980fc7b8 915 echo "TARGET_GPROF=yes" >> config.mak
045ed63f 916 echo "#define HAVE_GPROF 1" >> $TMPH
de6d9b64 917fi
68892110
PG
918if test "$strptime" = "yes" ; then
919 echo "#define HAVE_STRPTIME 1" >> $TMPH
920else
921 echo "BUILD_STRPTIME=yes" >> config.mak
922fi
923if test "$imlib2" = "yes" ; then
924 echo "HAVE_IMLIB2=yes" >> config.mak
925fi
04511d53
PG
926if test "$freetype2" = "yes" ; then
927 echo "HAVE_FREETYPE2=yes" >> config.mak
928fi
f80f7964
RS
929if test "$sunmlib" = "yes" ; then
930 echo "HAVE_MLIB=yes" >> config.mak
931 echo "#define HAVE_MLIB 1" >> $TMPH
932 extralibs="$extralibs -lmlib"
933fi
a86b921c
FB
934if test "$sdl" = "yes" ; then
935 echo "CONFIG_SDL=yes" >> config.mak
936 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
937 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
938fi
95e2ce4a
MN
939if test "$have_lrintf" = "yes" ; then
940 echo "#define HAVE_LRINTF 1" >> $TMPH
941fi
68892110
PG
942if test "$vhook" = "yes" ; then
943 echo "BUILD_VHOOK=yes" >> config.mak
944 echo "#define HAVE_VHOOK 1" >> $TMPH
9c938e77 945 extralibs="$extralibs $ldl"
68892110 946fi
57514323 947if test "$lshared" = "yes" ; then
0319c531 948 echo "BUILD_SHARED=yes" >> config.mak
5cbcf02c 949 echo "PIC=-fPIC" >> config.mak
0319c531 950fi
ef0bc4c9 951echo "EXTRALIBS=$extralibs" >> config.mak
586bc755 952echo "VERSION=`head $source_path/VERSION`" >>config.mak
0319c531 953echo "" >>config.mak
d771bcae 954# if you do not want to use encoders, disable that.
045ed63f 955echo "#define CONFIG_ENCODERS 1" >> $TMPH
d771bcae
FB
956echo "CONFIG_ENCODERS=yes" >> config.mak
957
958# if you do not want to use decoders, disable that.
045ed63f 959echo "#define CONFIG_DECODERS 1" >> $TMPH
d771bcae
FB
960echo "CONFIG_DECODERS=yes" >> config.mak
961
5cbcf02c
FB
962# AC3
963if test "$a52" = "yes" ; then
964 echo "#define CONFIG_AC3 1" >> $TMPH
965 echo "CONFIG_AC3=yes" >> config.mak
d771bcae 966
5cbcf02c
FB
967 if test "$a52bin" = "yes" ; then
968 echo "#define CONFIG_A52BIN 1" >> $TMPH
969 echo "CONFIG_A52BIN=yes" >> config.mak
970 fi
971fi
972
bba9b16c
MN
973# PP
974if test "$pp" = "yes" ; then
975 echo "#define CONFIG_PP 1" >> $TMPH
976 echo "CONFIG_PP=yes" >> config.mak
977
978 if test "$shared_pp" = "yes" ; then
979 echo "#define SHARED_PP 1" >> $TMPH
980 echo "SHARED_PP=yes" >> config.mak
981 fi
982fi
983
1eb2212e
FB
984# mpeg audio high precision mode
985if test "$mpegaudio_hp" = "yes" ; then
986 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
987fi
988
5cbcf02c
FB
989if test "$v4l" = "yes" ; then
990 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
991 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
992fi
993
8aa3ee32
MK
994if test "$dv1394" = "yes" ; then
995 echo "#define CONFIG_DV1394 1" >> $TMPH
996 echo "CONFIG_DV1394=yes" >> config.mak
997fi
998
adbc0510
PG
999if test "$dlopen" = "yes" ; then
1000 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1001fi
1002
1003if test "$dlfcn" = "yes" ; then
1004 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1005fi
1006
5cbcf02c
FB
1007if test "$audio_oss" = "yes" ; then
1008 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1009 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
57514323
ZK
1010fi
1011
dfdfa47c
FR
1012if test "$audio_beos" = "yes" ; then
1013 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1014 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1015fi
1016
5cbcf02c
FB
1017if test "$network" = "yes" ; then
1018 echo "#define CONFIG_NETWORK 1" >> $TMPH
1019 echo "CONFIG_NETWORK=yes" >> config.mak
6ed7422a 1020fi
daf8e955 1021
0147f198
FR
1022if test "$zlib" = "yes" ; then
1023 echo "#define CONFIG_ZLIB 1" >> $TMPH
1024 echo "CONFIG_ZLIB=yes" >> config.mak
1025fi
1026
57514323 1027if test "$mp3lame" = "yes" ; then
045ed63f 1028 echo "#define CONFIG_MP3LAME 1" >> $TMPH
a6741398
J
1029 echo "CONFIG_MP3LAME=yes" >> config.mak
1030fi
1031
81e0d0b4
MH
1032if test "$vorbis" = "yes" ; then
1033 echo "#define CONFIG_VORBIS 1" >> $TMPH
1034 echo "CONFIG_VORBIS=yes" >> config.mak
1035fi
1036
0fc50e58
ZK
1037if test "$faad" = "yes" ; then
1038 echo "#define CONFIG_FAAD 1" >> $TMPH
1039 echo "CONFIG_FAAD=yes" >> config.mak
1040fi
1041
1042if test "$faadbin" = "yes" ; then
1043 echo "#define CONFIG_FAADBIN 1" >> $TMPH
445ad18d 1044 echo "CONFIG_FAADBIN=yes" >> config.mak
0fc50e58
ZK
1045fi
1046
732d9245
BE
1047if test "$mingw32" = "yes" ; then
1048 echo "#define CONFIG_WIN32 1" >> $TMPH
1049 echo "CONFIG_WIN32=yes" >> config.mak
7eea5766 1050 echo "#ifndef __MINGW32__" >> $TMPH
732d9245 1051 echo "#define __MINGW32__ 1" >> $TMPH
7eea5766 1052 echo "#endif" >> $TMPH
732d9245
BE
1053 echo "__MINGW32__=1" >> config.mak
1054fi
1055
3f027ca7
FB
1056if test "$cygwin" = "yes" ; then
1057 # setup correct exesuffix
1058 echo "CONFIG_WIN32=yes" >> config.mak
1059fi
1060
f3ec2d46
SG
1061if test "$os2" = "yes" ; then
1062 echo "#define CONFIG_OS2 1" >> $TMPH
1063 echo "CONFIG_OS2=yes" >> config.mak
1064fi
1065
6e023978
RS
1066if test "$TARGET_OS" = "SunOS" ; then
1067 echo "#define CONFIG_SUNOS 1" >> $TMPH
1068fi
1069
90cee0c3
MN
1070if test "$darwin" = "yes"; then
1071 echo "#define CONFIG_DARWIN 1" >> $TMPH
1072 echo "CONFIG_DARWIN=yes" >> config.mak
1073fi
1074
57514323 1075if test "$_malloc_h" = "yes" ; then
045ed63f 1076 echo "#define HAVE_MALLOC_H 1" >> $TMPH
3d204385 1077else
045ed63f 1078 echo "#undef HAVE_MALLOC_H" >> $TMPH
3d204385
NK
1079fi
1080
57514323 1081if test "$_memalign" = "yes" ; then
045ed63f
ZK
1082 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1083else
1084 echo "#undef HAVE_MEMALIGN" >> $TMPH
1085fi
1086
26b35efb
FR
1087if test "$netserver" = "yes" ; then
1088 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1089 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1090fi
1091
4baca069
PG
1092if test "$need_inet_aton" = "yes" ; then
1093 echo "NEED_INET_ATON=yes" >> config.mak
1094fi
1095
57514323 1096if test "$simpleidct" = "yes" ; then
045ed63f
ZK
1097 echo "#define SIMPLE_IDCT 1" >> $TMPH
1098fi
1099
8154d2e0
FB
1100if test "$ffserver" = "yes" ; then
1101 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1102 echo "CONFIG_FFSERVER=yes" >> config.mak
1103fi
1104
a86b921c
FB
1105if test "$ffplay" = "yes" ; then
1106 echo "CONFIG_FFPLAY=yes" >> config.mak
1107fi
1108
1d0d55da
MN
1109if test "$risky" = "yes" ; then
1110 echo "#define CONFIG_RISKY 1" >> $TMPH
1111 echo "CONFIG_RISKY=yes" >> config.mak
1112fi
1113
c13e1abd
FH
1114echo "#define restrict $_restrict" >> $TMPH
1115
0f3cb305
FB
1116# build tree in object directory if source path is different from current one
1117if test "$source_path_used" = "yes" ; then
a382b927 1118 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
5f6b58de
MR
1119 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1120 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
0f3cb305
FB
1121 for dir in $DIRS ; do
1122 mkdir -p $dir
1123 done
1124 for f in $FILES ; do
1125 ln -sf $source_path/$f $f
1126 done
1127fi
1128echo "SRC_PATH=$source_path" >> config.mak
1129
891f64b3 1130if test "$amr_nb" = "yes" ; then
1131 echo "#define AMR_NB 1" >> $TMPH
1132 echo "AMR_NB=yes" >> config.mak
1133 echo
bc634f6f
ZK
1134if test "$amr_nb_fixed" = "yes" ; then
1135 echo "AMR_NB_FIXED=yes" >> config.mak
1136 echo "#define AMR_NB_FIXED 1" >> $TMPH
1137 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1138 echo "REL-5 version 5.1.0 from "
891f64b3 1139 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1140 echo "and extracted src to libavcodec/amr"
bc634f6f
ZK
1141 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1142 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1143 echo
1144else
1145 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1146 echo "REL-5 V5.1.0 from "
1147 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1148 echo "and extracted the source to libavcodec/amr_float"
891f64b3 1149 echo
1150fi
1151
bc634f6f
ZK
1152fi
1153
a7c02e25 1154diff $TMPH config.h >/dev/null 2>&1
045ed63f
ZK
1155if test $? -ne 0 ; then
1156 mv -f $TMPH config.h
3d204385 1157else
045ed63f 1158 echo "config.h is unchanged"
3d204385
NK
1159fi
1160
f3ec2d46 1161rm -f $TMPO $TMPC $TMPE $TMPS $TMPH