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