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.

1974 lines
50KB

  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 " --libdir=DIR install libs in DIR [PREFIX/lib]"
  14. echo " --mandir=DIR install man page in DIR [PREFIX/man]"
  15. echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
  16. echo " --enable-libogg enable Ogg support via libogg [default=no]"
  17. echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
  18. echo " --enable-theora enable Theora support via libtheora [default=no]"
  19. echo " --enable-faad enable FAAD support via libfaad [default=no]"
  20. echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
  21. echo " --enable-faac enable FAAC support via libfaac [default=no]"
  22. echo " --enable-libgsm enable GSM support via libgsm [default=no]"
  23. echo " --enable-xvid enable XviD support via xvidcore [default=no]"
  24. echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
  25. echo " --enable-mingw32 enable MinGW native/cross Windows compile"
  26. echo " --enable-a52 enable GPLed A52 support [default=no]"
  27. echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
  28. echo " --enable-dts enable GPLed DTS support [default=no]"
  29. echo " --enable-pp enable GPLed postprocessing support [default=no]"
  30. echo " --enable-shared build shared libraries [default=no]"
  31. echo " --enable-amr_nb enable amr_nb float audio codec"
  32. echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
  33. echo " --enable-amr_wb enable amr_wb float audio codec"
  34. echo " --enable-amr_if2 enable amr_wb IF2 audio codec"
  35. echo " --enable-sunmlib use Sun medialib [default=no]"
  36. echo " --enable-pthreads use pthreads [default=no]"
  37. echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
  38. echo " and libraw1394 [default=no]"
  39. echo " --enable-gpl allow use of GPL code, the resulting libav*"
  40. echo " and ffmpeg will be under GPL [default=no]"
  41. echo ""
  42. echo "Advanced options (experts only):"
  43. echo " --source-path=PATH path to source code [$source_path]"
  44. echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
  45. echo " --cc=CC use C compiler CC [$cc]"
  46. echo " --make=MAKE use specified make [$make]"
  47. echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
  48. echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
  49. echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
  50. echo " --build-suffix=SUFFIX suffix for application specific build []"
  51. echo " --cpu=CPU force cpu to CPU [$cpu]"
  52. echo " --tune=CPU tune code for a particular CPU"
  53. echo " (may fail or perform badly on other CPUs)"
  54. echo " --powerpc-perf-enable enable performance report on PPC"
  55. echo " (requires enabling PMC)"
  56. echo " --disable-mmx disable MMX usage"
  57. echo " --disable-iwmmxt disable iwmmxt usage"
  58. echo " --disable-altivec disable AltiVec usage"
  59. echo " --disable-audio-oss disable OSS audio support [default=no]"
  60. echo " --disable-audio-beos disable BeOS audio support [default=no]"
  61. echo " --disable-v4l disable video4linux grabbing [default=no]"
  62. echo " --disable-bktr disable bktr video grabbing [default=no]"
  63. echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
  64. echo " --disable-network disable network support [default=no]"
  65. echo " --disable-zlib disable zlib [default=no]"
  66. echo " --disable-lzo disable lzo [default=no]"
  67. echo " --disable-simple_idct disable simple IDCT routines [default=no]"
  68. echo " --disable-vhook disable video hooking support"
  69. echo " --enable-gprof enable profiling with gprof [$gprof]"
  70. echo " --disable-debug disable debugging symbols"
  71. echo " --disable-opts disable compiler optimizations"
  72. echo " --disable-mpegaudio-hp faster (but less accurate)"
  73. echo " MPEG audio decoding [default=no]"
  74. echo " --disable-ffserver disable ffserver build"
  75. echo " --disable-ffplay disable ffplay build"
  76. echo " --enable-small optimize for size instead of speed"
  77. echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
  78. echo " --disable-strip disable stripping of executables and shared libraries"
  79. echo " --disable-encoder=NAME disables encoder NAME"
  80. echo " --enable-encoder=NAME enables encoder NAME"
  81. echo " --disable-decoder=NAME disables decoder NAME"
  82. echo " --enable-decoder=NAME enables decoder NAME"
  83. echo " --disable-encoders disables all encoders"
  84. echo " --disable-decoders disables all decoders"
  85. echo " --disable-muxers disables all muxers"
  86. echo " --disable-demuxers disables all demuxers"
  87. echo ""
  88. echo "NOTE: Object files are built at the place where configure is launched."
  89. exit 1
  90. fi
  91. # set temporary file name
  92. if test ! -z "$TMPDIR" ; then
  93. TMPDIR1="${TMPDIR}"
  94. elif test ! -z "$TEMPDIR" ; then
  95. TMPDIR1="${TEMPDIR}"
  96. else
  97. TMPDIR1="/tmp"
  98. fi
  99. TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
  100. TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
  101. TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
  102. TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
  103. TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
  104. # default parameters
  105. prefix="/usr/local"
  106. libdir=""
  107. mandir=""
  108. bindir=""
  109. cross_prefix=""
  110. cc="gcc"
  111. ar="ar"
  112. ranlib="ranlib"
  113. make="make"
  114. strip="strip"
  115. cpu=`uname -m`
  116. tune="generic"
  117. powerpc_perf="no"
  118. mmx="default"
  119. iwmmxt="default"
  120. altivec="default"
  121. mmi="default"
  122. case "$cpu" in
  123. i386|i486|i586|i686|i86pc|BePC)
  124. cpu="x86"
  125. ;;
  126. x86_64|amd64)
  127. cpu="x86"
  128. canon_arch="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
  129. if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
  130. if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
  131. cpu="x86_64"
  132. fi
  133. fi
  134. ;;
  135. # armv4l is a subset of armv5tel
  136. armv4l|armv5tel)
  137. cpu="armv4l"
  138. ;;
  139. alpha)
  140. cpu="alpha"
  141. ;;
  142. "Power Macintosh"|ppc|powerpc)
  143. cpu="powerpc"
  144. ;;
  145. mips|mipsel)
  146. cpu="mips"
  147. ;;
  148. sun4u|sparc64)
  149. cpu="sparc64"
  150. ;;
  151. sparc)
  152. cpu="sparc"
  153. ;;
  154. sh4)
  155. cpu="sh4"
  156. ;;
  157. parisc|parisc64)
  158. cpu="parisc"
  159. ;;
  160. s390|s390x)
  161. cpu="s390"
  162. ;;
  163. m68k)
  164. cpu="m68k"
  165. ;;
  166. ia64)
  167. cpu="ia64"
  168. ;;
  169. *)
  170. cpu="unknown"
  171. ;;
  172. esac
  173. gprof="no"
  174. v4l="yes"
  175. bktr="no"
  176. audio_oss="yes"
  177. audio_beos="no"
  178. dv1394="yes"
  179. dc1394="no"
  180. network="yes"
  181. zlib="yes"
  182. lzo="yes"
  183. libgsm="no"
  184. mp3lame="no"
  185. libogg="no"
  186. vorbis="no"
  187. theora="no"
  188. faad="no"
  189. faadbin="no"
  190. faac="no"
  191. xvid="no"
  192. x264="no"
  193. a52="no"
  194. a52bin="no"
  195. dts="no"
  196. pp="no"
  197. mingw32="no"
  198. cygwin="no"
  199. os2="no"
  200. lshared="no"
  201. optimize="yes"
  202. debug="yes"
  203. dostrip="yes"
  204. installstrip="-s"
  205. extralibs="-lm"
  206. simpleidct="yes"
  207. bigendian="no"
  208. inttypes="yes"
  209. emu_fast_int="no"
  210. vhook="default"
  211. dlfcn="no"
  212. dlopen="no"
  213. mpegaudio_hp="yes"
  214. SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)'
  215. netserver="no"
  216. need_inet_aton="no"
  217. ffserver="yes"
  218. ffplay="yes"
  219. LIBOBJFLAGS=""
  220. LDFLAGS=-Wl,--warn-common
  221. FFSLDFLAGS=-Wl,-E
  222. LDCONFIG="ldconfig"
  223. LIBPREF="lib"
  224. LIBSUF=".a"
  225. LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
  226. SLIBPREF="lib"
  227. SLIBSUF=".so"
  228. SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
  229. SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
  230. SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
  231. EXESUF=""
  232. BUILDSUF=""
  233. amr_nb="no"
  234. amr_wb="no"
  235. amr_nb_fixed="no"
  236. amr_if2="no"
  237. sunmlib="no"
  238. pthreads="no"
  239. gpl="no"
  240. memalignhack="no"
  241. muxers="yes"
  242. demuxers="yes"
  243. # OS specific
  244. targetos=`uname -s`
  245. case $targetos in
  246. BeOS)
  247. prefix="/boot/home/config"
  248. # helps building libavcodec
  249. CFLAGS="-DPIC -fomit-frame-pointer"
  250. # 3 gcc releases known for BeOS, each with ugly bugs
  251. gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
  252. case "$gcc_version" in
  253. 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
  254. mmx="no"
  255. ;;
  256. *20010315*) echo "BeBits gcc"
  257. CFLAGS="$CFLAGS -fno-expensive-optimizations"
  258. ;;
  259. esac
  260. SHFLAGS=-nostart
  261. # disable Linux things
  262. audio_oss="no"
  263. v4l="no"
  264. dv1394="no"
  265. # enable BeOS things
  266. audio_beos="yes"
  267. # no need for libm, but the inet stuff
  268. # Check for BONE
  269. if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
  270. extralibs="-lbind -lsocket"
  271. else
  272. netserver="yes"
  273. need_inet_aton="yes"
  274. extralibs="-lnet"
  275. fi ;;
  276. SunOS)
  277. v4l="no"
  278. audio_oss="no"
  279. dv1394="no"
  280. make="gmake"
  281. LDFLAGS=""
  282. FFSLDFLAGS=""
  283. need_inet_aton="yes"
  284. extralibs="$extralibs -lsocket -lnsl"
  285. ;;
  286. NetBSD)
  287. v4l="no"
  288. bktr="yes"
  289. audio_oss="yes"
  290. dv1394="no"
  291. make="gmake"
  292. LDFLAGS="$LDFLAGS -export-dynamic"
  293. case `uname -r` in
  294. 2.*) extralibs="$extralibs -lossaudio"
  295. ;;
  296. esac
  297. ;;
  298. OpenBSD)
  299. v4l="no"
  300. bktr="yes"
  301. audio_oss="yes"
  302. dv1394="no"
  303. make="gmake"
  304. LIBOBJFLAGS="\$(PIC)"
  305. LDFLAGS="$LDFLAGS -export-dynamic -pthread"
  306. LDCONFIG="ldconfig -m \$(libdir)"
  307. extralibs="$extralibs -lossaudio"
  308. ;;
  309. FreeBSD)
  310. v4l="no"
  311. bktr="yes"
  312. audio_oss="yes"
  313. dv1394="no"
  314. make="gmake"
  315. CFLAGS="-pthread"
  316. LDFLAGS="$LDFLAGS -export-dynamic -pthread"
  317. ;;
  318. BSD/OS)
  319. v4l="no"
  320. bktr="yes"
  321. audio_oss="yes"
  322. dv1394="no"
  323. extralibs="-lpoll -lgnugetopt -lm"
  324. make="gmake"
  325. strip="strip -d"
  326. installstrip=""
  327. ;;
  328. Darwin)
  329. cc="cc"
  330. v4l="no"
  331. audio_oss="no"
  332. dv1394="no"
  333. ffserver="no"
  334. SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(libdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
  335. extralibs=""
  336. darwin="yes"
  337. strip="strip -x"
  338. installstrip=""
  339. LDFLAGS="-Wl,-dynamic,-search_paths_first"
  340. SLIBSUF=".dylib"
  341. SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
  342. SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
  343. FFSLDFLAGS=-Wl,-bind_at_load
  344. ;;
  345. MINGW32*)
  346. # Note: the rest of the mingw32 config is done afterwards as mingw32
  347. # can be forced on the command line for Linux cross compilation.
  348. mingw32="yes"
  349. ;;
  350. CYGWIN*)
  351. v4l="no"
  352. audio_oss="yes"
  353. dv1394="no"
  354. vhook="no"
  355. extralibs=""
  356. cygwin="yes"
  357. EXESUF=".exe"
  358. ;;
  359. Linux)
  360. LDFLAGS="$LDFLAGS -rdynamic"
  361. ;;
  362. IRIX*)
  363. ranlib="echo ignoring ranlib"
  364. v4l="no"
  365. audio_oss="no"
  366. make="gmake"
  367. ;;
  368. OS/2)
  369. TMPE=$TMPE".exe"
  370. ar="emxomfar -p128"
  371. ranlib="echo ignoring ranlib"
  372. strip="echo ignoring strip"
  373. CFLAGS="-Zomf"
  374. LDFLAGS="-Zomf -Zstack 16384 -s"
  375. SHFLAGS="-Zdll -Zomf"
  376. FFSLDFLAGS=""
  377. LIBPREF=""
  378. LIBSUF=".lib"
  379. SLIBPREF=""
  380. SLIBSUF=".dll"
  381. EXESUF=".exe"
  382. extralibs=""
  383. pkg_requires=""
  384. v4l="no"
  385. audio_oss="no"
  386. dv1394="no"
  387. network="no"
  388. ffserver="no"
  389. vhook="no"
  390. os2="yes"
  391. ;;
  392. *) ;;
  393. esac
  394. # From MPlayer configure. We need TARGET_OS available
  395. # to the Makefile, so it can distinguish between flavors
  396. # of AltiVec on PowerPC.
  397. TARGET_OS=`( uname -s ) 2>&1`
  398. case "$TARGET_OS" in
  399. Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
  400. ;;
  401. IRIX*)
  402. TARGET_OS=IRIX
  403. ;;
  404. HP-UX*)
  405. TARGET_OS=HP-UX
  406. ;;
  407. [cC][yY][gG][wW][iI][nN]*)
  408. TARGET_OS=CYGWIN
  409. ;;
  410. *)
  411. TARGET_OS="$TARGET_OS-UNKNOWN"
  412. ;;
  413. esac
  414. # find source path
  415. source_path="`dirname $0`"
  416. source_path_used="yes"
  417. if test -z "$source_path" -o "$source_path" = "." ; then
  418. source_path=`pwd`
  419. source_path_used="no"
  420. else
  421. source_path="`cd \"$source_path\"; pwd`"
  422. fi
  423. FFMPEG_CONFIGURATION=" "
  424. for opt do
  425. FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
  426. done
  427. CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
  428. for opt do
  429. case "$opt" in
  430. --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
  431. ;;
  432. --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`; force_libdir=yes
  433. ;;
  434. --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
  435. ;;
  436. --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
  437. ;;
  438. --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
  439. ;;
  440. --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
  441. ;;
  442. --make=*) make=`echo $opt | cut -d '=' -f 2`
  443. ;;
  444. --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
  445. ;;
  446. --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
  447. ;;
  448. --extra-libs=*) extralibs=${opt#--extra-libs=}
  449. ;;
  450. --build-suffix=*) BUILDSUF=${opt#--build-suffix=}
  451. ;;
  452. --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
  453. ;;
  454. --tune=*) tune=`echo $opt | cut -d '=' -f 2`
  455. ;;
  456. --powerpc-perf-enable) powerpc_perf="yes"
  457. ;;
  458. --disable-mmx) mmx="no"
  459. ;;
  460. --disable-iwmmxt) iwmmxt="no"
  461. ;;
  462. --disable-altivec) altivec="no"
  463. ;;
  464. --enable-gprof) gprof="yes"
  465. ;;
  466. --disable-v4l) v4l="no"
  467. ;;
  468. --disable-bktr) bktr="no"
  469. ;;
  470. --disable-audio-oss) audio_oss="no"
  471. ;;
  472. --disable-audio-beos) audio_beos="no"
  473. ;;
  474. --disable-dv1394) dv1394="no"
  475. ;;
  476. --disable-network) network="no"; ffserver="no"
  477. ;;
  478. --disable-zlib) zlib="no"
  479. ;;
  480. --disable-lzo) lzo="no"
  481. ;;
  482. --enable-a52) a52="yes"
  483. ;;
  484. --enable-a52bin) a52bin="yes"
  485. ;;
  486. --enable-dts) dts="yes"
  487. extralibs="$extralibs -ldts"
  488. ;;
  489. --enable-pp) pp="yes"
  490. ;;
  491. --enable-libgsm) libgsm="yes"
  492. extralibs="$extralibs -lgsm"
  493. ;;
  494. --enable-mp3lame) mp3lame="yes"
  495. extralibs="$extralibs -lmp3lame"
  496. ;;
  497. --enable-libogg) libogg="yes"
  498. extralibs="$extralibs -logg"
  499. pkg_requires="$pkg_requires ogg >= 1.1"
  500. ;;
  501. --enable-vorbis) vorbis="yes"
  502. extralibs="$extralibs -lvorbis -lvorbisenc"
  503. pkg_requires="$pkg_requires vorbis vorbisenc"
  504. ;;
  505. --enable-theora) theora="yes"
  506. extralibs="$extralibs -ltheora"
  507. pkg_requires="$pkg_requires theora"
  508. ;;
  509. --enable-faad) faad="yes"
  510. extralibs="$extralibs -lfaad"
  511. ;;
  512. --enable-faadbin) faadbin="yes"
  513. ;;
  514. --enable-faac) faac="yes"
  515. extralibs="$extralibs -lfaac"
  516. ;;
  517. --enable-xvid) xvid="yes"
  518. extralibs="$extralibs -lxvidcore"
  519. ;;
  520. --enable-x264) x264="yes"
  521. extralibs="$extralibs -lx264"
  522. ;;
  523. --enable-dc1394) dc1394="yes"
  524. extralibs="$extralibs -ldc1394_control -lraw1394"
  525. pkg_requires="$pkg_requires libraw1394"
  526. ;;
  527. --disable-vhook) vhook="no"
  528. ;;
  529. --disable-simple_idct) simpleidct="no"
  530. ;;
  531. --enable-mingw32) mingw32="yes"
  532. ;;
  533. --enable-shared) lshared="yes"
  534. ;;
  535. --disable-debug) debug="no"
  536. ;;
  537. --disable-opts) optimize="no"
  538. ;;
  539. --disable-mpegaudio-hp) mpegaudio_hp="no"
  540. ;;
  541. --disable-ffserver) ffserver="no"
  542. ;;
  543. --disable-ffplay) ffplay="no"
  544. ;;
  545. --enable-small) optimize="small"
  546. ;;
  547. --enable-amr_nb) amr_nb="yes"
  548. ;;
  549. --enable-amr_nb-fixed) amr_nb_fixed="yes"
  550. ;;
  551. --enable-amr_wb) amr_wb="yes"
  552. ;;
  553. --enable-amr_if2) amr_if2="yes"
  554. ;;
  555. --enable-sunmlib) sunmlib="yes"
  556. ;;
  557. --enable-pthreads) pthreads="yes"
  558. ;;
  559. --enable-gpl) gpl="yes"
  560. ;;
  561. --enable-memalign-hack) memalignhack="yes"
  562. ;;
  563. --disable-strip) dostrip="no"
  564. ;;
  565. --enable-encoder=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-encoder=}_encoder"
  566. ;;
  567. --enable-decoder=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-decoder=}_decoder"
  568. ;;
  569. --disable-encoder=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-encoder=}_encoder##\"`"
  570. ;;
  571. --disable-decoder=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-decoder=}_decoder##\"`"
  572. ;;
  573. --disable-encoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
  574. ;;
  575. --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
  576. ;;
  577. --disable-muxers) muxers="no"
  578. ;;
  579. --disable-demuxers) demuxers="no"
  580. ;;
  581. *)
  582. echo "Unknown option \"$opt\"."
  583. echo "See $0 --help for available options."
  584. exit 1
  585. ;;
  586. esac
  587. done
  588. if test "$theora" = "yes" ; then
  589. if test "$libogg" = "no"; then
  590. echo "libogg must be enabled to enable Theora."
  591. fail="yes"
  592. theora="no"
  593. fi
  594. fi
  595. if test "$vorbis" = "yes" ; then
  596. if test "$libogg" = "no"; then
  597. echo "libogg must be enabled to enable Vorbis."
  598. fail="yes"
  599. vorbis="no"
  600. fi
  601. fi
  602. if test "$gpl" != "yes"; then
  603. if test "$pp" != "no"; then
  604. echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
  605. fail="yes"
  606. fi
  607. if test "$a52" != "no" -o "$a52bin" != "no"; then
  608. echo "liba52 is under GPL and --enable-gpl is not specified."
  609. fail="yes"
  610. fi
  611. if test "$xvid" != "no"; then
  612. echo "libxvidcore is under GPL and --enable-gpl is not specified."
  613. fail="yes"
  614. fi
  615. if test "$x264" != "no"; then
  616. echo "x264 is under GPL and --enable-gpl is not specified."
  617. fail="yes"
  618. fi
  619. if test "$dts" != "no"; then
  620. echo "libdts is under GPL and --enable-gpl is not specified."
  621. fail="yes"
  622. fi
  623. if test "$faad" != "no" -o "$faadbin" != "no"; then
  624. cat > $TMPC << EOF
  625. #include <faad.h>
  626. int main( void ) { return 0; }
  627. EOF
  628. if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
  629. cat > $TMPC << EOF
  630. #include <faad.h>
  631. #ifndef FAAD2_VERSION
  632. ok faad1
  633. #endif
  634. int main( void ) { return 0; }
  635. EOF
  636. if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
  637. echo "FAAD2 is under GPL and --enable-gpl is not specified."
  638. fail="yes"
  639. fi
  640. else
  641. faad="no"
  642. faadbin="no"
  643. echo "FAAD test failed."
  644. fi
  645. fi
  646. if test "$fail" = "yes"; then
  647. exit 1
  648. fi
  649. fi
  650. # compute MMX state
  651. if test $mmx = "default"; then
  652. if test $cpu = "x86" -o $cpu = "x86_64"; then
  653. mmx="yes"
  654. else
  655. mmx="no"
  656. fi
  657. fi
  658. # check iwmmxt support
  659. if test $iwmmxt = "default" -a $cpu = "armv4l"; then
  660. cat > $TMPC << EOF
  661. int main(void) {
  662. __asm__ __volatile__ ("wunpckelub wr6, wr4");
  663. }
  664. EOF
  665. iwmmxt=no
  666. if ${cross_prefix}${cc} -o $TMPO $TMPC 2> /dev/null ; then
  667. iwmmxt=yes
  668. fi
  669. fi
  670. #Darwin CC versions
  671. needmdynamicnopic="no"
  672. if test $targetos = Darwin; then
  673. if test -n "`$cc -v 2>&1 | grep xlc`"; then
  674. CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
  675. else
  676. gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
  677. case "$gcc_version" in
  678. *2.95*)
  679. CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
  680. ;;
  681. *[34].*)
  682. CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
  683. if test "$lshared" = no; then
  684. needmdynamicnopic="yes"
  685. fi
  686. ;;
  687. *)
  688. CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
  689. if test "$lshared" = no; then
  690. needmdynamicnopic="yes"
  691. fi
  692. ;;
  693. esac
  694. fi
  695. fi
  696. # Can only do AltiVec on PowerPC
  697. if test $altivec = "default"; then
  698. if test $cpu = "powerpc"; then
  699. altivec="yes"
  700. else
  701. altivec="no"
  702. fi
  703. fi
  704. # Add processor-specific flags
  705. TUNECPU="generic"
  706. POWERPCMODE="32bits"
  707. if test $tune != "generic"; then
  708. case $tune in
  709. 601|ppc601|PowerPC601)
  710. CFLAGS="$CFLAGS -mcpu=601"
  711. if test $altivec = "yes"; then
  712. echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
  713. fi
  714. TUNECPU=ppc601
  715. ;;
  716. 603*|ppc603*|PowerPC603*)
  717. CFLAGS="$CFLAGS -mcpu=603"
  718. if test $altivec = "yes"; then
  719. echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
  720. fi
  721. TUNECPU=ppc603
  722. ;;
  723. 604*|ppc604*|PowerPC604*)
  724. CFLAGS="$CFLAGS -mcpu=604"
  725. if test $altivec = "yes"; then
  726. echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
  727. fi
  728. TUNECPU=ppc604
  729. ;;
  730. G3|g3|75*|ppc75*|PowerPC75*)
  731. CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
  732. if test $altivec = "yes"; then
  733. echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
  734. fi
  735. TUNECPU=ppc750
  736. ;;
  737. G4|g4|745*|ppc745*|PowerPC745*)
  738. CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
  739. if test $altivec = "no"; then
  740. echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
  741. fi
  742. TUNECPU=ppc7450
  743. ;;
  744. 74*|ppc74*|PowerPC74*)
  745. CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
  746. if test $altivec = "no"; then
  747. echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
  748. fi
  749. TUNECPU=ppc7400
  750. ;;
  751. G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
  752. CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
  753. if test $altivec = "no"; then
  754. echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
  755. fi
  756. TUNECPU=ppc970
  757. POWERPCMODE="64bits"
  758. ;;
  759. i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
  760. CFLAGS="$CFLAGS -march=$tune"
  761. ;;
  762. *)
  763. echo "WARNING: Unknown CPU \"$tune\", ignored."
  764. ;;
  765. esac
  766. fi
  767. # AltiVec flags: The FSF version of GCC differs from the Apple version
  768. if test $cpu = "powerpc"; then
  769. if test $altivec = "yes"; then
  770. if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
  771. CFLAGS="$CFLAGS -faltivec"
  772. else
  773. CFLAGS="$CFLAGS -maltivec -mabi=altivec"
  774. fi
  775. fi
  776. fi
  777. # check if we have <altivec.h>
  778. cat > $TMPC << EOF
  779. #include <altivec.h>
  780. int main( void ) { return 0; }
  781. EOF
  782. _altivec_h="no"
  783. if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
  784. _altivec_h="yes"
  785. fi
  786. # check if our compiler supports Motorola AltiVec C API
  787. if test $altivec = "yes"; then
  788. if test $_altivec_h = "yes"; then
  789. cat > $TMPC << EOF
  790. #include <altivec.h>
  791. int main(void) {
  792. vector signed int v1, v2, v3;
  793. v1 = vec_add(v2,v3);
  794. return 0;
  795. }
  796. EOF
  797. else
  798. cat > $TMPC << EOF
  799. int main(void) {
  800. vector signed int v1, v2, v3;
  801. v1 = vec_add(v2,v3);
  802. return 0;
  803. }
  804. EOF
  805. fi
  806. $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
  807. fi
  808. # mmi only available on mips
  809. if test $mmi = "default"; then
  810. if test $cpu = "mips"; then
  811. mmi="yes"
  812. else
  813. mmi="no"
  814. fi
  815. fi
  816. # check if our compiler supports mmi
  817. if test $mmi = "yes"; then
  818. cat > $TMPC << EOF
  819. int main(void) {
  820. __asm__ ("lq \$2, 0(\$2)");
  821. return 0;
  822. }
  823. EOF
  824. $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
  825. fi
  826. if test "$mingw32" = "yes" ; then
  827. v4l="no"
  828. bktr="no"
  829. audio_oss="no"
  830. dv1394="no"
  831. dc1394="no"
  832. ffserver="no"
  833. network="no"
  834. SLIBPREF=""
  835. SLIBSUF=".dll"
  836. EXESUF=".exe"
  837. if test "$force_prefix" != yes; then prefix="/c/Program Files/FFmpeg"; fi
  838. if test "$force_libdir" != yes; then bindir="$prefix"; fi
  839. fi
  840. cc="${cross_prefix}${cc}"
  841. ar="${cross_prefix}${ar}"
  842. ranlib="${cross_prefix}${ranlib}"
  843. strip="${cross_prefix}${strip}"
  844. if test -z "$cross_prefix" ; then
  845. # ---
  846. # big/little-endian test
  847. cat > $TMPC << EOF
  848. #include <inttypes.h>
  849. int main(int argc, char ** argv){
  850. volatile uint32_t i=0x01234567;
  851. return (*((uint8_t*)(&i))) == 0x67;
  852. }
  853. EOF
  854. if $cc -o $TMPE $TMPC 2>/dev/null ; then
  855. $TMPE && bigendian="yes"
  856. else
  857. echo big/little test failed
  858. fi
  859. else
  860. # programs cannot be launched if cross compiling, so make a static guess
  861. if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
  862. bigendian="yes"
  863. fi
  864. fi
  865. # ---
  866. # *inttypes.h* test
  867. cat > $TMPC << EOF
  868. #include <inttypes.h>
  869. int main(int argc, char ** argv){
  870. return 0;
  871. }
  872. EOF
  873. $cc -o $TMPE $TMPC 2>/dev/null || inttypes="no"
  874. # ---
  875. # *int_fast* test
  876. cat > $TMPC << EOF
  877. #include <inttypes.h>
  878. int main(int argc, char ** argv){
  879. volatile uint_fast64_t i=0x01234567;
  880. return 0;
  881. }
  882. EOF
  883. $cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
  884. # ---
  885. # check availability of some header files
  886. cat > $TMPC << EOF
  887. #include <malloc.h>
  888. int main( void ) { return 0; }
  889. EOF
  890. _memalign=no
  891. _malloc_h=no
  892. if $cc -o $TMPE $TMPC 2> /dev/null ; then
  893. _malloc_h=yes
  894. _memalign=yes
  895. # check for memalign - atmos
  896. cat > $TMPC << EOF
  897. #include <stdio.h>
  898. #include <malloc.h>
  899. int main ( void ) {
  900. char *string = NULL;
  901. string = memalign(64, sizeof(char));
  902. return 0;
  903. }
  904. EOF
  905. $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
  906. fi
  907. if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
  908. echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
  909. exit 1
  910. fi
  911. cat > $TMPC << EOF
  912. #include <time.h>
  913. int main( void ) { localtime_r(NULL, NULL); }
  914. EOF
  915. localtime_r=no
  916. if $cc -o $TMPE $TMPC 2> /dev/null ; then
  917. localtime_r=yes
  918. fi
  919. if test "$zlib" = "yes"; then
  920. # check for zlib - mmu_man
  921. cat > $TMPC << EOF
  922. #include <zlib.h>
  923. int main ( void ) {
  924. if (zlibVersion() != ZLIB_VERSION)
  925. puts("zlib version differs !!!");
  926. return 1;
  927. return 0;
  928. }
  929. EOF
  930. $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
  931. # $TMPE 2> /dev/null > /dev/null || zlib="no"
  932. # XXX: more tests needed - runtime test
  933. fi
  934. if test "$zlib" = "yes"; then
  935. extralibs="$extralibs -lz"
  936. fi
  937. if test "$lzo" = "yes" -a "$gpl" = "yes"; then
  938. # check for liblzo
  939. cat > $TMPC << EOF
  940. #include <lzo1x.h>
  941. int main ( void ) {
  942. lzo_init();
  943. return 0;
  944. }
  945. EOF
  946. $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -llzo 2> /dev/null || lzo="no"
  947. else
  948. lzo="no"
  949. fi
  950. if test "$lzo" = "yes"; then
  951. extralibs="$extralibs -llzo"
  952. fi
  953. # test for lrintf in math.h
  954. cat > $TMPC << EOF
  955. #define _ISOC9X_SOURCE 1
  956. #include <math.h>
  957. int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
  958. EOF
  959. have_lrintf="no"
  960. if $cc $CFLAGS $LDFLAGS $extralibs -o $TMPE $TMPC 2> /dev/null ; then
  961. have_lrintf="yes"
  962. # allanc@chickenandporn.com: cannot execute cross-compiled
  963. # code on the host. Only execute if not cross-compiling.
  964. if test -z "$cross_prefix" ; then
  965. $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
  966. fi
  967. fi
  968. _restrict=
  969. for restrict_keyword in restrict __restrict__ __restrict; do
  970. echo "void foo(char * $restrict_keyword p);" > $TMPC
  971. if $cc -c -o $TMPO $TMPC 2> /dev/null; then
  972. _restrict=$restrict_keyword
  973. break;
  974. fi
  975. done
  976. # test gcc version to see if vector builtins can be used
  977. # currently only used on i386 for MMX builtins
  978. cat > $TMPC << EOF
  979. #include <xmmintrin.h>
  980. int main(void) {
  981. #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
  982. return 0;
  983. #else
  984. #error no vector builtins
  985. #endif
  986. }
  987. EOF
  988. builtin_vector=no
  989. if $cc -msse -o $TMPO $TMPC 2> /dev/null ; then
  990. builtin_vector=yes
  991. fi
  992. # Probe for -Wdeclaration-after-statement
  993. if test "$cc" = "gcc"; then
  994. cat > $TMPC << EOF
  995. int main( void ) { return 0; }
  996. EOF
  997. if $cc -Wdeclaration-after-statement -Werror -o $TMPE $TMPC 2> /dev/null ; then
  998. CFLAGS="$CFLAGS -Wdeclaration-after-statement"
  999. fi
  1000. fi
  1001. # dlopen/dlfcn.h probing
  1002. cat > $TMPC << EOF
  1003. #include <dlfcn.h>
  1004. int main( void ) { return (int) dlopen("foo", 0); }
  1005. EOF
  1006. ldl=-ldl
  1007. if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
  1008. dlfcn=yes
  1009. dlopen=yes
  1010. fi
  1011. if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC > /dev/null 2>&1 ; then
  1012. dlfcn=yes
  1013. dlopen=yes
  1014. ldl=""
  1015. fi
  1016. cat > $TMPC << EOF
  1017. int main( void ) { return (int) dlopen("foo", 0); }
  1018. EOF
  1019. if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
  1020. dlopen=yes
  1021. fi
  1022. if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC > /dev/null 2>&1 ; then
  1023. dlopen=yes
  1024. ldl=""
  1025. fi
  1026. if test "$vhook" = "default" ; then
  1027. vhook="$dlopen"
  1028. fi
  1029. if test "$vhook" = "yes" -o "$a52bin" = "yes" -o "$faadbin" = "yes"; then
  1030. extralibs="$extralibs $ldl"
  1031. fi
  1032. ##########################################
  1033. # imlib check
  1034. cat > $TMPC << EOF
  1035. #include <X11/Xlib.h>
  1036. #include <Imlib2.h>
  1037. int main( void ) { return (int) imlib_load_font("foo"); }
  1038. EOF
  1039. imlib2=no
  1040. if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1 ; then
  1041. imlib2=yes
  1042. fi
  1043. ##########################################
  1044. # FreeType check
  1045. cat > $TMPC << EOF
  1046. #include <ft2build.h>
  1047. int main( void ) { return (int) FT_Init_FreeType(0); }
  1048. EOF
  1049. freetype2=no
  1050. if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
  1051. if (freetype-config --version) >/dev/null 2>&1 ; then
  1052. if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev/null 2>&1 ; then
  1053. freetype2=yes
  1054. fi
  1055. fi
  1056. fi
  1057. ##########################################
  1058. # SDL check
  1059. cat > $TMPC << EOF
  1060. #include <SDL.h>
  1061. #undef main /* We don't want SDL to override our main() */
  1062. int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
  1063. EOF
  1064. sdl_too_old=no
  1065. sdl=no
  1066. if (sdl-config --version) >/dev/null 2>&1 ; then
  1067. if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev/null 2>&1 ; then
  1068. _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
  1069. if test "$_sdlversion" -lt 121 ; then
  1070. sdl_too_old=yes
  1071. else
  1072. sdl=yes
  1073. fi
  1074. fi
  1075. fi
  1076. ##########################################
  1077. # texi2html check
  1078. texi2html=no
  1079. if (texi2html -version) >/dev/null 2>&1; then
  1080. texi2html=yes
  1081. fi
  1082. if test "$network" = "yes" ; then
  1083. ##########################################
  1084. # IPv6 check
  1085. cat > $TMPC << EOF
  1086. #include <sys/types.h>
  1087. #include <sys/socket.h>
  1088. #include <netinet/in.h>
  1089. #include <netdb.h>
  1090. int main( void ) {
  1091. struct sockaddr_storage saddr;
  1092. struct ipv6_mreq mreq6;
  1093. getaddrinfo(0,0,0,0);
  1094. getnameinfo(0,0,0,0,0,0,0);
  1095. IN6_IS_ADDR_MULTICAST(0);
  1096. }
  1097. EOF
  1098. ipv6=no
  1099. if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
  1100. ipv6=yes
  1101. fi
  1102. fi
  1103. case "`$cc -v 2>&1 | grep version`" in
  1104. *gcc*)
  1105. CFLAGS="-Wall -Wno-switch $CFLAGS"
  1106. ;;
  1107. *)
  1108. ;;
  1109. esac
  1110. if test "$sdl" = "no" ; then
  1111. ffplay=no
  1112. fi
  1113. if test "$debug" = "yes"; then
  1114. CFLAGS="-g $CFLAGS"
  1115. fi
  1116. if test "$optimize" = "small"; then
  1117. # CFLAGS=${CFLAGS//-O3/-Os}
  1118. CFLAGS="$CFLAGS -Os"
  1119. fi
  1120. if test "$optimize" = "yes"; then
  1121. if test -n "`$cc -v 2>&1 | grep xlc`"; then
  1122. CFLAGS="$CFLAGS -O5"
  1123. LDFLAGS="$LDFLAGS -O5"
  1124. else
  1125. CFLAGS="-O3 $CFLAGS"
  1126. fi
  1127. fi
  1128. # PIC flags for shared library objects where they are needed
  1129. if test "$lshared" = "yes" ; then
  1130. # LIBOBJFLAGS may have already been set in the OS configuration
  1131. if test -z "$LIBOBJFLAGS" ; then
  1132. if test "$cpu" = "x86_64" -o "$cpu" = "ia64" -o "$cpu" = "alpha" ; then
  1133. LIBOBJFLAGS="\$(PIC)"
  1134. fi
  1135. fi
  1136. fi
  1137. if test x"$bindir" = x""; then
  1138. bindir="${prefix}/bin"
  1139. fi
  1140. if test x"$libdir" = x""; then
  1141. libdir="${prefix}/lib"
  1142. fi
  1143. if test x"$mandir" = x""; then
  1144. mandir="${prefix}/man"
  1145. fi
  1146. echo "install prefix $prefix"
  1147. echo "source path $source_path"
  1148. echo "C compiler $cc"
  1149. echo "make $make"
  1150. echo "CPU $cpu ($tune)"
  1151. if test "$BUILDSUF" != ""; then
  1152. echo "build suffix $BUILDSUF"
  1153. fi
  1154. echo "big-endian $bigendian"
  1155. echo "inttypes.h $inttypes"
  1156. echo "broken inttypes.h $emu_fast_int"
  1157. if test $cpu = "x86" -o $cpu = "x86_64"; then
  1158. echo "MMX enabled $mmx"
  1159. echo "Vector Builtins $builtin_vector"
  1160. fi
  1161. if test $cpu = "armv4l"; then
  1162. echo "IWMMXT enabled $iwmmxt"
  1163. fi
  1164. if test $cpu = "mips"; then
  1165. echo "MMI enabled $mmi"
  1166. fi
  1167. if test $cpu = "powerpc"; then
  1168. echo "AltiVec enabled $altivec"
  1169. fi
  1170. echo "gprof enabled $gprof"
  1171. echo "zlib enabled $zlib"
  1172. echo "lzo enabled $lzo"
  1173. echo "libgsm enabled $libgsm"
  1174. echo "mp3lame enabled $mp3lame"
  1175. echo "libogg enabled $libogg"
  1176. echo "Vorbis enabled $vorbis"
  1177. echo "Theora enabled $theora"
  1178. echo "FAAD enabled $faad"
  1179. echo "faadbin enabled $faadbin"
  1180. echo "FAAC enabled $faac"
  1181. echo "XviD enabled $xvid"
  1182. echo "x264 enabled $x264"
  1183. echo "a52 support $a52"
  1184. echo "a52 dlopened $a52bin"
  1185. echo "DTS support $dts"
  1186. echo "pp support $pp"
  1187. echo "debug symbols $debug"
  1188. echo "strip symbols $dostrip"
  1189. echo "optimize $optimize"
  1190. echo "shared $lshared"
  1191. echo "video hooking $vhook"
  1192. echo "SDL support $sdl"
  1193. if test $sdl_too_old = "yes"; then
  1194. echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
  1195. fi
  1196. if test "$vhook" = "yes" ; then
  1197. echo "Imlib2 support $imlib2"
  1198. echo "FreeType support $freetype2"
  1199. fi
  1200. echo "Sun medialib support" $sunmlib
  1201. echo "pthreads support" $pthreads
  1202. echo "AMR-NB float support" $amr_nb
  1203. echo "AMR-NB fixed support" $amr_nb_fixed
  1204. echo "AMR-WB float support" $amr_wb
  1205. echo "AMR-WB IF2 support" $amr_if2
  1206. echo "network support $network"
  1207. if test "$network" = "yes" ; then
  1208. echo "IPv6 support $ipv6"
  1209. fi
  1210. if test "$gpl" = "no" ; then
  1211. echo "License: LGPL"
  1212. else
  1213. echo "License: GPL"
  1214. fi
  1215. echo "Creating config.mak and config.h..."
  1216. date >> config.log
  1217. echo " $0 $FFMPEG_CONFIGURATION" >> config.log
  1218. echo "# Automatically generated by configure - do not modify!" > config.mak
  1219. echo "/* Automatically generated by configure - do not modify! */" > $TMPH
  1220. echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
  1221. echo "prefix=\$(DESTDIR)$prefix" >> config.mak
  1222. echo "libdir=\$(DESTDIR)$libdir" >> config.mak
  1223. echo "bindir=\$(DESTDIR)$bindir" >> config.mak
  1224. echo "mandir=\$(DESTDIR)$mandir" >> config.mak
  1225. echo "MAKE=$make" >> config.mak
  1226. echo "CC=$cc" >> config.mak
  1227. echo "AR=$ar" >> config.mak
  1228. echo "RANLIB=$ranlib" >> config.mak
  1229. if test "$dostrip" = "yes" ; then
  1230. echo "STRIP=$strip" >> config.mak
  1231. echo "INSTALLSTRIP=$installstrip" >> config.mak
  1232. else
  1233. echo "STRIP=echo ignoring strip" >> config.mak
  1234. echo "INSTALLSTRIP=" >> config.mak
  1235. fi
  1236. # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when building
  1237. # shared modules on OS/X (vhook/Makefile).
  1238. SHCFLAGS=$CFLAGS
  1239. if test "$needmdynamicnopic" = yes; then
  1240. CFLAGS="$CFLAGS -mdynamic-no-pic"
  1241. fi
  1242. echo "OPTFLAGS=$CFLAGS" >> config.mak
  1243. echo "SHCFLAGS=$SHCFLAGS">>config.mak
  1244. echo "LDFLAGS=$LDFLAGS" >> config.mak
  1245. echo "LDCONFIG=$LDCONFIG" >> config.mak
  1246. echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
  1247. echo "SHFLAGS=$SHFLAGS" >> config.mak
  1248. echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
  1249. echo "BUILDSUF=$BUILDSUF" >> config.mak
  1250. echo "LIBPREF=$LIBPREF" >> config.mak
  1251. echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
  1252. echo "LIB=$LIB" >> config.mak
  1253. echo "SLIBPREF=$SLIBPREF" >> config.mak
  1254. echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
  1255. echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
  1256. echo "TARGET_OS=$TARGET_OS" >> config.mak
  1257. if test "$cpu" = "x86" ; then
  1258. echo "TARGET_ARCH_X86=yes" >> config.mak
  1259. echo "#define ARCH_X86 1" >> $TMPH
  1260. elif test "$cpu" = "x86_64" ; then
  1261. echo "TARGET_ARCH_X86_64=yes" >> config.mak
  1262. echo "#define ARCH_X86_64 1" >> $TMPH
  1263. elif test "$cpu" = "armv4l" ; then
  1264. echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
  1265. echo "#define ARCH_ARMV4L 1" >> $TMPH
  1266. elif test "$cpu" = "alpha" ; then
  1267. echo "TARGET_ARCH_ALPHA=yes" >> config.mak
  1268. echo "#define ARCH_ALPHA 1" >> $TMPH
  1269. elif test "$cpu" = "sparc64" ; then
  1270. echo "TARGET_ARCH_SPARC64=yes" >> config.mak
  1271. echo "#define ARCH_SPARC64 1" >> $TMPH
  1272. echo "TARGET_ARCH_SPARC=yes" >> config.mak
  1273. echo "#define ARCH_SPARC 1" >> $TMPH
  1274. elif test "$cpu" = "sparc" ; then
  1275. echo "TARGET_ARCH_SPARC=yes" >> config.mak
  1276. echo "#define ARCH_SPARC 1" >> $TMPH
  1277. elif test "$cpu" = "powerpc" ; then
  1278. echo "TARGET_ARCH_POWERPC=yes" >> config.mak
  1279. echo "#define ARCH_POWERPC 1" >> $TMPH
  1280. if test $POWERPCMODE = "32bits"; then
  1281. echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
  1282. else
  1283. echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
  1284. fi
  1285. if test "$powerpc_perf" = "yes"; then
  1286. echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
  1287. fi
  1288. elif test "$cpu" = "mips" ; then
  1289. echo "TARGET_ARCH_MIPS=yes" >> config.mak
  1290. echo "#define ARCH_MIPS 1" >> $TMPH
  1291. elif test "$cpu" = "sh4" ; then
  1292. echo "TARGET_ARCH_SH4=yes" >> config.mak
  1293. echo "#define ARCH_SH4 1" >> $TMPH
  1294. elif test "$cpu" = "parisc" ; then
  1295. echo "TARGET_ARCH_PARISC=yes" >> config.mak
  1296. echo "#define ARCH_PARISC 1" >> $TMPH
  1297. elif test "$cpu" = "s390" ; then
  1298. echo "TARGET_ARCH_S390=yes" >> config.mak
  1299. echo "#define ARCH_S390 1" >> $TMPH
  1300. elif test "$cpu" = "m68k" ; then
  1301. echo "TARGET_ARCH_M68K=yes" >> config.mak
  1302. echo "#define ARCH_M68K 1" >> $TMPH
  1303. elif test "$cpu" = "ia64" ; then
  1304. echo "TARGET_ARCH_IA64=yes" >> config.mak
  1305. echo "#define ARCH_IA64 1" >> $TMPH
  1306. fi
  1307. echo "#define TUNECPU $TUNECPU" >> $TMPH
  1308. if test "$bigendian" = "yes" ; then
  1309. echo "WORDS_BIGENDIAN=yes" >> config.mak
  1310. echo "#define WORDS_BIGENDIAN 1" >> $TMPH
  1311. fi
  1312. if test "$inttypes" != "yes" ; then
  1313. echo "#define EMULATE_INTTYPES 1" >> $TMPH
  1314. fi
  1315. if test "$emu_fast_int" = "yes" ; then
  1316. echo "#define EMULATE_FAST_INT 1" >> $TMPH
  1317. fi
  1318. if test "$mmx" = "yes" ; then
  1319. echo "TARGET_MMX=yes" >> config.mak
  1320. echo "#define HAVE_MMX 1" >> $TMPH
  1321. echo "#define __CPU__ 586" >> $TMPH
  1322. fi
  1323. if test "$builtin_vector" = "yes" ; then
  1324. echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
  1325. echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
  1326. fi
  1327. if test "$iwmmxt" = "yes" ; then
  1328. echo "TARGET_IWMMXT=yes" >> config.mak
  1329. echo "#define HAVE_IWMMXT 1" >> $TMPH
  1330. fi
  1331. if test "$mmi" = "yes" ; then
  1332. echo "TARGET_MMI=yes" >> config.mak
  1333. echo "#define HAVE_MMI 1" >> $TMPH
  1334. fi
  1335. if test "$altivec" = "yes" ; then
  1336. echo "TARGET_ALTIVEC=yes" >> config.mak
  1337. echo "#define HAVE_ALTIVEC 1" >> $TMPH
  1338. echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
  1339. echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
  1340. if test "$_altivec_h" = "yes" ; then
  1341. echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
  1342. else
  1343. echo "#undef HAVE_ALTIVEC_H" >> $TMPH
  1344. fi
  1345. fi
  1346. if test "$gprof" = "yes" ; then
  1347. echo "TARGET_GPROF=yes" >> config.mak
  1348. echo "#define HAVE_GPROF 1" >> $TMPH
  1349. fi
  1350. if test "$localtime_r" = "yes" ; then
  1351. echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
  1352. fi
  1353. if test "$imlib2" = "yes" ; then
  1354. echo "HAVE_IMLIB2=yes" >> config.mak
  1355. fi
  1356. if test "$freetype2" = "yes" ; then
  1357. echo "HAVE_FREETYPE2=yes" >> config.mak
  1358. fi
  1359. if test "$sunmlib" = "yes" ; then
  1360. echo "HAVE_MLIB=yes" >> config.mak
  1361. echo "#define HAVE_MLIB 1" >> $TMPH
  1362. extralibs="$extralibs -lmlib"
  1363. fi
  1364. if test "$pthreads" = "yes" ; then
  1365. echo "HAVE_PTHREADS=yes" >> config.mak
  1366. echo "#define HAVE_PTHREADS 1" >> $TMPH
  1367. echo "#define HAVE_THREADS 1" >> $TMPH
  1368. if test $targetos != FreeBSD -a $targetos != OpenBSD ; then
  1369. extralibs="$extralibs -lpthread"
  1370. fi
  1371. fi
  1372. if test "$sdl" = "yes" ; then
  1373. echo "CONFIG_SDL=yes" >> config.mak
  1374. echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
  1375. echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
  1376. fi
  1377. if test "$texi2html" = "yes"; then
  1378. echo "BUILD_DOC=yes" >> config.mak
  1379. fi
  1380. if test "$have_lrintf" = "yes" ; then
  1381. echo "#define HAVE_LRINTF 1" >> $TMPH
  1382. fi
  1383. if test "$vhook" = "yes" ; then
  1384. echo "BUILD_VHOOK=yes" >> config.mak
  1385. echo "#define HAVE_VHOOK 1" >> $TMPH
  1386. fi
  1387. pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libavcodec/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'`
  1388. lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
  1389. lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
  1390. lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
  1391. if test "$lshared" = "yes" ; then
  1392. echo "BUILD_SHARED=yes" >> config.mak
  1393. echo "PIC=-fPIC -DPIC" >> config.mak
  1394. echo "SPPMAJOR=${lavc_version%%.*}" >> config.mak
  1395. echo "SPPVERSION=$lavc_version" >> config.mak
  1396. echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak
  1397. echo "LAVCVERSION=$lavc_version" >> config.mak
  1398. echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak
  1399. echo "LAVFVERSION=$lavf_version" >> config.mak
  1400. echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
  1401. echo "LAVUVERSION=$lavu_version" >> config.mak
  1402. echo "SLIBNAME=${SLIBNAME}" >> config.mak
  1403. echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
  1404. echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
  1405. fi
  1406. echo "EXTRALIBS=$extralibs" >> config.mak
  1407. version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
  1408. cut -d '"' -f 2`
  1409. echo "VERSION=$version" >>config.mak
  1410. # If you do not want to use encoders, disable them.
  1411. echo "#define CONFIG_ENCODERS 1" >> $TMPH
  1412. echo "CONFIG_ENCODERS=yes" >> config.mak
  1413. # If you do not want to use decoders, disable them.
  1414. echo "#define CONFIG_DECODERS 1" >> $TMPH
  1415. echo "CONFIG_DECODERS=yes" >> config.mak
  1416. # muxers
  1417. if test "$muxers" = "yes" ; then
  1418. echo "#define CONFIG_MUXERS 1" >> $TMPH
  1419. echo "CONFIG_MUXERS=yes" >> config.mak
  1420. fi
  1421. # demuxers
  1422. if test "$demuxers" = "yes" ; then
  1423. echo "#define CONFIG_DEMUXERS 1" >> $TMPH
  1424. echo "CONFIG_DEMUXERS=yes" >> config.mak
  1425. fi
  1426. # AC3
  1427. if test "$a52" = "yes" ; then
  1428. echo "#define CONFIG_AC3 1" >> $TMPH
  1429. echo "CONFIG_AC3=yes" >> config.mak
  1430. if test "$a52bin" = "yes" ; then
  1431. echo "#define CONFIG_A52BIN 1" >> $TMPH
  1432. echo "CONFIG_A52BIN=yes" >> config.mak
  1433. fi
  1434. fi
  1435. # DTS
  1436. if test "$dts" = "yes" ; then
  1437. echo "#define CONFIG_DTS 1" >> $TMPH
  1438. echo "CONFIG_DTS=yes" >> config.mak
  1439. fi
  1440. # PP
  1441. if test "$pp" = "yes" ; then
  1442. echo "#define CONFIG_PP 1" >> $TMPH
  1443. echo "CONFIG_PP=yes" >> config.mak
  1444. fi
  1445. # MPEG audio high precision mode
  1446. if test "$mpegaudio_hp" = "yes" ; then
  1447. echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
  1448. fi
  1449. if test "$v4l" = "yes" ; then
  1450. echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
  1451. echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
  1452. fi
  1453. if test "$bktr" = "yes" ; then
  1454. echo "#define CONFIG_BKTR 1" >> $TMPH
  1455. echo "CONFIG_BKTR=yes" >> config.mak
  1456. fi
  1457. if test "$dv1394" = "yes" ; then
  1458. echo "#define CONFIG_DV1394 1" >> $TMPH
  1459. echo "CONFIG_DV1394=yes" >> config.mak
  1460. fi
  1461. if test "$dc1394" = "yes" ; then
  1462. echo "#define CONFIG_DC1394 1" >> $TMPH
  1463. echo "CONFIG_DC1394=yes" >> config.mak
  1464. fi
  1465. if test "$dlopen" = "yes" ; then
  1466. echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
  1467. fi
  1468. if test "$dlfcn" = "yes" ; then
  1469. echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
  1470. fi
  1471. if test "$audio_oss" = "yes" ; then
  1472. echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
  1473. echo "CONFIG_AUDIO_OSS=yes" >> config.mak
  1474. fi
  1475. if test "$audio_beos" = "yes" ; then
  1476. echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
  1477. echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
  1478. fi
  1479. if test "$network" = "yes" ; then
  1480. echo "#define CONFIG_NETWORK 1" >> $TMPH
  1481. echo "CONFIG_NETWORK=yes" >> config.mak
  1482. fi
  1483. if test "$ipv6" = "yes" ; then
  1484. echo "#define CONFIG_IPV6 1" >> $TMPH
  1485. fi
  1486. if test "$zlib" = "yes" ; then
  1487. echo "#define CONFIG_ZLIB 1" >> $TMPH
  1488. echo "CONFIG_ZLIB=yes" >> config.mak
  1489. fi
  1490. if test "$lzo" = "yes" ; then
  1491. echo "#define CONFIG_LZO 1" >> $TMPH
  1492. echo "CONFIG_LZO=yes" >> config.mak
  1493. fi
  1494. if test "$libgsm" = "yes" ; then
  1495. echo "#define CONFIG_LIBGSM 1" >> $TMPH
  1496. echo "CONFIG_LIBGSM=yes" >> config.mak
  1497. fi
  1498. if test "$mp3lame" = "yes" ; then
  1499. echo "#define CONFIG_MP3LAME 1" >> $TMPH
  1500. echo "CONFIG_MP3LAME=yes" >> config.mak
  1501. fi
  1502. if test "$libogg" = "yes" ; then
  1503. echo "#define CONFIG_LIBOGG 1" >> $TMPH
  1504. echo "CONFIG_LIBOGG=yes" >> config.mak
  1505. fi
  1506. if test "$vorbis" = "yes" ; then
  1507. echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
  1508. echo "CONFIG_LIBVORBIS=yes" >> config.mak
  1509. fi
  1510. if test "$theora" = "yes" ; then
  1511. echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
  1512. echo "CONFIG_LIBTHEORA=yes" >> config.mak
  1513. fi
  1514. if test "$faad" = "yes" ; then
  1515. echo "#define CONFIG_FAAD 1" >> $TMPH
  1516. echo "CONFIG_FAAD=yes" >> config.mak
  1517. fi
  1518. if test "$faadbin" = "yes" ; then
  1519. echo "#define CONFIG_FAADBIN 1" >> $TMPH
  1520. echo "CONFIG_FAADBIN=yes" >> config.mak
  1521. fi
  1522. if test "$faac" = "yes" ; then
  1523. echo "#define CONFIG_FAAC 1" >> $TMPH
  1524. echo "CONFIG_FAAC=yes" >> config.mak
  1525. fi
  1526. if test "$xvid" = "yes" ; then
  1527. echo "#define CONFIG_XVID 1" >> $TMPH
  1528. echo "CONFIG_XVID=yes" >> config.mak
  1529. fi
  1530. if test "$x264" = "yes" ; then
  1531. echo "#define CONFIG_X264 1" >> $TMPH
  1532. echo "CONFIG_X264=yes" >> config.mak
  1533. fi
  1534. if test "$mingw32" = "yes" ; then
  1535. echo "#define CONFIG_WIN32 1" >> $TMPH
  1536. echo "CONFIG_WIN32=yes" >> config.mak
  1537. echo "HAVE_W32THREADS=yes" >> config.mak
  1538. echo "#define HAVE_W32THREADS 1" >> $TMPH
  1539. echo "#define HAVE_THREADS 1" >> $TMPH
  1540. echo "#ifndef __MINGW32__" >> $TMPH
  1541. echo "#define __MINGW32__ 1" >> $TMPH
  1542. echo "#endif" >> $TMPH
  1543. fi
  1544. if test "$os2" = "yes" ; then
  1545. echo "#define CONFIG_OS2 1" >> $TMPH
  1546. echo "CONFIG_OS2=yes" >> config.mak
  1547. fi
  1548. if test "$TARGET_OS" = "SunOS" ; then
  1549. echo "#define CONFIG_SUNOS 1" >> $TMPH
  1550. fi
  1551. if test "$TARGET_OS" = "BeOS" ; then
  1552. echo "HAVE_BEOSTHREADS=yes" >> config.mak
  1553. echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
  1554. echo "#define HAVE_THREADS 1" >> $TMPH
  1555. fi
  1556. if test "$darwin" = "yes"; then
  1557. echo "#define CONFIG_DARWIN 1" >> $TMPH
  1558. echo "CONFIG_DARWIN=yes" >> config.mak
  1559. fi
  1560. if test "$_malloc_h" = "yes" ; then
  1561. echo "#define HAVE_MALLOC_H 1" >> $TMPH
  1562. else
  1563. echo "#undef HAVE_MALLOC_H" >> $TMPH
  1564. fi
  1565. if test "$_memalign" = "yes" ; then
  1566. echo "#define HAVE_MEMALIGN 1" >> $TMPH
  1567. else
  1568. echo "#undef HAVE_MEMALIGN" >> $TMPH
  1569. fi
  1570. if test "$memalignhack" = "yes" ; then
  1571. echo "#define MEMALIGN_HACK 1" >> $TMPH
  1572. fi
  1573. if test "$netserver" = "yes" ; then
  1574. echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
  1575. echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
  1576. fi
  1577. if test "$need_inet_aton" = "yes" ; then
  1578. echo "NEED_INET_ATON=yes" >> config.mak
  1579. fi
  1580. if test "$simpleidct" = "yes" ; then
  1581. echo "#define SIMPLE_IDCT 1" >> $TMPH
  1582. fi
  1583. if test "$ffserver" = "yes" ; then
  1584. echo "#define CONFIG_FFSERVER 1" >> $TMPH
  1585. echo "CONFIG_FFSERVER=yes" >> config.mak
  1586. fi
  1587. if test "$ffplay" = "yes" ; then
  1588. echo "CONFIG_FFPLAY=yes" >> config.mak
  1589. fi
  1590. if test "$gpl" = "yes" ; then
  1591. echo "#define CONFIG_GPL 1" >> $TMPH
  1592. echo "CONFIG_GPL=yes" >> config.mak
  1593. fi
  1594. echo "#define restrict $_restrict" >> $TMPH
  1595. if test "$optimize" = "small"; then
  1596. echo "#define always_inline" >> $TMPH
  1597. fi
  1598. # build tree in object directory if source path is different from current one
  1599. if test "$source_path_used" = "yes" ; then
  1600. DIRS="\
  1601. doc \
  1602. libavformat \
  1603. libavcodec \
  1604. libavcodec/alpha \
  1605. libavcodec/armv4l \
  1606. libavcodec/i386 \
  1607. libavcodec/sparc \
  1608. libavcodec/mlib \
  1609. libavcodec/ppc \
  1610. libavcodec/liba52 \
  1611. libavcodec/libpostproc \
  1612. libavutil \
  1613. tests \
  1614. vhook \
  1615. "
  1616. FILES="\
  1617. Makefile \
  1618. libavformat/Makefile \
  1619. libavcodec/Makefile \
  1620. libavcodec/libpostproc/Makefile \
  1621. libavutil/Makefile \
  1622. tests/Makefile \
  1623. vhook/Makefile \
  1624. doc/Makefile \
  1625. doc/texi2pod.pl \
  1626. "
  1627. for dir in $DIRS ; do
  1628. mkdir -p $dir
  1629. done
  1630. for f in $FILES ; do
  1631. ln -sf "$source_path/$f" $f
  1632. done
  1633. echo "SRC_PATH=$source_path" >> config.mak
  1634. else
  1635. echo "SRC_PATH='$source_path'" >> config.mak
  1636. fi
  1637. if test "$amr_wb" = "yes" ; then
  1638. echo "#define AMR_WB 1" >> $TMPH
  1639. echo "AMR_WB=yes" >> config.mak
  1640. echo
  1641. echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
  1642. echo "V5.1.0 from "
  1643. echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
  1644. echo "and extracted the source to libavcodec/amrwb_float"
  1645. echo
  1646. fi
  1647. if test "$amr_nb" = "yes" ; then
  1648. echo "#define AMR_NB 1" >> $TMPH
  1649. echo "AMR_NB=yes" >> config.mak
  1650. echo
  1651. if test "$amr_nb_fixed" = "yes" ; then
  1652. echo "AMR_NB_FIXED=yes" >> config.mak
  1653. echo "#define AMR_NB_FIXED 1" >> $TMPH
  1654. echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
  1655. echo "REL-5 version 5.1.0 from "
  1656. echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip"
  1657. echo "and extracted src to libavcodec/amr"
  1658. echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
  1659. echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
  1660. echo
  1661. else
  1662. echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
  1663. echo "REL-5 V5.1.0 from "
  1664. echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip"
  1665. echo "and extracted the source to libavcodec/amr_float"
  1666. echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
  1667. echo
  1668. fi
  1669. if test "$amr_if2" = "yes" ; then
  1670. echo "AMR_CFLAGS=-DIF2=1" >> config.mak
  1671. fi
  1672. fi
  1673. for codec in $CODEC_LIST ; do
  1674. echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
  1675. echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
  1676. done
  1677. diff $TMPH config.h >/dev/null 2>&1
  1678. if test $? -ne 0 ; then
  1679. mv -f $TMPH config.h
  1680. else
  1681. echo "config.h is unchanged"
  1682. fi
  1683. rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
  1684. # build pkg-config files libav*.pc and libpostproc.pc
  1685. # libavutil.pc
  1686. cat <<EOF >libavutil.pc
  1687. prefix=$prefix
  1688. exec_prefix=\${prefix}
  1689. libdir=\${exec_prefix}/lib
  1690. includedir=\${prefix}/include
  1691. Name: libavutil
  1692. Description: FFmpeg utility library
  1693. Version: $lavu_version
  1694. Requires:
  1695. Conflicts:
  1696. Libs: -L\${libdir} -lavutil
  1697. Cflags: -I\${includedir} -I\${includedir}/ffmpeg
  1698. EOF
  1699. cat <<EOF >libavutil-uninstalled.pc
  1700. prefix=
  1701. exec_prefix=
  1702. libdir=\${pcfiledir}/libavutil
  1703. includedir=\${pcfiledir}/libavutil
  1704. Name: libavutil
  1705. Description: FFmpeg utility library
  1706. Version: $lavu_version
  1707. Requires:
  1708. Conflicts:
  1709. Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
  1710. Cflags: -I\${includedir}
  1711. EOF
  1712. # libavcodec.pc
  1713. cat <<EOF >libavcodec.pc
  1714. prefix=$prefix
  1715. exec_prefix=\${prefix}
  1716. libdir=\${exec_prefix}/lib
  1717. includedir=\${prefix}/include
  1718. Name: libavcodec
  1719. Description: FFmpeg codec library
  1720. Version: $lavc_version
  1721. Requires: $pkg_requires libavutil = $lavu_version
  1722. Conflicts:
  1723. Libs: -L\${libdir} -lavcodec $extralibs
  1724. Cflags: -I\${includedir} -I\${includedir}/ffmpeg
  1725. EOF
  1726. cat <<EOF >libavcodec-uninstalled.pc
  1727. prefix=
  1728. exec_prefix=
  1729. libdir=\${pcfiledir}/libavcodec
  1730. includedir=\${pcfiledir}/libavcodec
  1731. Name: libavcodec
  1732. Description: FFmpeg codec library
  1733. Version: $lavc_version
  1734. Requires: $pkg_requires libavutil = $lavu_version
  1735. Conflicts:
  1736. Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
  1737. Cflags: -I\${includedir}
  1738. EOF
  1739. # libavformat.pc
  1740. cat <<EOF >libavformat.pc
  1741. prefix=$prefix
  1742. exec_prefix=\${prefix}
  1743. libdir=\${exec_prefix}/lib
  1744. includedir=\${prefix}/include
  1745. Name: libavformat
  1746. Description: FFmpeg container format library
  1747. Version: $lavf_version
  1748. Requires: $pkg_requires libavcodec = $lavc_version
  1749. Conflicts:
  1750. Libs: -L\${libdir} -lavformat $extralibs
  1751. Cflags: -I\${includedir} -I\${includedir}/ffmpeg
  1752. EOF
  1753. cat <<EOF >libavformat-uninstalled.pc
  1754. prefix=
  1755. exec_prefix=
  1756. libdir=\${pcfiledir}/libavformat
  1757. includedir=\${pcfiledir}/libavformat
  1758. Name: libavformat
  1759. Description: FFmpeg container format library
  1760. Version: $lavf_version
  1761. Requires: $pkg_requires libavcodec = $lavc_version
  1762. Conflicts:
  1763. Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
  1764. Cflags: -I\${includedir}
  1765. EOF
  1766. # libpostproc.pc
  1767. cat <<EOF >libpostproc.pc
  1768. prefix=$prefix
  1769. exec_prefix=\${prefix}
  1770. libdir=\${exec_prefix}/lib
  1771. includedir=\${prefix}/include
  1772. Name: libpostproc
  1773. Description: FFmpeg post processing library
  1774. Version: $lavc_version
  1775. Requires:
  1776. Conflicts:
  1777. Libs: -L\${libdir} -lpostproc
  1778. Cflags: -I\${includedir} -I\${includedir}/postproc
  1779. EOF
  1780. cat <<EOF >libpostproc-uninstalled.pc
  1781. prefix=
  1782. exec_prefix=
  1783. libdir=\${pcfiledir}/libavcodec/libpostproc
  1784. includedir=\${pcfiledir}/libavcodec/libpostproc
  1785. Name: libpostproc
  1786. Description: FFmpeg post processing library
  1787. Version: $lavc_version
  1788. Requires:
  1789. Conflicts:
  1790. Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
  1791. Cflags: -I\${includedir}
  1792. EOF