fixed unsigned pb
[libav.git] / configure
1 #!/bin/sh
2
3 # default parameters
4 prefix="/usr/local"
5 cc="gcc"
6 ar="ar"
7 cpu=`uname -m`
8 case "$cpu" in
9 i386|i486|i586|i686)
10 cpu="x86"
11 mmx="yes"
12 ;;
13 *)
14 mmx="no"
15 ;;
16 esac
17 gprof="no"
18
19 if [ "$1" = "-h" -o "$1" = "--help" ] ; then
20 cat << EOF
21
22 Usage: configure [options]
23 Options: [defaults in brackets after descriptions]
24
25 --help print this message
26 EOF
27 echo " --prefix=PREFIX install in PREFIX [$prefix]"
28 echo " --cc=CC use C compiler CC [$cc]"
29 echo " --cpu=CPU force cpu to CPU [$cpu]"
30 echo " --disable-mmx disable mmx usage"
31 echo " --enable-gprof enable profiling with gprof [$gprof]"
32 exit 1
33 fi
34
35 for opt do
36 case "$opt" in
37 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
38 ;;
39 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
40 ;;
41 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
42 ;;
43 --disable-mmx) mmx="no"
44 ;;
45 --enable-gprof) gprof="yes"
46 ;;
47 esac
48 done
49
50 echo "Install prefix $prefix"
51 echo "C compiler $cc"
52 echo "CPU $cpu"
53 echo "MMX enabled $mmx"
54 echo "gprof enabled $gprof"
55
56 echo "Creating config.mk and config.h"
57
58 echo "# Automatically generated by configure - do not modify" > config.mk
59 echo "/* Automatically generated by configure - do not modify */" > config.h
60
61 echo "PREFIX=$prefix" >> config.mk
62 echo "CC=$cc" >> config.mk
63 echo "AR=$ar" >> config.mk
64 if [ "$cpu" = "x86" ] ; then
65 echo "CONFIG_CPU_X86=y" >> config.mk
66 echo "#define CONFIG_CPU_X86 1" >> config.h
67 fi
68 if [ "$mmx" = "yes" ] ; then
69 echo "CONFIG_MMX=y" >> config.mk
70 echo "#define CONFIG_MMX 1" >> config.h
71 fi
72 if [ "$gprof" = "yes" ] ; then
73 echo "CONFIG_GPROF=y" >> config.mk
74 echo "#define CONFIG_GPROF 1" >> config.h
75 fi