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.

1288 lines
31KB

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