2
0

apr.m4 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. dnl
  2. dnl UNIMRCP_CHECK_APR
  3. dnl
  4. dnl This macro attempts to find APR and APR-util libraries and
  5. dnl set corresponding variables on exit.
  6. dnl
  7. AC_DEFUN([UNIMRCP_CHECK_APR],
  8. [
  9. AC_MSG_NOTICE([Apache Portable Runtime (APR) library configuration])
  10. APR_FIND_APR("", "", 1, 1)
  11. if test $apr_found = "no"; then
  12. AC_MSG_WARN([APR not found])
  13. UNIMRCP_DOWNLOAD_APR
  14. fi
  15. if test $apr_found = "reconfig"; then
  16. AC_MSG_WARN([APR reconfig])
  17. fi
  18. dnl check APR version number
  19. apr_version="`$apr_config --version`"
  20. AC_MSG_RESULT([$apr_version])
  21. dnl Get build information from APR
  22. APR_ADDTO(CPPFLAGS,`$apr_config --cppflags`)
  23. APR_ADDTO(CFLAGS,`$apr_config --cflags`)
  24. APR_ADDTO(LDFLAGS,`$apr_config --ldflags`)
  25. APR_ADDTO(UNIMRCP_APR_INCLUDES,`$apr_config --includes`)
  26. APR_ADDTO(UNIMRCP_APR_LIBS,`$apr_config --link-ld`)
  27. AC_MSG_NOTICE([Apache Portable Runtime Utility (APU) library configuration])
  28. APR_FIND_APU("", "", 1, 1)
  29. if test $apu_found = "no"; then
  30. AC_MSG_WARN([APU not found])
  31. UNIMRCP_DOWNLOAD_APU
  32. fi
  33. if test $apu_found = "reconfig"; then
  34. AC_MSG_WARN([APU reconfig])
  35. fi
  36. dnl check APU version number
  37. apu_version="`$apu_config --version`"
  38. AC_MSG_RESULT([$apu_version])
  39. dnl Get build information from APU
  40. APR_ADDTO(LDFLAGS,`$apu_config --ldflags`)
  41. APR_ADDTO(UNIMRCP_APR_INCLUDES,`$apu_config --includes`)
  42. APR_ADDTO(UNIMRCP_APR_LIBS,`$apu_config --link-ld`)
  43. AC_SUBST(UNIMRCP_APR_INCLUDES)
  44. AC_SUBST(UNIMRCP_APR_LIBS)
  45. ])
  46. dnl UNIMRCP_DOWNLOAD_APR
  47. dnl no apr found, print out a message telling the user what to do
  48. AC_DEFUN([UNIMRCP_DOWNLOAD_APR],
  49. [
  50. echo "The Apache Portable Runtime (APR) library cannot be found."
  51. echo "Please install APR on this system and supply the appropriate"
  52. echo "--with-apr option to 'configure'"
  53. AC_MSG_ERROR([no suitable APR found])
  54. ])
  55. dnl UNIMRCP_DOWNLOAD_APU
  56. dnl no apr-util found, print out a message telling the user what to do
  57. AC_DEFUN([UNIMRCP_DOWNLOAD_APU],
  58. [
  59. echo "The Apache Portable Runtime Utility (APU) library cannot be found."
  60. echo "Please install APRUTIL on this system and supply the appropriate"
  61. echo "--with-apr-util option to 'configure'"
  62. AC_MSG_ERROR([no suitable APU found])
  63. ])