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.

1873 lines
46KB

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