Statistics
| Branch: | Revision:

ffmpeg / configure @ 64cba748

History | View | Annotate | Download (30.1 KB)

1
#!/bin/sh
2
#
3
# ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
4
#
5

    
6
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
7
cat << EOF
8

    
9
Usage: configure [options]
10
Options: [defaults in brackets after descriptions]
11

    
12
EOF
13
echo "Standard options:"
14
echo "  --help                   print this message"
15
echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
16
echo "  --mandir=DIR             man documentation in DIR [PREFIX/man]"
17
echo "  --enable-mp3lame         enable mp3 encoding via libmp3lame [default=no]"
18
echo "  --enable-vorbis          enable vorbis support via libvorbisenc [default=no]"
19
echo "  --enable-faad            enable faad support via libfaad [default=no]"
20
echo "  --enable-faadbin         build faad support with runtime linking [default=no]"
21
echo "  --enable-faac            enable faac support via libfaac [default=no]"
22
echo "  --enable-mingw32         enable mingw32 native/cross windows compile"
23
echo "  --enable-a52             enable GPL'ed A52 support [default=no]"
24
echo "  --enable-a52bin          open liba52.so.0 at runtime [default=no]"
25
echo "  --enable-pp              enable GPL'ed post processing support [default=no]"
26
echo "  --enable-shared-pp       use libpostproc.so [default=no]"
27
echo "  --enable-shared          build shared libraries [default=no]"
28
echo "  --enable-amr_nb          enable amr_nb float audio codec"
29
echo "  --enable-amr_nb-fixed    use fixed point for amr-nb codec"
30
echo "  --enable-amr_wb          enable amr_wb float audio codec"
31
echo "  --enable-sunmlib         use Sun medialib [default=no]"
32
echo ""
33
echo "Advanced options (experts only):"
34
echo "  --source-path=PATH       path of source code [$source_path]"
35
echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
36
echo "  --cc=CC                  use C compiler CC [$cc]"
37
echo "  --make=MAKE              use specified make [$make]"
38
echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
39
echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
40
echo "  --extra-libs=ELIBS       add ELIBS [$ELIBS]"
41
echo "  --cpu=CPU                force cpu to CPU  [$cpu]"
42
echo "  --tune=PROCESSOR         tune code for a particular CPU (may fails or misperforms on other CPUs)"
43
echo "  --powerpc-perf-enable    enable performance report on PPC (requires enabling PMC)"
44
echo "  --disable-mmx            disable mmx usage"
45
echo "  --disable-altivec        disable AltiVec usage"
46
echo "  --disable-audio-oss      disable OSS audio support [default=no]"
47
echo "  --disable-audio-beos     disable BeOS audio support [default=no]"
48
echo "  --disable-v4l            disable video4linux grabbing [default=no]"
49
echo "  --disable-dv1394         disable DV1394 grabbing [default=no]"
50
echo "  --disable-network        disable network support [default=no]"
51
echo "  --disable-zlib           disable zlib [default=no]"
52
echo "  --disable-simple_idct    disable simple IDCT routines [default=no]"
53
echo "  --disable-vhook          disable video hooking support"
54
echo "  --enable-gprof           enable profiling with gprof [$gprof]"
55
echo "  --disable-debug          disable debugging symbols"
56
echo "  --disable-opts           disable compiler optimizations"
57
echo "  --disable-mpegaudio-hp   faster (but less accurate)"
58
echo "                           mpegaudio decoding [default=no]"
59
echo "  --disable-ffserver       disable ffserver build"
60
echo "  --disable-ffplay         disable ffplay build"
61
echo "  --disable-risky          disables patent encumbered codecs"
62
echo "  --enable-small           optimize for size instead of speed"
63
echo ""
64
echo "NOTE: The object files are build at the place where configure is launched"
65
exit 1
66
fi
67

    
68
# set temporary file name
69
if test ! -z "$TMPDIR" ; then
70
    TMPDIR1="${TMPDIR}"
71
elif test ! -z "$TEMPDIR" ; then
72
    TMPDIR1="${TEMPDIR}"
73
else
74
    TMPDIR1="/tmp"
75
fi
76

    
77
TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
78
TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
79
TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
80
TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
81
TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
82

    
83
# default parameters
84
prefix="/usr/local"
85
mandir=""
86
bindir=""
87
cross_prefix=""
88
cc="gcc"
89
ar="ar"
90
ranlib="ranlib"
91
make="make"
92
strip="strip"
93
cpu=`uname -m`
94
tune="generic"
95
powerpc_perf="no"
96
mmx="default"
97
altivec="default"
98
mmi="default"
99
case "$cpu" in
100
  i386|i486|i586|i686|i86pc|BePC)
101
    cpu="x86"
102
  ;;
103
  # armv4l is a subset of armv5tel
104
  armv4l|armv5tel)
105
    cpu="armv4l"
106
  ;;
107
  alpha)
108
    cpu="alpha"
109
  ;;
110
  "Power Macintosh"|ppc)
111
    cpu="powerpc"
112
  ;;
113
  mips)
114
    cpu="mips"
115
  ;;
116
  sun4u)
117
    cpu="sparc64"
118
  ;;
119
  sh4)
120
    cpu="sh4"
121
  ;;
122
  *)
123
    cpu="unknown"
124
  ;;
125
esac
126
gprof="no"
127
v4l="yes"
128
audio_oss="yes"
129
audio_beos="no"
130
dv1394="yes"
131
network="yes"
132
zlib="yes"
133
mp3lame="no"
134
vorbis="no"
135
faad="no"
136
faadbin="no"
137
faac="no"
138
a52="no"
139
a52bin="no"
140
pp="no"
141
shared_pp="no"
142
mingw32="no"
143
cygwin="no"
144
os2="no"
145
lshared="no"
146
optimize="yes"
147
debug="yes"
148
extralibs="-lm"
149
simpleidct="yes"
150
bigendian="no"
151
emu_fast_int="no"
152
vhook="default"
153
dlfcn="no"
154
dlopen="no"
155
mpegaudio_hp="yes"
156
SHFLAGS=-shared
157
netserver="no"
158
need_inet_aton="no"
159
ffserver="yes"
160
ffplay="yes"
161
LDFLAGS=-Wl,--warn-common
162
FFSLDFLAGS=-Wl,-E
163
LIBPREF="lib"
164
LIBSUF=".a"
165
SLIBPREF="lib"
166
SLIBSUF=".so"
167
EXESUF=""
168
risky="yes"
169
amr_nb="no"
170
amr_wb="no"
171
amr_nb_fixed="no"
172
sunmlib="no"
173

    
174
# OS specific
175
targetos=`uname -s`
176
case $targetos in
177
BeOS)
178
prefix="/boot/home/config"
179
# helps building libavcodec
180
CFLAGS="-DPIC -fomit-frame-pointer"
181
# 3 gcc releases known for BeOS, each with ugly bugs
182
gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
183
case "$gcc_version" in
184
2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
185
mmx="no"
186
;;
187
*20010315*) echo "BeBits gcc"
188
CFLAGS="$CFLAGS -fno-expensive-optimizations"
189
;;
190
esac
191
SHFLAGS=-nostart
192
# disable linux things
193
audio_oss="no"
194
v4l="no"
195
dv1394="no"
196
# enable beos things
197
audio_beos="yes"
198
# no need for libm, but the inet stuff
199
# Check for BONE
200
if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
201
extralibs="-lbind -lsocket"
202
else
203
netserver="yes"
204
need_inet_aton="yes"
205
extralibs="-lnet"
206
fi ;;
207
SunOS)
208
v4l="no"
209
audio_oss="no"
210
dv1394="no"
211
make="gmake"
212
LDFLAGS=""
213
FFSLDFLAGS=""
214
need_inet_aton="yes"
215
extralibs="$extralibs -lsocket -lnsl"
216
;;
217
FreeBSD)
218
v4l="no"
219
audio_oss="yes"
220
dv1394="no"
221
make="gmake"
222
LDFLAGS="$LDFLAGS -export-dynamic"
223
;;
224
BSD/OS)
225
v4l="no"
226
audio_oss="yes"
227
dv1394="no"
228
extralibs="-lpoll -lgnugetopt -lm"
229
make="gmake"
230
;;
231
Darwin)
232
cc="cc"
233
v4l="no"
234
audio_oss="no"
235
dv1394="no"
236
ffserver="no"
237
SHFLAGS="-dynamiclib"
238
extralibs=""
239
darwin="yes"
240
strip="strip -x"
241
LDFLAGS="-Wl,-d"
242
FFSLDFLAGS=-Wl,-bind_at_load
243
;;
244
MINGW32*)
245
# Note: the rest of the mingw32 config is done afterwards as mingw32
246
# can be forced on command line for linux cross compilation
247
mingw32="yes"
248
;;
249
CYGWIN*)
250
v4l="no"
251
audio_oss="yes"
252
dv1394="no"
253
extralibs=""
254
cygwin="yes"
255
test -f /usr/include/inttypes.h || \
256
test -f /usr/local/include/inttypes.h || \
257
echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
258
     "/usr/include/inttypes.h !!!"
259
;;
260
Linux)
261
LDFLAGS="$LDFLAGS -rdynamic"
262
;;
263
IRIX*)
264
ranlib="echo ignoring ranlib"
265
v4l="no"
266
audio_oss="no"
267
make="gmake"
268
;;
269
OS/2)
270
TMPE=$TMPE".exe"
271
ar="emxomfar -p64"
272
ranlib="echo ignoring ranlib"
273
strip="echo ignoring strip"
274
CFLAGS="-Zomf"
275
LDFLAGS="-Zomf -Zstack 16384 -s"
276
SHFLAGS=""
277
FFSLDFLAGS=""
278
LIBPREF=""
279
LIBSUF=".lib"
280
SLIBPREF=""
281
SLIBSUF=".dll"
282
EXESUF=".exe"
283
extralibs=""
284
v4l="no"
285
audio_oss="no"
286
dv1394="no"
287
network="no"
288
ffserver="no"
289
os2="yes"
290
;;
291
*) ;;
292
esac
293

    
294
# From mplayer configure. We need TARGET_OS available
295
# to the Makefile, so it can distinguish between flavors
296
# of AltiVec on PowerPC
297
TARGET_OS=`( uname -s ) 2>&1`
298
  case "$TARGET_OS" in
299
  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
300
    ;;
301
  IRIX*)
302
    TARGET_OS=IRIX
303
    ;;
304
  HP-UX*)
305
    TARGET_OS=HP-UX
306
    ;;
307
  [cC][yY][gG][wW][iI][nN]*)
308
    TARGET_OS=CYGWIN
309
    ;;
310
  *)
311
    TARGET_OS="$TARGET_OS-UNKNOWN"
312
    ;;
313
  esac
314

    
315
# find source path
316
# XXX: we assume an absolute path is given when launching configure, 
317
# except in './configure' case.
318
source_path="`echo $0 | sed -e 's#/configure##'`"
319
source_path_used="yes"
320
if test -z "$source_path" -o "$source_path" = "." ; then
321
    source_path=`pwd`
322
    source_path_used="no"
323
fi
324

    
325
for opt do
326
  case "$opt" in
327
  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
328
  ;;
329
  --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
330
  ;;
331
  --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
332
  ;;
333
  --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
334
  ;;
335
  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
336
  ;;
337
  --make=*) make=`echo $opt | cut -d '=' -f 2`
338
  ;;
339
  --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
340
  ;;
341
  --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
342
  ;;
343
  --extra-libs=*) extralibs=${opt#--extra-libs=}
344
  ;;
345
  --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
346
  ;;
347
  --tune=*) tune=`echo $opt | cut -d '=' -f 2`
348
  ;;
349
  --powerpc-perf-enable) powerpc_perf="yes"
350
  ;;
351
  --disable-mmx) mmx="no"
352
  ;;
353
  --disable-altivec) altivec="no"
354
  ;;
355
  --enable-gprof) gprof="yes"
356
  ;;
357
  --disable-v4l) v4l="no"
358
  ;;
359
  --disable-audio-oss) audio_oss="no"
360
  ;;
361
  --disable-audio-beos) audio_beos="no"
362
  ;;
363
  --disable-dv1394) dv1394="no"
364
  ;;
365
  --disable-network) network="no"
366
  ;;
367
  --disable-zlib) zlib="no"
368
  ;;
369
  --enable-a52) a52="yes"
370
  ;;
371
  --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
372
  ;;
373
  --enable-pp) pp="yes"
374
  ;;
375
  --enable-shared-pp) shared_pp="yes"
376
  ;;
377
  --enable-mp3lame) mp3lame="yes"
378
  ;;
379
  --enable-vorbis) vorbis="yes"
380
  ;;
381
  --enable-faad) faad="yes"
382
  ;;
383
  --enable-faadbin) faadbin="yes"
384
  ;;
385
  --enable-faac) faac="yes"
386
  ;;
387
  --disable-vhook) vhook="no"
388
  ;;
389
  --disable-simple_idct) simpleidct="no"
390
  ;;
391
  --enable-mingw32) mingw32="yes"
392
  ;;
393
  --enable-shared) lshared="yes"
394
  ;;
395
  --disable-debug) debug="no"
396
  ;;
397
  --disable-opts) optimize="no"
398
  ;;
399
  --disable-mpegaudio-hp) mpegaudio_hp="no"
400
  ;;
401
  --disable-ffserver) ffserver="no"
402
  ;;
403
  --disable-ffplay) ffplay="no"
404
  ;;
405
  --disable-risky) risky="no"
406
  ;;
407
  --enable-small) optimize="small"
408
  ;;
409
  --enable-amr_nb) amr_nb="yes"
410
  ;;
411
  --enable-amr_nb-fixed) amr_nb_fixed="yes"
412
  ;;
413
  --enable-amr_wb) amr_wb="yes"
414
  ;; 
415
  --enable-sunmlib) sunmlib="yes"
416
  ;;
417
  esac
418
done
419

    
420
# compute mmx state
421
if test $mmx = "default"; then
422
    if test $cpu = "x86"; then
423
        mmx="yes"
424
    else
425
        mmx="no"
426
    fi
427
fi
428

    
429
#Darwin CC versions
430
needmdynamicnopic="no"
431
if test $targetos = Darwin; then
432
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
433
	CFLAGS="-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
434
    else
435
	gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
436
	case "$gcc_version" in
437
	    *2.95*) 
438
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
439
		;;
440
	    *3.*)
441
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
442
		if test "$lshared" = no; then
443
		   needmdynamicnopic="yes"
444
		fi
445
		;;
446
	    *)
447
		CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
448
		if test "$lshared" = no; then
449
		   needmdynamicnopic="yes"
450
		fi
451
		;;
452
	esac
453
    fi
454
fi
455

    
456
# Can only do AltiVec on PowerPC
457
if test $altivec = "default"; then
458
    if test $cpu = "powerpc"; then
459
        altivec="yes"
460
    else
461
        altivec="no"
462
    fi
463
fi
464

    
465
# Add processor-specific flags
466
TUNECPU="generic"
467
if test $tune != "generic"; then
468
    case $tune in
469
	601|ppc601|PowerPC601)
470
	    CFLAGS="$CFLAGS -mcpu=601"
471
	    if test $altivec = "yes"; then
472
		echo "WARNING: tuning for PPC601 but altivec enabled !";
473
	    fi
474
	    TUNECPU=ppc601
475
	;;
476
	603*|ppc603*|PowerPC603*)
477
	    CFLAGS="$CFLAGS -mcpu=603"
478
	    if test $altivec = "yes"; then
479
		echo "WARNING: tuning for PPC603 but altivec enabled !";
480
	    fi
481
	    TUNECPU=ppc603
482
	;;
483
	604*|ppc604*|PowerPC604*)
484
	    CFLAGS="$CFLAGS -mcpu=604"
485
	    if test $altivec = "yes"; then
486
		echo "WARNING: tuning for PPC604 but altivec enabled !";
487
	    fi
488
	    TUNECPU=ppc604
489
	;;
490
	G3|g3|75*|ppc75*|PowerPC75*)
491
	    CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
492
	    if test $altivec = "yes"; then
493
		echo "WARNING: tuning for PPC75x but altivec enabled !";
494
	    fi
495
	    TUNECPU=ppc750
496
	;;
497
	G4|g4|745*|ppc745*|PowerPC745*)
498
	    CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
499
	    if test $altivec = "no"; then
500
		echo "WARNING: tuning for PPC745x but altivec disabled !";
501
	    fi
502
	    TUNECPU=ppc7450
503
	;;
504
	74*|ppc74*|PowerPC74*)
505
	    CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
506
	    if test $altivec = "no"; then
507
		echo "WARNING: tuning for PPC74xx but altivec disabled !";
508
	    fi
509
	    TUNECPU=ppc7400
510
	;;
511
	G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
512
	    CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
513
	    if test $altivec = "no"; then
514
		echo "WARNING: tuning for PPC970 but altivec disabled !";
515
	    fi
516
	    TUNECPU=ppc970
517
	;;
518
	*)
519
	echo "WARNING: unknown CPU "$tune", ignored"
520
	;;
521
    esac
522
fi
523

    
524
# AltiVec flags: The FSF version of GCC differs from the Apple version 
525
if test $cpu = "powerpc"; then
526
    if test $altivec = "yes"; then
527
        if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
528
            CFLAGS="$CFLAGS -faltivec"
529
        else
530
            CFLAGS="$CFLAGS -maltivec -mabi=altivec"
531
        fi
532
    fi
533
fi
534

    
535
# See if we have <altivec.h>
536
cat > $TMPC << EOF
537
#include <altivec.h>
538
int main( void ) { return 0; }
539
EOF
540

    
541
_altivec_h="no"
542
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
543
_altivec_h="yes"
544
fi
545

    
546
# See does our compiler support Motorola AltiVec C API
547
if test $altivec = "yes"; then
548
if test $_altivec_h = "yes"; then
549
cat > $TMPC << EOF
550
#include <altivec.h>
551
int main(void) {
552
    vector signed int v1, v2, v3;
553
    v1 = vec_add(v2,v3);
554
    return 0;
555
}
556
EOF
557
else
558
cat > $TMPC << EOF
559
int main(void) {
560
    vector signed int v1, v2, v3;
561
    v1 = vec_add(v2,v3);
562
    return 0;
563
}
564
EOF
565
fi
566
$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
567
fi
568

    
569
# Can only do mmi on mips
570
if test $mmi = "default"; then
571
    if test $cpu = "mips"; then
572
        mmi="yes"
573
    else
574
        mmi="no"
575
    fi
576
fi
577

    
578
# See does our compiler support mmi
579
if test $mmi = "yes"; then
580
cat > $TMPC << EOF
581
int main(void) {
582
    __asm__ ("lq \$2, 0(\$2)");
583
    return 0;
584
}
585
EOF
586
$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
587
fi
588

    
589
if test "$mingw32" = "yes" ; then
590
    v4l="no"
591
    audio_oss="no"
592
    dv1394="no"
593
    ffserver="no"
594
    network="no"
595
    LIBPREF=""
596
    LIBSUF=".lib"
597
    SLIBPREF=""
598
    SLIBSUF=".dll"
599
    EXESUF=".exe"
600
    prefix="/c/Program Files/FFmpeg"
601
    bindir="$prefix"
602
fi
603

    
604
cc="${cross_prefix}${cc}"
605
ar="${cross_prefix}${ar}"
606
ranlib="${cross_prefix}${ranlib}"
607
strip="${cross_prefix}${strip}"
608

    
609
if test -z "$cross_prefix" ; then
610

    
611
# ---
612
# big/little endian test
613
cat > $TMPC << EOF
614
#include <inttypes.h>
615
int main(int argc, char ** argv){
616
	volatile uint32_t i=0x01234567;
617
	return (*((uint8_t*)(&i))) == 0x67;
618
}
619
EOF
620

    
621
if $cc -o $TMPE $TMPC 2>/dev/null ; then
622
$TMPE && bigendian="yes"
623
else
624
echo big/little test failed
625
fi
626

    
627
else
628

    
629
# if cross compiling, cannot launch a program, so make a static guess
630
if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
631
    bigendian="yes"
632
fi
633

    
634
fi
635

    
636
# ---
637
# *int_fast* test
638
cat > $TMPC << EOF
639
#include <inttypes.h>
640
int main(int argc, char ** argv){
641
	volatile uint_fast64_t i=0x01234567;
642
	return 0;
643
}
644
EOF
645

    
646
$cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
647

    
648
# ---
649
# check availability of some header files
650

    
651
cat > $TMPC << EOF
652
#include <malloc.h>
653
int main( void ) { return 0; }
654
EOF
655

    
656
_memalign=no
657
_malloc_h=no
658
if $cc -o $TMPE $TMPC 2> /dev/null ; then
659
_malloc_h=yes
660
_memalign=yes
661
# check for memalign - atmos
662
cat > $TMPC << EOF
663
#include <malloc.h>
664
int main ( void ) {
665
char *string = NULL;
666
string = memalign(64, sizeof(char));
667
return 0;
668
}
669
EOF
670
$cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
671
fi
672

    
673
cat > $TMPC << EOF
674
#include <time.h>
675
int main( void ) { localtime_r(NULL, NULL); }
676
EOF
677

    
678
localtime_r=no
679
if $cc -o $TMPE $TMPC 2> /dev/null ; then
680
  localtime_r=yes
681
fi
682

    
683
if test "$zlib" = "yes"; then
684
# check for zlib - mmu_man
685
cat > $TMPC << EOF
686
#include <zlib.h>
687
int main ( void ) {
688
if (zlibVersion() != ZLIB_VERSION)
689
   puts("zlib version differs !!!");
690
   return 1;
691
return 0;
692
}
693
EOF
694
$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
695
# $TMPE 2> /dev/null > /dev/null || zlib="no"
696
# XXX: more tests needed - runtime test
697
fi
698
if test "$zlib" = "yes"; then
699
extralibs="$extralibs -lz"
700
fi
701

    
702
# test for lrintf in math.h
703
cat > $TMPC << EOF
704
#define _ISOC9X_SOURCE  1
705
#include <math.h>
706
int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
707
EOF
708

    
709
have_lrintf="no"
710
if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
711
  have_lrintf="yes"
712
  $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
713
fi
714

    
715
_restrict=
716
for restrict_keyword in restrict __restrict__ __restrict; do
717
  echo "void foo(char * $restrict_keyword p);" > $TMPC
718
  if $cc -c -o $TMPO $TMPC 2> /dev/null; then
719
    _restrict=$restrict_keyword
720
    break;
721
  fi
722
done
723

    
724
# test gcc version to see if vector builtins can be used
725
# currently only used on i386 for MMX builtins
726
cat > $TMPC << EOF
727
int main(void) { 
728
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
729
return 0;
730
#else
731
#error no vector builtins
732
#endif
733
}
734
EOF
735

    
736
builtin_vector=no
737
if $cc -o $TMPO $TMPC 2> /dev/null ; then
738
  builtin_vector=yes
739
fi
740

    
741
# dlopen/dlfcn.h probing
742

    
743
cat > $TMPC << EOF
744
#include <dlfcn.h>
745
int main( void ) { return (int) dlopen("foo", 0); }
746
EOF
747

    
748
ldl=-ldl
749

    
750
if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
751
dlfcn=yes
752
dlopen=yes
753
fi
754

    
755
if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
756
dlfcn=yes
757
dlopen=yes
758
ldl=""
759
fi
760

    
761
cat > $TMPC << EOF
762
int main( void ) { return (int) dlopen("foo", 0); }
763
EOF
764

    
765
if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1  ; then
766
dlopen=yes
767
fi
768

    
769
if $cc -o $TMPE $TMPC > /dev/null 2>&1  ; then
770
dlopen=yes
771
ldl=""
772
fi
773

    
774
if test "$vhook" = "default" ; then
775
  vhook="$dlopen"
776
fi
777

    
778
##########################################
779
# imlib probe
780

    
781
cat > $TMPC << EOF
782
#include <X11/Xlib.h>
783
#include <Imlib2.h>
784
int main( void ) { return (int) imlib_load_font("foo"); }
785
EOF
786

    
787
imlib2=no
788
if $cc -o $TMPE $TMPC -lImlib2 > /dev/null 2>&1  ; then
789
imlib2=yes
790
fi
791

    
792
##########################################
793
# freetype probe
794

    
795
cat > $TMPC << EOF
796
#include <ft2build.h>
797
int main( void ) { return (int) FT_Init_FreeType(0); }
798
EOF
799

    
800
freetype2=no
801
if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
802
  if test "`which freetype-config`" != ""; then
803
    if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs`  > /dev/null 2>&1 ; then
804
      freetype2=yes
805
    fi
806
  fi
807
fi
808

    
809
##########################################
810
# SDL probe
811

    
812
cat > $TMPC << EOF
813
#include <SDL.h>
814
#undef main /* We don't want SDL to override our main() */
815
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
816
EOF
817

    
818
sdl_too_old=no
819
sdl=no
820
if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs`  > /dev/null 2>&1  ; then
821
_sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
822
if test "$_sdlversion" -lt 121 ; then
823
sdl_too_old=yes
824
else
825
sdl=yes
826
fi
827
fi
828

    
829
case "`$cc -v 2>&1 | grep version`" in
830
    *gcc*)
831
	CFLAGS="-Wall $CFLAGS"
832
	;;
833
    *)
834
	;;
835
esac
836

    
837
if test "$sdl" = "no" ; then
838
   ffplay=no
839
fi
840

    
841
if test "$debug" = "yes"; then
842
	CFLAGS="$CFLAGS -g"
843
fi
844

    
845
if test "$optimize" = "small"; then
846
#  CFLAGS=${CFLAGS//-O3/-Os}
847
  CFLAGS="$CFLAGS -Os"
848
fi
849

    
850
if test "$optimize" = "yes"; then
851
    if test -n "`$cc -v 2>&1 | grep xlc`"; then
852
	CFLAGS="$CFLAGS -O5"
853
	LDFLAGS="$LDFLAGS -O5"
854
    else
855
	CFLAGS="$CFLAGS -O3"
856
    fi
857
fi
858

    
859
if test x"$bindir" = x""; then
860
bindir="${prefix}/bin"
861
fi
862

    
863
if test x"$mandir" = x""; then
864
mandir="${prefix}/man"
865
fi
866

    
867
echo "Install prefix   $prefix"
868
echo "Source path      $source_path"
869
echo "C compiler       $cc"
870
echo "make             $make"
871
echo "CPU              $cpu ($tune)"
872
echo "Big Endian       $bigendian"
873
echo "broken inttypes.h $emu_fast_int"
874
if test $cpu = "x86"; then
875
echo "MMX enabled      $mmx"
876
echo "Vector Builtins  $builtin_vector"
877
fi
878
if test $cpu = "mips"; then
879
echo "MMI enabled      $mmi"
880
fi
881
if test $cpu = "powerpc"; then
882
echo "AltiVec enabled  $altivec"
883
fi
884
echo "gprof enabled    $gprof"
885
echo "zlib enabled     $zlib"
886
echo "mp3lame enabled  $mp3lame"
887
echo "vorbis enabled   $vorbis"
888
echo "faad enabled     $faad"
889
echo "faadbin enabled  $faadbin"
890
echo "faac enabled     $faac"
891
echo "a52 support      $a52"
892
echo "a52 dlopened     $a52bin"
893
echo "pp support       $pp"
894
echo "debug symbols    $debug"
895
echo "optimize         $optimize"
896
echo "shared pp        $shared_pp"
897
echo "Video hooking    $vhook"
898
echo "SDL support      $sdl"
899
if test $sdl_too_old = "yes"; then
900
echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
901
fi
902
echo "risky / patent encumbered codecs $risky"
903

    
904
if test "$vhook" = "yes" ; then
905
echo "Imlib2 support   $imlib2"
906
echo "freetype support $freetype2"
907
fi
908
echo "Sun medialib support"  $sunmlib
909
echo "AMR-NB float support"  $amr_nb
910
echo "AMR-NB fixed support"  $amr_nb_fixed
911
echo "AMR-WB float support"  $amr_wb
912

    
913
echo "Creating config.mak and config.h"
914

    
915
echo "# Automatically generated by configure - do not modify" > config.mak
916
echo "/* Automatically generated by configure - do not modify */" > $TMPH
917

    
918
echo "prefix=$prefix" >> config.mak
919
echo "bindir=$bindir" >> config.mak
920
echo "mandir=$mandir" >> config.mak
921
echo "MAKE=$make" >> config.mak
922
echo "CC=$cc" >> config.mak
923
echo "AR=$ar" >> config.mak
924
echo "RANLIB=$ranlib" >> config.mak
925
echo "STRIP=$strip" >> config.mak
926

    
927
# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic.  Used when building 
928
# shared modules on OS/X (vhook/Makefile).
929
SHCFLAGS=$CFLAGS
930
if test "$needmdynamicnopic" = yes; then
931
   CFLAGS="$CFLAGS -mdynamic-no-pic"
932
fi
933

    
934
echo "OPTFLAGS=$CFLAGS" >> config.mak
935
echo "SHCFLAGS=$SHCFLAGS">>config.mak
936
echo "LDFLAGS=$LDFLAGS" >> config.mak
937
echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
938
echo "SHFLAGS=$SHFLAGS" >> config.mak
939
echo "LIBPREF=$LIBPREF" >> config.mak
940
echo "LIBSUF=$LIBSUF" >> config.mak
941
echo "SLIBPREF=$SLIBPREF" >> config.mak
942
echo "SLIBSUF=$SLIBSUF" >> config.mak
943
echo "EXESUF=$EXESUF" >> config.mak
944
echo "TARGET_OS=$TARGET_OS" >> config.mak
945
if test "$cpu" = "x86" ; then
946
  echo "TARGET_ARCH_X86=yes" >> config.mak
947
  echo "#define ARCH_X86 1" >> $TMPH
948
elif test "$cpu" = "armv4l" ; then
949
  echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
950
  echo "#define ARCH_ARMV4L 1" >> $TMPH
951
elif test "$cpu" = "alpha" ; then
952
  echo "TARGET_ARCH_ALPHA=yes" >> config.mak
953
  echo "#define ARCH_ALPHA 1" >> $TMPH
954
elif test "$cpu" = "sparc64" ; then
955
  echo "TARGET_ARCH_SPARC64=yes" >> config.mak
956
  echo "#define ARCH_SPARC64 1" >> $TMPH
957
elif test "$cpu" = "powerpc" ; then
958
  echo "TARGET_ARCH_POWERPC=yes" >> config.mak
959
  echo "#define ARCH_POWERPC 1" >> $TMPH
960
  if test "$powerpc_perf" = "yes"; then
961
    echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
962
  fi
963
elif test "$cpu" = "mips" ; then
964
  echo "TARGET_ARCH_MIPS=yes" >> config.mak
965
  echo "#define ARCH_MIPS 1" >> $TMPH
966
elif test "$cpu" = "sh4" ; then
967
  echo "TARGET_ARCH_SH4=yes" >> config.mak
968
  echo "#define ARCH_SH4 1" >> $TMPH
969
fi
970
echo "#define TUNECPU $TUNECPU" >> $TMPH
971
if test "$bigendian" = "yes" ; then
972
  echo "WORDS_BIGENDIAN=yes" >> config.mak
973
  echo "#define WORDS_BIGENDIAN 1" >> $TMPH
974
fi
975
if test "$emu_fast_int" = "yes" ; then
976
  echo "#define EMULATE_FAST_INT 1" >> $TMPH
977
fi
978
if test "$mmx" = "yes" ; then
979
  echo "TARGET_MMX=yes" >> config.mak
980
  echo "#define HAVE_MMX 1" >> $TMPH
981
  echo "#define __CPU__ 586" >> $TMPH
982
fi
983
if test "$builtin_vector" = "yes" ; then
984
  echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
985
  echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
986
fi
987
if test "$mmi" = "yes" ; then
988
  echo "TARGET_MMI=yes" >> config.mak
989
  echo "#define HAVE_MMI 1" >> $TMPH
990
fi
991
if test "$altivec" = "yes" ; then
992
  echo "TARGET_ALTIVEC=yes" >> config.mak
993
  echo "#define HAVE_ALTIVEC 1" >> $TMPH
994
  echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
995
  echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
996
  if test "$_altivec_h" = "yes" ; then
997
    echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
998
  else
999
    echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1000
  fi
1001
fi
1002
if test "$gprof" = "yes" ; then
1003
  echo "TARGET_GPROF=yes" >> config.mak
1004
  echo "#define HAVE_GPROF 1" >> $TMPH
1005
fi
1006
if test "$localtime_r" = "yes" ; then
1007
  echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1008
fi
1009
if test "$imlib2" = "yes" ; then
1010
  echo "HAVE_IMLIB2=yes" >> config.mak
1011
fi
1012
if test "$freetype2" = "yes" ; then
1013
  echo "HAVE_FREETYPE2=yes" >> config.mak
1014
fi
1015
if test "$sunmlib" = "yes" ; then
1016
  echo "HAVE_MLIB=yes" >> config.mak
1017
  echo "#define HAVE_MLIB 1" >> $TMPH
1018
  extralibs="$extralibs -lmlib"
1019
fi
1020
if test "$sdl" = "yes" ; then
1021
  echo "CONFIG_SDL=yes" >> config.mak
1022
  echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1023
  echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1024
fi
1025
if test "$have_lrintf" = "yes" ; then
1026
  echo "#define HAVE_LRINTF 1" >> $TMPH
1027
fi
1028
if test "$vhook" = "yes" ; then
1029
  echo "BUILD_VHOOK=yes" >> config.mak
1030
  echo "#define HAVE_VHOOK 1" >> $TMPH
1031
  extralibs="$extralibs $ldl"
1032
fi
1033
if test "$lshared" = "yes" ; then
1034
  echo "BUILD_SHARED=yes" >> config.mak
1035
  echo "PIC=-fPIC" >> config.mak
1036
fi
1037
echo "EXTRALIBS=$extralibs" >> config.mak
1038
version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
1039
 cut -d '"' -f 2`
1040
echo "VERSION=$version" >>config.mak
1041
# if you do not want to use encoders, disable that.
1042
echo "#define CONFIG_ENCODERS 1" >> $TMPH
1043
echo "CONFIG_ENCODERS=yes" >> config.mak
1044

    
1045
# if you do not want to use decoders, disable that.
1046
echo "#define CONFIG_DECODERS 1" >> $TMPH
1047
echo "CONFIG_DECODERS=yes" >> config.mak
1048

    
1049
# AC3
1050
if test "$a52" = "yes" ; then
1051
  echo "#define CONFIG_AC3 1" >> $TMPH
1052
  echo "CONFIG_AC3=yes" >> config.mak
1053

    
1054
  if test "$a52bin" = "yes" ; then
1055
    echo "#define CONFIG_A52BIN 1" >> $TMPH
1056
    echo "CONFIG_A52BIN=yes" >> config.mak
1057
  fi
1058
fi
1059

    
1060
# PP
1061
if test "$pp" = "yes" ; then
1062
  echo "#define CONFIG_PP 1" >> $TMPH
1063
  echo "CONFIG_PP=yes" >> config.mak
1064

    
1065
  if test "$shared_pp" = "yes" ; then
1066
    echo "#define SHARED_PP 1" >> $TMPH
1067
    echo "SHARED_PP=yes" >> config.mak
1068
  fi
1069
fi
1070

    
1071
# mpeg audio high precision mode
1072
if test "$mpegaudio_hp" = "yes" ; then
1073
  echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1074
fi
1075

    
1076
if test "$v4l" = "yes" ; then
1077
  echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1078
  echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1079
fi
1080

    
1081
if test "$dv1394" = "yes" ; then
1082
  echo "#define CONFIG_DV1394 1" >> $TMPH
1083
  echo "CONFIG_DV1394=yes" >> config.mak
1084
fi
1085

    
1086
if test "$dlopen" = "yes" ; then
1087
  echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1088
fi
1089

    
1090
if test "$dlfcn" = "yes" ; then
1091
  echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1092
fi
1093

    
1094
if test "$audio_oss" = "yes" ; then
1095
  echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1096
  echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1097
fi
1098

    
1099
if test "$audio_beos" = "yes" ; then
1100
  echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1101
  echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1102
fi
1103

    
1104
if test "$network" = "yes" ; then
1105
  echo "#define CONFIG_NETWORK 1" >> $TMPH
1106
  echo "CONFIG_NETWORK=yes" >> config.mak
1107
fi
1108

    
1109
if test "$zlib" = "yes" ; then
1110
  echo "#define CONFIG_ZLIB 1" >> $TMPH
1111
  echo "CONFIG_ZLIB=yes" >> config.mak
1112
fi
1113

    
1114
if test "$mp3lame" = "yes" ; then
1115
  echo "#define CONFIG_MP3LAME 1" >> $TMPH
1116
  echo "CONFIG_MP3LAME=yes" >> config.mak
1117
fi
1118

    
1119
if test "$vorbis" = "yes" ; then
1120
  echo "#define CONFIG_VORBIS 1" >> $TMPH
1121
  echo "CONFIG_VORBIS=yes" >> config.mak
1122
fi
1123

    
1124
if test "$faad" = "yes" ; then
1125
  echo "#define CONFIG_FAAD 1" >> $TMPH
1126
  echo "CONFIG_FAAD=yes" >> config.mak
1127
fi
1128

    
1129
if test "$faadbin" = "yes" ; then
1130
  echo "#define CONFIG_FAADBIN 1" >> $TMPH
1131
  echo "CONFIG_FAADBIN=yes" >> config.mak
1132
fi
1133

    
1134
if test "$faac" = "yes" ; then
1135
  echo "#define CONFIG_FAAC 1" >> $TMPH
1136
  echo "CONFIG_FAAC=yes" >> config.mak
1137
fi
1138

    
1139
if test "$mingw32" = "yes" ; then
1140
  echo "#define CONFIG_WIN32 1" >> $TMPH
1141
  echo "CONFIG_WIN32=yes" >> config.mak
1142
  echo "#ifndef __MINGW32__" >> $TMPH
1143
  echo "#define __MINGW32__ 1" >> $TMPH
1144
  echo "#endif" >> $TMPH
1145
fi
1146

    
1147
if test "$os2" = "yes" ; then
1148
  echo "#define CONFIG_OS2 1" >> $TMPH
1149
  echo "CONFIG_OS2=yes" >> config.mak
1150
fi
1151

    
1152
if test "$TARGET_OS" = "SunOS" ; then
1153
  echo "#define CONFIG_SUNOS 1" >> $TMPH
1154
fi
1155

    
1156
if test "$darwin" = "yes"; then
1157
  echo "#define CONFIG_DARWIN 1"  >> $TMPH
1158
  echo "CONFIG_DARWIN=yes" >> config.mak
1159
fi
1160

    
1161
if test "$_malloc_h" = "yes" ; then
1162
  echo "#define HAVE_MALLOC_H 1" >> $TMPH
1163
else
1164
  echo "#undef  HAVE_MALLOC_H" >> $TMPH
1165
fi
1166

    
1167
if test "$_memalign" = "yes" ; then
1168
  echo "#define HAVE_MEMALIGN 1" >> $TMPH
1169
else
1170
  echo "#undef  HAVE_MEMALIGN" >> $TMPH
1171
fi
1172

    
1173
if test "$netserver" = "yes" ; then
1174
  echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1175
  echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1176
fi
1177

    
1178
if test "$need_inet_aton" = "yes" ; then
1179
  echo "NEED_INET_ATON=yes" >> config.mak
1180
fi
1181

    
1182
if test "$simpleidct" = "yes" ; then
1183
  echo "#define SIMPLE_IDCT 1" >> $TMPH
1184
fi
1185

    
1186
if test "$ffserver" = "yes" ; then
1187
  echo "#define CONFIG_FFSERVER 1" >> $TMPH
1188
  echo "CONFIG_FFSERVER=yes" >> config.mak
1189
fi
1190

    
1191
if test "$ffplay" = "yes" ; then
1192
  echo "CONFIG_FFPLAY=yes" >> config.mak
1193
fi
1194

    
1195
if test "$risky" = "yes" ; then
1196
  echo "#define CONFIG_RISKY 1" >> $TMPH
1197
  echo "CONFIG_RISKY=yes" >> config.mak
1198
fi
1199

    
1200
echo "#define restrict $_restrict" >> $TMPH
1201

    
1202
# build tree in object directory if source path is different from current one
1203
if test "$source_path_used" = "yes" ; then
1204
    DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1205
          libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1206
    FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1207
    for dir in $DIRS ; do
1208
            mkdir -p $dir
1209
    done
1210
    for f in $FILES ; do
1211
        ln -sf $source_path/$f $f
1212
    done
1213
fi
1214
echo "SRC_PATH=$source_path" >> config.mak
1215

    
1216
if test "$amr_wb" = "yes" ; then
1217
  echo "#define AMR_WB 1" >> $TMPH
1218
  echo "AMR_WB=yes" >> config.mak
1219
  echo
1220
  echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1221
  echo "V5.1.0 from "
1222
  echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1223
  echo "and extracted the source to libavcodec/amrwb_float"
1224
  echo
1225
fi
1226

    
1227
if test "$amr_nb" = "yes" ; then
1228
  echo "#define AMR_NB 1" >> $TMPH
1229
  echo "AMR_NB=yes" >> config.mak
1230
  echo
1231
if test "$amr_nb_fixed" = "yes" ; then
1232
  echo "AMR_NB_FIXED=yes" >> config.mak
1233
  echo "#define AMR_NB_FIXED 1" >> $TMPH
1234
  echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1235
  echo "REL-5 version 5.1.0 from "
1236
  echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1237
  echo "and extracted src to libavcodec/amr"
1238
  echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1239
  echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1240
  echo
1241
else
1242
  echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1243
  echo "REL-5 V5.1.0 from "
1244
  echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1245
  echo "and extracted the source to libavcodec/amr_float"
1246
  echo
1247
fi
1248

    
1249
fi
1250

    
1251
diff $TMPH config.h >/dev/null 2>&1
1252
if test $? -ne 0 ; then
1253
	mv -f $TMPH config.h
1254
else
1255
	echo "config.h is unchanged"
1256
fi
1257

    
1258
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH