Revision 57514323 configure

View differences:

configure
5 5
TMPS="ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
6 6
TMPH="ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
7 7

  
8
if [ ! -z "$TMPDIR" ]; then
8
if test ! -z "$TMPDIR" ; then
9 9
	TMPC="${TMPDIR}/${TMPC}"
10 10
	TMPCPP="${TMPDIR}/${TMPCPP}"
11 11
	TMPO="${TMPDIR}/${TMPO}"
12 12
	TMPS="${TMPDIR}/${TMPS}"
13 13
	TMPH="${TMPDIR}/${TMPH}"
14
elif [ ! -z "$TEMPDIR" ]; then
14
elif test ! -z "$TEMPDIR" ; then
15 15
	TMPC="${TEMPDIR}/${TMPC}"
16 16
	TMPCPP="${TEMPDIR}/${TMPCPP}"
17 17
	TMPO="${TEMPDIR}/${TMPO}"
......
50 50
gprof="no"
51 51
grab="yes"
52 52
mp3lame="no"
53
a52bin="no"
53 54
win32="no"
54 55
extralibs="-lm"
55 56

  
......
72 73
*) ;;
73 74
esac
74 75

  
75
if [ "$1" = "-h" -o "$1" = "--help" ] ; then
76
if test "$1" = "-h" -o "$1" = "--help" ; then
76 77
cat << EOF
77 78

  
78 79
Usage: configure [options]
......
86 87
echo "  --disable-mmx           disable mmx usage"
87 88
echo "  --enable-gprof          enable profiling with gprof [$gprof]"
88 89
echo "  --disable-grab          disable audio/video grabbing code"
89
echo "  --enable-simple_idct    use simple IDCT routines"
90
echo "  --enable-mp3lame        enable mp3 encoding via libmp3lame"
90
echo "  --enable-simple_idct    use simple IDCT routines [default=no]"
91
echo "  --enable-mp3lame        enable mp3 encoding via libmp3lame [default=no]"
91 92
echo "  --enable-win32          enable win32 cross compile"
93
echo "  --enable-a52bin         open liba52.so.0 at runtime [default=no]"
92 94
echo "  --enable-shared         build shared libraries [default=no]"
93 95
exit 1
94 96
fi
......
108 110
  ;;
109 111
  --disable-grab) grab="no"
110 112
  ;;
113
  --enable-a52bin) a52bin="yes" ; extralibs="-ldl $extralibs"
114
  ;;
111 115
  --enable-mp3lame) mp3lame="yes"
112 116
  ;;
113 117
  --enable-simple_idct) simpleidct="yes"
......
124 128
    CFLAGS="-O2"
125 129
fi
126 130

  
127
if [ "$win32" = "yes" ] ; then
131
if test "$win32" = "yes" ; then
128 132
    cross_prefix="i386-mingw32msvc-"
129 133
    cc="${cross_prefix}gcc"
130 134
    ar="${cross_prefix}ar"
......
163 167
echo "gprof enabled    $gprof"
164 168
echo "grab enabled     $grab"
165 169
echo "mp3lame enabled  $mp3lame"
170
echo "a52 dlopened     $a52bin"
166 171

  
167 172
echo "Creating config.mak and config.h"
168 173

  
......
174 179
echo "CC=$cc" >> config.mak
175 180
echo "AR=$ar" >> config.mak
176 181
echo "OPTFLAGS=$CFLAGS" >> config.mak
177
if [ "$cpu" = "x86" ] ; then
182
if test "$cpu" = "x86" ; then
178 183
  echo "TARGET_ARCH_X86=yes" >> config.mak
179 184
  echo "#define ARCH_X86 1" >> $TMPH
180 185
fi
181
if [ "$cpu" = "armv4l" ]; then
186
if test "$cpu" = "armv4l" ; then
182 187
  echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
183 188
  echo "#define ARCH_ARMV4L 1" >> $TMPH
184 189
fi
185
if [ "$cpu" = "alpha" ]; then
190
if test "$cpu" = "alpha" ; then
186 191
  echo "TARGET_ARCH_ALPHA=yes" >> config.mak
187 192
  echo "#define ARCH_ALPHA 1" >> $TMPH
188 193
fi
189
if [ "$mmx" = "yes" ] ; then
194
if test "$mmx" = "yes" ; then
190 195
  echo "TARGET_MMX=yes" >> config.mak
191 196
  echo "#define HAVE_MMX 1" >> $TMPH
192 197
fi
193
if [ "$gprof" = "yes" ] ; then
198
if test "$gprof" = "yes" ; then
194 199
  echo "TARGET_GPROF=yes" >> config.mak
195 200
  echo "#define HAVE_GPROF 1" >> $TMPH
196 201
fi
197
if [ "$lshared" = "yes" ] ; then
202
if test "$lshared" = "yes" ; then
198 203
  echo "BUILD_SHARED=yes" >> config.mak
199 204
else
200 205
  echo "BUILD_SHARED=no" >> config.mak
......
216 221
echo "#define CONFIG_AC3 1" >> $TMPH
217 222
echo "CONFIG_AC3=yes" >> config.mak
218 223

  
219
if [ "$grab" = "yes" ] ; then
224
if test "$a52bin" = "yes" ; then
225
  echo "#define CONFIG_A52BIN 1" >> $TMPH
226
  echo "CONFIG_A52BIN=yes" >> config.mak
227
else
228
  echo "CONFIG_A52BIN=no" >> config.mak
229
fi
230

  
231
if test "$grab" = "yes" ; then
220 232
  echo "#define CONFIG_GRAB 1" >> $TMPH
221 233
  echo "CONFIG_GRAB=yes" >> config.mak
222 234
fi
223 235

  
224
if [ "$mp3lame" = "yes" ] ; then
236
if test "$mp3lame" = "yes" ; then
225 237
  echo "#define CONFIG_MP3LAME 1" >> $TMPH
226 238
  echo "CONFIG_MP3LAME=yes" >> config.mak
227 239
fi
228 240

  
229
if [ "$win32" = "yes" ] ; then
241
if test "$win32" = "yes" ; then
230 242
  echo "#define CONFIG_WIN32 1" >> $TMPH
231 243
  echo "CONFIG_WIN32=yes" >> config.mak
232 244
fi
233 245

  
234
if [ "$_malloc_h" = "yes" ]; then
246
if test "$_malloc_h" = "yes" ; then
235 247
  echo "#define HAVE_MALLOC_H 1" >> $TMPH
236 248
else
237 249
  echo "#undef  HAVE_MALLOC_H" >> $TMPH
238 250
fi
239 251

  
240
if [ "$_memalign" = "yes" ]; then
252
if test "$_memalign" = "yes" ; then
241 253
  echo "#define HAVE_MEMALIGN 1" >> $TMPH
242 254
else
243 255
  echo "#undef  HAVE_MEMALIGN" >> $TMPH
244 256
fi
245 257

  
246
if [ "$simpleidct" = "yes" ]; then
258
if test "$simpleidct" = "yes" ; then
247 259
  echo "#define SIMPLE_IDCT 1" >> $TMPH
248 260
fi
249 261

  

Also available in: Unified diff