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