support forcing low_delay during decoding
[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"
16TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
17TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
18
de6d9b64
FB
19# default parameters
20prefix="/usr/local"
0f3cb305 21cross_prefix=""
de6d9b64
FB
22cc="gcc"
23ar="ar"
be7109c1 24ranlib="ranlib"
4a908fbc 25make="make"
0f3cb305 26strip="strip"
de6d9b64 27cpu=`uname -m`
0f3cb305 28mmx="default"
ab6c65f6 29altivec="default"
d46aba26 30mmi="default"
de6d9b64 31case "$cpu" in
ef0bc4c9 32 i386|i486|i586|i686|i86pc|BePC)
de6d9b64 33 cpu="x86"
de6d9b64 34 ;;
6ed7422a
FB
35 armv4l)
36 cpu="armv4l"
6ed7422a 37 ;;
91d1f1a4
NK
38 alpha)
39 cpu="alpha"
91d1f1a4 40 ;;
a43bd1d7 41 "Power Macintosh"|ppc)
90cee0c3
MN
42 cpu="powerpc"
43 ;;
d46aba26
LS
44 mips)
45 cpu="mips"
46 ;;
de6d9b64 47 *)
0f3cb305 48 cpu="unknown"
de6d9b64
FB
49 ;;
50esac
51gprof="no"
5cbcf02c
FB
52v4l="yes"
53audio_oss="yes"
54network="yes"
0147f198 55zlib="yes"
a6741398 56mp3lame="no"
81e0d0b4 57vorbis="no"
5cbcf02c 58a52="yes"
57514323 59a52bin="no"
daf8e955 60win32="no"
3f027ca7 61cygwin="no"
83286d2a 62lshared="no"
ef0bc4c9 63extralibs="-lm"
c02dbee1 64simpleidct="yes"
0f3cb305 65bigendian="no"
68892110 66vhook="no"
1eb2212e 67mpegaudio_hp="yes"
e1707f52 68SHFLAGS=-shared
26b35efb 69netserver="no"
ef0bc4c9
FR
70
71# OS specific
72targetos=`uname -s`
73case $targetos in
74BeOS)
75prefix="/boot/home/config"
76# helps building libavcodec
e1707f52
MN
77CFLAGS="-O3 -DPIC -fomit-frame-pointer"
78SHFLAGS=-nostart
79# disable linux things
80audio_oss="no"
5cbcf02c 81v4l="no"
ef0bc4c9
FR
82# no need for libm, but the inet stuff
83# Check for BONE
84if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
85extralibs="-lbind -lsocket"
86else
26b35efb
FR
87netserver="yes"
88extralibs="-lnet"
ef0bc4c9 89fi ;;
4a908fbc 90BSD/OS)
5cbcf02c 91v4l="no"
6063bce7 92audio_oss="yes"
4a908fbc
AB
93extralibs="-lpoll -lgnugetopt -lm"
94make="gmake"
95;;
90cee0c3 96Darwin)
a43bd1d7 97cc="cc"
90cee0c3
MN
98v4l="no"
99audio_oss="no"
80663785 100CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
a43bd1d7 101SHFLAGS="-dynamiclib"
90cee0c3 102extralibs=""
a43bd1d7 103darwin="yes"
90cee0c3 104;;
3f027ca7
FB
105CYGWIN*)
106v4l="no"
107audio_oss="yes"
108extralibs=""
109cygwin="yes"
110test -f /usr/include/inttypes.h || \
111test -f /usr/local/include/inttypes.h || \
112echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
113 "/usr/include/inttypes.h !!!"
114;;
ef0bc4c9
FR
115*) ;;
116esac
de6d9b64 117
0f3cb305
FB
118# find source path
119# XXX: we assume an absolute path is given when launching configure,
120# except in './configure' case.
121source_path=${0%configure}
122source_path=${source_path%/}
123source_path_used="yes"
124if test -z "$source_path" -o "$source_path" = "." ; then
125 source_path=`pwd`
126 source_path_used="no"
de6d9b64
FB
127fi
128
68892110
PG
129cat > $TMPC << EOF
130#include <dlfcn.h>
131int main( void ) { return (int) dlopen("foo", 0); }
132EOF
133
134if $cc -o $TMPO $TMPC -ldl 2> /dev/null ; then
135: vhook=yes
136fi
137
138cat > $TMPC << EOF
139#include <X11/Xlib.h>
140#include <Imlib2.h>
141int main( void ) { return (int) imlib_load_font("foo"); }
142EOF
143
144imlib2=no
145if $cc -o $TMPO $TMPC -lImlib2 2> /dev/null ; then
146imlib2=yes
147fi
148
de6d9b64
FB
149for opt do
150 case "$opt" in
151 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
152 ;;
0f3cb305
FB
153 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
154 ;;
155 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
156 ;;
de6d9b64
FB
157 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
158 ;;
4a908fbc
AB
159 --make=*) make=`echo $opt | cut -d '=' -f 2`
160 ;;
0f3cb305
FB
161 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
162 ;;
163 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
164 ;;
165 --extra-libs=*) extralibs=${opt#--extra-libs=}
166 ;;
de6d9b64
FB
167 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
168 ;;
169 --disable-mmx) mmx="no"
170 ;;
ab6c65f6
BF
171 --disable-altivec) altivec="no"
172 ;;
de6d9b64
FB
173 --enable-gprof) gprof="yes"
174 ;;
5cbcf02c
FB
175 --disable-v4l) v4l="no"
176 ;;
177 --disable-audio-oss) audio_oss="no"
178 ;;
179 --disable-network) network="no"
180 ;;
0147f198
FR
181 --disable-zlib) zlib="no"
182 ;;
5cbcf02c 183 --disable-a52) a52="no"
6ed7422a 184 ;;
57514323
ZK
185 --enable-a52bin) a52bin="yes" ; extralibs="-ldl $extralibs"
186 ;;
a6741398
J
187 --enable-mp3lame) mp3lame="yes"
188 ;;
81e0d0b4
MH
189 --enable-vorbis) vorbis="yes"
190 ;;
68892110
PG
191 --disable-vhook) vhook="no"
192 ;;
c02dbee1 193 --disable-simple_idct) simpleidct="no"
045ed63f 194 ;;
daf8e955
FB
195 --enable-win32) win32="yes"
196 ;;
83286d2a 197 --enable-shared) lshared="yes"
0319c531 198 ;;
1eb2212e
FB
199 --disable-mpegaudio-hp) mpegaudio_hp="no"
200 ;;
de6d9b64
FB
201 esac
202done
203
0f3cb305
FB
204# compute mmx state
205if test $mmx = "default"; then
206 if test $cpu = "x86"; then
207 mmx="yes"
208 else
209 mmx="no"
210 fi
211fi
212
ab6c65f6
BF
213# Can only do AltiVec on PowerPC
214if test $altivec = "default"; then
215 if test $cpu = "powerpc"; then
216 altivec="yes"
217 else
218 altivec="no"
219 fi
220fi
221
222# See does our compiler support Motorola AltiVec C API
223if test $altivec = "yes"; then
224cat > $TMPC << EOF
225int main(void) {
226 vector signed int v1, v2, v3;
227 v1 = vec_add(v2,v3);
228 return 0;
229}
230EOF
231$cc -o $TMPO $TMPC -faltivec 2> /dev/null || altivec="no"
232fi
233
d46aba26
LS
234# Can only do mmi on mips
235if test $mmi = "default"; then
236 if test $cpu = "mips"; then
237 mmi="yes"
238 else
239 mmi="no"
240 fi
241fi
242
243# See does our compiler support mmi
244if test $mmi = "yes"; then
245cat > $TMPC << EOF
246int main(void) {
247 __asm__ ("lq \$2, 0(\$2)");
248 return 0;
249}
250EOF
251$cc -o $TMPO $TMPC 2> /dev/null || mmi="no"
252fi
253
daf8e955
FB
254# Checking for CFLAGS
255if test -z "$CFLAGS"; then
29482cb4 256 CFLAGS="-O3"
daf8e955
FB
257fi
258
57514323 259if test "$win32" = "yes" ; then
daf8e955 260 cross_prefix="i386-mingw32msvc-"
5cbcf02c
FB
261 v4l="no"
262 audio_oss="no"
263 network="no"
daf8e955
FB
264fi
265
0f3cb305
FB
266cc="${cross_prefix}${cc}"
267ar="${cross_prefix}${ar}"
be7109c1 268ranlib="${cross_prefix}${ranlib}"
0f3cb305
FB
269strip="${cross_prefix}${strip}"
270
487a54d7
FB
271if test -z "$cross_prefix" ; then
272
3d204385 273# ---
a3999908
MN
274# big/little endian test
275cat > $TMPC << EOF
276#include <inttypes.h>
277int main(int argc, char ** argv){
278 volatile uint32_t i=0x01234567;
279 return (*((uint8_t*)(&i))) == 0x67;
280}
281EOF
282
283if $cc -o $TMPO $TMPC 2>/dev/null ; then
284$TMPO && bigendian="yes"
285else
286echo big/little test failed
287fi
288
487a54d7
FB
289else
290
291# if cross compiling, cannot launch a program, so make a static guess
292if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
293 bigendian="yes"
294fi
295
296fi
297
a3999908 298# ---
3d204385
NK
299# check availability of some header files
300
301cat > $TMPC << EOF
302#include <malloc.h>
303int main( void ) { return 0; }
304EOF
305
306_memalign=no
307_malloc_h=no
308if $cc -o $TMPO $TMPC 2> /dev/null ; then
309_malloc_h=yes
310_memalign=yes
311# check for memalign - atmos
312cat > $TMPC << EOF
313#include <malloc.h>
314int main ( void ) {
315char *string = NULL;
316string = memalign(64, sizeof(char));
317return 0;
318}
319EOF
320$cc -o $TMPO $TMPC 2> /dev/null || _memalign=no
321fi
322
68892110
PG
323cat > $TMPC << EOF
324#define _GNU_SOURCE
325#include <time.h>
326int main( void ) { return *strptime("", "", 0); }
327EOF
328
329strptime=no
330if $cc -o $TMPO $TMPC 2> /dev/null ; then
331 strptime=yes
332fi
333
0147f198
FR
334if test "$zlib" = "yes"; then
335# check for zlib - mmu_man
336cat > $TMPC << EOF
337#include <zlib.h>
338int main ( void ) {
339if (zlibVersion() != ZLIB_VERSION)
340 puts("zlib version differs !!!");
341 return 1;
342return 0;
343}
344EOF
345$cc -o $TMPO $TMPC -lz 2> /dev/null || zlib="no"
346# $TMPO 2> /dev/null > /dev/null || zlib="no"
347# XXX: more tests needed - runtime test
348fi
349if test "$zlib" = "yes"; then
350extralibs="$extralibs -lz"
351fi
352
c13e1abd
FH
353_restrict=
354for restrict_keyword in restrict __restrict__ __restrict; do
355 echo "void foo(char * $restrict_keyword p);" > $TMPC
356 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
357 _restrict=$restrict_keyword
358 break;
359 fi
360done
361
6063bce7 362if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
0f3cb305
FB
363cat << EOF
364
365Usage: configure [options]
366Options: [defaults in brackets after descriptions]
367
368EOF
369echo "Standard options:"
370echo " --help print this message"
371echo " --prefix=PREFIX install in PREFIX [$prefix]"
0f3cb305 372echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
81e0d0b4 373echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
0f3cb305 374echo " --enable-win32 enable win32 cross compile"
5cbcf02c 375echo " --disable-a52 disable GPL'ed A52 support [default=no]"
0f3cb305
FB
376echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
377echo " --enable-shared build shared libraries [default=no]"
378echo ""
379echo "Advanced options (experts only):"
380echo " --source-path=PATH path of source code [$source_path]"
381echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
382echo " --cc=CC use C compiler CC [$cc]"
4a908fbc 383echo " --make=MAKE use specified make [$make]"
0f3cb305
FB
384echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
385echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
386echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
387echo " --cpu=CPU force cpu to CPU [$cpu]"
388echo " --disable-mmx disable mmx usage"
ab6c65f6 389echo " --disable-altivec disable AltiVec usage"
5cbcf02c 390echo " --disable-audio-oss disable OSS audio support [default=no]"
6063bce7 391echo " --disable-v4l disable video4linux grabbing [default=no]"
5cbcf02c 392echo " --disable-network disable network support [default=no]"
0147f198 393echo " --disable-zlib disable zlib [default=no]"
5cbcf02c 394echo " --disable-simple_idct disable simple IDCT routines [default=no]"
68892110 395# echo " --disable-vhook disable video hooking support"
0f3cb305 396echo " --enable-gprof enable profiling with gprof [$gprof]"
1eb2212e
FB
397echo " --disable-mpegaudio-hp faster (but less accurate)"
398echo " mpegaudio decoding [default=no]"
0f3cb305
FB
399echo ""
400echo "NOTE: The object files are build at the place where configure is launched"
401exit 1
402fi
403
de6d9b64 404echo "Install prefix $prefix"
0f3cb305 405echo "Source path $source_path"
de6d9b64 406echo "C compiler $cc"
4a908fbc 407echo "make $make"
de6d9b64 408echo "CPU $cpu"
0f3cb305 409echo "Big Endian $bigendian"
e41e8342 410if test $cpu = "x86"; then
de6d9b64 411echo "MMX enabled $mmx"
e41e8342
FB
412fi
413if test $cpu = "mips"; then
d46aba26 414echo "MMI enabled $mmi"
e41e8342
FB
415fi
416if test $cpu = "powerpc"; then
ab6c65f6 417echo "AltiVec enabled $altivec"
e41e8342 418fi
de6d9b64 419echo "gprof enabled $gprof"
0147f198 420echo "zlib enabled $zlib"
a6741398 421echo "mp3lame enabled $mp3lame"
81e0d0b4 422echo "vorbis enabled $vorbis"
5cbcf02c 423echo "a52 support $a52"
57514323 424echo "a52 dlopened $a52bin"
68892110
PG
425# echo "Video hooking $vhook"
426
427if test "$vhook" = "yes" ; then
428: echo "Imlib2 support $imlib2"
429fi
de6d9b64 430
980fc7b8 431echo "Creating config.mak and config.h"
de6d9b64 432
980fc7b8 433echo "# Automatically generated by configure - do not modify" > config.mak
045ed63f 434echo "/* Automatically generated by configure - do not modify */" > $TMPH
de6d9b64 435
980fc7b8 436echo "prefix=$prefix" >> config.mak
4a908fbc 437echo "MAKE=$make" >> config.mak
980fc7b8
FB
438echo "CC=$cc" >> config.mak
439echo "AR=$ar" >> config.mak
be7109c1 440echo "RANLIB=$ranlib" >> config.mak
0f3cb305 441echo "STRIP=$strip" >> config.mak
a9b3f630 442echo "OPTFLAGS=$CFLAGS" >> config.mak
0f3cb305 443echo "LDFLAGS=$LDFLAGS" >> config.mak
e1707f52 444echo "SHFLAGS=$SHFLAGS" >> config.mak
57514323 445if test "$cpu" = "x86" ; then
980fc7b8 446 echo "TARGET_ARCH_X86=yes" >> config.mak
045ed63f 447 echo "#define ARCH_X86 1" >> $TMPH
0f3cb305 448elif test "$cpu" = "armv4l" ; then
6ed7422a 449 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
045ed63f 450 echo "#define ARCH_ARMV4L 1" >> $TMPH
0f3cb305 451elif test "$cpu" = "alpha" ; then
91d1f1a4 452 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
045ed63f 453 echo "#define ARCH_ALPHA 1" >> $TMPH
0f3cb305
FB
454elif test "$cpu" = "powerpc" ; then
455 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
456 echo "#define ARCH_POWERPC 1" >> $TMPH
d46aba26
LS
457elif test "$cpu" = "mips" ; then
458 echo "TARGET_ARCH_MIPS=yes" >> config.mak
459 echo "#define ARCH_MIPS 1" >> $TMPH
0f3cb305
FB
460fi
461if test "$bigendian" = "yes" ; then
462 echo "WORDS_BIGENDIAN=yes" >> config.mak
463 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
91d1f1a4 464fi
57514323 465if test "$mmx" = "yes" ; then
980fc7b8 466 echo "TARGET_MMX=yes" >> config.mak
045ed63f 467 echo "#define HAVE_MMX 1" >> $TMPH
de6d9b64 468fi
d46aba26
LS
469if test "$mmi" = "yes" ; then
470 echo "TARGET_MMI=yes" >> config.mak
471 echo "#define HAVE_MMI 1" >> $TMPH
472fi
ab6c65f6
BF
473if test "$altivec" = "yes" ; then
474 echo "TARGET_ALTIVEC=yes" >> config.mak
475 echo "#define HAVE_ALTIVEC 1" >> $TMPH
476fi
57514323 477if test "$gprof" = "yes" ; then
980fc7b8 478 echo "TARGET_GPROF=yes" >> config.mak
045ed63f 479 echo "#define HAVE_GPROF 1" >> $TMPH
de6d9b64 480fi
68892110
PG
481if test "$strptime" = "yes" ; then
482 echo "#define HAVE_STRPTIME 1" >> $TMPH
483else
484 echo "BUILD_STRPTIME=yes" >> config.mak
485fi
486if test "$imlib2" = "yes" ; then
487 echo "HAVE_IMLIB2=yes" >> config.mak
488fi
489if test "$vhook" = "yes" ; then
490 echo "BUILD_VHOOK=yes" >> config.mak
491 echo "#define HAVE_VHOOK 1" >> $TMPH
492 extralibs="$extralibs -ldl"
493fi
57514323 494if test "$lshared" = "yes" ; then
0319c531 495 echo "BUILD_SHARED=yes" >> config.mak
5cbcf02c 496 echo "PIC=-fPIC" >> config.mak
0319c531 497fi
ef0bc4c9 498echo "EXTRALIBS=$extralibs" >> config.mak
0319c531 499echo -n "VERSION=" >>config.mak
0f3cb305 500head $source_path/VERSION >>config.mak
0319c531 501echo "" >>config.mak
d771bcae 502# if you do not want to use encoders, disable that.
045ed63f 503echo "#define CONFIG_ENCODERS 1" >> $TMPH
d771bcae
FB
504echo "CONFIG_ENCODERS=yes" >> config.mak
505
506# if you do not want to use decoders, disable that.
045ed63f 507echo "#define CONFIG_DECODERS 1" >> $TMPH
d771bcae
FB
508echo "CONFIG_DECODERS=yes" >> config.mak
509
5cbcf02c
FB
510# AC3
511if test "$a52" = "yes" ; then
512 echo "#define CONFIG_AC3 1" >> $TMPH
513 echo "CONFIG_AC3=yes" >> config.mak
d771bcae 514
5cbcf02c
FB
515 if test "$a52bin" = "yes" ; then
516 echo "#define CONFIG_A52BIN 1" >> $TMPH
517 echo "CONFIG_A52BIN=yes" >> config.mak
518 fi
519fi
520
1eb2212e
FB
521# mpeg audio high precision mode
522if test "$mpegaudio_hp" = "yes" ; then
523 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
524fi
525
5cbcf02c
FB
526if test "$v4l" = "yes" ; then
527 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
528 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
529fi
530
531if test "$audio_oss" = "yes" ; then
532 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
533 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
57514323
ZK
534fi
535
5cbcf02c
FB
536if test "$network" = "yes" ; then
537 echo "#define CONFIG_NETWORK 1" >> $TMPH
538 echo "CONFIG_NETWORK=yes" >> config.mak
6ed7422a 539fi
daf8e955 540
0147f198
FR
541if test "$zlib" = "yes" ; then
542 echo "#define CONFIG_ZLIB 1" >> $TMPH
543 echo "CONFIG_ZLIB=yes" >> config.mak
544fi
545
57514323 546if test "$mp3lame" = "yes" ; then
045ed63f 547 echo "#define CONFIG_MP3LAME 1" >> $TMPH
a6741398
J
548 echo "CONFIG_MP3LAME=yes" >> config.mak
549fi
550
81e0d0b4
MH
551if test "$vorbis" = "yes" ; then
552 echo "#define CONFIG_VORBIS 1" >> $TMPH
553 echo "CONFIG_VORBIS=yes" >> config.mak
554fi
555
57514323 556if test "$win32" = "yes" ; then
045ed63f 557 echo "#define CONFIG_WIN32 1" >> $TMPH
daf8e955
FB
558 echo "CONFIG_WIN32=yes" >> config.mak
559fi
3d204385 560
3f027ca7
FB
561if test "$cygwin" = "yes" ; then
562 # setup correct exesuffix
563 echo "CONFIG_WIN32=yes" >> config.mak
564fi
565
90cee0c3
MN
566if test "$darwin" = "yes"; then
567 echo "#define CONFIG_DARWIN 1" >> $TMPH
568 echo "CONFIG_DARWIN=yes" >> config.mak
569fi
570
57514323 571if test "$_malloc_h" = "yes" ; then
045ed63f 572 echo "#define HAVE_MALLOC_H 1" >> $TMPH
3d204385 573else
045ed63f 574 echo "#undef HAVE_MALLOC_H" >> $TMPH
3d204385
NK
575fi
576
57514323 577if test "$_memalign" = "yes" ; then
045ed63f
ZK
578 echo "#define HAVE_MEMALIGN 1" >> $TMPH
579else
580 echo "#undef HAVE_MEMALIGN" >> $TMPH
581fi
582
26b35efb
FR
583if test "$netserver" = "yes" ; then
584 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
585 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
586fi
587
57514323 588if test "$simpleidct" = "yes" ; then
045ed63f
ZK
589 echo "#define SIMPLE_IDCT 1" >> $TMPH
590fi
591
c13e1abd
FH
592echo "#define restrict $_restrict" >> $TMPH
593
0f3cb305
FB
594# build tree in object directory if source path is different from current one
595if test "$source_path_used" = "yes" ; then
596 DIRS="libav libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
59925ef2 597 libavcodec/ppc libavcodec/liba52 libavcodec/mlib tests"
0f3cb305
FB
598 FILES="Makefile libav/Makefile libavcodec/Makefile tests/Makefile"
599 for dir in $DIRS ; do
600 mkdir -p $dir
601 done
602 for f in $FILES ; do
603 ln -sf $source_path/$f $f
604 done
605fi
606echo "SRC_PATH=$source_path" >> config.mak
607
a7c02e25 608diff $TMPH config.h >/dev/null 2>&1
045ed63f
ZK
609if test $? -ne 0 ; then
610 mv -f $TMPH config.h
3d204385 611else
045ed63f 612 echo "config.h is unchanged"
3d204385
NK
613fi
614
045ed63f 615rm -f $TMPO $TMPC $TMPS $TMPH