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