win32 compile fix
[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"
0f3cb305 22cross_prefix=""
de6d9b64
FB
23cc="gcc"
24ar="ar"
be7109c1 25ranlib="ranlib"
4a908fbc 26make="make"
0f3cb305 27strip="strip"
de6d9b64 28cpu=`uname -m`
a4adb608 29tune="generic"
e45a2872 30powerpc_perf="no"
0f3cb305 31mmx="default"
ab6c65f6 32altivec="default"
d46aba26 33mmi="default"
de6d9b64 34case "$cpu" in
ef0bc4c9 35 i386|i486|i586|i686|i86pc|BePC)
de6d9b64 36 cpu="x86"
de6d9b64 37 ;;
93caefc7
AB
38 # armv4l is a subset of armv5tel
39 armv4l|armv5tel)
6ed7422a 40 cpu="armv4l"
6ed7422a 41 ;;
91d1f1a4
NK
42 alpha)
43 cpu="alpha"
91d1f1a4 44 ;;
a43bd1d7 45 "Power Macintosh"|ppc)
90cee0c3
MN
46 cpu="powerpc"
47 ;;
d46aba26
LS
48 mips)
49 cpu="mips"
50 ;;
a7beab73
RS
51 sun4u)
52 cpu="sparc64"
53 ;;
bdb2e37c
AB
54 sh4)
55 cpu="sh4"
56 ;;
de6d9b64 57 *)
0f3cb305 58 cpu="unknown"
de6d9b64
FB
59 ;;
60esac
61gprof="no"
5cbcf02c
FB
62v4l="yes"
63audio_oss="yes"
dfdfa47c 64audio_beos="no"
8aa3ee32 65dv1394="yes"
5cbcf02c 66network="yes"
0147f198 67zlib="yes"
a6741398 68mp3lame="no"
81e0d0b4 69vorbis="no"
0fc50e58
ZK
70faad="no"
71faadbin="no"
5cbcf02c 72a52="yes"
57514323 73a52bin="no"
bba9b16c
MN
74pp="yes"
75shared_pp="no"
daf8e955 76win32="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"
194;;
3f027ca7
FB
195CYGWIN*)
196v4l="no"
197audio_oss="yes"
8aa3ee32 198dv1394="no"
3f027ca7
FB
199extralibs=""
200cygwin="yes"
201test -f /usr/include/inttypes.h || \
202test -f /usr/local/include/inttypes.h || \
203echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
204 "/usr/include/inttypes.h !!!"
205;;
b55e4ef4 206Linux)
4baca069 207LDFLAGS="$LDFLAGS -rdynamic"
b55e4ef4 208;;
f3ec2d46
SG
209OS/2)
210TMPE=$TMPE".exe"
69db4e10
SG
211ar="emxomfar -p64"
212ranlib="echo ignoring ranlib"
213strip="echo ignoring strip"
214CFLAGS="-Zomf -O3"
215LDFLAGS="-Zomf -Zstack 16384 -s"
f3ec2d46
SG
216SHFLAGS=""
217FFSLDFLAGS=""
218LIBPREF=""
219LIBSUF=".lib"
220SLIBPREF=""
221SLIBSUF=".dll"
222extralibs=""
223v4l="no"
224audio_oss="no"
8aa3ee32 225dv1394="no"
f3ec2d46
SG
226network="no"
227ffserver="no"
228os2="yes"
229;;
ef0bc4c9
FR
230*) ;;
231esac
de6d9b64 232
6852ac95
RD
233# From mplayer configure. We need TARGET_OS available
234# to the Makefile, so it can distinguish between flavors
235# of AltiVec on PowerPC
236TARGET_OS=`( uname -s ) 2>&1`
237 case "$TARGET_OS" in
238 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
239 ;;
240 IRIX*)
241 TARGET_OS=IRIX
242 ;;
243 HP-UX*)
244 TARGET_OS=HP-UX
245 ;;
246 [cC][yY][gG][wW][iI][nN]*)
247 TARGET_OS=CYGWIN
248 ;;
249 *)
250 TARGET_OS="$TARGET_OS-UNKNOWN"
251 ;;
252 esac
253
0f3cb305
FB
254# find source path
255# XXX: we assume an absolute path is given when launching configure,
256# except in './configure' case.
586bc755 257source_path="`echo $0 | sed -e 's#/configure##'`"
0f3cb305
FB
258source_path_used="yes"
259if test -z "$source_path" -o "$source_path" = "." ; then
260 source_path=`pwd`
261 source_path_used="no"
de6d9b64
FB
262fi
263
264for opt do
265 case "$opt" in
266 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
267 ;;
0f3cb305
FB
268 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
269 ;;
270 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
271 ;;
de6d9b64
FB
272 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
273 ;;
4a908fbc
AB
274 --make=*) make=`echo $opt | cut -d '=' -f 2`
275 ;;
0f3cb305
FB
276 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
277 ;;
278 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
279 ;;
280 --extra-libs=*) extralibs=${opt#--extra-libs=}
281 ;;
de6d9b64
FB
282 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
283 ;;
a4adb608
MN
284 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
285 ;;
e45a2872
RD
286 --powerpc-perf-enable) powerpc_perf="yes"
287 ;;
de6d9b64
FB
288 --disable-mmx) mmx="no"
289 ;;
ab6c65f6
BF
290 --disable-altivec) altivec="no"
291 ;;
de6d9b64
FB
292 --enable-gprof) gprof="yes"
293 ;;
5cbcf02c
FB
294 --disable-v4l) v4l="no"
295 ;;
296 --disable-audio-oss) audio_oss="no"
297 ;;
dfdfa47c
FR
298 --disable-audio-beos) audio_beos="no"
299 ;;
8aa3ee32
MK
300 --disable-dv1394) dv1394="no"
301 ;;
5cbcf02c
FB
302 --disable-network) network="no"
303 ;;
0147f198
FR
304 --disable-zlib) zlib="no"
305 ;;
5cbcf02c 306 --disable-a52) a52="no"
6ed7422a 307 ;;
9c938e77 308 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
57514323 309 ;;
bba9b16c
MN
310 --disable-pp) pp="no"
311 ;;
312 --enable-shared-pp) shared_pp="yes"
313 ;;
a6741398
J
314 --enable-mp3lame) mp3lame="yes"
315 ;;
81e0d0b4
MH
316 --enable-vorbis) vorbis="yes"
317 ;;
445ad18d
ZK
318 --enable-faad) faad="yes"
319 ;;
320 --enable-faadbin) faadbin="yes"
321 ;;
68892110
PG
322 --disable-vhook) vhook="no"
323 ;;
c02dbee1 324 --disable-simple_idct) simpleidct="no"
045ed63f 325 ;;
daf8e955
FB
326 --enable-win32) win32="yes"
327 ;;
732d9245
BE
328 --enable-mingw32) mingw32="yes"
329 ;;
83286d2a 330 --enable-shared) lshared="yes"
0319c531 331 ;;
1eb2212e
FB
332 --disable-mpegaudio-hp) mpegaudio_hp="no"
333 ;;
8154d2e0
FB
334 --disable-ffserver) ffserver="no"
335 ;;
a86b921c
FB
336 --disable-ffplay) ffplay="no"
337 ;;
1d0d55da
MN
338 --disable-risky) risky="no"
339 ;;
553a6284
MN
340 --enable-small) small="yes"
341 ;;
891f64b3 342 --enable-amr_nb) amr_nb="yes"
343 ;;
bc634f6f
ZK
344 --enable-amr_nb-fixed) amr_nb_fixed="yes"
345 ;;
f80f7964
RS
346 --enable-sunmlib) sunmlib="yes"
347 ;;
de6d9b64
FB
348 esac
349done
350
0f3cb305
FB
351# compute mmx state
352if test $mmx = "default"; then
353 if test $cpu = "x86"; then
354 mmx="yes"
355 else
356 mmx="no"
357 fi
358fi
359
ab6c65f6
BF
360# Can only do AltiVec on PowerPC
361if test $altivec = "default"; then
362 if test $cpu = "powerpc"; then
363 altivec="yes"
364 else
365 altivec="no"
366 fi
367fi
368
a4adb608
MN
369# Add processor-specific flags
370TUNECPU="generic"
371if test $tune != "generic"; then
372 case $tune in
373 601|ppc601|PowerPC601)
374 CFLAGS="$CFLAGS -mcpu=601"
375 if test $altivec = "yes"; then
376 echo "WARNING: tuning for PPC601 but altivec enabled !";
377 fi
378 TUNECPU=ppc601
379 ;;
380 603*|ppc603*|PowerPC603*)
381 CFLAGS="$CFLAGS -mcpu=603"
382 if test $altivec = "yes"; then
383 echo "WARNING: tuning for PPC603 but altivec enabled !";
384 fi
385 TUNECPU=ppc603
386 ;;
387 604*|ppc604*|PowerPC604*)
388 CFLAGS="$CFLAGS -mcpu=604"
389 if test $altivec = "yes"; then
390 echo "WARNING: tuning for PPC604 but altivec enabled !";
391 fi
392 TUNECPU=ppc604
393 ;;
8d6625b6 394 G3|g3|75*|ppc75*|PowerPC75*)
3efd4952 395 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
a4adb608
MN
396 if test $altivec = "yes"; then
397 echo "WARNING: tuning for PPC75x but altivec enabled !";
398 fi
399 TUNECPU=ppc750
400 ;;
8d6625b6 401 G4|g4|745*|ppc745*|PowerPC745*)
3efd4952
RD
402 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
403 if test $altivec = "no"; then
404 echo "WARNING: tuning for PPC745x but altivec disabled !";
405 fi
406 TUNECPU=ppc7450
407 ;;
408 74*|ppc74*|PowerPC74*)
409 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
a4adb608
MN
410 if test $altivec = "no"; then
411 echo "WARNING: tuning for PPC74xx but altivec disabled !";
412 fi
e45a2872 413 TUNECPU=ppc7400
a4adb608 414 ;;
8d6625b6 415 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
a4adb608
MN
416 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
417 if test $altivec = "no"; then
418 echo "WARNING: tuning for PPC970 but altivec disabled !";
419 fi
420 TUNECPU=ppc970
421 ;;
422 *)
423 echo "WARNING: unknown CPU "$tune", ignored"
424 ;;
425 esac
426fi
427
b6e52719
MD
428# AltiVec flags: The FSF version of GCC differs from the Darwin version
429if test $cpu = "powerpc"; then
430 if test $altivec = "yes"; then
431 if test "$darwin" = "yes"; then
432 CFLAGS="$CFLAGS -faltivec"
433 else
434 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
435 fi
436 fi
437fi
438
a9a07762
MN
439# See if we have <altivec.h>
440cat > $TMPC << EOF
441#include <altivec.h>
442int main( void ) { return 0; }
443EOF
444
445_altivec_h="no"
b6e52719 446if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
a9a07762
MN
447_altivec_h="yes"
448fi
449
ab6c65f6
BF
450# See does our compiler support Motorola AltiVec C API
451if test $altivec = "yes"; then
a9a07762 452if test $_altivec_h = "yes"; then
ab6c65f6 453cat > $TMPC << EOF
a9a07762 454#include <altivec.h>
ab6c65f6
BF
455int main(void) {
456 vector signed int v1, v2, v3;
457 v1 = vec_add(v2,v3);
458 return 0;
459}
460EOF
a9a07762
MN
461else
462cat > $TMPC << EOF
463int main(void) {
464 vector signed int v1, v2, v3;
465 v1 = vec_add(v2,v3);
466 return 0;
467}
468EOF
469fi
b6e52719 470$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
ab6c65f6
BF
471fi
472
d46aba26
LS
473# Can only do mmi on mips
474if test $mmi = "default"; then
475 if test $cpu = "mips"; then
476 mmi="yes"
477 else
478 mmi="no"
479 fi
480fi
481
482# See does our compiler support mmi
483if test $mmi = "yes"; then
484cat > $TMPC << EOF
485int main(void) {
486 __asm__ ("lq \$2, 0(\$2)");
487 return 0;
488}
489EOF
f3ec2d46 490$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
d46aba26
LS
491fi
492
daf8e955
FB
493# Checking for CFLAGS
494if test -z "$CFLAGS"; then
29482cb4 495 CFLAGS="-O3"
daf8e955
FB
496fi
497
57514323 498if test "$win32" = "yes" ; then
daf8e955 499 cross_prefix="i386-mingw32msvc-"
5cbcf02c
FB
500 v4l="no"
501 audio_oss="no"
8aa3ee32 502 dv1394="no"
5cbcf02c 503 network="no"
daf8e955
FB
504fi
505
732d9245
BE
506if test "$mingw32" = "yes" ; then
507 cross_prefix=""
508 v4l="no"
509 audio_oss="no"
8aa3ee32 510 dv1394="no"
732d9245
BE
511 network="no"
512fi
513
0f3cb305
FB
514cc="${cross_prefix}${cc}"
515ar="${cross_prefix}${ar}"
be7109c1 516ranlib="${cross_prefix}${ranlib}"
0f3cb305
FB
517strip="${cross_prefix}${strip}"
518
487a54d7
FB
519if test -z "$cross_prefix" ; then
520
3d204385 521# ---
a3999908
MN
522# big/little endian test
523cat > $TMPC << EOF
524#include <inttypes.h>
525int main(int argc, char ** argv){
526 volatile uint32_t i=0x01234567;
527 return (*((uint8_t*)(&i))) == 0x67;
528}
529EOF
530
f3ec2d46
SG
531if $cc -o $TMPE $TMPC 2>/dev/null ; then
532$TMPE && bigendian="yes"
a3999908
MN
533else
534echo big/little test failed
535fi
536
487a54d7
FB
537else
538
539# if cross compiling, cannot launch a program, so make a static guess
540if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
541 bigendian="yes"
542fi
543
544fi
545
a3999908 546# ---
3d204385
NK
547# check availability of some header files
548
549cat > $TMPC << EOF
550#include <malloc.h>
551int main( void ) { return 0; }
552EOF
553
554_memalign=no
555_malloc_h=no
f3ec2d46 556if $cc -o $TMPE $TMPC 2> /dev/null ; then
3d204385
NK
557_malloc_h=yes
558_memalign=yes
559# check for memalign - atmos
560cat > $TMPC << EOF
561#include <malloc.h>
562int main ( void ) {
563char *string = NULL;
564string = memalign(64, sizeof(char));
565return 0;
566}
567EOF
f3ec2d46 568$cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
3d204385
NK
569fi
570
68892110
PG
571cat > $TMPC << EOF
572#define _GNU_SOURCE
573#include <time.h>
574int main( void ) { return *strptime("", "", 0); }
575EOF
576
577strptime=no
f3ec2d46 578if $cc -o $TMPE $TMPC 2> /dev/null ; then
68892110
PG
579 strptime=yes
580fi
581
0147f198
FR
582if test "$zlib" = "yes"; then
583# check for zlib - mmu_man
584cat > $TMPC << EOF
585#include <zlib.h>
586int main ( void ) {
587if (zlibVersion() != ZLIB_VERSION)
588 puts("zlib version differs !!!");
589 return 1;
590return 0;
591}
592EOF
f3ec2d46
SG
593$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
594# $TMPE 2> /dev/null > /dev/null || zlib="no"
0147f198
FR
595# XXX: more tests needed - runtime test
596fi
597if test "$zlib" = "yes"; then
598extralibs="$extralibs -lz"
599fi
600
95e2ce4a
MN
601# test for lrintf in math.h
602cat > $TMPC << EOF
603#define _ISOC9X_SOURCE 1
604#include <math.h>
605int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
606EOF
607
608have_lrintf="no"
f3ec2d46 609if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
95e2ce4a 610 have_lrintf="yes"
f3ec2d46 611 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
95e2ce4a
MN
612fi
613
c13e1abd
FH
614_restrict=
615for restrict_keyword in restrict __restrict__ __restrict; do
616 echo "void foo(char * $restrict_keyword p);" > $TMPC
617 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
618 _restrict=$restrict_keyword
619 break;
620 fi
621done
622
52b41d7f
FB
623# test gcc version to see if vector builtins can be used
624# currently only used on i386 for MMX builtins
625cat > $TMPC << EOF
626int main(void) {
627#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
628return 0;
629#else
630#error no vector builtins
631#endif
632}
633EOF
634
635builtin_vector=no
636if $cc -o $TMPO $TMPC 2> /dev/null ; then
637 builtin_vector=yes
a8721c09
FB
638fi
639
640# dlopen/dlfcn.h probing
641
642cat > $TMPC << EOF
643#include <dlfcn.h>
644int main( void ) { return (int) dlopen("foo", 0); }
645EOF
646
647ldl=-ldl
648
649if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
650dlfcn=yes
651dlopen=yes
652fi
653
654if $cc -o $TMPE $TMPC 2> /dev/null ; then
655dlfcn=yes
656dlopen=yes
657ldl=""
658fi
659
660cat > $TMPC << EOF
661int main( void ) { return (int) dlopen("foo", 0); }
662EOF
663
664if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
665dlopen=yes
666fi
667
668if $cc -o $TMPE $TMPC 2> /dev/null ; then
669dlopen=yes
670ldl=""
671fi
672
673if test "$vhook" = "default" ; then
674 vhook="$dlopen"
675fi
676
a86b921c
FB
677##########################################
678# imlib probe
679
a8721c09
FB
680cat > $TMPC << EOF
681#include <X11/Xlib.h>
682#include <Imlib2.h>
683int main( void ) { return (int) imlib_load_font("foo"); }
684EOF
685
686imlib2=no
687if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
688imlib2=yes
52b41d7f
FB
689fi
690
a86b921c
FB
691##########################################
692# freetype probe
693
04511d53
PG
694cat > $TMPC << EOF
695#include <ft2build.h>
696int main( void ) { return (int) FT_Init_FreeType(0); }
697EOF
698
699freetype2=no
69db4e10 700if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
6e023978 701 if test "`which freetype-config`" != ""; then
04511d53 702 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
dee076fc 703 freetype2=yes
04511d53 704 fi
dee076fc 705 fi
04511d53
PG
706fi
707
a86b921c
FB
708##########################################
709# SDL probe
710
711cat > $TMPC << EOF
712#include <SDL.h>
31319a8c 713#undef main /* We don't want SDL to override our main() */
a86b921c
FB
714int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
715EOF
716
717sdl_too_old=no
718sdl=no
719if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
720_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
721if test "$_sdlversion" -lt 121 ; then
722sdl_too_old=yes
723else
724sdl=yes
725fi
726fi
727
94a3401e
FB
728if test "$sdl" = "no" ; then
729 ffplay=no
730fi
731
c9f97d82 732if test "$small" = "yes"; then
98ca7790 733# CFLAGS=${CFLAGS//-O3/-Os}
553a6284
MN
734 CFLAGS="$CFLAGS -Os"
735fi
736
6063bce7 737if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
0f3cb305
FB
738cat << EOF
739
740Usage: configure [options]
741Options: [defaults in brackets after descriptions]
742
743EOF
744echo "Standard options:"
745echo " --help print this message"
746echo " --prefix=PREFIX install in PREFIX [$prefix]"
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]"
0f3cb305 751echo " --enable-win32 enable win32 cross compile"
732d9245 752echo " --enable-mingw32 enable mingw32 native windows compile"
5cbcf02c 753echo " --disable-a52 disable GPL'ed A52 support [default=no]"
0f3cb305 754echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
bba9b16c
MN
755echo " --disable-pp disable GPL'ed post processing support [default=no]"
756echo " --enable-shared-pp use libpostproc.so [default=no]"
0f3cb305 757echo " --enable-shared build shared libraries [default=no]"
bc634f6f
ZK
758echo " --enable-amr_nb enable amr_nb float audio codec"
759echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
f80f7964 760echo " --enable-sunmlib use Sun medialib [default=no]"
0f3cb305
FB
761echo ""
762echo "Advanced options (experts only):"
763echo " --source-path=PATH path of source code [$source_path]"
764echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
765echo " --cc=CC use C compiler CC [$cc]"
4a908fbc 766echo " --make=MAKE use specified make [$make]"
0f3cb305
FB
767echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
768echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
769echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
770echo " --cpu=CPU force cpu to CPU [$cpu]"
a4adb608 771echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
e45a2872 772echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
0f3cb305 773echo " --disable-mmx disable mmx usage"
ab6c65f6 774echo " --disable-altivec disable AltiVec usage"
5cbcf02c 775echo " --disable-audio-oss disable OSS audio support [default=no]"
dfdfa47c 776echo " --disable-audio-beos disable BeOS audio support [default=no]"
6063bce7 777echo " --disable-v4l disable video4linux grabbing [default=no]"
8aa3ee32 778echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
5cbcf02c 779echo " --disable-network disable network support [default=no]"
0147f198 780echo " --disable-zlib disable zlib [default=no]"
5cbcf02c 781echo " --disable-simple_idct disable simple IDCT routines [default=no]"
47930f09 782echo " --disable-vhook disable video hooking support"
0f3cb305 783echo " --enable-gprof enable profiling with gprof [$gprof]"
1eb2212e
FB
784echo " --disable-mpegaudio-hp faster (but less accurate)"
785echo " mpegaudio decoding [default=no]"
8154d2e0 786echo " --disable-ffserver disable ffserver build"
a86b921c 787echo " --disable-ffplay disable ffplay build"
1d0d55da 788echo " --disable-risky disables patent encumbered codecs"
553a6284 789echo " --enable-small optimize for size instead of speed"
0f3cb305
FB
790echo ""
791echo "NOTE: The object files are build at the place where configure is launched"
792exit 1
793fi
794
de6d9b64 795echo "Install prefix $prefix"
0f3cb305 796echo "Source path $source_path"
de6d9b64 797echo "C compiler $cc"
4a908fbc 798echo "make $make"
a4adb608 799echo "CPU $cpu ($tune)"
0f3cb305 800echo "Big Endian $bigendian"
e41e8342 801if test $cpu = "x86"; then
de6d9b64 802echo "MMX enabled $mmx"
52b41d7f 803echo "Vector Builtins $builtin_vector"
e41e8342
FB
804fi
805if test $cpu = "mips"; then
d46aba26 806echo "MMI enabled $mmi"
e41e8342
FB
807fi
808if test $cpu = "powerpc"; then
ab6c65f6 809echo "AltiVec enabled $altivec"
e41e8342 810fi
de6d9b64 811echo "gprof enabled $gprof"
0147f198 812echo "zlib enabled $zlib"
a6741398 813echo "mp3lame enabled $mp3lame"
81e0d0b4 814echo "vorbis enabled $vorbis"
445ad18d
ZK
815echo "faad enabled $faad"
816echo "faadbin enabled $faadbin"
5cbcf02c 817echo "a52 support $a52"
57514323 818echo "a52 dlopened $a52bin"
bba9b16c
MN
819echo "pp support $pp"
820echo "shared pp $shared_pp"
47930f09 821echo "Video hooking $vhook"
a86b921c
FB
822echo "SDL support $sdl"
823if test $sdl_too_old = "yes"; then
824echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
825fi
1d0d55da 826echo "risky / patent encumbered codecs $risky"
553a6284 827echo "optimize for size $small"
68892110
PG
828
829if test "$vhook" = "yes" ; then
47930f09 830echo "Imlib2 support $imlib2"
04511d53 831echo "freetype support $freetype2"
68892110 832fi
f80f7964 833echo "Sun medialib support" $sunmlib
bc634f6f
ZK
834echo "AMR-NB float support" $amr_nb
835echo "AMR-NB fixed support" $amr_nb_fixed
de6d9b64 836
980fc7b8 837echo "Creating config.mak and config.h"
de6d9b64 838
980fc7b8 839echo "# Automatically generated by configure - do not modify" > config.mak
045ed63f 840echo "/* Automatically generated by configure - do not modify */" > $TMPH
de6d9b64 841
980fc7b8 842echo "prefix=$prefix" >> 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
52b41d7f
FB
892if test "$builtin_vector" = "yes" ; then
893 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
894 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
895fi
d46aba26
LS
896if test "$mmi" = "yes" ; then
897 echo "TARGET_MMI=yes" >> config.mak
898 echo "#define HAVE_MMI 1" >> $TMPH
899fi
ab6c65f6
BF
900if test "$altivec" = "yes" ; then
901 echo "TARGET_ALTIVEC=yes" >> config.mak
902 echo "#define HAVE_ALTIVEC 1" >> $TMPH
db40a39a
MN
903 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
904 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
a9a07762
MN
905 if test "$_altivec_h" = "yes" ; then
906 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
907 else
e67e14d5 908 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
a9a07762 909 fi
ab6c65f6 910fi
57514323 911if test "$gprof" = "yes" ; then
980fc7b8 912 echo "TARGET_GPROF=yes" >> config.mak
045ed63f 913 echo "#define HAVE_GPROF 1" >> $TMPH
de6d9b64 914fi
68892110
PG
915if test "$strptime" = "yes" ; then
916 echo "#define HAVE_STRPTIME 1" >> $TMPH
917else
918 echo "BUILD_STRPTIME=yes" >> config.mak
919fi
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
57514323 1044if test "$win32" = "yes" ; then
045ed63f 1045 echo "#define CONFIG_WIN32 1" >> $TMPH
daf8e955
FB
1046 echo "CONFIG_WIN32=yes" >> config.mak
1047fi
3d204385 1048
732d9245
BE
1049if test "$mingw32" = "yes" ; then
1050 echo "#define CONFIG_WIN32 1" >> $TMPH
1051 echo "CONFIG_WIN32=yes" >> config.mak
1052 echo "#define __MINGW32__ 1" >> $TMPH
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