~ubuntu-branches/ubuntu/quantal/linphone/quantal

« back to all changes in this revision

Viewing changes to ffmpeg/configure

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
  armv4l)
14
 
    cpu="armv4l"
15
 
    mmx="no"
16
 
  ;;
17
 
  *)
18
 
    mmx="no"
19
 
  ;;
20
 
esac
21
 
gprof="no"
22
 
mp3lib="yes"
23
 
grab="yes"
24
 
# We do not want mmx by default
25
 
mmx="no"
26
 
 
27
 
if [ "$1" = "-h" -o "$1" = "--help" ] ; then
28
 
cat << EOF
29
 
 
30
 
Usage: configure [options]
31
 
Options: [defaults in brackets after descriptions]
32
 
 
33
 
  --help                  print this message
34
 
EOF
35
 
echo "  --prefix=PREFIX         install in PREFIX [$prefix]"
36
 
echo "  --cc=CC                 use C compiler CC [$cc]"
37
 
echo "  --cpu=CPU               force cpu to CPU  [$cpu]"
38
 
echo "  --disable-mmx           disable mmx usage"
39
 
echo "  --enable-gprof          enable profiling with gprof [$gprof]"
40
 
echo "  --disable-mp3lib        disable mp3 lib compiling"
41
 
echo "  --disable-grab          disable audio/video grabbing code"
42
 
exit 1
43
 
fi
44
 
 
45
 
for opt do
46
 
  case "$opt" in
47
 
  --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
48
 
  ;;
49
 
  --cc=*) cc=`echo $opt | cut -d '=' -f 2`
50
 
  ;;
51
 
  --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
52
 
  ;;
53
 
  --disable-mmx) mmx="no"
54
 
  ;;
55
 
  --enable-gprof) gprof="yes"
56
 
  ;;
57
 
  --disable-mp3lib) mp3lib="no"
58
 
  ;;
59
 
  --disable-grab) grab="no"
60
 
  ;;
61
 
  esac
62
 
done
63
 
 
64
 
echo "Install prefix   $prefix"
65
 
echo "C compiler       $cc"
66
 
echo "CPU              $cpu"
67
 
echo "MMX enabled      $mmx"
68
 
echo "gprof enabled    $gprof"
69
 
echo "grab enabled     $grab"
70
 
 
71
 
echo "Creating config.mak and config.h"
72
 
 
73
 
echo "# Automatically generated by configure - do not modify" > config.mak
74
 
echo "/* Automatically generated by configure - do not modify */" > config.h
75
 
 
76
 
# Checking for CFLAGS
77
 
if test -z "$CFLAGS"; then
78
 
 CFLAGS="-O2"
79
 
fi
80
 
 
81
 
echo "prefix=$prefix" >> config.mak
82
 
echo "MAKE=make" >> config.mak
83
 
echo "CC=$cc" >> config.mak
84
 
echo "AR=$ar" >> config.mak
85
 
echo "OPTFLAGS=$CFLAGS" >> config.mak
86
 
if [ "$cpu" = "x86" ] ; then
87
 
  echo "TARGET_ARCH_X86=yes" >> config.mak
88
 
  echo "#define ARCH_X86 1" >> config.h
89
 
fi
90
 
if [ "$cpu" = "armv4l" ]; then
91
 
  echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
92
 
  echo "#define ARCH_ARMV4L 1" >> config.h
93
 
fi
94
 
if [ "$mmx" = "yes" ] ; then
95
 
  echo "TARGET_MMX=yes" >> config.mak
96
 
  echo "#define HAVE_MMX 1" >> config.h
97
 
fi
98
 
if [ "$gprof" = "yes" ] ; then
99
 
  echo "TARGET_GPROF=yes" >> config.mak
100
 
  echo "#define HAVE_GPROF 1" >> config.h
101
 
fi
102
 
 
103
 
# if you do not want to use encoders, disable that.
104
 
echo "#define CONFIG_ENCODERS 1" >> config.h
105
 
echo "CONFIG_ENCODERS=yes" >> config.mak
106
 
 
107
 
# if you do not want to use decoders, disable that.
108
 
echo "#define CONFIG_DECODERS 1" >> config.h
109
 
echo "CONFIG_DECODERS=yes" >> config.mak
110
 
 
111
 
# special AC3 and MPGLIB enabling stuff in case you already have it
112
 
# without libavcodec.
113
 
echo "#define CONFIG_AC3 1" >> config.h
114
 
echo "CONFIG_AC3=yes" >> config.mak
115
 
 
116
 
if [ "$mp3lib" = "yes" ] ; then
117
 
  echo "#define CONFIG_MPGLIB 1" >> config.h
118
 
  echo "CONFIG_MPGLIB=yes" >> config.mak
119
 
fi
120
 
 
121
 
if [ "$grab" = "yes" ] ; then
122
 
  echo "#define CONFIG_GRAB 1" >> config.h
123
 
  echo "CONFIG_GRAB=yes" >> config.mak
124
 
fi