您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

lol-ffmpeg.m4 2.0 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. dnl
  2. dnl Lol Engine
  3. dnl
  4. dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net>
  5. dnl
  6. dnl Lol Engine is free software. It comes without any warranty, to
  7. dnl the extent permitted by applicable law. You can redistribute it
  8. dnl and/or modify it under the terms of the Do What the Fuck You Want
  9. dnl to Public License, Version 2, as published by the WTFPL Task Force.
  10. dnl See http://www.wtfpl.net/ for more details.
  11. dnl
  12. # LOL_AC_CHECK_FFMPEG()
  13. # ---------------------
  14. AC_DEFUN([LOL_AC_CHECK_FFMPEG],
  15. [
  16. if test "${enable_ffmpeg}" != "no"; then
  17. LOL_AC_CHECK_FFMPEG_INNER()
  18. fi
  19. AM_CONDITIONAL(LOL_USE_FFMPEG, test "${ac_cv_my_have_ffmpeg}" != "no")
  20. ])
  21. # LOL_AC_CHECK_FFMPEG_INNER()
  22. # ---------------------------
  23. AC_DEFUN([LOL_AC_CHECK_FFMPEG_INNER],
  24. [
  25. ac_cv_my_have_ffmpeg="yes"
  26. PKG_CHECK_MODULES([LIBAVCODEC], [libavcodec], [:], [ac_cv_my_have_ffmpeg=no])
  27. PKG_CHECK_MODULES([LIBAVUTIL], [libavutil], [:], [ac_cv_my_have_ffmpeg=no])
  28. PKG_CHECK_MODULES([LIBAVFORMAT], [libavformat], [:], [ac_cv_my_have_ffmpeg=no])
  29. PKG_CHECK_MODULES([LIBSWSCALE], [libswscale], [:], [ac_cv_my_have_ffmpeg=no])
  30. if test "${ac_cv_my_have_ffmpeg}" != "yes"; then
  31. ac_cv_my_have_ffmpeg="yes"
  32. AC_CHECK_HEADERS(libavcodec/avcodec.h, [:], [ac_cv_my_have_ffmpeg=no])
  33. AC_CHECK_HEADERS(libavformat/avformat.h, [:], [ac_cv_my_have_ffmpeg=no])
  34. AC_CHECK_HEADERS(libswscale/swscale.h, [:], [ac_cv_my_have_ffmpeg=no])
  35. if test "${ac_cv_my_have_ffmpeg}" = "yes"; then
  36. LIBAVCODEC_LIBS="-lavcodec"
  37. LIBAVUTIL_LIBS="-lavutil"
  38. LIBAVFORMAT_LIBS="-lavformat"
  39. LIBSWSCALE_LIBS="-lswscale"
  40. AC_CHECK_LIB(ws2_32, main, LOL_LIBS="${LOL_LIBS} -lws2_32")
  41. fi
  42. fi
  43. if test "${ac_cv_my_have_ffmpeg}" = "yes"; then
  44. AC_DEFINE(LOL_USE_FFMPEG, 1, Define to 1 to use FFmpeg)
  45. LOL_CFLAGS="${LOL_CFLAGS} ${LIBAVFORMAT_CFLAGS} ${LIBAVUTIL_CFLAGS} ${LIBAVCODEC_CFLAGS} ${LIBSWSCALE_CFLAGS}"
  46. LOL_LIBS="${LOL_LIBS} ${LIBAVFORMAT_LIBS} ${LIBAVUTIL_LIBS} ${LIBAVCODEC_LIBS} ${LIBSWSCALE_LIBS}"
  47. fi
  48. ]) # LOL_AC_CHECK_FFMPEG_INNER