You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1276 lines
30KB

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